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 ZIP_DEBUGINFO_FILES
 692 ENABLE_DEBUG_SYMBOLS
 693 STRIP_POLICY
 694 DEBUG_BINARIES
 695 NATIVE_DEBUG_SYMBOLS
 696 CFLAGS_WARNINGS_ARE_ERRORS
 697 DISABLE_WARNING_PREFIX
 698 HOTSPOT_SET_WARNINGS_AS_ERRORS
 699 WARNINGS_AS_ERRORS
 700 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 701 ZERO_ARCHFLAG
 702 LDFLAGS_TESTEXE
 703 LDFLAGS_TESTLIB
 704 LDFLAGS_CXX_JDK
 705 JDKEXE_LIBS
 706 JDKLIB_LIBS
 707 LDFLAGS_JDKEXE
 708 LDFLAGS_JDKLIB
 709 CXXFLAGS_TESTEXE
 710 CXXFLAGS_TESTLIB
 711 CFLAGS_TESTEXE
 712 CFLAGS_TESTLIB
 713 CXXFLAGS_JDKEXE
 714 CXXFLAGS_JDKLIB
 715 CFLAGS_JDKEXE
 716 CFLAGS_JDKLIB
 717 MACOSX_VERSION_MIN
 718 CXX_O_FLAG_NONE
 719 CXX_O_FLAG_DEBUG
 720 CXX_O_FLAG_NORM
 721 CXX_O_FLAG_HI
 722 CXX_O_FLAG_HIGHEST
 723 C_O_FLAG_NONE
 724 C_O_FLAG_DEBUG
 725 C_O_FLAG_NORM
 726 C_O_FLAG_HI
 727 C_O_FLAG_HIGHEST
 728 CXXFLAGS_DEBUG_SYMBOLS
 729 CFLAGS_DEBUG_SYMBOLS
 730 CXX_FLAG_DEPS
 731 C_FLAG_DEPS
 732 SET_SHARED_LIBRARY_MAPFILE
 733 SET_SHARED_LIBRARY_NAME
 734 SET_SHARED_LIBRARY_ORIGIN
 735 SET_EXECUTABLE_ORIGIN
 736 CXX_FLAG_REORDER
 737 C_FLAG_REORDER
 738 RC_FLAGS
 739 AR_OUT_OPTION
 740 LD_OUT_OPTION
 741 EXE_OUT_OPTION
 742 CC_OUT_OPTION
 743 STRIPFLAGS
 744 ARFLAGS
 745 COMPILER_TARGET_BITS_FLAG
 746 JT_HOME
 747 JTREGEXE
 748 USING_BROKEN_SUSE_LD
 749 PACKAGE_PATH
 750 USE_CLANG
 751 HOTSPOT_LD
 752 HOTSPOT_CXX
 753 HOTSPOT_RC
 754 HOTSPOT_MT
 755 BUILD_AS
 756 BUILD_LD
 757 BUILD_AR
 758 BUILD_NM
 759 BUILD_CXX
 760 BUILD_CC
 761 BUILD_SYSROOT_LDFLAGS
 762 BUILD_SYSROOT_CFLAGS
 763 ac_ct_OBJDUMP
 764 OBJDUMP
 765 ac_ct_OBJCOPY
 766 OBJCOPY
 767 ac_ct_NM
 768 ac_ct_STRIP
 769 GNM
 770 NM
 771 STRIP
 772 MSBUILD
 773 DUMPBIN
 774 RC
 775 MT
 776 LIPO
 777 ac_ct_AR
 778 AR
 779 AS
 780 LDCXX
 781 LD
 782 CXXCPP
 783 CPP
 784 ac_ct_CXX
 785 CXXFLAGS
 786 CXX
 787 ac_ct_PROPER_COMPILER_CXX
 788 PROPER_COMPILER_CXX
 789 TOOLCHAIN_PATH_CXX
 790 POTENTIAL_CXX
 791 OBJEXT
 792 EXEEXT
 793 ac_ct_CC
 794 CPPFLAGS
 795 LDFLAGS
 796 CFLAGS
 797 CC
 798 ac_ct_PROPER_COMPILER_CC
 799 PROPER_COMPILER_CC
 800 TOOLCHAIN_PATH_CC
 801 POTENTIAL_CC
 802 VS_LIB
 803 VS_INCLUDE
 804 VS_PATH
 805 CYGWIN_LINK
 806 SYSROOT_LDFLAGS
 807 SYSROOT_CFLAGS
 808 LEGACY_EXTRA_LDFLAGS
 809 LEGACY_EXTRA_CXXFLAGS
 810 LEGACY_EXTRA_CFLAGS
 811 EXE_SUFFIX
 812 OBJ_SUFFIX
 813 STATIC_LIBRARY
 814 SHARED_LIBRARY
 815 STATIC_LIBRARY_SUFFIX
 816 SHARED_LIBRARY_SUFFIX
 817 LIBRARY_PREFIX
 818 TOOLCHAIN_TYPE
 819 STATIC_BUILD
 820 BUILD_HOTSPOT
 821 HOTSPOT_DIST
 822 BUILD_OUTPUT
 823 JDK_TOPDIR
 824 NASHORN_TOPDIR
 825 HOTSPOT_TOPDIR
 826 JAXWS_TOPDIR
 827 JAXP_TOPDIR
 828 CORBA_TOPDIR
 829 LANGTOOLS_TOPDIR
 830 BOOT_JDK_BITS
 831 JAVAC_FLAGS
 832 BOOT_JDK_SOURCETARGET
 833 JARSIGNER
 834 JAR
 835 JAVAH
 836 JAVAC
 837 JAVA
 838 BOOT_JDK
 839 JAVA_CHECK
 840 JAVAC_CHECK
 841 COOKED_BUILD_NUMBER
 842 JDK_VERSION
 843 COPYRIGHT_YEAR
 844 MACOSX_BUNDLE_ID_BASE
 845 MACOSX_BUNDLE_NAME_BASE
 846 COMPANY_NAME
 847 JDK_RC_PLATFORM_NAME
 848 PRODUCT_SUFFIX
 849 PRODUCT_NAME
 850 LAUNCHER_NAME
 851 MILESTONE
 852 JDK_BUILD_NUMBER
 853 JDK_UPDATE_VERSION
 854 JDK_MICRO_VERSION
 855 JDK_MINOR_VERSION
 856 JDK_MAJOR_VERSION
 857 USER_RELEASE_SUFFIX
 858 COMPRESS_JARS
 859 UNLIMITED_CRYPTO
 860 CACERTS_FILE
 861 TEST_IN_BUILD
 862 BUILD_HEADLESS
 863 SUPPORT_HEADFUL
 864 SUPPORT_HEADLESS
 865 OS_VERSION_MICRO
 866 OS_VERSION_MINOR
 867 OS_VERSION_MAJOR
 868 PKG_CONFIG
 869 BASH_ARGS
 870 SETFILE
 871 CODESIGN
 872 XATTR
 873 DSYMUTIL
 874 IS_GNU_TIME
 875 PATCH
 876 TIME
 877 STAT
 878 HG
 879 READELF
 880 OTOOL
 881 LDD
 882 ZIP
 883 UNZIP
 884 FIND_DELETE
 885 OUTPUT_SYNC
 886 OUTPUT_SYNC_SUPPORTED
 887 CHECK_TOOLSDIR_MAKE
 888 CHECK_TOOLSDIR_GMAKE
 889 CHECK_MAKE
 890 CHECK_GMAKE
 891 MAKE
 892 PKGHANDLER
 893 CONFIGURESUPPORT_OUTPUTDIR
 894 OUTPUT_ROOT
 895 CONF_NAME
 896 SPEC
 897 SDKROOT
 898 XCODEBUILD
 899 BUILD_VARIANT_RELEASE
 900 DEBUG_CLASSFILES
 901 FASTDEBUG
 902 VARIANT
 903 DEBUG_LEVEL
 904 MACOSX_UNIVERSAL
 905 INCLUDE_SA
 906 JVM_VARIANT_CORE
 907 JVM_VARIANT_ZEROSHARK
 908 JVM_VARIANT_ZERO
 909 JVM_VARIANT_KERNEL
 910 JVM_VARIANT_MINIMAL1
 911 JVM_VARIANT_CLIENT
 912 JVM_VARIANT_SERVER
 913 JVM_VARIANTS
 914 JVM_INTERPRETER
 915 JDK_VARIANT
 916 SET_OPENJDK
 917 CANONICAL_TOPDIR
 918 ORIGINAL_TOPDIR
 919 TOPDIR
 920 PATH_SEP
 921 ZERO_ARCHDEF
 922 DEFINE_CROSS_COMPILE_ARCH
 923 LP64
 924 OPENJDK_TARGET_OS_EXPORT_DIR
 925 OPENJDK_TARGET_CPU_JLI_CFLAGS
 926 OPENJDK_TARGET_CPU_OSARCH
 927 OPENJDK_TARGET_CPU_ISADIR
 928 OPENJDK_TARGET_CPU_LIBDIR
 929 OPENJDK_TARGET_CPU_LEGACY_LIB
 930 OPENJDK_TARGET_CPU_LEGACY
 931 REQUIRED_OS_VERSION
 932 REQUIRED_OS_NAME
 933 COMPILE_TYPE
 934 OPENJDK_TARGET_CPU_ENDIAN
 935 OPENJDK_TARGET_CPU_BITS
 936 OPENJDK_TARGET_CPU_ARCH
 937 OPENJDK_TARGET_CPU
 938 OPENJDK_TARGET_OS_ENV
 939 OPENJDK_TARGET_OS_TYPE
 940 OPENJDK_TARGET_OS
 941 OPENJDK_BUILD_CPU_ENDIAN
 942 OPENJDK_BUILD_CPU_BITS
 943 OPENJDK_BUILD_CPU_ARCH
 944 OPENJDK_BUILD_CPU
 945 OPENJDK_BUILD_OS_ENV
 946 OPENJDK_BUILD_OS_TYPE
 947 OPENJDK_BUILD_OS
 948 OPENJDK_BUILD_AUTOCONF_NAME
 949 OPENJDK_TARGET_AUTOCONF_NAME
 950 target_os
 951 target_vendor
 952 target_cpu
 953 target
 954 host_os
 955 host_vendor
 956 host_cpu
 957 host
 958 build_os
 959 build_vendor
 960 build_cpu
 961 build
 962 NICE
 963 CPIO
 964 DF
 965 READLINK
 966 CYGPATH
 967 SED
 968 FGREP
 969 EGREP
 970 GREP
 971 AWK
 972 XARGS
 973 WHICH
 974 WC
 975 UNIQ
 976 UNAME
 977 TR
 978 TOUCH
 979 TEE
 980 TAR
 981 TAIL
 982 SORT
 983 SH
 984 RMDIR
 985 RM
 986 PRINTF
 987 NAWK
 988 MV
 989 MKTEMP
 990 MKDIR
 991 LS
 992 LN
 993 HEAD
 994 FIND
 995 FILE
 996 EXPR
 997 ECHO
 998 DIRNAME
 999 DIFF
1000 DATE
1001 CUT
1002 CP
1003 COMM
1004 CMP
1005 CHMOD
1006 CAT
1007 BASH
1008 BASENAME
1009 DATE_WHEN_CONFIGURED
1010 ORIGINAL_PATH
1011 CONFIGURE_COMMAND_LINE
1012 target_alias
1013 host_alias
1014 build_alias
1015 LIBS
1016 ECHO_T
1017 ECHO_N
1018 ECHO_C
1019 DEFS
1020 mandir
1021 localedir
1022 libdir
1023 psdir
1024 pdfdir
1025 dvidir
1026 htmldir
1027 infodir
1028 docdir
1029 oldincludedir
1030 includedir
1031 localstatedir
1032 sharedstatedir
1033 sysconfdir
1034 datadir
1035 datarootdir
1036 libexecdir
1037 sbindir
1038 bindir
1039 program_transform_name
1040 prefix
1041 exec_prefix
1042 PACKAGE_URL
1043 PACKAGE_BUGREPORT
1044 PACKAGE_STRING
1045 PACKAGE_VERSION
1046 PACKAGE_TARNAME
1047 PACKAGE_NAME
1048 PATH_SEPARATOR
1049 SHELL'
1050 ac_subst_files=''
1051 ac_user_opts='
1052 enable_option_checking
1053 with_target_bits
1054 enable_openjdk_only
1055 with_custom_make_dir
1056 with_jdk_variant
1057 with_jvm_interpreter
1058 with_jvm_variants
1059 enable_debug
1060 with_debug_level
1061 with_devkit
1062 with_sys_root
1063 with_sysroot
1064 with_tools_dir
1065 with_toolchain_path
1066 with_extra_path
1067 with_sdk_name
1068 with_conf_name
1069 with_output_sync
1070 enable_headful
1071 enable_hotspot_test_in_build
1072 with_cacerts_file
1073 enable_unlimited_crypto
1074 with_milestone
1075 with_update_version
1076 with_user_release_suffix
1077 with_build_number
1078 with_copyright_year
1079 with_boot_jdk
1080 with_add_source_root
1081 with_override_source_root
1082 with_adds_and_overrides
1083 with_override_langtools
1084 with_override_corba
1085 with_override_jaxp
1086 with_override_jaxws
1087 with_override_hotspot
1088 with_override_nashorn
1089 with_override_jdk
1090 with_import_hotspot
1091 enable_static_build
1092 with_toolchain_type
1093 with_extra_cflags
1094 with_extra_cxxflags
1095 with_extra_ldflags
1096 with_toolchain_version
1097 with_build_devkit
1098 with_jtreg
1099 enable_warnings_as_errors
1100 with_native_debug_symbols
1101 enable_debug_symbols
1102 enable_zip_debug_info
1103 enable_native_coverage
1104 with_stdc__lib
1105 with_msvcr_dll
1106 with_msvcp_dll
1107 with_x
1108 with_cups
1109 with_cups_include
1110 with_freetype
1111 with_freetype_include
1112 with_freetype_lib
1113 with_freetype_src
1114 enable_freetype_bundling
1115 with_alsa
1116 with_alsa_include
1117 with_alsa_lib
1118 with_libffi
1119 with_libffi_include
1120 with_libffi_lib
1121 with_libjpeg
1122 with_giflib
1123 with_libpng
1124 with_zlib
1125 with_lcms
1126 with_dxsdk
1127 with_dxsdk_lib
1128 with_dxsdk_include
1129 with_num_cores
1130 with_memory_size
1131 with_jobs
1132 with_boot_jdk_jvmargs
1133 with_sjavac_server_java
1134 enable_sjavac
1135 enable_javac_server
1136 enable_icecc
1137 enable_precompiled_headers
1138 enable_ccache
1139 with_ccache_dir
1140 '
1141       ac_precious_vars='build_alias
1142 host_alias
1143 target_alias
1144 BASENAME
1145 BASH
1146 CAT
1147 CHMOD
1148 CMP
1149 COMM
1150 CP
1151 CUT
1152 DATE
1153 DIFF
1154 DIRNAME
1155 ECHO
1156 EXPR
1157 FILE
1158 FIND
1159 HEAD
1160 LN
1161 LS
1162 MKDIR
1163 MKTEMP
1164 MV
1165 NAWK
1166 PRINTF
1167 RM
1168 RMDIR
1169 SH
1170 SORT
1171 TAIL
1172 TAR
1173 TEE
1174 TOUCH
1175 TR
1176 UNAME
1177 UNIQ
1178 WC
1179 WHICH
1180 XARGS
1181 AWK
1182 GREP
1183 EGREP
1184 FGREP
1185 SED
1186 CYGPATH
1187 READLINK
1188 DF
1189 CPIO
1190 NICE
1191 MAKE
1192 UNZIP
1193 ZIP
1194 LDD
1195 OTOOL
1196 READELF
1197 HG
1198 STAT
1199 TIME
1200 PATCH
1201 DSYMUTIL
1202 XATTR
1203 CODESIGN
1204 SETFILE
1205 PKG_CONFIG
1206 JAVA
1207 JAVAC
1208 JAVAH
1209 JAR
1210 JARSIGNER
1211 CC
1212 CFLAGS
1213 LDFLAGS
1214 LIBS
1215 CPPFLAGS
1216 CXX
1217 CXXFLAGS
1218 CCC
1219 CPP
1220 CXXCPP
1221 AS
1222 AR
1223 LIPO
1224 STRIP
1225 NM
1226 GNM
1227 OBJCOPY
1228 OBJDUMP
1229 BUILD_CC
1230 BUILD_CXX
1231 BUILD_NM
1232 BUILD_AR
1233 JTREGEXE
1234 XMKMF
1235 FREETYPE_CFLAGS
1236 FREETYPE_LIBS
1237 ALSA_CFLAGS
1238 ALSA_LIBS
1239 LIBFFI_CFLAGS
1240 LIBFFI_LIBS
1241 PNG_CFLAGS
1242 PNG_LIBS
1243 LCMS_CFLAGS
1244 LCMS_LIBS
1245 ICECC_CMD
1246 ICECC_CREATE_ENV
1247 ICECC_WRAPPER
1248 CCACHE'
1249 
1250 
1251 # Initialize some variables set by options.
1252 ac_init_help=
1253 ac_init_version=false
1254 ac_unrecognized_opts=
1255 ac_unrecognized_sep=
1256 # The variables have the same names as the options, with
1257 # dashes changed to underlines.
1258 cache_file=/dev/null
1259 exec_prefix=NONE
1260 no_create=
1261 no_recursion=
1262 prefix=NONE
1263 program_prefix=NONE
1264 program_suffix=NONE
1265 program_transform_name=s,x,x,
1266 silent=
1267 site=
1268 srcdir=
1269 verbose=
1270 x_includes=NONE
1271 x_libraries=NONE
1272 
1273 # Installation directory options.
1274 # These are left unexpanded so users can "make install exec_prefix=/foo"
1275 # and all the variables that are supposed to be based on exec_prefix
1276 # by default will actually change.
1277 # Use braces instead of parens because sh, perl, etc. also accept them.
1278 # (The list follows the same order as the GNU Coding Standards.)
1279 bindir='${exec_prefix}/bin'
1280 sbindir='${exec_prefix}/sbin'
1281 libexecdir='${exec_prefix}/libexec'
1282 datarootdir='${prefix}/share'
1283 datadir='${datarootdir}'
1284 sysconfdir='${prefix}/etc'
1285 sharedstatedir='${prefix}/com'
1286 localstatedir='${prefix}/var'
1287 includedir='${prefix}/include'
1288 oldincludedir='/usr/include'
1289 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1290 infodir='${datarootdir}/info'
1291 htmldir='${docdir}'
1292 dvidir='${docdir}'
1293 pdfdir='${docdir}'
1294 psdir='${docdir}'
1295 libdir='${exec_prefix}/lib'
1296 localedir='${datarootdir}/locale'
1297 mandir='${datarootdir}/man'
1298 
1299 ac_prev=
1300 ac_dashdash=
1301 for ac_option
1302 do
1303   # If the previous option needs an argument, assign it.
1304   if test -n "$ac_prev"; then
1305     eval $ac_prev=\$ac_option
1306     ac_prev=
1307     continue
1308   fi
1309 
1310   case $ac_option in
1311   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1312   *=)   ac_optarg= ;;
1313   *)    ac_optarg=yes ;;
1314   esac
1315 
1316   # Accept the important Cygnus configure options, so we can diagnose typos.
1317 
1318   case $ac_dashdash$ac_option in
1319   --)
1320     ac_dashdash=yes ;;
1321 
1322   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1323     ac_prev=bindir ;;
1324   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1325     bindir=$ac_optarg ;;
1326 
1327   -build | --build | --buil | --bui | --bu)
1328     ac_prev=build_alias ;;
1329   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1330     build_alias=$ac_optarg ;;
1331 
1332   -cache-file | --cache-file | --cache-fil | --cache-fi \
1333   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1334     ac_prev=cache_file ;;
1335   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1336   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1337     cache_file=$ac_optarg ;;
1338 
1339   --config-cache | -C)
1340     cache_file=config.cache ;;
1341 
1342   -datadir | --datadir | --datadi | --datad)
1343     ac_prev=datadir ;;
1344   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1345     datadir=$ac_optarg ;;
1346 
1347   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1348   | --dataroo | --dataro | --datar)
1349     ac_prev=datarootdir ;;
1350   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1351   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1352     datarootdir=$ac_optarg ;;
1353 
1354   -disable-* | --disable-*)
1355     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1356     # Reject names that are not valid shell variable names.
1357     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1358       as_fn_error $? "invalid feature name: $ac_useropt"
1359     ac_useropt_orig=$ac_useropt
1360     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1361     case $ac_user_opts in
1362       *"
1363 "enable_$ac_useropt"
1364 "*) ;;
1365       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1366          ac_unrecognized_sep=', ';;
1367     esac
1368     eval enable_$ac_useropt=no ;;
1369 
1370   -docdir | --docdir | --docdi | --doc | --do)
1371     ac_prev=docdir ;;
1372   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1373     docdir=$ac_optarg ;;
1374 
1375   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1376     ac_prev=dvidir ;;
1377   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1378     dvidir=$ac_optarg ;;
1379 
1380   -enable-* | --enable-*)
1381     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1382     # Reject names that are not valid shell variable names.
1383     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1384       as_fn_error $? "invalid feature name: $ac_useropt"
1385     ac_useropt_orig=$ac_useropt
1386     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1387     case $ac_user_opts in
1388       *"
1389 "enable_$ac_useropt"
1390 "*) ;;
1391       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1392          ac_unrecognized_sep=', ';;
1393     esac
1394     eval enable_$ac_useropt=\$ac_optarg ;;
1395 
1396   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1397   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1398   | --exec | --exe | --ex)
1399     ac_prev=exec_prefix ;;
1400   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1401   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1402   | --exec=* | --exe=* | --ex=*)
1403     exec_prefix=$ac_optarg ;;
1404 
1405   -gas | --gas | --ga | --g)
1406     # Obsolete; use --with-gas.
1407     with_gas=yes ;;
1408 
1409   -help | --help | --hel | --he | -h)
1410     ac_init_help=long ;;
1411   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1412     ac_init_help=recursive ;;
1413   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1414     ac_init_help=short ;;
1415 
1416   -host | --host | --hos | --ho)
1417     ac_prev=host_alias ;;
1418   -host=* | --host=* | --hos=* | --ho=*)
1419     host_alias=$ac_optarg ;;
1420 
1421   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1422     ac_prev=htmldir ;;
1423   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1424   | --ht=*)
1425     htmldir=$ac_optarg ;;
1426 
1427   -includedir | --includedir | --includedi | --included | --include \
1428   | --includ | --inclu | --incl | --inc)
1429     ac_prev=includedir ;;
1430   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1431   | --includ=* | --inclu=* | --incl=* | --inc=*)
1432     includedir=$ac_optarg ;;
1433 
1434   -infodir | --infodir | --infodi | --infod | --info | --inf)
1435     ac_prev=infodir ;;
1436   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1437     infodir=$ac_optarg ;;
1438 
1439   -libdir | --libdir | --libdi | --libd)
1440     ac_prev=libdir ;;
1441   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1442     libdir=$ac_optarg ;;
1443 
1444   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1445   | --libexe | --libex | --libe)
1446     ac_prev=libexecdir ;;
1447   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1448   | --libexe=* | --libex=* | --libe=*)
1449     libexecdir=$ac_optarg ;;
1450 
1451   -localedir | --localedir | --localedi | --localed | --locale)
1452     ac_prev=localedir ;;
1453   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1454     localedir=$ac_optarg ;;
1455 
1456   -localstatedir | --localstatedir | --localstatedi | --localstated \
1457   | --localstate | --localstat | --localsta | --localst | --locals)
1458     ac_prev=localstatedir ;;
1459   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1460   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1461     localstatedir=$ac_optarg ;;
1462 
1463   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1464     ac_prev=mandir ;;
1465   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1466     mandir=$ac_optarg ;;
1467 
1468   -nfp | --nfp | --nf)
1469     # Obsolete; use --without-fp.
1470     with_fp=no ;;
1471 
1472   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1473   | --no-cr | --no-c | -n)
1474     no_create=yes ;;
1475 
1476   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1477   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1478     no_recursion=yes ;;
1479 
1480   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1481   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1482   | --oldin | --oldi | --old | --ol | --o)
1483     ac_prev=oldincludedir ;;
1484   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1485   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1486   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1487     oldincludedir=$ac_optarg ;;
1488 
1489   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1490     ac_prev=prefix ;;
1491   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1492     prefix=$ac_optarg ;;
1493 
1494   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1495   | --program-pre | --program-pr | --program-p)
1496     ac_prev=program_prefix ;;
1497   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1498   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1499     program_prefix=$ac_optarg ;;
1500 
1501   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1502   | --program-suf | --program-su | --program-s)
1503     ac_prev=program_suffix ;;
1504   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1505   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1506     program_suffix=$ac_optarg ;;
1507 
1508   -program-transform-name | --program-transform-name \
1509   | --program-transform-nam | --program-transform-na \
1510   | --program-transform-n | --program-transform- \
1511   | --program-transform | --program-transfor \
1512   | --program-transfo | --program-transf \
1513   | --program-trans | --program-tran \
1514   | --progr-tra | --program-tr | --program-t)
1515     ac_prev=program_transform_name ;;
1516   -program-transform-name=* | --program-transform-name=* \
1517   | --program-transform-nam=* | --program-transform-na=* \
1518   | --program-transform-n=* | --program-transform-=* \
1519   | --program-transform=* | --program-transfor=* \
1520   | --program-transfo=* | --program-transf=* \
1521   | --program-trans=* | --program-tran=* \
1522   | --progr-tra=* | --program-tr=* | --program-t=*)
1523     program_transform_name=$ac_optarg ;;
1524 
1525   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1526     ac_prev=pdfdir ;;
1527   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1528     pdfdir=$ac_optarg ;;
1529 
1530   -psdir | --psdir | --psdi | --psd | --ps)
1531     ac_prev=psdir ;;
1532   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1533     psdir=$ac_optarg ;;
1534 
1535   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1536   | -silent | --silent | --silen | --sile | --sil)
1537     silent=yes ;;
1538 
1539   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1540     ac_prev=sbindir ;;
1541   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1542   | --sbi=* | --sb=*)
1543     sbindir=$ac_optarg ;;
1544 
1545   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1546   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1547   | --sharedst | --shareds | --shared | --share | --shar \
1548   | --sha | --sh)
1549     ac_prev=sharedstatedir ;;
1550   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1551   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1552   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1553   | --sha=* | --sh=*)
1554     sharedstatedir=$ac_optarg ;;
1555 
1556   -site | --site | --sit)
1557     ac_prev=site ;;
1558   -site=* | --site=* | --sit=*)
1559     site=$ac_optarg ;;
1560 
1561   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1562     ac_prev=srcdir ;;
1563   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1564     srcdir=$ac_optarg ;;
1565 
1566   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1567   | --syscon | --sysco | --sysc | --sys | --sy)
1568     ac_prev=sysconfdir ;;
1569   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1570   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1571     sysconfdir=$ac_optarg ;;
1572 
1573   -target | --target | --targe | --targ | --tar | --ta | --t)
1574     ac_prev=target_alias ;;
1575   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1576     target_alias=$ac_optarg ;;
1577 
1578   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1579     verbose=yes ;;
1580 
1581   -version | --version | --versio | --versi | --vers | -V)
1582     ac_init_version=: ;;
1583 
1584   -with-* | --with-*)
1585     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1586     # Reject names that are not valid shell variable names.
1587     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1588       as_fn_error $? "invalid package name: $ac_useropt"
1589     ac_useropt_orig=$ac_useropt
1590     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1591     case $ac_user_opts in
1592       *"
1593 "with_$ac_useropt"
1594 "*) ;;
1595       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1596          ac_unrecognized_sep=', ';;
1597     esac
1598     eval with_$ac_useropt=\$ac_optarg ;;
1599 
1600   -without-* | --without-*)
1601     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1602     # Reject names that are not valid shell variable names.
1603     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1604       as_fn_error $? "invalid package name: $ac_useropt"
1605     ac_useropt_orig=$ac_useropt
1606     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1607     case $ac_user_opts in
1608       *"
1609 "with_$ac_useropt"
1610 "*) ;;
1611       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1612          ac_unrecognized_sep=', ';;
1613     esac
1614     eval with_$ac_useropt=no ;;
1615 
1616   --x)
1617     # Obsolete; use --with-x.
1618     with_x=yes ;;
1619 
1620   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1621   | --x-incl | --x-inc | --x-in | --x-i)
1622     ac_prev=x_includes ;;
1623   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1624   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1625     x_includes=$ac_optarg ;;
1626 
1627   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1628   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1629     ac_prev=x_libraries ;;
1630   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1631   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1632     x_libraries=$ac_optarg ;;
1633 
1634   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1635 Try \`$0 --help' for more information"
1636     ;;
1637 
1638   *=*)
1639     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1640     # Reject names that are not valid shell variable names.
1641     case $ac_envvar in #(
1642       '' | [0-9]* | *[!_$as_cr_alnum]* )
1643       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1644     esac
1645     eval $ac_envvar=\$ac_optarg
1646     export $ac_envvar ;;
1647 
1648   *)
1649     # FIXME: should be removed in autoconf 3.0.
1650     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1651     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1652       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1653     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1654     ;;
1655 
1656   esac
1657 done
1658 
1659 if test -n "$ac_prev"; then
1660   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1661   as_fn_error $? "missing argument to $ac_option"
1662 fi
1663 
1664 if test -n "$ac_unrecognized_opts"; then
1665   case $enable_option_checking in
1666     no) ;;
1667     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1668     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1669   esac
1670 fi
1671 
1672 # Check all directory arguments for consistency.
1673 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1674                 datadir sysconfdir sharedstatedir localstatedir includedir \
1675                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1676                 libdir localedir mandir
1677 do
1678   eval ac_val=\$$ac_var
1679   # Remove trailing slashes.
1680   case $ac_val in
1681     */ )
1682       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1683       eval $ac_var=\$ac_val;;
1684   esac
1685   # Be sure to have absolute directory names.
1686   case $ac_val in
1687     [\\/$]* | ?:[\\/]* )  continue;;
1688     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1689   esac
1690   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1691 done
1692 
1693 # There might be people who depend on the old broken behavior: `$host'
1694 # used to hold the argument of --host etc.
1695 # FIXME: To remove some day.
1696 build=$build_alias
1697 host=$host_alias
1698 target=$target_alias
1699 
1700 # FIXME: To remove some day.
1701 if test "x$host_alias" != x; then
1702   if test "x$build_alias" = x; then
1703     cross_compiling=maybe
1704   elif test "x$build_alias" != "x$host_alias"; then
1705     cross_compiling=yes
1706   fi
1707 fi
1708 
1709 ac_tool_prefix=
1710 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1711 
1712 test "$silent" = yes && exec 6>/dev/null
1713 
1714 
1715 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1716 ac_ls_di=`ls -di .` &&
1717 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1718   as_fn_error $? "working directory cannot be determined"
1719 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1720   as_fn_error $? "pwd does not report name of working directory"
1721 
1722 
1723 # Find the source files, if location was not specified.
1724 if test -z "$srcdir"; then
1725   ac_srcdir_defaulted=yes
1726   # Try the directory containing this script, then the parent directory.
1727   ac_confdir=`$as_dirname -- "$as_myself" ||
1728 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1729          X"$as_myself" : 'X\(//\)[^/]' \| \
1730          X"$as_myself" : 'X\(//\)$' \| \
1731          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1732 $as_echo X"$as_myself" |
1733     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1734             s//\1/
1735             q
1736           }
1737           /^X\(\/\/\)[^/].*/{
1738             s//\1/
1739             q
1740           }
1741           /^X\(\/\/\)$/{
1742             s//\1/
1743             q
1744           }
1745           /^X\(\/\).*/{
1746             s//\1/
1747             q
1748           }
1749           s/.*/./; q'`
1750   srcdir=$ac_confdir
1751   if test ! -r "$srcdir/$ac_unique_file"; then
1752     srcdir=..
1753   fi
1754 else
1755   ac_srcdir_defaulted=no
1756 fi
1757 if test ! -r "$srcdir/$ac_unique_file"; then
1758   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1759   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1760 fi
1761 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1762 ac_abs_confdir=`(
1763         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1764         pwd)`
1765 # When building in place, set srcdir=.
1766 if test "$ac_abs_confdir" = "$ac_pwd"; then
1767   srcdir=.
1768 fi
1769 # Remove unnecessary trailing slashes from srcdir.
1770 # Double slashes in file names in object file debugging info
1771 # mess up M-x gdb in Emacs.
1772 case $srcdir in
1773 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1774 esac
1775 for ac_var in $ac_precious_vars; do
1776   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1777   eval ac_env_${ac_var}_value=\$${ac_var}
1778   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1779   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1780 done
1781 
1782 #
1783 # Report the --help message.
1784 #
1785 if test "$ac_init_help" = "long"; then
1786   # Omit some internal or obsolete options to make the list less imposing.
1787   # This message is too long to be a string in the A/UX 3.1 sh.
1788   cat <<_ACEOF
1789 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1790 
1791 Usage: $0 [OPTION]... [VAR=VALUE]...
1792 
1793 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1794 VAR=VALUE.  See below for descriptions of some of the useful variables.
1795 
1796 Defaults for the options are specified in brackets.
1797 
1798 Configuration:
1799   -h, --help              display this help and exit
1800       --help=short        display options specific to this package
1801       --help=recursive    display the short help of all the included packages
1802   -V, --version           display version information and exit
1803   -q, --quiet, --silent   do not print \`checking ...' messages
1804       --cache-file=FILE   cache test results in FILE [disabled]
1805   -C, --config-cache      alias for \`--cache-file=config.cache'
1806   -n, --no-create         do not create output files
1807       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1808 
1809 Installation directories:
1810   --prefix=PREFIX         install architecture-independent files in PREFIX
1811                           [$ac_default_prefix]
1812   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1813                           [PREFIX]
1814 
1815 By default, \`make install' will install all the files in
1816 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1817 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1818 for instance \`--prefix=\$HOME'.
1819 
1820 For better control, use the options below.
1821 
1822 Fine tuning of the installation directories:
1823   --bindir=DIR            user executables [EPREFIX/bin]
1824   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1825   --libexecdir=DIR        program executables [EPREFIX/libexec]
1826   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1827   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1828   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1829   --libdir=DIR            object code libraries [EPREFIX/lib]
1830   --includedir=DIR        C header files [PREFIX/include]
1831   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1832   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1833   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1834   --infodir=DIR           info documentation [DATAROOTDIR/info]
1835   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1836   --mandir=DIR            man documentation [DATAROOTDIR/man]
1837   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1838   --htmldir=DIR           html documentation [DOCDIR]
1839   --dvidir=DIR            dvi documentation [DOCDIR]
1840   --pdfdir=DIR            pdf documentation [DOCDIR]
1841   --psdir=DIR             ps documentation [DOCDIR]
1842 _ACEOF
1843 
1844   cat <<\_ACEOF
1845 
1846 X features:
1847   --x-includes=DIR    X include files are in DIR
1848   --x-libraries=DIR   X library files are in DIR
1849 
1850 System types:
1851   --build=BUILD     configure for building on BUILD [guessed]
1852   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1853   --target=TARGET   configure for building compilers for TARGET [HOST]
1854 _ACEOF
1855 fi
1856 
1857 if test -n "$ac_init_help"; then
1858   case $ac_init_help in
1859      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1860    esac
1861   cat <<\_ACEOF
1862 
1863 Optional Features:
1864   --disable-option-checking  ignore unrecognized --enable/--with options
1865   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1866   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1867   --enable-openjdk-only   suppress building custom source even if present
1868                           [disabled]
1869   --enable-debug          set the debug level to fastdebug (shorthand for
1870                           --with-debug-level=fastdebug) [disabled]
1871   --disable-headful       disable building headful support (graphical UI
1872                           support) [enabled]
1873   --enable-hotspot-test-in-build
1874                           run the Queens test after Hotspot build [disabled]
1875   --enable-unlimited-crypto
1876                           Enable unlimited crypto policy [disabled]
1877   --enable-static-build   enable static library build [disabled]
1878   --disable-warnings-as-errors
1879                           do not consider native warnings to be an error
1880                           [enabled]
1881   --enable-debug-symbols  Deprecated. Option is kept for backwards
1882                           compatibility and is ignored
1883   --enable-zip-debug-info Deprecated. Option is kept for backwards
1884                           compatibility and is ignored
1885   --enable-native-coverage
1886                           enable native compilation with code coverage
1887                           data[disabled]
1888   --disable-freetype-bundling
1889                           disable bundling of the freetype library with the
1890                           build result [enabled on Windows or when using
1891                           --with-freetype, disabled otherwise]
1892   --enable-sjavac         use sjavac to do fast incremental compiles
1893                           [disabled]
1894   --disable-javac-server  disable javac server [enabled]
1895   --enable-icecc          enable distribted compilation of native code using
1896                           icecc/icecream [disabled]
1897   --disable-precompiled-headers
1898                           disable using precompiled headers when compiling C++
1899                           [enabled]
1900   --enable-ccache         enable using ccache to speed up recompilations
1901                           [disabled]
1902 
1903 Optional Packages:
1904   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1905   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1906   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1907                           support it), e.g. --with-target-bits=32 [guessed]
1908   --with-custom-make-dir  Deprecated. Option is kept for backwards
1909                           compatibility and is ignored
1910   --with-jdk-variant      JDK variant to build (normal) [normal]
1911   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1912   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1913                           client, minimal1, kernel, zero, zeroshark, core)
1914                           [server]
1915   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1916                           optimized (HotSpot build only)) [release]
1917   --with-devkit           use this devkit for compilers, tools and resources
1918   --with-sys-root         alias for --with-sysroot for backwards compatability
1919   --with-sysroot          use this directory as sysroot
1920   --with-tools-dir        alias for --with-toolchain-path for backwards
1921                           compatibility
1922   --with-toolchain-path   prepend these directories when searching for
1923                           toolchain binaries (compilers etc)
1924   --with-extra-path       prepend these directories to the default path
1925   --with-sdk-name         use the platform SDK of the given name. [macosx]
1926   --with-conf-name        use this as the name of the configuration [generated
1927                           from important configuration options]
1928   --with-output-sync      set make output sync type if supported by make.
1929                           [recurse]
1930   --with-cacerts-file     specify alternative cacerts file
1931   --with-milestone        Set milestone value for build [internal]
1932   --with-update-version   Set update version value for build [b00]
1933   --with-user-release-suffix
1934                           Add a custom string to the version string if build
1935                           number is not set.[username_builddateb00]
1936   --with-build-number     Set build number value for build [b00]
1937   --with-copyright-year   Set copyright year value for build [current year]
1938   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1939   --with-add-source-root  Deprecated. Option is kept for backwards
1940                           compatibility and is ignored
1941   --with-override-source-root
1942                           Deprecated. Option is kept for backwards
1943                           compatibility and is ignored
1944   --with-adds-and-overrides
1945                           Deprecated. Option is kept for backwards
1946                           compatibility and is ignored
1947   --with-override-langtools
1948                           Deprecated. Option is kept for backwards
1949                           compatibility and is ignored
1950   --with-override-corba   Deprecated. Option is kept for backwards
1951                           compatibility and is ignored
1952   --with-override-jaxp    Deprecated. Option is kept for backwards
1953                           compatibility and is ignored
1954   --with-override-jaxws   Deprecated. Option is kept for backwards
1955                           compatibility and is ignored
1956   --with-override-hotspot Deprecated. Option is kept for backwards
1957                           compatibility and is ignored
1958   --with-override-nashorn Deprecated. Option is kept for backwards
1959                           compatibility and is ignored
1960   --with-override-jdk     Deprecated. Option is kept for backwards
1961                           compatibility and is ignored
1962   --with-import-hotspot   import hotspot binaries from this jdk image or
1963                           hotspot build dist dir instead of building from
1964                           source
1965   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1966                           to show possible values [platform dependent]
1967   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1968   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1969   --with-extra-ldflags    extra flags to be used when linking jdk
1970   --with-toolchain-version
1971                           the version of the toolchain to look for, use
1972                           '--help' to show possible values [platform
1973                           dependent]
1974   --with-build-devkit     Devkit to use for the build platform toolchain
1975   --with-jtreg            Regression Test Harness [probed]
1976   --with-native-debug-symbols
1977                           set the native debug symbol configuration (none,
1978                           internal, external, zipped) [zipped]
1979   --with-stdc++lib=<static>,<dynamic>,<default>
1980                           force linking of the C++ runtime on Linux to either
1981                           static or dynamic, default is static with dynamic as
1982                           fallback
1983   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1984                           (Windows only) [probed]
1985   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1986                           (Windows only) [probed]
1987   --with-x                use the X Window System
1988   --with-cups             specify prefix directory for the cups package
1989                           (expecting the headers under PATH/include)
1990   --with-cups-include     specify directory for the cups include files
1991   --with-freetype         specify prefix directory for the freetype package
1992                           (expecting the libraries under PATH/lib and the
1993                           headers under PATH/include)
1994   --with-freetype-include specify directory for the freetype include files
1995   --with-freetype-lib     specify directory for the freetype library
1996   --with-freetype-src     specify directory with freetype sources to
1997                           automatically build the library (experimental,
1998                           Windows-only)
1999   --with-alsa             specify prefix directory for the alsa package
2000                           (expecting the libraries under PATH/lib and the
2001                           headers under PATH/include)
2002   --with-alsa-include     specify directory for the alsa include files
2003   --with-alsa-lib         specify directory for the alsa library
2004   --with-libffi           specify prefix directory for the libffi package
2005                           (expecting the libraries under PATH/lib and the
2006                           headers under PATH/include)
2007   --with-libffi-include   specify directory for the libffi include files
2008   --with-libffi-lib       specify directory for the libffi library
2009   --with-libjpeg          use libjpeg from build system or OpenJDK source
2010                           (system, bundled) [bundled]
2011   --with-giflib           use giflib from build system or OpenJDK source
2012                           (system, bundled) [bundled]
2013   --with-libpng           use libpng from build system or OpenJDK source
2014                           (system, bundled) [bundled]
2015   --with-zlib             use zlib from build system or OpenJDK source
2016                           (system, bundled) [bundled]
2017   --with-lcms             use lcms2 from build system or OpenJDK source
2018                           (system, bundled) [bundled]
2019   --with-dxsdk            Deprecated. Option is kept for backwards
2020                           compatibility and is ignored
2021   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2022                           compatibility and is ignored
2023   --with-dxsdk-include    Deprecated. Option is kept for backwards
2024                           compatibility and is ignored
2025   --with-num-cores        number of cores in the build system, e.g.
2026                           --with-num-cores=8 [probed]
2027   --with-memory-size      memory (in MB) available in the build system, e.g.
2028                           --with-memory-size=1024 [probed]
2029   --with-jobs             number of parallel jobs to let make run [calculated
2030                           based on cores and memory]
2031   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2032                           invocations of boot JDK, overriding the default
2033                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2034                           -enableassertions"
2035   --with-sjavac-server-java
2036                           use this java binary for running the sjavac
2037                           background server [Boot JDK java]
2038   --with-ccache-dir       where to store ccache files [~/.ccache]
2039 
2040 Some influential environment variables:
2041   BASENAME    Override default value for BASENAME
2042   BASH        Override default value for BASH
2043   CAT         Override default value for CAT
2044   CHMOD       Override default value for CHMOD
2045   CMP         Override default value for CMP
2046   COMM        Override default value for COMM
2047   CP          Override default value for CP
2048   CUT         Override default value for CUT
2049   DATE        Override default value for DATE
2050   DIFF        Override default value for DIFF
2051   DIRNAME     Override default value for DIRNAME
2052   ECHO        Override default value for ECHO
2053   EXPR        Override default value for EXPR
2054   FILE        Override default value for FILE
2055   FIND        Override default value for FIND
2056   HEAD        Override default value for HEAD
2057   LN          Override default value for LN
2058   LS          Override default value for LS
2059   MKDIR       Override default value for MKDIR
2060   MKTEMP      Override default value for MKTEMP
2061   MV          Override default value for MV
2062   NAWK        Override default value for NAWK
2063   PRINTF      Override default value for PRINTF
2064   RM          Override default value for RM
2065   RMDIR       Override default value for RMDIR
2066   SH          Override default value for SH
2067   SORT        Override default value for SORT
2068   TAIL        Override default value for TAIL
2069   TAR         Override default value for TAR
2070   TEE         Override default value for TEE
2071   TOUCH       Override default value for TOUCH
2072   TR          Override default value for TR
2073   UNAME       Override default value for UNAME
2074   UNIQ        Override default value for UNIQ
2075   WC          Override default value for WC
2076   WHICH       Override default value for WHICH
2077   XARGS       Override default value for XARGS
2078   AWK         Override default value for AWK
2079   GREP        Override default value for GREP
2080   EGREP       Override default value for EGREP
2081   FGREP       Override default value for FGREP
2082   SED         Override default value for SED
2083   CYGPATH     Override default value for CYGPATH
2084   READLINK    Override default value for READLINK
2085   DF          Override default value for DF
2086   CPIO        Override default value for CPIO
2087   NICE        Override default value for NICE
2088   MAKE        Override default value for MAKE
2089   UNZIP       Override default value for UNZIP
2090   ZIP         Override default value for ZIP
2091   LDD         Override default value for LDD
2092   OTOOL       Override default value for OTOOL
2093   READELF     Override default value for READELF
2094   HG          Override default value for HG
2095   STAT        Override default value for STAT
2096   TIME        Override default value for TIME
2097   PATCH       Override default value for PATCH
2098   DSYMUTIL    Override default value for DSYMUTIL
2099   XATTR       Override default value for XATTR
2100   CODESIGN    Override default value for CODESIGN
2101   SETFILE     Override default value for SETFILE
2102   PKG_CONFIG  path to pkg-config utility
2103   JAVA        Override default value for JAVA
2104   JAVAC       Override default value for JAVAC
2105   JAVAH       Override default value for JAVAH
2106   JAR         Override default value for JAR
2107   JARSIGNER   Override default value for JARSIGNER
2108   CC          C compiler command
2109   CFLAGS      C compiler flags
2110   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2111               nonstandard directory <lib dir>
2112   LIBS        libraries to pass to the linker, e.g. -l<library>
2113   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2114               you have headers in a nonstandard directory <include dir>
2115   CXX         C++ compiler command
2116   CXXFLAGS    C++ compiler flags
2117   CPP         C preprocessor
2118   CXXCPP      C++ preprocessor
2119   AS          Override default value for AS
2120   AR          Override default value for AR
2121   LIPO        Override default value for LIPO
2122   STRIP       Override default value for STRIP
2123   NM          Override default value for NM
2124   GNM         Override default value for GNM
2125   OBJCOPY     Override default value for OBJCOPY
2126   OBJDUMP     Override default value for OBJDUMP
2127   BUILD_CC    Override default value for BUILD_CC
2128   BUILD_CXX   Override default value for BUILD_CXX
2129   BUILD_NM    Override default value for BUILD_NM
2130   BUILD_AR    Override default value for BUILD_AR
2131   JTREGEXE    Override default value for JTREGEXE
2132   XMKMF       Path to xmkmf, Makefile generator for X Window System
2133   FREETYPE_CFLAGS
2134               C compiler flags for FREETYPE, overriding pkg-config
2135   FREETYPE_LIBS
2136               linker flags for FREETYPE, overriding pkg-config
2137   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2138   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2139   LIBFFI_CFLAGS
2140               C compiler flags for LIBFFI, overriding pkg-config
2141   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2142   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2143   PNG_LIBS    linker flags for PNG, overriding pkg-config
2144   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2145   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2146   ICECC_CMD   Override default value for ICECC_CMD
2147   ICECC_CREATE_ENV
2148               Override default value for ICECC_CREATE_ENV
2149   ICECC_WRAPPER
2150               Override default value for ICECC_WRAPPER
2151   CCACHE      Override default value for CCACHE
2152 
2153 Use these variables to override the choices made by `configure' or to help
2154 it to find libraries and programs with nonstandard names/locations.
2155 
2156 Report bugs to <build-dev@openjdk.java.net>.
2157 OpenJDK home page: <http://openjdk.java.net>.
2158 _ACEOF
2159 ac_status=$?
2160 fi
2161 
2162 if test "$ac_init_help" = "recursive"; then
2163   # If there are subdirs, report their specific --help.
2164   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2165     test -d "$ac_dir" ||
2166       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2167       continue
2168     ac_builddir=.
2169 
2170 case "$ac_dir" in
2171 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2172 *)
2173   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2174   # A ".." for each directory in $ac_dir_suffix.
2175   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2176   case $ac_top_builddir_sub in
2177   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2178   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2179   esac ;;
2180 esac
2181 ac_abs_top_builddir=$ac_pwd
2182 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2183 # for backward compatibility:
2184 ac_top_builddir=$ac_top_build_prefix
2185 
2186 case $srcdir in
2187   .)  # We are building in place.
2188     ac_srcdir=.
2189     ac_top_srcdir=$ac_top_builddir_sub
2190     ac_abs_top_srcdir=$ac_pwd ;;
2191   [\\/]* | ?:[\\/]* )  # Absolute name.
2192     ac_srcdir=$srcdir$ac_dir_suffix;
2193     ac_top_srcdir=$srcdir
2194     ac_abs_top_srcdir=$srcdir ;;
2195   *) # Relative name.
2196     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2197     ac_top_srcdir=$ac_top_build_prefix$srcdir
2198     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2199 esac
2200 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2201 
2202     cd "$ac_dir" || { ac_status=$?; continue; }
2203     # Check for guested configure.
2204     if test -f "$ac_srcdir/configure.gnu"; then
2205       echo &&
2206       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2207     elif test -f "$ac_srcdir/configure"; then
2208       echo &&
2209       $SHELL "$ac_srcdir/configure" --help=recursive
2210     else
2211       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2212     fi || ac_status=$?
2213     cd "$ac_pwd" || { ac_status=$?; break; }
2214   done
2215 fi
2216 
2217 test -n "$ac_init_help" && exit $ac_status
2218 if $ac_init_version; then
2219   cat <<\_ACEOF
2220 OpenJDK configure jdk9
2221 generated by GNU Autoconf 2.69
2222 
2223 Copyright (C) 2012 Free Software Foundation, Inc.
2224 This configure script is free software; the Free Software Foundation
2225 gives unlimited permission to copy, distribute and modify it.
2226 _ACEOF
2227   exit
2228 fi
2229 
2230 ## ------------------------ ##
2231 ## Autoconf initialization. ##
2232 ## ------------------------ ##
2233 
2234 # ac_fn_c_try_compile LINENO
2235 # --------------------------
2236 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2237 ac_fn_c_try_compile ()
2238 {
2239   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2240   rm -f conftest.$ac_objext
2241   if { { ac_try="$ac_compile"
2242 case "(($ac_try" in
2243   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2244   *) ac_try_echo=$ac_try;;
2245 esac
2246 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2247 $as_echo "$ac_try_echo"; } >&5
2248   (eval "$ac_compile") 2>conftest.err
2249   ac_status=$?
2250   if test -s conftest.err; then
2251     grep -v '^ *+' conftest.err >conftest.er1
2252     cat conftest.er1 >&5
2253     mv -f conftest.er1 conftest.err
2254   fi
2255   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2256   test $ac_status = 0; } && {
2257          test -z "$ac_c_werror_flag" ||
2258          test ! -s conftest.err
2259        } && test -s conftest.$ac_objext; then :
2260   ac_retval=0
2261 else
2262   $as_echo "$as_me: failed program was:" >&5
2263 sed 's/^/| /' conftest.$ac_ext >&5
2264 
2265         ac_retval=1
2266 fi
2267   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2268   as_fn_set_status $ac_retval
2269 
2270 } # ac_fn_c_try_compile
2271 
2272 # ac_fn_cxx_try_compile LINENO
2273 # ----------------------------
2274 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2275 ac_fn_cxx_try_compile ()
2276 {
2277   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2278   rm -f conftest.$ac_objext
2279   if { { ac_try="$ac_compile"
2280 case "(($ac_try" in
2281   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2282   *) ac_try_echo=$ac_try;;
2283 esac
2284 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2285 $as_echo "$ac_try_echo"; } >&5
2286   (eval "$ac_compile") 2>conftest.err
2287   ac_status=$?
2288   if test -s conftest.err; then
2289     grep -v '^ *+' conftest.err >conftest.er1
2290     cat conftest.er1 >&5
2291     mv -f conftest.er1 conftest.err
2292   fi
2293   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2294   test $ac_status = 0; } && {
2295          test -z "$ac_cxx_werror_flag" ||
2296          test ! -s conftest.err
2297        } && test -s conftest.$ac_objext; then :
2298   ac_retval=0
2299 else
2300   $as_echo "$as_me: failed program was:" >&5
2301 sed 's/^/| /' conftest.$ac_ext >&5
2302 
2303         ac_retval=1
2304 fi
2305   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2306   as_fn_set_status $ac_retval
2307 
2308 } # ac_fn_cxx_try_compile
2309 
2310 # ac_fn_c_try_cpp LINENO
2311 # ----------------------
2312 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2313 ac_fn_c_try_cpp ()
2314 {
2315   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2316   if { { ac_try="$ac_cpp conftest.$ac_ext"
2317 case "(($ac_try" in
2318   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2319   *) ac_try_echo=$ac_try;;
2320 esac
2321 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2322 $as_echo "$ac_try_echo"; } >&5
2323   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2324   ac_status=$?
2325   if test -s conftest.err; then
2326     grep -v '^ *+' conftest.err >conftest.er1
2327     cat conftest.er1 >&5
2328     mv -f conftest.er1 conftest.err
2329   fi
2330   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2331   test $ac_status = 0; } > conftest.i && {
2332          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2333          test ! -s conftest.err
2334        }; then :
2335   ac_retval=0
2336 else
2337   $as_echo "$as_me: failed program was:" >&5
2338 sed 's/^/| /' conftest.$ac_ext >&5
2339 
2340     ac_retval=1
2341 fi
2342   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2343   as_fn_set_status $ac_retval
2344 
2345 } # ac_fn_c_try_cpp
2346 
2347 # ac_fn_cxx_try_cpp LINENO
2348 # ------------------------
2349 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2350 ac_fn_cxx_try_cpp ()
2351 {
2352   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2353   if { { ac_try="$ac_cpp conftest.$ac_ext"
2354 case "(($ac_try" in
2355   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2356   *) ac_try_echo=$ac_try;;
2357 esac
2358 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2359 $as_echo "$ac_try_echo"; } >&5
2360   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2361   ac_status=$?
2362   if test -s conftest.err; then
2363     grep -v '^ *+' conftest.err >conftest.er1
2364     cat conftest.er1 >&5
2365     mv -f conftest.er1 conftest.err
2366   fi
2367   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2368   test $ac_status = 0; } > conftest.i && {
2369          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2370          test ! -s conftest.err
2371        }; then :
2372   ac_retval=0
2373 else
2374   $as_echo "$as_me: failed program was:" >&5
2375 sed 's/^/| /' conftest.$ac_ext >&5
2376 
2377     ac_retval=1
2378 fi
2379   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2380   as_fn_set_status $ac_retval
2381 
2382 } # ac_fn_cxx_try_cpp
2383 
2384 # ac_fn_c_try_link LINENO
2385 # -----------------------
2386 # Try to link conftest.$ac_ext, and return whether this succeeded.
2387 ac_fn_c_try_link ()
2388 {
2389   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2390   rm -f conftest.$ac_objext conftest$ac_exeext
2391   if { { ac_try="$ac_link"
2392 case "(($ac_try" in
2393   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2394   *) ac_try_echo=$ac_try;;
2395 esac
2396 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2397 $as_echo "$ac_try_echo"; } >&5
2398   (eval "$ac_link") 2>conftest.err
2399   ac_status=$?
2400   if test -s conftest.err; then
2401     grep -v '^ *+' conftest.err >conftest.er1
2402     cat conftest.er1 >&5
2403     mv -f conftest.er1 conftest.err
2404   fi
2405   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2406   test $ac_status = 0; } && {
2407          test -z "$ac_c_werror_flag" ||
2408          test ! -s conftest.err
2409        } && test -s conftest$ac_exeext && {
2410          test "$cross_compiling" = yes ||
2411          test -x conftest$ac_exeext
2412        }; then :
2413   ac_retval=0
2414 else
2415   $as_echo "$as_me: failed program was:" >&5
2416 sed 's/^/| /' conftest.$ac_ext >&5
2417 
2418         ac_retval=1
2419 fi
2420   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2421   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2422   # interfere with the next link command; also delete a directory that is
2423   # left behind by Apple's compiler.  We do this before executing the actions.
2424   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2425   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2426   as_fn_set_status $ac_retval
2427 
2428 } # ac_fn_c_try_link
2429 
2430 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2431 # ---------------------------------------------------------
2432 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2433 # the include files in INCLUDES and setting the cache variable VAR
2434 # accordingly.
2435 ac_fn_cxx_check_header_mongrel ()
2436 {
2437   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2438   if eval \${$3+:} false; then :
2439   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2440 $as_echo_n "checking for $2... " >&6; }
2441 if eval \${$3+:} false; then :
2442   $as_echo_n "(cached) " >&6
2443 fi
2444 eval ac_res=\$$3
2445                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2446 $as_echo "$ac_res" >&6; }
2447 else
2448   # Is the header compilable?
2449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2450 $as_echo_n "checking $2 usability... " >&6; }
2451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2452 /* end confdefs.h.  */
2453 $4
2454 #include <$2>
2455 _ACEOF
2456 if ac_fn_cxx_try_compile "$LINENO"; then :
2457   ac_header_compiler=yes
2458 else
2459   ac_header_compiler=no
2460 fi
2461 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2463 $as_echo "$ac_header_compiler" >&6; }
2464 
2465 # Is the header present?
2466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2467 $as_echo_n "checking $2 presence... " >&6; }
2468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2469 /* end confdefs.h.  */
2470 #include <$2>
2471 _ACEOF
2472 if ac_fn_cxx_try_cpp "$LINENO"; then :
2473   ac_header_preproc=yes
2474 else
2475   ac_header_preproc=no
2476 fi
2477 rm -f conftest.err conftest.i conftest.$ac_ext
2478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2479 $as_echo "$ac_header_preproc" >&6; }
2480 
2481 # So?  What about this header?
2482 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2483   yes:no: )
2484     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2485 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2486     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2487 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2488     ;;
2489   no:yes:* )
2490     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2491 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2492     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2493 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2494     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2495 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2496     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2497 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2498     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2499 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2500 ( $as_echo "## ----------------------------------------- ##
2501 ## Report this to build-dev@openjdk.java.net ##
2502 ## ----------------------------------------- ##"
2503      ) | sed "s/^/$as_me: WARNING:     /" >&2
2504     ;;
2505 esac
2506   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2507 $as_echo_n "checking for $2... " >&6; }
2508 if eval \${$3+:} false; then :
2509   $as_echo_n "(cached) " >&6
2510 else
2511   eval "$3=\$ac_header_compiler"
2512 fi
2513 eval ac_res=\$$3
2514                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2515 $as_echo "$ac_res" >&6; }
2516 fi
2517   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2518 
2519 } # ac_fn_cxx_check_header_mongrel
2520 
2521 # ac_fn_cxx_try_run LINENO
2522 # ------------------------
2523 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2524 # that executables *can* be run.
2525 ac_fn_cxx_try_run ()
2526 {
2527   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528   if { { ac_try="$ac_link"
2529 case "(($ac_try" in
2530   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2531   *) ac_try_echo=$ac_try;;
2532 esac
2533 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2534 $as_echo "$ac_try_echo"; } >&5
2535   (eval "$ac_link") 2>&5
2536   ac_status=$?
2537   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2538   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2539   { { case "(($ac_try" in
2540   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2541   *) ac_try_echo=$ac_try;;
2542 esac
2543 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2544 $as_echo "$ac_try_echo"; } >&5
2545   (eval "$ac_try") 2>&5
2546   ac_status=$?
2547   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2548   test $ac_status = 0; }; }; then :
2549   ac_retval=0
2550 else
2551   $as_echo "$as_me: program exited with status $ac_status" >&5
2552        $as_echo "$as_me: failed program was:" >&5
2553 sed 's/^/| /' conftest.$ac_ext >&5
2554 
2555        ac_retval=$ac_status
2556 fi
2557   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2558   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2559   as_fn_set_status $ac_retval
2560 
2561 } # ac_fn_cxx_try_run
2562 
2563 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2564 # ---------------------------------------------------------
2565 # Tests whether HEADER exists and can be compiled using the include files in
2566 # INCLUDES, setting the cache variable VAR accordingly.
2567 ac_fn_cxx_check_header_compile ()
2568 {
2569   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2570   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2571 $as_echo_n "checking for $2... " >&6; }
2572 if eval \${$3+:} false; then :
2573   $as_echo_n "(cached) " >&6
2574 else
2575   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2576 /* end confdefs.h.  */
2577 $4
2578 #include <$2>
2579 _ACEOF
2580 if ac_fn_cxx_try_compile "$LINENO"; then :
2581   eval "$3=yes"
2582 else
2583   eval "$3=no"
2584 fi
2585 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2586 fi
2587 eval ac_res=\$$3
2588                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2589 $as_echo "$ac_res" >&6; }
2590   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2591 
2592 } # ac_fn_cxx_check_header_compile
2593 
2594 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2595 # ----------------------------------------------
2596 # Tries to find the compile-time value of EXPR in a program that includes
2597 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2598 # computed
2599 ac_fn_cxx_compute_int ()
2600 {
2601   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2602   if test "$cross_compiling" = yes; then
2603     # Depending upon the size, compute the lo and hi bounds.
2604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2605 /* end confdefs.h.  */
2606 $4
2607 int
2608 main ()
2609 {
2610 static int test_array [1 - 2 * !(($2) >= 0)];
2611 test_array [0] = 0;
2612 return test_array [0];
2613 
2614   ;
2615   return 0;
2616 }
2617 _ACEOF
2618 if ac_fn_cxx_try_compile "$LINENO"; then :
2619   ac_lo=0 ac_mid=0
2620   while :; do
2621     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2622 /* end confdefs.h.  */
2623 $4
2624 int
2625 main ()
2626 {
2627 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2628 test_array [0] = 0;
2629 return test_array [0];
2630 
2631   ;
2632   return 0;
2633 }
2634 _ACEOF
2635 if ac_fn_cxx_try_compile "$LINENO"; then :
2636   ac_hi=$ac_mid; break
2637 else
2638   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2639                         if test $ac_lo -le $ac_mid; then
2640                           ac_lo= ac_hi=
2641                           break
2642                         fi
2643                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2644 fi
2645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2646   done
2647 else
2648   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2649 /* end confdefs.h.  */
2650 $4
2651 int
2652 main ()
2653 {
2654 static int test_array [1 - 2 * !(($2) < 0)];
2655 test_array [0] = 0;
2656 return test_array [0];
2657 
2658   ;
2659   return 0;
2660 }
2661 _ACEOF
2662 if ac_fn_cxx_try_compile "$LINENO"; then :
2663   ac_hi=-1 ac_mid=-1
2664   while :; do
2665     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2666 /* end confdefs.h.  */
2667 $4
2668 int
2669 main ()
2670 {
2671 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2672 test_array [0] = 0;
2673 return test_array [0];
2674 
2675   ;
2676   return 0;
2677 }
2678 _ACEOF
2679 if ac_fn_cxx_try_compile "$LINENO"; then :
2680   ac_lo=$ac_mid; break
2681 else
2682   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2683                         if test $ac_mid -le $ac_hi; then
2684                           ac_lo= ac_hi=
2685                           break
2686                         fi
2687                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2688 fi
2689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2690   done
2691 else
2692   ac_lo= ac_hi=
2693 fi
2694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2695 fi
2696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2697 # Binary search between lo and hi bounds.
2698 while test "x$ac_lo" != "x$ac_hi"; do
2699   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2700   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2701 /* end confdefs.h.  */
2702 $4
2703 int
2704 main ()
2705 {
2706 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2707 test_array [0] = 0;
2708 return test_array [0];
2709 
2710   ;
2711   return 0;
2712 }
2713 _ACEOF
2714 if ac_fn_cxx_try_compile "$LINENO"; then :
2715   ac_hi=$ac_mid
2716 else
2717   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2718 fi
2719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2720 done
2721 case $ac_lo in #((
2722 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2723 '') ac_retval=1 ;;
2724 esac
2725   else
2726     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2727 /* end confdefs.h.  */
2728 $4
2729 static long int longval () { return $2; }
2730 static unsigned long int ulongval () { return $2; }
2731 #include <stdio.h>
2732 #include <stdlib.h>
2733 int
2734 main ()
2735 {
2736 
2737   FILE *f = fopen ("conftest.val", "w");
2738   if (! f)
2739     return 1;
2740   if (($2) < 0)
2741     {
2742       long int i = longval ();
2743       if (i != ($2))
2744         return 1;
2745       fprintf (f, "%ld", i);
2746     }
2747   else
2748     {
2749       unsigned long int i = ulongval ();
2750       if (i != ($2))
2751         return 1;
2752       fprintf (f, "%lu", i);
2753     }
2754   /* Do not output a trailing newline, as this causes \r\n confusion
2755      on some platforms.  */
2756   return ferror (f) || fclose (f) != 0;
2757 
2758   ;
2759   return 0;
2760 }
2761 _ACEOF
2762 if ac_fn_cxx_try_run "$LINENO"; then :
2763   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2764 else
2765   ac_retval=1
2766 fi
2767 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2768   conftest.$ac_objext conftest.beam conftest.$ac_ext
2769 rm -f conftest.val
2770 
2771   fi
2772   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2773   as_fn_set_status $ac_retval
2774 
2775 } # ac_fn_cxx_compute_int
2776 
2777 # ac_fn_cxx_try_link LINENO
2778 # -------------------------
2779 # Try to link conftest.$ac_ext, and return whether this succeeded.
2780 ac_fn_cxx_try_link ()
2781 {
2782   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2783   rm -f conftest.$ac_objext conftest$ac_exeext
2784   if { { ac_try="$ac_link"
2785 case "(($ac_try" in
2786   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2787   *) ac_try_echo=$ac_try;;
2788 esac
2789 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2790 $as_echo "$ac_try_echo"; } >&5
2791   (eval "$ac_link") 2>conftest.err
2792   ac_status=$?
2793   if test -s conftest.err; then
2794     grep -v '^ *+' conftest.err >conftest.er1
2795     cat conftest.er1 >&5
2796     mv -f conftest.er1 conftest.err
2797   fi
2798   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2799   test $ac_status = 0; } && {
2800          test -z "$ac_cxx_werror_flag" ||
2801          test ! -s conftest.err
2802        } && test -s conftest$ac_exeext && {
2803          test "$cross_compiling" = yes ||
2804          test -x conftest$ac_exeext
2805        }; then :
2806   ac_retval=0
2807 else
2808   $as_echo "$as_me: failed program was:" >&5
2809 sed 's/^/| /' conftest.$ac_ext >&5
2810 
2811         ac_retval=1
2812 fi
2813   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2814   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2815   # interfere with the next link command; also delete a directory that is
2816   # left behind by Apple's compiler.  We do this before executing the actions.
2817   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2818   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2819   as_fn_set_status $ac_retval
2820 
2821 } # ac_fn_cxx_try_link
2822 
2823 # ac_fn_cxx_check_func LINENO FUNC VAR
2824 # ------------------------------------
2825 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2826 ac_fn_cxx_check_func ()
2827 {
2828   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2829   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2830 $as_echo_n "checking for $2... " >&6; }
2831 if eval \${$3+:} false; then :
2832   $as_echo_n "(cached) " >&6
2833 else
2834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2835 /* end confdefs.h.  */
2836 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2837    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2838 #define $2 innocuous_$2
2839 
2840 /* System header to define __stub macros and hopefully few prototypes,
2841     which can conflict with char $2 (); below.
2842     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2843     <limits.h> exists even on freestanding compilers.  */
2844 
2845 #ifdef __STDC__
2846 # include <limits.h>
2847 #else
2848 # include <assert.h>
2849 #endif
2850 
2851 #undef $2
2852 
2853 /* Override any GCC internal prototype to avoid an error.
2854    Use char because int might match the return type of a GCC
2855    builtin and then its argument prototype would still apply.  */
2856 #ifdef __cplusplus
2857 extern "C"
2858 #endif
2859 char $2 ();
2860 /* The GNU C library defines this for functions which it implements
2861     to always fail with ENOSYS.  Some functions are actually named
2862     something starting with __ and the normal name is an alias.  */
2863 #if defined __stub_$2 || defined __stub___$2
2864 choke me
2865 #endif
2866 
2867 int
2868 main ()
2869 {
2870 return $2 ();
2871   ;
2872   return 0;
2873 }
2874 _ACEOF
2875 if ac_fn_cxx_try_link "$LINENO"; then :
2876   eval "$3=yes"
2877 else
2878   eval "$3=no"
2879 fi
2880 rm -f core conftest.err conftest.$ac_objext \
2881     conftest$ac_exeext conftest.$ac_ext
2882 fi
2883 eval ac_res=\$$3
2884                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2885 $as_echo "$ac_res" >&6; }
2886   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2887 
2888 } # ac_fn_cxx_check_func
2889 
2890 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2891 # -------------------------------------------------------
2892 # Tests whether HEADER exists and can be compiled using the include files in
2893 # INCLUDES, setting the cache variable VAR accordingly.
2894 ac_fn_c_check_header_compile ()
2895 {
2896   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2897   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2898 $as_echo_n "checking for $2... " >&6; }
2899 if eval \${$3+:} false; then :
2900   $as_echo_n "(cached) " >&6
2901 else
2902   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2903 /* end confdefs.h.  */
2904 $4
2905 #include <$2>
2906 _ACEOF
2907 if ac_fn_c_try_compile "$LINENO"; then :
2908   eval "$3=yes"
2909 else
2910   eval "$3=no"
2911 fi
2912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2913 fi
2914 eval ac_res=\$$3
2915                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2916 $as_echo "$ac_res" >&6; }
2917   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2918 
2919 } # ac_fn_c_check_header_compile
2920 cat >config.log <<_ACEOF
2921 This file contains any messages produced by compilers while
2922 running configure, to aid debugging if configure makes a mistake.
2923 
2924 It was created by OpenJDK $as_me jdk9, which was
2925 generated by GNU Autoconf 2.69.  Invocation command line was
2926 
2927   $ $0 $@
2928 
2929 _ACEOF
2930 exec 5>>config.log
2931 {
2932 cat <<_ASUNAME
2933 ## --------- ##
2934 ## Platform. ##
2935 ## --------- ##
2936 
2937 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2938 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2939 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2940 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2941 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2942 
2943 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2944 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2945 
2946 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2947 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2948 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2949 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2950 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2951 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2952 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2953 
2954 _ASUNAME
2955 
2956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2957 for as_dir in $PATH
2958 do
2959   IFS=$as_save_IFS
2960   test -z "$as_dir" && as_dir=.
2961     $as_echo "PATH: $as_dir"
2962   done
2963 IFS=$as_save_IFS
2964 
2965 } >&5
2966 
2967 cat >&5 <<_ACEOF
2968 
2969 
2970 ## ----------- ##
2971 ## Core tests. ##
2972 ## ----------- ##
2973 
2974 _ACEOF
2975 
2976 
2977 # Keep a trace of the command line.
2978 # Strip out --no-create and --no-recursion so they do not pile up.
2979 # Strip out --silent because we don't want to record it for future runs.
2980 # Also quote any args containing shell meta-characters.
2981 # Make two passes to allow for proper duplicate-argument suppression.
2982 ac_configure_args=
2983 ac_configure_args0=
2984 ac_configure_args1=
2985 ac_must_keep_next=false
2986 for ac_pass in 1 2
2987 do
2988   for ac_arg
2989   do
2990     case $ac_arg in
2991     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2992     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2993     | -silent | --silent | --silen | --sile | --sil)
2994       continue ;;
2995     *\'*)
2996       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2997     esac
2998     case $ac_pass in
2999     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3000     2)
3001       as_fn_append ac_configure_args1 " '$ac_arg'"
3002       if test $ac_must_keep_next = true; then
3003         ac_must_keep_next=false # Got value, back to normal.
3004       else
3005         case $ac_arg in
3006           *=* | --config-cache | -C | -disable-* | --disable-* \
3007           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3008           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3009           | -with-* | --with-* | -without-* | --without-* | --x)
3010             case "$ac_configure_args0 " in
3011               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3012             esac
3013             ;;
3014           -* ) ac_must_keep_next=true ;;
3015         esac
3016       fi
3017       as_fn_append ac_configure_args " '$ac_arg'"
3018       ;;
3019     esac
3020   done
3021 done
3022 { ac_configure_args0=; unset ac_configure_args0;}
3023 { ac_configure_args1=; unset ac_configure_args1;}
3024 
3025 # When interrupted or exit'd, cleanup temporary files, and complete
3026 # config.log.  We remove comments because anyway the quotes in there
3027 # would cause problems or look ugly.
3028 # WARNING: Use '\'' to represent an apostrophe within the trap.
3029 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3030 trap 'exit_status=$?
3031   # Save into config.log some information that might help in debugging.
3032   {
3033     echo
3034 
3035     $as_echo "## ---------------- ##
3036 ## Cache variables. ##
3037 ## ---------------- ##"
3038     echo
3039     # The following way of writing the cache mishandles newlines in values,
3040 (
3041   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3042     eval ac_val=\$$ac_var
3043     case $ac_val in #(
3044     *${as_nl}*)
3045       case $ac_var in #(
3046       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3047 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3048       esac
3049       case $ac_var in #(
3050       _ | IFS | as_nl) ;; #(
3051       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3052       *) { eval $ac_var=; unset $ac_var;} ;;
3053       esac ;;
3054     esac
3055   done
3056   (set) 2>&1 |
3057     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3058     *${as_nl}ac_space=\ *)
3059       sed -n \
3060         "s/'\''/'\''\\\\'\'''\''/g;
3061           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3062       ;; #(
3063     *)
3064       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3065       ;;
3066     esac |
3067     sort
3068 )
3069     echo
3070 
3071     $as_echo "## ----------------- ##
3072 ## Output variables. ##
3073 ## ----------------- ##"
3074     echo
3075     for ac_var in $ac_subst_vars
3076     do
3077       eval ac_val=\$$ac_var
3078       case $ac_val in
3079       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3080       esac
3081       $as_echo "$ac_var='\''$ac_val'\''"
3082     done | sort
3083     echo
3084 
3085     if test -n "$ac_subst_files"; then
3086       $as_echo "## ------------------- ##
3087 ## File substitutions. ##
3088 ## ------------------- ##"
3089       echo
3090       for ac_var in $ac_subst_files
3091       do
3092         eval ac_val=\$$ac_var
3093         case $ac_val in
3094         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3095         esac
3096         $as_echo "$ac_var='\''$ac_val'\''"
3097       done | sort
3098       echo
3099     fi
3100 
3101     if test -s confdefs.h; then
3102       $as_echo "## ----------- ##
3103 ## confdefs.h. ##
3104 ## ----------- ##"
3105       echo
3106       cat confdefs.h
3107       echo
3108     fi
3109     test "$ac_signal" != 0 &&
3110       $as_echo "$as_me: caught signal $ac_signal"
3111     $as_echo "$as_me: exit $exit_status"
3112   } >&5
3113   rm -f core *.core core.conftest.* &&
3114     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3115     exit $exit_status
3116 ' 0
3117 for ac_signal in 1 2 13 15; do
3118   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3119 done
3120 ac_signal=0
3121 
3122 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3123 rm -f -r conftest* confdefs.h
3124 
3125 $as_echo "/* confdefs.h */" > confdefs.h
3126 
3127 # Predefined preprocessor variables.
3128 
3129 cat >>confdefs.h <<_ACEOF
3130 #define PACKAGE_NAME "$PACKAGE_NAME"
3131 _ACEOF
3132 
3133 cat >>confdefs.h <<_ACEOF
3134 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3135 _ACEOF
3136 
3137 cat >>confdefs.h <<_ACEOF
3138 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3139 _ACEOF
3140 
3141 cat >>confdefs.h <<_ACEOF
3142 #define PACKAGE_STRING "$PACKAGE_STRING"
3143 _ACEOF
3144 
3145 cat >>confdefs.h <<_ACEOF
3146 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3147 _ACEOF
3148 
3149 cat >>confdefs.h <<_ACEOF
3150 #define PACKAGE_URL "$PACKAGE_URL"
3151 _ACEOF
3152 
3153 
3154 # Let the site file select an alternate cache file if it wants to.
3155 # Prefer an explicitly selected file to automatically selected ones.
3156 ac_site_file1=NONE
3157 ac_site_file2=NONE
3158 if test -n "$CONFIG_SITE"; then
3159   # We do not want a PATH search for config.site.
3160   case $CONFIG_SITE in #((
3161     -*)  ac_site_file1=./$CONFIG_SITE;;
3162     */*) ac_site_file1=$CONFIG_SITE;;
3163     *)   ac_site_file1=./$CONFIG_SITE;;
3164   esac
3165 elif test "x$prefix" != xNONE; then
3166   ac_site_file1=$prefix/share/config.site
3167   ac_site_file2=$prefix/etc/config.site
3168 else
3169   ac_site_file1=$ac_default_prefix/share/config.site
3170   ac_site_file2=$ac_default_prefix/etc/config.site
3171 fi
3172 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3173 do
3174   test "x$ac_site_file" = xNONE && continue
3175   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3176     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3177 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3178     sed 's/^/| /' "$ac_site_file" >&5
3179     . "$ac_site_file" \
3180       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3181 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3182 as_fn_error $? "failed to load site script $ac_site_file
3183 See \`config.log' for more details" "$LINENO" 5; }
3184   fi
3185 done
3186 
3187 if test -r "$cache_file"; then
3188   # Some versions of bash will fail to source /dev/null (special files
3189   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3190   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3191     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3192 $as_echo "$as_me: loading cache $cache_file" >&6;}
3193     case $cache_file in
3194       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3195       *)                      . "./$cache_file";;
3196     esac
3197   fi
3198 else
3199   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3200 $as_echo "$as_me: creating cache $cache_file" >&6;}
3201   >$cache_file
3202 fi
3203 
3204 # Check that the precious variables saved in the cache have kept the same
3205 # value.
3206 ac_cache_corrupted=false
3207 for ac_var in $ac_precious_vars; do
3208   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3209   eval ac_new_set=\$ac_env_${ac_var}_set
3210   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3211   eval ac_new_val=\$ac_env_${ac_var}_value
3212   case $ac_old_set,$ac_new_set in
3213     set,)
3214       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3215 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3216       ac_cache_corrupted=: ;;
3217     ,set)
3218       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3219 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3220       ac_cache_corrupted=: ;;
3221     ,);;
3222     *)
3223       if test "x$ac_old_val" != "x$ac_new_val"; then
3224         # differences in whitespace do not lead to failure.
3225         ac_old_val_w=`echo x $ac_old_val`
3226         ac_new_val_w=`echo x $ac_new_val`
3227         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3228           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3229 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3230           ac_cache_corrupted=:
3231         else
3232           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3233 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3234           eval $ac_var=\$ac_old_val
3235         fi
3236         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3237 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3238         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3239 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3240       fi;;
3241   esac
3242   # Pass precious variables to config.status.
3243   if test "$ac_new_set" = set; then
3244     case $ac_new_val in
3245     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3246     *) ac_arg=$ac_var=$ac_new_val ;;
3247     esac
3248     case " $ac_configure_args " in
3249       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3250       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3251     esac
3252   fi
3253 done
3254 if $ac_cache_corrupted; then
3255   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3256 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3257   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3258 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3259   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3260 fi
3261 ## -------------------- ##
3262 ## Main body of script. ##
3263 ## -------------------- ##
3264 
3265 ac_ext=c
3266 ac_cpp='$CPP $CPPFLAGS'
3267 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3268 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3269 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3270 
3271 
3272 
3273 ac_aux_dir=
3274 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3275   if test -f "$ac_dir/install-sh"; then
3276     ac_aux_dir=$ac_dir
3277     ac_install_sh="$ac_aux_dir/install-sh -c"
3278     break
3279   elif test -f "$ac_dir/install.sh"; then
3280     ac_aux_dir=$ac_dir
3281     ac_install_sh="$ac_aux_dir/install.sh -c"
3282     break
3283   elif test -f "$ac_dir/shtool"; then
3284     ac_aux_dir=$ac_dir
3285     ac_install_sh="$ac_aux_dir/shtool install -c"
3286     break
3287   fi
3288 done
3289 if test -z "$ac_aux_dir"; then
3290   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
3291 fi
3292 
3293 # These three variables are undocumented and unsupported,
3294 # and are intended to be withdrawn in a future Autoconf release.
3295 # They can cause serious problems if a builder's source tree is in a directory
3296 # whose full name contains unusual characters.
3297 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3298 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3299 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3300 
3301 
3302 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3303 
3304 #
3305 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3306 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3307 #
3308 # This code is free software; you can redistribute it and/or modify it
3309 # under the terms of the GNU General Public License version 2 only, as
3310 # published by the Free Software Foundation.  Oracle designates this
3311 # particular file as subject to the "Classpath" exception as provided
3312 # by Oracle in the LICENSE file that accompanied this code.
3313 #
3314 # This code is distributed in the hope that it will be useful, but WITHOUT
3315 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3316 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3317 # version 2 for more details (a copy is included in the LICENSE file that
3318 # accompanied this code).
3319 #
3320 # You should have received a copy of the GNU General Public License version
3321 # 2 along with this work; if not, write to the Free Software Foundation,
3322 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3323 #
3324 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3325 # or visit www.oracle.com if you need additional information or have any
3326 # questions.
3327 #
3328 
3329 #
3330 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3331 #
3332 # This program is free software; you can redistribute it and/or modify
3333 # it under the terms of the GNU General Public License as published by
3334 # the Free Software Foundation; either version 2 of the License, or
3335 # (at your option) any later version.
3336 #
3337 # This program is distributed in the hope that it will be useful, but
3338 # WITHOUT ANY WARRANTY; without even the implied warranty of
3339 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3340 # General Public License for more details.
3341 #
3342 # You should have received a copy of the GNU General Public License
3343 # along with this program; if not, write to the Free Software
3344 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3345 #
3346 # As a special exception to the GNU General Public License, if you
3347 # distribute this file as part of a program that contains a
3348 # configuration script generated by Autoconf, you may include it under
3349 # the same distribution terms that you use for the rest of that program.
3350 
3351 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3352 # ----------------------------------
3353 # PKG_PROG_PKG_CONFIG
3354 
3355 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3356 #
3357 # Check to see whether a particular set of modules exists.  Similar
3358 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3359 #
3360 #
3361 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3362 # this or PKG_CHECK_MODULES is called, or make sure to call
3363 # PKG_CHECK_EXISTS manually
3364 # --------------------------------------------------------------
3365 
3366 
3367 
3368 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3369 # ---------------------------------------------
3370 # _PKG_CONFIG
3371 
3372 # _PKG_SHORT_ERRORS_SUPPORTED
3373 # -----------------------------
3374 # _PKG_SHORT_ERRORS_SUPPORTED
3375 
3376 
3377 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3378 # [ACTION-IF-NOT-FOUND])
3379 #
3380 #
3381 # Note that if there is a possibility the first call to
3382 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3383 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3384 #
3385 #
3386 # --------------------------------------------------------------
3387 # PKG_CHECK_MODULES
3388 
3389 
3390 # Include these first...
3391 #
3392 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3393 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3394 #
3395 # This code is free software; you can redistribute it and/or modify it
3396 # under the terms of the GNU General Public License version 2 only, as
3397 # published by the Free Software Foundation.  Oracle designates this
3398 # particular file as subject to the "Classpath" exception as provided
3399 # by Oracle in the LICENSE file that accompanied this code.
3400 #
3401 # This code is distributed in the hope that it will be useful, but WITHOUT
3402 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3403 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3404 # version 2 for more details (a copy is included in the LICENSE file that
3405 # accompanied this code).
3406 #
3407 # You should have received a copy of the GNU General Public License version
3408 # 2 along with this work; if not, write to the Free Software Foundation,
3409 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3410 #
3411 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3412 # or visit www.oracle.com if you need additional information or have any
3413 # questions.
3414 #
3415 
3416 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3417 # If so, then append $1 to $2 \
3418 # Also set JVM_ARG_OK to true/false depending on outcome.
3419 
3420 
3421 # Appends a string to a path variable, only adding the : when needed.
3422 
3423 
3424 # Prepends a string to a path variable, only adding the : when needed.
3425 
3426 
3427 # This will make sure the given variable points to a full and proper
3428 # path. This means:
3429 # 1) There will be no spaces in the path. On unix platforms,
3430 #    spaces in the path will result in an error. On Windows,
3431 #    the path will be rewritten using short-style to be space-free.
3432 # 2) The path will be absolute, and it will be in unix-style (on
3433 #     cygwin).
3434 # $1: The name of the variable to fix
3435 
3436 
3437 # This will make sure the given variable points to a executable
3438 # with a full and proper path. This means:
3439 # 1) There will be no spaces in the path. On unix platforms,
3440 #    spaces in the path will result in an error. On Windows,
3441 #    the path will be rewritten using short-style to be space-free.
3442 # 2) The path will be absolute, and it will be in unix-style (on
3443 #     cygwin).
3444 # Any arguments given to the executable is preserved.
3445 # If the input variable does not have a directory specification, then
3446 # it need to be in the PATH.
3447 # $1: The name of the variable to fix
3448 
3449 
3450 
3451 
3452 # Register a --with argument but mark it as deprecated
3453 # $1: The name of the with argument to deprecate, not including --with-
3454 
3455 
3456 # Register a --enable argument but mark it as deprecated
3457 # $1: The name of the with argument to deprecate, not including --enable-
3458 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3459 
3460 
3461 
3462 
3463 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3464 # $1: variable to check
3465 
3466 
3467 # Check that there are no unprocessed overridden variables left.
3468 # If so, they are an incorrect argument and we will exit with an error.
3469 
3470 
3471 # Setup a tool for the given variable. If correctly specified by the user,
3472 # use that value, otherwise search for the tool using the supplied code snippet.
3473 # $1: variable to set
3474 # $2: code snippet to call to look for the tool
3475 # $3: code snippet to call if variable was used to find tool
3476 
3477 
3478 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3479 # $1: variable to set
3480 # $2: executable name (or list of names) to look for
3481 
3482 
3483 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3484 # $1: variable to set
3485 # $2: executable name (or list of names) to look for
3486 
3487 
3488 # Like BASIC_PATH_PROGS but fails if no tool was found.
3489 # $1: variable to set
3490 # $2: executable name (or list of names) to look for
3491 
3492 
3493 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3494 # $1: variable to set
3495 # $2: autoconf macro to call to look for the special tool
3496 
3497 
3498 # Setup the most fundamental tools that relies on not much else to set up,
3499 # but is used by much of the early bootstrap code.
3500 
3501 
3502 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3503 
3504 
3505 # Evaluates platform specific overrides for devkit variables.
3506 # $1: Name of variable
3507 
3508 
3509 
3510 
3511 
3512 
3513 #%%% Simple tools %%%
3514 
3515 # Check if we have found a usable version of make
3516 # $1: the path to a potential make binary (or empty)
3517 # $2: the description on how we found this
3518 
3519 
3520 
3521 
3522 # Goes looking for a usable version of GNU make.
3523 
3524 
3525 
3526 
3527 
3528 
3529 # Check if build directory is on local disk. If not possible to determine,
3530 # we prefer to claim it's local.
3531 # Argument 1: directory to test
3532 # Argument 2: what to do if it is on local disk
3533 # Argument 3: what to do otherwise (remote disk or failure)
3534 
3535 
3536 # Check that source files have basic read permissions set. This might
3537 # not be the case in cygwin in certain conditions.
3538 
3539 
3540 
3541 
3542 # Check for support for specific options in bash
3543 
3544 
3545 # Code to run after AC_OUTPUT
3546 
3547 
3548 #
3549 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3550 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3551 #
3552 # This code is free software; you can redistribute it and/or modify it
3553 # under the terms of the GNU General Public License version 2 only, as
3554 # published by the Free Software Foundation.  Oracle designates this
3555 # particular file as subject to the "Classpath" exception as provided
3556 # by Oracle in the LICENSE file that accompanied this code.
3557 #
3558 # This code is distributed in the hope that it will be useful, but WITHOUT
3559 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3560 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3561 # version 2 for more details (a copy is included in the LICENSE file that
3562 # accompanied this code).
3563 #
3564 # You should have received a copy of the GNU General Public License version
3565 # 2 along with this work; if not, write to the Free Software Foundation,
3566 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3567 #
3568 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3569 # or visit www.oracle.com if you need additional information or have any
3570 # questions.
3571 #
3572 
3573 
3574 
3575 
3576 
3577 # Helper function which possibly converts a path using DOS-style short mode.
3578 # If so, the updated path is stored in $new_path.
3579 # $1: The path to check
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 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3588 # and could probably be heavily simplified. However, all changes in this
3589 # area tend to need lot of testing in different scenarios, and in lack of
3590 # proper unit testing, cleaning this up has not been deemed worth the effort
3591 # at the moment.
3592 
3593 
3594 
3595 
3596 
3597 
3598 
3599 
3600 
3601 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3602 
3603 
3604 
3605 
3606 # ... then the rest
3607 #
3608 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3609 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3610 #
3611 # This code is free software; you can redistribute it and/or modify it
3612 # under the terms of the GNU General Public License version 2 only, as
3613 # published by the Free Software Foundation.  Oracle designates this
3614 # particular file as subject to the "Classpath" exception as provided
3615 # by Oracle in the LICENSE file that accompanied this code.
3616 #
3617 # This code is distributed in the hope that it will be useful, but WITHOUT
3618 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3619 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3620 # version 2 for more details (a copy is included in the LICENSE file that
3621 # accompanied this code).
3622 #
3623 # You should have received a copy of the GNU General Public License version
3624 # 2 along with this work; if not, write to the Free Software Foundation,
3625 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3626 #
3627 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3628 # or visit www.oracle.com if you need additional information or have any
3629 # questions.
3630 #
3631 
3632 ########################################################################
3633 # This file handles detection of the Boot JDK. The Boot JDK detection
3634 # process has been developed as a response to solve a complex real-world
3635 # problem. Initially, it was simple, but it has grown as platform after
3636 # platform, idiosyncracy after idiosyncracy has been supported.
3637 #
3638 # The basic idea is this:
3639 # 1) You need an acceptable *) JDK to use as a Boot JDK
3640 # 2) There are several ways to locate a JDK, that are mostly platform
3641 #    dependent **)
3642 # 3) You can have multiple JDKs installed
3643 # 4) If possible, configure should try to dig out an acceptable JDK
3644 #    automatically, without having to resort to command-line options
3645 #
3646 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3647 #     javac) and not a JRE, etc.
3648 #
3649 # **) On Windows we typically use a well-known path.
3650 #     On MacOSX we typically use the tool java_home.
3651 #     On Linux we typically find javac in the $PATH, and then follow a
3652 #     chain of symlinks that often ends up in a real JDK.
3653 #
3654 # This leads to the code where we check in different ways to locate a
3655 # JDK, and if one is found, check if it is acceptable. If not, we print
3656 # our reasons for rejecting it (useful when debugging non-working
3657 # configure situations) and continue checking the next one.
3658 ########################################################################
3659 
3660 # Execute the check given as argument, and verify the result
3661 # If the Boot JDK was previously found, do nothing
3662 # $1 A command line (typically autoconf macro) to execute
3663 
3664 
3665 # Test: Is bootjdk explicitely set by command line arguments?
3666 
3667 
3668 # Test: Is $JAVA_HOME set?
3669 
3670 
3671 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3672 
3673 
3674 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3675 # $1: Argument to the java_home binary (optional)
3676 
3677 
3678 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3679 
3680 
3681 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3682 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3683 # $1 = Path to directory containing jdk installations.
3684 # $2 = String to append to the found JDK directory to get the proper JDK home
3685 
3686 
3687 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3688 # environmental variable as base for where to look.
3689 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3690 
3691 
3692 # Test: Is there a JDK installed in default, well-known locations?
3693 
3694 
3695 # Check that a command-line tool in the Boot JDK is correct
3696 # $1 = name of variable to assign
3697 # $2 = name of binary
3698 
3699 
3700 ###############################################################################
3701 #
3702 # We need a Boot JDK to bootstrap the build.
3703 #
3704 
3705 
3706 
3707 
3708 
3709 #
3710 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3711 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3712 #
3713 # This code is free software; you can redistribute it and/or modify it
3714 # under the terms of the GNU General Public License version 2 only, as
3715 # published by the Free Software Foundation.  Oracle designates this
3716 # particular file as subject to the "Classpath" exception as provided
3717 # by Oracle in the LICENSE file that accompanied this code.
3718 #
3719 # This code is distributed in the hope that it will be useful, but WITHOUT
3720 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3721 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3722 # version 2 for more details (a copy is included in the LICENSE file that
3723 # accompanied this code).
3724 #
3725 # You should have received a copy of the GNU General Public License version
3726 # 2 along with this work; if not, write to the Free Software Foundation,
3727 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3728 #
3729 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3730 # or visit www.oracle.com if you need additional information or have any
3731 # questions.
3732 #
3733 
3734 
3735 
3736 
3737 
3738 
3739 
3740 
3741 
3742 
3743 
3744 
3745 
3746 
3747 
3748 ################################################################################
3749 #
3750 # Optionally enable distributed compilation of native code using icecc/icecream
3751 #
3752 
3753 
3754 
3755 
3756 
3757 
3758 
3759 #
3760 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3761 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3762 #
3763 # This code is free software; you can redistribute it and/or modify it
3764 # under the terms of the GNU General Public License version 2 only, as
3765 # published by the Free Software Foundation.  Oracle designates this
3766 # particular file as subject to the "Classpath" exception as provided
3767 # by Oracle in the LICENSE file that accompanied this code.
3768 #
3769 # This code is distributed in the hope that it will be useful, but WITHOUT
3770 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3771 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3772 # version 2 for more details (a copy is included in the LICENSE file that
3773 # accompanied this code).
3774 #
3775 # You should have received a copy of the GNU General Public License version
3776 # 2 along with this work; if not, write to the Free Software Foundation,
3777 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3778 #
3779 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3780 # or visit www.oracle.com if you need additional information or have any
3781 # questions.
3782 #
3783 
3784 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3785 # corresponding configure arguments instead
3786 
3787 
3788 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3789 # that configure can use them while detecting compilers.
3790 # TOOLCHAIN_TYPE is available here.
3791 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
3792 
3793 
3794 
3795 
3796 
3797 
3798 # Documentation on common flags used for solstudio in HIGHEST.
3799 #
3800 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3801 #          done with care, there are some assumptions below that need to
3802 #          be understood about the use of pointers, and IEEE behavior.
3803 #
3804 # -fns: Use non-standard floating point mode (not IEEE 754)
3805 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3806 # -fsingle: Use single precision floating point with 'float'
3807 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3808 #   (Source with excessing pointer casting and data access with mixed
3809 #    pointer types are not recommended)
3810 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3811 #   (If you expect perfect errno behavior, do not use this)
3812 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3813 # -xrestrict: Pointer parameters to functions do not overlap
3814 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3815 #    If you pass in multiple pointers to the same data, do not use this)
3816 # -xlibmil: Inline some library routines
3817 #   (If you expect perfect errno behavior, do not use this)
3818 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3819 #   (If you expect perfect errno behavior, do not use this)
3820 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3821 
3822     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3823     # Bug?
3824     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3825     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3826     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3827     #fi
3828 
3829 
3830 
3831 
3832 
3833 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3834 #                                   [RUN-IF-FALSE])
3835 # ------------------------------------------------------------
3836 # Check that the c and c++ compilers support an argument
3837 
3838 
3839 # FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3840 #                                    [RUN-IF-FALSE])
3841 # ------------------------------------------------------------
3842 # Check that the linker support an argument
3843 
3844 
3845 
3846 
3847 #
3848 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3849 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3850 #
3851 # This code is free software; you can redistribute it and/or modify it
3852 # under the terms of the GNU General Public License version 2 only, as
3853 # published by the Free Software Foundation.  Oracle designates this
3854 # particular file as subject to the "Classpath" exception as provided
3855 # by Oracle in the LICENSE file that accompanied this code.
3856 #
3857 # This code is distributed in the hope that it will be useful, but WITHOUT
3858 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3859 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3860 # version 2 for more details (a copy is included in the LICENSE file that
3861 # accompanied this code).
3862 #
3863 # You should have received a copy of the GNU General Public License version
3864 # 2 along with this work; if not, write to the Free Software Foundation,
3865 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3866 #
3867 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3868 # or visit www.oracle.com if you need additional information or have any
3869 # questions.
3870 #
3871 
3872 
3873 
3874 
3875 
3876 cygwin_help() {
3877   case $1 in
3878     unzip)
3879       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3880       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3881       ;;
3882     zip)
3883       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3884       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3885       ;;
3886     make)
3887       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3888       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3889       ;;
3890     freetype)
3891       HELP_MSG="
3892 The freetype library can now be build during the configure process.
3893 Download the freetype sources and unpack them into an arbitrary directory:
3894 
3895 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3896 tar -xzf freetype-2.5.3.tar.gz
3897 
3898 Then run configure with '--with-freetype-src=<freetype_src>'. This will
3899 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3900 builds or into '<freetype_src>/lib32' for 32-bit builds.
3901 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3902 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3903       ;;
3904   esac
3905 }
3906 
3907 msys_help() {
3908   PKGHANDLER_COMMAND=""
3909 }
3910 
3911 apt_help() {
3912   case $1 in
3913     reduced)
3914       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3915     devkit)
3916       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3917     openjdk)
3918       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3919     alsa)
3920       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3921     cups)
3922       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3923     freetype)
3924       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3925     ffi)
3926       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3927     x11)
3928       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3929     ccache)
3930       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3931   esac
3932 }
3933 
3934 yum_help() {
3935   case $1 in
3936     devkit)
3937       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3938     openjdk)
3939       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3940     alsa)
3941       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3942     cups)
3943       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3944     freetype)
3945       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3946     x11)
3947       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3948     ccache)
3949       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3950   esac
3951 }
3952 
3953 port_help() {
3954   PKGHANDLER_COMMAND=""
3955 }
3956 
3957 pkgutil_help() {
3958   PKGHANDLER_COMMAND=""
3959 }
3960 
3961 pkgadd_help() {
3962   PKGHANDLER_COMMAND=""
3963 }
3964 
3965 # This function will check if we're called from the "configure" wrapper while
3966 # printing --help. If so, we will print out additional information that can
3967 # only be extracted within the autoconf script, and then exit. This must be
3968 # called at the very beginning in configure.ac.
3969 
3970 
3971 
3972 
3973 
3974 
3975 #
3976 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3977 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3978 #
3979 # This code is free software; you can redistribute it and/or modify it
3980 # under the terms of the GNU General Public License version 2 only, as
3981 # published by the Free Software Foundation.  Oracle designates this
3982 # particular file as subject to the "Classpath" exception as provided
3983 # by Oracle in the LICENSE file that accompanied this code.
3984 #
3985 # This code is distributed in the hope that it will be useful, but WITHOUT
3986 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3987 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3988 # version 2 for more details (a copy is included in the LICENSE file that
3989 # accompanied this code).
3990 #
3991 # You should have received a copy of the GNU General Public License version
3992 # 2 along with this work; if not, write to the Free Software Foundation,
3993 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3994 #
3995 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3996 # or visit www.oracle.com if you need additional information or have any
3997 # questions.
3998 #
3999 
4000 
4001 
4002 
4003 
4004 
4005 
4006 
4007 
4008 
4009 ###############################################################################
4010 #
4011 # Should we build only OpenJDK even if closed sources are present?
4012 #
4013 
4014 
4015 
4016 
4017 ###############################################################################
4018 #
4019 # Setup version numbers
4020 #
4021 
4022 
4023 
4024 
4025 
4026 
4027 ################################################################################
4028 #
4029 # Gcov coverage data for hotspot
4030 #
4031 
4032 
4033 ################################################################################
4034 #
4035 # Static build support.  When enabled will generate static
4036 # libraries instead of shared libraries for all JDK libs.
4037 #
4038 
4039 
4040 
4041 
4042 #
4043 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4044 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4045 #
4046 # This code is free software; you can redistribute it and/or modify it
4047 # under the terms of the GNU General Public License version 2 only, as
4048 # published by the Free Software Foundation.  Oracle designates this
4049 # particular file as subject to the "Classpath" exception as provided
4050 # by Oracle in the LICENSE file that accompanied this code.
4051 #
4052 # This code is distributed in the hope that it will be useful, but WITHOUT
4053 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4054 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4055 # version 2 for more details (a copy is included in the LICENSE file that
4056 # accompanied this code).
4057 #
4058 # You should have received a copy of the GNU General Public License version
4059 # 2 along with this work; if not, write to the Free Software Foundation,
4060 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4061 #
4062 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4063 # or visit www.oracle.com if you need additional information or have any
4064 # questions.
4065 #
4066 
4067 # Major library component reside in separate files.
4068 #
4069 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4070 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4071 #
4072 # This code is free software; you can redistribute it and/or modify it
4073 # under the terms of the GNU General Public License version 2 only, as
4074 # published by the Free Software Foundation.  Oracle designates this
4075 # particular file as subject to the "Classpath" exception as provided
4076 # by Oracle in the LICENSE file that accompanied this code.
4077 #
4078 # This code is distributed in the hope that it will be useful, but WITHOUT
4079 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4080 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4081 # version 2 for more details (a copy is included in the LICENSE file that
4082 # accompanied this code).
4083 #
4084 # You should have received a copy of the GNU General Public License version
4085 # 2 along with this work; if not, write to the Free Software Foundation,
4086 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4087 #
4088 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4089 # or visit www.oracle.com if you need additional information or have any
4090 # questions.
4091 #
4092 
4093 ################################################################################
4094 # Setup alsa (Advanced Linux Sound Architecture)
4095 ################################################################################
4096 
4097 
4098 #
4099 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4100 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4101 #
4102 # This code is free software; you can redistribute it and/or modify it
4103 # under the terms of the GNU General Public License version 2 only, as
4104 # published by the Free Software Foundation.  Oracle designates this
4105 # particular file as subject to the "Classpath" exception as provided
4106 # by Oracle in the LICENSE file that accompanied this code.
4107 #
4108 # This code is distributed in the hope that it will be useful, but WITHOUT
4109 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4110 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4111 # version 2 for more details (a copy is included in the LICENSE file that
4112 # accompanied this code).
4113 #
4114 # You should have received a copy of the GNU General Public License version
4115 # 2 along with this work; if not, write to the Free Software Foundation,
4116 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4117 #
4118 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4119 # or visit www.oracle.com if you need additional information or have any
4120 # questions.
4121 #
4122 
4123 ################################################################################
4124 # Setup bundled libraries.
4125 #
4126 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4127 # OpenJDK repository. Default is to use these libraries as bundled, but they
4128 # might be replaced by en external version by the user.
4129 ################################################################################
4130 
4131 
4132 ################################################################################
4133 # Setup libjpeg
4134 ################################################################################
4135 
4136 
4137 ################################################################################
4138 # Setup giflib
4139 ################################################################################
4140 
4141 
4142 ################################################################################
4143 # Setup libpng
4144 ################################################################################
4145 
4146 
4147 ################################################################################
4148 # Setup zlib
4149 ################################################################################
4150 
4151 
4152 ################################################################################
4153 # Setup lcms (Little CMS)
4154 ################################################################################
4155 
4156 
4157 #
4158 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4159 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4160 #
4161 # This code is free software; you can redistribute it and/or modify it
4162 # under the terms of the GNU General Public License version 2 only, as
4163 # published by the Free Software Foundation.  Oracle designates this
4164 # particular file as subject to the "Classpath" exception as provided
4165 # by Oracle in the LICENSE file that accompanied this code.
4166 #
4167 # This code is distributed in the hope that it will be useful, but WITHOUT
4168 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4169 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4170 # version 2 for more details (a copy is included in the LICENSE file that
4171 # accompanied this code).
4172 #
4173 # You should have received a copy of the GNU General Public License version
4174 # 2 along with this work; if not, write to the Free Software Foundation,
4175 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4176 #
4177 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4178 # or visit www.oracle.com if you need additional information or have any
4179 # questions.
4180 #
4181 
4182 ################################################################################
4183 # Setup cups (Common Unix Printing System)
4184 ################################################################################
4185 
4186 
4187 #
4188 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4189 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4190 #
4191 # This code is free software; you can redistribute it and/or modify it
4192 # under the terms of the GNU General Public License version 2 only, as
4193 # published by the Free Software Foundation.  Oracle designates this
4194 # particular file as subject to the "Classpath" exception as provided
4195 # by Oracle in the LICENSE file that accompanied this code.
4196 #
4197 # This code is distributed in the hope that it will be useful, but WITHOUT
4198 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4199 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4200 # version 2 for more details (a copy is included in the LICENSE file that
4201 # accompanied this code).
4202 #
4203 # You should have received a copy of the GNU General Public License version
4204 # 2 along with this work; if not, write to the Free Software Foundation,
4205 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4206 #
4207 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4208 # or visit www.oracle.com if you need additional information or have any
4209 # questions.
4210 #
4211 
4212 ################################################################################
4213 # Setup libffi (Foreign Function Interface)
4214 ################################################################################
4215 
4216 
4217 #
4218 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4219 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4220 #
4221 # This code is free software; you can redistribute it and/or modify it
4222 # under the terms of the GNU General Public License version 2 only, as
4223 # published by the Free Software Foundation.  Oracle designates this
4224 # particular file as subject to the "Classpath" exception as provided
4225 # by Oracle in the LICENSE file that accompanied this code.
4226 #
4227 # This code is distributed in the hope that it will be useful, but WITHOUT
4228 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4229 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4230 # version 2 for more details (a copy is included in the LICENSE file that
4231 # accompanied this code).
4232 #
4233 # You should have received a copy of the GNU General Public License version
4234 # 2 along with this work; if not, write to the Free Software Foundation,
4235 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4236 #
4237 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4238 # or visit www.oracle.com if you need additional information or have any
4239 # questions.
4240 #
4241 
4242 ################################################################################
4243 # Build the freetype lib from source
4244 ################################################################################
4245 
4246 
4247 ################################################################################
4248 # Check if a potential freeype library match is correct and usable
4249 ################################################################################
4250 
4251 
4252 ################################################################################
4253 # Setup freetype (The FreeType2 font rendering library)
4254 ################################################################################
4255 
4256 
4257 #
4258 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4259 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4260 #
4261 # This code is free software; you can redistribute it and/or modify it
4262 # under the terms of the GNU General Public License version 2 only, as
4263 # published by the Free Software Foundation.  Oracle designates this
4264 # particular file as subject to the "Classpath" exception as provided
4265 # by Oracle in the LICENSE file that accompanied this code.
4266 #
4267 # This code is distributed in the hope that it will be useful, but WITHOUT
4268 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4269 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4270 # version 2 for more details (a copy is included in the LICENSE file that
4271 # accompanied this code).
4272 #
4273 # You should have received a copy of the GNU General Public License version
4274 # 2 along with this work; if not, write to the Free Software Foundation,
4275 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4276 #
4277 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4278 # or visit www.oracle.com if you need additional information or have any
4279 # questions.
4280 #
4281 
4282 ################################################################################
4283 # Setup the standard C/C++ runtime libraries.
4284 #
4285 # Most importantly, determine if stdc++ should be linked statically or
4286 # dynamically.
4287 ################################################################################
4288 
4289 
4290 #
4291 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4292 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4293 #
4294 # This code is free software; you can redistribute it and/or modify it
4295 # under the terms of the GNU General Public License version 2 only, as
4296 # published by the Free Software Foundation.  Oracle designates this
4297 # particular file as subject to the "Classpath" exception as provided
4298 # by Oracle in the LICENSE file that accompanied this code.
4299 #
4300 # This code is distributed in the hope that it will be useful, but WITHOUT
4301 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4302 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4303 # version 2 for more details (a copy is included in the LICENSE file that
4304 # accompanied this code).
4305 #
4306 # You should have received a copy of the GNU General Public License version
4307 # 2 along with this work; if not, write to the Free Software Foundation,
4308 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4309 #
4310 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4311 # or visit www.oracle.com if you need additional information or have any
4312 # questions.
4313 #
4314 
4315 ################################################################################
4316 # Setup X11 Windows system
4317 ################################################################################
4318 
4319 
4320 
4321 ################################################################################
4322 # Determine which libraries are needed for this configuration
4323 ################################################################################
4324 
4325 
4326 ################################################################################
4327 # Parse library options, and setup needed libraries
4328 ################################################################################
4329 
4330 
4331 ################################################################################
4332 # Setup llvm (Low-Level VM)
4333 ################################################################################
4334 
4335 
4336 ################################################################################
4337 # Setup various libraries, typically small system libraries
4338 ################################################################################
4339 
4340 
4341 #
4342 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4343 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4344 #
4345 # This code is free software; you can redistribute it and/or modify it
4346 # under the terms of the GNU General Public License version 2 only, as
4347 # published by the Free Software Foundation.  Oracle designates this
4348 # particular file as subject to the "Classpath" exception as provided
4349 # by Oracle in the LICENSE file that accompanied this code.
4350 #
4351 # This code is distributed in the hope that it will be useful, but WITHOUT
4352 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4353 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4354 # version 2 for more details (a copy is included in the LICENSE file that
4355 # accompanied this code).
4356 #
4357 # You should have received a copy of the GNU General Public License version
4358 # 2 along with this work; if not, write to the Free Software Foundation,
4359 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4360 #
4361 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4362 # or visit www.oracle.com if you need additional information or have any
4363 # questions.
4364 #
4365 
4366 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4367 # Converts autoconf style CPU name to OpenJDK style, into
4368 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4369 
4370 
4371 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4372 # Converts autoconf style OS name to OpenJDK style, into
4373 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4374 
4375 
4376 # Expects $host_os $host_cpu $build_os and $build_cpu
4377 # and $with_target_bits to have been setup!
4378 #
4379 # Translate the standard triplet(quadruplet) definition
4380 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4381 # OPENJDK_BUILD_OS, etc.
4382 
4383 
4384 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4385 # accordingly. Must be done after setting up build and target system, but before
4386 # doing anything else with these values.
4387 
4388 
4389 # Setup the legacy variables, for controlling the old makefiles.
4390 #
4391 
4392 
4393 
4394 
4395 #%%% Build and target systems %%%
4396 
4397 
4398 
4399 
4400 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4401 # Add -mX to various FLAGS variables.
4402 
4403 
4404 
4405 
4406 
4407 
4408 #
4409 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4410 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4411 #
4412 # This code is free software; you can redistribute it and/or modify it
4413 # under the terms of the GNU General Public License version 2 only, as
4414 # published by the Free Software Foundation.  Oracle designates this
4415 # particular file as subject to the "Classpath" exception as provided
4416 # by Oracle in the LICENSE file that accompanied this code.
4417 #
4418 # This code is distributed in the hope that it will be useful, but WITHOUT
4419 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4420 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4421 # version 2 for more details (a copy is included in the LICENSE file that
4422 # accompanied this code).
4423 #
4424 # You should have received a copy of the GNU General Public License version
4425 # 2 along with this work; if not, write to the Free Software Foundation,
4426 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4427 #
4428 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4429 # or visit www.oracle.com if you need additional information or have any
4430 # questions.
4431 #
4432 
4433 
4434 
4435 
4436 
4437 
4438 
4439 #
4440 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4441 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4442 #
4443 # This code is free software; you can redistribute it and/or modify it
4444 # under the terms of the GNU General Public License version 2 only, as
4445 # published by the Free Software Foundation.  Oracle designates this
4446 # particular file as subject to the "Classpath" exception as provided
4447 # by Oracle in the LICENSE file that accompanied this code.
4448 #
4449 # This code is distributed in the hope that it will be useful, but WITHOUT
4450 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4451 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4452 # version 2 for more details (a copy is included in the LICENSE file that
4453 # accompanied this code).
4454 #
4455 # You should have received a copy of the GNU General Public License version
4456 # 2 along with this work; if not, write to the Free Software Foundation,
4457 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4458 #
4459 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4460 # or visit www.oracle.com if you need additional information or have any
4461 # questions.
4462 #
4463 
4464 ########################################################################
4465 # This file is responsible for detecting, verifying and setting up the
4466 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4467 # proper paths to the binaries, but it will not setup any flags.
4468 #
4469 # The binaries used is determined by the toolchain type, which is the family of
4470 # compilers and related tools that are used.
4471 ########################################################################
4472 
4473 
4474 # All valid toolchains, regardless of platform (used by help.m4)
4475 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4476 
4477 # These toolchains are valid on different platforms
4478 VALID_TOOLCHAINS_linux="gcc clang"
4479 VALID_TOOLCHAINS_solaris="solstudio"
4480 VALID_TOOLCHAINS_macosx="gcc clang"
4481 VALID_TOOLCHAINS_aix="xlc"
4482 VALID_TOOLCHAINS_windows="microsoft"
4483 
4484 # Toolchain descriptions
4485 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4486 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4487 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4488 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4489 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4490 
4491 # Setup a number of variables describing how native output files are
4492 # named on this platform/toolchain.
4493 
4494 
4495 # Determine which toolchain type to use, and make sure it is valid for this
4496 # platform. Setup various information about the selected toolchain.
4497 
4498 
4499 # Before we start detecting the toolchain executables, we might need some
4500 # special setup, e.g. additional paths etc.
4501 
4502 
4503 # Restore path, etc
4504 
4505 
4506 # Check if a compiler is of the toolchain type we expect, and save the version
4507 # information from it. If the compiler does not match the expected type,
4508 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4509 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4510 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4511 #
4512 # $1 = compiler to test (CC or CXX)
4513 # $2 = human readable name of compiler (C or C++)
4514 
4515 
4516 # Try to locate the given C or C++ compiler in the path, or otherwise.
4517 #
4518 # $1 = compiler to test (CC or CXX)
4519 # $2 = human readable name of compiler (C or C++)
4520 # $3 = list of compiler names to search for
4521 
4522 
4523 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4524 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4525 # archiver (AR). Verify that the compilers are correct according to the
4526 # toolchain type.
4527 
4528 
4529 # Setup additional tools that is considered a part of the toolchain, but not the
4530 # core part. Many of these are highly platform-specific and do not exist,
4531 # and/or are not needed on all platforms.
4532 
4533 
4534 # Setup the build tools (i.e, the compiler and linker used to build programs
4535 # that should be run on the build platform, not the target platform, as a build
4536 # helper). Since the non-cross-compile case uses the normal, target compilers
4537 # for this, we can only do this after these have been setup.
4538 
4539 
4540 # Setup legacy variables that are still needed as alternative ways to refer to
4541 # parts of the toolchain.
4542 
4543 
4544 # Do some additional checks on the detected tools.
4545 
4546 
4547 # Setup the JTReg Regression Test Harness.
4548 
4549 
4550 #
4551 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4552 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4553 #
4554 # This code is free software; you can redistribute it and/or modify it
4555 # under the terms of the GNU General Public License version 2 only, as
4556 # published by the Free Software Foundation.  Oracle designates this
4557 # particular file as subject to the "Classpath" exception as provided
4558 # by Oracle in the LICENSE file that accompanied this code.
4559 #
4560 # This code is distributed in the hope that it will be useful, but WITHOUT
4561 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4562 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4563 # version 2 for more details (a copy is included in the LICENSE file that
4564 # accompanied this code).
4565 #
4566 # You should have received a copy of the GNU General Public License version
4567 # 2 along with this work; if not, write to the Free Software Foundation,
4568 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4569 #
4570 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4571 # or visit www.oracle.com if you need additional information or have any
4572 # questions.
4573 #
4574 
4575 ################################################################################
4576 # The order of these defines the priority by which we try to find them.
4577 VALID_VS_VERSIONS="2013 2012 2010"
4578 
4579 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4580 VS_VERSION_INTERNAL_2010=100
4581 VS_MSVCR_2010=msvcr100.dll
4582 # We don't use msvcp on Visual Studio 2010
4583 #VS_MSVCP_2010=msvcp100.dll
4584 VS_ENVVAR_2010="VS100COMNTOOLS"
4585 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4586 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4587 VS_VS_PLATFORM_NAME_2010="v100"
4588 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4589 
4590 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4591 VS_VERSION_INTERNAL_2012=110
4592 VS_MSVCR_2012=msvcr110.dll
4593 VS_MSVCP_2012=msvcp110.dll
4594 VS_ENVVAR_2012="VS110COMNTOOLS"
4595 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4596 VS_SDK_INSTALLDIR_2012=
4597 VS_VS_PLATFORM_NAME_2012="v110"
4598 VS_SDK_PLATFORM_NAME_2012=
4599 
4600 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4601 VS_VERSION_INTERNAL_2013=120
4602 VS_MSVCR_2013=msvcr120.dll
4603 VS_MSVCP_2013=msvcp120.dll
4604 VS_ENVVAR_2013="VS120COMNTOOLS"
4605 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4606 VS_SDK_INSTALLDIR_2013=
4607 VS_VS_PLATFORM_NAME_2013="v120"
4608 VS_SDK_PLATFORM_NAME_2013=
4609 
4610 ################################################################################
4611 
4612 
4613 
4614 ################################################################################
4615 
4616 
4617 
4618 ################################################################################
4619 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4620 # build environment and assigns it to VS_ENV_CMD
4621 
4622 
4623 ################################################################################
4624 
4625 
4626 
4627 ################################################################################
4628 # Check if the VS env variables were setup prior to running configure.
4629 # If not, then find vcvarsall.bat and run it automatically, and integrate
4630 # the set env variables into the spec file.
4631 
4632 
4633 
4634 
4635 
4636 
4637 
4638 
4639 
4640 
4641 
4642 
4643 
4644 
4645 # This line needs to be here, verbatim, after all includes and the dummy hook
4646 # definitions. It is replaced with custom functionality when building
4647 # custom sources.
4648 #CUSTOM_AUTOCONF_INCLUDE
4649 
4650 # Do not change or remove the following line, it is needed for consistency checks:
4651 DATE_WHEN_GENERATED=1448889620
4652 
4653 ###############################################################################
4654 #
4655 # Initialization / Boot-strapping
4656 #
4657 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4658 # thus it jumps back and forth, each time gaining something needed later on.
4659 #
4660 ###############################################################################
4661 
4662 # If we are requested to print additional help, do that and then exit.
4663 # This must be the very first call.
4664 
4665   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4666     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4667     $PRINTF "Which are valid to use depends on the build platform.\n"
4668     for toolchain in $VALID_TOOLCHAINS_all; do
4669       # Use indirect variable referencing
4670       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4671       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4672       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4673     done
4674 
4675     # And now exit directly
4676     exit 0
4677   fi
4678 
4679 
4680 # Basic initialization that must happen first of all in the normal process.
4681 
4682   # Save the original command line. This is passed to us by the wrapper configure script.
4683 
4684   # Save the path variable before it gets changed
4685   ORIGINAL_PATH="$PATH"
4686 
4687   DATE_WHEN_CONFIGURED=`LANG=C date`
4688 
4689   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4690 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4691   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4692 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4693 
4694 
4695   # Start with tools that do not need have cross compilation support
4696   # and can be expected to be found in the default PATH. These tools are
4697   # used by configure.
4698 
4699   # First are all the simple required tools.
4700 
4701 
4702 
4703   # Publish this variable in the help.
4704 
4705 
4706   if [ -z "${BASENAME+x}" ]; then
4707     # The variable is not set by user, try to locate tool using the code snippet
4708     for ac_prog in basename
4709 do
4710   # Extract the first word of "$ac_prog", so it can be a program name with args.
4711 set dummy $ac_prog; ac_word=$2
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4713 $as_echo_n "checking for $ac_word... " >&6; }
4714 if ${ac_cv_path_BASENAME+:} false; then :
4715   $as_echo_n "(cached) " >&6
4716 else
4717   case $BASENAME in
4718   [\\/]* | ?:[\\/]*)
4719   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4720   ;;
4721   *)
4722   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4723 for as_dir in $PATH
4724 do
4725   IFS=$as_save_IFS
4726   test -z "$as_dir" && as_dir=.
4727     for ac_exec_ext in '' $ac_executable_extensions; do
4728   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4729     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4730     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4731     break 2
4732   fi
4733 done
4734   done
4735 IFS=$as_save_IFS
4736 
4737   ;;
4738 esac
4739 fi
4740 BASENAME=$ac_cv_path_BASENAME
4741 if test -n "$BASENAME"; then
4742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4743 $as_echo "$BASENAME" >&6; }
4744 else
4745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4746 $as_echo "no" >&6; }
4747 fi
4748 
4749 
4750   test -n "$BASENAME" && break
4751 done
4752 
4753   else
4754     # The variable is set, but is it from the command line or the environment?
4755 
4756     # Try to remove the string !BASENAME! from our list.
4757     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4758     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4759       # If it failed, the variable was not from the command line. Ignore it,
4760       # but warn the user (except for BASH, which is always set by the calling BASH).
4761       if test "xBASENAME" != xBASH; then
4762         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4763 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4764       fi
4765       # Try to locate tool using the code snippet
4766       for ac_prog in basename
4767 do
4768   # Extract the first word of "$ac_prog", so it can be a program name with args.
4769 set dummy $ac_prog; ac_word=$2
4770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4771 $as_echo_n "checking for $ac_word... " >&6; }
4772 if ${ac_cv_path_BASENAME+:} false; then :
4773   $as_echo_n "(cached) " >&6
4774 else
4775   case $BASENAME in
4776   [\\/]* | ?:[\\/]*)
4777   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4778   ;;
4779   *)
4780   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4781 for as_dir in $PATH
4782 do
4783   IFS=$as_save_IFS
4784   test -z "$as_dir" && as_dir=.
4785     for ac_exec_ext in '' $ac_executable_extensions; do
4786   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4787     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4788     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4789     break 2
4790   fi
4791 done
4792   done
4793 IFS=$as_save_IFS
4794 
4795   ;;
4796 esac
4797 fi
4798 BASENAME=$ac_cv_path_BASENAME
4799 if test -n "$BASENAME"; then
4800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4801 $as_echo "$BASENAME" >&6; }
4802 else
4803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4804 $as_echo "no" >&6; }
4805 fi
4806 
4807 
4808   test -n "$BASENAME" && break
4809 done
4810 
4811     else
4812       # If it succeeded, then it was overridden by the user. We will use it
4813       # for the tool.
4814 
4815       # First remove it from the list of overridden variables, so we can test
4816       # for unknown variables in the end.
4817       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4818 
4819       # Check if we try to supply an empty value
4820       if test "x$BASENAME" = x; then
4821         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4822 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4823         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4824 $as_echo_n "checking for BASENAME... " >&6; }
4825         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4826 $as_echo "disabled" >&6; }
4827       else
4828         # Check if the provided tool contains a complete path.
4829         tool_specified="$BASENAME"
4830         tool_basename="${tool_specified##*/}"
4831         if test "x$tool_basename" = "x$tool_specified"; then
4832           # A command without a complete path is provided, search $PATH.
4833           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4834 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4835           # Extract the first word of "$tool_basename", so it can be a program name with args.
4836 set dummy $tool_basename; ac_word=$2
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4838 $as_echo_n "checking for $ac_word... " >&6; }
4839 if ${ac_cv_path_BASENAME+:} false; then :
4840   $as_echo_n "(cached) " >&6
4841 else
4842   case $BASENAME in
4843   [\\/]* | ?:[\\/]*)
4844   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4845   ;;
4846   *)
4847   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4848 for as_dir in $PATH
4849 do
4850   IFS=$as_save_IFS
4851   test -z "$as_dir" && as_dir=.
4852     for ac_exec_ext in '' $ac_executable_extensions; do
4853   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4854     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4855     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4856     break 2
4857   fi
4858 done
4859   done
4860 IFS=$as_save_IFS
4861 
4862   ;;
4863 esac
4864 fi
4865 BASENAME=$ac_cv_path_BASENAME
4866 if test -n "$BASENAME"; then
4867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4868 $as_echo "$BASENAME" >&6; }
4869 else
4870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4871 $as_echo "no" >&6; }
4872 fi
4873 
4874 
4875           if test "x$BASENAME" = x; then
4876             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4877           fi
4878         else
4879           # Otherwise we believe it is a complete path. Use it as it is.
4880           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4881 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4882           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4883 $as_echo_n "checking for BASENAME... " >&6; }
4884           if test ! -x "$tool_specified"; then
4885             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4886 $as_echo "not found" >&6; }
4887             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4888           fi
4889           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4890 $as_echo "$tool_specified" >&6; }
4891         fi
4892       fi
4893     fi
4894 
4895   fi
4896 
4897 
4898 
4899   if test "x$BASENAME" = x; then
4900     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4901   fi
4902 
4903 
4904 
4905 
4906 
4907   # Publish this variable in the help.
4908 
4909 
4910   if [ -z "${BASH+x}" ]; then
4911     # The variable is not set by user, try to locate tool using the code snippet
4912     for ac_prog in bash
4913 do
4914   # Extract the first word of "$ac_prog", so it can be a program name with args.
4915 set dummy $ac_prog; ac_word=$2
4916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4917 $as_echo_n "checking for $ac_word... " >&6; }
4918 if ${ac_cv_path_BASH+:} false; then :
4919   $as_echo_n "(cached) " >&6
4920 else
4921   case $BASH in
4922   [\\/]* | ?:[\\/]*)
4923   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4924   ;;
4925   *)
4926   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4927 for as_dir in $PATH
4928 do
4929   IFS=$as_save_IFS
4930   test -z "$as_dir" && as_dir=.
4931     for ac_exec_ext in '' $ac_executable_extensions; do
4932   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4933     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4934     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4935     break 2
4936   fi
4937 done
4938   done
4939 IFS=$as_save_IFS
4940 
4941   ;;
4942 esac
4943 fi
4944 BASH=$ac_cv_path_BASH
4945 if test -n "$BASH"; then
4946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4947 $as_echo "$BASH" >&6; }
4948 else
4949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4950 $as_echo "no" >&6; }
4951 fi
4952 
4953 
4954   test -n "$BASH" && break
4955 done
4956 
4957   else
4958     # The variable is set, but is it from the command line or the environment?
4959 
4960     # Try to remove the string !BASH! from our list.
4961     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4962     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4963       # If it failed, the variable was not from the command line. Ignore it,
4964       # but warn the user (except for BASH, which is always set by the calling BASH).
4965       if test "xBASH" != xBASH; then
4966         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4967 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4968       fi
4969       # Try to locate tool using the code snippet
4970       for ac_prog in bash
4971 do
4972   # Extract the first word of "$ac_prog", so it can be a program name with args.
4973 set dummy $ac_prog; ac_word=$2
4974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4975 $as_echo_n "checking for $ac_word... " >&6; }
4976 if ${ac_cv_path_BASH+:} false; then :
4977   $as_echo_n "(cached) " >&6
4978 else
4979   case $BASH in
4980   [\\/]* | ?:[\\/]*)
4981   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4982   ;;
4983   *)
4984   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4985 for as_dir in $PATH
4986 do
4987   IFS=$as_save_IFS
4988   test -z "$as_dir" && as_dir=.
4989     for ac_exec_ext in '' $ac_executable_extensions; do
4990   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4991     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4992     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4993     break 2
4994   fi
4995 done
4996   done
4997 IFS=$as_save_IFS
4998 
4999   ;;
5000 esac
5001 fi
5002 BASH=$ac_cv_path_BASH
5003 if test -n "$BASH"; then
5004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5005 $as_echo "$BASH" >&6; }
5006 else
5007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5008 $as_echo "no" >&6; }
5009 fi
5010 
5011 
5012   test -n "$BASH" && break
5013 done
5014 
5015     else
5016       # If it succeeded, then it was overridden by the user. We will use it
5017       # for the tool.
5018 
5019       # First remove it from the list of overridden variables, so we can test
5020       # for unknown variables in the end.
5021       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5022 
5023       # Check if we try to supply an empty value
5024       if test "x$BASH" = x; then
5025         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5026 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5027         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5028 $as_echo_n "checking for BASH... " >&6; }
5029         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5030 $as_echo "disabled" >&6; }
5031       else
5032         # Check if the provided tool contains a complete path.
5033         tool_specified="$BASH"
5034         tool_basename="${tool_specified##*/}"
5035         if test "x$tool_basename" = "x$tool_specified"; then
5036           # A command without a complete path is provided, search $PATH.
5037           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5038 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5039           # Extract the first word of "$tool_basename", so it can be a program name with args.
5040 set dummy $tool_basename; ac_word=$2
5041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5042 $as_echo_n "checking for $ac_word... " >&6; }
5043 if ${ac_cv_path_BASH+:} false; then :
5044   $as_echo_n "(cached) " >&6
5045 else
5046   case $BASH in
5047   [\\/]* | ?:[\\/]*)
5048   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5049   ;;
5050   *)
5051   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5052 for as_dir in $PATH
5053 do
5054   IFS=$as_save_IFS
5055   test -z "$as_dir" && as_dir=.
5056     for ac_exec_ext in '' $ac_executable_extensions; do
5057   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5058     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5059     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5060     break 2
5061   fi
5062 done
5063   done
5064 IFS=$as_save_IFS
5065 
5066   ;;
5067 esac
5068 fi
5069 BASH=$ac_cv_path_BASH
5070 if test -n "$BASH"; then
5071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5072 $as_echo "$BASH" >&6; }
5073 else
5074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5075 $as_echo "no" >&6; }
5076 fi
5077 
5078 
5079           if test "x$BASH" = x; then
5080             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5081           fi
5082         else
5083           # Otherwise we believe it is a complete path. Use it as it is.
5084           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5085 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5086           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5087 $as_echo_n "checking for BASH... " >&6; }
5088           if test ! -x "$tool_specified"; then
5089             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5090 $as_echo "not found" >&6; }
5091             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5092           fi
5093           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5094 $as_echo "$tool_specified" >&6; }
5095         fi
5096       fi
5097     fi
5098 
5099   fi
5100 
5101 
5102 
5103   if test "x$BASH" = x; then
5104     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5105   fi
5106 
5107 
5108 
5109 
5110 
5111   # Publish this variable in the help.
5112 
5113 
5114   if [ -z "${CAT+x}" ]; then
5115     # The variable is not set by user, try to locate tool using the code snippet
5116     for ac_prog in cat
5117 do
5118   # Extract the first word of "$ac_prog", so it can be a program name with args.
5119 set dummy $ac_prog; ac_word=$2
5120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5121 $as_echo_n "checking for $ac_word... " >&6; }
5122 if ${ac_cv_path_CAT+:} false; then :
5123   $as_echo_n "(cached) " >&6
5124 else
5125   case $CAT in
5126   [\\/]* | ?:[\\/]*)
5127   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5128   ;;
5129   *)
5130   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5131 for as_dir in $PATH
5132 do
5133   IFS=$as_save_IFS
5134   test -z "$as_dir" && as_dir=.
5135     for ac_exec_ext in '' $ac_executable_extensions; do
5136   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5137     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5138     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5139     break 2
5140   fi
5141 done
5142   done
5143 IFS=$as_save_IFS
5144 
5145   ;;
5146 esac
5147 fi
5148 CAT=$ac_cv_path_CAT
5149 if test -n "$CAT"; then
5150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5151 $as_echo "$CAT" >&6; }
5152 else
5153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5154 $as_echo "no" >&6; }
5155 fi
5156 
5157 
5158   test -n "$CAT" && break
5159 done
5160 
5161   else
5162     # The variable is set, but is it from the command line or the environment?
5163 
5164     # Try to remove the string !CAT! from our list.
5165     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5166     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5167       # If it failed, the variable was not from the command line. Ignore it,
5168       # but warn the user (except for BASH, which is always set by the calling BASH).
5169       if test "xCAT" != xBASH; then
5170         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5171 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5172       fi
5173       # Try to locate tool using the code snippet
5174       for ac_prog in cat
5175 do
5176   # Extract the first word of "$ac_prog", so it can be a program name with args.
5177 set dummy $ac_prog; ac_word=$2
5178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5179 $as_echo_n "checking for $ac_word... " >&6; }
5180 if ${ac_cv_path_CAT+:} false; then :
5181   $as_echo_n "(cached) " >&6
5182 else
5183   case $CAT in
5184   [\\/]* | ?:[\\/]*)
5185   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5186   ;;
5187   *)
5188   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5189 for as_dir in $PATH
5190 do
5191   IFS=$as_save_IFS
5192   test -z "$as_dir" && as_dir=.
5193     for ac_exec_ext in '' $ac_executable_extensions; do
5194   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5195     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5196     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5197     break 2
5198   fi
5199 done
5200   done
5201 IFS=$as_save_IFS
5202 
5203   ;;
5204 esac
5205 fi
5206 CAT=$ac_cv_path_CAT
5207 if test -n "$CAT"; then
5208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5209 $as_echo "$CAT" >&6; }
5210 else
5211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5212 $as_echo "no" >&6; }
5213 fi
5214 
5215 
5216   test -n "$CAT" && break
5217 done
5218 
5219     else
5220       # If it succeeded, then it was overridden by the user. We will use it
5221       # for the tool.
5222 
5223       # First remove it from the list of overridden variables, so we can test
5224       # for unknown variables in the end.
5225       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5226 
5227       # Check if we try to supply an empty value
5228       if test "x$CAT" = x; then
5229         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5230 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5231         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5232 $as_echo_n "checking for CAT... " >&6; }
5233         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5234 $as_echo "disabled" >&6; }
5235       else
5236         # Check if the provided tool contains a complete path.
5237         tool_specified="$CAT"
5238         tool_basename="${tool_specified##*/}"
5239         if test "x$tool_basename" = "x$tool_specified"; then
5240           # A command without a complete path is provided, search $PATH.
5241           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5242 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5243           # Extract the first word of "$tool_basename", so it can be a program name with args.
5244 set dummy $tool_basename; ac_word=$2
5245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5246 $as_echo_n "checking for $ac_word... " >&6; }
5247 if ${ac_cv_path_CAT+:} false; then :
5248   $as_echo_n "(cached) " >&6
5249 else
5250   case $CAT in
5251   [\\/]* | ?:[\\/]*)
5252   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5253   ;;
5254   *)
5255   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5256 for as_dir in $PATH
5257 do
5258   IFS=$as_save_IFS
5259   test -z "$as_dir" && as_dir=.
5260     for ac_exec_ext in '' $ac_executable_extensions; do
5261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5262     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5264     break 2
5265   fi
5266 done
5267   done
5268 IFS=$as_save_IFS
5269 
5270   ;;
5271 esac
5272 fi
5273 CAT=$ac_cv_path_CAT
5274 if test -n "$CAT"; then
5275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5276 $as_echo "$CAT" >&6; }
5277 else
5278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5279 $as_echo "no" >&6; }
5280 fi
5281 
5282 
5283           if test "x$CAT" = x; then
5284             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5285           fi
5286         else
5287           # Otherwise we believe it is a complete path. Use it as it is.
5288           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5289 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5290           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5291 $as_echo_n "checking for CAT... " >&6; }
5292           if test ! -x "$tool_specified"; then
5293             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5294 $as_echo "not found" >&6; }
5295             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5296           fi
5297           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5298 $as_echo "$tool_specified" >&6; }
5299         fi
5300       fi
5301     fi
5302 
5303   fi
5304 
5305 
5306 
5307   if test "x$CAT" = x; then
5308     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5309   fi
5310 
5311 
5312 
5313 
5314 
5315   # Publish this variable in the help.
5316 
5317 
5318   if [ -z "${CHMOD+x}" ]; then
5319     # The variable is not set by user, try to locate tool using the code snippet
5320     for ac_prog in chmod
5321 do
5322   # Extract the first word of "$ac_prog", so it can be a program name with args.
5323 set dummy $ac_prog; ac_word=$2
5324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5325 $as_echo_n "checking for $ac_word... " >&6; }
5326 if ${ac_cv_path_CHMOD+:} false; then :
5327   $as_echo_n "(cached) " >&6
5328 else
5329   case $CHMOD in
5330   [\\/]* | ?:[\\/]*)
5331   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5332   ;;
5333   *)
5334   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5335 for as_dir in $PATH
5336 do
5337   IFS=$as_save_IFS
5338   test -z "$as_dir" && as_dir=.
5339     for ac_exec_ext in '' $ac_executable_extensions; do
5340   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5341     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5342     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5343     break 2
5344   fi
5345 done
5346   done
5347 IFS=$as_save_IFS
5348 
5349   ;;
5350 esac
5351 fi
5352 CHMOD=$ac_cv_path_CHMOD
5353 if test -n "$CHMOD"; then
5354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5355 $as_echo "$CHMOD" >&6; }
5356 else
5357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5358 $as_echo "no" >&6; }
5359 fi
5360 
5361 
5362   test -n "$CHMOD" && break
5363 done
5364 
5365   else
5366     # The variable is set, but is it from the command line or the environment?
5367 
5368     # Try to remove the string !CHMOD! from our list.
5369     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5370     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5371       # If it failed, the variable was not from the command line. Ignore it,
5372       # but warn the user (except for BASH, which is always set by the calling BASH).
5373       if test "xCHMOD" != xBASH; then
5374         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5375 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5376       fi
5377       # Try to locate tool using the code snippet
5378       for ac_prog in chmod
5379 do
5380   # Extract the first word of "$ac_prog", so it can be a program name with args.
5381 set dummy $ac_prog; ac_word=$2
5382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5383 $as_echo_n "checking for $ac_word... " >&6; }
5384 if ${ac_cv_path_CHMOD+:} false; then :
5385   $as_echo_n "(cached) " >&6
5386 else
5387   case $CHMOD in
5388   [\\/]* | ?:[\\/]*)
5389   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5390   ;;
5391   *)
5392   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5393 for as_dir in $PATH
5394 do
5395   IFS=$as_save_IFS
5396   test -z "$as_dir" && as_dir=.
5397     for ac_exec_ext in '' $ac_executable_extensions; do
5398   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5399     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5401     break 2
5402   fi
5403 done
5404   done
5405 IFS=$as_save_IFS
5406 
5407   ;;
5408 esac
5409 fi
5410 CHMOD=$ac_cv_path_CHMOD
5411 if test -n "$CHMOD"; then
5412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5413 $as_echo "$CHMOD" >&6; }
5414 else
5415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5416 $as_echo "no" >&6; }
5417 fi
5418 
5419 
5420   test -n "$CHMOD" && break
5421 done
5422 
5423     else
5424       # If it succeeded, then it was overridden by the user. We will use it
5425       # for the tool.
5426 
5427       # First remove it from the list of overridden variables, so we can test
5428       # for unknown variables in the end.
5429       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5430 
5431       # Check if we try to supply an empty value
5432       if test "x$CHMOD" = x; then
5433         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5434 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5435         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5436 $as_echo_n "checking for CHMOD... " >&6; }
5437         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5438 $as_echo "disabled" >&6; }
5439       else
5440         # Check if the provided tool contains a complete path.
5441         tool_specified="$CHMOD"
5442         tool_basename="${tool_specified##*/}"
5443         if test "x$tool_basename" = "x$tool_specified"; then
5444           # A command without a complete path is provided, search $PATH.
5445           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5446 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5447           # Extract the first word of "$tool_basename", so it can be a program name with args.
5448 set dummy $tool_basename; ac_word=$2
5449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5450 $as_echo_n "checking for $ac_word... " >&6; }
5451 if ${ac_cv_path_CHMOD+:} false; then :
5452   $as_echo_n "(cached) " >&6
5453 else
5454   case $CHMOD in
5455   [\\/]* | ?:[\\/]*)
5456   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5457   ;;
5458   *)
5459   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5460 for as_dir in $PATH
5461 do
5462   IFS=$as_save_IFS
5463   test -z "$as_dir" && as_dir=.
5464     for ac_exec_ext in '' $ac_executable_extensions; do
5465   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5466     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5468     break 2
5469   fi
5470 done
5471   done
5472 IFS=$as_save_IFS
5473 
5474   ;;
5475 esac
5476 fi
5477 CHMOD=$ac_cv_path_CHMOD
5478 if test -n "$CHMOD"; then
5479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5480 $as_echo "$CHMOD" >&6; }
5481 else
5482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5483 $as_echo "no" >&6; }
5484 fi
5485 
5486 
5487           if test "x$CHMOD" = x; then
5488             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5489           fi
5490         else
5491           # Otherwise we believe it is a complete path. Use it as it is.
5492           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5493 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5494           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5495 $as_echo_n "checking for CHMOD... " >&6; }
5496           if test ! -x "$tool_specified"; then
5497             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5498 $as_echo "not found" >&6; }
5499             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5500           fi
5501           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5502 $as_echo "$tool_specified" >&6; }
5503         fi
5504       fi
5505     fi
5506 
5507   fi
5508 
5509 
5510 
5511   if test "x$CHMOD" = x; then
5512     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5513   fi
5514 
5515 
5516 
5517 
5518 
5519   # Publish this variable in the help.
5520 
5521 
5522   if [ -z "${CMP+x}" ]; then
5523     # The variable is not set by user, try to locate tool using the code snippet
5524     for ac_prog in cmp
5525 do
5526   # Extract the first word of "$ac_prog", so it can be a program name with args.
5527 set dummy $ac_prog; ac_word=$2
5528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5529 $as_echo_n "checking for $ac_word... " >&6; }
5530 if ${ac_cv_path_CMP+:} false; then :
5531   $as_echo_n "(cached) " >&6
5532 else
5533   case $CMP in
5534   [\\/]* | ?:[\\/]*)
5535   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5536   ;;
5537   *)
5538   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5539 for as_dir in $PATH
5540 do
5541   IFS=$as_save_IFS
5542   test -z "$as_dir" && as_dir=.
5543     for ac_exec_ext in '' $ac_executable_extensions; do
5544   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5545     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5546     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5547     break 2
5548   fi
5549 done
5550   done
5551 IFS=$as_save_IFS
5552 
5553   ;;
5554 esac
5555 fi
5556 CMP=$ac_cv_path_CMP
5557 if test -n "$CMP"; then
5558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5559 $as_echo "$CMP" >&6; }
5560 else
5561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5562 $as_echo "no" >&6; }
5563 fi
5564 
5565 
5566   test -n "$CMP" && break
5567 done
5568 
5569   else
5570     # The variable is set, but is it from the command line or the environment?
5571 
5572     # Try to remove the string !CMP! from our list.
5573     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5574     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5575       # If it failed, the variable was not from the command line. Ignore it,
5576       # but warn the user (except for BASH, which is always set by the calling BASH).
5577       if test "xCMP" != xBASH; then
5578         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5579 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5580       fi
5581       # Try to locate tool using the code snippet
5582       for ac_prog in cmp
5583 do
5584   # Extract the first word of "$ac_prog", so it can be a program name with args.
5585 set dummy $ac_prog; ac_word=$2
5586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5587 $as_echo_n "checking for $ac_word... " >&6; }
5588 if ${ac_cv_path_CMP+:} false; then :
5589   $as_echo_n "(cached) " >&6
5590 else
5591   case $CMP in
5592   [\\/]* | ?:[\\/]*)
5593   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5594   ;;
5595   *)
5596   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5597 for as_dir in $PATH
5598 do
5599   IFS=$as_save_IFS
5600   test -z "$as_dir" && as_dir=.
5601     for ac_exec_ext in '' $ac_executable_extensions; do
5602   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5603     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5604     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5605     break 2
5606   fi
5607 done
5608   done
5609 IFS=$as_save_IFS
5610 
5611   ;;
5612 esac
5613 fi
5614 CMP=$ac_cv_path_CMP
5615 if test -n "$CMP"; then
5616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5617 $as_echo "$CMP" >&6; }
5618 else
5619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5620 $as_echo "no" >&6; }
5621 fi
5622 
5623 
5624   test -n "$CMP" && break
5625 done
5626 
5627     else
5628       # If it succeeded, then it was overridden by the user. We will use it
5629       # for the tool.
5630 
5631       # First remove it from the list of overridden variables, so we can test
5632       # for unknown variables in the end.
5633       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5634 
5635       # Check if we try to supply an empty value
5636       if test "x$CMP" = x; then
5637         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5638 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5639         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5640 $as_echo_n "checking for CMP... " >&6; }
5641         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5642 $as_echo "disabled" >&6; }
5643       else
5644         # Check if the provided tool contains a complete path.
5645         tool_specified="$CMP"
5646         tool_basename="${tool_specified##*/}"
5647         if test "x$tool_basename" = "x$tool_specified"; then
5648           # A command without a complete path is provided, search $PATH.
5649           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5650 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5651           # Extract the first word of "$tool_basename", so it can be a program name with args.
5652 set dummy $tool_basename; ac_word=$2
5653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5654 $as_echo_n "checking for $ac_word... " >&6; }
5655 if ${ac_cv_path_CMP+:} false; then :
5656   $as_echo_n "(cached) " >&6
5657 else
5658   case $CMP in
5659   [\\/]* | ?:[\\/]*)
5660   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5661   ;;
5662   *)
5663   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5664 for as_dir in $PATH
5665 do
5666   IFS=$as_save_IFS
5667   test -z "$as_dir" && as_dir=.
5668     for ac_exec_ext in '' $ac_executable_extensions; do
5669   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5670     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5671     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5672     break 2
5673   fi
5674 done
5675   done
5676 IFS=$as_save_IFS
5677 
5678   ;;
5679 esac
5680 fi
5681 CMP=$ac_cv_path_CMP
5682 if test -n "$CMP"; then
5683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5684 $as_echo "$CMP" >&6; }
5685 else
5686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5687 $as_echo "no" >&6; }
5688 fi
5689 
5690 
5691           if test "x$CMP" = x; then
5692             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5693           fi
5694         else
5695           # Otherwise we believe it is a complete path. Use it as it is.
5696           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5697 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5698           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5699 $as_echo_n "checking for CMP... " >&6; }
5700           if test ! -x "$tool_specified"; then
5701             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5702 $as_echo "not found" >&6; }
5703             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5704           fi
5705           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5706 $as_echo "$tool_specified" >&6; }
5707         fi
5708       fi
5709     fi
5710 
5711   fi
5712 
5713 
5714 
5715   if test "x$CMP" = x; then
5716     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5717   fi
5718 
5719 
5720 
5721 
5722 
5723   # Publish this variable in the help.
5724 
5725 
5726   if [ -z "${COMM+x}" ]; then
5727     # The variable is not set by user, try to locate tool using the code snippet
5728     for ac_prog in comm
5729 do
5730   # Extract the first word of "$ac_prog", so it can be a program name with args.
5731 set dummy $ac_prog; ac_word=$2
5732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5733 $as_echo_n "checking for $ac_word... " >&6; }
5734 if ${ac_cv_path_COMM+:} false; then :
5735   $as_echo_n "(cached) " >&6
5736 else
5737   case $COMM in
5738   [\\/]* | ?:[\\/]*)
5739   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5740   ;;
5741   *)
5742   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5743 for as_dir in $PATH
5744 do
5745   IFS=$as_save_IFS
5746   test -z "$as_dir" && as_dir=.
5747     for ac_exec_ext in '' $ac_executable_extensions; do
5748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5749     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5751     break 2
5752   fi
5753 done
5754   done
5755 IFS=$as_save_IFS
5756 
5757   ;;
5758 esac
5759 fi
5760 COMM=$ac_cv_path_COMM
5761 if test -n "$COMM"; then
5762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5763 $as_echo "$COMM" >&6; }
5764 else
5765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5766 $as_echo "no" >&6; }
5767 fi
5768 
5769 
5770   test -n "$COMM" && break
5771 done
5772 
5773   else
5774     # The variable is set, but is it from the command line or the environment?
5775 
5776     # Try to remove the string !COMM! from our list.
5777     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5778     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5779       # If it failed, the variable was not from the command line. Ignore it,
5780       # but warn the user (except for BASH, which is always set by the calling BASH).
5781       if test "xCOMM" != xBASH; then
5782         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5783 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5784       fi
5785       # Try to locate tool using the code snippet
5786       for ac_prog in comm
5787 do
5788   # Extract the first word of "$ac_prog", so it can be a program name with args.
5789 set dummy $ac_prog; ac_word=$2
5790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5791 $as_echo_n "checking for $ac_word... " >&6; }
5792 if ${ac_cv_path_COMM+:} false; then :
5793   $as_echo_n "(cached) " >&6
5794 else
5795   case $COMM in
5796   [\\/]* | ?:[\\/]*)
5797   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5798   ;;
5799   *)
5800   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5801 for as_dir in $PATH
5802 do
5803   IFS=$as_save_IFS
5804   test -z "$as_dir" && as_dir=.
5805     for ac_exec_ext in '' $ac_executable_extensions; do
5806   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5807     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5808     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5809     break 2
5810   fi
5811 done
5812   done
5813 IFS=$as_save_IFS
5814 
5815   ;;
5816 esac
5817 fi
5818 COMM=$ac_cv_path_COMM
5819 if test -n "$COMM"; then
5820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5821 $as_echo "$COMM" >&6; }
5822 else
5823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5824 $as_echo "no" >&6; }
5825 fi
5826 
5827 
5828   test -n "$COMM" && break
5829 done
5830 
5831     else
5832       # If it succeeded, then it was overridden by the user. We will use it
5833       # for the tool.
5834 
5835       # First remove it from the list of overridden variables, so we can test
5836       # for unknown variables in the end.
5837       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5838 
5839       # Check if we try to supply an empty value
5840       if test "x$COMM" = x; then
5841         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5842 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5843         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5844 $as_echo_n "checking for COMM... " >&6; }
5845         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5846 $as_echo "disabled" >&6; }
5847       else
5848         # Check if the provided tool contains a complete path.
5849         tool_specified="$COMM"
5850         tool_basename="${tool_specified##*/}"
5851         if test "x$tool_basename" = "x$tool_specified"; then
5852           # A command without a complete path is provided, search $PATH.
5853           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5854 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5855           # Extract the first word of "$tool_basename", so it can be a program name with args.
5856 set dummy $tool_basename; ac_word=$2
5857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5858 $as_echo_n "checking for $ac_word... " >&6; }
5859 if ${ac_cv_path_COMM+:} false; then :
5860   $as_echo_n "(cached) " >&6
5861 else
5862   case $COMM in
5863   [\\/]* | ?:[\\/]*)
5864   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5865   ;;
5866   *)
5867   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5868 for as_dir in $PATH
5869 do
5870   IFS=$as_save_IFS
5871   test -z "$as_dir" && as_dir=.
5872     for ac_exec_ext in '' $ac_executable_extensions; do
5873   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5874     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5875     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5876     break 2
5877   fi
5878 done
5879   done
5880 IFS=$as_save_IFS
5881 
5882   ;;
5883 esac
5884 fi
5885 COMM=$ac_cv_path_COMM
5886 if test -n "$COMM"; then
5887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5888 $as_echo "$COMM" >&6; }
5889 else
5890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5891 $as_echo "no" >&6; }
5892 fi
5893 
5894 
5895           if test "x$COMM" = x; then
5896             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5897           fi
5898         else
5899           # Otherwise we believe it is a complete path. Use it as it is.
5900           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5901 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5902           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5903 $as_echo_n "checking for COMM... " >&6; }
5904           if test ! -x "$tool_specified"; then
5905             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5906 $as_echo "not found" >&6; }
5907             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5908           fi
5909           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5910 $as_echo "$tool_specified" >&6; }
5911         fi
5912       fi
5913     fi
5914 
5915   fi
5916 
5917 
5918 
5919   if test "x$COMM" = x; then
5920     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5921   fi
5922 
5923 
5924 
5925 
5926 
5927   # Publish this variable in the help.
5928 
5929 
5930   if [ -z "${CP+x}" ]; then
5931     # The variable is not set by user, try to locate tool using the code snippet
5932     for ac_prog in cp
5933 do
5934   # Extract the first word of "$ac_prog", so it can be a program name with args.
5935 set dummy $ac_prog; ac_word=$2
5936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5937 $as_echo_n "checking for $ac_word... " >&6; }
5938 if ${ac_cv_path_CP+:} false; then :
5939   $as_echo_n "(cached) " >&6
5940 else
5941   case $CP in
5942   [\\/]* | ?:[\\/]*)
5943   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5944   ;;
5945   *)
5946   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5947 for as_dir in $PATH
5948 do
5949   IFS=$as_save_IFS
5950   test -z "$as_dir" && as_dir=.
5951     for ac_exec_ext in '' $ac_executable_extensions; do
5952   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5953     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5954     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5955     break 2
5956   fi
5957 done
5958   done
5959 IFS=$as_save_IFS
5960 
5961   ;;
5962 esac
5963 fi
5964 CP=$ac_cv_path_CP
5965 if test -n "$CP"; then
5966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5967 $as_echo "$CP" >&6; }
5968 else
5969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5970 $as_echo "no" >&6; }
5971 fi
5972 
5973 
5974   test -n "$CP" && break
5975 done
5976 
5977   else
5978     # The variable is set, but is it from the command line or the environment?
5979 
5980     # Try to remove the string !CP! from our list.
5981     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5982     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5983       # If it failed, the variable was not from the command line. Ignore it,
5984       # but warn the user (except for BASH, which is always set by the calling BASH).
5985       if test "xCP" != xBASH; then
5986         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5987 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5988       fi
5989       # Try to locate tool using the code snippet
5990       for ac_prog in cp
5991 do
5992   # Extract the first word of "$ac_prog", so it can be a program name with args.
5993 set dummy $ac_prog; ac_word=$2
5994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5995 $as_echo_n "checking for $ac_word... " >&6; }
5996 if ${ac_cv_path_CP+:} false; then :
5997   $as_echo_n "(cached) " >&6
5998 else
5999   case $CP in
6000   [\\/]* | ?:[\\/]*)
6001   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6002   ;;
6003   *)
6004   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005 for as_dir in $PATH
6006 do
6007   IFS=$as_save_IFS
6008   test -z "$as_dir" && as_dir=.
6009     for ac_exec_ext in '' $ac_executable_extensions; do
6010   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6011     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6012     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6013     break 2
6014   fi
6015 done
6016   done
6017 IFS=$as_save_IFS
6018 
6019   ;;
6020 esac
6021 fi
6022 CP=$ac_cv_path_CP
6023 if test -n "$CP"; then
6024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6025 $as_echo "$CP" >&6; }
6026 else
6027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6028 $as_echo "no" >&6; }
6029 fi
6030 
6031 
6032   test -n "$CP" && break
6033 done
6034 
6035     else
6036       # If it succeeded, then it was overridden by the user. We will use it
6037       # for the tool.
6038 
6039       # First remove it from the list of overridden variables, so we can test
6040       # for unknown variables in the end.
6041       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6042 
6043       # Check if we try to supply an empty value
6044       if test "x$CP" = x; then
6045         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6046 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6047         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6048 $as_echo_n "checking for CP... " >&6; }
6049         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6050 $as_echo "disabled" >&6; }
6051       else
6052         # Check if the provided tool contains a complete path.
6053         tool_specified="$CP"
6054         tool_basename="${tool_specified##*/}"
6055         if test "x$tool_basename" = "x$tool_specified"; then
6056           # A command without a complete path is provided, search $PATH.
6057           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6058 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6059           # Extract the first word of "$tool_basename", so it can be a program name with args.
6060 set dummy $tool_basename; ac_word=$2
6061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6062 $as_echo_n "checking for $ac_word... " >&6; }
6063 if ${ac_cv_path_CP+:} false; then :
6064   $as_echo_n "(cached) " >&6
6065 else
6066   case $CP in
6067   [\\/]* | ?:[\\/]*)
6068   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6069   ;;
6070   *)
6071   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6072 for as_dir in $PATH
6073 do
6074   IFS=$as_save_IFS
6075   test -z "$as_dir" && as_dir=.
6076     for ac_exec_ext in '' $ac_executable_extensions; do
6077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6078     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6080     break 2
6081   fi
6082 done
6083   done
6084 IFS=$as_save_IFS
6085 
6086   ;;
6087 esac
6088 fi
6089 CP=$ac_cv_path_CP
6090 if test -n "$CP"; then
6091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6092 $as_echo "$CP" >&6; }
6093 else
6094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6095 $as_echo "no" >&6; }
6096 fi
6097 
6098 
6099           if test "x$CP" = x; then
6100             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6101           fi
6102         else
6103           # Otherwise we believe it is a complete path. Use it as it is.
6104           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6105 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6106           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6107 $as_echo_n "checking for CP... " >&6; }
6108           if test ! -x "$tool_specified"; then
6109             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6110 $as_echo "not found" >&6; }
6111             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6112           fi
6113           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6114 $as_echo "$tool_specified" >&6; }
6115         fi
6116       fi
6117     fi
6118 
6119   fi
6120 
6121 
6122 
6123   if test "x$CP" = x; then
6124     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6125   fi
6126 
6127 
6128 
6129 
6130 
6131   # Publish this variable in the help.
6132 
6133 
6134   if [ -z "${CUT+x}" ]; then
6135     # The variable is not set by user, try to locate tool using the code snippet
6136     for ac_prog in cut
6137 do
6138   # Extract the first word of "$ac_prog", so it can be a program name with args.
6139 set dummy $ac_prog; ac_word=$2
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6141 $as_echo_n "checking for $ac_word... " >&6; }
6142 if ${ac_cv_path_CUT+:} false; then :
6143   $as_echo_n "(cached) " >&6
6144 else
6145   case $CUT in
6146   [\\/]* | ?:[\\/]*)
6147   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6148   ;;
6149   *)
6150   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6151 for as_dir in $PATH
6152 do
6153   IFS=$as_save_IFS
6154   test -z "$as_dir" && as_dir=.
6155     for ac_exec_ext in '' $ac_executable_extensions; do
6156   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6157     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6158     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6159     break 2
6160   fi
6161 done
6162   done
6163 IFS=$as_save_IFS
6164 
6165   ;;
6166 esac
6167 fi
6168 CUT=$ac_cv_path_CUT
6169 if test -n "$CUT"; then
6170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6171 $as_echo "$CUT" >&6; }
6172 else
6173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6174 $as_echo "no" >&6; }
6175 fi
6176 
6177 
6178   test -n "$CUT" && break
6179 done
6180 
6181   else
6182     # The variable is set, but is it from the command line or the environment?
6183 
6184     # Try to remove the string !CUT! from our list.
6185     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6186     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6187       # If it failed, the variable was not from the command line. Ignore it,
6188       # but warn the user (except for BASH, which is always set by the calling BASH).
6189       if test "xCUT" != xBASH; then
6190         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6191 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6192       fi
6193       # Try to locate tool using the code snippet
6194       for ac_prog in cut
6195 do
6196   # Extract the first word of "$ac_prog", so it can be a program name with args.
6197 set dummy $ac_prog; ac_word=$2
6198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6199 $as_echo_n "checking for $ac_word... " >&6; }
6200 if ${ac_cv_path_CUT+:} false; then :
6201   $as_echo_n "(cached) " >&6
6202 else
6203   case $CUT in
6204   [\\/]* | ?:[\\/]*)
6205   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6206   ;;
6207   *)
6208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6209 for as_dir in $PATH
6210 do
6211   IFS=$as_save_IFS
6212   test -z "$as_dir" && as_dir=.
6213     for ac_exec_ext in '' $ac_executable_extensions; do
6214   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6215     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6216     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6217     break 2
6218   fi
6219 done
6220   done
6221 IFS=$as_save_IFS
6222 
6223   ;;
6224 esac
6225 fi
6226 CUT=$ac_cv_path_CUT
6227 if test -n "$CUT"; then
6228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6229 $as_echo "$CUT" >&6; }
6230 else
6231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6232 $as_echo "no" >&6; }
6233 fi
6234 
6235 
6236   test -n "$CUT" && break
6237 done
6238 
6239     else
6240       # If it succeeded, then it was overridden by the user. We will use it
6241       # for the tool.
6242 
6243       # First remove it from the list of overridden variables, so we can test
6244       # for unknown variables in the end.
6245       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6246 
6247       # Check if we try to supply an empty value
6248       if test "x$CUT" = x; then
6249         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6250 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6251         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6252 $as_echo_n "checking for CUT... " >&6; }
6253         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6254 $as_echo "disabled" >&6; }
6255       else
6256         # Check if the provided tool contains a complete path.
6257         tool_specified="$CUT"
6258         tool_basename="${tool_specified##*/}"
6259         if test "x$tool_basename" = "x$tool_specified"; then
6260           # A command without a complete path is provided, search $PATH.
6261           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6262 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6263           # Extract the first word of "$tool_basename", so it can be a program name with args.
6264 set dummy $tool_basename; ac_word=$2
6265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6266 $as_echo_n "checking for $ac_word... " >&6; }
6267 if ${ac_cv_path_CUT+:} false; then :
6268   $as_echo_n "(cached) " >&6
6269 else
6270   case $CUT in
6271   [\\/]* | ?:[\\/]*)
6272   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6273   ;;
6274   *)
6275   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6276 for as_dir in $PATH
6277 do
6278   IFS=$as_save_IFS
6279   test -z "$as_dir" && as_dir=.
6280     for ac_exec_ext in '' $ac_executable_extensions; do
6281   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6282     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6283     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6284     break 2
6285   fi
6286 done
6287   done
6288 IFS=$as_save_IFS
6289 
6290   ;;
6291 esac
6292 fi
6293 CUT=$ac_cv_path_CUT
6294 if test -n "$CUT"; then
6295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6296 $as_echo "$CUT" >&6; }
6297 else
6298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6299 $as_echo "no" >&6; }
6300 fi
6301 
6302 
6303           if test "x$CUT" = x; then
6304             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6305           fi
6306         else
6307           # Otherwise we believe it is a complete path. Use it as it is.
6308           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6309 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6310           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6311 $as_echo_n "checking for CUT... " >&6; }
6312           if test ! -x "$tool_specified"; then
6313             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6314 $as_echo "not found" >&6; }
6315             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6316           fi
6317           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6318 $as_echo "$tool_specified" >&6; }
6319         fi
6320       fi
6321     fi
6322 
6323   fi
6324 
6325 
6326 
6327   if test "x$CUT" = x; then
6328     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6329   fi
6330 
6331 
6332 
6333 
6334 
6335   # Publish this variable in the help.
6336 
6337 
6338   if [ -z "${DATE+x}" ]; then
6339     # The variable is not set by user, try to locate tool using the code snippet
6340     for ac_prog in date
6341 do
6342   # Extract the first word of "$ac_prog", so it can be a program name with args.
6343 set dummy $ac_prog; ac_word=$2
6344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6345 $as_echo_n "checking for $ac_word... " >&6; }
6346 if ${ac_cv_path_DATE+:} false; then :
6347   $as_echo_n "(cached) " >&6
6348 else
6349   case $DATE in
6350   [\\/]* | ?:[\\/]*)
6351   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6352   ;;
6353   *)
6354   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6355 for as_dir in $PATH
6356 do
6357   IFS=$as_save_IFS
6358   test -z "$as_dir" && as_dir=.
6359     for ac_exec_ext in '' $ac_executable_extensions; do
6360   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6361     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6363     break 2
6364   fi
6365 done
6366   done
6367 IFS=$as_save_IFS
6368 
6369   ;;
6370 esac
6371 fi
6372 DATE=$ac_cv_path_DATE
6373 if test -n "$DATE"; then
6374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6375 $as_echo "$DATE" >&6; }
6376 else
6377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6378 $as_echo "no" >&6; }
6379 fi
6380 
6381 
6382   test -n "$DATE" && break
6383 done
6384 
6385   else
6386     # The variable is set, but is it from the command line or the environment?
6387 
6388     # Try to remove the string !DATE! from our list.
6389     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6390     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6391       # If it failed, the variable was not from the command line. Ignore it,
6392       # but warn the user (except for BASH, which is always set by the calling BASH).
6393       if test "xDATE" != xBASH; then
6394         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6395 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6396       fi
6397       # Try to locate tool using the code snippet
6398       for ac_prog in date
6399 do
6400   # Extract the first word of "$ac_prog", so it can be a program name with args.
6401 set dummy $ac_prog; ac_word=$2
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6403 $as_echo_n "checking for $ac_word... " >&6; }
6404 if ${ac_cv_path_DATE+:} false; then :
6405   $as_echo_n "(cached) " >&6
6406 else
6407   case $DATE in
6408   [\\/]* | ?:[\\/]*)
6409   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6410   ;;
6411   *)
6412   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6413 for as_dir in $PATH
6414 do
6415   IFS=$as_save_IFS
6416   test -z "$as_dir" && as_dir=.
6417     for ac_exec_ext in '' $ac_executable_extensions; do
6418   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6419     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6420     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6421     break 2
6422   fi
6423 done
6424   done
6425 IFS=$as_save_IFS
6426 
6427   ;;
6428 esac
6429 fi
6430 DATE=$ac_cv_path_DATE
6431 if test -n "$DATE"; then
6432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6433 $as_echo "$DATE" >&6; }
6434 else
6435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6436 $as_echo "no" >&6; }
6437 fi
6438 
6439 
6440   test -n "$DATE" && break
6441 done
6442 
6443     else
6444       # If it succeeded, then it was overridden by the user. We will use it
6445       # for the tool.
6446 
6447       # First remove it from the list of overridden variables, so we can test
6448       # for unknown variables in the end.
6449       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6450 
6451       # Check if we try to supply an empty value
6452       if test "x$DATE" = x; then
6453         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6454 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6455         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6456 $as_echo_n "checking for DATE... " >&6; }
6457         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6458 $as_echo "disabled" >&6; }
6459       else
6460         # Check if the provided tool contains a complete path.
6461         tool_specified="$DATE"
6462         tool_basename="${tool_specified##*/}"
6463         if test "x$tool_basename" = "x$tool_specified"; then
6464           # A command without a complete path is provided, search $PATH.
6465           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6466 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6467           # Extract the first word of "$tool_basename", so it can be a program name with args.
6468 set dummy $tool_basename; ac_word=$2
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6470 $as_echo_n "checking for $ac_word... " >&6; }
6471 if ${ac_cv_path_DATE+:} false; then :
6472   $as_echo_n "(cached) " >&6
6473 else
6474   case $DATE in
6475   [\\/]* | ?:[\\/]*)
6476   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6477   ;;
6478   *)
6479   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6480 for as_dir in $PATH
6481 do
6482   IFS=$as_save_IFS
6483   test -z "$as_dir" && as_dir=.
6484     for ac_exec_ext in '' $ac_executable_extensions; do
6485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6486     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6487     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6488     break 2
6489   fi
6490 done
6491   done
6492 IFS=$as_save_IFS
6493 
6494   ;;
6495 esac
6496 fi
6497 DATE=$ac_cv_path_DATE
6498 if test -n "$DATE"; then
6499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6500 $as_echo "$DATE" >&6; }
6501 else
6502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6503 $as_echo "no" >&6; }
6504 fi
6505 
6506 
6507           if test "x$DATE" = x; then
6508             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6509           fi
6510         else
6511           # Otherwise we believe it is a complete path. Use it as it is.
6512           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6513 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6514           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6515 $as_echo_n "checking for DATE... " >&6; }
6516           if test ! -x "$tool_specified"; then
6517             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6518 $as_echo "not found" >&6; }
6519             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6520           fi
6521           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6522 $as_echo "$tool_specified" >&6; }
6523         fi
6524       fi
6525     fi
6526 
6527   fi
6528 
6529 
6530 
6531   if test "x$DATE" = x; then
6532     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6533   fi
6534 
6535 
6536 
6537 
6538 
6539   # Publish this variable in the help.
6540 
6541 
6542   if [ -z "${DIFF+x}" ]; then
6543     # The variable is not set by user, try to locate tool using the code snippet
6544     for ac_prog in gdiff diff
6545 do
6546   # Extract the first word of "$ac_prog", so it can be a program name with args.
6547 set dummy $ac_prog; ac_word=$2
6548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6549 $as_echo_n "checking for $ac_word... " >&6; }
6550 if ${ac_cv_path_DIFF+:} false; then :
6551   $as_echo_n "(cached) " >&6
6552 else
6553   case $DIFF in
6554   [\\/]* | ?:[\\/]*)
6555   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6556   ;;
6557   *)
6558   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6559 for as_dir in $PATH
6560 do
6561   IFS=$as_save_IFS
6562   test -z "$as_dir" && as_dir=.
6563     for ac_exec_ext in '' $ac_executable_extensions; do
6564   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6565     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6566     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6567     break 2
6568   fi
6569 done
6570   done
6571 IFS=$as_save_IFS
6572 
6573   ;;
6574 esac
6575 fi
6576 DIFF=$ac_cv_path_DIFF
6577 if test -n "$DIFF"; then
6578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6579 $as_echo "$DIFF" >&6; }
6580 else
6581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6582 $as_echo "no" >&6; }
6583 fi
6584 
6585 
6586   test -n "$DIFF" && break
6587 done
6588 
6589   else
6590     # The variable is set, but is it from the command line or the environment?
6591 
6592     # Try to remove the string !DIFF! from our list.
6593     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6594     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6595       # If it failed, the variable was not from the command line. Ignore it,
6596       # but warn the user (except for BASH, which is always set by the calling BASH).
6597       if test "xDIFF" != xBASH; then
6598         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6599 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6600       fi
6601       # Try to locate tool using the code snippet
6602       for ac_prog in gdiff diff
6603 do
6604   # Extract the first word of "$ac_prog", so it can be a program name with args.
6605 set dummy $ac_prog; ac_word=$2
6606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6607 $as_echo_n "checking for $ac_word... " >&6; }
6608 if ${ac_cv_path_DIFF+:} false; then :
6609   $as_echo_n "(cached) " >&6
6610 else
6611   case $DIFF in
6612   [\\/]* | ?:[\\/]*)
6613   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6614   ;;
6615   *)
6616   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6617 for as_dir in $PATH
6618 do
6619   IFS=$as_save_IFS
6620   test -z "$as_dir" && as_dir=.
6621     for ac_exec_ext in '' $ac_executable_extensions; do
6622   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6623     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6624     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6625     break 2
6626   fi
6627 done
6628   done
6629 IFS=$as_save_IFS
6630 
6631   ;;
6632 esac
6633 fi
6634 DIFF=$ac_cv_path_DIFF
6635 if test -n "$DIFF"; then
6636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6637 $as_echo "$DIFF" >&6; }
6638 else
6639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6640 $as_echo "no" >&6; }
6641 fi
6642 
6643 
6644   test -n "$DIFF" && break
6645 done
6646 
6647     else
6648       # If it succeeded, then it was overridden by the user. We will use it
6649       # for the tool.
6650 
6651       # First remove it from the list of overridden variables, so we can test
6652       # for unknown variables in the end.
6653       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6654 
6655       # Check if we try to supply an empty value
6656       if test "x$DIFF" = x; then
6657         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6658 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6659         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6660 $as_echo_n "checking for DIFF... " >&6; }
6661         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6662 $as_echo "disabled" >&6; }
6663       else
6664         # Check if the provided tool contains a complete path.
6665         tool_specified="$DIFF"
6666         tool_basename="${tool_specified##*/}"
6667         if test "x$tool_basename" = "x$tool_specified"; then
6668           # A command without a complete path is provided, search $PATH.
6669           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6670 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6671           # Extract the first word of "$tool_basename", so it can be a program name with args.
6672 set dummy $tool_basename; ac_word=$2
6673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6674 $as_echo_n "checking for $ac_word... " >&6; }
6675 if ${ac_cv_path_DIFF+:} false; then :
6676   $as_echo_n "(cached) " >&6
6677 else
6678   case $DIFF in
6679   [\\/]* | ?:[\\/]*)
6680   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6681   ;;
6682   *)
6683   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6684 for as_dir in $PATH
6685 do
6686   IFS=$as_save_IFS
6687   test -z "$as_dir" && as_dir=.
6688     for ac_exec_ext in '' $ac_executable_extensions; do
6689   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6690     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6691     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6692     break 2
6693   fi
6694 done
6695   done
6696 IFS=$as_save_IFS
6697 
6698   ;;
6699 esac
6700 fi
6701 DIFF=$ac_cv_path_DIFF
6702 if test -n "$DIFF"; then
6703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6704 $as_echo "$DIFF" >&6; }
6705 else
6706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6707 $as_echo "no" >&6; }
6708 fi
6709 
6710 
6711           if test "x$DIFF" = x; then
6712             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6713           fi
6714         else
6715           # Otherwise we believe it is a complete path. Use it as it is.
6716           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6717 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6718           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6719 $as_echo_n "checking for DIFF... " >&6; }
6720           if test ! -x "$tool_specified"; then
6721             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6722 $as_echo "not found" >&6; }
6723             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6724           fi
6725           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6726 $as_echo "$tool_specified" >&6; }
6727         fi
6728       fi
6729     fi
6730 
6731   fi
6732 
6733 
6734 
6735   if test "x$DIFF" = x; then
6736     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6737   fi
6738 
6739 
6740 
6741 
6742 
6743   # Publish this variable in the help.
6744 
6745 
6746   if [ -z "${DIRNAME+x}" ]; then
6747     # The variable is not set by user, try to locate tool using the code snippet
6748     for ac_prog in dirname
6749 do
6750   # Extract the first word of "$ac_prog", so it can be a program name with args.
6751 set dummy $ac_prog; ac_word=$2
6752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6753 $as_echo_n "checking for $ac_word... " >&6; }
6754 if ${ac_cv_path_DIRNAME+:} false; then :
6755   $as_echo_n "(cached) " >&6
6756 else
6757   case $DIRNAME in
6758   [\\/]* | ?:[\\/]*)
6759   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6760   ;;
6761   *)
6762   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6763 for as_dir in $PATH
6764 do
6765   IFS=$as_save_IFS
6766   test -z "$as_dir" && as_dir=.
6767     for ac_exec_ext in '' $ac_executable_extensions; do
6768   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6769     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6771     break 2
6772   fi
6773 done
6774   done
6775 IFS=$as_save_IFS
6776 
6777   ;;
6778 esac
6779 fi
6780 DIRNAME=$ac_cv_path_DIRNAME
6781 if test -n "$DIRNAME"; then
6782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6783 $as_echo "$DIRNAME" >&6; }
6784 else
6785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6786 $as_echo "no" >&6; }
6787 fi
6788 
6789 
6790   test -n "$DIRNAME" && break
6791 done
6792 
6793   else
6794     # The variable is set, but is it from the command line or the environment?
6795 
6796     # Try to remove the string !DIRNAME! from our list.
6797     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6798     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6799       # If it failed, the variable was not from the command line. Ignore it,
6800       # but warn the user (except for BASH, which is always set by the calling BASH).
6801       if test "xDIRNAME" != xBASH; then
6802         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6803 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6804       fi
6805       # Try to locate tool using the code snippet
6806       for ac_prog in dirname
6807 do
6808   # Extract the first word of "$ac_prog", so it can be a program name with args.
6809 set dummy $ac_prog; ac_word=$2
6810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6811 $as_echo_n "checking for $ac_word... " >&6; }
6812 if ${ac_cv_path_DIRNAME+:} false; then :
6813   $as_echo_n "(cached) " >&6
6814 else
6815   case $DIRNAME in
6816   [\\/]* | ?:[\\/]*)
6817   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6818   ;;
6819   *)
6820   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6821 for as_dir in $PATH
6822 do
6823   IFS=$as_save_IFS
6824   test -z "$as_dir" && as_dir=.
6825     for ac_exec_ext in '' $ac_executable_extensions; do
6826   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6827     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6828     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6829     break 2
6830   fi
6831 done
6832   done
6833 IFS=$as_save_IFS
6834 
6835   ;;
6836 esac
6837 fi
6838 DIRNAME=$ac_cv_path_DIRNAME
6839 if test -n "$DIRNAME"; then
6840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6841 $as_echo "$DIRNAME" >&6; }
6842 else
6843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6844 $as_echo "no" >&6; }
6845 fi
6846 
6847 
6848   test -n "$DIRNAME" && break
6849 done
6850 
6851     else
6852       # If it succeeded, then it was overridden by the user. We will use it
6853       # for the tool.
6854 
6855       # First remove it from the list of overridden variables, so we can test
6856       # for unknown variables in the end.
6857       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6858 
6859       # Check if we try to supply an empty value
6860       if test "x$DIRNAME" = x; then
6861         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6862 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6863         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6864 $as_echo_n "checking for DIRNAME... " >&6; }
6865         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6866 $as_echo "disabled" >&6; }
6867       else
6868         # Check if the provided tool contains a complete path.
6869         tool_specified="$DIRNAME"
6870         tool_basename="${tool_specified##*/}"
6871         if test "x$tool_basename" = "x$tool_specified"; then
6872           # A command without a complete path is provided, search $PATH.
6873           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6874 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6875           # Extract the first word of "$tool_basename", so it can be a program name with args.
6876 set dummy $tool_basename; ac_word=$2
6877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6878 $as_echo_n "checking for $ac_word... " >&6; }
6879 if ${ac_cv_path_DIRNAME+:} false; then :
6880   $as_echo_n "(cached) " >&6
6881 else
6882   case $DIRNAME in
6883   [\\/]* | ?:[\\/]*)
6884   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6885   ;;
6886   *)
6887   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6888 for as_dir in $PATH
6889 do
6890   IFS=$as_save_IFS
6891   test -z "$as_dir" && as_dir=.
6892     for ac_exec_ext in '' $ac_executable_extensions; do
6893   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6894     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6895     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6896     break 2
6897   fi
6898 done
6899   done
6900 IFS=$as_save_IFS
6901 
6902   ;;
6903 esac
6904 fi
6905 DIRNAME=$ac_cv_path_DIRNAME
6906 if test -n "$DIRNAME"; then
6907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6908 $as_echo "$DIRNAME" >&6; }
6909 else
6910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6911 $as_echo "no" >&6; }
6912 fi
6913 
6914 
6915           if test "x$DIRNAME" = x; then
6916             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6917           fi
6918         else
6919           # Otherwise we believe it is a complete path. Use it as it is.
6920           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6921 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6922           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6923 $as_echo_n "checking for DIRNAME... " >&6; }
6924           if test ! -x "$tool_specified"; then
6925             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6926 $as_echo "not found" >&6; }
6927             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6928           fi
6929           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6930 $as_echo "$tool_specified" >&6; }
6931         fi
6932       fi
6933     fi
6934 
6935   fi
6936 
6937 
6938 
6939   if test "x$DIRNAME" = x; then
6940     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6941   fi
6942 
6943 
6944 
6945 
6946 
6947   # Publish this variable in the help.
6948 
6949 
6950   if [ -z "${ECHO+x}" ]; then
6951     # The variable is not set by user, try to locate tool using the code snippet
6952     for ac_prog in echo
6953 do
6954   # Extract the first word of "$ac_prog", so it can be a program name with args.
6955 set dummy $ac_prog; ac_word=$2
6956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6957 $as_echo_n "checking for $ac_word... " >&6; }
6958 if ${ac_cv_path_ECHO+:} false; then :
6959   $as_echo_n "(cached) " >&6
6960 else
6961   case $ECHO in
6962   [\\/]* | ?:[\\/]*)
6963   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6964   ;;
6965   *)
6966   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6967 for as_dir in $PATH
6968 do
6969   IFS=$as_save_IFS
6970   test -z "$as_dir" && as_dir=.
6971     for ac_exec_ext in '' $ac_executable_extensions; do
6972   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6973     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6974     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6975     break 2
6976   fi
6977 done
6978   done
6979 IFS=$as_save_IFS
6980 
6981   ;;
6982 esac
6983 fi
6984 ECHO=$ac_cv_path_ECHO
6985 if test -n "$ECHO"; then
6986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6987 $as_echo "$ECHO" >&6; }
6988 else
6989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6990 $as_echo "no" >&6; }
6991 fi
6992 
6993 
6994   test -n "$ECHO" && break
6995 done
6996 
6997   else
6998     # The variable is set, but is it from the command line or the environment?
6999 
7000     # Try to remove the string !ECHO! from our list.
7001     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7002     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7003       # If it failed, the variable was not from the command line. Ignore it,
7004       # but warn the user (except for BASH, which is always set by the calling BASH).
7005       if test "xECHO" != xBASH; then
7006         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7007 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7008       fi
7009       # Try to locate tool using the code snippet
7010       for ac_prog in echo
7011 do
7012   # Extract the first word of "$ac_prog", so it can be a program name with args.
7013 set dummy $ac_prog; ac_word=$2
7014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7015 $as_echo_n "checking for $ac_word... " >&6; }
7016 if ${ac_cv_path_ECHO+:} false; then :
7017   $as_echo_n "(cached) " >&6
7018 else
7019   case $ECHO in
7020   [\\/]* | ?:[\\/]*)
7021   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7022   ;;
7023   *)
7024   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7025 for as_dir in $PATH
7026 do
7027   IFS=$as_save_IFS
7028   test -z "$as_dir" && as_dir=.
7029     for ac_exec_ext in '' $ac_executable_extensions; do
7030   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7031     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7032     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7033     break 2
7034   fi
7035 done
7036   done
7037 IFS=$as_save_IFS
7038 
7039   ;;
7040 esac
7041 fi
7042 ECHO=$ac_cv_path_ECHO
7043 if test -n "$ECHO"; then
7044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7045 $as_echo "$ECHO" >&6; }
7046 else
7047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7048 $as_echo "no" >&6; }
7049 fi
7050 
7051 
7052   test -n "$ECHO" && break
7053 done
7054 
7055     else
7056       # If it succeeded, then it was overridden by the user. We will use it
7057       # for the tool.
7058 
7059       # First remove it from the list of overridden variables, so we can test
7060       # for unknown variables in the end.
7061       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7062 
7063       # Check if we try to supply an empty value
7064       if test "x$ECHO" = x; then
7065         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7066 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7067         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7068 $as_echo_n "checking for ECHO... " >&6; }
7069         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7070 $as_echo "disabled" >&6; }
7071       else
7072         # Check if the provided tool contains a complete path.
7073         tool_specified="$ECHO"
7074         tool_basename="${tool_specified##*/}"
7075         if test "x$tool_basename" = "x$tool_specified"; then
7076           # A command without a complete path is provided, search $PATH.
7077           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7078 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7079           # Extract the first word of "$tool_basename", so it can be a program name with args.
7080 set dummy $tool_basename; ac_word=$2
7081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7082 $as_echo_n "checking for $ac_word... " >&6; }
7083 if ${ac_cv_path_ECHO+:} false; then :
7084   $as_echo_n "(cached) " >&6
7085 else
7086   case $ECHO in
7087   [\\/]* | ?:[\\/]*)
7088   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7089   ;;
7090   *)
7091   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7092 for as_dir in $PATH
7093 do
7094   IFS=$as_save_IFS
7095   test -z "$as_dir" && as_dir=.
7096     for ac_exec_ext in '' $ac_executable_extensions; do
7097   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7098     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7099     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7100     break 2
7101   fi
7102 done
7103   done
7104 IFS=$as_save_IFS
7105 
7106   ;;
7107 esac
7108 fi
7109 ECHO=$ac_cv_path_ECHO
7110 if test -n "$ECHO"; then
7111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7112 $as_echo "$ECHO" >&6; }
7113 else
7114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7115 $as_echo "no" >&6; }
7116 fi
7117 
7118 
7119           if test "x$ECHO" = x; then
7120             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7121           fi
7122         else
7123           # Otherwise we believe it is a complete path. Use it as it is.
7124           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7125 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7126           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7127 $as_echo_n "checking for ECHO... " >&6; }
7128           if test ! -x "$tool_specified"; then
7129             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7130 $as_echo "not found" >&6; }
7131             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7132           fi
7133           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7134 $as_echo "$tool_specified" >&6; }
7135         fi
7136       fi
7137     fi
7138 
7139   fi
7140 
7141 
7142 
7143   if test "x$ECHO" = x; then
7144     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7145   fi
7146 
7147 
7148 
7149 
7150 
7151   # Publish this variable in the help.
7152 
7153 
7154   if [ -z "${EXPR+x}" ]; then
7155     # The variable is not set by user, try to locate tool using the code snippet
7156     for ac_prog in expr
7157 do
7158   # Extract the first word of "$ac_prog", so it can be a program name with args.
7159 set dummy $ac_prog; ac_word=$2
7160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7161 $as_echo_n "checking for $ac_word... " >&6; }
7162 if ${ac_cv_path_EXPR+:} false; then :
7163   $as_echo_n "(cached) " >&6
7164 else
7165   case $EXPR in
7166   [\\/]* | ?:[\\/]*)
7167   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7168   ;;
7169   *)
7170   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7171 for as_dir in $PATH
7172 do
7173   IFS=$as_save_IFS
7174   test -z "$as_dir" && as_dir=.
7175     for ac_exec_ext in '' $ac_executable_extensions; do
7176   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7177     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7179     break 2
7180   fi
7181 done
7182   done
7183 IFS=$as_save_IFS
7184 
7185   ;;
7186 esac
7187 fi
7188 EXPR=$ac_cv_path_EXPR
7189 if test -n "$EXPR"; then
7190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7191 $as_echo "$EXPR" >&6; }
7192 else
7193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7194 $as_echo "no" >&6; }
7195 fi
7196 
7197 
7198   test -n "$EXPR" && break
7199 done
7200 
7201   else
7202     # The variable is set, but is it from the command line or the environment?
7203 
7204     # Try to remove the string !EXPR! from our list.
7205     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7206     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7207       # If it failed, the variable was not from the command line. Ignore it,
7208       # but warn the user (except for BASH, which is always set by the calling BASH).
7209       if test "xEXPR" != xBASH; then
7210         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7211 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7212       fi
7213       # Try to locate tool using the code snippet
7214       for ac_prog in expr
7215 do
7216   # Extract the first word of "$ac_prog", so it can be a program name with args.
7217 set dummy $ac_prog; ac_word=$2
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7219 $as_echo_n "checking for $ac_word... " >&6; }
7220 if ${ac_cv_path_EXPR+:} false; then :
7221   $as_echo_n "(cached) " >&6
7222 else
7223   case $EXPR in
7224   [\\/]* | ?:[\\/]*)
7225   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7226   ;;
7227   *)
7228   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7229 for as_dir in $PATH
7230 do
7231   IFS=$as_save_IFS
7232   test -z "$as_dir" && as_dir=.
7233     for ac_exec_ext in '' $ac_executable_extensions; do
7234   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7235     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7236     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7237     break 2
7238   fi
7239 done
7240   done
7241 IFS=$as_save_IFS
7242 
7243   ;;
7244 esac
7245 fi
7246 EXPR=$ac_cv_path_EXPR
7247 if test -n "$EXPR"; then
7248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7249 $as_echo "$EXPR" >&6; }
7250 else
7251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7252 $as_echo "no" >&6; }
7253 fi
7254 
7255 
7256   test -n "$EXPR" && break
7257 done
7258 
7259     else
7260       # If it succeeded, then it was overridden by the user. We will use it
7261       # for the tool.
7262 
7263       # First remove it from the list of overridden variables, so we can test
7264       # for unknown variables in the end.
7265       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7266 
7267       # Check if we try to supply an empty value
7268       if test "x$EXPR" = x; then
7269         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7270 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7271         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7272 $as_echo_n "checking for EXPR... " >&6; }
7273         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7274 $as_echo "disabled" >&6; }
7275       else
7276         # Check if the provided tool contains a complete path.
7277         tool_specified="$EXPR"
7278         tool_basename="${tool_specified##*/}"
7279         if test "x$tool_basename" = "x$tool_specified"; then
7280           # A command without a complete path is provided, search $PATH.
7281           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7282 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7283           # Extract the first word of "$tool_basename", so it can be a program name with args.
7284 set dummy $tool_basename; ac_word=$2
7285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7286 $as_echo_n "checking for $ac_word... " >&6; }
7287 if ${ac_cv_path_EXPR+:} false; then :
7288   $as_echo_n "(cached) " >&6
7289 else
7290   case $EXPR in
7291   [\\/]* | ?:[\\/]*)
7292   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7293   ;;
7294   *)
7295   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7296 for as_dir in $PATH
7297 do
7298   IFS=$as_save_IFS
7299   test -z "$as_dir" && as_dir=.
7300     for ac_exec_ext in '' $ac_executable_extensions; do
7301   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7302     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7303     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7304     break 2
7305   fi
7306 done
7307   done
7308 IFS=$as_save_IFS
7309 
7310   ;;
7311 esac
7312 fi
7313 EXPR=$ac_cv_path_EXPR
7314 if test -n "$EXPR"; then
7315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7316 $as_echo "$EXPR" >&6; }
7317 else
7318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7319 $as_echo "no" >&6; }
7320 fi
7321 
7322 
7323           if test "x$EXPR" = x; then
7324             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7325           fi
7326         else
7327           # Otherwise we believe it is a complete path. Use it as it is.
7328           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7329 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7330           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7331 $as_echo_n "checking for EXPR... " >&6; }
7332           if test ! -x "$tool_specified"; then
7333             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7334 $as_echo "not found" >&6; }
7335             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7336           fi
7337           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7338 $as_echo "$tool_specified" >&6; }
7339         fi
7340       fi
7341     fi
7342 
7343   fi
7344 
7345 
7346 
7347   if test "x$EXPR" = x; then
7348     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7349   fi
7350 
7351 
7352 
7353 
7354 
7355   # Publish this variable in the help.
7356 
7357 
7358   if [ -z "${FILE+x}" ]; then
7359     # The variable is not set by user, try to locate tool using the code snippet
7360     for ac_prog in file
7361 do
7362   # Extract the first word of "$ac_prog", so it can be a program name with args.
7363 set dummy $ac_prog; ac_word=$2
7364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7365 $as_echo_n "checking for $ac_word... " >&6; }
7366 if ${ac_cv_path_FILE+:} false; then :
7367   $as_echo_n "(cached) " >&6
7368 else
7369   case $FILE in
7370   [\\/]* | ?:[\\/]*)
7371   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7372   ;;
7373   *)
7374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7375 for as_dir in $PATH
7376 do
7377   IFS=$as_save_IFS
7378   test -z "$as_dir" && as_dir=.
7379     for ac_exec_ext in '' $ac_executable_extensions; do
7380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7381     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7383     break 2
7384   fi
7385 done
7386   done
7387 IFS=$as_save_IFS
7388 
7389   ;;
7390 esac
7391 fi
7392 FILE=$ac_cv_path_FILE
7393 if test -n "$FILE"; then
7394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7395 $as_echo "$FILE" >&6; }
7396 else
7397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7398 $as_echo "no" >&6; }
7399 fi
7400 
7401 
7402   test -n "$FILE" && break
7403 done
7404 
7405   else
7406     # The variable is set, but is it from the command line or the environment?
7407 
7408     # Try to remove the string !FILE! from our list.
7409     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7410     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7411       # If it failed, the variable was not from the command line. Ignore it,
7412       # but warn the user (except for BASH, which is always set by the calling BASH).
7413       if test "xFILE" != xBASH; then
7414         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7415 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7416       fi
7417       # Try to locate tool using the code snippet
7418       for ac_prog in file
7419 do
7420   # Extract the first word of "$ac_prog", so it can be a program name with args.
7421 set dummy $ac_prog; ac_word=$2
7422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7423 $as_echo_n "checking for $ac_word... " >&6; }
7424 if ${ac_cv_path_FILE+:} false; then :
7425   $as_echo_n "(cached) " >&6
7426 else
7427   case $FILE in
7428   [\\/]* | ?:[\\/]*)
7429   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7430   ;;
7431   *)
7432   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7433 for as_dir in $PATH
7434 do
7435   IFS=$as_save_IFS
7436   test -z "$as_dir" && as_dir=.
7437     for ac_exec_ext in '' $ac_executable_extensions; do
7438   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7439     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7440     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7441     break 2
7442   fi
7443 done
7444   done
7445 IFS=$as_save_IFS
7446 
7447   ;;
7448 esac
7449 fi
7450 FILE=$ac_cv_path_FILE
7451 if test -n "$FILE"; then
7452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7453 $as_echo "$FILE" >&6; }
7454 else
7455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7456 $as_echo "no" >&6; }
7457 fi
7458 
7459 
7460   test -n "$FILE" && break
7461 done
7462 
7463     else
7464       # If it succeeded, then it was overridden by the user. We will use it
7465       # for the tool.
7466 
7467       # First remove it from the list of overridden variables, so we can test
7468       # for unknown variables in the end.
7469       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7470 
7471       # Check if we try to supply an empty value
7472       if test "x$FILE" = x; then
7473         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7474 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7475         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7476 $as_echo_n "checking for FILE... " >&6; }
7477         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7478 $as_echo "disabled" >&6; }
7479       else
7480         # Check if the provided tool contains a complete path.
7481         tool_specified="$FILE"
7482         tool_basename="${tool_specified##*/}"
7483         if test "x$tool_basename" = "x$tool_specified"; then
7484           # A command without a complete path is provided, search $PATH.
7485           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7486 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7487           # Extract the first word of "$tool_basename", so it can be a program name with args.
7488 set dummy $tool_basename; ac_word=$2
7489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7490 $as_echo_n "checking for $ac_word... " >&6; }
7491 if ${ac_cv_path_FILE+:} false; then :
7492   $as_echo_n "(cached) " >&6
7493 else
7494   case $FILE in
7495   [\\/]* | ?:[\\/]*)
7496   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7497   ;;
7498   *)
7499   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7500 for as_dir in $PATH
7501 do
7502   IFS=$as_save_IFS
7503   test -z "$as_dir" && as_dir=.
7504     for ac_exec_ext in '' $ac_executable_extensions; do
7505   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7506     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7507     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7508     break 2
7509   fi
7510 done
7511   done
7512 IFS=$as_save_IFS
7513 
7514   ;;
7515 esac
7516 fi
7517 FILE=$ac_cv_path_FILE
7518 if test -n "$FILE"; then
7519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7520 $as_echo "$FILE" >&6; }
7521 else
7522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7523 $as_echo "no" >&6; }
7524 fi
7525 
7526 
7527           if test "x$FILE" = x; then
7528             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7529           fi
7530         else
7531           # Otherwise we believe it is a complete path. Use it as it is.
7532           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7533 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7534           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7535 $as_echo_n "checking for FILE... " >&6; }
7536           if test ! -x "$tool_specified"; then
7537             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7538 $as_echo "not found" >&6; }
7539             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7540           fi
7541           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7542 $as_echo "$tool_specified" >&6; }
7543         fi
7544       fi
7545     fi
7546 
7547   fi
7548 
7549 
7550 
7551   if test "x$FILE" = x; then
7552     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7553   fi
7554 
7555 
7556 
7557 
7558 
7559   # Publish this variable in the help.
7560 
7561 
7562   if [ -z "${FIND+x}" ]; then
7563     # The variable is not set by user, try to locate tool using the code snippet
7564     for ac_prog in find
7565 do
7566   # Extract the first word of "$ac_prog", so it can be a program name with args.
7567 set dummy $ac_prog; ac_word=$2
7568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7569 $as_echo_n "checking for $ac_word... " >&6; }
7570 if ${ac_cv_path_FIND+:} false; then :
7571   $as_echo_n "(cached) " >&6
7572 else
7573   case $FIND in
7574   [\\/]* | ?:[\\/]*)
7575   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7576   ;;
7577   *)
7578   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7579 for as_dir in $PATH
7580 do
7581   IFS=$as_save_IFS
7582   test -z "$as_dir" && as_dir=.
7583     for ac_exec_ext in '' $ac_executable_extensions; do
7584   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7585     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7587     break 2
7588   fi
7589 done
7590   done
7591 IFS=$as_save_IFS
7592 
7593   ;;
7594 esac
7595 fi
7596 FIND=$ac_cv_path_FIND
7597 if test -n "$FIND"; then
7598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7599 $as_echo "$FIND" >&6; }
7600 else
7601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7602 $as_echo "no" >&6; }
7603 fi
7604 
7605 
7606   test -n "$FIND" && break
7607 done
7608 
7609   else
7610     # The variable is set, but is it from the command line or the environment?
7611 
7612     # Try to remove the string !FIND! from our list.
7613     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7614     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7615       # If it failed, the variable was not from the command line. Ignore it,
7616       # but warn the user (except for BASH, which is always set by the calling BASH).
7617       if test "xFIND" != xBASH; then
7618         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7619 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7620       fi
7621       # Try to locate tool using the code snippet
7622       for ac_prog in find
7623 do
7624   # Extract the first word of "$ac_prog", so it can be a program name with args.
7625 set dummy $ac_prog; ac_word=$2
7626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7627 $as_echo_n "checking for $ac_word... " >&6; }
7628 if ${ac_cv_path_FIND+:} false; then :
7629   $as_echo_n "(cached) " >&6
7630 else
7631   case $FIND in
7632   [\\/]* | ?:[\\/]*)
7633   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7634   ;;
7635   *)
7636   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7637 for as_dir in $PATH
7638 do
7639   IFS=$as_save_IFS
7640   test -z "$as_dir" && as_dir=.
7641     for ac_exec_ext in '' $ac_executable_extensions; do
7642   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7643     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7644     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7645     break 2
7646   fi
7647 done
7648   done
7649 IFS=$as_save_IFS
7650 
7651   ;;
7652 esac
7653 fi
7654 FIND=$ac_cv_path_FIND
7655 if test -n "$FIND"; then
7656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7657 $as_echo "$FIND" >&6; }
7658 else
7659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7660 $as_echo "no" >&6; }
7661 fi
7662 
7663 
7664   test -n "$FIND" && break
7665 done
7666 
7667     else
7668       # If it succeeded, then it was overridden by the user. We will use it
7669       # for the tool.
7670 
7671       # First remove it from the list of overridden variables, so we can test
7672       # for unknown variables in the end.
7673       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7674 
7675       # Check if we try to supply an empty value
7676       if test "x$FIND" = x; then
7677         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7678 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7679         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7680 $as_echo_n "checking for FIND... " >&6; }
7681         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7682 $as_echo "disabled" >&6; }
7683       else
7684         # Check if the provided tool contains a complete path.
7685         tool_specified="$FIND"
7686         tool_basename="${tool_specified##*/}"
7687         if test "x$tool_basename" = "x$tool_specified"; then
7688           # A command without a complete path is provided, search $PATH.
7689           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7690 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7691           # Extract the first word of "$tool_basename", so it can be a program name with args.
7692 set dummy $tool_basename; ac_word=$2
7693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7694 $as_echo_n "checking for $ac_word... " >&6; }
7695 if ${ac_cv_path_FIND+:} false; then :
7696   $as_echo_n "(cached) " >&6
7697 else
7698   case $FIND in
7699   [\\/]* | ?:[\\/]*)
7700   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7701   ;;
7702   *)
7703   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7704 for as_dir in $PATH
7705 do
7706   IFS=$as_save_IFS
7707   test -z "$as_dir" && as_dir=.
7708     for ac_exec_ext in '' $ac_executable_extensions; do
7709   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7710     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7711     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7712     break 2
7713   fi
7714 done
7715   done
7716 IFS=$as_save_IFS
7717 
7718   ;;
7719 esac
7720 fi
7721 FIND=$ac_cv_path_FIND
7722 if test -n "$FIND"; then
7723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7724 $as_echo "$FIND" >&6; }
7725 else
7726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7727 $as_echo "no" >&6; }
7728 fi
7729 
7730 
7731           if test "x$FIND" = x; then
7732             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7733           fi
7734         else
7735           # Otherwise we believe it is a complete path. Use it as it is.
7736           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7737 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7738           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7739 $as_echo_n "checking for FIND... " >&6; }
7740           if test ! -x "$tool_specified"; then
7741             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7742 $as_echo "not found" >&6; }
7743             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7744           fi
7745           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7746 $as_echo "$tool_specified" >&6; }
7747         fi
7748       fi
7749     fi
7750 
7751   fi
7752 
7753 
7754 
7755   if test "x$FIND" = x; then
7756     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7757   fi
7758 
7759 
7760 
7761 
7762 
7763   # Publish this variable in the help.
7764 
7765 
7766   if [ -z "${HEAD+x}" ]; then
7767     # The variable is not set by user, try to locate tool using the code snippet
7768     for ac_prog in head
7769 do
7770   # Extract the first word of "$ac_prog", so it can be a program name with args.
7771 set dummy $ac_prog; ac_word=$2
7772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7773 $as_echo_n "checking for $ac_word... " >&6; }
7774 if ${ac_cv_path_HEAD+:} false; then :
7775   $as_echo_n "(cached) " >&6
7776 else
7777   case $HEAD in
7778   [\\/]* | ?:[\\/]*)
7779   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7780   ;;
7781   *)
7782   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7783 for as_dir in $PATH
7784 do
7785   IFS=$as_save_IFS
7786   test -z "$as_dir" && as_dir=.
7787     for ac_exec_ext in '' $ac_executable_extensions; do
7788   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7789     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7790     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7791     break 2
7792   fi
7793 done
7794   done
7795 IFS=$as_save_IFS
7796 
7797   ;;
7798 esac
7799 fi
7800 HEAD=$ac_cv_path_HEAD
7801 if test -n "$HEAD"; then
7802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7803 $as_echo "$HEAD" >&6; }
7804 else
7805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7806 $as_echo "no" >&6; }
7807 fi
7808 
7809 
7810   test -n "$HEAD" && break
7811 done
7812 
7813   else
7814     # The variable is set, but is it from the command line or the environment?
7815 
7816     # Try to remove the string !HEAD! from our list.
7817     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7818     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7819       # If it failed, the variable was not from the command line. Ignore it,
7820       # but warn the user (except for BASH, which is always set by the calling BASH).
7821       if test "xHEAD" != xBASH; then
7822         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7823 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7824       fi
7825       # Try to locate tool using the code snippet
7826       for ac_prog in head
7827 do
7828   # Extract the first word of "$ac_prog", so it can be a program name with args.
7829 set dummy $ac_prog; ac_word=$2
7830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7831 $as_echo_n "checking for $ac_word... " >&6; }
7832 if ${ac_cv_path_HEAD+:} false; then :
7833   $as_echo_n "(cached) " >&6
7834 else
7835   case $HEAD in
7836   [\\/]* | ?:[\\/]*)
7837   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7838   ;;
7839   *)
7840   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7841 for as_dir in $PATH
7842 do
7843   IFS=$as_save_IFS
7844   test -z "$as_dir" && as_dir=.
7845     for ac_exec_ext in '' $ac_executable_extensions; do
7846   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7847     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7848     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7849     break 2
7850   fi
7851 done
7852   done
7853 IFS=$as_save_IFS
7854 
7855   ;;
7856 esac
7857 fi
7858 HEAD=$ac_cv_path_HEAD
7859 if test -n "$HEAD"; then
7860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7861 $as_echo "$HEAD" >&6; }
7862 else
7863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7864 $as_echo "no" >&6; }
7865 fi
7866 
7867 
7868   test -n "$HEAD" && break
7869 done
7870 
7871     else
7872       # If it succeeded, then it was overridden by the user. We will use it
7873       # for the tool.
7874 
7875       # First remove it from the list of overridden variables, so we can test
7876       # for unknown variables in the end.
7877       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7878 
7879       # Check if we try to supply an empty value
7880       if test "x$HEAD" = x; then
7881         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7882 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7883         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7884 $as_echo_n "checking for HEAD... " >&6; }
7885         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7886 $as_echo "disabled" >&6; }
7887       else
7888         # Check if the provided tool contains a complete path.
7889         tool_specified="$HEAD"
7890         tool_basename="${tool_specified##*/}"
7891         if test "x$tool_basename" = "x$tool_specified"; then
7892           # A command without a complete path is provided, search $PATH.
7893           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7894 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7895           # Extract the first word of "$tool_basename", so it can be a program name with args.
7896 set dummy $tool_basename; ac_word=$2
7897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7898 $as_echo_n "checking for $ac_word... " >&6; }
7899 if ${ac_cv_path_HEAD+:} false; then :
7900   $as_echo_n "(cached) " >&6
7901 else
7902   case $HEAD in
7903   [\\/]* | ?:[\\/]*)
7904   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7905   ;;
7906   *)
7907   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7908 for as_dir in $PATH
7909 do
7910   IFS=$as_save_IFS
7911   test -z "$as_dir" && as_dir=.
7912     for ac_exec_ext in '' $ac_executable_extensions; do
7913   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7914     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7915     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7916     break 2
7917   fi
7918 done
7919   done
7920 IFS=$as_save_IFS
7921 
7922   ;;
7923 esac
7924 fi
7925 HEAD=$ac_cv_path_HEAD
7926 if test -n "$HEAD"; then
7927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7928 $as_echo "$HEAD" >&6; }
7929 else
7930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7931 $as_echo "no" >&6; }
7932 fi
7933 
7934 
7935           if test "x$HEAD" = x; then
7936             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7937           fi
7938         else
7939           # Otherwise we believe it is a complete path. Use it as it is.
7940           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7941 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7942           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7943 $as_echo_n "checking for HEAD... " >&6; }
7944           if test ! -x "$tool_specified"; then
7945             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7946 $as_echo "not found" >&6; }
7947             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7948           fi
7949           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7950 $as_echo "$tool_specified" >&6; }
7951         fi
7952       fi
7953     fi
7954 
7955   fi
7956 
7957 
7958 
7959   if test "x$HEAD" = x; then
7960     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7961   fi
7962 
7963 
7964 
7965 
7966 
7967   # Publish this variable in the help.
7968 
7969 
7970   if [ -z "${LN+x}" ]; then
7971     # The variable is not set by user, try to locate tool using the code snippet
7972     for ac_prog in ln
7973 do
7974   # Extract the first word of "$ac_prog", so it can be a program name with args.
7975 set dummy $ac_prog; ac_word=$2
7976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7977 $as_echo_n "checking for $ac_word... " >&6; }
7978 if ${ac_cv_path_LN+:} false; then :
7979   $as_echo_n "(cached) " >&6
7980 else
7981   case $LN in
7982   [\\/]* | ?:[\\/]*)
7983   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7984   ;;
7985   *)
7986   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7987 for as_dir in $PATH
7988 do
7989   IFS=$as_save_IFS
7990   test -z "$as_dir" && as_dir=.
7991     for ac_exec_ext in '' $ac_executable_extensions; do
7992   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7993     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7994     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7995     break 2
7996   fi
7997 done
7998   done
7999 IFS=$as_save_IFS
8000 
8001   ;;
8002 esac
8003 fi
8004 LN=$ac_cv_path_LN
8005 if test -n "$LN"; then
8006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8007 $as_echo "$LN" >&6; }
8008 else
8009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8010 $as_echo "no" >&6; }
8011 fi
8012 
8013 
8014   test -n "$LN" && break
8015 done
8016 
8017   else
8018     # The variable is set, but is it from the command line or the environment?
8019 
8020     # Try to remove the string !LN! from our list.
8021     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8022     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8023       # If it failed, the variable was not from the command line. Ignore it,
8024       # but warn the user (except for BASH, which is always set by the calling BASH).
8025       if test "xLN" != xBASH; then
8026         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8027 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8028       fi
8029       # Try to locate tool using the code snippet
8030       for ac_prog in ln
8031 do
8032   # Extract the first word of "$ac_prog", so it can be a program name with args.
8033 set dummy $ac_prog; ac_word=$2
8034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8035 $as_echo_n "checking for $ac_word... " >&6; }
8036 if ${ac_cv_path_LN+:} false; then :
8037   $as_echo_n "(cached) " >&6
8038 else
8039   case $LN in
8040   [\\/]* | ?:[\\/]*)
8041   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8042   ;;
8043   *)
8044   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8045 for as_dir in $PATH
8046 do
8047   IFS=$as_save_IFS
8048   test -z "$as_dir" && as_dir=.
8049     for ac_exec_ext in '' $ac_executable_extensions; do
8050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8051     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8053     break 2
8054   fi
8055 done
8056   done
8057 IFS=$as_save_IFS
8058 
8059   ;;
8060 esac
8061 fi
8062 LN=$ac_cv_path_LN
8063 if test -n "$LN"; then
8064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8065 $as_echo "$LN" >&6; }
8066 else
8067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8068 $as_echo "no" >&6; }
8069 fi
8070 
8071 
8072   test -n "$LN" && break
8073 done
8074 
8075     else
8076       # If it succeeded, then it was overridden by the user. We will use it
8077       # for the tool.
8078 
8079       # First remove it from the list of overridden variables, so we can test
8080       # for unknown variables in the end.
8081       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8082 
8083       # Check if we try to supply an empty value
8084       if test "x$LN" = x; then
8085         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8086 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8087         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8088 $as_echo_n "checking for LN... " >&6; }
8089         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8090 $as_echo "disabled" >&6; }
8091       else
8092         # Check if the provided tool contains a complete path.
8093         tool_specified="$LN"
8094         tool_basename="${tool_specified##*/}"
8095         if test "x$tool_basename" = "x$tool_specified"; then
8096           # A command without a complete path is provided, search $PATH.
8097           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8098 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8099           # Extract the first word of "$tool_basename", so it can be a program name with args.
8100 set dummy $tool_basename; ac_word=$2
8101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8102 $as_echo_n "checking for $ac_word... " >&6; }
8103 if ${ac_cv_path_LN+:} false; then :
8104   $as_echo_n "(cached) " >&6
8105 else
8106   case $LN in
8107   [\\/]* | ?:[\\/]*)
8108   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8109   ;;
8110   *)
8111   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8112 for as_dir in $PATH
8113 do
8114   IFS=$as_save_IFS
8115   test -z "$as_dir" && as_dir=.
8116     for ac_exec_ext in '' $ac_executable_extensions; do
8117   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8118     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8119     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8120     break 2
8121   fi
8122 done
8123   done
8124 IFS=$as_save_IFS
8125 
8126   ;;
8127 esac
8128 fi
8129 LN=$ac_cv_path_LN
8130 if test -n "$LN"; then
8131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8132 $as_echo "$LN" >&6; }
8133 else
8134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8135 $as_echo "no" >&6; }
8136 fi
8137 
8138 
8139           if test "x$LN" = x; then
8140             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8141           fi
8142         else
8143           # Otherwise we believe it is a complete path. Use it as it is.
8144           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8145 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8146           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8147 $as_echo_n "checking for LN... " >&6; }
8148           if test ! -x "$tool_specified"; then
8149             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8150 $as_echo "not found" >&6; }
8151             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8152           fi
8153           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8154 $as_echo "$tool_specified" >&6; }
8155         fi
8156       fi
8157     fi
8158 
8159   fi
8160 
8161 
8162 
8163   if test "x$LN" = x; then
8164     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8165   fi
8166 
8167 
8168 
8169 
8170 
8171   # Publish this variable in the help.
8172 
8173 
8174   if [ -z "${LS+x}" ]; then
8175     # The variable is not set by user, try to locate tool using the code snippet
8176     for ac_prog in ls
8177 do
8178   # Extract the first word of "$ac_prog", so it can be a program name with args.
8179 set dummy $ac_prog; ac_word=$2
8180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8181 $as_echo_n "checking for $ac_word... " >&6; }
8182 if ${ac_cv_path_LS+:} false; then :
8183   $as_echo_n "(cached) " >&6
8184 else
8185   case $LS in
8186   [\\/]* | ?:[\\/]*)
8187   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8188   ;;
8189   *)
8190   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8191 for as_dir in $PATH
8192 do
8193   IFS=$as_save_IFS
8194   test -z "$as_dir" && as_dir=.
8195     for ac_exec_ext in '' $ac_executable_extensions; do
8196   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8197     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8198     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8199     break 2
8200   fi
8201 done
8202   done
8203 IFS=$as_save_IFS
8204 
8205   ;;
8206 esac
8207 fi
8208 LS=$ac_cv_path_LS
8209 if test -n "$LS"; then
8210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8211 $as_echo "$LS" >&6; }
8212 else
8213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8214 $as_echo "no" >&6; }
8215 fi
8216 
8217 
8218   test -n "$LS" && break
8219 done
8220 
8221   else
8222     # The variable is set, but is it from the command line or the environment?
8223 
8224     # Try to remove the string !LS! from our list.
8225     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8226     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8227       # If it failed, the variable was not from the command line. Ignore it,
8228       # but warn the user (except for BASH, which is always set by the calling BASH).
8229       if test "xLS" != xBASH; then
8230         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8231 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8232       fi
8233       # Try to locate tool using the code snippet
8234       for ac_prog in ls
8235 do
8236   # Extract the first word of "$ac_prog", so it can be a program name with args.
8237 set dummy $ac_prog; ac_word=$2
8238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8239 $as_echo_n "checking for $ac_word... " >&6; }
8240 if ${ac_cv_path_LS+:} false; then :
8241   $as_echo_n "(cached) " >&6
8242 else
8243   case $LS in
8244   [\\/]* | ?:[\\/]*)
8245   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8246   ;;
8247   *)
8248   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8249 for as_dir in $PATH
8250 do
8251   IFS=$as_save_IFS
8252   test -z "$as_dir" && as_dir=.
8253     for ac_exec_ext in '' $ac_executable_extensions; do
8254   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8255     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8257     break 2
8258   fi
8259 done
8260   done
8261 IFS=$as_save_IFS
8262 
8263   ;;
8264 esac
8265 fi
8266 LS=$ac_cv_path_LS
8267 if test -n "$LS"; then
8268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8269 $as_echo "$LS" >&6; }
8270 else
8271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8272 $as_echo "no" >&6; }
8273 fi
8274 
8275 
8276   test -n "$LS" && break
8277 done
8278 
8279     else
8280       # If it succeeded, then it was overridden by the user. We will use it
8281       # for the tool.
8282 
8283       # First remove it from the list of overridden variables, so we can test
8284       # for unknown variables in the end.
8285       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8286 
8287       # Check if we try to supply an empty value
8288       if test "x$LS" = x; then
8289         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8290 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8291         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8292 $as_echo_n "checking for LS... " >&6; }
8293         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8294 $as_echo "disabled" >&6; }
8295       else
8296         # Check if the provided tool contains a complete path.
8297         tool_specified="$LS"
8298         tool_basename="${tool_specified##*/}"
8299         if test "x$tool_basename" = "x$tool_specified"; then
8300           # A command without a complete path is provided, search $PATH.
8301           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8302 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8303           # Extract the first word of "$tool_basename", so it can be a program name with args.
8304 set dummy $tool_basename; ac_word=$2
8305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8306 $as_echo_n "checking for $ac_word... " >&6; }
8307 if ${ac_cv_path_LS+:} false; then :
8308   $as_echo_n "(cached) " >&6
8309 else
8310   case $LS in
8311   [\\/]* | ?:[\\/]*)
8312   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8313   ;;
8314   *)
8315   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8316 for as_dir in $PATH
8317 do
8318   IFS=$as_save_IFS
8319   test -z "$as_dir" && as_dir=.
8320     for ac_exec_ext in '' $ac_executable_extensions; do
8321   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8322     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8323     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8324     break 2
8325   fi
8326 done
8327   done
8328 IFS=$as_save_IFS
8329 
8330   ;;
8331 esac
8332 fi
8333 LS=$ac_cv_path_LS
8334 if test -n "$LS"; then
8335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8336 $as_echo "$LS" >&6; }
8337 else
8338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8339 $as_echo "no" >&6; }
8340 fi
8341 
8342 
8343           if test "x$LS" = x; then
8344             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8345           fi
8346         else
8347           # Otherwise we believe it is a complete path. Use it as it is.
8348           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8349 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8350           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8351 $as_echo_n "checking for LS... " >&6; }
8352           if test ! -x "$tool_specified"; then
8353             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8354 $as_echo "not found" >&6; }
8355             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8356           fi
8357           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8358 $as_echo "$tool_specified" >&6; }
8359         fi
8360       fi
8361     fi
8362 
8363   fi
8364 
8365 
8366 
8367   if test "x$LS" = x; then
8368     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8369   fi
8370 
8371 
8372 
8373 
8374 
8375   # Publish this variable in the help.
8376 
8377 
8378   if [ -z "${MKDIR+x}" ]; then
8379     # The variable is not set by user, try to locate tool using the code snippet
8380     for ac_prog in mkdir
8381 do
8382   # Extract the first word of "$ac_prog", so it can be a program name with args.
8383 set dummy $ac_prog; ac_word=$2
8384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8385 $as_echo_n "checking for $ac_word... " >&6; }
8386 if ${ac_cv_path_MKDIR+:} false; then :
8387   $as_echo_n "(cached) " >&6
8388 else
8389   case $MKDIR in
8390   [\\/]* | ?:[\\/]*)
8391   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8392   ;;
8393   *)
8394   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8395 for as_dir in $PATH
8396 do
8397   IFS=$as_save_IFS
8398   test -z "$as_dir" && as_dir=.
8399     for ac_exec_ext in '' $ac_executable_extensions; do
8400   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8401     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8402     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8403     break 2
8404   fi
8405 done
8406   done
8407 IFS=$as_save_IFS
8408 
8409   ;;
8410 esac
8411 fi
8412 MKDIR=$ac_cv_path_MKDIR
8413 if test -n "$MKDIR"; then
8414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8415 $as_echo "$MKDIR" >&6; }
8416 else
8417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8418 $as_echo "no" >&6; }
8419 fi
8420 
8421 
8422   test -n "$MKDIR" && break
8423 done
8424 
8425   else
8426     # The variable is set, but is it from the command line or the environment?
8427 
8428     # Try to remove the string !MKDIR! from our list.
8429     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8430     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8431       # If it failed, the variable was not from the command line. Ignore it,
8432       # but warn the user (except for BASH, which is always set by the calling BASH).
8433       if test "xMKDIR" != xBASH; then
8434         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8435 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8436       fi
8437       # Try to locate tool using the code snippet
8438       for ac_prog in mkdir
8439 do
8440   # Extract the first word of "$ac_prog", so it can be a program name with args.
8441 set dummy $ac_prog; ac_word=$2
8442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8443 $as_echo_n "checking for $ac_word... " >&6; }
8444 if ${ac_cv_path_MKDIR+:} false; then :
8445   $as_echo_n "(cached) " >&6
8446 else
8447   case $MKDIR in
8448   [\\/]* | ?:[\\/]*)
8449   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8450   ;;
8451   *)
8452   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8453 for as_dir in $PATH
8454 do
8455   IFS=$as_save_IFS
8456   test -z "$as_dir" && as_dir=.
8457     for ac_exec_ext in '' $ac_executable_extensions; do
8458   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8459     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8460     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8461     break 2
8462   fi
8463 done
8464   done
8465 IFS=$as_save_IFS
8466 
8467   ;;
8468 esac
8469 fi
8470 MKDIR=$ac_cv_path_MKDIR
8471 if test -n "$MKDIR"; then
8472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8473 $as_echo "$MKDIR" >&6; }
8474 else
8475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8476 $as_echo "no" >&6; }
8477 fi
8478 
8479 
8480   test -n "$MKDIR" && break
8481 done
8482 
8483     else
8484       # If it succeeded, then it was overridden by the user. We will use it
8485       # for the tool.
8486 
8487       # First remove it from the list of overridden variables, so we can test
8488       # for unknown variables in the end.
8489       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8490 
8491       # Check if we try to supply an empty value
8492       if test "x$MKDIR" = x; then
8493         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8494 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8495         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8496 $as_echo_n "checking for MKDIR... " >&6; }
8497         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8498 $as_echo "disabled" >&6; }
8499       else
8500         # Check if the provided tool contains a complete path.
8501         tool_specified="$MKDIR"
8502         tool_basename="${tool_specified##*/}"
8503         if test "x$tool_basename" = "x$tool_specified"; then
8504           # A command without a complete path is provided, search $PATH.
8505           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8506 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8507           # Extract the first word of "$tool_basename", so it can be a program name with args.
8508 set dummy $tool_basename; ac_word=$2
8509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8510 $as_echo_n "checking for $ac_word... " >&6; }
8511 if ${ac_cv_path_MKDIR+:} false; then :
8512   $as_echo_n "(cached) " >&6
8513 else
8514   case $MKDIR in
8515   [\\/]* | ?:[\\/]*)
8516   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8517   ;;
8518   *)
8519   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8520 for as_dir in $PATH
8521 do
8522   IFS=$as_save_IFS
8523   test -z "$as_dir" && as_dir=.
8524     for ac_exec_ext in '' $ac_executable_extensions; do
8525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8526     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8528     break 2
8529   fi
8530 done
8531   done
8532 IFS=$as_save_IFS
8533 
8534   ;;
8535 esac
8536 fi
8537 MKDIR=$ac_cv_path_MKDIR
8538 if test -n "$MKDIR"; then
8539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8540 $as_echo "$MKDIR" >&6; }
8541 else
8542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8543 $as_echo "no" >&6; }
8544 fi
8545 
8546 
8547           if test "x$MKDIR" = x; then
8548             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8549           fi
8550         else
8551           # Otherwise we believe it is a complete path. Use it as it is.
8552           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8553 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8554           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8555 $as_echo_n "checking for MKDIR... " >&6; }
8556           if test ! -x "$tool_specified"; then
8557             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8558 $as_echo "not found" >&6; }
8559             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8560           fi
8561           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8562 $as_echo "$tool_specified" >&6; }
8563         fi
8564       fi
8565     fi
8566 
8567   fi
8568 
8569 
8570 
8571   if test "x$MKDIR" = x; then
8572     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8573   fi
8574 
8575 
8576 
8577 
8578 
8579   # Publish this variable in the help.
8580 
8581 
8582   if [ -z "${MKTEMP+x}" ]; then
8583     # The variable is not set by user, try to locate tool using the code snippet
8584     for ac_prog in mktemp
8585 do
8586   # Extract the first word of "$ac_prog", so it can be a program name with args.
8587 set dummy $ac_prog; ac_word=$2
8588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8589 $as_echo_n "checking for $ac_word... " >&6; }
8590 if ${ac_cv_path_MKTEMP+:} false; then :
8591   $as_echo_n "(cached) " >&6
8592 else
8593   case $MKTEMP in
8594   [\\/]* | ?:[\\/]*)
8595   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8596   ;;
8597   *)
8598   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8599 for as_dir in $PATH
8600 do
8601   IFS=$as_save_IFS
8602   test -z "$as_dir" && as_dir=.
8603     for ac_exec_ext in '' $ac_executable_extensions; do
8604   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8605     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8606     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8607     break 2
8608   fi
8609 done
8610   done
8611 IFS=$as_save_IFS
8612 
8613   ;;
8614 esac
8615 fi
8616 MKTEMP=$ac_cv_path_MKTEMP
8617 if test -n "$MKTEMP"; then
8618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8619 $as_echo "$MKTEMP" >&6; }
8620 else
8621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8622 $as_echo "no" >&6; }
8623 fi
8624 
8625 
8626   test -n "$MKTEMP" && break
8627 done
8628 
8629   else
8630     # The variable is set, but is it from the command line or the environment?
8631 
8632     # Try to remove the string !MKTEMP! from our list.
8633     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8634     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8635       # If it failed, the variable was not from the command line. Ignore it,
8636       # but warn the user (except for BASH, which is always set by the calling BASH).
8637       if test "xMKTEMP" != xBASH; then
8638         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8639 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8640       fi
8641       # Try to locate tool using the code snippet
8642       for ac_prog in mktemp
8643 do
8644   # Extract the first word of "$ac_prog", so it can be a program name with args.
8645 set dummy $ac_prog; ac_word=$2
8646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8647 $as_echo_n "checking for $ac_word... " >&6; }
8648 if ${ac_cv_path_MKTEMP+:} false; then :
8649   $as_echo_n "(cached) " >&6
8650 else
8651   case $MKTEMP in
8652   [\\/]* | ?:[\\/]*)
8653   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8654   ;;
8655   *)
8656   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8657 for as_dir in $PATH
8658 do
8659   IFS=$as_save_IFS
8660   test -z "$as_dir" && as_dir=.
8661     for ac_exec_ext in '' $ac_executable_extensions; do
8662   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8663     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8664     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8665     break 2
8666   fi
8667 done
8668   done
8669 IFS=$as_save_IFS
8670 
8671   ;;
8672 esac
8673 fi
8674 MKTEMP=$ac_cv_path_MKTEMP
8675 if test -n "$MKTEMP"; then
8676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8677 $as_echo "$MKTEMP" >&6; }
8678 else
8679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8680 $as_echo "no" >&6; }
8681 fi
8682 
8683 
8684   test -n "$MKTEMP" && break
8685 done
8686 
8687     else
8688       # If it succeeded, then it was overridden by the user. We will use it
8689       # for the tool.
8690 
8691       # First remove it from the list of overridden variables, so we can test
8692       # for unknown variables in the end.
8693       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8694 
8695       # Check if we try to supply an empty value
8696       if test "x$MKTEMP" = x; then
8697         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8698 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8699         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8700 $as_echo_n "checking for MKTEMP... " >&6; }
8701         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8702 $as_echo "disabled" >&6; }
8703       else
8704         # Check if the provided tool contains a complete path.
8705         tool_specified="$MKTEMP"
8706         tool_basename="${tool_specified##*/}"
8707         if test "x$tool_basename" = "x$tool_specified"; then
8708           # A command without a complete path is provided, search $PATH.
8709           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8710 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8711           # Extract the first word of "$tool_basename", so it can be a program name with args.
8712 set dummy $tool_basename; ac_word=$2
8713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8714 $as_echo_n "checking for $ac_word... " >&6; }
8715 if ${ac_cv_path_MKTEMP+:} false; then :
8716   $as_echo_n "(cached) " >&6
8717 else
8718   case $MKTEMP in
8719   [\\/]* | ?:[\\/]*)
8720   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8721   ;;
8722   *)
8723   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8724 for as_dir in $PATH
8725 do
8726   IFS=$as_save_IFS
8727   test -z "$as_dir" && as_dir=.
8728     for ac_exec_ext in '' $ac_executable_extensions; do
8729   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8730     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8731     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8732     break 2
8733   fi
8734 done
8735   done
8736 IFS=$as_save_IFS
8737 
8738   ;;
8739 esac
8740 fi
8741 MKTEMP=$ac_cv_path_MKTEMP
8742 if test -n "$MKTEMP"; then
8743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8744 $as_echo "$MKTEMP" >&6; }
8745 else
8746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8747 $as_echo "no" >&6; }
8748 fi
8749 
8750 
8751           if test "x$MKTEMP" = x; then
8752             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8753           fi
8754         else
8755           # Otherwise we believe it is a complete path. Use it as it is.
8756           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8757 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8758           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8759 $as_echo_n "checking for MKTEMP... " >&6; }
8760           if test ! -x "$tool_specified"; then
8761             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8762 $as_echo "not found" >&6; }
8763             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8764           fi
8765           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8766 $as_echo "$tool_specified" >&6; }
8767         fi
8768       fi
8769     fi
8770 
8771   fi
8772 
8773 
8774 
8775   if test "x$MKTEMP" = x; then
8776     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8777   fi
8778 
8779 
8780 
8781 
8782 
8783   # Publish this variable in the help.
8784 
8785 
8786   if [ -z "${MV+x}" ]; then
8787     # The variable is not set by user, try to locate tool using the code snippet
8788     for ac_prog in mv
8789 do
8790   # Extract the first word of "$ac_prog", so it can be a program name with args.
8791 set dummy $ac_prog; ac_word=$2
8792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8793 $as_echo_n "checking for $ac_word... " >&6; }
8794 if ${ac_cv_path_MV+:} false; then :
8795   $as_echo_n "(cached) " >&6
8796 else
8797   case $MV in
8798   [\\/]* | ?:[\\/]*)
8799   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8800   ;;
8801   *)
8802   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8803 for as_dir in $PATH
8804 do
8805   IFS=$as_save_IFS
8806   test -z "$as_dir" && as_dir=.
8807     for ac_exec_ext in '' $ac_executable_extensions; do
8808   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8809     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8811     break 2
8812   fi
8813 done
8814   done
8815 IFS=$as_save_IFS
8816 
8817   ;;
8818 esac
8819 fi
8820 MV=$ac_cv_path_MV
8821 if test -n "$MV"; then
8822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8823 $as_echo "$MV" >&6; }
8824 else
8825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8826 $as_echo "no" >&6; }
8827 fi
8828 
8829 
8830   test -n "$MV" && break
8831 done
8832 
8833   else
8834     # The variable is set, but is it from the command line or the environment?
8835 
8836     # Try to remove the string !MV! from our list.
8837     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8838     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8839       # If it failed, the variable was not from the command line. Ignore it,
8840       # but warn the user (except for BASH, which is always set by the calling BASH).
8841       if test "xMV" != xBASH; then
8842         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8843 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8844       fi
8845       # Try to locate tool using the code snippet
8846       for ac_prog in mv
8847 do
8848   # Extract the first word of "$ac_prog", so it can be a program name with args.
8849 set dummy $ac_prog; ac_word=$2
8850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8851 $as_echo_n "checking for $ac_word... " >&6; }
8852 if ${ac_cv_path_MV+:} false; then :
8853   $as_echo_n "(cached) " >&6
8854 else
8855   case $MV in
8856   [\\/]* | ?:[\\/]*)
8857   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8858   ;;
8859   *)
8860   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8861 for as_dir in $PATH
8862 do
8863   IFS=$as_save_IFS
8864   test -z "$as_dir" && as_dir=.
8865     for ac_exec_ext in '' $ac_executable_extensions; do
8866   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8867     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8868     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8869     break 2
8870   fi
8871 done
8872   done
8873 IFS=$as_save_IFS
8874 
8875   ;;
8876 esac
8877 fi
8878 MV=$ac_cv_path_MV
8879 if test -n "$MV"; then
8880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8881 $as_echo "$MV" >&6; }
8882 else
8883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8884 $as_echo "no" >&6; }
8885 fi
8886 
8887 
8888   test -n "$MV" && break
8889 done
8890 
8891     else
8892       # If it succeeded, then it was overridden by the user. We will use it
8893       # for the tool.
8894 
8895       # First remove it from the list of overridden variables, so we can test
8896       # for unknown variables in the end.
8897       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8898 
8899       # Check if we try to supply an empty value
8900       if test "x$MV" = x; then
8901         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8902 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8903         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8904 $as_echo_n "checking for MV... " >&6; }
8905         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8906 $as_echo "disabled" >&6; }
8907       else
8908         # Check if the provided tool contains a complete path.
8909         tool_specified="$MV"
8910         tool_basename="${tool_specified##*/}"
8911         if test "x$tool_basename" = "x$tool_specified"; then
8912           # A command without a complete path is provided, search $PATH.
8913           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8914 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8915           # Extract the first word of "$tool_basename", so it can be a program name with args.
8916 set dummy $tool_basename; ac_word=$2
8917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8918 $as_echo_n "checking for $ac_word... " >&6; }
8919 if ${ac_cv_path_MV+:} false; then :
8920   $as_echo_n "(cached) " >&6
8921 else
8922   case $MV in
8923   [\\/]* | ?:[\\/]*)
8924   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8925   ;;
8926   *)
8927   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8928 for as_dir in $PATH
8929 do
8930   IFS=$as_save_IFS
8931   test -z "$as_dir" && as_dir=.
8932     for ac_exec_ext in '' $ac_executable_extensions; do
8933   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8934     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8935     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8936     break 2
8937   fi
8938 done
8939   done
8940 IFS=$as_save_IFS
8941 
8942   ;;
8943 esac
8944 fi
8945 MV=$ac_cv_path_MV
8946 if test -n "$MV"; then
8947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8948 $as_echo "$MV" >&6; }
8949 else
8950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8951 $as_echo "no" >&6; }
8952 fi
8953 
8954 
8955           if test "x$MV" = x; then
8956             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8957           fi
8958         else
8959           # Otherwise we believe it is a complete path. Use it as it is.
8960           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8961 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8962           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8963 $as_echo_n "checking for MV... " >&6; }
8964           if test ! -x "$tool_specified"; then
8965             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8966 $as_echo "not found" >&6; }
8967             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8968           fi
8969           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8970 $as_echo "$tool_specified" >&6; }
8971         fi
8972       fi
8973     fi
8974 
8975   fi
8976 
8977 
8978 
8979   if test "x$MV" = x; then
8980     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8981   fi
8982 
8983 
8984 
8985 
8986 
8987   # Publish this variable in the help.
8988 
8989 
8990   if [ -z "${NAWK+x}" ]; then
8991     # The variable is not set by user, try to locate tool using the code snippet
8992     for ac_prog in nawk gawk awk
8993 do
8994   # Extract the first word of "$ac_prog", so it can be a program name with args.
8995 set dummy $ac_prog; ac_word=$2
8996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8997 $as_echo_n "checking for $ac_word... " >&6; }
8998 if ${ac_cv_path_NAWK+:} false; then :
8999   $as_echo_n "(cached) " >&6
9000 else
9001   case $NAWK in
9002   [\\/]* | ?:[\\/]*)
9003   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9004   ;;
9005   *)
9006   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9007 for as_dir in $PATH
9008 do
9009   IFS=$as_save_IFS
9010   test -z "$as_dir" && as_dir=.
9011     for ac_exec_ext in '' $ac_executable_extensions; do
9012   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9013     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9014     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9015     break 2
9016   fi
9017 done
9018   done
9019 IFS=$as_save_IFS
9020 
9021   ;;
9022 esac
9023 fi
9024 NAWK=$ac_cv_path_NAWK
9025 if test -n "$NAWK"; then
9026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9027 $as_echo "$NAWK" >&6; }
9028 else
9029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9030 $as_echo "no" >&6; }
9031 fi
9032 
9033 
9034   test -n "$NAWK" && break
9035 done
9036 
9037   else
9038     # The variable is set, but is it from the command line or the environment?
9039 
9040     # Try to remove the string !NAWK! from our list.
9041     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9042     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9043       # If it failed, the variable was not from the command line. Ignore it,
9044       # but warn the user (except for BASH, which is always set by the calling BASH).
9045       if test "xNAWK" != xBASH; then
9046         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9047 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9048       fi
9049       # Try to locate tool using the code snippet
9050       for ac_prog in nawk gawk awk
9051 do
9052   # Extract the first word of "$ac_prog", so it can be a program name with args.
9053 set dummy $ac_prog; ac_word=$2
9054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9055 $as_echo_n "checking for $ac_word... " >&6; }
9056 if ${ac_cv_path_NAWK+:} false; then :
9057   $as_echo_n "(cached) " >&6
9058 else
9059   case $NAWK in
9060   [\\/]* | ?:[\\/]*)
9061   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9062   ;;
9063   *)
9064   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9065 for as_dir in $PATH
9066 do
9067   IFS=$as_save_IFS
9068   test -z "$as_dir" && as_dir=.
9069     for ac_exec_ext in '' $ac_executable_extensions; do
9070   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9071     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9072     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9073     break 2
9074   fi
9075 done
9076   done
9077 IFS=$as_save_IFS
9078 
9079   ;;
9080 esac
9081 fi
9082 NAWK=$ac_cv_path_NAWK
9083 if test -n "$NAWK"; then
9084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9085 $as_echo "$NAWK" >&6; }
9086 else
9087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9088 $as_echo "no" >&6; }
9089 fi
9090 
9091 
9092   test -n "$NAWK" && break
9093 done
9094 
9095     else
9096       # If it succeeded, then it was overridden by the user. We will use it
9097       # for the tool.
9098 
9099       # First remove it from the list of overridden variables, so we can test
9100       # for unknown variables in the end.
9101       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9102 
9103       # Check if we try to supply an empty value
9104       if test "x$NAWK" = x; then
9105         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9106 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9107         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9108 $as_echo_n "checking for NAWK... " >&6; }
9109         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9110 $as_echo "disabled" >&6; }
9111       else
9112         # Check if the provided tool contains a complete path.
9113         tool_specified="$NAWK"
9114         tool_basename="${tool_specified##*/}"
9115         if test "x$tool_basename" = "x$tool_specified"; then
9116           # A command without a complete path is provided, search $PATH.
9117           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9118 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9119           # Extract the first word of "$tool_basename", so it can be a program name with args.
9120 set dummy $tool_basename; ac_word=$2
9121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9122 $as_echo_n "checking for $ac_word... " >&6; }
9123 if ${ac_cv_path_NAWK+:} false; then :
9124   $as_echo_n "(cached) " >&6
9125 else
9126   case $NAWK in
9127   [\\/]* | ?:[\\/]*)
9128   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9129   ;;
9130   *)
9131   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9132 for as_dir in $PATH
9133 do
9134   IFS=$as_save_IFS
9135   test -z "$as_dir" && as_dir=.
9136     for ac_exec_ext in '' $ac_executable_extensions; do
9137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9138     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9140     break 2
9141   fi
9142 done
9143   done
9144 IFS=$as_save_IFS
9145 
9146   ;;
9147 esac
9148 fi
9149 NAWK=$ac_cv_path_NAWK
9150 if test -n "$NAWK"; then
9151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9152 $as_echo "$NAWK" >&6; }
9153 else
9154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9155 $as_echo "no" >&6; }
9156 fi
9157 
9158 
9159           if test "x$NAWK" = x; then
9160             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9161           fi
9162         else
9163           # Otherwise we believe it is a complete path. Use it as it is.
9164           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9165 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9166           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9167 $as_echo_n "checking for NAWK... " >&6; }
9168           if test ! -x "$tool_specified"; then
9169             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9170 $as_echo "not found" >&6; }
9171             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9172           fi
9173           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9174 $as_echo "$tool_specified" >&6; }
9175         fi
9176       fi
9177     fi
9178 
9179   fi
9180 
9181 
9182 
9183   if test "x$NAWK" = x; then
9184     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9185   fi
9186 
9187 
9188 
9189 
9190 
9191   # Publish this variable in the help.
9192 
9193 
9194   if [ -z "${PRINTF+x}" ]; then
9195     # The variable is not set by user, try to locate tool using the code snippet
9196     for ac_prog in printf
9197 do
9198   # Extract the first word of "$ac_prog", so it can be a program name with args.
9199 set dummy $ac_prog; ac_word=$2
9200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9201 $as_echo_n "checking for $ac_word... " >&6; }
9202 if ${ac_cv_path_PRINTF+:} false; then :
9203   $as_echo_n "(cached) " >&6
9204 else
9205   case $PRINTF in
9206   [\\/]* | ?:[\\/]*)
9207   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9208   ;;
9209   *)
9210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9211 for as_dir in $PATH
9212 do
9213   IFS=$as_save_IFS
9214   test -z "$as_dir" && as_dir=.
9215     for ac_exec_ext in '' $ac_executable_extensions; do
9216   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9217     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9219     break 2
9220   fi
9221 done
9222   done
9223 IFS=$as_save_IFS
9224 
9225   ;;
9226 esac
9227 fi
9228 PRINTF=$ac_cv_path_PRINTF
9229 if test -n "$PRINTF"; then
9230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9231 $as_echo "$PRINTF" >&6; }
9232 else
9233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9234 $as_echo "no" >&6; }
9235 fi
9236 
9237 
9238   test -n "$PRINTF" && break
9239 done
9240 
9241   else
9242     # The variable is set, but is it from the command line or the environment?
9243 
9244     # Try to remove the string !PRINTF! from our list.
9245     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9246     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9247       # If it failed, the variable was not from the command line. Ignore it,
9248       # but warn the user (except for BASH, which is always set by the calling BASH).
9249       if test "xPRINTF" != xBASH; then
9250         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9251 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9252       fi
9253       # Try to locate tool using the code snippet
9254       for ac_prog in printf
9255 do
9256   # Extract the first word of "$ac_prog", so it can be a program name with args.
9257 set dummy $ac_prog; ac_word=$2
9258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9259 $as_echo_n "checking for $ac_word... " >&6; }
9260 if ${ac_cv_path_PRINTF+:} false; then :
9261   $as_echo_n "(cached) " >&6
9262 else
9263   case $PRINTF in
9264   [\\/]* | ?:[\\/]*)
9265   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9266   ;;
9267   *)
9268   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9269 for as_dir in $PATH
9270 do
9271   IFS=$as_save_IFS
9272   test -z "$as_dir" && as_dir=.
9273     for ac_exec_ext in '' $ac_executable_extensions; do
9274   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9275     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9276     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9277     break 2
9278   fi
9279 done
9280   done
9281 IFS=$as_save_IFS
9282 
9283   ;;
9284 esac
9285 fi
9286 PRINTF=$ac_cv_path_PRINTF
9287 if test -n "$PRINTF"; then
9288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9289 $as_echo "$PRINTF" >&6; }
9290 else
9291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9292 $as_echo "no" >&6; }
9293 fi
9294 
9295 
9296   test -n "$PRINTF" && break
9297 done
9298 
9299     else
9300       # If it succeeded, then it was overridden by the user. We will use it
9301       # for the tool.
9302 
9303       # First remove it from the list of overridden variables, so we can test
9304       # for unknown variables in the end.
9305       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9306 
9307       # Check if we try to supply an empty value
9308       if test "x$PRINTF" = x; then
9309         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9310 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9311         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9312 $as_echo_n "checking for PRINTF... " >&6; }
9313         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9314 $as_echo "disabled" >&6; }
9315       else
9316         # Check if the provided tool contains a complete path.
9317         tool_specified="$PRINTF"
9318         tool_basename="${tool_specified##*/}"
9319         if test "x$tool_basename" = "x$tool_specified"; then
9320           # A command without a complete path is provided, search $PATH.
9321           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9322 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9323           # Extract the first word of "$tool_basename", so it can be a program name with args.
9324 set dummy $tool_basename; ac_word=$2
9325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9326 $as_echo_n "checking for $ac_word... " >&6; }
9327 if ${ac_cv_path_PRINTF+:} false; then :
9328   $as_echo_n "(cached) " >&6
9329 else
9330   case $PRINTF in
9331   [\\/]* | ?:[\\/]*)
9332   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9333   ;;
9334   *)
9335   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9336 for as_dir in $PATH
9337 do
9338   IFS=$as_save_IFS
9339   test -z "$as_dir" && as_dir=.
9340     for ac_exec_ext in '' $ac_executable_extensions; do
9341   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9342     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9343     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9344     break 2
9345   fi
9346 done
9347   done
9348 IFS=$as_save_IFS
9349 
9350   ;;
9351 esac
9352 fi
9353 PRINTF=$ac_cv_path_PRINTF
9354 if test -n "$PRINTF"; then
9355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9356 $as_echo "$PRINTF" >&6; }
9357 else
9358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9359 $as_echo "no" >&6; }
9360 fi
9361 
9362 
9363           if test "x$PRINTF" = x; then
9364             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9365           fi
9366         else
9367           # Otherwise we believe it is a complete path. Use it as it is.
9368           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9369 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9370           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9371 $as_echo_n "checking for PRINTF... " >&6; }
9372           if test ! -x "$tool_specified"; then
9373             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9374 $as_echo "not found" >&6; }
9375             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9376           fi
9377           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9378 $as_echo "$tool_specified" >&6; }
9379         fi
9380       fi
9381     fi
9382 
9383   fi
9384 
9385 
9386 
9387   if test "x$PRINTF" = x; then
9388     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9389   fi
9390 
9391 
9392 
9393 
9394 
9395   # Publish this variable in the help.
9396 
9397 
9398   if [ -z "${RM+x}" ]; then
9399     # The variable is not set by user, try to locate tool using the code snippet
9400     for ac_prog in rm
9401 do
9402   # Extract the first word of "$ac_prog", so it can be a program name with args.
9403 set dummy $ac_prog; ac_word=$2
9404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9405 $as_echo_n "checking for $ac_word... " >&6; }
9406 if ${ac_cv_path_RM+:} false; then :
9407   $as_echo_n "(cached) " >&6
9408 else
9409   case $RM in
9410   [\\/]* | ?:[\\/]*)
9411   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9412   ;;
9413   *)
9414   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9415 for as_dir in $PATH
9416 do
9417   IFS=$as_save_IFS
9418   test -z "$as_dir" && as_dir=.
9419     for ac_exec_ext in '' $ac_executable_extensions; do
9420   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9421     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9423     break 2
9424   fi
9425 done
9426   done
9427 IFS=$as_save_IFS
9428 
9429   ;;
9430 esac
9431 fi
9432 RM=$ac_cv_path_RM
9433 if test -n "$RM"; then
9434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9435 $as_echo "$RM" >&6; }
9436 else
9437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9438 $as_echo "no" >&6; }
9439 fi
9440 
9441 
9442   test -n "$RM" && break
9443 done
9444 
9445   else
9446     # The variable is set, but is it from the command line or the environment?
9447 
9448     # Try to remove the string !RM! from our list.
9449     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9450     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9451       # If it failed, the variable was not from the command line. Ignore it,
9452       # but warn the user (except for BASH, which is always set by the calling BASH).
9453       if test "xRM" != xBASH; then
9454         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9455 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9456       fi
9457       # Try to locate tool using the code snippet
9458       for ac_prog in rm
9459 do
9460   # Extract the first word of "$ac_prog", so it can be a program name with args.
9461 set dummy $ac_prog; ac_word=$2
9462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9463 $as_echo_n "checking for $ac_word... " >&6; }
9464 if ${ac_cv_path_RM+:} false; then :
9465   $as_echo_n "(cached) " >&6
9466 else
9467   case $RM in
9468   [\\/]* | ?:[\\/]*)
9469   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9470   ;;
9471   *)
9472   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9473 for as_dir in $PATH
9474 do
9475   IFS=$as_save_IFS
9476   test -z "$as_dir" && as_dir=.
9477     for ac_exec_ext in '' $ac_executable_extensions; do
9478   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9479     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9480     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9481     break 2
9482   fi
9483 done
9484   done
9485 IFS=$as_save_IFS
9486 
9487   ;;
9488 esac
9489 fi
9490 RM=$ac_cv_path_RM
9491 if test -n "$RM"; then
9492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9493 $as_echo "$RM" >&6; }
9494 else
9495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9496 $as_echo "no" >&6; }
9497 fi
9498 
9499 
9500   test -n "$RM" && break
9501 done
9502 
9503     else
9504       # If it succeeded, then it was overridden by the user. We will use it
9505       # for the tool.
9506 
9507       # First remove it from the list of overridden variables, so we can test
9508       # for unknown variables in the end.
9509       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9510 
9511       # Check if we try to supply an empty value
9512       if test "x$RM" = x; then
9513         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9514 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9515         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9516 $as_echo_n "checking for RM... " >&6; }
9517         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9518 $as_echo "disabled" >&6; }
9519       else
9520         # Check if the provided tool contains a complete path.
9521         tool_specified="$RM"
9522         tool_basename="${tool_specified##*/}"
9523         if test "x$tool_basename" = "x$tool_specified"; then
9524           # A command without a complete path is provided, search $PATH.
9525           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9526 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9527           # Extract the first word of "$tool_basename", so it can be a program name with args.
9528 set dummy $tool_basename; ac_word=$2
9529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9530 $as_echo_n "checking for $ac_word... " >&6; }
9531 if ${ac_cv_path_RM+:} false; then :
9532   $as_echo_n "(cached) " >&6
9533 else
9534   case $RM in
9535   [\\/]* | ?:[\\/]*)
9536   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9537   ;;
9538   *)
9539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9540 for as_dir in $PATH
9541 do
9542   IFS=$as_save_IFS
9543   test -z "$as_dir" && as_dir=.
9544     for ac_exec_ext in '' $ac_executable_extensions; do
9545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9546     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9548     break 2
9549   fi
9550 done
9551   done
9552 IFS=$as_save_IFS
9553 
9554   ;;
9555 esac
9556 fi
9557 RM=$ac_cv_path_RM
9558 if test -n "$RM"; then
9559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9560 $as_echo "$RM" >&6; }
9561 else
9562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9563 $as_echo "no" >&6; }
9564 fi
9565 
9566 
9567           if test "x$RM" = x; then
9568             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9569           fi
9570         else
9571           # Otherwise we believe it is a complete path. Use it as it is.
9572           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9573 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9574           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9575 $as_echo_n "checking for RM... " >&6; }
9576           if test ! -x "$tool_specified"; then
9577             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9578 $as_echo "not found" >&6; }
9579             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9580           fi
9581           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9582 $as_echo "$tool_specified" >&6; }
9583         fi
9584       fi
9585     fi
9586 
9587   fi
9588 
9589 
9590 
9591   if test "x$RM" = x; then
9592     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9593   fi
9594 
9595 
9596 
9597 
9598 
9599   # Publish this variable in the help.
9600 
9601 
9602   if [ -z "${RMDIR+x}" ]; then
9603     # The variable is not set by user, try to locate tool using the code snippet
9604     for ac_prog in rmdir
9605 do
9606   # Extract the first word of "$ac_prog", so it can be a program name with args.
9607 set dummy $ac_prog; ac_word=$2
9608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9609 $as_echo_n "checking for $ac_word... " >&6; }
9610 if ${ac_cv_path_RMDIR+:} false; then :
9611   $as_echo_n "(cached) " >&6
9612 else
9613   case $RMDIR in
9614   [\\/]* | ?:[\\/]*)
9615   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9616   ;;
9617   *)
9618   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9619 for as_dir in $PATH
9620 do
9621   IFS=$as_save_IFS
9622   test -z "$as_dir" && as_dir=.
9623     for ac_exec_ext in '' $ac_executable_extensions; do
9624   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9625     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9626     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9627     break 2
9628   fi
9629 done
9630   done
9631 IFS=$as_save_IFS
9632 
9633   ;;
9634 esac
9635 fi
9636 RMDIR=$ac_cv_path_RMDIR
9637 if test -n "$RMDIR"; then
9638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9639 $as_echo "$RMDIR" >&6; }
9640 else
9641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9642 $as_echo "no" >&6; }
9643 fi
9644 
9645 
9646   test -n "$RMDIR" && break
9647 done
9648 
9649   else
9650     # The variable is set, but is it from the command line or the environment?
9651 
9652     # Try to remove the string !RMDIR! from our list.
9653     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9654     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9655       # If it failed, the variable was not from the command line. Ignore it,
9656       # but warn the user (except for BASH, which is always set by the calling BASH).
9657       if test "xRMDIR" != xBASH; then
9658         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9659 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9660       fi
9661       # Try to locate tool using the code snippet
9662       for ac_prog in rmdir
9663 do
9664   # Extract the first word of "$ac_prog", so it can be a program name with args.
9665 set dummy $ac_prog; ac_word=$2
9666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9667 $as_echo_n "checking for $ac_word... " >&6; }
9668 if ${ac_cv_path_RMDIR+:} false; then :
9669   $as_echo_n "(cached) " >&6
9670 else
9671   case $RMDIR in
9672   [\\/]* | ?:[\\/]*)
9673   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9674   ;;
9675   *)
9676   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9677 for as_dir in $PATH
9678 do
9679   IFS=$as_save_IFS
9680   test -z "$as_dir" && as_dir=.
9681     for ac_exec_ext in '' $ac_executable_extensions; do
9682   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9683     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9684     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9685     break 2
9686   fi
9687 done
9688   done
9689 IFS=$as_save_IFS
9690 
9691   ;;
9692 esac
9693 fi
9694 RMDIR=$ac_cv_path_RMDIR
9695 if test -n "$RMDIR"; then
9696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9697 $as_echo "$RMDIR" >&6; }
9698 else
9699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9700 $as_echo "no" >&6; }
9701 fi
9702 
9703 
9704   test -n "$RMDIR" && break
9705 done
9706 
9707     else
9708       # If it succeeded, then it was overridden by the user. We will use it
9709       # for the tool.
9710 
9711       # First remove it from the list of overridden variables, so we can test
9712       # for unknown variables in the end.
9713       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9714 
9715       # Check if we try to supply an empty value
9716       if test "x$RMDIR" = x; then
9717         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9718 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9719         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9720 $as_echo_n "checking for RMDIR... " >&6; }
9721         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9722 $as_echo "disabled" >&6; }
9723       else
9724         # Check if the provided tool contains a complete path.
9725         tool_specified="$RMDIR"
9726         tool_basename="${tool_specified##*/}"
9727         if test "x$tool_basename" = "x$tool_specified"; then
9728           # A command without a complete path is provided, search $PATH.
9729           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9730 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9731           # Extract the first word of "$tool_basename", so it can be a program name with args.
9732 set dummy $tool_basename; ac_word=$2
9733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9734 $as_echo_n "checking for $ac_word... " >&6; }
9735 if ${ac_cv_path_RMDIR+:} false; then :
9736   $as_echo_n "(cached) " >&6
9737 else
9738   case $RMDIR in
9739   [\\/]* | ?:[\\/]*)
9740   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9741   ;;
9742   *)
9743   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9744 for as_dir in $PATH
9745 do
9746   IFS=$as_save_IFS
9747   test -z "$as_dir" && as_dir=.
9748     for ac_exec_ext in '' $ac_executable_extensions; do
9749   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9750     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9751     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9752     break 2
9753   fi
9754 done
9755   done
9756 IFS=$as_save_IFS
9757 
9758   ;;
9759 esac
9760 fi
9761 RMDIR=$ac_cv_path_RMDIR
9762 if test -n "$RMDIR"; then
9763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9764 $as_echo "$RMDIR" >&6; }
9765 else
9766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9767 $as_echo "no" >&6; }
9768 fi
9769 
9770 
9771           if test "x$RMDIR" = x; then
9772             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9773           fi
9774         else
9775           # Otherwise we believe it is a complete path. Use it as it is.
9776           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9777 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9778           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9779 $as_echo_n "checking for RMDIR... " >&6; }
9780           if test ! -x "$tool_specified"; then
9781             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9782 $as_echo "not found" >&6; }
9783             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9784           fi
9785           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9786 $as_echo "$tool_specified" >&6; }
9787         fi
9788       fi
9789     fi
9790 
9791   fi
9792 
9793 
9794 
9795   if test "x$RMDIR" = x; then
9796     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9797   fi
9798 
9799 
9800 
9801 
9802 
9803   # Publish this variable in the help.
9804 
9805 
9806   if [ -z "${SH+x}" ]; then
9807     # The variable is not set by user, try to locate tool using the code snippet
9808     for ac_prog in sh
9809 do
9810   # Extract the first word of "$ac_prog", so it can be a program name with args.
9811 set dummy $ac_prog; ac_word=$2
9812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9813 $as_echo_n "checking for $ac_word... " >&6; }
9814 if ${ac_cv_path_SH+:} false; then :
9815   $as_echo_n "(cached) " >&6
9816 else
9817   case $SH in
9818   [\\/]* | ?:[\\/]*)
9819   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9820   ;;
9821   *)
9822   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9823 for as_dir in $PATH
9824 do
9825   IFS=$as_save_IFS
9826   test -z "$as_dir" && as_dir=.
9827     for ac_exec_ext in '' $ac_executable_extensions; do
9828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9829     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9831     break 2
9832   fi
9833 done
9834   done
9835 IFS=$as_save_IFS
9836 
9837   ;;
9838 esac
9839 fi
9840 SH=$ac_cv_path_SH
9841 if test -n "$SH"; then
9842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9843 $as_echo "$SH" >&6; }
9844 else
9845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9846 $as_echo "no" >&6; }
9847 fi
9848 
9849 
9850   test -n "$SH" && break
9851 done
9852 
9853   else
9854     # The variable is set, but is it from the command line or the environment?
9855 
9856     # Try to remove the string !SH! from our list.
9857     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9858     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9859       # If it failed, the variable was not from the command line. Ignore it,
9860       # but warn the user (except for BASH, which is always set by the calling BASH).
9861       if test "xSH" != xBASH; then
9862         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9863 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9864       fi
9865       # Try to locate tool using the code snippet
9866       for ac_prog in sh
9867 do
9868   # Extract the first word of "$ac_prog", so it can be a program name with args.
9869 set dummy $ac_prog; ac_word=$2
9870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9871 $as_echo_n "checking for $ac_word... " >&6; }
9872 if ${ac_cv_path_SH+:} false; then :
9873   $as_echo_n "(cached) " >&6
9874 else
9875   case $SH in
9876   [\\/]* | ?:[\\/]*)
9877   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9878   ;;
9879   *)
9880   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9881 for as_dir in $PATH
9882 do
9883   IFS=$as_save_IFS
9884   test -z "$as_dir" && as_dir=.
9885     for ac_exec_ext in '' $ac_executable_extensions; do
9886   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9887     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9888     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9889     break 2
9890   fi
9891 done
9892   done
9893 IFS=$as_save_IFS
9894 
9895   ;;
9896 esac
9897 fi
9898 SH=$ac_cv_path_SH
9899 if test -n "$SH"; then
9900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9901 $as_echo "$SH" >&6; }
9902 else
9903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9904 $as_echo "no" >&6; }
9905 fi
9906 
9907 
9908   test -n "$SH" && break
9909 done
9910 
9911     else
9912       # If it succeeded, then it was overridden by the user. We will use it
9913       # for the tool.
9914 
9915       # First remove it from the list of overridden variables, so we can test
9916       # for unknown variables in the end.
9917       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9918 
9919       # Check if we try to supply an empty value
9920       if test "x$SH" = x; then
9921         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9922 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9923         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9924 $as_echo_n "checking for SH... " >&6; }
9925         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9926 $as_echo "disabled" >&6; }
9927       else
9928         # Check if the provided tool contains a complete path.
9929         tool_specified="$SH"
9930         tool_basename="${tool_specified##*/}"
9931         if test "x$tool_basename" = "x$tool_specified"; then
9932           # A command without a complete path is provided, search $PATH.
9933           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9934 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9935           # Extract the first word of "$tool_basename", so it can be a program name with args.
9936 set dummy $tool_basename; ac_word=$2
9937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9938 $as_echo_n "checking for $ac_word... " >&6; }
9939 if ${ac_cv_path_SH+:} false; then :
9940   $as_echo_n "(cached) " >&6
9941 else
9942   case $SH in
9943   [\\/]* | ?:[\\/]*)
9944   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9945   ;;
9946   *)
9947   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9948 for as_dir in $PATH
9949 do
9950   IFS=$as_save_IFS
9951   test -z "$as_dir" && as_dir=.
9952     for ac_exec_ext in '' $ac_executable_extensions; do
9953   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9954     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9955     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9956     break 2
9957   fi
9958 done
9959   done
9960 IFS=$as_save_IFS
9961 
9962   ;;
9963 esac
9964 fi
9965 SH=$ac_cv_path_SH
9966 if test -n "$SH"; then
9967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9968 $as_echo "$SH" >&6; }
9969 else
9970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9971 $as_echo "no" >&6; }
9972 fi
9973 
9974 
9975           if test "x$SH" = x; then
9976             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9977           fi
9978         else
9979           # Otherwise we believe it is a complete path. Use it as it is.
9980           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9981 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9982           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9983 $as_echo_n "checking for SH... " >&6; }
9984           if test ! -x "$tool_specified"; then
9985             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9986 $as_echo "not found" >&6; }
9987             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9988           fi
9989           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9990 $as_echo "$tool_specified" >&6; }
9991         fi
9992       fi
9993     fi
9994 
9995   fi
9996 
9997 
9998 
9999   if test "x$SH" = x; then
10000     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10001   fi
10002 
10003 
10004 
10005 
10006 
10007   # Publish this variable in the help.
10008 
10009 
10010   if [ -z "${SORT+x}" ]; then
10011     # The variable is not set by user, try to locate tool using the code snippet
10012     for ac_prog in sort
10013 do
10014   # Extract the first word of "$ac_prog", so it can be a program name with args.
10015 set dummy $ac_prog; ac_word=$2
10016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10017 $as_echo_n "checking for $ac_word... " >&6; }
10018 if ${ac_cv_path_SORT+:} false; then :
10019   $as_echo_n "(cached) " >&6
10020 else
10021   case $SORT in
10022   [\\/]* | ?:[\\/]*)
10023   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10024   ;;
10025   *)
10026   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10027 for as_dir in $PATH
10028 do
10029   IFS=$as_save_IFS
10030   test -z "$as_dir" && as_dir=.
10031     for ac_exec_ext in '' $ac_executable_extensions; do
10032   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10033     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10034     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10035     break 2
10036   fi
10037 done
10038   done
10039 IFS=$as_save_IFS
10040 
10041   ;;
10042 esac
10043 fi
10044 SORT=$ac_cv_path_SORT
10045 if test -n "$SORT"; then
10046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10047 $as_echo "$SORT" >&6; }
10048 else
10049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10050 $as_echo "no" >&6; }
10051 fi
10052 
10053 
10054   test -n "$SORT" && break
10055 done
10056 
10057   else
10058     # The variable is set, but is it from the command line or the environment?
10059 
10060     # Try to remove the string !SORT! from our list.
10061     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10062     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10063       # If it failed, the variable was not from the command line. Ignore it,
10064       # but warn the user (except for BASH, which is always set by the calling BASH).
10065       if test "xSORT" != xBASH; then
10066         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10067 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10068       fi
10069       # Try to locate tool using the code snippet
10070       for ac_prog in sort
10071 do
10072   # Extract the first word of "$ac_prog", so it can be a program name with args.
10073 set dummy $ac_prog; ac_word=$2
10074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10075 $as_echo_n "checking for $ac_word... " >&6; }
10076 if ${ac_cv_path_SORT+:} false; then :
10077   $as_echo_n "(cached) " >&6
10078 else
10079   case $SORT in
10080   [\\/]* | ?:[\\/]*)
10081   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10082   ;;
10083   *)
10084   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10085 for as_dir in $PATH
10086 do
10087   IFS=$as_save_IFS
10088   test -z "$as_dir" && as_dir=.
10089     for ac_exec_ext in '' $ac_executable_extensions; do
10090   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10091     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10092     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10093     break 2
10094   fi
10095 done
10096   done
10097 IFS=$as_save_IFS
10098 
10099   ;;
10100 esac
10101 fi
10102 SORT=$ac_cv_path_SORT
10103 if test -n "$SORT"; then
10104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10105 $as_echo "$SORT" >&6; }
10106 else
10107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10108 $as_echo "no" >&6; }
10109 fi
10110 
10111 
10112   test -n "$SORT" && break
10113 done
10114 
10115     else
10116       # If it succeeded, then it was overridden by the user. We will use it
10117       # for the tool.
10118 
10119       # First remove it from the list of overridden variables, so we can test
10120       # for unknown variables in the end.
10121       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10122 
10123       # Check if we try to supply an empty value
10124       if test "x$SORT" = x; then
10125         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10126 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10127         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10128 $as_echo_n "checking for SORT... " >&6; }
10129         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10130 $as_echo "disabled" >&6; }
10131       else
10132         # Check if the provided tool contains a complete path.
10133         tool_specified="$SORT"
10134         tool_basename="${tool_specified##*/}"
10135         if test "x$tool_basename" = "x$tool_specified"; then
10136           # A command without a complete path is provided, search $PATH.
10137           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10138 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10139           # Extract the first word of "$tool_basename", so it can be a program name with args.
10140 set dummy $tool_basename; ac_word=$2
10141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10142 $as_echo_n "checking for $ac_word... " >&6; }
10143 if ${ac_cv_path_SORT+:} false; then :
10144   $as_echo_n "(cached) " >&6
10145 else
10146   case $SORT in
10147   [\\/]* | ?:[\\/]*)
10148   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10149   ;;
10150   *)
10151   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10152 for as_dir in $PATH
10153 do
10154   IFS=$as_save_IFS
10155   test -z "$as_dir" && as_dir=.
10156     for ac_exec_ext in '' $ac_executable_extensions; do
10157   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10158     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10160     break 2
10161   fi
10162 done
10163   done
10164 IFS=$as_save_IFS
10165 
10166   ;;
10167 esac
10168 fi
10169 SORT=$ac_cv_path_SORT
10170 if test -n "$SORT"; then
10171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10172 $as_echo "$SORT" >&6; }
10173 else
10174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10175 $as_echo "no" >&6; }
10176 fi
10177 
10178 
10179           if test "x$SORT" = x; then
10180             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10181           fi
10182         else
10183           # Otherwise we believe it is a complete path. Use it as it is.
10184           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10185 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10186           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10187 $as_echo_n "checking for SORT... " >&6; }
10188           if test ! -x "$tool_specified"; then
10189             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10190 $as_echo "not found" >&6; }
10191             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10192           fi
10193           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10194 $as_echo "$tool_specified" >&6; }
10195         fi
10196       fi
10197     fi
10198 
10199   fi
10200 
10201 
10202 
10203   if test "x$SORT" = x; then
10204     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10205   fi
10206 
10207 
10208 
10209 
10210 
10211   # Publish this variable in the help.
10212 
10213 
10214   if [ -z "${TAIL+x}" ]; then
10215     # The variable is not set by user, try to locate tool using the code snippet
10216     for ac_prog in tail
10217 do
10218   # Extract the first word of "$ac_prog", so it can be a program name with args.
10219 set dummy $ac_prog; ac_word=$2
10220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10221 $as_echo_n "checking for $ac_word... " >&6; }
10222 if ${ac_cv_path_TAIL+:} false; then :
10223   $as_echo_n "(cached) " >&6
10224 else
10225   case $TAIL in
10226   [\\/]* | ?:[\\/]*)
10227   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10228   ;;
10229   *)
10230   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10231 for as_dir in $PATH
10232 do
10233   IFS=$as_save_IFS
10234   test -z "$as_dir" && as_dir=.
10235     for ac_exec_ext in '' $ac_executable_extensions; do
10236   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10237     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10238     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10239     break 2
10240   fi
10241 done
10242   done
10243 IFS=$as_save_IFS
10244 
10245   ;;
10246 esac
10247 fi
10248 TAIL=$ac_cv_path_TAIL
10249 if test -n "$TAIL"; then
10250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10251 $as_echo "$TAIL" >&6; }
10252 else
10253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10254 $as_echo "no" >&6; }
10255 fi
10256 
10257 
10258   test -n "$TAIL" && break
10259 done
10260 
10261   else
10262     # The variable is set, but is it from the command line or the environment?
10263 
10264     # Try to remove the string !TAIL! from our list.
10265     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10266     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10267       # If it failed, the variable was not from the command line. Ignore it,
10268       # but warn the user (except for BASH, which is always set by the calling BASH).
10269       if test "xTAIL" != xBASH; then
10270         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10271 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10272       fi
10273       # Try to locate tool using the code snippet
10274       for ac_prog in tail
10275 do
10276   # Extract the first word of "$ac_prog", so it can be a program name with args.
10277 set dummy $ac_prog; ac_word=$2
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10279 $as_echo_n "checking for $ac_word... " >&6; }
10280 if ${ac_cv_path_TAIL+:} false; then :
10281   $as_echo_n "(cached) " >&6
10282 else
10283   case $TAIL in
10284   [\\/]* | ?:[\\/]*)
10285   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10286   ;;
10287   *)
10288   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10289 for as_dir in $PATH
10290 do
10291   IFS=$as_save_IFS
10292   test -z "$as_dir" && as_dir=.
10293     for ac_exec_ext in '' $ac_executable_extensions; do
10294   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10295     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10296     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10297     break 2
10298   fi
10299 done
10300   done
10301 IFS=$as_save_IFS
10302 
10303   ;;
10304 esac
10305 fi
10306 TAIL=$ac_cv_path_TAIL
10307 if test -n "$TAIL"; then
10308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10309 $as_echo "$TAIL" >&6; }
10310 else
10311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10312 $as_echo "no" >&6; }
10313 fi
10314 
10315 
10316   test -n "$TAIL" && break
10317 done
10318 
10319     else
10320       # If it succeeded, then it was overridden by the user. We will use it
10321       # for the tool.
10322 
10323       # First remove it from the list of overridden variables, so we can test
10324       # for unknown variables in the end.
10325       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10326 
10327       # Check if we try to supply an empty value
10328       if test "x$TAIL" = x; then
10329         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10330 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10331         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10332 $as_echo_n "checking for TAIL... " >&6; }
10333         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10334 $as_echo "disabled" >&6; }
10335       else
10336         # Check if the provided tool contains a complete path.
10337         tool_specified="$TAIL"
10338         tool_basename="${tool_specified##*/}"
10339         if test "x$tool_basename" = "x$tool_specified"; then
10340           # A command without a complete path is provided, search $PATH.
10341           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10342 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10343           # Extract the first word of "$tool_basename", so it can be a program name with args.
10344 set dummy $tool_basename; ac_word=$2
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10346 $as_echo_n "checking for $ac_word... " >&6; }
10347 if ${ac_cv_path_TAIL+:} false; then :
10348   $as_echo_n "(cached) " >&6
10349 else
10350   case $TAIL in
10351   [\\/]* | ?:[\\/]*)
10352   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10353   ;;
10354   *)
10355   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10356 for as_dir in $PATH
10357 do
10358   IFS=$as_save_IFS
10359   test -z "$as_dir" && as_dir=.
10360     for ac_exec_ext in '' $ac_executable_extensions; do
10361   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10362     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10363     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10364     break 2
10365   fi
10366 done
10367   done
10368 IFS=$as_save_IFS
10369 
10370   ;;
10371 esac
10372 fi
10373 TAIL=$ac_cv_path_TAIL
10374 if test -n "$TAIL"; then
10375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10376 $as_echo "$TAIL" >&6; }
10377 else
10378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10379 $as_echo "no" >&6; }
10380 fi
10381 
10382 
10383           if test "x$TAIL" = x; then
10384             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10385           fi
10386         else
10387           # Otherwise we believe it is a complete path. Use it as it is.
10388           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10389 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10390           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10391 $as_echo_n "checking for TAIL... " >&6; }
10392           if test ! -x "$tool_specified"; then
10393             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10394 $as_echo "not found" >&6; }
10395             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10396           fi
10397           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10398 $as_echo "$tool_specified" >&6; }
10399         fi
10400       fi
10401     fi
10402 
10403   fi
10404 
10405 
10406 
10407   if test "x$TAIL" = x; then
10408     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10409   fi
10410 
10411 
10412 
10413 
10414 
10415   # Publish this variable in the help.
10416 
10417 
10418   if [ -z "${TAR+x}" ]; then
10419     # The variable is not set by user, try to locate tool using the code snippet
10420     for ac_prog in tar
10421 do
10422   # Extract the first word of "$ac_prog", so it can be a program name with args.
10423 set dummy $ac_prog; ac_word=$2
10424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10425 $as_echo_n "checking for $ac_word... " >&6; }
10426 if ${ac_cv_path_TAR+:} false; then :
10427   $as_echo_n "(cached) " >&6
10428 else
10429   case $TAR in
10430   [\\/]* | ?:[\\/]*)
10431   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10432   ;;
10433   *)
10434   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10435 for as_dir in $PATH
10436 do
10437   IFS=$as_save_IFS
10438   test -z "$as_dir" && as_dir=.
10439     for ac_exec_ext in '' $ac_executable_extensions; do
10440   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10441     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10442     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10443     break 2
10444   fi
10445 done
10446   done
10447 IFS=$as_save_IFS
10448 
10449   ;;
10450 esac
10451 fi
10452 TAR=$ac_cv_path_TAR
10453 if test -n "$TAR"; then
10454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10455 $as_echo "$TAR" >&6; }
10456 else
10457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10458 $as_echo "no" >&6; }
10459 fi
10460 
10461 
10462   test -n "$TAR" && break
10463 done
10464 
10465   else
10466     # The variable is set, but is it from the command line or the environment?
10467 
10468     # Try to remove the string !TAR! from our list.
10469     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10470     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10471       # If it failed, the variable was not from the command line. Ignore it,
10472       # but warn the user (except for BASH, which is always set by the calling BASH).
10473       if test "xTAR" != xBASH; then
10474         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10475 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10476       fi
10477       # Try to locate tool using the code snippet
10478       for ac_prog in tar
10479 do
10480   # Extract the first word of "$ac_prog", so it can be a program name with args.
10481 set dummy $ac_prog; ac_word=$2
10482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10483 $as_echo_n "checking for $ac_word... " >&6; }
10484 if ${ac_cv_path_TAR+:} false; then :
10485   $as_echo_n "(cached) " >&6
10486 else
10487   case $TAR in
10488   [\\/]* | ?:[\\/]*)
10489   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10490   ;;
10491   *)
10492   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10493 for as_dir in $PATH
10494 do
10495   IFS=$as_save_IFS
10496   test -z "$as_dir" && as_dir=.
10497     for ac_exec_ext in '' $ac_executable_extensions; do
10498   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10499     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10500     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10501     break 2
10502   fi
10503 done
10504   done
10505 IFS=$as_save_IFS
10506 
10507   ;;
10508 esac
10509 fi
10510 TAR=$ac_cv_path_TAR
10511 if test -n "$TAR"; then
10512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10513 $as_echo "$TAR" >&6; }
10514 else
10515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10516 $as_echo "no" >&6; }
10517 fi
10518 
10519 
10520   test -n "$TAR" && break
10521 done
10522 
10523     else
10524       # If it succeeded, then it was overridden by the user. We will use it
10525       # for the tool.
10526 
10527       # First remove it from the list of overridden variables, so we can test
10528       # for unknown variables in the end.
10529       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10530 
10531       # Check if we try to supply an empty value
10532       if test "x$TAR" = x; then
10533         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10534 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10535         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10536 $as_echo_n "checking for TAR... " >&6; }
10537         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10538 $as_echo "disabled" >&6; }
10539       else
10540         # Check if the provided tool contains a complete path.
10541         tool_specified="$TAR"
10542         tool_basename="${tool_specified##*/}"
10543         if test "x$tool_basename" = "x$tool_specified"; then
10544           # A command without a complete path is provided, search $PATH.
10545           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10546 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10547           # Extract the first word of "$tool_basename", so it can be a program name with args.
10548 set dummy $tool_basename; ac_word=$2
10549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10550 $as_echo_n "checking for $ac_word... " >&6; }
10551 if ${ac_cv_path_TAR+:} false; then :
10552   $as_echo_n "(cached) " >&6
10553 else
10554   case $TAR in
10555   [\\/]* | ?:[\\/]*)
10556   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10557   ;;
10558   *)
10559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10560 for as_dir in $PATH
10561 do
10562   IFS=$as_save_IFS
10563   test -z "$as_dir" && as_dir=.
10564     for ac_exec_ext in '' $ac_executable_extensions; do
10565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10566     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10568     break 2
10569   fi
10570 done
10571   done
10572 IFS=$as_save_IFS
10573 
10574   ;;
10575 esac
10576 fi
10577 TAR=$ac_cv_path_TAR
10578 if test -n "$TAR"; then
10579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10580 $as_echo "$TAR" >&6; }
10581 else
10582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10583 $as_echo "no" >&6; }
10584 fi
10585 
10586 
10587           if test "x$TAR" = x; then
10588             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10589           fi
10590         else
10591           # Otherwise we believe it is a complete path. Use it as it is.
10592           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10593 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10594           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10595 $as_echo_n "checking for TAR... " >&6; }
10596           if test ! -x "$tool_specified"; then
10597             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10598 $as_echo "not found" >&6; }
10599             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10600           fi
10601           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10602 $as_echo "$tool_specified" >&6; }
10603         fi
10604       fi
10605     fi
10606 
10607   fi
10608 
10609 
10610 
10611   if test "x$TAR" = x; then
10612     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10613   fi
10614 
10615 
10616 
10617 
10618 
10619   # Publish this variable in the help.
10620 
10621 
10622   if [ -z "${TEE+x}" ]; then
10623     # The variable is not set by user, try to locate tool using the code snippet
10624     for ac_prog in tee
10625 do
10626   # Extract the first word of "$ac_prog", so it can be a program name with args.
10627 set dummy $ac_prog; ac_word=$2
10628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10629 $as_echo_n "checking for $ac_word... " >&6; }
10630 if ${ac_cv_path_TEE+:} false; then :
10631   $as_echo_n "(cached) " >&6
10632 else
10633   case $TEE in
10634   [\\/]* | ?:[\\/]*)
10635   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10636   ;;
10637   *)
10638   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10639 for as_dir in $PATH
10640 do
10641   IFS=$as_save_IFS
10642   test -z "$as_dir" && as_dir=.
10643     for ac_exec_ext in '' $ac_executable_extensions; do
10644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10645     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10647     break 2
10648   fi
10649 done
10650   done
10651 IFS=$as_save_IFS
10652 
10653   ;;
10654 esac
10655 fi
10656 TEE=$ac_cv_path_TEE
10657 if test -n "$TEE"; then
10658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10659 $as_echo "$TEE" >&6; }
10660 else
10661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10662 $as_echo "no" >&6; }
10663 fi
10664 
10665 
10666   test -n "$TEE" && break
10667 done
10668 
10669   else
10670     # The variable is set, but is it from the command line or the environment?
10671 
10672     # Try to remove the string !TEE! from our list.
10673     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10674     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10675       # If it failed, the variable was not from the command line. Ignore it,
10676       # but warn the user (except for BASH, which is always set by the calling BASH).
10677       if test "xTEE" != xBASH; then
10678         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10679 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10680       fi
10681       # Try to locate tool using the code snippet
10682       for ac_prog in tee
10683 do
10684   # Extract the first word of "$ac_prog", so it can be a program name with args.
10685 set dummy $ac_prog; ac_word=$2
10686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10687 $as_echo_n "checking for $ac_word... " >&6; }
10688 if ${ac_cv_path_TEE+:} false; then :
10689   $as_echo_n "(cached) " >&6
10690 else
10691   case $TEE in
10692   [\\/]* | ?:[\\/]*)
10693   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10694   ;;
10695   *)
10696   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10697 for as_dir in $PATH
10698 do
10699   IFS=$as_save_IFS
10700   test -z "$as_dir" && as_dir=.
10701     for ac_exec_ext in '' $ac_executable_extensions; do
10702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10703     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10705     break 2
10706   fi
10707 done
10708   done
10709 IFS=$as_save_IFS
10710 
10711   ;;
10712 esac
10713 fi
10714 TEE=$ac_cv_path_TEE
10715 if test -n "$TEE"; then
10716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10717 $as_echo "$TEE" >&6; }
10718 else
10719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10720 $as_echo "no" >&6; }
10721 fi
10722 
10723 
10724   test -n "$TEE" && break
10725 done
10726 
10727     else
10728       # If it succeeded, then it was overridden by the user. We will use it
10729       # for the tool.
10730 
10731       # First remove it from the list of overridden variables, so we can test
10732       # for unknown variables in the end.
10733       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10734 
10735       # Check if we try to supply an empty value
10736       if test "x$TEE" = x; then
10737         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10738 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10739         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10740 $as_echo_n "checking for TEE... " >&6; }
10741         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10742 $as_echo "disabled" >&6; }
10743       else
10744         # Check if the provided tool contains a complete path.
10745         tool_specified="$TEE"
10746         tool_basename="${tool_specified##*/}"
10747         if test "x$tool_basename" = "x$tool_specified"; then
10748           # A command without a complete path is provided, search $PATH.
10749           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10750 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10751           # Extract the first word of "$tool_basename", so it can be a program name with args.
10752 set dummy $tool_basename; ac_word=$2
10753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10754 $as_echo_n "checking for $ac_word... " >&6; }
10755 if ${ac_cv_path_TEE+:} false; then :
10756   $as_echo_n "(cached) " >&6
10757 else
10758   case $TEE in
10759   [\\/]* | ?:[\\/]*)
10760   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10761   ;;
10762   *)
10763   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10764 for as_dir in $PATH
10765 do
10766   IFS=$as_save_IFS
10767   test -z "$as_dir" && as_dir=.
10768     for ac_exec_ext in '' $ac_executable_extensions; do
10769   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10770     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10771     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10772     break 2
10773   fi
10774 done
10775   done
10776 IFS=$as_save_IFS
10777 
10778   ;;
10779 esac
10780 fi
10781 TEE=$ac_cv_path_TEE
10782 if test -n "$TEE"; then
10783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10784 $as_echo "$TEE" >&6; }
10785 else
10786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10787 $as_echo "no" >&6; }
10788 fi
10789 
10790 
10791           if test "x$TEE" = x; then
10792             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10793           fi
10794         else
10795           # Otherwise we believe it is a complete path. Use it as it is.
10796           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10797 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10798           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10799 $as_echo_n "checking for TEE... " >&6; }
10800           if test ! -x "$tool_specified"; then
10801             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10802 $as_echo "not found" >&6; }
10803             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10804           fi
10805           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10806 $as_echo "$tool_specified" >&6; }
10807         fi
10808       fi
10809     fi
10810 
10811   fi
10812 
10813 
10814 
10815   if test "x$TEE" = x; then
10816     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10817   fi
10818 
10819 
10820 
10821 
10822 
10823   # Publish this variable in the help.
10824 
10825 
10826   if [ -z "${TOUCH+x}" ]; then
10827     # The variable is not set by user, try to locate tool using the code snippet
10828     for ac_prog in touch
10829 do
10830   # Extract the first word of "$ac_prog", so it can be a program name with args.
10831 set dummy $ac_prog; ac_word=$2
10832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10833 $as_echo_n "checking for $ac_word... " >&6; }
10834 if ${ac_cv_path_TOUCH+:} false; then :
10835   $as_echo_n "(cached) " >&6
10836 else
10837   case $TOUCH in
10838   [\\/]* | ?:[\\/]*)
10839   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10840   ;;
10841   *)
10842   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10843 for as_dir in $PATH
10844 do
10845   IFS=$as_save_IFS
10846   test -z "$as_dir" && as_dir=.
10847     for ac_exec_ext in '' $ac_executable_extensions; do
10848   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10849     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10850     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10851     break 2
10852   fi
10853 done
10854   done
10855 IFS=$as_save_IFS
10856 
10857   ;;
10858 esac
10859 fi
10860 TOUCH=$ac_cv_path_TOUCH
10861 if test -n "$TOUCH"; then
10862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10863 $as_echo "$TOUCH" >&6; }
10864 else
10865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10866 $as_echo "no" >&6; }
10867 fi
10868 
10869 
10870   test -n "$TOUCH" && break
10871 done
10872 
10873   else
10874     # The variable is set, but is it from the command line or the environment?
10875 
10876     # Try to remove the string !TOUCH! from our list.
10877     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10878     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10879       # If it failed, the variable was not from the command line. Ignore it,
10880       # but warn the user (except for BASH, which is always set by the calling BASH).
10881       if test "xTOUCH" != xBASH; then
10882         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10883 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10884       fi
10885       # Try to locate tool using the code snippet
10886       for ac_prog in touch
10887 do
10888   # Extract the first word of "$ac_prog", so it can be a program name with args.
10889 set dummy $ac_prog; ac_word=$2
10890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10891 $as_echo_n "checking for $ac_word... " >&6; }
10892 if ${ac_cv_path_TOUCH+:} false; then :
10893   $as_echo_n "(cached) " >&6
10894 else
10895   case $TOUCH in
10896   [\\/]* | ?:[\\/]*)
10897   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10898   ;;
10899   *)
10900   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10901 for as_dir in $PATH
10902 do
10903   IFS=$as_save_IFS
10904   test -z "$as_dir" && as_dir=.
10905     for ac_exec_ext in '' $ac_executable_extensions; do
10906   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10907     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10908     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10909     break 2
10910   fi
10911 done
10912   done
10913 IFS=$as_save_IFS
10914 
10915   ;;
10916 esac
10917 fi
10918 TOUCH=$ac_cv_path_TOUCH
10919 if test -n "$TOUCH"; then
10920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10921 $as_echo "$TOUCH" >&6; }
10922 else
10923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10924 $as_echo "no" >&6; }
10925 fi
10926 
10927 
10928   test -n "$TOUCH" && break
10929 done
10930 
10931     else
10932       # If it succeeded, then it was overridden by the user. We will use it
10933       # for the tool.
10934 
10935       # First remove it from the list of overridden variables, so we can test
10936       # for unknown variables in the end.
10937       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10938 
10939       # Check if we try to supply an empty value
10940       if test "x$TOUCH" = x; then
10941         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
10942 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
10943         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10944 $as_echo_n "checking for TOUCH... " >&6; }
10945         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10946 $as_echo "disabled" >&6; }
10947       else
10948         # Check if the provided tool contains a complete path.
10949         tool_specified="$TOUCH"
10950         tool_basename="${tool_specified##*/}"
10951         if test "x$tool_basename" = "x$tool_specified"; then
10952           # A command without a complete path is provided, search $PATH.
10953           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10954 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10955           # Extract the first word of "$tool_basename", so it can be a program name with args.
10956 set dummy $tool_basename; ac_word=$2
10957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10958 $as_echo_n "checking for $ac_word... " >&6; }
10959 if ${ac_cv_path_TOUCH+:} false; then :
10960   $as_echo_n "(cached) " >&6
10961 else
10962   case $TOUCH in
10963   [\\/]* | ?:[\\/]*)
10964   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10965   ;;
10966   *)
10967   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10968 for as_dir in $PATH
10969 do
10970   IFS=$as_save_IFS
10971   test -z "$as_dir" && as_dir=.
10972     for ac_exec_ext in '' $ac_executable_extensions; do
10973   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10974     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10975     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10976     break 2
10977   fi
10978 done
10979   done
10980 IFS=$as_save_IFS
10981 
10982   ;;
10983 esac
10984 fi
10985 TOUCH=$ac_cv_path_TOUCH
10986 if test -n "$TOUCH"; then
10987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10988 $as_echo "$TOUCH" >&6; }
10989 else
10990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10991 $as_echo "no" >&6; }
10992 fi
10993 
10994 
10995           if test "x$TOUCH" = x; then
10996             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10997           fi
10998         else
10999           # Otherwise we believe it is a complete path. Use it as it is.
11000           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11001 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11002           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11003 $as_echo_n "checking for TOUCH... " >&6; }
11004           if test ! -x "$tool_specified"; then
11005             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11006 $as_echo "not found" >&6; }
11007             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11008           fi
11009           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11010 $as_echo "$tool_specified" >&6; }
11011         fi
11012       fi
11013     fi
11014 
11015   fi
11016 
11017 
11018 
11019   if test "x$TOUCH" = x; then
11020     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11021   fi
11022 
11023 
11024 
11025 
11026 
11027   # Publish this variable in the help.
11028 
11029 
11030   if [ -z "${TR+x}" ]; then
11031     # The variable is not set by user, try to locate tool using the code snippet
11032     for ac_prog in tr
11033 do
11034   # Extract the first word of "$ac_prog", so it can be a program name with args.
11035 set dummy $ac_prog; ac_word=$2
11036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11037 $as_echo_n "checking for $ac_word... " >&6; }
11038 if ${ac_cv_path_TR+:} false; then :
11039   $as_echo_n "(cached) " >&6
11040 else
11041   case $TR in
11042   [\\/]* | ?:[\\/]*)
11043   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11044   ;;
11045   *)
11046   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11047 for as_dir in $PATH
11048 do
11049   IFS=$as_save_IFS
11050   test -z "$as_dir" && as_dir=.
11051     for ac_exec_ext in '' $ac_executable_extensions; do
11052   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11053     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11054     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11055     break 2
11056   fi
11057 done
11058   done
11059 IFS=$as_save_IFS
11060 
11061   ;;
11062 esac
11063 fi
11064 TR=$ac_cv_path_TR
11065 if test -n "$TR"; then
11066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11067 $as_echo "$TR" >&6; }
11068 else
11069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11070 $as_echo "no" >&6; }
11071 fi
11072 
11073 
11074   test -n "$TR" && break
11075 done
11076 
11077   else
11078     # The variable is set, but is it from the command line or the environment?
11079 
11080     # Try to remove the string !TR! from our list.
11081     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11082     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11083       # If it failed, the variable was not from the command line. Ignore it,
11084       # but warn the user (except for BASH, which is always set by the calling BASH).
11085       if test "xTR" != xBASH; then
11086         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11087 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11088       fi
11089       # Try to locate tool using the code snippet
11090       for ac_prog in tr
11091 do
11092   # Extract the first word of "$ac_prog", so it can be a program name with args.
11093 set dummy $ac_prog; ac_word=$2
11094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11095 $as_echo_n "checking for $ac_word... " >&6; }
11096 if ${ac_cv_path_TR+:} false; then :
11097   $as_echo_n "(cached) " >&6
11098 else
11099   case $TR in
11100   [\\/]* | ?:[\\/]*)
11101   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11102   ;;
11103   *)
11104   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11105 for as_dir in $PATH
11106 do
11107   IFS=$as_save_IFS
11108   test -z "$as_dir" && as_dir=.
11109     for ac_exec_ext in '' $ac_executable_extensions; do
11110   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11111     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11112     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11113     break 2
11114   fi
11115 done
11116   done
11117 IFS=$as_save_IFS
11118 
11119   ;;
11120 esac
11121 fi
11122 TR=$ac_cv_path_TR
11123 if test -n "$TR"; then
11124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11125 $as_echo "$TR" >&6; }
11126 else
11127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11128 $as_echo "no" >&6; }
11129 fi
11130 
11131 
11132   test -n "$TR" && break
11133 done
11134 
11135     else
11136       # If it succeeded, then it was overridden by the user. We will use it
11137       # for the tool.
11138 
11139       # First remove it from the list of overridden variables, so we can test
11140       # for unknown variables in the end.
11141       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11142 
11143       # Check if we try to supply an empty value
11144       if test "x$TR" = x; then
11145         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11146 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11147         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11148 $as_echo_n "checking for TR... " >&6; }
11149         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11150 $as_echo "disabled" >&6; }
11151       else
11152         # Check if the provided tool contains a complete path.
11153         tool_specified="$TR"
11154         tool_basename="${tool_specified##*/}"
11155         if test "x$tool_basename" = "x$tool_specified"; then
11156           # A command without a complete path is provided, search $PATH.
11157           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11158 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11159           # Extract the first word of "$tool_basename", so it can be a program name with args.
11160 set dummy $tool_basename; ac_word=$2
11161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11162 $as_echo_n "checking for $ac_word... " >&6; }
11163 if ${ac_cv_path_TR+:} false; then :
11164   $as_echo_n "(cached) " >&6
11165 else
11166   case $TR in
11167   [\\/]* | ?:[\\/]*)
11168   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11169   ;;
11170   *)
11171   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11172 for as_dir in $PATH
11173 do
11174   IFS=$as_save_IFS
11175   test -z "$as_dir" && as_dir=.
11176     for ac_exec_ext in '' $ac_executable_extensions; do
11177   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11178     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11179     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11180     break 2
11181   fi
11182 done
11183   done
11184 IFS=$as_save_IFS
11185 
11186   ;;
11187 esac
11188 fi
11189 TR=$ac_cv_path_TR
11190 if test -n "$TR"; then
11191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11192 $as_echo "$TR" >&6; }
11193 else
11194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11195 $as_echo "no" >&6; }
11196 fi
11197 
11198 
11199           if test "x$TR" = x; then
11200             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11201           fi
11202         else
11203           # Otherwise we believe it is a complete path. Use it as it is.
11204           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11205 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11206           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11207 $as_echo_n "checking for TR... " >&6; }
11208           if test ! -x "$tool_specified"; then
11209             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11210 $as_echo "not found" >&6; }
11211             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11212           fi
11213           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11214 $as_echo "$tool_specified" >&6; }
11215         fi
11216       fi
11217     fi
11218 
11219   fi
11220 
11221 
11222 
11223   if test "x$TR" = x; then
11224     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11225   fi
11226 
11227 
11228 
11229 
11230 
11231   # Publish this variable in the help.
11232 
11233 
11234   if [ -z "${UNAME+x}" ]; then
11235     # The variable is not set by user, try to locate tool using the code snippet
11236     for ac_prog in uname
11237 do
11238   # Extract the first word of "$ac_prog", so it can be a program name with args.
11239 set dummy $ac_prog; ac_word=$2
11240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11241 $as_echo_n "checking for $ac_word... " >&6; }
11242 if ${ac_cv_path_UNAME+:} false; then :
11243   $as_echo_n "(cached) " >&6
11244 else
11245   case $UNAME in
11246   [\\/]* | ?:[\\/]*)
11247   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11248   ;;
11249   *)
11250   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11251 for as_dir in $PATH
11252 do
11253   IFS=$as_save_IFS
11254   test -z "$as_dir" && as_dir=.
11255     for ac_exec_ext in '' $ac_executable_extensions; do
11256   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11257     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11258     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11259     break 2
11260   fi
11261 done
11262   done
11263 IFS=$as_save_IFS
11264 
11265   ;;
11266 esac
11267 fi
11268 UNAME=$ac_cv_path_UNAME
11269 if test -n "$UNAME"; then
11270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11271 $as_echo "$UNAME" >&6; }
11272 else
11273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11274 $as_echo "no" >&6; }
11275 fi
11276 
11277 
11278   test -n "$UNAME" && break
11279 done
11280 
11281   else
11282     # The variable is set, but is it from the command line or the environment?
11283 
11284     # Try to remove the string !UNAME! from our list.
11285     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11286     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11287       # If it failed, the variable was not from the command line. Ignore it,
11288       # but warn the user (except for BASH, which is always set by the calling BASH).
11289       if test "xUNAME" != xBASH; then
11290         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11291 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11292       fi
11293       # Try to locate tool using the code snippet
11294       for ac_prog in uname
11295 do
11296   # Extract the first word of "$ac_prog", so it can be a program name with args.
11297 set dummy $ac_prog; ac_word=$2
11298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11299 $as_echo_n "checking for $ac_word... " >&6; }
11300 if ${ac_cv_path_UNAME+:} false; then :
11301   $as_echo_n "(cached) " >&6
11302 else
11303   case $UNAME in
11304   [\\/]* | ?:[\\/]*)
11305   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11306   ;;
11307   *)
11308   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11309 for as_dir in $PATH
11310 do
11311   IFS=$as_save_IFS
11312   test -z "$as_dir" && as_dir=.
11313     for ac_exec_ext in '' $ac_executable_extensions; do
11314   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11315     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11316     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11317     break 2
11318   fi
11319 done
11320   done
11321 IFS=$as_save_IFS
11322 
11323   ;;
11324 esac
11325 fi
11326 UNAME=$ac_cv_path_UNAME
11327 if test -n "$UNAME"; then
11328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11329 $as_echo "$UNAME" >&6; }
11330 else
11331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11332 $as_echo "no" >&6; }
11333 fi
11334 
11335 
11336   test -n "$UNAME" && break
11337 done
11338 
11339     else
11340       # If it succeeded, then it was overridden by the user. We will use it
11341       # for the tool.
11342 
11343       # First remove it from the list of overridden variables, so we can test
11344       # for unknown variables in the end.
11345       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11346 
11347       # Check if we try to supply an empty value
11348       if test "x$UNAME" = x; then
11349         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11350 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11351         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11352 $as_echo_n "checking for UNAME... " >&6; }
11353         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11354 $as_echo "disabled" >&6; }
11355       else
11356         # Check if the provided tool contains a complete path.
11357         tool_specified="$UNAME"
11358         tool_basename="${tool_specified##*/}"
11359         if test "x$tool_basename" = "x$tool_specified"; then
11360           # A command without a complete path is provided, search $PATH.
11361           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11362 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11363           # Extract the first word of "$tool_basename", so it can be a program name with args.
11364 set dummy $tool_basename; ac_word=$2
11365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11366 $as_echo_n "checking for $ac_word... " >&6; }
11367 if ${ac_cv_path_UNAME+:} false; then :
11368   $as_echo_n "(cached) " >&6
11369 else
11370   case $UNAME in
11371   [\\/]* | ?:[\\/]*)
11372   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11373   ;;
11374   *)
11375   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11376 for as_dir in $PATH
11377 do
11378   IFS=$as_save_IFS
11379   test -z "$as_dir" && as_dir=.
11380     for ac_exec_ext in '' $ac_executable_extensions; do
11381   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11382     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11384     break 2
11385   fi
11386 done
11387   done
11388 IFS=$as_save_IFS
11389 
11390   ;;
11391 esac
11392 fi
11393 UNAME=$ac_cv_path_UNAME
11394 if test -n "$UNAME"; then
11395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11396 $as_echo "$UNAME" >&6; }
11397 else
11398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11399 $as_echo "no" >&6; }
11400 fi
11401 
11402 
11403           if test "x$UNAME" = x; then
11404             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11405           fi
11406         else
11407           # Otherwise we believe it is a complete path. Use it as it is.
11408           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11409 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11410           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11411 $as_echo_n "checking for UNAME... " >&6; }
11412           if test ! -x "$tool_specified"; then
11413             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11414 $as_echo "not found" >&6; }
11415             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11416           fi
11417           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11418 $as_echo "$tool_specified" >&6; }
11419         fi
11420       fi
11421     fi
11422 
11423   fi
11424 
11425 
11426 
11427   if test "x$UNAME" = x; then
11428     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11429   fi
11430 
11431 
11432 
11433 
11434 
11435   # Publish this variable in the help.
11436 
11437 
11438   if [ -z "${UNIQ+x}" ]; then
11439     # The variable is not set by user, try to locate tool using the code snippet
11440     for ac_prog in uniq
11441 do
11442   # Extract the first word of "$ac_prog", so it can be a program name with args.
11443 set dummy $ac_prog; ac_word=$2
11444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11445 $as_echo_n "checking for $ac_word... " >&6; }
11446 if ${ac_cv_path_UNIQ+:} false; then :
11447   $as_echo_n "(cached) " >&6
11448 else
11449   case $UNIQ in
11450   [\\/]* | ?:[\\/]*)
11451   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11452   ;;
11453   *)
11454   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11455 for as_dir in $PATH
11456 do
11457   IFS=$as_save_IFS
11458   test -z "$as_dir" && as_dir=.
11459     for ac_exec_ext in '' $ac_executable_extensions; do
11460   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11461     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11462     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11463     break 2
11464   fi
11465 done
11466   done
11467 IFS=$as_save_IFS
11468 
11469   ;;
11470 esac
11471 fi
11472 UNIQ=$ac_cv_path_UNIQ
11473 if test -n "$UNIQ"; then
11474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11475 $as_echo "$UNIQ" >&6; }
11476 else
11477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11478 $as_echo "no" >&6; }
11479 fi
11480 
11481 
11482   test -n "$UNIQ" && break
11483 done
11484 
11485   else
11486     # The variable is set, but is it from the command line or the environment?
11487 
11488     # Try to remove the string !UNIQ! from our list.
11489     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11490     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11491       # If it failed, the variable was not from the command line. Ignore it,
11492       # but warn the user (except for BASH, which is always set by the calling BASH).
11493       if test "xUNIQ" != xBASH; then
11494         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11495 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11496       fi
11497       # Try to locate tool using the code snippet
11498       for ac_prog in uniq
11499 do
11500   # Extract the first word of "$ac_prog", so it can be a program name with args.
11501 set dummy $ac_prog; ac_word=$2
11502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11503 $as_echo_n "checking for $ac_word... " >&6; }
11504 if ${ac_cv_path_UNIQ+:} false; then :
11505   $as_echo_n "(cached) " >&6
11506 else
11507   case $UNIQ in
11508   [\\/]* | ?:[\\/]*)
11509   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11510   ;;
11511   *)
11512   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11513 for as_dir in $PATH
11514 do
11515   IFS=$as_save_IFS
11516   test -z "$as_dir" && as_dir=.
11517     for ac_exec_ext in '' $ac_executable_extensions; do
11518   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11519     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11520     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11521     break 2
11522   fi
11523 done
11524   done
11525 IFS=$as_save_IFS
11526 
11527   ;;
11528 esac
11529 fi
11530 UNIQ=$ac_cv_path_UNIQ
11531 if test -n "$UNIQ"; then
11532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11533 $as_echo "$UNIQ" >&6; }
11534 else
11535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11536 $as_echo "no" >&6; }
11537 fi
11538 
11539 
11540   test -n "$UNIQ" && break
11541 done
11542 
11543     else
11544       # If it succeeded, then it was overridden by the user. We will use it
11545       # for the tool.
11546 
11547       # First remove it from the list of overridden variables, so we can test
11548       # for unknown variables in the end.
11549       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11550 
11551       # Check if we try to supply an empty value
11552       if test "x$UNIQ" = x; then
11553         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11554 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11555         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11556 $as_echo_n "checking for UNIQ... " >&6; }
11557         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11558 $as_echo "disabled" >&6; }
11559       else
11560         # Check if the provided tool contains a complete path.
11561         tool_specified="$UNIQ"
11562         tool_basename="${tool_specified##*/}"
11563         if test "x$tool_basename" = "x$tool_specified"; then
11564           # A command without a complete path is provided, search $PATH.
11565           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11566 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11567           # Extract the first word of "$tool_basename", so it can be a program name with args.
11568 set dummy $tool_basename; ac_word=$2
11569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11570 $as_echo_n "checking for $ac_word... " >&6; }
11571 if ${ac_cv_path_UNIQ+:} false; then :
11572   $as_echo_n "(cached) " >&6
11573 else
11574   case $UNIQ in
11575   [\\/]* | ?:[\\/]*)
11576   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11577   ;;
11578   *)
11579   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11580 for as_dir in $PATH
11581 do
11582   IFS=$as_save_IFS
11583   test -z "$as_dir" && as_dir=.
11584     for ac_exec_ext in '' $ac_executable_extensions; do
11585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11586     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11588     break 2
11589   fi
11590 done
11591   done
11592 IFS=$as_save_IFS
11593 
11594   ;;
11595 esac
11596 fi
11597 UNIQ=$ac_cv_path_UNIQ
11598 if test -n "$UNIQ"; then
11599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11600 $as_echo "$UNIQ" >&6; }
11601 else
11602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11603 $as_echo "no" >&6; }
11604 fi
11605 
11606 
11607           if test "x$UNIQ" = x; then
11608             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11609           fi
11610         else
11611           # Otherwise we believe it is a complete path. Use it as it is.
11612           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11613 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11614           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11615 $as_echo_n "checking for UNIQ... " >&6; }
11616           if test ! -x "$tool_specified"; then
11617             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11618 $as_echo "not found" >&6; }
11619             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11620           fi
11621           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11622 $as_echo "$tool_specified" >&6; }
11623         fi
11624       fi
11625     fi
11626 
11627   fi
11628 
11629 
11630 
11631   if test "x$UNIQ" = x; then
11632     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11633   fi
11634 
11635 
11636 
11637 
11638 
11639   # Publish this variable in the help.
11640 
11641 
11642   if [ -z "${WC+x}" ]; then
11643     # The variable is not set by user, try to locate tool using the code snippet
11644     for ac_prog in wc
11645 do
11646   # Extract the first word of "$ac_prog", so it can be a program name with args.
11647 set dummy $ac_prog; ac_word=$2
11648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11649 $as_echo_n "checking for $ac_word... " >&6; }
11650 if ${ac_cv_path_WC+:} false; then :
11651   $as_echo_n "(cached) " >&6
11652 else
11653   case $WC in
11654   [\\/]* | ?:[\\/]*)
11655   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11656   ;;
11657   *)
11658   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11659 for as_dir in $PATH
11660 do
11661   IFS=$as_save_IFS
11662   test -z "$as_dir" && as_dir=.
11663     for ac_exec_ext in '' $ac_executable_extensions; do
11664   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11665     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11666     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11667     break 2
11668   fi
11669 done
11670   done
11671 IFS=$as_save_IFS
11672 
11673   ;;
11674 esac
11675 fi
11676 WC=$ac_cv_path_WC
11677 if test -n "$WC"; then
11678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11679 $as_echo "$WC" >&6; }
11680 else
11681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11682 $as_echo "no" >&6; }
11683 fi
11684 
11685 
11686   test -n "$WC" && break
11687 done
11688 
11689   else
11690     # The variable is set, but is it from the command line or the environment?
11691 
11692     # Try to remove the string !WC! from our list.
11693     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11694     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11695       # If it failed, the variable was not from the command line. Ignore it,
11696       # but warn the user (except for BASH, which is always set by the calling BASH).
11697       if test "xWC" != xBASH; then
11698         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11699 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11700       fi
11701       # Try to locate tool using the code snippet
11702       for ac_prog in wc
11703 do
11704   # Extract the first word of "$ac_prog", so it can be a program name with args.
11705 set dummy $ac_prog; ac_word=$2
11706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11707 $as_echo_n "checking for $ac_word... " >&6; }
11708 if ${ac_cv_path_WC+:} false; then :
11709   $as_echo_n "(cached) " >&6
11710 else
11711   case $WC in
11712   [\\/]* | ?:[\\/]*)
11713   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11714   ;;
11715   *)
11716   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11717 for as_dir in $PATH
11718 do
11719   IFS=$as_save_IFS
11720   test -z "$as_dir" && as_dir=.
11721     for ac_exec_ext in '' $ac_executable_extensions; do
11722   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11723     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11725     break 2
11726   fi
11727 done
11728   done
11729 IFS=$as_save_IFS
11730 
11731   ;;
11732 esac
11733 fi
11734 WC=$ac_cv_path_WC
11735 if test -n "$WC"; then
11736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11737 $as_echo "$WC" >&6; }
11738 else
11739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11740 $as_echo "no" >&6; }
11741 fi
11742 
11743 
11744   test -n "$WC" && break
11745 done
11746 
11747     else
11748       # If it succeeded, then it was overridden by the user. We will use it
11749       # for the tool.
11750 
11751       # First remove it from the list of overridden variables, so we can test
11752       # for unknown variables in the end.
11753       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11754 
11755       # Check if we try to supply an empty value
11756       if test "x$WC" = x; then
11757         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11758 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11759         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11760 $as_echo_n "checking for WC... " >&6; }
11761         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11762 $as_echo "disabled" >&6; }
11763       else
11764         # Check if the provided tool contains a complete path.
11765         tool_specified="$WC"
11766         tool_basename="${tool_specified##*/}"
11767         if test "x$tool_basename" = "x$tool_specified"; then
11768           # A command without a complete path is provided, search $PATH.
11769           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11770 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11771           # Extract the first word of "$tool_basename", so it can be a program name with args.
11772 set dummy $tool_basename; ac_word=$2
11773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11774 $as_echo_n "checking for $ac_word... " >&6; }
11775 if ${ac_cv_path_WC+:} false; then :
11776   $as_echo_n "(cached) " >&6
11777 else
11778   case $WC in
11779   [\\/]* | ?:[\\/]*)
11780   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11781   ;;
11782   *)
11783   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11784 for as_dir in $PATH
11785 do
11786   IFS=$as_save_IFS
11787   test -z "$as_dir" && as_dir=.
11788     for ac_exec_ext in '' $ac_executable_extensions; do
11789   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11790     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11791     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11792     break 2
11793   fi
11794 done
11795   done
11796 IFS=$as_save_IFS
11797 
11798   ;;
11799 esac
11800 fi
11801 WC=$ac_cv_path_WC
11802 if test -n "$WC"; then
11803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11804 $as_echo "$WC" >&6; }
11805 else
11806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11807 $as_echo "no" >&6; }
11808 fi
11809 
11810 
11811           if test "x$WC" = x; then
11812             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11813           fi
11814         else
11815           # Otherwise we believe it is a complete path. Use it as it is.
11816           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11817 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11818           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11819 $as_echo_n "checking for WC... " >&6; }
11820           if test ! -x "$tool_specified"; then
11821             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11822 $as_echo "not found" >&6; }
11823             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11824           fi
11825           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11826 $as_echo "$tool_specified" >&6; }
11827         fi
11828       fi
11829     fi
11830 
11831   fi
11832 
11833 
11834 
11835   if test "x$WC" = x; then
11836     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11837   fi
11838 
11839 
11840 
11841 
11842 
11843   # Publish this variable in the help.
11844 
11845 
11846   if [ -z "${WHICH+x}" ]; then
11847     # The variable is not set by user, try to locate tool using the code snippet
11848     for ac_prog in which
11849 do
11850   # Extract the first word of "$ac_prog", so it can be a program name with args.
11851 set dummy $ac_prog; ac_word=$2
11852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11853 $as_echo_n "checking for $ac_word... " >&6; }
11854 if ${ac_cv_path_WHICH+:} false; then :
11855   $as_echo_n "(cached) " >&6
11856 else
11857   case $WHICH in
11858   [\\/]* | ?:[\\/]*)
11859   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11860   ;;
11861   *)
11862   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11863 for as_dir in $PATH
11864 do
11865   IFS=$as_save_IFS
11866   test -z "$as_dir" && as_dir=.
11867     for ac_exec_ext in '' $ac_executable_extensions; do
11868   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11869     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11870     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11871     break 2
11872   fi
11873 done
11874   done
11875 IFS=$as_save_IFS
11876 
11877   ;;
11878 esac
11879 fi
11880 WHICH=$ac_cv_path_WHICH
11881 if test -n "$WHICH"; then
11882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11883 $as_echo "$WHICH" >&6; }
11884 else
11885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11886 $as_echo "no" >&6; }
11887 fi
11888 
11889 
11890   test -n "$WHICH" && break
11891 done
11892 
11893   else
11894     # The variable is set, but is it from the command line or the environment?
11895 
11896     # Try to remove the string !WHICH! from our list.
11897     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11898     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11899       # If it failed, the variable was not from the command line. Ignore it,
11900       # but warn the user (except for BASH, which is always set by the calling BASH).
11901       if test "xWHICH" != xBASH; then
11902         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11903 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11904       fi
11905       # Try to locate tool using the code snippet
11906       for ac_prog in which
11907 do
11908   # Extract the first word of "$ac_prog", so it can be a program name with args.
11909 set dummy $ac_prog; ac_word=$2
11910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11911 $as_echo_n "checking for $ac_word... " >&6; }
11912 if ${ac_cv_path_WHICH+:} false; then :
11913   $as_echo_n "(cached) " >&6
11914 else
11915   case $WHICH in
11916   [\\/]* | ?:[\\/]*)
11917   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11918   ;;
11919   *)
11920   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11921 for as_dir in $PATH
11922 do
11923   IFS=$as_save_IFS
11924   test -z "$as_dir" && as_dir=.
11925     for ac_exec_ext in '' $ac_executable_extensions; do
11926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11927     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11929     break 2
11930   fi
11931 done
11932   done
11933 IFS=$as_save_IFS
11934 
11935   ;;
11936 esac
11937 fi
11938 WHICH=$ac_cv_path_WHICH
11939 if test -n "$WHICH"; then
11940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11941 $as_echo "$WHICH" >&6; }
11942 else
11943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11944 $as_echo "no" >&6; }
11945 fi
11946 
11947 
11948   test -n "$WHICH" && break
11949 done
11950 
11951     else
11952       # If it succeeded, then it was overridden by the user. We will use it
11953       # for the tool.
11954 
11955       # First remove it from the list of overridden variables, so we can test
11956       # for unknown variables in the end.
11957       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11958 
11959       # Check if we try to supply an empty value
11960       if test "x$WHICH" = x; then
11961         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
11962 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
11963         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11964 $as_echo_n "checking for WHICH... " >&6; }
11965         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11966 $as_echo "disabled" >&6; }
11967       else
11968         # Check if the provided tool contains a complete path.
11969         tool_specified="$WHICH"
11970         tool_basename="${tool_specified##*/}"
11971         if test "x$tool_basename" = "x$tool_specified"; then
11972           # A command without a complete path is provided, search $PATH.
11973           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11974 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11975           # Extract the first word of "$tool_basename", so it can be a program name with args.
11976 set dummy $tool_basename; ac_word=$2
11977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11978 $as_echo_n "checking for $ac_word... " >&6; }
11979 if ${ac_cv_path_WHICH+:} false; then :
11980   $as_echo_n "(cached) " >&6
11981 else
11982   case $WHICH in
11983   [\\/]* | ?:[\\/]*)
11984   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11985   ;;
11986   *)
11987   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11988 for as_dir in $PATH
11989 do
11990   IFS=$as_save_IFS
11991   test -z "$as_dir" && as_dir=.
11992     for ac_exec_ext in '' $ac_executable_extensions; do
11993   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11994     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11995     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11996     break 2
11997   fi
11998 done
11999   done
12000 IFS=$as_save_IFS
12001 
12002   ;;
12003 esac
12004 fi
12005 WHICH=$ac_cv_path_WHICH
12006 if test -n "$WHICH"; then
12007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12008 $as_echo "$WHICH" >&6; }
12009 else
12010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12011 $as_echo "no" >&6; }
12012 fi
12013 
12014 
12015           if test "x$WHICH" = x; then
12016             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12017           fi
12018         else
12019           # Otherwise we believe it is a complete path. Use it as it is.
12020           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12021 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12022           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12023 $as_echo_n "checking for WHICH... " >&6; }
12024           if test ! -x "$tool_specified"; then
12025             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12026 $as_echo "not found" >&6; }
12027             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12028           fi
12029           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12030 $as_echo "$tool_specified" >&6; }
12031         fi
12032       fi
12033     fi
12034 
12035   fi
12036 
12037 
12038 
12039   if test "x$WHICH" = x; then
12040     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12041   fi
12042 
12043 
12044 
12045 
12046 
12047   # Publish this variable in the help.
12048 
12049 
12050   if [ -z "${XARGS+x}" ]; then
12051     # The variable is not set by user, try to locate tool using the code snippet
12052     for ac_prog in xargs
12053 do
12054   # Extract the first word of "$ac_prog", so it can be a program name with args.
12055 set dummy $ac_prog; ac_word=$2
12056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12057 $as_echo_n "checking for $ac_word... " >&6; }
12058 if ${ac_cv_path_XARGS+:} false; then :
12059   $as_echo_n "(cached) " >&6
12060 else
12061   case $XARGS in
12062   [\\/]* | ?:[\\/]*)
12063   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12064   ;;
12065   *)
12066   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12067 for as_dir in $PATH
12068 do
12069   IFS=$as_save_IFS
12070   test -z "$as_dir" && as_dir=.
12071     for ac_exec_ext in '' $ac_executable_extensions; do
12072   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12073     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12075     break 2
12076   fi
12077 done
12078   done
12079 IFS=$as_save_IFS
12080 
12081   ;;
12082 esac
12083 fi
12084 XARGS=$ac_cv_path_XARGS
12085 if test -n "$XARGS"; then
12086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12087 $as_echo "$XARGS" >&6; }
12088 else
12089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12090 $as_echo "no" >&6; }
12091 fi
12092 
12093 
12094   test -n "$XARGS" && break
12095 done
12096 
12097   else
12098     # The variable is set, but is it from the command line or the environment?
12099 
12100     # Try to remove the string !XARGS! from our list.
12101     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12102     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12103       # If it failed, the variable was not from the command line. Ignore it,
12104       # but warn the user (except for BASH, which is always set by the calling BASH).
12105       if test "xXARGS" != xBASH; then
12106         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12107 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12108       fi
12109       # Try to locate tool using the code snippet
12110       for ac_prog in xargs
12111 do
12112   # Extract the first word of "$ac_prog", so it can be a program name with args.
12113 set dummy $ac_prog; ac_word=$2
12114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12115 $as_echo_n "checking for $ac_word... " >&6; }
12116 if ${ac_cv_path_XARGS+:} false; then :
12117   $as_echo_n "(cached) " >&6
12118 else
12119   case $XARGS in
12120   [\\/]* | ?:[\\/]*)
12121   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12122   ;;
12123   *)
12124   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12125 for as_dir in $PATH
12126 do
12127   IFS=$as_save_IFS
12128   test -z "$as_dir" && as_dir=.
12129     for ac_exec_ext in '' $ac_executable_extensions; do
12130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12131     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12133     break 2
12134   fi
12135 done
12136   done
12137 IFS=$as_save_IFS
12138 
12139   ;;
12140 esac
12141 fi
12142 XARGS=$ac_cv_path_XARGS
12143 if test -n "$XARGS"; then
12144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12145 $as_echo "$XARGS" >&6; }
12146 else
12147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12148 $as_echo "no" >&6; }
12149 fi
12150 
12151 
12152   test -n "$XARGS" && break
12153 done
12154 
12155     else
12156       # If it succeeded, then it was overridden by the user. We will use it
12157       # for the tool.
12158 
12159       # First remove it from the list of overridden variables, so we can test
12160       # for unknown variables in the end.
12161       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12162 
12163       # Check if we try to supply an empty value
12164       if test "x$XARGS" = x; then
12165         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12166 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12167         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12168 $as_echo_n "checking for XARGS... " >&6; }
12169         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12170 $as_echo "disabled" >&6; }
12171       else
12172         # Check if the provided tool contains a complete path.
12173         tool_specified="$XARGS"
12174         tool_basename="${tool_specified##*/}"
12175         if test "x$tool_basename" = "x$tool_specified"; then
12176           # A command without a complete path is provided, search $PATH.
12177           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12178 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12179           # Extract the first word of "$tool_basename", so it can be a program name with args.
12180 set dummy $tool_basename; ac_word=$2
12181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12182 $as_echo_n "checking for $ac_word... " >&6; }
12183 if ${ac_cv_path_XARGS+:} false; then :
12184   $as_echo_n "(cached) " >&6
12185 else
12186   case $XARGS in
12187   [\\/]* | ?:[\\/]*)
12188   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12189   ;;
12190   *)
12191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12192 for as_dir in $PATH
12193 do
12194   IFS=$as_save_IFS
12195   test -z "$as_dir" && as_dir=.
12196     for ac_exec_ext in '' $ac_executable_extensions; do
12197   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12198     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12199     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12200     break 2
12201   fi
12202 done
12203   done
12204 IFS=$as_save_IFS
12205 
12206   ;;
12207 esac
12208 fi
12209 XARGS=$ac_cv_path_XARGS
12210 if test -n "$XARGS"; then
12211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12212 $as_echo "$XARGS" >&6; }
12213 else
12214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12215 $as_echo "no" >&6; }
12216 fi
12217 
12218 
12219           if test "x$XARGS" = x; then
12220             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12221           fi
12222         else
12223           # Otherwise we believe it is a complete path. Use it as it is.
12224           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12225 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12226           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12227 $as_echo_n "checking for XARGS... " >&6; }
12228           if test ! -x "$tool_specified"; then
12229             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12230 $as_echo "not found" >&6; }
12231             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12232           fi
12233           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12234 $as_echo "$tool_specified" >&6; }
12235         fi
12236       fi
12237     fi
12238 
12239   fi
12240 
12241 
12242 
12243   if test "x$XARGS" = x; then
12244     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12245   fi
12246 
12247 
12248 
12249   # Then required tools that require some special treatment.
12250 
12251 
12252   # Publish this variable in the help.
12253 
12254 
12255   if [ -z "${AWK+x}" ]; then
12256     # The variable is not set by user, try to locate tool using the code snippet
12257     for ac_prog in gawk mawk nawk awk
12258 do
12259   # Extract the first word of "$ac_prog", so it can be a program name with args.
12260 set dummy $ac_prog; ac_word=$2
12261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12262 $as_echo_n "checking for $ac_word... " >&6; }
12263 if ${ac_cv_prog_AWK+:} false; then :
12264   $as_echo_n "(cached) " >&6
12265 else
12266   if test -n "$AWK"; then
12267   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12268 else
12269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12270 for as_dir in $PATH
12271 do
12272   IFS=$as_save_IFS
12273   test -z "$as_dir" && as_dir=.
12274     for ac_exec_ext in '' $ac_executable_extensions; do
12275   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12276     ac_cv_prog_AWK="$ac_prog"
12277     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12278     break 2
12279   fi
12280 done
12281   done
12282 IFS=$as_save_IFS
12283 
12284 fi
12285 fi
12286 AWK=$ac_cv_prog_AWK
12287 if test -n "$AWK"; then
12288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12289 $as_echo "$AWK" >&6; }
12290 else
12291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12292 $as_echo "no" >&6; }
12293 fi
12294 
12295 
12296   test -n "$AWK" && break
12297 done
12298 
12299   else
12300     # The variable is set, but is it from the command line or the environment?
12301 
12302     # Try to remove the string !AWK! from our list.
12303     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12304     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12305       # If it failed, the variable was not from the command line. Ignore it,
12306       # but warn the user (except for BASH, which is always set by the calling BASH).
12307       if test "xAWK" != xBASH; then
12308         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12309 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12310       fi
12311       # Try to locate tool using the code snippet
12312       for ac_prog in gawk mawk nawk awk
12313 do
12314   # Extract the first word of "$ac_prog", so it can be a program name with args.
12315 set dummy $ac_prog; ac_word=$2
12316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12317 $as_echo_n "checking for $ac_word... " >&6; }
12318 if ${ac_cv_prog_AWK+:} false; then :
12319   $as_echo_n "(cached) " >&6
12320 else
12321   if test -n "$AWK"; then
12322   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12323 else
12324 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12325 for as_dir in $PATH
12326 do
12327   IFS=$as_save_IFS
12328   test -z "$as_dir" && as_dir=.
12329     for ac_exec_ext in '' $ac_executable_extensions; do
12330   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12331     ac_cv_prog_AWK="$ac_prog"
12332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12333     break 2
12334   fi
12335 done
12336   done
12337 IFS=$as_save_IFS
12338 
12339 fi
12340 fi
12341 AWK=$ac_cv_prog_AWK
12342 if test -n "$AWK"; then
12343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12344 $as_echo "$AWK" >&6; }
12345 else
12346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12347 $as_echo "no" >&6; }
12348 fi
12349 
12350 
12351   test -n "$AWK" && break
12352 done
12353 
12354     else
12355       # If it succeeded, then it was overridden by the user. We will use it
12356       # for the tool.
12357 
12358       # First remove it from the list of overridden variables, so we can test
12359       # for unknown variables in the end.
12360       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12361 
12362       # Check if we try to supply an empty value
12363       if test "x$AWK" = x; then
12364         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12365 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12366         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12367 $as_echo_n "checking for AWK... " >&6; }
12368         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12369 $as_echo "disabled" >&6; }
12370       else
12371         # Check if the provided tool contains a complete path.
12372         tool_specified="$AWK"
12373         tool_basename="${tool_specified##*/}"
12374         if test "x$tool_basename" = "x$tool_specified"; then
12375           # A command without a complete path is provided, search $PATH.
12376           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12377 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12378           # Extract the first word of "$tool_basename", so it can be a program name with args.
12379 set dummy $tool_basename; ac_word=$2
12380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12381 $as_echo_n "checking for $ac_word... " >&6; }
12382 if ${ac_cv_path_AWK+:} false; then :
12383   $as_echo_n "(cached) " >&6
12384 else
12385   case $AWK in
12386   [\\/]* | ?:[\\/]*)
12387   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12388   ;;
12389   *)
12390   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12391 for as_dir in $PATH
12392 do
12393   IFS=$as_save_IFS
12394   test -z "$as_dir" && as_dir=.
12395     for ac_exec_ext in '' $ac_executable_extensions; do
12396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12397     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12399     break 2
12400   fi
12401 done
12402   done
12403 IFS=$as_save_IFS
12404 
12405   ;;
12406 esac
12407 fi
12408 AWK=$ac_cv_path_AWK
12409 if test -n "$AWK"; then
12410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12411 $as_echo "$AWK" >&6; }
12412 else
12413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12414 $as_echo "no" >&6; }
12415 fi
12416 
12417 
12418           if test "x$AWK" = x; then
12419             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12420           fi
12421         else
12422           # Otherwise we believe it is a complete path. Use it as it is.
12423           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12424 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12425           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12426 $as_echo_n "checking for AWK... " >&6; }
12427           if test ! -x "$tool_specified"; then
12428             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12429 $as_echo "not found" >&6; }
12430             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12431           fi
12432           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12433 $as_echo "$tool_specified" >&6; }
12434         fi
12435       fi
12436     fi
12437 
12438   fi
12439 
12440 
12441   if test "x$AWK" = x; then
12442     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12443   fi
12444 
12445 
12446 
12447 
12448   # Publish this variable in the help.
12449 
12450 
12451   if [ -z "${GREP+x}" ]; then
12452     # The variable is not set by user, try to locate tool using the code snippet
12453     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12454 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12455 if ${ac_cv_path_GREP+:} false; then :
12456   $as_echo_n "(cached) " >&6
12457 else
12458   if test -z "$GREP"; then
12459   ac_path_GREP_found=false
12460   # Loop through the user's path and test for each of PROGNAME-LIST
12461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12462 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12463 do
12464   IFS=$as_save_IFS
12465   test -z "$as_dir" && as_dir=.
12466     for ac_prog in grep ggrep; do
12467     for ac_exec_ext in '' $ac_executable_extensions; do
12468       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12469       as_fn_executable_p "$ac_path_GREP" || continue
12470 # Check for GNU ac_path_GREP and select it if it is found.
12471   # Check for GNU $ac_path_GREP
12472 case `"$ac_path_GREP" --version 2>&1` in
12473 *GNU*)
12474   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12475 *)
12476   ac_count=0
12477   $as_echo_n 0123456789 >"conftest.in"
12478   while :
12479   do
12480     cat "conftest.in" "conftest.in" >"conftest.tmp"
12481     mv "conftest.tmp" "conftest.in"
12482     cp "conftest.in" "conftest.nl"
12483     $as_echo 'GREP' >> "conftest.nl"
12484     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12485     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12486     as_fn_arith $ac_count + 1 && ac_count=$as_val
12487     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12488       # Best one so far, save it but keep looking for a better one
12489       ac_cv_path_GREP="$ac_path_GREP"
12490       ac_path_GREP_max=$ac_count
12491     fi
12492     # 10*(2^10) chars as input seems more than enough
12493     test $ac_count -gt 10 && break
12494   done
12495   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12496 esac
12497 
12498       $ac_path_GREP_found && break 3
12499     done
12500   done
12501   done
12502 IFS=$as_save_IFS
12503   if test -z "$ac_cv_path_GREP"; then
12504     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12505   fi
12506 else
12507   ac_cv_path_GREP=$GREP
12508 fi
12509 
12510 fi
12511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12512 $as_echo "$ac_cv_path_GREP" >&6; }
12513  GREP="$ac_cv_path_GREP"
12514 
12515 
12516   else
12517     # The variable is set, but is it from the command line or the environment?
12518 
12519     # Try to remove the string !GREP! from our list.
12520     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12521     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12522       # If it failed, the variable was not from the command line. Ignore it,
12523       # but warn the user (except for BASH, which is always set by the calling BASH).
12524       if test "xGREP" != xBASH; then
12525         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12526 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12527       fi
12528       # Try to locate tool using the code snippet
12529       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12530 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12531 if ${ac_cv_path_GREP+:} false; then :
12532   $as_echo_n "(cached) " >&6
12533 else
12534   if test -z "$GREP"; then
12535   ac_path_GREP_found=false
12536   # Loop through the user's path and test for each of PROGNAME-LIST
12537   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12538 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12539 do
12540   IFS=$as_save_IFS
12541   test -z "$as_dir" && as_dir=.
12542     for ac_prog in grep ggrep; do
12543     for ac_exec_ext in '' $ac_executable_extensions; do
12544       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12545       as_fn_executable_p "$ac_path_GREP" || continue
12546 # Check for GNU ac_path_GREP and select it if it is found.
12547   # Check for GNU $ac_path_GREP
12548 case `"$ac_path_GREP" --version 2>&1` in
12549 *GNU*)
12550   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12551 *)
12552   ac_count=0
12553   $as_echo_n 0123456789 >"conftest.in"
12554   while :
12555   do
12556     cat "conftest.in" "conftest.in" >"conftest.tmp"
12557     mv "conftest.tmp" "conftest.in"
12558     cp "conftest.in" "conftest.nl"
12559     $as_echo 'GREP' >> "conftest.nl"
12560     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12561     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12562     as_fn_arith $ac_count + 1 && ac_count=$as_val
12563     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12564       # Best one so far, save it but keep looking for a better one
12565       ac_cv_path_GREP="$ac_path_GREP"
12566       ac_path_GREP_max=$ac_count
12567     fi
12568     # 10*(2^10) chars as input seems more than enough
12569     test $ac_count -gt 10 && break
12570   done
12571   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12572 esac
12573 
12574       $ac_path_GREP_found && break 3
12575     done
12576   done
12577   done
12578 IFS=$as_save_IFS
12579   if test -z "$ac_cv_path_GREP"; then
12580     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12581   fi
12582 else
12583   ac_cv_path_GREP=$GREP
12584 fi
12585 
12586 fi
12587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12588 $as_echo "$ac_cv_path_GREP" >&6; }
12589  GREP="$ac_cv_path_GREP"
12590 
12591 
12592     else
12593       # If it succeeded, then it was overridden by the user. We will use it
12594       # for the tool.
12595 
12596       # First remove it from the list of overridden variables, so we can test
12597       # for unknown variables in the end.
12598       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12599 
12600       # Check if we try to supply an empty value
12601       if test "x$GREP" = x; then
12602         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12603 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12604         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12605 $as_echo_n "checking for GREP... " >&6; }
12606         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12607 $as_echo "disabled" >&6; }
12608       else
12609         # Check if the provided tool contains a complete path.
12610         tool_specified="$GREP"
12611         tool_basename="${tool_specified##*/}"
12612         if test "x$tool_basename" = "x$tool_specified"; then
12613           # A command without a complete path is provided, search $PATH.
12614           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12615 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12616           # Extract the first word of "$tool_basename", so it can be a program name with args.
12617 set dummy $tool_basename; ac_word=$2
12618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12619 $as_echo_n "checking for $ac_word... " >&6; }
12620 if ${ac_cv_path_GREP+:} false; then :
12621   $as_echo_n "(cached) " >&6
12622 else
12623   case $GREP in
12624   [\\/]* | ?:[\\/]*)
12625   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12626   ;;
12627   *)
12628   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12629 for as_dir in $PATH
12630 do
12631   IFS=$as_save_IFS
12632   test -z "$as_dir" && as_dir=.
12633     for ac_exec_ext in '' $ac_executable_extensions; do
12634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12635     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12637     break 2
12638   fi
12639 done
12640   done
12641 IFS=$as_save_IFS
12642 
12643   ;;
12644 esac
12645 fi
12646 GREP=$ac_cv_path_GREP
12647 if test -n "$GREP"; then
12648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12649 $as_echo "$GREP" >&6; }
12650 else
12651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12652 $as_echo "no" >&6; }
12653 fi
12654 
12655 
12656           if test "x$GREP" = x; then
12657             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12658           fi
12659         else
12660           # Otherwise we believe it is a complete path. Use it as it is.
12661           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12662 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12663           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12664 $as_echo_n "checking for GREP... " >&6; }
12665           if test ! -x "$tool_specified"; then
12666             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12667 $as_echo "not found" >&6; }
12668             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12669           fi
12670           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12671 $as_echo "$tool_specified" >&6; }
12672         fi
12673       fi
12674     fi
12675 
12676   fi
12677 
12678 
12679   if test "x$GREP" = x; then
12680     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12681   fi
12682 
12683 
12684 
12685 
12686   # Publish this variable in the help.
12687 
12688 
12689   if [ -z "${EGREP+x}" ]; then
12690     # The variable is not set by user, try to locate tool using the code snippet
12691     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12692 $as_echo_n "checking for egrep... " >&6; }
12693 if ${ac_cv_path_EGREP+:} false; then :
12694   $as_echo_n "(cached) " >&6
12695 else
12696   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12697    then ac_cv_path_EGREP="$GREP -E"
12698    else
12699      if test -z "$EGREP"; then
12700   ac_path_EGREP_found=false
12701   # Loop through the user's path and test for each of PROGNAME-LIST
12702   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12703 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12704 do
12705   IFS=$as_save_IFS
12706   test -z "$as_dir" && as_dir=.
12707     for ac_prog in egrep; do
12708     for ac_exec_ext in '' $ac_executable_extensions; do
12709       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12710       as_fn_executable_p "$ac_path_EGREP" || continue
12711 # Check for GNU ac_path_EGREP and select it if it is found.
12712   # Check for GNU $ac_path_EGREP
12713 case `"$ac_path_EGREP" --version 2>&1` in
12714 *GNU*)
12715   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12716 *)
12717   ac_count=0
12718   $as_echo_n 0123456789 >"conftest.in"
12719   while :
12720   do
12721     cat "conftest.in" "conftest.in" >"conftest.tmp"
12722     mv "conftest.tmp" "conftest.in"
12723     cp "conftest.in" "conftest.nl"
12724     $as_echo 'EGREP' >> "conftest.nl"
12725     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12726     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12727     as_fn_arith $ac_count + 1 && ac_count=$as_val
12728     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12729       # Best one so far, save it but keep looking for a better one
12730       ac_cv_path_EGREP="$ac_path_EGREP"
12731       ac_path_EGREP_max=$ac_count
12732     fi
12733     # 10*(2^10) chars as input seems more than enough
12734     test $ac_count -gt 10 && break
12735   done
12736   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12737 esac
12738 
12739       $ac_path_EGREP_found && break 3
12740     done
12741   done
12742   done
12743 IFS=$as_save_IFS
12744   if test -z "$ac_cv_path_EGREP"; then
12745     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12746   fi
12747 else
12748   ac_cv_path_EGREP=$EGREP
12749 fi
12750 
12751    fi
12752 fi
12753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12754 $as_echo "$ac_cv_path_EGREP" >&6; }
12755  EGREP="$ac_cv_path_EGREP"
12756 
12757 
12758   else
12759     # The variable is set, but is it from the command line or the environment?
12760 
12761     # Try to remove the string !EGREP! from our list.
12762     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12763     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12764       # If it failed, the variable was not from the command line. Ignore it,
12765       # but warn the user (except for BASH, which is always set by the calling BASH).
12766       if test "xEGREP" != xBASH; then
12767         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12768 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12769       fi
12770       # Try to locate tool using the code snippet
12771       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12772 $as_echo_n "checking for egrep... " >&6; }
12773 if ${ac_cv_path_EGREP+:} false; then :
12774   $as_echo_n "(cached) " >&6
12775 else
12776   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12777    then ac_cv_path_EGREP="$GREP -E"
12778    else
12779      if test -z "$EGREP"; then
12780   ac_path_EGREP_found=false
12781   # Loop through the user's path and test for each of PROGNAME-LIST
12782   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12783 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12784 do
12785   IFS=$as_save_IFS
12786   test -z "$as_dir" && as_dir=.
12787     for ac_prog in egrep; do
12788     for ac_exec_ext in '' $ac_executable_extensions; do
12789       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12790       as_fn_executable_p "$ac_path_EGREP" || continue
12791 # Check for GNU ac_path_EGREP and select it if it is found.
12792   # Check for GNU $ac_path_EGREP
12793 case `"$ac_path_EGREP" --version 2>&1` in
12794 *GNU*)
12795   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12796 *)
12797   ac_count=0
12798   $as_echo_n 0123456789 >"conftest.in"
12799   while :
12800   do
12801     cat "conftest.in" "conftest.in" >"conftest.tmp"
12802     mv "conftest.tmp" "conftest.in"
12803     cp "conftest.in" "conftest.nl"
12804     $as_echo 'EGREP' >> "conftest.nl"
12805     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12806     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12807     as_fn_arith $ac_count + 1 && ac_count=$as_val
12808     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12809       # Best one so far, save it but keep looking for a better one
12810       ac_cv_path_EGREP="$ac_path_EGREP"
12811       ac_path_EGREP_max=$ac_count
12812     fi
12813     # 10*(2^10) chars as input seems more than enough
12814     test $ac_count -gt 10 && break
12815   done
12816   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12817 esac
12818 
12819       $ac_path_EGREP_found && break 3
12820     done
12821   done
12822   done
12823 IFS=$as_save_IFS
12824   if test -z "$ac_cv_path_EGREP"; then
12825     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12826   fi
12827 else
12828   ac_cv_path_EGREP=$EGREP
12829 fi
12830 
12831    fi
12832 fi
12833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12834 $as_echo "$ac_cv_path_EGREP" >&6; }
12835  EGREP="$ac_cv_path_EGREP"
12836 
12837 
12838     else
12839       # If it succeeded, then it was overridden by the user. We will use it
12840       # for the tool.
12841 
12842       # First remove it from the list of overridden variables, so we can test
12843       # for unknown variables in the end.
12844       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12845 
12846       # Check if we try to supply an empty value
12847       if test "x$EGREP" = x; then
12848         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12849 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12850         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12851 $as_echo_n "checking for EGREP... " >&6; }
12852         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12853 $as_echo "disabled" >&6; }
12854       else
12855         # Check if the provided tool contains a complete path.
12856         tool_specified="$EGREP"
12857         tool_basename="${tool_specified##*/}"
12858         if test "x$tool_basename" = "x$tool_specified"; then
12859           # A command without a complete path is provided, search $PATH.
12860           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12861 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12862           # Extract the first word of "$tool_basename", so it can be a program name with args.
12863 set dummy $tool_basename; ac_word=$2
12864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12865 $as_echo_n "checking for $ac_word... " >&6; }
12866 if ${ac_cv_path_EGREP+:} false; then :
12867   $as_echo_n "(cached) " >&6
12868 else
12869   case $EGREP in
12870   [\\/]* | ?:[\\/]*)
12871   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12872   ;;
12873   *)
12874   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12875 for as_dir in $PATH
12876 do
12877   IFS=$as_save_IFS
12878   test -z "$as_dir" && as_dir=.
12879     for ac_exec_ext in '' $ac_executable_extensions; do
12880   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12881     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12882     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12883     break 2
12884   fi
12885 done
12886   done
12887 IFS=$as_save_IFS
12888 
12889   ;;
12890 esac
12891 fi
12892 EGREP=$ac_cv_path_EGREP
12893 if test -n "$EGREP"; then
12894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12895 $as_echo "$EGREP" >&6; }
12896 else
12897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12898 $as_echo "no" >&6; }
12899 fi
12900 
12901 
12902           if test "x$EGREP" = x; then
12903             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12904           fi
12905         else
12906           # Otherwise we believe it is a complete path. Use it as it is.
12907           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12908 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12909           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12910 $as_echo_n "checking for EGREP... " >&6; }
12911           if test ! -x "$tool_specified"; then
12912             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12913 $as_echo "not found" >&6; }
12914             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12915           fi
12916           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12917 $as_echo "$tool_specified" >&6; }
12918         fi
12919       fi
12920     fi
12921 
12922   fi
12923 
12924 
12925   if test "x$EGREP" = x; then
12926     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12927   fi
12928 
12929 
12930 
12931 
12932   # Publish this variable in the help.
12933 
12934 
12935   if [ -z "${FGREP+x}" ]; then
12936     # The variable is not set by user, try to locate tool using the code snippet
12937     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12938 $as_echo_n "checking for fgrep... " >&6; }
12939 if ${ac_cv_path_FGREP+:} false; then :
12940   $as_echo_n "(cached) " >&6
12941 else
12942   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12943    then ac_cv_path_FGREP="$GREP -F"
12944    else
12945      if test -z "$FGREP"; then
12946   ac_path_FGREP_found=false
12947   # Loop through the user's path and test for each of PROGNAME-LIST
12948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12949 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12950 do
12951   IFS=$as_save_IFS
12952   test -z "$as_dir" && as_dir=.
12953     for ac_prog in fgrep; do
12954     for ac_exec_ext in '' $ac_executable_extensions; do
12955       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12956       as_fn_executable_p "$ac_path_FGREP" || continue
12957 # Check for GNU ac_path_FGREP and select it if it is found.
12958   # Check for GNU $ac_path_FGREP
12959 case `"$ac_path_FGREP" --version 2>&1` in
12960 *GNU*)
12961   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12962 *)
12963   ac_count=0
12964   $as_echo_n 0123456789 >"conftest.in"
12965   while :
12966   do
12967     cat "conftest.in" "conftest.in" >"conftest.tmp"
12968     mv "conftest.tmp" "conftest.in"
12969     cp "conftest.in" "conftest.nl"
12970     $as_echo 'FGREP' >> "conftest.nl"
12971     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12972     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12973     as_fn_arith $ac_count + 1 && ac_count=$as_val
12974     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12975       # Best one so far, save it but keep looking for a better one
12976       ac_cv_path_FGREP="$ac_path_FGREP"
12977       ac_path_FGREP_max=$ac_count
12978     fi
12979     # 10*(2^10) chars as input seems more than enough
12980     test $ac_count -gt 10 && break
12981   done
12982   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12983 esac
12984 
12985       $ac_path_FGREP_found && break 3
12986     done
12987   done
12988   done
12989 IFS=$as_save_IFS
12990   if test -z "$ac_cv_path_FGREP"; then
12991     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12992   fi
12993 else
12994   ac_cv_path_FGREP=$FGREP
12995 fi
12996 
12997    fi
12998 fi
12999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13000 $as_echo "$ac_cv_path_FGREP" >&6; }
13001  FGREP="$ac_cv_path_FGREP"
13002 
13003 
13004   else
13005     # The variable is set, but is it from the command line or the environment?
13006 
13007     # Try to remove the string !FGREP! from our list.
13008     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13009     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13010       # If it failed, the variable was not from the command line. Ignore it,
13011       # but warn the user (except for BASH, which is always set by the calling BASH).
13012       if test "xFGREP" != xBASH; then
13013         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13014 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13015       fi
13016       # Try to locate tool using the code snippet
13017       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13018 $as_echo_n "checking for fgrep... " >&6; }
13019 if ${ac_cv_path_FGREP+:} false; then :
13020   $as_echo_n "(cached) " >&6
13021 else
13022   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13023    then ac_cv_path_FGREP="$GREP -F"
13024    else
13025      if test -z "$FGREP"; then
13026   ac_path_FGREP_found=false
13027   # Loop through the user's path and test for each of PROGNAME-LIST
13028   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13029 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13030 do
13031   IFS=$as_save_IFS
13032   test -z "$as_dir" && as_dir=.
13033     for ac_prog in fgrep; do
13034     for ac_exec_ext in '' $ac_executable_extensions; do
13035       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13036       as_fn_executable_p "$ac_path_FGREP" || continue
13037 # Check for GNU ac_path_FGREP and select it if it is found.
13038   # Check for GNU $ac_path_FGREP
13039 case `"$ac_path_FGREP" --version 2>&1` in
13040 *GNU*)
13041   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13042 *)
13043   ac_count=0
13044   $as_echo_n 0123456789 >"conftest.in"
13045   while :
13046   do
13047     cat "conftest.in" "conftest.in" >"conftest.tmp"
13048     mv "conftest.tmp" "conftest.in"
13049     cp "conftest.in" "conftest.nl"
13050     $as_echo 'FGREP' >> "conftest.nl"
13051     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13052     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13053     as_fn_arith $ac_count + 1 && ac_count=$as_val
13054     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13055       # Best one so far, save it but keep looking for a better one
13056       ac_cv_path_FGREP="$ac_path_FGREP"
13057       ac_path_FGREP_max=$ac_count
13058     fi
13059     # 10*(2^10) chars as input seems more than enough
13060     test $ac_count -gt 10 && break
13061   done
13062   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13063 esac
13064 
13065       $ac_path_FGREP_found && break 3
13066     done
13067   done
13068   done
13069 IFS=$as_save_IFS
13070   if test -z "$ac_cv_path_FGREP"; then
13071     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13072   fi
13073 else
13074   ac_cv_path_FGREP=$FGREP
13075 fi
13076 
13077    fi
13078 fi
13079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13080 $as_echo "$ac_cv_path_FGREP" >&6; }
13081  FGREP="$ac_cv_path_FGREP"
13082 
13083 
13084     else
13085       # If it succeeded, then it was overridden by the user. We will use it
13086       # for the tool.
13087 
13088       # First remove it from the list of overridden variables, so we can test
13089       # for unknown variables in the end.
13090       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13091 
13092       # Check if we try to supply an empty value
13093       if test "x$FGREP" = x; then
13094         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13095 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13096         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13097 $as_echo_n "checking for FGREP... " >&6; }
13098         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13099 $as_echo "disabled" >&6; }
13100       else
13101         # Check if the provided tool contains a complete path.
13102         tool_specified="$FGREP"
13103         tool_basename="${tool_specified##*/}"
13104         if test "x$tool_basename" = "x$tool_specified"; then
13105           # A command without a complete path is provided, search $PATH.
13106           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13107 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13108           # Extract the first word of "$tool_basename", so it can be a program name with args.
13109 set dummy $tool_basename; ac_word=$2
13110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13111 $as_echo_n "checking for $ac_word... " >&6; }
13112 if ${ac_cv_path_FGREP+:} false; then :
13113   $as_echo_n "(cached) " >&6
13114 else
13115   case $FGREP in
13116   [\\/]* | ?:[\\/]*)
13117   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13118   ;;
13119   *)
13120   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13121 for as_dir in $PATH
13122 do
13123   IFS=$as_save_IFS
13124   test -z "$as_dir" && as_dir=.
13125     for ac_exec_ext in '' $ac_executable_extensions; do
13126   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13127     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13129     break 2
13130   fi
13131 done
13132   done
13133 IFS=$as_save_IFS
13134 
13135   ;;
13136 esac
13137 fi
13138 FGREP=$ac_cv_path_FGREP
13139 if test -n "$FGREP"; then
13140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13141 $as_echo "$FGREP" >&6; }
13142 else
13143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13144 $as_echo "no" >&6; }
13145 fi
13146 
13147 
13148           if test "x$FGREP" = x; then
13149             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13150           fi
13151         else
13152           # Otherwise we believe it is a complete path. Use it as it is.
13153           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13154 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13155           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13156 $as_echo_n "checking for FGREP... " >&6; }
13157           if test ! -x "$tool_specified"; then
13158             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13159 $as_echo "not found" >&6; }
13160             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13161           fi
13162           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13163 $as_echo "$tool_specified" >&6; }
13164         fi
13165       fi
13166     fi
13167 
13168   fi
13169 
13170 
13171   if test "x$FGREP" = x; then
13172     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13173   fi
13174 
13175 
13176 
13177 
13178   # Publish this variable in the help.
13179 
13180 
13181   if [ -z "${SED+x}" ]; then
13182     # The variable is not set by user, try to locate tool using the code snippet
13183     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13184 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13185 if ${ac_cv_path_SED+:} false; then :
13186   $as_echo_n "(cached) " >&6
13187 else
13188             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13189      for ac_i in 1 2 3 4 5 6 7; do
13190        ac_script="$ac_script$as_nl$ac_script"
13191      done
13192      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13193      { ac_script=; unset ac_script;}
13194      if test -z "$SED"; then
13195   ac_path_SED_found=false
13196   # Loop through the user's path and test for each of PROGNAME-LIST
13197   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13198 for as_dir in $PATH
13199 do
13200   IFS=$as_save_IFS
13201   test -z "$as_dir" && as_dir=.
13202     for ac_prog in sed gsed; do
13203     for ac_exec_ext in '' $ac_executable_extensions; do
13204       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13205       as_fn_executable_p "$ac_path_SED" || continue
13206 # Check for GNU ac_path_SED and select it if it is found.
13207   # Check for GNU $ac_path_SED
13208 case `"$ac_path_SED" --version 2>&1` in
13209 *GNU*)
13210   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13211 *)
13212   ac_count=0
13213   $as_echo_n 0123456789 >"conftest.in"
13214   while :
13215   do
13216     cat "conftest.in" "conftest.in" >"conftest.tmp"
13217     mv "conftest.tmp" "conftest.in"
13218     cp "conftest.in" "conftest.nl"
13219     $as_echo '' >> "conftest.nl"
13220     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13221     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13222     as_fn_arith $ac_count + 1 && ac_count=$as_val
13223     if test $ac_count -gt ${ac_path_SED_max-0}; then
13224       # Best one so far, save it but keep looking for a better one
13225       ac_cv_path_SED="$ac_path_SED"
13226       ac_path_SED_max=$ac_count
13227     fi
13228     # 10*(2^10) chars as input seems more than enough
13229     test $ac_count -gt 10 && break
13230   done
13231   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13232 esac
13233 
13234       $ac_path_SED_found && break 3
13235     done
13236   done
13237   done
13238 IFS=$as_save_IFS
13239   if test -z "$ac_cv_path_SED"; then
13240     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13241   fi
13242 else
13243   ac_cv_path_SED=$SED
13244 fi
13245 
13246 fi
13247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13248 $as_echo "$ac_cv_path_SED" >&6; }
13249  SED="$ac_cv_path_SED"
13250   rm -f conftest.sed
13251 
13252   else
13253     # The variable is set, but is it from the command line or the environment?
13254 
13255     # Try to remove the string !SED! from our list.
13256     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13257     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13258       # If it failed, the variable was not from the command line. Ignore it,
13259       # but warn the user (except for BASH, which is always set by the calling BASH).
13260       if test "xSED" != xBASH; then
13261         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13262 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13263       fi
13264       # Try to locate tool using the code snippet
13265       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13266 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13267 if ${ac_cv_path_SED+:} false; then :
13268   $as_echo_n "(cached) " >&6
13269 else
13270             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13271      for ac_i in 1 2 3 4 5 6 7; do
13272        ac_script="$ac_script$as_nl$ac_script"
13273      done
13274      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13275      { ac_script=; unset ac_script;}
13276      if test -z "$SED"; then
13277   ac_path_SED_found=false
13278   # Loop through the user's path and test for each of PROGNAME-LIST
13279   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13280 for as_dir in $PATH
13281 do
13282   IFS=$as_save_IFS
13283   test -z "$as_dir" && as_dir=.
13284     for ac_prog in sed gsed; do
13285     for ac_exec_ext in '' $ac_executable_extensions; do
13286       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13287       as_fn_executable_p "$ac_path_SED" || continue
13288 # Check for GNU ac_path_SED and select it if it is found.
13289   # Check for GNU $ac_path_SED
13290 case `"$ac_path_SED" --version 2>&1` in
13291 *GNU*)
13292   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13293 *)
13294   ac_count=0
13295   $as_echo_n 0123456789 >"conftest.in"
13296   while :
13297   do
13298     cat "conftest.in" "conftest.in" >"conftest.tmp"
13299     mv "conftest.tmp" "conftest.in"
13300     cp "conftest.in" "conftest.nl"
13301     $as_echo '' >> "conftest.nl"
13302     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13303     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13304     as_fn_arith $ac_count + 1 && ac_count=$as_val
13305     if test $ac_count -gt ${ac_path_SED_max-0}; then
13306       # Best one so far, save it but keep looking for a better one
13307       ac_cv_path_SED="$ac_path_SED"
13308       ac_path_SED_max=$ac_count
13309     fi
13310     # 10*(2^10) chars as input seems more than enough
13311     test $ac_count -gt 10 && break
13312   done
13313   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13314 esac
13315 
13316       $ac_path_SED_found && break 3
13317     done
13318   done
13319   done
13320 IFS=$as_save_IFS
13321   if test -z "$ac_cv_path_SED"; then
13322     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13323   fi
13324 else
13325   ac_cv_path_SED=$SED
13326 fi
13327 
13328 fi
13329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13330 $as_echo "$ac_cv_path_SED" >&6; }
13331  SED="$ac_cv_path_SED"
13332   rm -f conftest.sed
13333 
13334     else
13335       # If it succeeded, then it was overridden by the user. We will use it
13336       # for the tool.
13337 
13338       # First remove it from the list of overridden variables, so we can test
13339       # for unknown variables in the end.
13340       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13341 
13342       # Check if we try to supply an empty value
13343       if test "x$SED" = x; then
13344         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13345 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13346         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13347 $as_echo_n "checking for SED... " >&6; }
13348         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13349 $as_echo "disabled" >&6; }
13350       else
13351         # Check if the provided tool contains a complete path.
13352         tool_specified="$SED"
13353         tool_basename="${tool_specified##*/}"
13354         if test "x$tool_basename" = "x$tool_specified"; then
13355           # A command without a complete path is provided, search $PATH.
13356           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13357 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13358           # Extract the first word of "$tool_basename", so it can be a program name with args.
13359 set dummy $tool_basename; ac_word=$2
13360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13361 $as_echo_n "checking for $ac_word... " >&6; }
13362 if ${ac_cv_path_SED+:} false; then :
13363   $as_echo_n "(cached) " >&6
13364 else
13365   case $SED in
13366   [\\/]* | ?:[\\/]*)
13367   ac_cv_path_SED="$SED" # Let the user override the test with a path.
13368   ;;
13369   *)
13370   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13371 for as_dir in $PATH
13372 do
13373   IFS=$as_save_IFS
13374   test -z "$as_dir" && as_dir=.
13375     for ac_exec_ext in '' $ac_executable_extensions; do
13376   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13377     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13378     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13379     break 2
13380   fi
13381 done
13382   done
13383 IFS=$as_save_IFS
13384 
13385   ;;
13386 esac
13387 fi
13388 SED=$ac_cv_path_SED
13389 if test -n "$SED"; then
13390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13391 $as_echo "$SED" >&6; }
13392 else
13393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13394 $as_echo "no" >&6; }
13395 fi
13396 
13397 
13398           if test "x$SED" = x; then
13399             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13400           fi
13401         else
13402           # Otherwise we believe it is a complete path. Use it as it is.
13403           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13404 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13405           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13406 $as_echo_n "checking for SED... " >&6; }
13407           if test ! -x "$tool_specified"; then
13408             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13409 $as_echo "not found" >&6; }
13410             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13411           fi
13412           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13413 $as_echo "$tool_specified" >&6; }
13414         fi
13415       fi
13416     fi
13417 
13418   fi
13419 
13420 
13421   if test "x$SED" = x; then
13422     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13423   fi
13424 
13425 
13426 
13427   # Always force rm.
13428   RM="$RM -f"
13429 
13430   # pwd behaves differently on various platforms and some don't support the -L flag.
13431   # Always use the bash builtin pwd to get uniform behavior.
13432   THEPWDCMD=pwd
13433 
13434   # These are not required on all platforms
13435 
13436 
13437   # Publish this variable in the help.
13438 
13439 
13440   if [ -z "${CYGPATH+x}" ]; then
13441     # The variable is not set by user, try to locate tool using the code snippet
13442     for ac_prog in cygpath
13443 do
13444   # Extract the first word of "$ac_prog", so it can be a program name with args.
13445 set dummy $ac_prog; ac_word=$2
13446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13447 $as_echo_n "checking for $ac_word... " >&6; }
13448 if ${ac_cv_path_CYGPATH+:} false; then :
13449   $as_echo_n "(cached) " >&6
13450 else
13451   case $CYGPATH in
13452   [\\/]* | ?:[\\/]*)
13453   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13454   ;;
13455   *)
13456   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13457 for as_dir in $PATH
13458 do
13459   IFS=$as_save_IFS
13460   test -z "$as_dir" && as_dir=.
13461     for ac_exec_ext in '' $ac_executable_extensions; do
13462   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13463     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13464     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13465     break 2
13466   fi
13467 done
13468   done
13469 IFS=$as_save_IFS
13470 
13471   ;;
13472 esac
13473 fi
13474 CYGPATH=$ac_cv_path_CYGPATH
13475 if test -n "$CYGPATH"; then
13476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13477 $as_echo "$CYGPATH" >&6; }
13478 else
13479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13480 $as_echo "no" >&6; }
13481 fi
13482 
13483 
13484   test -n "$CYGPATH" && break
13485 done
13486 
13487   else
13488     # The variable is set, but is it from the command line or the environment?
13489 
13490     # Try to remove the string !CYGPATH! from our list.
13491     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13492     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13493       # If it failed, the variable was not from the command line. Ignore it,
13494       # but warn the user (except for BASH, which is always set by the calling BASH).
13495       if test "xCYGPATH" != xBASH; then
13496         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13497 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13498       fi
13499       # Try to locate tool using the code snippet
13500       for ac_prog in cygpath
13501 do
13502   # Extract the first word of "$ac_prog", so it can be a program name with args.
13503 set dummy $ac_prog; ac_word=$2
13504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13505 $as_echo_n "checking for $ac_word... " >&6; }
13506 if ${ac_cv_path_CYGPATH+:} false; then :
13507   $as_echo_n "(cached) " >&6
13508 else
13509   case $CYGPATH in
13510   [\\/]* | ?:[\\/]*)
13511   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13512   ;;
13513   *)
13514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13515 for as_dir in $PATH
13516 do
13517   IFS=$as_save_IFS
13518   test -z "$as_dir" && as_dir=.
13519     for ac_exec_ext in '' $ac_executable_extensions; do
13520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13521     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13523     break 2
13524   fi
13525 done
13526   done
13527 IFS=$as_save_IFS
13528 
13529   ;;
13530 esac
13531 fi
13532 CYGPATH=$ac_cv_path_CYGPATH
13533 if test -n "$CYGPATH"; then
13534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13535 $as_echo "$CYGPATH" >&6; }
13536 else
13537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13538 $as_echo "no" >&6; }
13539 fi
13540 
13541 
13542   test -n "$CYGPATH" && break
13543 done
13544 
13545     else
13546       # If it succeeded, then it was overridden by the user. We will use it
13547       # for the tool.
13548 
13549       # First remove it from the list of overridden variables, so we can test
13550       # for unknown variables in the end.
13551       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13552 
13553       # Check if we try to supply an empty value
13554       if test "x$CYGPATH" = x; then
13555         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13556 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13557         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13558 $as_echo_n "checking for CYGPATH... " >&6; }
13559         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13560 $as_echo "disabled" >&6; }
13561       else
13562         # Check if the provided tool contains a complete path.
13563         tool_specified="$CYGPATH"
13564         tool_basename="${tool_specified##*/}"
13565         if test "x$tool_basename" = "x$tool_specified"; then
13566           # A command without a complete path is provided, search $PATH.
13567           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13568 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13569           # Extract the first word of "$tool_basename", so it can be a program name with args.
13570 set dummy $tool_basename; ac_word=$2
13571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13572 $as_echo_n "checking for $ac_word... " >&6; }
13573 if ${ac_cv_path_CYGPATH+:} false; then :
13574   $as_echo_n "(cached) " >&6
13575 else
13576   case $CYGPATH in
13577   [\\/]* | ?:[\\/]*)
13578   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13579   ;;
13580   *)
13581   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13582 for as_dir in $PATH
13583 do
13584   IFS=$as_save_IFS
13585   test -z "$as_dir" && as_dir=.
13586     for ac_exec_ext in '' $ac_executable_extensions; do
13587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13588     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13590     break 2
13591   fi
13592 done
13593   done
13594 IFS=$as_save_IFS
13595 
13596   ;;
13597 esac
13598 fi
13599 CYGPATH=$ac_cv_path_CYGPATH
13600 if test -n "$CYGPATH"; then
13601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13602 $as_echo "$CYGPATH" >&6; }
13603 else
13604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13605 $as_echo "no" >&6; }
13606 fi
13607 
13608 
13609           if test "x$CYGPATH" = x; then
13610             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13611           fi
13612         else
13613           # Otherwise we believe it is a complete path. Use it as it is.
13614           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13615 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13616           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13617 $as_echo_n "checking for CYGPATH... " >&6; }
13618           if test ! -x "$tool_specified"; then
13619             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13620 $as_echo "not found" >&6; }
13621             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13622           fi
13623           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13624 $as_echo "$tool_specified" >&6; }
13625         fi
13626       fi
13627     fi
13628 
13629   fi
13630 
13631 
13632 
13633 
13634   # Publish this variable in the help.
13635 
13636 
13637   if [ -z "${READLINK+x}" ]; then
13638     # The variable is not set by user, try to locate tool using the code snippet
13639     for ac_prog in greadlink readlink
13640 do
13641   # Extract the first word of "$ac_prog", so it can be a program name with args.
13642 set dummy $ac_prog; ac_word=$2
13643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13644 $as_echo_n "checking for $ac_word... " >&6; }
13645 if ${ac_cv_path_READLINK+:} false; then :
13646   $as_echo_n "(cached) " >&6
13647 else
13648   case $READLINK in
13649   [\\/]* | ?:[\\/]*)
13650   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13651   ;;
13652   *)
13653   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13654 for as_dir in $PATH
13655 do
13656   IFS=$as_save_IFS
13657   test -z "$as_dir" && as_dir=.
13658     for ac_exec_ext in '' $ac_executable_extensions; do
13659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13660     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13662     break 2
13663   fi
13664 done
13665   done
13666 IFS=$as_save_IFS
13667 
13668   ;;
13669 esac
13670 fi
13671 READLINK=$ac_cv_path_READLINK
13672 if test -n "$READLINK"; then
13673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13674 $as_echo "$READLINK" >&6; }
13675 else
13676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13677 $as_echo "no" >&6; }
13678 fi
13679 
13680 
13681   test -n "$READLINK" && break
13682 done
13683 
13684   else
13685     # The variable is set, but is it from the command line or the environment?
13686 
13687     # Try to remove the string !READLINK! from our list.
13688     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13689     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13690       # If it failed, the variable was not from the command line. Ignore it,
13691       # but warn the user (except for BASH, which is always set by the calling BASH).
13692       if test "xREADLINK" != xBASH; then
13693         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13694 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13695       fi
13696       # Try to locate tool using the code snippet
13697       for ac_prog in greadlink readlink
13698 do
13699   # Extract the first word of "$ac_prog", so it can be a program name with args.
13700 set dummy $ac_prog; ac_word=$2
13701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13702 $as_echo_n "checking for $ac_word... " >&6; }
13703 if ${ac_cv_path_READLINK+:} false; then :
13704   $as_echo_n "(cached) " >&6
13705 else
13706   case $READLINK in
13707   [\\/]* | ?:[\\/]*)
13708   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13709   ;;
13710   *)
13711   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13712 for as_dir in $PATH
13713 do
13714   IFS=$as_save_IFS
13715   test -z "$as_dir" && as_dir=.
13716     for ac_exec_ext in '' $ac_executable_extensions; do
13717   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13718     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13719     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13720     break 2
13721   fi
13722 done
13723   done
13724 IFS=$as_save_IFS
13725 
13726   ;;
13727 esac
13728 fi
13729 READLINK=$ac_cv_path_READLINK
13730 if test -n "$READLINK"; then
13731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13732 $as_echo "$READLINK" >&6; }
13733 else
13734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13735 $as_echo "no" >&6; }
13736 fi
13737 
13738 
13739   test -n "$READLINK" && break
13740 done
13741 
13742     else
13743       # If it succeeded, then it was overridden by the user. We will use it
13744       # for the tool.
13745 
13746       # First remove it from the list of overridden variables, so we can test
13747       # for unknown variables in the end.
13748       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13749 
13750       # Check if we try to supply an empty value
13751       if test "x$READLINK" = x; then
13752         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13753 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13754         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13755 $as_echo_n "checking for READLINK... " >&6; }
13756         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13757 $as_echo "disabled" >&6; }
13758       else
13759         # Check if the provided tool contains a complete path.
13760         tool_specified="$READLINK"
13761         tool_basename="${tool_specified##*/}"
13762         if test "x$tool_basename" = "x$tool_specified"; then
13763           # A command without a complete path is provided, search $PATH.
13764           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13765 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13766           # Extract the first word of "$tool_basename", so it can be a program name with args.
13767 set dummy $tool_basename; ac_word=$2
13768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13769 $as_echo_n "checking for $ac_word... " >&6; }
13770 if ${ac_cv_path_READLINK+:} false; then :
13771   $as_echo_n "(cached) " >&6
13772 else
13773   case $READLINK in
13774   [\\/]* | ?:[\\/]*)
13775   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13776   ;;
13777   *)
13778   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13779 for as_dir in $PATH
13780 do
13781   IFS=$as_save_IFS
13782   test -z "$as_dir" && as_dir=.
13783     for ac_exec_ext in '' $ac_executable_extensions; do
13784   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13785     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13787     break 2
13788   fi
13789 done
13790   done
13791 IFS=$as_save_IFS
13792 
13793   ;;
13794 esac
13795 fi
13796 READLINK=$ac_cv_path_READLINK
13797 if test -n "$READLINK"; then
13798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13799 $as_echo "$READLINK" >&6; }
13800 else
13801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13802 $as_echo "no" >&6; }
13803 fi
13804 
13805 
13806           if test "x$READLINK" = x; then
13807             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13808           fi
13809         else
13810           # Otherwise we believe it is a complete path. Use it as it is.
13811           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13812 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13813           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13814 $as_echo_n "checking for READLINK... " >&6; }
13815           if test ! -x "$tool_specified"; then
13816             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13817 $as_echo "not found" >&6; }
13818             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13819           fi
13820           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13821 $as_echo "$tool_specified" >&6; }
13822         fi
13823       fi
13824     fi
13825 
13826   fi
13827 
13828 
13829 
13830 
13831   # Publish this variable in the help.
13832 
13833 
13834   if [ -z "${DF+x}" ]; then
13835     # The variable is not set by user, try to locate tool using the code snippet
13836     for ac_prog in df
13837 do
13838   # Extract the first word of "$ac_prog", so it can be a program name with args.
13839 set dummy $ac_prog; ac_word=$2
13840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13841 $as_echo_n "checking for $ac_word... " >&6; }
13842 if ${ac_cv_path_DF+:} false; then :
13843   $as_echo_n "(cached) " >&6
13844 else
13845   case $DF in
13846   [\\/]* | ?:[\\/]*)
13847   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13848   ;;
13849   *)
13850   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13851 for as_dir in $PATH
13852 do
13853   IFS=$as_save_IFS
13854   test -z "$as_dir" && as_dir=.
13855     for ac_exec_ext in '' $ac_executable_extensions; do
13856   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13857     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13858     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13859     break 2
13860   fi
13861 done
13862   done
13863 IFS=$as_save_IFS
13864 
13865   ;;
13866 esac
13867 fi
13868 DF=$ac_cv_path_DF
13869 if test -n "$DF"; then
13870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13871 $as_echo "$DF" >&6; }
13872 else
13873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13874 $as_echo "no" >&6; }
13875 fi
13876 
13877 
13878   test -n "$DF" && break
13879 done
13880 
13881   else
13882     # The variable is set, but is it from the command line or the environment?
13883 
13884     # Try to remove the string !DF! from our list.
13885     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13886     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13887       # If it failed, the variable was not from the command line. Ignore it,
13888       # but warn the user (except for BASH, which is always set by the calling BASH).
13889       if test "xDF" != xBASH; then
13890         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13891 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13892       fi
13893       # Try to locate tool using the code snippet
13894       for ac_prog in df
13895 do
13896   # Extract the first word of "$ac_prog", so it can be a program name with args.
13897 set dummy $ac_prog; ac_word=$2
13898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13899 $as_echo_n "checking for $ac_word... " >&6; }
13900 if ${ac_cv_path_DF+:} false; then :
13901   $as_echo_n "(cached) " >&6
13902 else
13903   case $DF in
13904   [\\/]* | ?:[\\/]*)
13905   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13906   ;;
13907   *)
13908   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13909 for as_dir in $PATH
13910 do
13911   IFS=$as_save_IFS
13912   test -z "$as_dir" && as_dir=.
13913     for ac_exec_ext in '' $ac_executable_extensions; do
13914   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13915     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13916     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13917     break 2
13918   fi
13919 done
13920   done
13921 IFS=$as_save_IFS
13922 
13923   ;;
13924 esac
13925 fi
13926 DF=$ac_cv_path_DF
13927 if test -n "$DF"; then
13928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13929 $as_echo "$DF" >&6; }
13930 else
13931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13932 $as_echo "no" >&6; }
13933 fi
13934 
13935 
13936   test -n "$DF" && break
13937 done
13938 
13939     else
13940       # If it succeeded, then it was overridden by the user. We will use it
13941       # for the tool.
13942 
13943       # First remove it from the list of overridden variables, so we can test
13944       # for unknown variables in the end.
13945       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13946 
13947       # Check if we try to supply an empty value
13948       if test "x$DF" = x; then
13949         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
13950 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
13951         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13952 $as_echo_n "checking for DF... " >&6; }
13953         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13954 $as_echo "disabled" >&6; }
13955       else
13956         # Check if the provided tool contains a complete path.
13957         tool_specified="$DF"
13958         tool_basename="${tool_specified##*/}"
13959         if test "x$tool_basename" = "x$tool_specified"; then
13960           # A command without a complete path is provided, search $PATH.
13961           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13962 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13963           # Extract the first word of "$tool_basename", so it can be a program name with args.
13964 set dummy $tool_basename; ac_word=$2
13965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13966 $as_echo_n "checking for $ac_word... " >&6; }
13967 if ${ac_cv_path_DF+:} false; then :
13968   $as_echo_n "(cached) " >&6
13969 else
13970   case $DF in
13971   [\\/]* | ?:[\\/]*)
13972   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13973   ;;
13974   *)
13975   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13976 for as_dir in $PATH
13977 do
13978   IFS=$as_save_IFS
13979   test -z "$as_dir" && as_dir=.
13980     for ac_exec_ext in '' $ac_executable_extensions; do
13981   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13982     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13983     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13984     break 2
13985   fi
13986 done
13987   done
13988 IFS=$as_save_IFS
13989 
13990   ;;
13991 esac
13992 fi
13993 DF=$ac_cv_path_DF
13994 if test -n "$DF"; then
13995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13996 $as_echo "$DF" >&6; }
13997 else
13998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13999 $as_echo "no" >&6; }
14000 fi
14001 
14002 
14003           if test "x$DF" = x; then
14004             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14005           fi
14006         else
14007           # Otherwise we believe it is a complete path. Use it as it is.
14008           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14009 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14010           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14011 $as_echo_n "checking for DF... " >&6; }
14012           if test ! -x "$tool_specified"; then
14013             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14014 $as_echo "not found" >&6; }
14015             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14016           fi
14017           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14018 $as_echo "$tool_specified" >&6; }
14019         fi
14020       fi
14021     fi
14022 
14023   fi
14024 
14025 
14026 
14027 
14028   # Publish this variable in the help.
14029 
14030 
14031   if [ -z "${CPIO+x}" ]; then
14032     # The variable is not set by user, try to locate tool using the code snippet
14033     for ac_prog in cpio bsdcpio
14034 do
14035   # Extract the first word of "$ac_prog", so it can be a program name with args.
14036 set dummy $ac_prog; ac_word=$2
14037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14038 $as_echo_n "checking for $ac_word... " >&6; }
14039 if ${ac_cv_path_CPIO+:} false; then :
14040   $as_echo_n "(cached) " >&6
14041 else
14042   case $CPIO in
14043   [\\/]* | ?:[\\/]*)
14044   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14045   ;;
14046   *)
14047   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14048 for as_dir in $PATH
14049 do
14050   IFS=$as_save_IFS
14051   test -z "$as_dir" && as_dir=.
14052     for ac_exec_ext in '' $ac_executable_extensions; do
14053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14054     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14056     break 2
14057   fi
14058 done
14059   done
14060 IFS=$as_save_IFS
14061 
14062   ;;
14063 esac
14064 fi
14065 CPIO=$ac_cv_path_CPIO
14066 if test -n "$CPIO"; then
14067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14068 $as_echo "$CPIO" >&6; }
14069 else
14070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14071 $as_echo "no" >&6; }
14072 fi
14073 
14074 
14075   test -n "$CPIO" && break
14076 done
14077 
14078   else
14079     # The variable is set, but is it from the command line or the environment?
14080 
14081     # Try to remove the string !CPIO! from our list.
14082     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14083     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14084       # If it failed, the variable was not from the command line. Ignore it,
14085       # but warn the user (except for BASH, which is always set by the calling BASH).
14086       if test "xCPIO" != xBASH; then
14087         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14088 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14089       fi
14090       # Try to locate tool using the code snippet
14091       for ac_prog in cpio bsdcpio
14092 do
14093   # Extract the first word of "$ac_prog", so it can be a program name with args.
14094 set dummy $ac_prog; ac_word=$2
14095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14096 $as_echo_n "checking for $ac_word... " >&6; }
14097 if ${ac_cv_path_CPIO+:} false; then :
14098   $as_echo_n "(cached) " >&6
14099 else
14100   case $CPIO in
14101   [\\/]* | ?:[\\/]*)
14102   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14103   ;;
14104   *)
14105   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14106 for as_dir in $PATH
14107 do
14108   IFS=$as_save_IFS
14109   test -z "$as_dir" && as_dir=.
14110     for ac_exec_ext in '' $ac_executable_extensions; do
14111   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14112     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14113     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14114     break 2
14115   fi
14116 done
14117   done
14118 IFS=$as_save_IFS
14119 
14120   ;;
14121 esac
14122 fi
14123 CPIO=$ac_cv_path_CPIO
14124 if test -n "$CPIO"; then
14125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14126 $as_echo "$CPIO" >&6; }
14127 else
14128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14129 $as_echo "no" >&6; }
14130 fi
14131 
14132 
14133   test -n "$CPIO" && break
14134 done
14135 
14136     else
14137       # If it succeeded, then it was overridden by the user. We will use it
14138       # for the tool.
14139 
14140       # First remove it from the list of overridden variables, so we can test
14141       # for unknown variables in the end.
14142       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14143 
14144       # Check if we try to supply an empty value
14145       if test "x$CPIO" = x; then
14146         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14147 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14148         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14149 $as_echo_n "checking for CPIO... " >&6; }
14150         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14151 $as_echo "disabled" >&6; }
14152       else
14153         # Check if the provided tool contains a complete path.
14154         tool_specified="$CPIO"
14155         tool_basename="${tool_specified##*/}"
14156         if test "x$tool_basename" = "x$tool_specified"; then
14157           # A command without a complete path is provided, search $PATH.
14158           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14159 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14160           # Extract the first word of "$tool_basename", so it can be a program name with args.
14161 set dummy $tool_basename; ac_word=$2
14162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14163 $as_echo_n "checking for $ac_word... " >&6; }
14164 if ${ac_cv_path_CPIO+:} false; then :
14165   $as_echo_n "(cached) " >&6
14166 else
14167   case $CPIO in
14168   [\\/]* | ?:[\\/]*)
14169   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14170   ;;
14171   *)
14172   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14173 for as_dir in $PATH
14174 do
14175   IFS=$as_save_IFS
14176   test -z "$as_dir" && as_dir=.
14177     for ac_exec_ext in '' $ac_executable_extensions; do
14178   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14179     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14180     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14181     break 2
14182   fi
14183 done
14184   done
14185 IFS=$as_save_IFS
14186 
14187   ;;
14188 esac
14189 fi
14190 CPIO=$ac_cv_path_CPIO
14191 if test -n "$CPIO"; then
14192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14193 $as_echo "$CPIO" >&6; }
14194 else
14195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14196 $as_echo "no" >&6; }
14197 fi
14198 
14199 
14200           if test "x$CPIO" = x; then
14201             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14202           fi
14203         else
14204           # Otherwise we believe it is a complete path. Use it as it is.
14205           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14206 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14207           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14208 $as_echo_n "checking for CPIO... " >&6; }
14209           if test ! -x "$tool_specified"; then
14210             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14211 $as_echo "not found" >&6; }
14212             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14213           fi
14214           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14215 $as_echo "$tool_specified" >&6; }
14216         fi
14217       fi
14218     fi
14219 
14220   fi
14221 
14222 
14223 
14224 
14225   # Publish this variable in the help.
14226 
14227 
14228   if [ -z "${NICE+x}" ]; then
14229     # The variable is not set by user, try to locate tool using the code snippet
14230     for ac_prog in nice
14231 do
14232   # Extract the first word of "$ac_prog", so it can be a program name with args.
14233 set dummy $ac_prog; ac_word=$2
14234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14235 $as_echo_n "checking for $ac_word... " >&6; }
14236 if ${ac_cv_path_NICE+:} false; then :
14237   $as_echo_n "(cached) " >&6
14238 else
14239   case $NICE in
14240   [\\/]* | ?:[\\/]*)
14241   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14242   ;;
14243   *)
14244   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14245 for as_dir in $PATH
14246 do
14247   IFS=$as_save_IFS
14248   test -z "$as_dir" && as_dir=.
14249     for ac_exec_ext in '' $ac_executable_extensions; do
14250   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14251     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14252     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14253     break 2
14254   fi
14255 done
14256   done
14257 IFS=$as_save_IFS
14258 
14259   ;;
14260 esac
14261 fi
14262 NICE=$ac_cv_path_NICE
14263 if test -n "$NICE"; then
14264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14265 $as_echo "$NICE" >&6; }
14266 else
14267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14268 $as_echo "no" >&6; }
14269 fi
14270 
14271 
14272   test -n "$NICE" && break
14273 done
14274 
14275   else
14276     # The variable is set, but is it from the command line or the environment?
14277 
14278     # Try to remove the string !NICE! from our list.
14279     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14280     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14281       # If it failed, the variable was not from the command line. Ignore it,
14282       # but warn the user (except for BASH, which is always set by the calling BASH).
14283       if test "xNICE" != xBASH; then
14284         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14285 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14286       fi
14287       # Try to locate tool using the code snippet
14288       for ac_prog in nice
14289 do
14290   # Extract the first word of "$ac_prog", so it can be a program name with args.
14291 set dummy $ac_prog; ac_word=$2
14292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14293 $as_echo_n "checking for $ac_word... " >&6; }
14294 if ${ac_cv_path_NICE+:} false; then :
14295   $as_echo_n "(cached) " >&6
14296 else
14297   case $NICE in
14298   [\\/]* | ?:[\\/]*)
14299   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14300   ;;
14301   *)
14302   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14303 for as_dir in $PATH
14304 do
14305   IFS=$as_save_IFS
14306   test -z "$as_dir" && as_dir=.
14307     for ac_exec_ext in '' $ac_executable_extensions; do
14308   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14309     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14310     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14311     break 2
14312   fi
14313 done
14314   done
14315 IFS=$as_save_IFS
14316 
14317   ;;
14318 esac
14319 fi
14320 NICE=$ac_cv_path_NICE
14321 if test -n "$NICE"; then
14322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14323 $as_echo "$NICE" >&6; }
14324 else
14325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14326 $as_echo "no" >&6; }
14327 fi
14328 
14329 
14330   test -n "$NICE" && break
14331 done
14332 
14333     else
14334       # If it succeeded, then it was overridden by the user. We will use it
14335       # for the tool.
14336 
14337       # First remove it from the list of overridden variables, so we can test
14338       # for unknown variables in the end.
14339       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14340 
14341       # Check if we try to supply an empty value
14342       if test "x$NICE" = x; then
14343         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14344 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14345         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14346 $as_echo_n "checking for NICE... " >&6; }
14347         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14348 $as_echo "disabled" >&6; }
14349       else
14350         # Check if the provided tool contains a complete path.
14351         tool_specified="$NICE"
14352         tool_basename="${tool_specified##*/}"
14353         if test "x$tool_basename" = "x$tool_specified"; then
14354           # A command without a complete path is provided, search $PATH.
14355           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14356 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14357           # Extract the first word of "$tool_basename", so it can be a program name with args.
14358 set dummy $tool_basename; ac_word=$2
14359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14360 $as_echo_n "checking for $ac_word... " >&6; }
14361 if ${ac_cv_path_NICE+:} false; then :
14362   $as_echo_n "(cached) " >&6
14363 else
14364   case $NICE in
14365   [\\/]* | ?:[\\/]*)
14366   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14367   ;;
14368   *)
14369   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14370 for as_dir in $PATH
14371 do
14372   IFS=$as_save_IFS
14373   test -z "$as_dir" && as_dir=.
14374     for ac_exec_ext in '' $ac_executable_extensions; do
14375   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14376     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14377     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14378     break 2
14379   fi
14380 done
14381   done
14382 IFS=$as_save_IFS
14383 
14384   ;;
14385 esac
14386 fi
14387 NICE=$ac_cv_path_NICE
14388 if test -n "$NICE"; then
14389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14390 $as_echo "$NICE" >&6; }
14391 else
14392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14393 $as_echo "no" >&6; }
14394 fi
14395 
14396 
14397           if test "x$NICE" = x; then
14398             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14399           fi
14400         else
14401           # Otherwise we believe it is a complete path. Use it as it is.
14402           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14403 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14404           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14405 $as_echo_n "checking for NICE... " >&6; }
14406           if test ! -x "$tool_specified"; then
14407             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14408 $as_echo "not found" >&6; }
14409             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14410           fi
14411           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14412 $as_echo "$tool_specified" >&6; }
14413         fi
14414       fi
14415     fi
14416 
14417   fi
14418 
14419 
14420 
14421 
14422 # Now we can determine OpenJDK build and target platforms. This is required to
14423 # have early on.
14424 # Make sure we can run config.sub.
14425 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14426   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14427 
14428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14429 $as_echo_n "checking build system type... " >&6; }
14430 if ${ac_cv_build+:} false; then :
14431   $as_echo_n "(cached) " >&6
14432 else
14433   ac_build_alias=$build_alias
14434 test "x$ac_build_alias" = x &&
14435   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14436 test "x$ac_build_alias" = x &&
14437   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14438 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14439   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14440 
14441 fi
14442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14443 $as_echo "$ac_cv_build" >&6; }
14444 case $ac_cv_build in
14445 *-*-*) ;;
14446 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14447 esac
14448 build=$ac_cv_build
14449 ac_save_IFS=$IFS; IFS='-'
14450 set x $ac_cv_build
14451 shift
14452 build_cpu=$1
14453 build_vendor=$2
14454 shift; shift
14455 # Remember, the first character of IFS is used to create $*,
14456 # except with old shells:
14457 build_os=$*
14458 IFS=$ac_save_IFS
14459 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14460 
14461 
14462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14463 $as_echo_n "checking host system type... " >&6; }
14464 if ${ac_cv_host+:} false; then :
14465   $as_echo_n "(cached) " >&6
14466 else
14467   if test "x$host_alias" = x; then
14468   ac_cv_host=$ac_cv_build
14469 else
14470   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14471     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14472 fi
14473 
14474 fi
14475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14476 $as_echo "$ac_cv_host" >&6; }
14477 case $ac_cv_host in
14478 *-*-*) ;;
14479 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14480 esac
14481 host=$ac_cv_host
14482 ac_save_IFS=$IFS; IFS='-'
14483 set x $ac_cv_host
14484 shift
14485 host_cpu=$1
14486 host_vendor=$2
14487 shift; shift
14488 # Remember, the first character of IFS is used to create $*,
14489 # except with old shells:
14490 host_os=$*
14491 IFS=$ac_save_IFS
14492 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14493 
14494 
14495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14496 $as_echo_n "checking target system type... " >&6; }
14497 if ${ac_cv_target+:} false; then :
14498   $as_echo_n "(cached) " >&6
14499 else
14500   if test "x$target_alias" = x; then
14501   ac_cv_target=$ac_cv_host
14502 else
14503   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14504     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14505 fi
14506 
14507 fi
14508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14509 $as_echo "$ac_cv_target" >&6; }
14510 case $ac_cv_target in
14511 *-*-*) ;;
14512 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14513 esac
14514 target=$ac_cv_target
14515 ac_save_IFS=$IFS; IFS='-'
14516 set x $ac_cv_target
14517 shift
14518 target_cpu=$1
14519 target_vendor=$2
14520 shift; shift
14521 # Remember, the first character of IFS is used to create $*,
14522 # except with old shells:
14523 target_os=$*
14524 IFS=$ac_save_IFS
14525 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14526 
14527 
14528 # The aliases save the names the user supplied, while $host etc.
14529 # will get canonicalized.
14530 test -n "$target_alias" &&
14531   test "$program_prefix$program_suffix$program_transform_name" = \
14532     NONENONEs,x,x, &&
14533   program_prefix=${target_alias}-
14534 
14535   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14536   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14537   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14538   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14539   # to use the configure naming style.
14540 
14541 
14542 
14543 
14544 
14545   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14546   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14547   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14548   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14549   OPENJDK_TARGET_AUTOCONF_NAME="$host"
14550   OPENJDK_BUILD_AUTOCONF_NAME="$build"
14551 
14552 
14553 
14554   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14555 
14556   case "$build_os" in
14557     *linux*)
14558       VAR_OS=linux
14559       VAR_OS_TYPE=unix
14560       ;;
14561     *solaris*)
14562       VAR_OS=solaris
14563       VAR_OS_TYPE=unix
14564       ;;
14565     *darwin*)
14566       VAR_OS=macosx
14567       VAR_OS_TYPE=unix
14568       ;;
14569     *bsd*)
14570       VAR_OS=bsd
14571       VAR_OS_TYPE=unix
14572       ;;
14573     *cygwin*)
14574       VAR_OS=windows
14575       VAR_OS_ENV=windows.cygwin
14576       ;;
14577     *mingw*)
14578       VAR_OS=windows
14579       VAR_OS_ENV=windows.msys
14580       ;;
14581     *aix*)
14582       VAR_OS=aix
14583       VAR_OS_TYPE=unix
14584       ;;
14585     *)
14586       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14587       ;;
14588   esac
14589 
14590 
14591   # First argument is the cpu name from the trip/quad
14592   case "$build_cpu" in
14593     x86_64)
14594       VAR_CPU=x86_64
14595       VAR_CPU_ARCH=x86
14596       VAR_CPU_BITS=64
14597       VAR_CPU_ENDIAN=little
14598       ;;
14599     i?86)
14600       VAR_CPU=x86
14601       VAR_CPU_ARCH=x86
14602       VAR_CPU_BITS=32
14603       VAR_CPU_ENDIAN=little
14604       ;;
14605     arm*)
14606       VAR_CPU=arm
14607       VAR_CPU_ARCH=arm
14608       VAR_CPU_BITS=32
14609       VAR_CPU_ENDIAN=little
14610       ;;
14611     aarch64)
14612       VAR_CPU=aarch64
14613       VAR_CPU_ARCH=aarch64
14614       VAR_CPU_BITS=64
14615       VAR_CPU_ENDIAN=little
14616       ;;
14617     powerpc)
14618       VAR_CPU=ppc
14619       VAR_CPU_ARCH=ppc
14620       VAR_CPU_BITS=32
14621       VAR_CPU_ENDIAN=big
14622       ;;
14623     powerpc64)
14624       VAR_CPU=ppc64
14625       VAR_CPU_ARCH=ppc
14626       VAR_CPU_BITS=64
14627       VAR_CPU_ENDIAN=big
14628       ;;
14629     powerpc64le)
14630       VAR_CPU=ppc64
14631       VAR_CPU_ARCH=ppc
14632       VAR_CPU_BITS=64
14633       VAR_CPU_ENDIAN=little
14634       ;;
14635     s390)
14636       VAR_CPU=s390
14637       VAR_CPU_ARCH=s390
14638       VAR_CPU_BITS=32
14639       VAR_CPU_ENDIAN=big
14640       ;;
14641     s390x)
14642       VAR_CPU=s390x
14643       VAR_CPU_ARCH=s390
14644       VAR_CPU_BITS=64
14645       VAR_CPU_ENDIAN=big
14646       ;;
14647     sparc)
14648       VAR_CPU=sparc
14649       VAR_CPU_ARCH=sparc
14650       VAR_CPU_BITS=32
14651       VAR_CPU_ENDIAN=big
14652       ;;
14653     sparcv9|sparc64)
14654       VAR_CPU=sparcv9
14655       VAR_CPU_ARCH=sparc
14656       VAR_CPU_BITS=64
14657       VAR_CPU_ENDIAN=big
14658       ;;
14659     *)
14660       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14661       ;;
14662   esac
14663 
14664   # ..and setup our own variables. (Do this explicitely to facilitate searching)
14665   OPENJDK_BUILD_OS="$VAR_OS"
14666   if test "x$VAR_OS_TYPE" != x; then
14667     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14668   else
14669     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14670   fi
14671   if test "x$VAR_OS_ENV" != x; then
14672     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14673   else
14674     OPENJDK_BUILD_OS_ENV="$VAR_OS"
14675   fi
14676   OPENJDK_BUILD_CPU="$VAR_CPU"
14677   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14678   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14679   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14680 
14681 
14682 
14683 
14684 
14685 
14686 
14687 
14688   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14689 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
14690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14691 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14692 
14693   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14694 
14695   case "$host_os" in
14696     *linux*)
14697       VAR_OS=linux
14698       VAR_OS_TYPE=unix
14699       ;;
14700     *solaris*)
14701       VAR_OS=solaris
14702       VAR_OS_TYPE=unix
14703       ;;
14704     *darwin*)
14705       VAR_OS=macosx
14706       VAR_OS_TYPE=unix
14707       ;;
14708     *bsd*)
14709       VAR_OS=bsd
14710       VAR_OS_TYPE=unix
14711       ;;
14712     *cygwin*)
14713       VAR_OS=windows
14714       VAR_OS_ENV=windows.cygwin
14715       ;;
14716     *mingw*)
14717       VAR_OS=windows
14718       VAR_OS_ENV=windows.msys
14719       ;;
14720     *aix*)
14721       VAR_OS=aix
14722       VAR_OS_TYPE=unix
14723       ;;
14724     *)
14725       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14726       ;;
14727   esac
14728 
14729 
14730   # First argument is the cpu name from the trip/quad
14731   case "$host_cpu" in
14732     x86_64)
14733       VAR_CPU=x86_64
14734       VAR_CPU_ARCH=x86
14735       VAR_CPU_BITS=64
14736       VAR_CPU_ENDIAN=little
14737       ;;
14738     i?86)
14739       VAR_CPU=x86
14740       VAR_CPU_ARCH=x86
14741       VAR_CPU_BITS=32
14742       VAR_CPU_ENDIAN=little
14743       ;;
14744     arm*)
14745       VAR_CPU=arm
14746       VAR_CPU_ARCH=arm
14747       VAR_CPU_BITS=32
14748       VAR_CPU_ENDIAN=little
14749       ;;
14750     aarch64)
14751       VAR_CPU=aarch64
14752       VAR_CPU_ARCH=aarch64
14753       VAR_CPU_BITS=64
14754       VAR_CPU_ENDIAN=little
14755       ;;
14756     powerpc)
14757       VAR_CPU=ppc
14758       VAR_CPU_ARCH=ppc
14759       VAR_CPU_BITS=32
14760       VAR_CPU_ENDIAN=big
14761       ;;
14762     powerpc64)
14763       VAR_CPU=ppc64
14764       VAR_CPU_ARCH=ppc
14765       VAR_CPU_BITS=64
14766       VAR_CPU_ENDIAN=big
14767       ;;
14768     powerpc64le)
14769       VAR_CPU=ppc64
14770       VAR_CPU_ARCH=ppc
14771       VAR_CPU_BITS=64
14772       VAR_CPU_ENDIAN=little
14773       ;;
14774     s390)
14775       VAR_CPU=s390
14776       VAR_CPU_ARCH=s390
14777       VAR_CPU_BITS=32
14778       VAR_CPU_ENDIAN=big
14779       ;;
14780     s390x)
14781       VAR_CPU=s390x
14782       VAR_CPU_ARCH=s390
14783       VAR_CPU_BITS=64
14784       VAR_CPU_ENDIAN=big
14785       ;;
14786     sparc)
14787       VAR_CPU=sparc
14788       VAR_CPU_ARCH=sparc
14789       VAR_CPU_BITS=32
14790       VAR_CPU_ENDIAN=big
14791       ;;
14792     sparcv9|sparc64)
14793       VAR_CPU=sparcv9
14794       VAR_CPU_ARCH=sparc
14795       VAR_CPU_BITS=64
14796       VAR_CPU_ENDIAN=big
14797       ;;
14798     *)
14799       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14800       ;;
14801   esac
14802 
14803   # ... and setup our own variables. (Do this explicitely to facilitate searching)
14804   OPENJDK_TARGET_OS="$VAR_OS"
14805   if test "x$VAR_OS_TYPE" != x; then
14806     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14807   else
14808     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14809   fi
14810   if test "x$VAR_OS_ENV" != x; then
14811     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14812   else
14813     OPENJDK_TARGET_OS_ENV="$VAR_OS"
14814   fi
14815   OPENJDK_TARGET_CPU="$VAR_CPU"
14816   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14817   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14818   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14819 
14820 
14821 
14822 
14823 
14824 
14825 
14826 
14827   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14828 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
14829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14830 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14831 
14832 
14833 
14834 # Check whether --with-target-bits was given.
14835 if test "${with_target_bits+set}" = set; then :
14836   withval=$with_target_bits;
14837 fi
14838 
14839 
14840   # We have three types of compiles:
14841   # native  == normal compilation, target system == build system
14842   # cross   == traditional cross compilation, target system != build system; special toolchain needed
14843   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14844   #
14845   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14846     # We're doing a proper cross-compilation
14847     COMPILE_TYPE="cross"
14848   else
14849     COMPILE_TYPE="native"
14850   fi
14851 
14852   if test "x$with_target_bits" != x; then
14853     if test "x$COMPILE_TYPE" = "xcross"; then
14854       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14855     fi
14856 
14857     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14858       # A reduced build is requested
14859       COMPILE_TYPE="reduced"
14860       OPENJDK_TARGET_CPU_BITS=32
14861       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14862         OPENJDK_TARGET_CPU=x86
14863       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14864         OPENJDK_TARGET_CPU=sparc
14865       else
14866         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14867       fi
14868     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14869       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
14870     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14871       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14872 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14873     else
14874       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14875     fi
14876   fi
14877 
14878 
14879   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14880 $as_echo_n "checking compilation type... " >&6; }
14881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14882 $as_echo "$COMPILE_TYPE" >&6; }
14883 
14884 
14885   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14886     REQUIRED_OS_NAME=SunOS
14887     REQUIRED_OS_VERSION=5.10
14888   fi
14889   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14890     REQUIRED_OS_NAME=Linux
14891     REQUIRED_OS_VERSION=2.6
14892   fi
14893   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14894     REQUIRED_OS_NAME=Windows
14895     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14896       REQUIRED_OS_VERSION=5.2
14897     else
14898       REQUIRED_OS_VERSION=5.1
14899     fi
14900   fi
14901   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14902     REQUIRED_OS_NAME=Darwin
14903     REQUIRED_OS_VERSION=11.2
14904   fi
14905 
14906 
14907 
14908 
14909 
14910   # Also store the legacy naming of the cpu.
14911   # Ie i586 and amd64 instead of x86 and x86_64
14912   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14913   if test "x$OPENJDK_TARGET_CPU" = xx86; then
14914     OPENJDK_TARGET_CPU_LEGACY="i586"
14915   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14916     # On all platforms except MacOSX replace x86_64 with amd64.
14917     OPENJDK_TARGET_CPU_LEGACY="amd64"
14918   fi
14919 
14920 
14921   # And the second legacy naming of the cpu.
14922   # Ie i386 and amd64 instead of x86 and x86_64.
14923   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14924   if test "x$OPENJDK_TARGET_CPU" = xx86; then
14925     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14926   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14927     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14928   fi
14929 
14930 
14931   # This is the name of the cpu (but using i386 and amd64 instead of
14932   # x86 and x86_64, respectively), preceeded by a /, to be used when
14933   # locating libraries. On macosx, it's empty, though.
14934   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14935   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14936     OPENJDK_TARGET_CPU_LIBDIR=""
14937   fi
14938 
14939 
14940   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14941   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14942   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14943   OPENJDK_TARGET_CPU_ISADIR=""
14944   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14945     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14946       OPENJDK_TARGET_CPU_ISADIR="/amd64"
14947     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14948       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14949     fi
14950   fi
14951 
14952 
14953   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14954   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14955   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14956     # On linux only, we replace x86 with i386.
14957     OPENJDK_TARGET_CPU_OSARCH="i386"
14958   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14959     # On all platforms except macosx, we replace x86_64 with amd64.
14960     OPENJDK_TARGET_CPU_OSARCH="amd64"
14961   fi
14962 
14963 
14964   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14965   if test "x$OPENJDK_TARGET_CPU" = xx86; then
14966     OPENJDK_TARGET_CPU_JLI="i386"
14967   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14968     # On all platforms except macosx, we replace x86_64 with amd64.
14969     OPENJDK_TARGET_CPU_JLI="amd64"
14970   fi
14971   # Now setup the -D flags for building libjli.
14972   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14973   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14974     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14975       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14976     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14977       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14978     fi
14979   fi
14980 
14981 
14982   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14983       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14984   else
14985       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14986   fi
14987 
14988 
14989   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14990     A_LP64="LP64:="
14991     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14992     # unpack200.exe
14993     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14994       ADD_LP64="-D_LP64=1"
14995     fi
14996   fi
14997   LP64=$A_LP64
14998 
14999 
15000   if test "x$COMPILE_TYPE" = "xcross"; then
15001     # FIXME: ... or should this include reduced builds..?
15002     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15003   else
15004     DEFINE_CROSS_COMPILE_ARCH=""
15005   fi
15006 
15007 
15008   # ZERO_ARCHDEF is used to enable architecture-specific code
15009   case "${OPENJDK_TARGET_CPU}" in
15010     ppc)     ZERO_ARCHDEF=PPC32 ;;
15011     ppc64)   ZERO_ARCHDEF=PPC64 ;;
15012     s390*)   ZERO_ARCHDEF=S390  ;;
15013     sparc*)  ZERO_ARCHDEF=SPARC ;;
15014     x86_64*) ZERO_ARCHDEF=AMD64 ;;
15015     x86)     ZERO_ARCHDEF=IA32  ;;
15016     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15017   esac
15018 
15019 
15020 
15021 
15022 # Continue setting up basic stuff. Most remaining code require fundamental tools.
15023 
15024   # Save the current directory this script was started from
15025   CURDIR="$PWD"
15026 
15027   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15028   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15029   # was not available at that time.
15030   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15031   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15032     ORIGINAL_PATH="$REWRITTEN_PATH"
15033     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15034 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15035   fi
15036 
15037   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15038     PATH_SEP=";"
15039 
15040   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15041   if test $SRC_ROOT_LENGTH -gt 100; then
15042     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15043   fi
15044 
15045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15046     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15047 $as_echo_n "checking cygwin release... " >&6; }
15048     CYGWIN_VERSION=`$UNAME -r`
15049     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15050 $as_echo "$CYGWIN_VERSION" >&6; }
15051     WINDOWS_ENV_VENDOR='cygwin'
15052     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15053 
15054     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15055     if test "x$CYGWIN_VERSION_OLD" != x; then
15056       { $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
15057 $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;}
15058       as_fn_error $? "Cannot continue" "$LINENO" 5
15059     fi
15060     if test "x$CYGPATH" = x; then
15061       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15062     fi
15063     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15064 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15065     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15066     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15067     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15068     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15069     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15070 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
15071     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15072     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15073     if test "x$test_cygdrive_prefix" = x; then
15074       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15075     fi
15076   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15077     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15078 $as_echo_n "checking msys release... " >&6; }
15079     MSYS_VERSION=`$UNAME -r`
15080     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15081 $as_echo "$MSYS_VERSION" >&6; }
15082 
15083     WINDOWS_ENV_VENDOR='msys'
15084     WINDOWS_ENV_VERSION="$MSYS_VERSION"
15085 
15086     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15087 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
15088     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15089     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15090 
15091   windows_path="$MSYS_ROOT_PATH"
15092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15093     unix_path=`$CYGPATH -u "$windows_path"`
15094     MSYS_ROOT_PATH="$unix_path"
15095   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15096     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15097     MSYS_ROOT_PATH="$unix_path"
15098   fi
15099 
15100     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15101 $as_echo "$MSYS_ROOT_PATH" >&6; }
15102     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15103   else
15104     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15105   fi
15106 
15107   # Test if windows or unix (cygwin/msys) find is first in path.
15108   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15109 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15110   FIND_BINARY_OUTPUT=`find --version 2>&1`
15111   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15112     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15113 $as_echo "unix style" >&6; }
15114   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15115     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15116 $as_echo "Windows" >&6; }
15117     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15118 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15119     { $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
15120 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15121     as_fn_error $? "Cannot continue" "$LINENO" 5
15122   else
15123     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15124 $as_echo "unknown" >&6; }
15125     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15126 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15127   fi
15128 
15129   else
15130     PATH_SEP=":"
15131   fi
15132 
15133 
15134   # We get the top-level directory from the supporting wrappers.
15135   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15136 $as_echo_n "checking for top-level directory... " >&6; }
15137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15138 $as_echo "$TOPDIR" >&6; }
15139 
15140 
15141   # Save the original version of TOPDIR for string comparisons
15142   ORIGINAL_TOPDIR="$TOPDIR"
15143 
15144 
15145   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15146 
15147   # Only process if variable expands to non-empty
15148 
15149   if test "x$CURDIR" != x; then
15150     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15151 
15152   # Input might be given as Windows format, start by converting to
15153   # unix format.
15154   path="$CURDIR"
15155   new_path=`$CYGPATH -u "$path"`
15156 
15157   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15158   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15159   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15160   # "foo.exe" is OK but "foo" is an error.
15161   #
15162   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15163   # It is also a way to make sure we got the proper file name for the real test later on.
15164   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15165   if test "x$test_shortpath" = x; then
15166     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15167 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15168     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15169   fi
15170 
15171   # Call helper function which possibly converts this using DOS-style short mode.
15172   # If so, the updated path is stored in $new_path.
15173 
15174   input_path="$new_path"
15175   # Check if we need to convert this using DOS-style short mode. If the path
15176   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15177   # take no chances and rewrite it.
15178   # Note: m4 eats our [], so we need to use [ and ] instead.
15179   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15180   if test "x$has_forbidden_chars" != x; then
15181     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15182     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15183     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15184     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15185       # Going to short mode and back again did indeed matter. Since short mode is
15186       # case insensitive, let's make it lowercase to improve readability.
15187       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15188       # Now convert it back to Unix-style (cygpath)
15189       input_path=`$CYGPATH -u "$shortmode_path"`
15190       new_path="$input_path"
15191     fi
15192   fi
15193 
15194   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15195   if test "x$test_cygdrive_prefix" = x; then
15196     # As a simple fix, exclude /usr/bin since it's not a real path.
15197     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15198       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15199       # a path prefixed by /cygdrive for fixpath to work.
15200       new_path="$CYGWIN_ROOT_PATH$input_path"
15201     fi
15202   fi
15203 
15204 
15205   if test "x$path" != "x$new_path"; then
15206     CURDIR="$new_path"
15207     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15208 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15209   fi
15210 
15211     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15212 
15213   path="$CURDIR"
15214   has_colon=`$ECHO $path | $GREP ^.:`
15215   new_path="$path"
15216   if test "x$has_colon" = x; then
15217     # Not in mixed or Windows style, start by that.
15218     new_path=`cmd //c echo $path`
15219   fi
15220 
15221 
15222   input_path="$new_path"
15223   # Check if we need to convert this using DOS-style short mode. If the path
15224   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15225   # take no chances and rewrite it.
15226   # Note: m4 eats our [], so we need to use [ and ] instead.
15227   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15228   if test "x$has_forbidden_chars" != x; then
15229     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15230     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15231   fi
15232 
15233 
15234   windows_path="$new_path"
15235   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15236     unix_path=`$CYGPATH -u "$windows_path"`
15237     new_path="$unix_path"
15238   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15239     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15240     new_path="$unix_path"
15241   fi
15242 
15243   if test "x$path" != "x$new_path"; then
15244     CURDIR="$new_path"
15245     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15246 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15247   fi
15248 
15249   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15250   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15251 
15252     else
15253       # We're on a unix platform. Hooray! :)
15254       path="$CURDIR"
15255       has_space=`$ECHO "$path" | $GREP " "`
15256       if test "x$has_space" != x; then
15257         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15258 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15259         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15260       fi
15261 
15262       # Use eval to expand a potential ~
15263       eval path="$path"
15264       if test ! -f "$path" && test ! -d "$path"; then
15265         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15266       fi
15267 
15268       CURDIR="`cd "$path"; $THEPWDCMD -L`"
15269     fi
15270   fi
15271 
15272 
15273   # Only process if variable expands to non-empty
15274 
15275   if test "x$TOPDIR" != x; then
15276     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15277 
15278   # Input might be given as Windows format, start by converting to
15279   # unix format.
15280   path="$TOPDIR"
15281   new_path=`$CYGPATH -u "$path"`
15282 
15283   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15284   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15285   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15286   # "foo.exe" is OK but "foo" is an error.
15287   #
15288   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15289   # It is also a way to make sure we got the proper file name for the real test later on.
15290   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15291   if test "x$test_shortpath" = x; then
15292     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15293 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15294     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15295   fi
15296 
15297   # Call helper function which possibly converts this using DOS-style short mode.
15298   # If so, the updated path is stored in $new_path.
15299 
15300   input_path="$new_path"
15301   # Check if we need to convert this using DOS-style short mode. If the path
15302   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15303   # take no chances and rewrite it.
15304   # Note: m4 eats our [], so we need to use [ and ] instead.
15305   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15306   if test "x$has_forbidden_chars" != x; then
15307     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15308     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15309     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15310     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15311       # Going to short mode and back again did indeed matter. Since short mode is
15312       # case insensitive, let's make it lowercase to improve readability.
15313       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15314       # Now convert it back to Unix-style (cygpath)
15315       input_path=`$CYGPATH -u "$shortmode_path"`
15316       new_path="$input_path"
15317     fi
15318   fi
15319 
15320   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15321   if test "x$test_cygdrive_prefix" = x; then
15322     # As a simple fix, exclude /usr/bin since it's not a real path.
15323     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15324       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15325       # a path prefixed by /cygdrive for fixpath to work.
15326       new_path="$CYGWIN_ROOT_PATH$input_path"
15327     fi
15328   fi
15329 
15330 
15331   if test "x$path" != "x$new_path"; then
15332     TOPDIR="$new_path"
15333     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15334 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15335   fi
15336 
15337     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15338 
15339   path="$TOPDIR"
15340   has_colon=`$ECHO $path | $GREP ^.:`
15341   new_path="$path"
15342   if test "x$has_colon" = x; then
15343     # Not in mixed or Windows style, start by that.
15344     new_path=`cmd //c echo $path`
15345   fi
15346 
15347 
15348   input_path="$new_path"
15349   # Check if we need to convert this using DOS-style short mode. If the path
15350   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15351   # take no chances and rewrite it.
15352   # Note: m4 eats our [], so we need to use [ and ] instead.
15353   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15354   if test "x$has_forbidden_chars" != x; then
15355     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15356     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15357   fi
15358 
15359 
15360   windows_path="$new_path"
15361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15362     unix_path=`$CYGPATH -u "$windows_path"`
15363     new_path="$unix_path"
15364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15366     new_path="$unix_path"
15367   fi
15368 
15369   if test "x$path" != "x$new_path"; then
15370     TOPDIR="$new_path"
15371     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15372 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15373   fi
15374 
15375   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15376   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15377 
15378     else
15379       # We're on a unix platform. Hooray! :)
15380       path="$TOPDIR"
15381       has_space=`$ECHO "$path" | $GREP " "`
15382       if test "x$has_space" != x; then
15383         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15384 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15385         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15386       fi
15387 
15388       # Use eval to expand a potential ~
15389       eval path="$path"
15390       if test ! -f "$path" && test ! -d "$path"; then
15391         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15392       fi
15393 
15394       TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15395     fi
15396   fi
15397 
15398   # SRC_ROOT is a traditional alias for TOPDIR.
15399   SRC_ROOT=$TOPDIR
15400 
15401   # Calculate a canonical version of TOPDIR for string comparisons
15402   CANONICAL_TOPDIR=$TOPDIR
15403 
15404   if test "x$OPENJDK_BUILD_OS" != xwindows; then
15405     # Follow a chain of symbolic links. Use readlink
15406     # where it exists, else fall back to horribly
15407     # complicated shell code.
15408     if test "x$READLINK_TESTED" != yes; then
15409       # On MacOSX there is a readlink tool with a different
15410       # purpose than the GNU readlink tool. Check the found readlink.
15411       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15412       if test "x$ISGNU" = x; then
15413         # A readlink that we do not know how to use.
15414         # Are there other non-GNU readlinks out there?
15415         READLINK_TESTED=yes
15416         READLINK=
15417       fi
15418     fi
15419 
15420     if test "x$READLINK" != x; then
15421       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15422     else
15423       # Save the current directory for restoring afterwards
15424       STARTDIR=$PWD
15425       COUNTER=0
15426       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15427       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15428       cd $sym_link_dir
15429       # Use -P flag to resolve symlinks in directories.
15430       cd `$THEPWDCMD -P`
15431       sym_link_dir=`$THEPWDCMD -P`
15432       # Resolve file symlinks
15433       while test $COUNTER -lt 20; do
15434         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15435         if test "x$ISLINK" == x; then
15436           # This is not a symbolic link! We are done!
15437           break
15438         fi
15439         # Again resolve directory symlinks since the target of the just found
15440         # link could be in a different directory
15441         cd `$DIRNAME $ISLINK`
15442         sym_link_dir=`$THEPWDCMD -P`
15443         sym_link_file=`$BASENAME $ISLINK`
15444         let COUNTER=COUNTER+1
15445       done
15446       cd $STARTDIR
15447       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15448     fi
15449   fi
15450 
15451 
15452 
15453   # Locate the directory of this script.
15454   AUTOCONF_DIR=$TOPDIR/common/autoconf
15455 
15456 
15457 # Check if it's a pure open build or if custom sources are to be used.
15458 
15459   # Check whether --enable-openjdk-only was given.
15460 if test "${enable_openjdk_only+set}" = set; then :
15461   enableval=$enable_openjdk_only;
15462 else
15463   enable_openjdk_only="no"
15464 fi
15465 
15466 
15467   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15468 $as_echo_n "checking for presence of closed sources... " >&6; }
15469   if test -d "$SRC_ROOT/jdk/src/closed"; then
15470     CLOSED_SOURCE_PRESENT=yes
15471   else
15472     CLOSED_SOURCE_PRESENT=no
15473   fi
15474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15475 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15476 
15477   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15478 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15479   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15481 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15482 
15483   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15484     OPENJDK=true
15485     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15486       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15487 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15488     fi
15489   else
15490     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15491       OPENJDK=true
15492     else
15493       OPENJDK=false
15494     fi
15495   fi
15496 
15497   if test "x$OPENJDK" = "xtrue"; then
15498     SET_OPENJDK="OPENJDK=true"
15499   fi
15500 
15501 
15502 
15503   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15504   # the IncludeCustomExtension macro.
15505 
15506 
15507 # Check whether --with-custom-make-dir was given.
15508 if test "${with_custom_make_dir+set}" = set; then :
15509   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
15510 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15511 fi
15512 
15513 
15514 
15515 
15516 # These are needed to be able to create a configuration name (and thus the output directory)
15517 
15518   ###############################################################################
15519   #
15520   # Check which variant of the JDK that we want to build.
15521   # Currently we have:
15522   #    normal:   standard edition
15523   # but the custom make system may add other variants
15524   #
15525   # Effectively the JDK variant gives a name to a specific set of
15526   # modules to compile into the JDK. In the future, these modules
15527   # might even be Jigsaw modules.
15528   #
15529   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15530 $as_echo_n "checking which variant of the JDK to build... " >&6; }
15531 
15532 # Check whether --with-jdk-variant was given.
15533 if test "${with_jdk_variant+set}" = set; then :
15534   withval=$with_jdk_variant;
15535 fi
15536 
15537 
15538   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15539     JDK_VARIANT="normal"
15540   else
15541     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15542   fi
15543 
15544 
15545 
15546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15547 $as_echo "$JDK_VARIANT" >&6; }
15548 
15549 
15550 ###############################################################################
15551 #
15552 # Check which interpreter of the JVM we want to build.
15553 # Currently we have:
15554 #    template: Template interpreter (the default)
15555 #    cpp     : C++ interpreter
15556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15557 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15558 
15559 # Check whether --with-jvm-interpreter was given.
15560 if test "${with_jvm_interpreter+set}" = set; then :
15561   withval=$with_jvm_interpreter;
15562 fi
15563 
15564 
15565 if test "x$with_jvm_interpreter" = x; then
15566      with_jvm_interpreter="template"
15567 fi
15568 
15569 JVM_INTERPRETER="$with_jvm_interpreter"
15570 
15571 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15572    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15573 fi
15574 
15575 
15576 
15577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15578 $as_echo "$with_jvm_interpreter" >&6; }
15579 
15580 
15581 
15582   ###############################################################################
15583   #
15584   # Check which variants of the JVM that we want to build.
15585   # Currently we have:
15586   #    server: normal interpreter and a tiered C1/C2 compiler
15587   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15588   #    minimal1: reduced form of client with optional VM services and features stripped out
15589   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15590   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15591   #    zero: no machine code interpreter, no compiler
15592   #    zeroshark: zero interpreter and shark/llvm compiler backend
15593 #    core: interpreter only, no compiler (only works on some platforms)
15594   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15595 $as_echo_n "checking which variants of the JVM to build... " >&6; }
15596 
15597 # Check whether --with-jvm-variants was given.
15598 if test "${with_jvm_variants+set}" = set; then :
15599   withval=$with_jvm_variants;
15600 fi
15601 
15602 
15603   if test "x$with_jvm_variants" = x; then
15604     with_jvm_variants="server"
15605   fi
15606 
15607   JVM_VARIANTS=",$with_jvm_variants,"
15608   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,//'`
15609 
15610   if test "x$TEST_VARIANTS" != "x,"; then
15611      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15612   fi
15613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15614 $as_echo "$with_jvm_variants" >&6; }
15615 
15616   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15617   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15618   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15619   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15620   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15621   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15622   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15623 
15624   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15625     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15626       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15627     fi
15628   fi
15629   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15630     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15631       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15632     fi
15633   fi
15634   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15635     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15636       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15637     fi
15638   fi
15639 
15640   # Replace the commas with AND for use in the build directory name.
15641   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15642   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/'`
15643   if test "x$COUNT_VARIANTS" != "x,1"; then
15644     BUILDING_MULTIPLE_JVM_VARIANTS=yes
15645   else
15646     BUILDING_MULTIPLE_JVM_VARIANTS=no
15647   fi
15648 
15649 
15650 
15651 
15652 
15653 
15654 
15655 
15656 
15657 
15658   INCLUDE_SA=true
15659   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15660     INCLUDE_SA=false
15661   fi
15662   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15663     INCLUDE_SA=false
15664   fi
15665   if test "x$OPENJDK_TARGET_OS" = xaix ; then
15666     INCLUDE_SA=false
15667   fi
15668   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15669     INCLUDE_SA=false
15670   fi
15671 
15672 
15673   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15674     MACOSX_UNIVERSAL="true"
15675   fi
15676 
15677 
15678 
15679 
15680   ###############################################################################
15681   #
15682   # Set the debug level
15683   #    release: no debug information, all optimizations, no asserts.
15684   #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15685   #    fastdebug: debug information (-g), all optimizations, all asserts
15686   #    slowdebug: debug information (-g), no optimizations, all asserts
15687   #
15688   DEBUG_LEVEL="release"
15689   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15690 $as_echo_n "checking which debug level to use... " >&6; }
15691   # Check whether --enable-debug was given.
15692 if test "${enable_debug+set}" = set; then :
15693   enableval=$enable_debug;
15694         ENABLE_DEBUG="${enableval}"
15695         DEBUG_LEVEL="fastdebug"
15696 
15697 else
15698   ENABLE_DEBUG="no"
15699 fi
15700 
15701 
15702 
15703 # Check whether --with-debug-level was given.
15704 if test "${with_debug_level+set}" = set; then :
15705   withval=$with_debug_level;
15706         DEBUG_LEVEL="${withval}"
15707         if test "x$ENABLE_DEBUG" = xyes; then
15708           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15709         fi
15710 
15711 fi
15712 
15713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15714 $as_echo "$DEBUG_LEVEL" >&6; }
15715 
15716   if test "x$DEBUG_LEVEL" != xrelease && \
15717       test "x$DEBUG_LEVEL" != xoptimized && \
15718       test "x$DEBUG_LEVEL" != xfastdebug && \
15719       test "x$DEBUG_LEVEL" != xslowdebug; then
15720     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15721   fi
15722 
15723 
15724   ###############################################################################
15725   #
15726   # Setup legacy vars/targets and new vars to deal with different debug levels.
15727   #
15728 
15729   case $DEBUG_LEVEL in
15730     release )
15731       VARIANT="OPT"
15732       FASTDEBUG="false"
15733       DEBUG_CLASSFILES="false"
15734       BUILD_VARIANT_RELEASE=""
15735       HOTSPOT_DEBUG_LEVEL="product"
15736       HOTSPOT_EXPORT="product"
15737       ;;
15738     fastdebug )
15739       VARIANT="DBG"
15740       FASTDEBUG="true"
15741       DEBUG_CLASSFILES="true"
15742       BUILD_VARIANT_RELEASE="-fastdebug"
15743       HOTSPOT_DEBUG_LEVEL="fastdebug"
15744       HOTSPOT_EXPORT="fastdebug"
15745       ;;
15746     slowdebug )
15747       VARIANT="DBG"
15748       FASTDEBUG="false"
15749       DEBUG_CLASSFILES="true"
15750       BUILD_VARIANT_RELEASE="-debug"
15751       HOTSPOT_DEBUG_LEVEL="debug"
15752       HOTSPOT_EXPORT="debug"
15753       ;;
15754     optimized )
15755       VARIANT="OPT"
15756       FASTDEBUG="false"
15757       DEBUG_CLASSFILES="false"
15758       BUILD_VARIANT_RELEASE="-optimized"
15759       HOTSPOT_DEBUG_LEVEL="optimized"
15760       HOTSPOT_EXPORT="optimized"
15761       ;;
15762   esac
15763 
15764   # The debug level 'optimized' is a little special because it is currently only
15765   # applicable to the HotSpot build where it means to build a completely
15766   # optimized version of the VM without any debugging code (like for the
15767   # 'release' debug level which is called 'product' in the HotSpot build) but
15768   # with the exception that it can contain additional code which is otherwise
15769   # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15770   # test new and/or experimental features which are not intended for customer
15771   # shipment. Because these new features need to be tested and benchmarked in
15772   # real world scenarios, we want to build the containing JDK at the 'release'
15773   # debug level.
15774   if test "x$DEBUG_LEVEL" = xoptimized; then
15775     DEBUG_LEVEL="release"
15776   fi
15777 
15778   #####
15779   # Generate the legacy makefile targets for hotspot.
15780   # The hotspot api for selecting the build artifacts, really, needs to be improved.
15781   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15782   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15783   # But until then ...
15784   HOTSPOT_TARGET=""
15785 
15786   if test "x$JVM_VARIANT_SERVER" = xtrue; then
15787     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15788   fi
15789 
15790   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15791     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15792   fi
15793 
15794   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15795     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15796   fi
15797 
15798   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15799     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15800   fi
15801 
15802   if test "x$JVM_VARIANT_ZERO" = xtrue; then
15803     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15804   fi
15805 
15806   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15807     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15808   fi
15809 
15810   if test "x$JVM_VARIANT_CORE" = xtrue; then
15811     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15812   fi
15813 
15814   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15815 
15816   # On Macosx universal binaries are produced, but they only contain
15817   # 64 bit intel. This invalidates control of which jvms are built
15818   # from configure, but only server is valid anyway. Fix this
15819   # when hotspot makefiles are rewritten.
15820   if test "x$MACOSX_UNIVERSAL" = xtrue; then
15821     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15822   fi
15823 
15824   #####
15825 
15826 
15827 
15828 
15829 
15830 
15831 
15832 
15833 # With basic setup done, call the custom early hook.
15834 
15835 
15836 # Check if we have devkits, extra paths or sysroot set.
15837 
15838 
15839 # Check whether --with-devkit was given.
15840 if test "${with_devkit+set}" = set; then :
15841   withval=$with_devkit;
15842 
15843   # Only process if variable expands to non-empty
15844 
15845   if test "x$with_devkit" != x; then
15846     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15847 
15848   # Input might be given as Windows format, start by converting to
15849   # unix format.
15850   path="$with_devkit"
15851   new_path=`$CYGPATH -u "$path"`
15852 
15853   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15854   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15855   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15856   # "foo.exe" is OK but "foo" is an error.
15857   #
15858   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15859   # It is also a way to make sure we got the proper file name for the real test later on.
15860   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15861   if test "x$test_shortpath" = x; then
15862     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15863 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15864     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15865   fi
15866 
15867   # Call helper function which possibly converts this using DOS-style short mode.
15868   # If so, the updated path is stored in $new_path.
15869 
15870   input_path="$new_path"
15871   # Check if we need to convert this using DOS-style short mode. If the path
15872   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15873   # take no chances and rewrite it.
15874   # Note: m4 eats our [], so we need to use [ and ] instead.
15875   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15876   if test "x$has_forbidden_chars" != x; then
15877     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15878     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15879     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15880     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15881       # Going to short mode and back again did indeed matter. Since short mode is
15882       # case insensitive, let's make it lowercase to improve readability.
15883       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15884       # Now convert it back to Unix-style (cygpath)
15885       input_path=`$CYGPATH -u "$shortmode_path"`
15886       new_path="$input_path"
15887     fi
15888   fi
15889 
15890   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15891   if test "x$test_cygdrive_prefix" = x; then
15892     # As a simple fix, exclude /usr/bin since it's not a real path.
15893     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15894       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15895       # a path prefixed by /cygdrive for fixpath to work.
15896       new_path="$CYGWIN_ROOT_PATH$input_path"
15897     fi
15898   fi
15899 
15900 
15901   if test "x$path" != "x$new_path"; then
15902     with_devkit="$new_path"
15903     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15904 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15905   fi
15906 
15907     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15908 
15909   path="$with_devkit"
15910   has_colon=`$ECHO $path | $GREP ^.:`
15911   new_path="$path"
15912   if test "x$has_colon" = x; then
15913     # Not in mixed or Windows style, start by that.
15914     new_path=`cmd //c echo $path`
15915   fi
15916 
15917 
15918   input_path="$new_path"
15919   # Check if we need to convert this using DOS-style short mode. If the path
15920   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15921   # take no chances and rewrite it.
15922   # Note: m4 eats our [], so we need to use [ and ] instead.
15923   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15924   if test "x$has_forbidden_chars" != x; then
15925     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15926     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15927   fi
15928 
15929 
15930   windows_path="$new_path"
15931   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15932     unix_path=`$CYGPATH -u "$windows_path"`
15933     new_path="$unix_path"
15934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15935     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15936     new_path="$unix_path"
15937   fi
15938 
15939   if test "x$path" != "x$new_path"; then
15940     with_devkit="$new_path"
15941     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15942 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15943   fi
15944 
15945   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15946   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15947 
15948     else
15949       # We're on a unix platform. Hooray! :)
15950       path="$with_devkit"
15951       has_space=`$ECHO "$path" | $GREP " "`
15952       if test "x$has_space" != x; then
15953         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15954 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15955         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15956       fi
15957 
15958       # Use eval to expand a potential ~
15959       eval path="$path"
15960       if test ! -f "$path" && test ! -d "$path"; then
15961         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15962       fi
15963 
15964       with_devkit="`cd "$path"; $THEPWDCMD -L`"
15965     fi
15966   fi
15967 
15968         DEVKIT_ROOT="$with_devkit"
15969         # Check for a meta data info file in the root of the devkit
15970         if test -f "$DEVKIT_ROOT/devkit.info"; then
15971           . $DEVKIT_ROOT/devkit.info
15972           # This potentially sets the following:
15973           # A descriptive name of the devkit
15974 
15975   if test "x$DEVKIT_NAME" = x; then
15976     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15977   fi
15978 
15979           # Corresponds to --with-extra-path
15980 
15981   if test "x$DEVKIT_EXTRA_PATH" = x; then
15982     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15983   fi
15984 
15985           # Corresponds to --with-toolchain-path
15986 
15987   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15988     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15989   fi
15990 
15991           # Corresponds to --with-sysroot
15992 
15993   if test "x$DEVKIT_SYSROOT" = x; then
15994     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15995   fi
15996 
15997 
15998           # Identifies the Visual Studio version in the devkit
15999 
16000   if test "x$DEVKIT_VS_VERSION" = x; then
16001     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16002   fi
16003 
16004           # The Visual Studio include environment variable
16005 
16006   if test "x$DEVKIT_VS_INCLUDE" = x; then
16007     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16008   fi
16009 
16010           # The Visual Studio lib environment variable
16011 
16012   if test "x$DEVKIT_VS_LIB" = x; then
16013     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16014   fi
16015 
16016           # Corresponds to --with-msvcr-dll
16017 
16018   if test "x$DEVKIT_MSVCR_DLL" = x; then
16019     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16020   fi
16021 
16022           # Corresponds to --with-msvcp-dll
16023 
16024   if test "x$DEVKIT_MSVCP_DLL" = x; then
16025     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16026   fi
16027 
16028         fi
16029 
16030         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16031 $as_echo_n "checking for devkit... " >&6; }
16032         if test "x$DEVKIT_NAME" != x; then
16033           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16034 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16035         else
16036           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16037 $as_echo "$DEVKIT_ROOT" >&6; }
16038         fi
16039 
16040 
16041   if test "x$DEVKIT_EXTRA_PATH" != x; then
16042     if test "x$EXTRA_PATH" = x; then
16043       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16044     else
16045       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16046     fi
16047   fi
16048 
16049 
16050         # Fallback default of just /bin if DEVKIT_PATH is not defined
16051         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16052           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16053         fi
16054 
16055   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16056     if test "x$TOOLCHAIN_PATH" = x; then
16057       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16058     else
16059       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16060     fi
16061   fi
16062 
16063 
16064         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16065         # places for backwards compatiblity.
16066         if test "x$DEVKIT_SYSROOT" != x; then
16067           SYSROOT="$DEVKIT_SYSROOT"
16068         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16069           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16070         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16071           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16072         fi
16073 
16074 
16075 fi
16076 
16077 
16078   # You can force the sysroot if the sysroot encoded into the compiler tools
16079   # is not correct.
16080 
16081 # Check whether --with-sys-root was given.
16082 if test "${with_sys_root+set}" = set; then :
16083   withval=$with_sys_root; SYSROOT=$with_sys_root
16084 
16085 fi
16086 
16087 
16088 
16089 # Check whether --with-sysroot was given.
16090 if test "${with_sysroot+set}" = set; then :
16091   withval=$with_sysroot; SYSROOT=$with_sysroot
16092 
16093 fi
16094 
16095 
16096 
16097 # Check whether --with-tools-dir was given.
16098 if test "${with_tools_dir+set}" = set; then :
16099   withval=$with_tools_dir;
16100   if test "x$with_tools_dir" != x; then
16101     if test "x$TOOLCHAIN_PATH" = x; then
16102       TOOLCHAIN_PATH="$with_tools_dir"
16103     else
16104       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16105     fi
16106   fi
16107 
16108 
16109 fi
16110 
16111 
16112 
16113 # Check whether --with-toolchain-path was given.
16114 if test "${with_toolchain_path+set}" = set; then :
16115   withval=$with_toolchain_path;
16116   if test "x$with_toolchain_path" != x; then
16117     if test "x$TOOLCHAIN_PATH" = x; then
16118       TOOLCHAIN_PATH="$with_toolchain_path"
16119     else
16120       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16121     fi
16122   fi
16123 
16124 
16125 fi
16126 
16127 
16128 
16129 # Check whether --with-extra-path was given.
16130 if test "${with_extra_path+set}" = set; then :
16131   withval=$with_extra_path;
16132   if test "x$with_extra_path" != x; then
16133     if test "x$EXTRA_PATH" = x; then
16134       EXTRA_PATH="$with_extra_path"
16135     else
16136       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16137     fi
16138   fi
16139 
16140 
16141 fi
16142 
16143 
16144   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16145     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16146     # If not, detect if Xcode is installed by running xcodebuild -version
16147     # if no Xcode installed, xcodebuild exits with 1
16148     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16149     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16150       # We need to use xcodebuild in the toolchain dir provided by the user, this will
16151       # fall back on the stub binary in /usr/bin/xcodebuild
16152       # Extract the first word of "xcodebuild", so it can be a program name with args.
16153 set dummy xcodebuild; ac_word=$2
16154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16155 $as_echo_n "checking for $ac_word... " >&6; }
16156 if ${ac_cv_path_XCODEBUILD+:} false; then :
16157   $as_echo_n "(cached) " >&6
16158 else
16159   case $XCODEBUILD in
16160   [\\/]* | ?:[\\/]*)
16161   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16162   ;;
16163   *)
16164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16165 for as_dir in $TOOLCHAIN_PATH
16166 do
16167   IFS=$as_save_IFS
16168   test -z "$as_dir" && as_dir=.
16169     for ac_exec_ext in '' $ac_executable_extensions; do
16170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16171     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16173     break 2
16174   fi
16175 done
16176   done
16177 IFS=$as_save_IFS
16178 
16179   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16180   ;;
16181 esac
16182 fi
16183 XCODEBUILD=$ac_cv_path_XCODEBUILD
16184 if test -n "$XCODEBUILD"; then
16185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16186 $as_echo "$XCODEBUILD" >&6; }
16187 else
16188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16189 $as_echo "no" >&6; }
16190 fi
16191 
16192 
16193     else
16194       # this should result in SYSROOT being empty, unless --with-sysroot is provided
16195       # when only the command line tools are installed there are no SDKs, so headers
16196       # are copied into the system frameworks
16197       XCODEBUILD=
16198 
16199     fi
16200 
16201     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16202 $as_echo_n "checking for sdk name... " >&6; }
16203 
16204 # Check whether --with-sdk-name was given.
16205 if test "${with_sdk_name+set}" = set; then :
16206   withval=$with_sdk_name; SDKNAME=$with_sdk_name
16207 
16208 fi
16209 
16210     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16211 $as_echo "$SDKNAME" >&6; }
16212 
16213     # if toolchain path is specified then don't rely on system headers, they may not compile
16214     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16215     test -z "$TOOLCHAIN_PATH" && \
16216       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16217 
16218     if test -z "$SYSROOT"; then
16219       if test -n "$XCODEBUILD"; then
16220         # if we don't have system headers, use default SDK name (last resort)
16221         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16222           SDKNAME=${SDKNAME:-macosx}
16223         fi
16224 
16225         if test -n "$SDKNAME"; then
16226           # Call xcodebuild to determine SYSROOT
16227           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16228         fi
16229       else
16230         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16231           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
16232         fi
16233       fi
16234     else
16235       # warn user if --with-sdk-name was also set
16236       if test -n "$with_sdk_name"; then
16237         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16238 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16239       fi
16240     fi
16241 
16242     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16243       # If no system framework headers, then SYSROOT must be set, or we won't build
16244       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
16245     fi
16246 
16247     # Perform a basic sanity test
16248     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16249       if test -z "$SYSROOT"; then
16250         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
16251       else
16252         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16253       fi
16254     fi
16255 
16256     # set SDKROOT too, Xcode tools will pick it up
16257     SDKROOT=$SYSROOT
16258 
16259   fi
16260 
16261   # Prepend the extra path to the global path
16262 
16263   if test "x$EXTRA_PATH" != x; then
16264     if test "x$PATH" = x; then
16265       PATH="$EXTRA_PATH"
16266     else
16267       PATH="$EXTRA_PATH:$PATH"
16268     fi
16269   fi
16270 
16271 
16272   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16273     # Add extra search paths on solaris for utilities like ar and as etc...
16274     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16275   fi
16276 
16277   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16278 $as_echo_n "checking for sysroot... " >&6; }
16279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16280 $as_echo "$SYSROOT" >&6; }
16281   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16282 $as_echo_n "checking for toolchain path... " >&6; }
16283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16284 $as_echo "$TOOLCHAIN_PATH" >&6; }
16285   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16286 $as_echo_n "checking for extra path... " >&6; }
16287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16288 $as_echo "$EXTRA_PATH" >&6; }
16289 
16290 
16291 # To properly create a configuration name, we need to have the OpenJDK target
16292 # and options (variants and debug level) parsed.
16293 
16294 
16295 
16296 # Check whether --with-conf-name was given.
16297 if test "${with_conf_name+set}" = set; then :
16298   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16299 fi
16300 
16301 
16302   # Test from where we are running configure, in or outside of src root.
16303   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16304 $as_echo_n "checking where to store configuration... " >&6; }
16305   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16306       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16307       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16308     # We are running configure from the src root.
16309     # Create a default ./build/target-variant-debuglevel output root.
16310     if test "x${CONF_NAME}" = x; then
16311       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16312 $as_echo "in default location" >&6; }
16313       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16314     else
16315       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16316 $as_echo "in build directory with custom name" >&6; }
16317     fi
16318     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16319     $MKDIR -p "$OUTPUT_ROOT"
16320     if test ! -d "$OUTPUT_ROOT"; then
16321       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16322     fi
16323   else
16324     # We are running configure from outside of the src dir.
16325     # Then use the current directory as output dir!
16326     # If configuration is situated in normal build directory, just use the build
16327     # directory name as configuration name, otherwise use the complete path.
16328     if test "x${CONF_NAME}" = x; then
16329       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16330     fi
16331     OUTPUT_ROOT="$CURDIR"
16332     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16333 $as_echo "in current directory" >&6; }
16334 
16335     # WARNING: This might be a bad thing to do. You need to be sure you want to
16336     # have a configuration in this directory. Do some sanity checks!
16337 
16338     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16339       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16340       # other files
16341       files_present=`$LS $OUTPUT_ROOT`
16342       # Configure has already touched config.log and confdefs.h in the current dir when this check
16343       # is performed.
16344       filtered_files=`$ECHO "$files_present" \
16345           | $SED -e 's/config.log//g' \
16346               -e 's/configure.log//g' \
16347               -e 's/confdefs.h//g' \
16348               -e 's/ //g' \
16349           | $TR -d '\n'`
16350       if test "x$filtered_files" != x; then
16351         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16352 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
16353         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16354 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16355         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16356 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16357         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16358 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16359         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16360 $as_echo "$as_me: seriously mess up just about everything." >&6;}
16361         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16362 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16363         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16364 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16365         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16366       fi
16367     fi
16368   fi
16369   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16370 $as_echo_n "checking what configuration name to use... " >&6; }
16371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16372 $as_echo "$CONF_NAME" >&6; }
16373 
16374 
16375   # Only process if variable expands to non-empty
16376 
16377   if test "x$OUTPUT_ROOT" != x; then
16378     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16379 
16380   # Input might be given as Windows format, start by converting to
16381   # unix format.
16382   path="$OUTPUT_ROOT"
16383   new_path=`$CYGPATH -u "$path"`
16384 
16385   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16386   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16387   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16388   # "foo.exe" is OK but "foo" is an error.
16389   #
16390   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16391   # It is also a way to make sure we got the proper file name for the real test later on.
16392   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16393   if test "x$test_shortpath" = x; then
16394     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16395 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16396     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16397   fi
16398 
16399   # Call helper function which possibly converts this using DOS-style short mode.
16400   # If so, the updated path is stored in $new_path.
16401 
16402   input_path="$new_path"
16403   # Check if we need to convert this using DOS-style short mode. If the path
16404   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16405   # take no chances and rewrite it.
16406   # Note: m4 eats our [], so we need to use [ and ] instead.
16407   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16408   if test "x$has_forbidden_chars" != x; then
16409     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16410     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16411     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16412     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16413       # Going to short mode and back again did indeed matter. Since short mode is
16414       # case insensitive, let's make it lowercase to improve readability.
16415       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16416       # Now convert it back to Unix-style (cygpath)
16417       input_path=`$CYGPATH -u "$shortmode_path"`
16418       new_path="$input_path"
16419     fi
16420   fi
16421 
16422   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16423   if test "x$test_cygdrive_prefix" = x; then
16424     # As a simple fix, exclude /usr/bin since it's not a real path.
16425     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16426       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16427       # a path prefixed by /cygdrive for fixpath to work.
16428       new_path="$CYGWIN_ROOT_PATH$input_path"
16429     fi
16430   fi
16431 
16432 
16433   if test "x$path" != "x$new_path"; then
16434     OUTPUT_ROOT="$new_path"
16435     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16436 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16437   fi
16438 
16439     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16440 
16441   path="$OUTPUT_ROOT"
16442   has_colon=`$ECHO $path | $GREP ^.:`
16443   new_path="$path"
16444   if test "x$has_colon" = x; then
16445     # Not in mixed or Windows style, start by that.
16446     new_path=`cmd //c echo $path`
16447   fi
16448 
16449 
16450   input_path="$new_path"
16451   # Check if we need to convert this using DOS-style short mode. If the path
16452   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16453   # take no chances and rewrite it.
16454   # Note: m4 eats our [], so we need to use [ and ] instead.
16455   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16456   if test "x$has_forbidden_chars" != x; then
16457     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16458     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16459   fi
16460 
16461 
16462   windows_path="$new_path"
16463   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16464     unix_path=`$CYGPATH -u "$windows_path"`
16465     new_path="$unix_path"
16466   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16467     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16468     new_path="$unix_path"
16469   fi
16470 
16471   if test "x$path" != "x$new_path"; then
16472     OUTPUT_ROOT="$new_path"
16473     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16474 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16475   fi
16476 
16477   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16478   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16479 
16480     else
16481       # We're on a unix platform. Hooray! :)
16482       path="$OUTPUT_ROOT"
16483       has_space=`$ECHO "$path" | $GREP " "`
16484       if test "x$has_space" != x; then
16485         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16486 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16487         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16488       fi
16489 
16490       # Use eval to expand a potential ~
16491       eval path="$path"
16492       if test ! -f "$path" && test ! -d "$path"; then
16493         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16494       fi
16495 
16496       OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16497     fi
16498   fi
16499 
16500 
16501   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16502   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16503 
16504   SPEC=$OUTPUT_ROOT/spec.gmk
16505 
16506   CONF_NAME=$CONF_NAME
16507 
16508   OUTPUT_ROOT=$OUTPUT_ROOT
16509 
16510 
16511 
16512   # The spec.gmk file contains all variables for the make system.
16513   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16514 
16515   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16516   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16517 
16518   # The bootcycle-spec.gmk file contains support for boot cycle builds.
16519   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16520 
16521   # The compare.sh is used to compare the build output to other builds.
16522   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16523 
16524   # The generated Makefile knows where the spec.gmk is and where the source is.
16525   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16526   # which will look for generated configurations
16527   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16528 
16529 
16530 
16531 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16532 
16533   for ac_prog in apt-get yum port pkgutil pkgadd
16534 do
16535   # Extract the first word of "$ac_prog", so it can be a program name with args.
16536 set dummy $ac_prog; ac_word=$2
16537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16538 $as_echo_n "checking for $ac_word... " >&6; }
16539 if ${ac_cv_prog_PKGHANDLER+:} false; then :
16540   $as_echo_n "(cached) " >&6
16541 else
16542   if test -n "$PKGHANDLER"; then
16543   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16544 else
16545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16546 for as_dir in $PATH
16547 do
16548   IFS=$as_save_IFS
16549   test -z "$as_dir" && as_dir=.
16550     for ac_exec_ext in '' $ac_executable_extensions; do
16551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16552     ac_cv_prog_PKGHANDLER="$ac_prog"
16553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16554     break 2
16555   fi
16556 done
16557   done
16558 IFS=$as_save_IFS
16559 
16560 fi
16561 fi
16562 PKGHANDLER=$ac_cv_prog_PKGHANDLER
16563 if test -n "$PKGHANDLER"; then
16564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16565 $as_echo "$PKGHANDLER" >&6; }
16566 else
16567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16568 $as_echo "no" >&6; }
16569 fi
16570 
16571 
16572   test -n "$PKGHANDLER" && break
16573 done
16574 
16575 
16576 
16577 # Setup tools that requires more complex handling, or that is not needed by the configure script.
16578 
16579 
16580 
16581   # Publish this variable in the help.
16582 
16583 
16584   if [ -z "${MAKE+x}" ]; then
16585     # The variable is not set by user, try to locate tool using the code snippet
16586 
16587     # Try our hardest to locate a correct version of GNU make
16588     for ac_prog in gmake
16589 do
16590   # Extract the first word of "$ac_prog", so it can be a program name with args.
16591 set dummy $ac_prog; ac_word=$2
16592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16593 $as_echo_n "checking for $ac_word... " >&6; }
16594 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16595   $as_echo_n "(cached) " >&6
16596 else
16597   case $CHECK_GMAKE in
16598   [\\/]* | ?:[\\/]*)
16599   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16600   ;;
16601   *)
16602   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16603 for as_dir in $PATH
16604 do
16605   IFS=$as_save_IFS
16606   test -z "$as_dir" && as_dir=.
16607     for ac_exec_ext in '' $ac_executable_extensions; do
16608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16609     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16611     break 2
16612   fi
16613 done
16614   done
16615 IFS=$as_save_IFS
16616 
16617   ;;
16618 esac
16619 fi
16620 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16621 if test -n "$CHECK_GMAKE"; then
16622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16623 $as_echo "$CHECK_GMAKE" >&6; }
16624 else
16625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16626 $as_echo "no" >&6; }
16627 fi
16628 
16629 
16630   test -n "$CHECK_GMAKE" && break
16631 done
16632 
16633 
16634   MAKE_CANDIDATE=""$CHECK_GMAKE""
16635   DESCRIPTION="gmake in PATH"
16636 
16637   # On Cygwin, we require a newer version of make than on other platforms
16638   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16639     MAKE_VERSION_EXPR="-e 4\."
16640     MAKE_REQUIRED_VERSION="4.0"
16641    else
16642     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16643     MAKE_REQUIRED_VERSION="3.81"
16644   fi
16645 
16646   if test "x$MAKE_CANDIDATE" != x; then
16647     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16648 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16649     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16650     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16651     if test "x$IS_GNU_MAKE" = x; then
16652       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16653 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16654     else
16655       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16656       if test "x$IS_MODERN_MAKE" = x; then
16657         { $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
16658 $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;}
16659       else
16660         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16661           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16662             MAKE_EXPECTED_ENV='cygwin'
16663           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16664             MAKE_EXPECTED_ENV='msys'
16665           else
16666             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16667           fi
16668           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16669           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16670         else
16671           # Not relevant for non-Windows
16672           IS_MAKE_CORRECT_ENV=true
16673         fi
16674         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16675           { $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
16676 $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;}
16677         else
16678           FOUND_MAKE=$MAKE_CANDIDATE
16679 
16680   # Only process if variable expands to non-empty
16681 
16682   if test "x$FOUND_MAKE" != x; then
16683     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16684 
16685   # First separate the path from the arguments. This will split at the first
16686   # space.
16687   complete="$FOUND_MAKE"
16688   path="${complete%% *}"
16689   tmp="$complete EOL"
16690   arguments="${tmp#* }"
16691 
16692   # Input might be given as Windows format, start by converting to
16693   # unix format.
16694   new_path=`$CYGPATH -u "$path"`
16695 
16696   # Now try to locate executable using which
16697   new_path=`$WHICH "$new_path" 2> /dev/null`
16698   # bat and cmd files are not always considered executable in cygwin causing which
16699   # to not find them
16700   if test "x$new_path" = x \
16701       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16702       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16703     new_path=`$CYGPATH -u "$path"`
16704   fi
16705   if test "x$new_path" = x; then
16706     # Oops. Which didn't find the executable.
16707     # The splitting of arguments from the executable at a space might have been incorrect,
16708     # since paths with space are more likely in Windows. Give it another try with the whole
16709     # argument.
16710     path="$complete"
16711     arguments="EOL"
16712     new_path=`$CYGPATH -u "$path"`
16713     new_path=`$WHICH "$new_path" 2> /dev/null`
16714     # bat and cmd files are not always considered executable in cygwin causing which
16715     # to not find them
16716     if test "x$new_path" = x \
16717         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16718         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16719       new_path=`$CYGPATH -u "$path"`
16720     fi
16721     if test "x$new_path" = x; then
16722       # It's still not found. Now this is an unrecoverable error.
16723       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16724 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16725       has_space=`$ECHO "$complete" | $GREP " "`
16726       if test "x$has_space" != x; then
16727         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16728 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16729       fi
16730       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16731     fi
16732   fi
16733 
16734   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16735   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16736   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16737   # "foo.exe" is OK but "foo" is an error.
16738   #
16739   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16740   # It is also a way to make sure we got the proper file name for the real test later on.
16741   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16742   if test "x$test_shortpath" = x; then
16743     # Short path failed, file does not exist as specified.
16744     # Try adding .exe or .cmd
16745     if test -f "${new_path}.exe"; then
16746       input_to_shortpath="${new_path}.exe"
16747     elif test -f "${new_path}.cmd"; then
16748       input_to_shortpath="${new_path}.cmd"
16749     else
16750       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16751 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16752       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16753 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16754       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16755     fi
16756   else
16757     input_to_shortpath="$new_path"
16758   fi
16759 
16760   # Call helper function which possibly converts this using DOS-style short mode.
16761   # If so, the updated path is stored in $new_path.
16762   new_path="$input_to_shortpath"
16763 
16764   input_path="$input_to_shortpath"
16765   # Check if we need to convert this using DOS-style short mode. If the path
16766   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16767   # take no chances and rewrite it.
16768   # Note: m4 eats our [], so we need to use [ and ] instead.
16769   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16770   if test "x$has_forbidden_chars" != x; then
16771     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16772     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16773     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16774     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16775       # Going to short mode and back again did indeed matter. Since short mode is
16776       # case insensitive, let's make it lowercase to improve readability.
16777       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16778       # Now convert it back to Unix-style (cygpath)
16779       input_path=`$CYGPATH -u "$shortmode_path"`
16780       new_path="$input_path"
16781     fi
16782   fi
16783 
16784   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16785   if test "x$test_cygdrive_prefix" = x; then
16786     # As a simple fix, exclude /usr/bin since it's not a real path.
16787     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16788       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16789       # a path prefixed by /cygdrive for fixpath to work.
16790       new_path="$CYGWIN_ROOT_PATH$input_path"
16791     fi
16792   fi
16793 
16794   # remove trailing .exe if any
16795   new_path="${new_path/%.exe/}"
16796 
16797     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16798 
16799   # First separate the path from the arguments. This will split at the first
16800   # space.
16801   complete="$FOUND_MAKE"
16802   path="${complete%% *}"
16803   tmp="$complete EOL"
16804   arguments="${tmp#* }"
16805 
16806   # Input might be given as Windows format, start by converting to
16807   # unix format.
16808   new_path="$path"
16809 
16810   windows_path="$new_path"
16811   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16812     unix_path=`$CYGPATH -u "$windows_path"`
16813     new_path="$unix_path"
16814   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16815     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16816     new_path="$unix_path"
16817   fi
16818 
16819 
16820   # Now try to locate executable using which
16821   new_path=`$WHICH "$new_path" 2> /dev/null`
16822 
16823   if test "x$new_path" = x; then
16824     # Oops. Which didn't find the executable.
16825     # The splitting of arguments from the executable at a space might have been incorrect,
16826     # since paths with space are more likely in Windows. Give it another try with the whole
16827     # argument.
16828     path="$complete"
16829     arguments="EOL"
16830     new_path="$path"
16831 
16832   windows_path="$new_path"
16833   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16834     unix_path=`$CYGPATH -u "$windows_path"`
16835     new_path="$unix_path"
16836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16837     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16838     new_path="$unix_path"
16839   fi
16840 
16841 
16842     new_path=`$WHICH "$new_path" 2> /dev/null`
16843     # bat and cmd files are not always considered executable in MSYS causing which
16844     # to not find them
16845     if test "x$new_path" = x \
16846         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16847         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16848       new_path="$path"
16849 
16850   windows_path="$new_path"
16851   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16852     unix_path=`$CYGPATH -u "$windows_path"`
16853     new_path="$unix_path"
16854   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16855     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16856     new_path="$unix_path"
16857   fi
16858 
16859     fi
16860 
16861     if test "x$new_path" = x; then
16862       # It's still not found. Now this is an unrecoverable error.
16863       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16864 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16865       has_space=`$ECHO "$complete" | $GREP " "`
16866       if test "x$has_space" != x; then
16867         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16868 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16869       fi
16870       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16871     fi
16872   fi
16873 
16874   # Now new_path has a complete unix path to the binary
16875   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16876     # Keep paths in /bin as-is, but remove trailing .exe if any
16877     new_path="${new_path/%.exe/}"
16878     # Do not save /bin paths to all_fixpath_prefixes!
16879   else
16880     # Not in mixed or Windows style, start by that.
16881     new_path=`cmd //c echo $new_path`
16882 
16883   input_path="$new_path"
16884   # Check if we need to convert this using DOS-style short mode. If the path
16885   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16886   # take no chances and rewrite it.
16887   # Note: m4 eats our [], so we need to use [ and ] instead.
16888   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16889   if test "x$has_forbidden_chars" != x; then
16890     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16891     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16892   fi
16893 
16894     # Output is in $new_path
16895 
16896   windows_path="$new_path"
16897   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16898     unix_path=`$CYGPATH -u "$windows_path"`
16899     new_path="$unix_path"
16900   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16901     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16902     new_path="$unix_path"
16903   fi
16904 
16905     # remove trailing .exe if any
16906     new_path="${new_path/%.exe/}"
16907 
16908     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16909     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16910   fi
16911 
16912     else
16913       # We're on a unix platform. Hooray! :)
16914       # First separate the path from the arguments. This will split at the first
16915       # space.
16916       complete="$FOUND_MAKE"
16917       path="${complete%% *}"
16918       tmp="$complete EOL"
16919       arguments="${tmp#* }"
16920 
16921       # Cannot rely on the command "which" here since it doesn't always work.
16922       is_absolute_path=`$ECHO "$path" | $GREP ^/`
16923       if test -z "$is_absolute_path"; then
16924         # Path to executable is not absolute. Find it.
16925         IFS_save="$IFS"
16926         IFS=:
16927         for p in $PATH; do
16928           if test -f "$p/$path" && test -x "$p/$path"; then
16929             new_path="$p/$path"
16930             break
16931           fi
16932         done
16933         IFS="$IFS_save"
16934       else
16935         # This is an absolute path, we can use it without further modifications.
16936         new_path="$path"
16937       fi
16938 
16939       if test "x$new_path" = x; then
16940         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16941 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16942         has_space=`$ECHO "$complete" | $GREP " "`
16943         if test "x$has_space" != x; then
16944           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16945 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16946         fi
16947         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16948       fi
16949     fi
16950 
16951     # Now join together the path and the arguments once again
16952     if test "x$arguments" != xEOL; then
16953       new_complete="$new_path ${arguments% *}"
16954     else
16955       new_complete="$new_path"
16956     fi
16957 
16958     if test "x$complete" != "x$new_complete"; then
16959       FOUND_MAKE="$new_complete"
16960       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16961 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16962     fi
16963   fi
16964 
16965         fi
16966       fi
16967     fi
16968   fi
16969 
16970 
16971     if test "x$FOUND_MAKE" = x; then
16972       for ac_prog in make
16973 do
16974   # Extract the first word of "$ac_prog", so it can be a program name with args.
16975 set dummy $ac_prog; ac_word=$2
16976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16977 $as_echo_n "checking for $ac_word... " >&6; }
16978 if ${ac_cv_path_CHECK_MAKE+:} false; then :
16979   $as_echo_n "(cached) " >&6
16980 else
16981   case $CHECK_MAKE in
16982   [\\/]* | ?:[\\/]*)
16983   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16984   ;;
16985   *)
16986   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16987 for as_dir in $PATH
16988 do
16989   IFS=$as_save_IFS
16990   test -z "$as_dir" && as_dir=.
16991     for ac_exec_ext in '' $ac_executable_extensions; do
16992   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16993     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16994     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16995     break 2
16996   fi
16997 done
16998   done
16999 IFS=$as_save_IFS
17000 
17001   ;;
17002 esac
17003 fi
17004 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17005 if test -n "$CHECK_MAKE"; then
17006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17007 $as_echo "$CHECK_MAKE" >&6; }
17008 else
17009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17010 $as_echo "no" >&6; }
17011 fi
17012 
17013 
17014   test -n "$CHECK_MAKE" && break
17015 done
17016 
17017 
17018   MAKE_CANDIDATE=""$CHECK_MAKE""
17019   DESCRIPTION="make in PATH"
17020 
17021   # On Cygwin, we require a newer version of make than on other platforms
17022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17023     MAKE_VERSION_EXPR="-e 4\."
17024     MAKE_REQUIRED_VERSION="4.0"
17025    else
17026     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17027     MAKE_REQUIRED_VERSION="3.81"
17028   fi
17029 
17030   if test "x$MAKE_CANDIDATE" != x; then
17031     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17032 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17033     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17034     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17035     if test "x$IS_GNU_MAKE" = x; then
17036       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17037 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17038     else
17039       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17040       if test "x$IS_MODERN_MAKE" = x; then
17041         { $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
17042 $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;}
17043       else
17044         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17045           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17046             MAKE_EXPECTED_ENV='cygwin'
17047           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17048             MAKE_EXPECTED_ENV='msys'
17049           else
17050             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17051           fi
17052           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17053           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17054         else
17055           # Not relevant for non-Windows
17056           IS_MAKE_CORRECT_ENV=true
17057         fi
17058         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17059           { $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
17060 $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;}
17061         else
17062           FOUND_MAKE=$MAKE_CANDIDATE
17063 
17064   # Only process if variable expands to non-empty
17065 
17066   if test "x$FOUND_MAKE" != x; then
17067     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17068 
17069   # First separate the path from the arguments. This will split at the first
17070   # space.
17071   complete="$FOUND_MAKE"
17072   path="${complete%% *}"
17073   tmp="$complete EOL"
17074   arguments="${tmp#* }"
17075 
17076   # Input might be given as Windows format, start by converting to
17077   # unix format.
17078   new_path=`$CYGPATH -u "$path"`
17079 
17080   # Now try to locate executable using which
17081   new_path=`$WHICH "$new_path" 2> /dev/null`
17082   # bat and cmd files are not always considered executable in cygwin causing which
17083   # to not find them
17084   if test "x$new_path" = x \
17085       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17086       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17087     new_path=`$CYGPATH -u "$path"`
17088   fi
17089   if test "x$new_path" = x; then
17090     # Oops. Which didn't find the executable.
17091     # The splitting of arguments from the executable at a space might have been incorrect,
17092     # since paths with space are more likely in Windows. Give it another try with the whole
17093     # argument.
17094     path="$complete"
17095     arguments="EOL"
17096     new_path=`$CYGPATH -u "$path"`
17097     new_path=`$WHICH "$new_path" 2> /dev/null`
17098     # bat and cmd files are not always considered executable in cygwin causing which
17099     # to not find them
17100     if test "x$new_path" = x \
17101         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17102         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17103       new_path=`$CYGPATH -u "$path"`
17104     fi
17105     if test "x$new_path" = x; then
17106       # It's still not found. Now this is an unrecoverable error.
17107       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17108 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17109       has_space=`$ECHO "$complete" | $GREP " "`
17110       if test "x$has_space" != x; then
17111         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17112 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17113       fi
17114       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17115     fi
17116   fi
17117 
17118   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17119   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17120   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17121   # "foo.exe" is OK but "foo" is an error.
17122   #
17123   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17124   # It is also a way to make sure we got the proper file name for the real test later on.
17125   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17126   if test "x$test_shortpath" = x; then
17127     # Short path failed, file does not exist as specified.
17128     # Try adding .exe or .cmd
17129     if test -f "${new_path}.exe"; then
17130       input_to_shortpath="${new_path}.exe"
17131     elif test -f "${new_path}.cmd"; then
17132       input_to_shortpath="${new_path}.cmd"
17133     else
17134       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17135 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17136       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17137 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17138       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17139     fi
17140   else
17141     input_to_shortpath="$new_path"
17142   fi
17143 
17144   # Call helper function which possibly converts this using DOS-style short mode.
17145   # If so, the updated path is stored in $new_path.
17146   new_path="$input_to_shortpath"
17147 
17148   input_path="$input_to_shortpath"
17149   # Check if we need to convert this using DOS-style short mode. If the path
17150   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17151   # take no chances and rewrite it.
17152   # Note: m4 eats our [], so we need to use [ and ] instead.
17153   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17154   if test "x$has_forbidden_chars" != x; then
17155     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17156     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17157     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17158     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17159       # Going to short mode and back again did indeed matter. Since short mode is
17160       # case insensitive, let's make it lowercase to improve readability.
17161       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17162       # Now convert it back to Unix-style (cygpath)
17163       input_path=`$CYGPATH -u "$shortmode_path"`
17164       new_path="$input_path"
17165     fi
17166   fi
17167 
17168   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17169   if test "x$test_cygdrive_prefix" = x; then
17170     # As a simple fix, exclude /usr/bin since it's not a real path.
17171     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17172       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17173       # a path prefixed by /cygdrive for fixpath to work.
17174       new_path="$CYGWIN_ROOT_PATH$input_path"
17175     fi
17176   fi
17177 
17178   # remove trailing .exe if any
17179   new_path="${new_path/%.exe/}"
17180 
17181     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17182 
17183   # First separate the path from the arguments. This will split at the first
17184   # space.
17185   complete="$FOUND_MAKE"
17186   path="${complete%% *}"
17187   tmp="$complete EOL"
17188   arguments="${tmp#* }"
17189 
17190   # Input might be given as Windows format, start by converting to
17191   # unix format.
17192   new_path="$path"
17193 
17194   windows_path="$new_path"
17195   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17196     unix_path=`$CYGPATH -u "$windows_path"`
17197     new_path="$unix_path"
17198   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17199     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17200     new_path="$unix_path"
17201   fi
17202 
17203 
17204   # Now try to locate executable using which
17205   new_path=`$WHICH "$new_path" 2> /dev/null`
17206 
17207   if test "x$new_path" = x; then
17208     # Oops. Which didn't find the executable.
17209     # The splitting of arguments from the executable at a space might have been incorrect,
17210     # since paths with space are more likely in Windows. Give it another try with the whole
17211     # argument.
17212     path="$complete"
17213     arguments="EOL"
17214     new_path="$path"
17215 
17216   windows_path="$new_path"
17217   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17218     unix_path=`$CYGPATH -u "$windows_path"`
17219     new_path="$unix_path"
17220   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17221     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17222     new_path="$unix_path"
17223   fi
17224 
17225 
17226     new_path=`$WHICH "$new_path" 2> /dev/null`
17227     # bat and cmd files are not always considered executable in MSYS causing which
17228     # to not find them
17229     if test "x$new_path" = x \
17230         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17231         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17232       new_path="$path"
17233 
17234   windows_path="$new_path"
17235   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17236     unix_path=`$CYGPATH -u "$windows_path"`
17237     new_path="$unix_path"
17238   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17239     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17240     new_path="$unix_path"
17241   fi
17242 
17243     fi
17244 
17245     if test "x$new_path" = x; then
17246       # It's still not found. Now this is an unrecoverable error.
17247       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17248 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17249       has_space=`$ECHO "$complete" | $GREP " "`
17250       if test "x$has_space" != x; then
17251         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17252 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17253       fi
17254       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17255     fi
17256   fi
17257 
17258   # Now new_path has a complete unix path to the binary
17259   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17260     # Keep paths in /bin as-is, but remove trailing .exe if any
17261     new_path="${new_path/%.exe/}"
17262     # Do not save /bin paths to all_fixpath_prefixes!
17263   else
17264     # Not in mixed or Windows style, start by that.
17265     new_path=`cmd //c echo $new_path`
17266 
17267   input_path="$new_path"
17268   # Check if we need to convert this using DOS-style short mode. If the path
17269   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17270   # take no chances and rewrite it.
17271   # Note: m4 eats our [], so we need to use [ and ] instead.
17272   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17273   if test "x$has_forbidden_chars" != x; then
17274     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17275     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17276   fi
17277 
17278     # Output is in $new_path
17279 
17280   windows_path="$new_path"
17281   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17282     unix_path=`$CYGPATH -u "$windows_path"`
17283     new_path="$unix_path"
17284   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17285     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17286     new_path="$unix_path"
17287   fi
17288 
17289     # remove trailing .exe if any
17290     new_path="${new_path/%.exe/}"
17291 
17292     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17293     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17294   fi
17295 
17296     else
17297       # We're on a unix platform. Hooray! :)
17298       # First separate the path from the arguments. This will split at the first
17299       # space.
17300       complete="$FOUND_MAKE"
17301       path="${complete%% *}"
17302       tmp="$complete EOL"
17303       arguments="${tmp#* }"
17304 
17305       # Cannot rely on the command "which" here since it doesn't always work.
17306       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17307       if test -z "$is_absolute_path"; then
17308         # Path to executable is not absolute. Find it.
17309         IFS_save="$IFS"
17310         IFS=:
17311         for p in $PATH; do
17312           if test -f "$p/$path" && test -x "$p/$path"; then
17313             new_path="$p/$path"
17314             break
17315           fi
17316         done
17317         IFS="$IFS_save"
17318       else
17319         # This is an absolute path, we can use it without further modifications.
17320         new_path="$path"
17321       fi
17322 
17323       if test "x$new_path" = x; then
17324         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17325 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17326         has_space=`$ECHO "$complete" | $GREP " "`
17327         if test "x$has_space" != x; then
17328           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17329 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17330         fi
17331         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17332       fi
17333     fi
17334 
17335     # Now join together the path and the arguments once again
17336     if test "x$arguments" != xEOL; then
17337       new_complete="$new_path ${arguments% *}"
17338     else
17339       new_complete="$new_path"
17340     fi
17341 
17342     if test "x$complete" != "x$new_complete"; then
17343       FOUND_MAKE="$new_complete"
17344       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17345 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17346     fi
17347   fi
17348 
17349         fi
17350       fi
17351     fi
17352   fi
17353 
17354     fi
17355 
17356     if test "x$FOUND_MAKE" = x; then
17357       if test "x$TOOLCHAIN_PATH" != x; then
17358         # We have a toolchain path, check that as well before giving up.
17359         OLD_PATH=$PATH
17360         PATH=$TOOLCHAIN_PATH:$PATH
17361         for ac_prog in gmake
17362 do
17363   # Extract the first word of "$ac_prog", so it can be a program name with args.
17364 set dummy $ac_prog; ac_word=$2
17365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17366 $as_echo_n "checking for $ac_word... " >&6; }
17367 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17368   $as_echo_n "(cached) " >&6
17369 else
17370   case $CHECK_TOOLSDIR_GMAKE in
17371   [\\/]* | ?:[\\/]*)
17372   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17373   ;;
17374   *)
17375   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17376 for as_dir in $PATH
17377 do
17378   IFS=$as_save_IFS
17379   test -z "$as_dir" && as_dir=.
17380     for ac_exec_ext in '' $ac_executable_extensions; do
17381   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17382     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17384     break 2
17385   fi
17386 done
17387   done
17388 IFS=$as_save_IFS
17389 
17390   ;;
17391 esac
17392 fi
17393 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17394 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17396 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17397 else
17398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17399 $as_echo "no" >&6; }
17400 fi
17401 
17402 
17403   test -n "$CHECK_TOOLSDIR_GMAKE" && break
17404 done
17405 
17406 
17407   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17408   DESCRIPTION="gmake in tools-dir"
17409 
17410   # On Cygwin, we require a newer version of make than on other platforms
17411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17412     MAKE_VERSION_EXPR="-e 4\."
17413     MAKE_REQUIRED_VERSION="4.0"
17414    else
17415     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17416     MAKE_REQUIRED_VERSION="3.81"
17417   fi
17418 
17419   if test "x$MAKE_CANDIDATE" != x; then
17420     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17421 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17422     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17423     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17424     if test "x$IS_GNU_MAKE" = x; then
17425       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17426 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17427     else
17428       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17429       if test "x$IS_MODERN_MAKE" = x; then
17430         { $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
17431 $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;}
17432       else
17433         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17434           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17435             MAKE_EXPECTED_ENV='cygwin'
17436           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17437             MAKE_EXPECTED_ENV='msys'
17438           else
17439             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17440           fi
17441           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17442           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17443         else
17444           # Not relevant for non-Windows
17445           IS_MAKE_CORRECT_ENV=true
17446         fi
17447         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17448           { $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
17449 $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;}
17450         else
17451           FOUND_MAKE=$MAKE_CANDIDATE
17452 
17453   # Only process if variable expands to non-empty
17454 
17455   if test "x$FOUND_MAKE" != x; then
17456     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17457 
17458   # First separate the path from the arguments. This will split at the first
17459   # space.
17460   complete="$FOUND_MAKE"
17461   path="${complete%% *}"
17462   tmp="$complete EOL"
17463   arguments="${tmp#* }"
17464 
17465   # Input might be given as Windows format, start by converting to
17466   # unix format.
17467   new_path=`$CYGPATH -u "$path"`
17468 
17469   # Now try to locate executable using which
17470   new_path=`$WHICH "$new_path" 2> /dev/null`
17471   # bat and cmd files are not always considered executable in cygwin causing which
17472   # to not find them
17473   if test "x$new_path" = x \
17474       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17475       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17476     new_path=`$CYGPATH -u "$path"`
17477   fi
17478   if test "x$new_path" = x; then
17479     # Oops. Which didn't find the executable.
17480     # The splitting of arguments from the executable at a space might have been incorrect,
17481     # since paths with space are more likely in Windows. Give it another try with the whole
17482     # argument.
17483     path="$complete"
17484     arguments="EOL"
17485     new_path=`$CYGPATH -u "$path"`
17486     new_path=`$WHICH "$new_path" 2> /dev/null`
17487     # bat and cmd files are not always considered executable in cygwin causing which
17488     # to not find them
17489     if test "x$new_path" = x \
17490         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17491         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17492       new_path=`$CYGPATH -u "$path"`
17493     fi
17494     if test "x$new_path" = x; then
17495       # It's still not found. Now this is an unrecoverable error.
17496       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17497 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17498       has_space=`$ECHO "$complete" | $GREP " "`
17499       if test "x$has_space" != x; then
17500         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17501 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17502       fi
17503       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17504     fi
17505   fi
17506 
17507   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17508   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17509   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17510   # "foo.exe" is OK but "foo" is an error.
17511   #
17512   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17513   # It is also a way to make sure we got the proper file name for the real test later on.
17514   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17515   if test "x$test_shortpath" = x; then
17516     # Short path failed, file does not exist as specified.
17517     # Try adding .exe or .cmd
17518     if test -f "${new_path}.exe"; then
17519       input_to_shortpath="${new_path}.exe"
17520     elif test -f "${new_path}.cmd"; then
17521       input_to_shortpath="${new_path}.cmd"
17522     else
17523       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17524 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17525       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17526 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17527       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17528     fi
17529   else
17530     input_to_shortpath="$new_path"
17531   fi
17532 
17533   # Call helper function which possibly converts this using DOS-style short mode.
17534   # If so, the updated path is stored in $new_path.
17535   new_path="$input_to_shortpath"
17536 
17537   input_path="$input_to_shortpath"
17538   # Check if we need to convert this using DOS-style short mode. If the path
17539   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17540   # take no chances and rewrite it.
17541   # Note: m4 eats our [], so we need to use [ and ] instead.
17542   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17543   if test "x$has_forbidden_chars" != x; then
17544     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17545     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17546     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17547     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17548       # Going to short mode and back again did indeed matter. Since short mode is
17549       # case insensitive, let's make it lowercase to improve readability.
17550       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17551       # Now convert it back to Unix-style (cygpath)
17552       input_path=`$CYGPATH -u "$shortmode_path"`
17553       new_path="$input_path"
17554     fi
17555   fi
17556 
17557   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17558   if test "x$test_cygdrive_prefix" = x; then
17559     # As a simple fix, exclude /usr/bin since it's not a real path.
17560     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17561       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17562       # a path prefixed by /cygdrive for fixpath to work.
17563       new_path="$CYGWIN_ROOT_PATH$input_path"
17564     fi
17565   fi
17566 
17567   # remove trailing .exe if any
17568   new_path="${new_path/%.exe/}"
17569 
17570     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17571 
17572   # First separate the path from the arguments. This will split at the first
17573   # space.
17574   complete="$FOUND_MAKE"
17575   path="${complete%% *}"
17576   tmp="$complete EOL"
17577   arguments="${tmp#* }"
17578 
17579   # Input might be given as Windows format, start by converting to
17580   # unix format.
17581   new_path="$path"
17582 
17583   windows_path="$new_path"
17584   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17585     unix_path=`$CYGPATH -u "$windows_path"`
17586     new_path="$unix_path"
17587   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17588     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17589     new_path="$unix_path"
17590   fi
17591 
17592 
17593   # Now try to locate executable using which
17594   new_path=`$WHICH "$new_path" 2> /dev/null`
17595 
17596   if test "x$new_path" = x; then
17597     # Oops. Which didn't find the executable.
17598     # The splitting of arguments from the executable at a space might have been incorrect,
17599     # since paths with space are more likely in Windows. Give it another try with the whole
17600     # argument.
17601     path="$complete"
17602     arguments="EOL"
17603     new_path="$path"
17604 
17605   windows_path="$new_path"
17606   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17607     unix_path=`$CYGPATH -u "$windows_path"`
17608     new_path="$unix_path"
17609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17610     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17611     new_path="$unix_path"
17612   fi
17613 
17614 
17615     new_path=`$WHICH "$new_path" 2> /dev/null`
17616     # bat and cmd files are not always considered executable in MSYS causing which
17617     # to not find them
17618     if test "x$new_path" = x \
17619         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17620         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17621       new_path="$path"
17622 
17623   windows_path="$new_path"
17624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17625     unix_path=`$CYGPATH -u "$windows_path"`
17626     new_path="$unix_path"
17627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17628     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17629     new_path="$unix_path"
17630   fi
17631 
17632     fi
17633 
17634     if test "x$new_path" = x; then
17635       # It's still not found. Now this is an unrecoverable error.
17636       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17637 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17638       has_space=`$ECHO "$complete" | $GREP " "`
17639       if test "x$has_space" != x; then
17640         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17641 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17642       fi
17643       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17644     fi
17645   fi
17646 
17647   # Now new_path has a complete unix path to the binary
17648   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17649     # Keep paths in /bin as-is, but remove trailing .exe if any
17650     new_path="${new_path/%.exe/}"
17651     # Do not save /bin paths to all_fixpath_prefixes!
17652   else
17653     # Not in mixed or Windows style, start by that.
17654     new_path=`cmd //c echo $new_path`
17655 
17656   input_path="$new_path"
17657   # Check if we need to convert this using DOS-style short mode. If the path
17658   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17659   # take no chances and rewrite it.
17660   # Note: m4 eats our [], so we need to use [ and ] instead.
17661   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17662   if test "x$has_forbidden_chars" != x; then
17663     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17664     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17665   fi
17666 
17667     # Output is in $new_path
17668 
17669   windows_path="$new_path"
17670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17671     unix_path=`$CYGPATH -u "$windows_path"`
17672     new_path="$unix_path"
17673   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17674     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17675     new_path="$unix_path"
17676   fi
17677 
17678     # remove trailing .exe if any
17679     new_path="${new_path/%.exe/}"
17680 
17681     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17682     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17683   fi
17684 
17685     else
17686       # We're on a unix platform. Hooray! :)
17687       # First separate the path from the arguments. This will split at the first
17688       # space.
17689       complete="$FOUND_MAKE"
17690       path="${complete%% *}"
17691       tmp="$complete EOL"
17692       arguments="${tmp#* }"
17693 
17694       # Cannot rely on the command "which" here since it doesn't always work.
17695       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17696       if test -z "$is_absolute_path"; then
17697         # Path to executable is not absolute. Find it.
17698         IFS_save="$IFS"
17699         IFS=:
17700         for p in $PATH; do
17701           if test -f "$p/$path" && test -x "$p/$path"; then
17702             new_path="$p/$path"
17703             break
17704           fi
17705         done
17706         IFS="$IFS_save"
17707       else
17708         # This is an absolute path, we can use it without further modifications.
17709         new_path="$path"
17710       fi
17711 
17712       if test "x$new_path" = x; then
17713         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17714 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17715         has_space=`$ECHO "$complete" | $GREP " "`
17716         if test "x$has_space" != x; then
17717           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17718 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17719         fi
17720         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17721       fi
17722     fi
17723 
17724     # Now join together the path and the arguments once again
17725     if test "x$arguments" != xEOL; then
17726       new_complete="$new_path ${arguments% *}"
17727     else
17728       new_complete="$new_path"
17729     fi
17730 
17731     if test "x$complete" != "x$new_complete"; then
17732       FOUND_MAKE="$new_complete"
17733       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17734 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17735     fi
17736   fi
17737 
17738         fi
17739       fi
17740     fi
17741   fi
17742 
17743         if test "x$FOUND_MAKE" = x; then
17744           for ac_prog in make
17745 do
17746   # Extract the first word of "$ac_prog", so it can be a program name with args.
17747 set dummy $ac_prog; ac_word=$2
17748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17749 $as_echo_n "checking for $ac_word... " >&6; }
17750 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17751   $as_echo_n "(cached) " >&6
17752 else
17753   case $CHECK_TOOLSDIR_MAKE in
17754   [\\/]* | ?:[\\/]*)
17755   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17756   ;;
17757   *)
17758   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17759 for as_dir in $PATH
17760 do
17761   IFS=$as_save_IFS
17762   test -z "$as_dir" && as_dir=.
17763     for ac_exec_ext in '' $ac_executable_extensions; do
17764   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17765     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17766     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17767     break 2
17768   fi
17769 done
17770   done
17771 IFS=$as_save_IFS
17772 
17773   ;;
17774 esac
17775 fi
17776 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17777 if test -n "$CHECK_TOOLSDIR_MAKE"; then
17778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17779 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17780 else
17781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17782 $as_echo "no" >&6; }
17783 fi
17784 
17785 
17786   test -n "$CHECK_TOOLSDIR_MAKE" && break
17787 done
17788 
17789 
17790   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17791   DESCRIPTION="make in tools-dir"
17792 
17793   # On Cygwin, we require a newer version of make than on other platforms
17794   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17795     MAKE_VERSION_EXPR="-e 4\."
17796     MAKE_REQUIRED_VERSION="4.0"
17797    else
17798     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17799     MAKE_REQUIRED_VERSION="3.81"
17800   fi
17801 
17802   if test "x$MAKE_CANDIDATE" != x; then
17803     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17804 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17805     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17806     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17807     if test "x$IS_GNU_MAKE" = x; then
17808       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17809 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17810     else
17811       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17812       if test "x$IS_MODERN_MAKE" = x; then
17813         { $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
17814 $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;}
17815       else
17816         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17817           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17818             MAKE_EXPECTED_ENV='cygwin'
17819           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17820             MAKE_EXPECTED_ENV='msys'
17821           else
17822             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17823           fi
17824           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17825           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17826         else
17827           # Not relevant for non-Windows
17828           IS_MAKE_CORRECT_ENV=true
17829         fi
17830         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17831           { $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
17832 $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;}
17833         else
17834           FOUND_MAKE=$MAKE_CANDIDATE
17835 
17836   # Only process if variable expands to non-empty
17837 
17838   if test "x$FOUND_MAKE" != x; then
17839     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17840 
17841   # First separate the path from the arguments. This will split at the first
17842   # space.
17843   complete="$FOUND_MAKE"
17844   path="${complete%% *}"
17845   tmp="$complete EOL"
17846   arguments="${tmp#* }"
17847 
17848   # Input might be given as Windows format, start by converting to
17849   # unix format.
17850   new_path=`$CYGPATH -u "$path"`
17851 
17852   # Now try to locate executable using which
17853   new_path=`$WHICH "$new_path" 2> /dev/null`
17854   # bat and cmd files are not always considered executable in cygwin causing which
17855   # to not find them
17856   if test "x$new_path" = x \
17857       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17858       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17859     new_path=`$CYGPATH -u "$path"`
17860   fi
17861   if test "x$new_path" = x; then
17862     # Oops. Which didn't find the executable.
17863     # The splitting of arguments from the executable at a space might have been incorrect,
17864     # since paths with space are more likely in Windows. Give it another try with the whole
17865     # argument.
17866     path="$complete"
17867     arguments="EOL"
17868     new_path=`$CYGPATH -u "$path"`
17869     new_path=`$WHICH "$new_path" 2> /dev/null`
17870     # bat and cmd files are not always considered executable in cygwin causing which
17871     # to not find them
17872     if test "x$new_path" = x \
17873         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17874         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17875       new_path=`$CYGPATH -u "$path"`
17876     fi
17877     if test "x$new_path" = x; then
17878       # It's still not found. Now this is an unrecoverable error.
17879       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17880 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17881       has_space=`$ECHO "$complete" | $GREP " "`
17882       if test "x$has_space" != x; then
17883         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17884 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17885       fi
17886       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17887     fi
17888   fi
17889 
17890   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17891   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17892   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17893   # "foo.exe" is OK but "foo" is an error.
17894   #
17895   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17896   # It is also a way to make sure we got the proper file name for the real test later on.
17897   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17898   if test "x$test_shortpath" = x; then
17899     # Short path failed, file does not exist as specified.
17900     # Try adding .exe or .cmd
17901     if test -f "${new_path}.exe"; then
17902       input_to_shortpath="${new_path}.exe"
17903     elif test -f "${new_path}.cmd"; then
17904       input_to_shortpath="${new_path}.cmd"
17905     else
17906       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17907 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17908       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17909 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17910       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17911     fi
17912   else
17913     input_to_shortpath="$new_path"
17914   fi
17915 
17916   # Call helper function which possibly converts this using DOS-style short mode.
17917   # If so, the updated path is stored in $new_path.
17918   new_path="$input_to_shortpath"
17919 
17920   input_path="$input_to_shortpath"
17921   # Check if we need to convert this using DOS-style short mode. If the path
17922   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17923   # take no chances and rewrite it.
17924   # Note: m4 eats our [], so we need to use [ and ] instead.
17925   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17926   if test "x$has_forbidden_chars" != x; then
17927     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17928     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17929     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17930     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17931       # Going to short mode and back again did indeed matter. Since short mode is
17932       # case insensitive, let's make it lowercase to improve readability.
17933       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17934       # Now convert it back to Unix-style (cygpath)
17935       input_path=`$CYGPATH -u "$shortmode_path"`
17936       new_path="$input_path"
17937     fi
17938   fi
17939 
17940   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17941   if test "x$test_cygdrive_prefix" = x; then
17942     # As a simple fix, exclude /usr/bin since it's not a real path.
17943     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17944       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17945       # a path prefixed by /cygdrive for fixpath to work.
17946       new_path="$CYGWIN_ROOT_PATH$input_path"
17947     fi
17948   fi
17949 
17950   # remove trailing .exe if any
17951   new_path="${new_path/%.exe/}"
17952 
17953     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17954 
17955   # First separate the path from the arguments. This will split at the first
17956   # space.
17957   complete="$FOUND_MAKE"
17958   path="${complete%% *}"
17959   tmp="$complete EOL"
17960   arguments="${tmp#* }"
17961 
17962   # Input might be given as Windows format, start by converting to
17963   # unix format.
17964   new_path="$path"
17965 
17966   windows_path="$new_path"
17967   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17968     unix_path=`$CYGPATH -u "$windows_path"`
17969     new_path="$unix_path"
17970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17971     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17972     new_path="$unix_path"
17973   fi
17974 
17975 
17976   # Now try to locate executable using which
17977   new_path=`$WHICH "$new_path" 2> /dev/null`
17978 
17979   if test "x$new_path" = x; then
17980     # Oops. Which didn't find the executable.
17981     # The splitting of arguments from the executable at a space might have been incorrect,
17982     # since paths with space are more likely in Windows. Give it another try with the whole
17983     # argument.
17984     path="$complete"
17985     arguments="EOL"
17986     new_path="$path"
17987 
17988   windows_path="$new_path"
17989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17990     unix_path=`$CYGPATH -u "$windows_path"`
17991     new_path="$unix_path"
17992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17994     new_path="$unix_path"
17995   fi
17996 
17997 
17998     new_path=`$WHICH "$new_path" 2> /dev/null`
17999     # bat and cmd files are not always considered executable in MSYS causing which
18000     # to not find them
18001     if test "x$new_path" = x \
18002         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18003         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18004       new_path="$path"
18005 
18006   windows_path="$new_path"
18007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18008     unix_path=`$CYGPATH -u "$windows_path"`
18009     new_path="$unix_path"
18010   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18011     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18012     new_path="$unix_path"
18013   fi
18014 
18015     fi
18016 
18017     if test "x$new_path" = x; then
18018       # It's still not found. Now this is an unrecoverable error.
18019       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18020 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18021       has_space=`$ECHO "$complete" | $GREP " "`
18022       if test "x$has_space" != x; then
18023         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18024 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18025       fi
18026       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18027     fi
18028   fi
18029 
18030   # Now new_path has a complete unix path to the binary
18031   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18032     # Keep paths in /bin as-is, but remove trailing .exe if any
18033     new_path="${new_path/%.exe/}"
18034     # Do not save /bin paths to all_fixpath_prefixes!
18035   else
18036     # Not in mixed or Windows style, start by that.
18037     new_path=`cmd //c echo $new_path`
18038 
18039   input_path="$new_path"
18040   # Check if we need to convert this using DOS-style short mode. If the path
18041   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18042   # take no chances and rewrite it.
18043   # Note: m4 eats our [], so we need to use [ and ] instead.
18044   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18045   if test "x$has_forbidden_chars" != x; then
18046     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18047     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18048   fi
18049 
18050     # Output is in $new_path
18051 
18052   windows_path="$new_path"
18053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18054     unix_path=`$CYGPATH -u "$windows_path"`
18055     new_path="$unix_path"
18056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18057     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18058     new_path="$unix_path"
18059   fi
18060 
18061     # remove trailing .exe if any
18062     new_path="${new_path/%.exe/}"
18063 
18064     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18065     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18066   fi
18067 
18068     else
18069       # We're on a unix platform. Hooray! :)
18070       # First separate the path from the arguments. This will split at the first
18071       # space.
18072       complete="$FOUND_MAKE"
18073       path="${complete%% *}"
18074       tmp="$complete EOL"
18075       arguments="${tmp#* }"
18076 
18077       # Cannot rely on the command "which" here since it doesn't always work.
18078       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18079       if test -z "$is_absolute_path"; then
18080         # Path to executable is not absolute. Find it.
18081         IFS_save="$IFS"
18082         IFS=:
18083         for p in $PATH; do
18084           if test -f "$p/$path" && test -x "$p/$path"; then
18085             new_path="$p/$path"
18086             break
18087           fi
18088         done
18089         IFS="$IFS_save"
18090       else
18091         # This is an absolute path, we can use it without further modifications.
18092         new_path="$path"
18093       fi
18094 
18095       if test "x$new_path" = x; then
18096         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18097 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18098         has_space=`$ECHO "$complete" | $GREP " "`
18099         if test "x$has_space" != x; then
18100           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18101 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18102         fi
18103         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18104       fi
18105     fi
18106 
18107     # Now join together the path and the arguments once again
18108     if test "x$arguments" != xEOL; then
18109       new_complete="$new_path ${arguments% *}"
18110     else
18111       new_complete="$new_path"
18112     fi
18113 
18114     if test "x$complete" != "x$new_complete"; then
18115       FOUND_MAKE="$new_complete"
18116       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18117 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18118     fi
18119   fi
18120 
18121         fi
18122       fi
18123     fi
18124   fi
18125 
18126         fi
18127         PATH=$OLD_PATH
18128       fi
18129     fi
18130 
18131     if test "x$FOUND_MAKE" = x; then
18132       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
18133     fi
18134 
18135   else
18136     # The variable is set, but is it from the command line or the environment?
18137 
18138     # Try to remove the string !MAKE! from our list.
18139     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18140     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18141       # If it failed, the variable was not from the command line. Ignore it,
18142       # but warn the user (except for BASH, which is always set by the calling BASH).
18143       if test "xMAKE" != xBASH; then
18144         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18145 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18146       fi
18147       # Try to locate tool using the code snippet
18148 
18149     # Try our hardest to locate a correct version of GNU make
18150     for ac_prog in gmake
18151 do
18152   # Extract the first word of "$ac_prog", so it can be a program name with args.
18153 set dummy $ac_prog; ac_word=$2
18154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18155 $as_echo_n "checking for $ac_word... " >&6; }
18156 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18157   $as_echo_n "(cached) " >&6
18158 else
18159   case $CHECK_GMAKE in
18160   [\\/]* | ?:[\\/]*)
18161   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18162   ;;
18163   *)
18164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18165 for as_dir in $PATH
18166 do
18167   IFS=$as_save_IFS
18168   test -z "$as_dir" && as_dir=.
18169     for ac_exec_ext in '' $ac_executable_extensions; do
18170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18171     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18173     break 2
18174   fi
18175 done
18176   done
18177 IFS=$as_save_IFS
18178 
18179   ;;
18180 esac
18181 fi
18182 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18183 if test -n "$CHECK_GMAKE"; then
18184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18185 $as_echo "$CHECK_GMAKE" >&6; }
18186 else
18187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18188 $as_echo "no" >&6; }
18189 fi
18190 
18191 
18192   test -n "$CHECK_GMAKE" && break
18193 done
18194 
18195 
18196   MAKE_CANDIDATE=""$CHECK_GMAKE""
18197   DESCRIPTION="gmake in PATH"
18198 
18199   # On Cygwin, we require a newer version of make than on other platforms
18200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18201     MAKE_VERSION_EXPR="-e 4\."
18202     MAKE_REQUIRED_VERSION="4.0"
18203    else
18204     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18205     MAKE_REQUIRED_VERSION="3.81"
18206   fi
18207 
18208   if test "x$MAKE_CANDIDATE" != x; then
18209     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18210 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18211     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18212     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18213     if test "x$IS_GNU_MAKE" = x; then
18214       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18215 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18216     else
18217       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18218       if test "x$IS_MODERN_MAKE" = x; then
18219         { $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
18220 $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;}
18221       else
18222         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18223           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18224             MAKE_EXPECTED_ENV='cygwin'
18225           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18226             MAKE_EXPECTED_ENV='msys'
18227           else
18228             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18229           fi
18230           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18231           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18232         else
18233           # Not relevant for non-Windows
18234           IS_MAKE_CORRECT_ENV=true
18235         fi
18236         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18237           { $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
18238 $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;}
18239         else
18240           FOUND_MAKE=$MAKE_CANDIDATE
18241 
18242   # Only process if variable expands to non-empty
18243 
18244   if test "x$FOUND_MAKE" != x; then
18245     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18246 
18247   # First separate the path from the arguments. This will split at the first
18248   # space.
18249   complete="$FOUND_MAKE"
18250   path="${complete%% *}"
18251   tmp="$complete EOL"
18252   arguments="${tmp#* }"
18253 
18254   # Input might be given as Windows format, start by converting to
18255   # unix format.
18256   new_path=`$CYGPATH -u "$path"`
18257 
18258   # Now try to locate executable using which
18259   new_path=`$WHICH "$new_path" 2> /dev/null`
18260   # bat and cmd files are not always considered executable in cygwin causing which
18261   # to not find them
18262   if test "x$new_path" = x \
18263       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18264       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18265     new_path=`$CYGPATH -u "$path"`
18266   fi
18267   if test "x$new_path" = x; then
18268     # Oops. Which didn't find the executable.
18269     # The splitting of arguments from the executable at a space might have been incorrect,
18270     # since paths with space are more likely in Windows. Give it another try with the whole
18271     # argument.
18272     path="$complete"
18273     arguments="EOL"
18274     new_path=`$CYGPATH -u "$path"`
18275     new_path=`$WHICH "$new_path" 2> /dev/null`
18276     # bat and cmd files are not always considered executable in cygwin causing which
18277     # to not find them
18278     if test "x$new_path" = x \
18279         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18280         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18281       new_path=`$CYGPATH -u "$path"`
18282     fi
18283     if test "x$new_path" = x; then
18284       # It's still not found. Now this is an unrecoverable error.
18285       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18286 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18287       has_space=`$ECHO "$complete" | $GREP " "`
18288       if test "x$has_space" != x; then
18289         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18290 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18291       fi
18292       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18293     fi
18294   fi
18295 
18296   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18297   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18298   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18299   # "foo.exe" is OK but "foo" is an error.
18300   #
18301   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18302   # It is also a way to make sure we got the proper file name for the real test later on.
18303   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18304   if test "x$test_shortpath" = x; then
18305     # Short path failed, file does not exist as specified.
18306     # Try adding .exe or .cmd
18307     if test -f "${new_path}.exe"; then
18308       input_to_shortpath="${new_path}.exe"
18309     elif test -f "${new_path}.cmd"; then
18310       input_to_shortpath="${new_path}.cmd"
18311     else
18312       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18313 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18314       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18315 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18316       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18317     fi
18318   else
18319     input_to_shortpath="$new_path"
18320   fi
18321 
18322   # Call helper function which possibly converts this using DOS-style short mode.
18323   # If so, the updated path is stored in $new_path.
18324   new_path="$input_to_shortpath"
18325 
18326   input_path="$input_to_shortpath"
18327   # Check if we need to convert this using DOS-style short mode. If the path
18328   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18329   # take no chances and rewrite it.
18330   # Note: m4 eats our [], so we need to use [ and ] instead.
18331   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18332   if test "x$has_forbidden_chars" != x; then
18333     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18334     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18335     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18336     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18337       # Going to short mode and back again did indeed matter. Since short mode is
18338       # case insensitive, let's make it lowercase to improve readability.
18339       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18340       # Now convert it back to Unix-style (cygpath)
18341       input_path=`$CYGPATH -u "$shortmode_path"`
18342       new_path="$input_path"
18343     fi
18344   fi
18345 
18346   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18347   if test "x$test_cygdrive_prefix" = x; then
18348     # As a simple fix, exclude /usr/bin since it's not a real path.
18349     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18350       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18351       # a path prefixed by /cygdrive for fixpath to work.
18352       new_path="$CYGWIN_ROOT_PATH$input_path"
18353     fi
18354   fi
18355 
18356   # remove trailing .exe if any
18357   new_path="${new_path/%.exe/}"
18358 
18359     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18360 
18361   # First separate the path from the arguments. This will split at the first
18362   # space.
18363   complete="$FOUND_MAKE"
18364   path="${complete%% *}"
18365   tmp="$complete EOL"
18366   arguments="${tmp#* }"
18367 
18368   # Input might be given as Windows format, start by converting to
18369   # unix format.
18370   new_path="$path"
18371 
18372   windows_path="$new_path"
18373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18374     unix_path=`$CYGPATH -u "$windows_path"`
18375     new_path="$unix_path"
18376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18378     new_path="$unix_path"
18379   fi
18380 
18381 
18382   # Now try to locate executable using which
18383   new_path=`$WHICH "$new_path" 2> /dev/null`
18384 
18385   if test "x$new_path" = x; then
18386     # Oops. Which didn't find the executable.
18387     # The splitting of arguments from the executable at a space might have been incorrect,
18388     # since paths with space are more likely in Windows. Give it another try with the whole
18389     # argument.
18390     path="$complete"
18391     arguments="EOL"
18392     new_path="$path"
18393 
18394   windows_path="$new_path"
18395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18396     unix_path=`$CYGPATH -u "$windows_path"`
18397     new_path="$unix_path"
18398   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18399     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18400     new_path="$unix_path"
18401   fi
18402 
18403 
18404     new_path=`$WHICH "$new_path" 2> /dev/null`
18405     # bat and cmd files are not always considered executable in MSYS causing which
18406     # to not find them
18407     if test "x$new_path" = x \
18408         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18409         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18410       new_path="$path"
18411 
18412   windows_path="$new_path"
18413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18414     unix_path=`$CYGPATH -u "$windows_path"`
18415     new_path="$unix_path"
18416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18417     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18418     new_path="$unix_path"
18419   fi
18420 
18421     fi
18422 
18423     if test "x$new_path" = x; then
18424       # It's still not found. Now this is an unrecoverable error.
18425       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18426 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18427       has_space=`$ECHO "$complete" | $GREP " "`
18428       if test "x$has_space" != x; then
18429         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18430 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18431       fi
18432       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18433     fi
18434   fi
18435 
18436   # Now new_path has a complete unix path to the binary
18437   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18438     # Keep paths in /bin as-is, but remove trailing .exe if any
18439     new_path="${new_path/%.exe/}"
18440     # Do not save /bin paths to all_fixpath_prefixes!
18441   else
18442     # Not in mixed or Windows style, start by that.
18443     new_path=`cmd //c echo $new_path`
18444 
18445   input_path="$new_path"
18446   # Check if we need to convert this using DOS-style short mode. If the path
18447   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18448   # take no chances and rewrite it.
18449   # Note: m4 eats our [], so we need to use [ and ] instead.
18450   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18451   if test "x$has_forbidden_chars" != x; then
18452     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18453     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18454   fi
18455 
18456     # Output is in $new_path
18457 
18458   windows_path="$new_path"
18459   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18460     unix_path=`$CYGPATH -u "$windows_path"`
18461     new_path="$unix_path"
18462   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18463     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18464     new_path="$unix_path"
18465   fi
18466 
18467     # remove trailing .exe if any
18468     new_path="${new_path/%.exe/}"
18469 
18470     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18471     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18472   fi
18473 
18474     else
18475       # We're on a unix platform. Hooray! :)
18476       # First separate the path from the arguments. This will split at the first
18477       # space.
18478       complete="$FOUND_MAKE"
18479       path="${complete%% *}"
18480       tmp="$complete EOL"
18481       arguments="${tmp#* }"
18482 
18483       # Cannot rely on the command "which" here since it doesn't always work.
18484       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18485       if test -z "$is_absolute_path"; then
18486         # Path to executable is not absolute. Find it.
18487         IFS_save="$IFS"
18488         IFS=:
18489         for p in $PATH; do
18490           if test -f "$p/$path" && test -x "$p/$path"; then
18491             new_path="$p/$path"
18492             break
18493           fi
18494         done
18495         IFS="$IFS_save"
18496       else
18497         # This is an absolute path, we can use it without further modifications.
18498         new_path="$path"
18499       fi
18500 
18501       if test "x$new_path" = x; then
18502         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18503 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18504         has_space=`$ECHO "$complete" | $GREP " "`
18505         if test "x$has_space" != x; then
18506           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18507 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18508         fi
18509         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18510       fi
18511     fi
18512 
18513     # Now join together the path and the arguments once again
18514     if test "x$arguments" != xEOL; then
18515       new_complete="$new_path ${arguments% *}"
18516     else
18517       new_complete="$new_path"
18518     fi
18519 
18520     if test "x$complete" != "x$new_complete"; then
18521       FOUND_MAKE="$new_complete"
18522       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18523 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18524     fi
18525   fi
18526 
18527         fi
18528       fi
18529     fi
18530   fi
18531 
18532 
18533     if test "x$FOUND_MAKE" = x; then
18534       for ac_prog in make
18535 do
18536   # Extract the first word of "$ac_prog", so it can be a program name with args.
18537 set dummy $ac_prog; ac_word=$2
18538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18539 $as_echo_n "checking for $ac_word... " >&6; }
18540 if ${ac_cv_path_CHECK_MAKE+:} false; then :
18541   $as_echo_n "(cached) " >&6
18542 else
18543   case $CHECK_MAKE in
18544   [\\/]* | ?:[\\/]*)
18545   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18546   ;;
18547   *)
18548   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18549 for as_dir in $PATH
18550 do
18551   IFS=$as_save_IFS
18552   test -z "$as_dir" && as_dir=.
18553     for ac_exec_ext in '' $ac_executable_extensions; do
18554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18555     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18557     break 2
18558   fi
18559 done
18560   done
18561 IFS=$as_save_IFS
18562 
18563   ;;
18564 esac
18565 fi
18566 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18567 if test -n "$CHECK_MAKE"; then
18568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18569 $as_echo "$CHECK_MAKE" >&6; }
18570 else
18571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18572 $as_echo "no" >&6; }
18573 fi
18574 
18575 
18576   test -n "$CHECK_MAKE" && break
18577 done
18578 
18579 
18580   MAKE_CANDIDATE=""$CHECK_MAKE""
18581   DESCRIPTION="make in PATH"
18582 
18583   # On Cygwin, we require a newer version of make than on other platforms
18584   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18585     MAKE_VERSION_EXPR="-e 4\."
18586     MAKE_REQUIRED_VERSION="4.0"
18587    else
18588     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18589     MAKE_REQUIRED_VERSION="3.81"
18590   fi
18591 
18592   if test "x$MAKE_CANDIDATE" != x; then
18593     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18594 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18595     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18596     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18597     if test "x$IS_GNU_MAKE" = x; then
18598       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18599 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18600     else
18601       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18602       if test "x$IS_MODERN_MAKE" = x; then
18603         { $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
18604 $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;}
18605       else
18606         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18607           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18608             MAKE_EXPECTED_ENV='cygwin'
18609           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18610             MAKE_EXPECTED_ENV='msys'
18611           else
18612             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18613           fi
18614           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18615           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18616         else
18617           # Not relevant for non-Windows
18618           IS_MAKE_CORRECT_ENV=true
18619         fi
18620         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18621           { $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
18622 $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;}
18623         else
18624           FOUND_MAKE=$MAKE_CANDIDATE
18625 
18626   # Only process if variable expands to non-empty
18627 
18628   if test "x$FOUND_MAKE" != x; then
18629     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18630 
18631   # First separate the path from the arguments. This will split at the first
18632   # space.
18633   complete="$FOUND_MAKE"
18634   path="${complete%% *}"
18635   tmp="$complete EOL"
18636   arguments="${tmp#* }"
18637 
18638   # Input might be given as Windows format, start by converting to
18639   # unix format.
18640   new_path=`$CYGPATH -u "$path"`
18641 
18642   # Now try to locate executable using which
18643   new_path=`$WHICH "$new_path" 2> /dev/null`
18644   # bat and cmd files are not always considered executable in cygwin causing which
18645   # to not find them
18646   if test "x$new_path" = x \
18647       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18648       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18649     new_path=`$CYGPATH -u "$path"`
18650   fi
18651   if test "x$new_path" = x; then
18652     # Oops. Which didn't find the executable.
18653     # The splitting of arguments from the executable at a space might have been incorrect,
18654     # since paths with space are more likely in Windows. Give it another try with the whole
18655     # argument.
18656     path="$complete"
18657     arguments="EOL"
18658     new_path=`$CYGPATH -u "$path"`
18659     new_path=`$WHICH "$new_path" 2> /dev/null`
18660     # bat and cmd files are not always considered executable in cygwin causing which
18661     # to not find them
18662     if test "x$new_path" = x \
18663         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18664         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18665       new_path=`$CYGPATH -u "$path"`
18666     fi
18667     if test "x$new_path" = x; then
18668       # It's still not found. Now this is an unrecoverable error.
18669       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18670 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18671       has_space=`$ECHO "$complete" | $GREP " "`
18672       if test "x$has_space" != x; then
18673         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18674 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18675       fi
18676       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18677     fi
18678   fi
18679 
18680   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18681   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18682   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18683   # "foo.exe" is OK but "foo" is an error.
18684   #
18685   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18686   # It is also a way to make sure we got the proper file name for the real test later on.
18687   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18688   if test "x$test_shortpath" = x; then
18689     # Short path failed, file does not exist as specified.
18690     # Try adding .exe or .cmd
18691     if test -f "${new_path}.exe"; then
18692       input_to_shortpath="${new_path}.exe"
18693     elif test -f "${new_path}.cmd"; then
18694       input_to_shortpath="${new_path}.cmd"
18695     else
18696       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18697 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18698       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18699 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18700       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18701     fi
18702   else
18703     input_to_shortpath="$new_path"
18704   fi
18705 
18706   # Call helper function which possibly converts this using DOS-style short mode.
18707   # If so, the updated path is stored in $new_path.
18708   new_path="$input_to_shortpath"
18709 
18710   input_path="$input_to_shortpath"
18711   # Check if we need to convert this using DOS-style short mode. If the path
18712   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18713   # take no chances and rewrite it.
18714   # Note: m4 eats our [], so we need to use [ and ] instead.
18715   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18716   if test "x$has_forbidden_chars" != x; then
18717     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18718     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18719     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18720     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18721       # Going to short mode and back again did indeed matter. Since short mode is
18722       # case insensitive, let's make it lowercase to improve readability.
18723       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18724       # Now convert it back to Unix-style (cygpath)
18725       input_path=`$CYGPATH -u "$shortmode_path"`
18726       new_path="$input_path"
18727     fi
18728   fi
18729 
18730   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18731   if test "x$test_cygdrive_prefix" = x; then
18732     # As a simple fix, exclude /usr/bin since it's not a real path.
18733     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18734       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18735       # a path prefixed by /cygdrive for fixpath to work.
18736       new_path="$CYGWIN_ROOT_PATH$input_path"
18737     fi
18738   fi
18739 
18740   # remove trailing .exe if any
18741   new_path="${new_path/%.exe/}"
18742 
18743     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18744 
18745   # First separate the path from the arguments. This will split at the first
18746   # space.
18747   complete="$FOUND_MAKE"
18748   path="${complete%% *}"
18749   tmp="$complete EOL"
18750   arguments="${tmp#* }"
18751 
18752   # Input might be given as Windows format, start by converting to
18753   # unix format.
18754   new_path="$path"
18755 
18756   windows_path="$new_path"
18757   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18758     unix_path=`$CYGPATH -u "$windows_path"`
18759     new_path="$unix_path"
18760   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18761     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18762     new_path="$unix_path"
18763   fi
18764 
18765 
18766   # Now try to locate executable using which
18767   new_path=`$WHICH "$new_path" 2> /dev/null`
18768 
18769   if test "x$new_path" = x; then
18770     # Oops. Which didn't find the executable.
18771     # The splitting of arguments from the executable at a space might have been incorrect,
18772     # since paths with space are more likely in Windows. Give it another try with the whole
18773     # argument.
18774     path="$complete"
18775     arguments="EOL"
18776     new_path="$path"
18777 
18778   windows_path="$new_path"
18779   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18780     unix_path=`$CYGPATH -u "$windows_path"`
18781     new_path="$unix_path"
18782   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18783     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18784     new_path="$unix_path"
18785   fi
18786 
18787 
18788     new_path=`$WHICH "$new_path" 2> /dev/null`
18789     # bat and cmd files are not always considered executable in MSYS causing which
18790     # to not find them
18791     if test "x$new_path" = x \
18792         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18793         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18794       new_path="$path"
18795 
18796   windows_path="$new_path"
18797   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18798     unix_path=`$CYGPATH -u "$windows_path"`
18799     new_path="$unix_path"
18800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18801     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18802     new_path="$unix_path"
18803   fi
18804 
18805     fi
18806 
18807     if test "x$new_path" = x; then
18808       # It's still not found. Now this is an unrecoverable error.
18809       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18810 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18811       has_space=`$ECHO "$complete" | $GREP " "`
18812       if test "x$has_space" != x; then
18813         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18814 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18815       fi
18816       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18817     fi
18818   fi
18819 
18820   # Now new_path has a complete unix path to the binary
18821   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18822     # Keep paths in /bin as-is, but remove trailing .exe if any
18823     new_path="${new_path/%.exe/}"
18824     # Do not save /bin paths to all_fixpath_prefixes!
18825   else
18826     # Not in mixed or Windows style, start by that.
18827     new_path=`cmd //c echo $new_path`
18828 
18829   input_path="$new_path"
18830   # Check if we need to convert this using DOS-style short mode. If the path
18831   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18832   # take no chances and rewrite it.
18833   # Note: m4 eats our [], so we need to use [ and ] instead.
18834   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18835   if test "x$has_forbidden_chars" != x; then
18836     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18837     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18838   fi
18839 
18840     # Output is in $new_path
18841 
18842   windows_path="$new_path"
18843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18844     unix_path=`$CYGPATH -u "$windows_path"`
18845     new_path="$unix_path"
18846   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18847     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18848     new_path="$unix_path"
18849   fi
18850 
18851     # remove trailing .exe if any
18852     new_path="${new_path/%.exe/}"
18853 
18854     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18855     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18856   fi
18857 
18858     else
18859       # We're on a unix platform. Hooray! :)
18860       # First separate the path from the arguments. This will split at the first
18861       # space.
18862       complete="$FOUND_MAKE"
18863       path="${complete%% *}"
18864       tmp="$complete EOL"
18865       arguments="${tmp#* }"
18866 
18867       # Cannot rely on the command "which" here since it doesn't always work.
18868       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18869       if test -z "$is_absolute_path"; then
18870         # Path to executable is not absolute. Find it.
18871         IFS_save="$IFS"
18872         IFS=:
18873         for p in $PATH; do
18874           if test -f "$p/$path" && test -x "$p/$path"; then
18875             new_path="$p/$path"
18876             break
18877           fi
18878         done
18879         IFS="$IFS_save"
18880       else
18881         # This is an absolute path, we can use it without further modifications.
18882         new_path="$path"
18883       fi
18884 
18885       if test "x$new_path" = x; then
18886         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18887 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18888         has_space=`$ECHO "$complete" | $GREP " "`
18889         if test "x$has_space" != x; then
18890           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18891 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18892         fi
18893         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18894       fi
18895     fi
18896 
18897     # Now join together the path and the arguments once again
18898     if test "x$arguments" != xEOL; then
18899       new_complete="$new_path ${arguments% *}"
18900     else
18901       new_complete="$new_path"
18902     fi
18903 
18904     if test "x$complete" != "x$new_complete"; then
18905       FOUND_MAKE="$new_complete"
18906       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18907 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18908     fi
18909   fi
18910 
18911         fi
18912       fi
18913     fi
18914   fi
18915 
18916     fi
18917 
18918     if test "x$FOUND_MAKE" = x; then
18919       if test "x$TOOLCHAIN_PATH" != x; then
18920         # We have a toolchain path, check that as well before giving up.
18921         OLD_PATH=$PATH
18922         PATH=$TOOLCHAIN_PATH:$PATH
18923         for ac_prog in gmake
18924 do
18925   # Extract the first word of "$ac_prog", so it can be a program name with args.
18926 set dummy $ac_prog; ac_word=$2
18927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18928 $as_echo_n "checking for $ac_word... " >&6; }
18929 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18930   $as_echo_n "(cached) " >&6
18931 else
18932   case $CHECK_TOOLSDIR_GMAKE in
18933   [\\/]* | ?:[\\/]*)
18934   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18935   ;;
18936   *)
18937   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18938 for as_dir in $PATH
18939 do
18940   IFS=$as_save_IFS
18941   test -z "$as_dir" && as_dir=.
18942     for ac_exec_ext in '' $ac_executable_extensions; do
18943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18944     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18946     break 2
18947   fi
18948 done
18949   done
18950 IFS=$as_save_IFS
18951 
18952   ;;
18953 esac
18954 fi
18955 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18956 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18958 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18959 else
18960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18961 $as_echo "no" >&6; }
18962 fi
18963 
18964 
18965   test -n "$CHECK_TOOLSDIR_GMAKE" && break
18966 done
18967 
18968 
18969   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18970   DESCRIPTION="gmake in tools-dir"
18971 
18972   # On Cygwin, we require a newer version of make than on other platforms
18973   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18974     MAKE_VERSION_EXPR="-e 4\."
18975     MAKE_REQUIRED_VERSION="4.0"
18976    else
18977     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18978     MAKE_REQUIRED_VERSION="3.81"
18979   fi
18980 
18981   if test "x$MAKE_CANDIDATE" != x; then
18982     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18983 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18984     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18985     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18986     if test "x$IS_GNU_MAKE" = x; then
18987       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18988 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18989     else
18990       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18991       if test "x$IS_MODERN_MAKE" = x; then
18992         { $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
18993 $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;}
18994       else
18995         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18996           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18997             MAKE_EXPECTED_ENV='cygwin'
18998           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18999             MAKE_EXPECTED_ENV='msys'
19000           else
19001             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19002           fi
19003           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19004           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19005         else
19006           # Not relevant for non-Windows
19007           IS_MAKE_CORRECT_ENV=true
19008         fi
19009         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19010           { $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
19011 $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;}
19012         else
19013           FOUND_MAKE=$MAKE_CANDIDATE
19014 
19015   # Only process if variable expands to non-empty
19016 
19017   if test "x$FOUND_MAKE" != x; then
19018     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19019 
19020   # First separate the path from the arguments. This will split at the first
19021   # space.
19022   complete="$FOUND_MAKE"
19023   path="${complete%% *}"
19024   tmp="$complete EOL"
19025   arguments="${tmp#* }"
19026 
19027   # Input might be given as Windows format, start by converting to
19028   # unix format.
19029   new_path=`$CYGPATH -u "$path"`
19030 
19031   # Now try to locate executable using which
19032   new_path=`$WHICH "$new_path" 2> /dev/null`
19033   # bat and cmd files are not always considered executable in cygwin causing which
19034   # to not find them
19035   if test "x$new_path" = x \
19036       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19037       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19038     new_path=`$CYGPATH -u "$path"`
19039   fi
19040   if test "x$new_path" = x; then
19041     # Oops. Which didn't find the executable.
19042     # The splitting of arguments from the executable at a space might have been incorrect,
19043     # since paths with space are more likely in Windows. Give it another try with the whole
19044     # argument.
19045     path="$complete"
19046     arguments="EOL"
19047     new_path=`$CYGPATH -u "$path"`
19048     new_path=`$WHICH "$new_path" 2> /dev/null`
19049     # bat and cmd files are not always considered executable in cygwin causing which
19050     # to not find them
19051     if test "x$new_path" = x \
19052         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19053         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19054       new_path=`$CYGPATH -u "$path"`
19055     fi
19056     if test "x$new_path" = x; then
19057       # It's still not found. Now this is an unrecoverable error.
19058       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19059 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19060       has_space=`$ECHO "$complete" | $GREP " "`
19061       if test "x$has_space" != x; then
19062         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19063 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19064       fi
19065       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19066     fi
19067   fi
19068 
19069   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19070   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19071   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19072   # "foo.exe" is OK but "foo" is an error.
19073   #
19074   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19075   # It is also a way to make sure we got the proper file name for the real test later on.
19076   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19077   if test "x$test_shortpath" = x; then
19078     # Short path failed, file does not exist as specified.
19079     # Try adding .exe or .cmd
19080     if test -f "${new_path}.exe"; then
19081       input_to_shortpath="${new_path}.exe"
19082     elif test -f "${new_path}.cmd"; then
19083       input_to_shortpath="${new_path}.cmd"
19084     else
19085       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19086 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19087       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19088 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19089       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19090     fi
19091   else
19092     input_to_shortpath="$new_path"
19093   fi
19094 
19095   # Call helper function which possibly converts this using DOS-style short mode.
19096   # If so, the updated path is stored in $new_path.
19097   new_path="$input_to_shortpath"
19098 
19099   input_path="$input_to_shortpath"
19100   # Check if we need to convert this using DOS-style short mode. If the path
19101   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19102   # take no chances and rewrite it.
19103   # Note: m4 eats our [], so we need to use [ and ] instead.
19104   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19105   if test "x$has_forbidden_chars" != x; then
19106     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19107     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19108     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19109     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19110       # Going to short mode and back again did indeed matter. Since short mode is
19111       # case insensitive, let's make it lowercase to improve readability.
19112       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19113       # Now convert it back to Unix-style (cygpath)
19114       input_path=`$CYGPATH -u "$shortmode_path"`
19115       new_path="$input_path"
19116     fi
19117   fi
19118 
19119   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19120   if test "x$test_cygdrive_prefix" = x; then
19121     # As a simple fix, exclude /usr/bin since it's not a real path.
19122     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19123       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19124       # a path prefixed by /cygdrive for fixpath to work.
19125       new_path="$CYGWIN_ROOT_PATH$input_path"
19126     fi
19127   fi
19128 
19129   # remove trailing .exe if any
19130   new_path="${new_path/%.exe/}"
19131 
19132     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19133 
19134   # First separate the path from the arguments. This will split at the first
19135   # space.
19136   complete="$FOUND_MAKE"
19137   path="${complete%% *}"
19138   tmp="$complete EOL"
19139   arguments="${tmp#* }"
19140 
19141   # Input might be given as Windows format, start by converting to
19142   # unix format.
19143   new_path="$path"
19144 
19145   windows_path="$new_path"
19146   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19147     unix_path=`$CYGPATH -u "$windows_path"`
19148     new_path="$unix_path"
19149   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19150     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19151     new_path="$unix_path"
19152   fi
19153 
19154 
19155   # Now try to locate executable using which
19156   new_path=`$WHICH "$new_path" 2> /dev/null`
19157 
19158   if test "x$new_path" = x; then
19159     # Oops. Which didn't find the executable.
19160     # The splitting of arguments from the executable at a space might have been incorrect,
19161     # since paths with space are more likely in Windows. Give it another try with the whole
19162     # argument.
19163     path="$complete"
19164     arguments="EOL"
19165     new_path="$path"
19166 
19167   windows_path="$new_path"
19168   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19169     unix_path=`$CYGPATH -u "$windows_path"`
19170     new_path="$unix_path"
19171   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19172     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19173     new_path="$unix_path"
19174   fi
19175 
19176 
19177     new_path=`$WHICH "$new_path" 2> /dev/null`
19178     # bat and cmd files are not always considered executable in MSYS causing which
19179     # to not find them
19180     if test "x$new_path" = x \
19181         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19182         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19183       new_path="$path"
19184 
19185   windows_path="$new_path"
19186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19187     unix_path=`$CYGPATH -u "$windows_path"`
19188     new_path="$unix_path"
19189   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19190     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19191     new_path="$unix_path"
19192   fi
19193 
19194     fi
19195 
19196     if test "x$new_path" = x; then
19197       # It's still not found. Now this is an unrecoverable error.
19198       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19199 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19200       has_space=`$ECHO "$complete" | $GREP " "`
19201       if test "x$has_space" != x; then
19202         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19203 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19204       fi
19205       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19206     fi
19207   fi
19208 
19209   # Now new_path has a complete unix path to the binary
19210   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19211     # Keep paths in /bin as-is, but remove trailing .exe if any
19212     new_path="${new_path/%.exe/}"
19213     # Do not save /bin paths to all_fixpath_prefixes!
19214   else
19215     # Not in mixed or Windows style, start by that.
19216     new_path=`cmd //c echo $new_path`
19217 
19218   input_path="$new_path"
19219   # Check if we need to convert this using DOS-style short mode. If the path
19220   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19221   # take no chances and rewrite it.
19222   # Note: m4 eats our [], so we need to use [ and ] instead.
19223   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19224   if test "x$has_forbidden_chars" != x; then
19225     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19226     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19227   fi
19228 
19229     # Output is in $new_path
19230 
19231   windows_path="$new_path"
19232   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19233     unix_path=`$CYGPATH -u "$windows_path"`
19234     new_path="$unix_path"
19235   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19236     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19237     new_path="$unix_path"
19238   fi
19239 
19240     # remove trailing .exe if any
19241     new_path="${new_path/%.exe/}"
19242 
19243     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19244     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19245   fi
19246 
19247     else
19248       # We're on a unix platform. Hooray! :)
19249       # First separate the path from the arguments. This will split at the first
19250       # space.
19251       complete="$FOUND_MAKE"
19252       path="${complete%% *}"
19253       tmp="$complete EOL"
19254       arguments="${tmp#* }"
19255 
19256       # Cannot rely on the command "which" here since it doesn't always work.
19257       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19258       if test -z "$is_absolute_path"; then
19259         # Path to executable is not absolute. Find it.
19260         IFS_save="$IFS"
19261         IFS=:
19262         for p in $PATH; do
19263           if test -f "$p/$path" && test -x "$p/$path"; then
19264             new_path="$p/$path"
19265             break
19266           fi
19267         done
19268         IFS="$IFS_save"
19269       else
19270         # This is an absolute path, we can use it without further modifications.
19271         new_path="$path"
19272       fi
19273 
19274       if test "x$new_path" = x; then
19275         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19276 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19277         has_space=`$ECHO "$complete" | $GREP " "`
19278         if test "x$has_space" != x; then
19279           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19280 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19281         fi
19282         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19283       fi
19284     fi
19285 
19286     # Now join together the path and the arguments once again
19287     if test "x$arguments" != xEOL; then
19288       new_complete="$new_path ${arguments% *}"
19289     else
19290       new_complete="$new_path"
19291     fi
19292 
19293     if test "x$complete" != "x$new_complete"; then
19294       FOUND_MAKE="$new_complete"
19295       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19296 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19297     fi
19298   fi
19299 
19300         fi
19301       fi
19302     fi
19303   fi
19304 
19305         if test "x$FOUND_MAKE" = x; then
19306           for ac_prog in make
19307 do
19308   # Extract the first word of "$ac_prog", so it can be a program name with args.
19309 set dummy $ac_prog; ac_word=$2
19310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19311 $as_echo_n "checking for $ac_word... " >&6; }
19312 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19313   $as_echo_n "(cached) " >&6
19314 else
19315   case $CHECK_TOOLSDIR_MAKE in
19316   [\\/]* | ?:[\\/]*)
19317   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19318   ;;
19319   *)
19320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19321 for as_dir in $PATH
19322 do
19323   IFS=$as_save_IFS
19324   test -z "$as_dir" && as_dir=.
19325     for ac_exec_ext in '' $ac_executable_extensions; do
19326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19327     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19329     break 2
19330   fi
19331 done
19332   done
19333 IFS=$as_save_IFS
19334 
19335   ;;
19336 esac
19337 fi
19338 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19339 if test -n "$CHECK_TOOLSDIR_MAKE"; then
19340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19341 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19342 else
19343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19344 $as_echo "no" >&6; }
19345 fi
19346 
19347 
19348   test -n "$CHECK_TOOLSDIR_MAKE" && break
19349 done
19350 
19351 
19352   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19353   DESCRIPTION="make in tools-dir"
19354 
19355   # On Cygwin, we require a newer version of make than on other platforms
19356   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19357     MAKE_VERSION_EXPR="-e 4\."
19358     MAKE_REQUIRED_VERSION="4.0"
19359    else
19360     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19361     MAKE_REQUIRED_VERSION="3.81"
19362   fi
19363 
19364   if test "x$MAKE_CANDIDATE" != x; then
19365     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19366 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19367     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19368     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19369     if test "x$IS_GNU_MAKE" = x; then
19370       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19371 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19372     else
19373       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19374       if test "x$IS_MODERN_MAKE" = x; then
19375         { $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
19376 $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;}
19377       else
19378         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19379           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19380             MAKE_EXPECTED_ENV='cygwin'
19381           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19382             MAKE_EXPECTED_ENV='msys'
19383           else
19384             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19385           fi
19386           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19387           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19388         else
19389           # Not relevant for non-Windows
19390           IS_MAKE_CORRECT_ENV=true
19391         fi
19392         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19393           { $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
19394 $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;}
19395         else
19396           FOUND_MAKE=$MAKE_CANDIDATE
19397 
19398   # Only process if variable expands to non-empty
19399 
19400   if test "x$FOUND_MAKE" != x; then
19401     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19402 
19403   # First separate the path from the arguments. This will split at the first
19404   # space.
19405   complete="$FOUND_MAKE"
19406   path="${complete%% *}"
19407   tmp="$complete EOL"
19408   arguments="${tmp#* }"
19409 
19410   # Input might be given as Windows format, start by converting to
19411   # unix format.
19412   new_path=`$CYGPATH -u "$path"`
19413 
19414   # Now try to locate executable using which
19415   new_path=`$WHICH "$new_path" 2> /dev/null`
19416   # bat and cmd files are not always considered executable in cygwin causing which
19417   # to not find them
19418   if test "x$new_path" = x \
19419       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19420       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19421     new_path=`$CYGPATH -u "$path"`
19422   fi
19423   if test "x$new_path" = x; then
19424     # Oops. Which didn't find the executable.
19425     # The splitting of arguments from the executable at a space might have been incorrect,
19426     # since paths with space are more likely in Windows. Give it another try with the whole
19427     # argument.
19428     path="$complete"
19429     arguments="EOL"
19430     new_path=`$CYGPATH -u "$path"`
19431     new_path=`$WHICH "$new_path" 2> /dev/null`
19432     # bat and cmd files are not always considered executable in cygwin causing which
19433     # to not find them
19434     if test "x$new_path" = x \
19435         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19436         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19437       new_path=`$CYGPATH -u "$path"`
19438     fi
19439     if test "x$new_path" = x; then
19440       # It's still not found. Now this is an unrecoverable error.
19441       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19442 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19443       has_space=`$ECHO "$complete" | $GREP " "`
19444       if test "x$has_space" != x; then
19445         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19446 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19447       fi
19448       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19449     fi
19450   fi
19451 
19452   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19453   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19454   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19455   # "foo.exe" is OK but "foo" is an error.
19456   #
19457   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19458   # It is also a way to make sure we got the proper file name for the real test later on.
19459   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19460   if test "x$test_shortpath" = x; then
19461     # Short path failed, file does not exist as specified.
19462     # Try adding .exe or .cmd
19463     if test -f "${new_path}.exe"; then
19464       input_to_shortpath="${new_path}.exe"
19465     elif test -f "${new_path}.cmd"; then
19466       input_to_shortpath="${new_path}.cmd"
19467     else
19468       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19469 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19470       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19471 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19472       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19473     fi
19474   else
19475     input_to_shortpath="$new_path"
19476   fi
19477 
19478   # Call helper function which possibly converts this using DOS-style short mode.
19479   # If so, the updated path is stored in $new_path.
19480   new_path="$input_to_shortpath"
19481 
19482   input_path="$input_to_shortpath"
19483   # Check if we need to convert this using DOS-style short mode. If the path
19484   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19485   # take no chances and rewrite it.
19486   # Note: m4 eats our [], so we need to use [ and ] instead.
19487   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19488   if test "x$has_forbidden_chars" != x; then
19489     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19490     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19491     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19492     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19493       # Going to short mode and back again did indeed matter. Since short mode is
19494       # case insensitive, let's make it lowercase to improve readability.
19495       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19496       # Now convert it back to Unix-style (cygpath)
19497       input_path=`$CYGPATH -u "$shortmode_path"`
19498       new_path="$input_path"
19499     fi
19500   fi
19501 
19502   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19503   if test "x$test_cygdrive_prefix" = x; then
19504     # As a simple fix, exclude /usr/bin since it's not a real path.
19505     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19506       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19507       # a path prefixed by /cygdrive for fixpath to work.
19508       new_path="$CYGWIN_ROOT_PATH$input_path"
19509     fi
19510   fi
19511 
19512   # remove trailing .exe if any
19513   new_path="${new_path/%.exe/}"
19514 
19515     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19516 
19517   # First separate the path from the arguments. This will split at the first
19518   # space.
19519   complete="$FOUND_MAKE"
19520   path="${complete%% *}"
19521   tmp="$complete EOL"
19522   arguments="${tmp#* }"
19523 
19524   # Input might be given as Windows format, start by converting to
19525   # unix format.
19526   new_path="$path"
19527 
19528   windows_path="$new_path"
19529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19530     unix_path=`$CYGPATH -u "$windows_path"`
19531     new_path="$unix_path"
19532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19533     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19534     new_path="$unix_path"
19535   fi
19536 
19537 
19538   # Now try to locate executable using which
19539   new_path=`$WHICH "$new_path" 2> /dev/null`
19540 
19541   if test "x$new_path" = x; then
19542     # Oops. Which didn't find the executable.
19543     # The splitting of arguments from the executable at a space might have been incorrect,
19544     # since paths with space are more likely in Windows. Give it another try with the whole
19545     # argument.
19546     path="$complete"
19547     arguments="EOL"
19548     new_path="$path"
19549 
19550   windows_path="$new_path"
19551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19552     unix_path=`$CYGPATH -u "$windows_path"`
19553     new_path="$unix_path"
19554   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19555     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19556     new_path="$unix_path"
19557   fi
19558 
19559 
19560     new_path=`$WHICH "$new_path" 2> /dev/null`
19561     # bat and cmd files are not always considered executable in MSYS causing which
19562     # to not find them
19563     if test "x$new_path" = x \
19564         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19565         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19566       new_path="$path"
19567 
19568   windows_path="$new_path"
19569   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19570     unix_path=`$CYGPATH -u "$windows_path"`
19571     new_path="$unix_path"
19572   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19573     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19574     new_path="$unix_path"
19575   fi
19576 
19577     fi
19578 
19579     if test "x$new_path" = x; then
19580       # It's still not found. Now this is an unrecoverable error.
19581       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19582 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19583       has_space=`$ECHO "$complete" | $GREP " "`
19584       if test "x$has_space" != x; then
19585         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19586 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19587       fi
19588       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19589     fi
19590   fi
19591 
19592   # Now new_path has a complete unix path to the binary
19593   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19594     # Keep paths in /bin as-is, but remove trailing .exe if any
19595     new_path="${new_path/%.exe/}"
19596     # Do not save /bin paths to all_fixpath_prefixes!
19597   else
19598     # Not in mixed or Windows style, start by that.
19599     new_path=`cmd //c echo $new_path`
19600 
19601   input_path="$new_path"
19602   # Check if we need to convert this using DOS-style short mode. If the path
19603   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19604   # take no chances and rewrite it.
19605   # Note: m4 eats our [], so we need to use [ and ] instead.
19606   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19607   if test "x$has_forbidden_chars" != x; then
19608     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19609     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19610   fi
19611 
19612     # Output is in $new_path
19613 
19614   windows_path="$new_path"
19615   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19616     unix_path=`$CYGPATH -u "$windows_path"`
19617     new_path="$unix_path"
19618   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19619     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19620     new_path="$unix_path"
19621   fi
19622 
19623     # remove trailing .exe if any
19624     new_path="${new_path/%.exe/}"
19625 
19626     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19627     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19628   fi
19629 
19630     else
19631       # We're on a unix platform. Hooray! :)
19632       # First separate the path from the arguments. This will split at the first
19633       # space.
19634       complete="$FOUND_MAKE"
19635       path="${complete%% *}"
19636       tmp="$complete EOL"
19637       arguments="${tmp#* }"
19638 
19639       # Cannot rely on the command "which" here since it doesn't always work.
19640       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19641       if test -z "$is_absolute_path"; then
19642         # Path to executable is not absolute. Find it.
19643         IFS_save="$IFS"
19644         IFS=:
19645         for p in $PATH; do
19646           if test -f "$p/$path" && test -x "$p/$path"; then
19647             new_path="$p/$path"
19648             break
19649           fi
19650         done
19651         IFS="$IFS_save"
19652       else
19653         # This is an absolute path, we can use it without further modifications.
19654         new_path="$path"
19655       fi
19656 
19657       if test "x$new_path" = x; then
19658         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19659 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19660         has_space=`$ECHO "$complete" | $GREP " "`
19661         if test "x$has_space" != x; then
19662           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19663 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19664         fi
19665         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19666       fi
19667     fi
19668 
19669     # Now join together the path and the arguments once again
19670     if test "x$arguments" != xEOL; then
19671       new_complete="$new_path ${arguments% *}"
19672     else
19673       new_complete="$new_path"
19674     fi
19675 
19676     if test "x$complete" != "x$new_complete"; then
19677       FOUND_MAKE="$new_complete"
19678       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19679 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19680     fi
19681   fi
19682 
19683         fi
19684       fi
19685     fi
19686   fi
19687 
19688         fi
19689         PATH=$OLD_PATH
19690       fi
19691     fi
19692 
19693     if test "x$FOUND_MAKE" = x; then
19694       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
19695     fi
19696 
19697     else
19698       # If it succeeded, then it was overridden by the user. We will use it
19699       # for the tool.
19700 
19701       # First remove it from the list of overridden variables, so we can test
19702       # for unknown variables in the end.
19703       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19704 
19705       # Check if we try to supply an empty value
19706       if test "x$MAKE" = x; then
19707         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19708 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19709         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19710 $as_echo_n "checking for MAKE... " >&6; }
19711         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19712 $as_echo "disabled" >&6; }
19713       else
19714         # Check if the provided tool contains a complete path.
19715         tool_specified="$MAKE"
19716         tool_basename="${tool_specified##*/}"
19717         if test "x$tool_basename" = "x$tool_specified"; then
19718           # A command without a complete path is provided, search $PATH.
19719           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19720 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19721           # Extract the first word of "$tool_basename", so it can be a program name with args.
19722 set dummy $tool_basename; ac_word=$2
19723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19724 $as_echo_n "checking for $ac_word... " >&6; }
19725 if ${ac_cv_path_MAKE+:} false; then :
19726   $as_echo_n "(cached) " >&6
19727 else
19728   case $MAKE in
19729   [\\/]* | ?:[\\/]*)
19730   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19731   ;;
19732   *)
19733   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19734 for as_dir in $PATH
19735 do
19736   IFS=$as_save_IFS
19737   test -z "$as_dir" && as_dir=.
19738     for ac_exec_ext in '' $ac_executable_extensions; do
19739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19740     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19742     break 2
19743   fi
19744 done
19745   done
19746 IFS=$as_save_IFS
19747 
19748   ;;
19749 esac
19750 fi
19751 MAKE=$ac_cv_path_MAKE
19752 if test -n "$MAKE"; then
19753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19754 $as_echo "$MAKE" >&6; }
19755 else
19756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19757 $as_echo "no" >&6; }
19758 fi
19759 
19760 
19761           if test "x$MAKE" = x; then
19762             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19763           fi
19764         else
19765           # Otherwise we believe it is a complete path. Use it as it is.
19766           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19767 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19768           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19769 $as_echo_n "checking for MAKE... " >&6; }
19770           if test ! -x "$tool_specified"; then
19771             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19772 $as_echo "not found" >&6; }
19773             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19774           fi
19775           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19776 $as_echo "$tool_specified" >&6; }
19777         fi
19778       fi
19779     fi
19780 
19781     # If MAKE was set by user, verify the version
19782 
19783   MAKE_CANDIDATE=""$MAKE""
19784   DESCRIPTION="user supplied MAKE=$MAKE"
19785 
19786   # On Cygwin, we require a newer version of make than on other platforms
19787   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19788     MAKE_VERSION_EXPR="-e 4\."
19789     MAKE_REQUIRED_VERSION="4.0"
19790    else
19791     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19792     MAKE_REQUIRED_VERSION="3.81"
19793   fi
19794 
19795   if test "x$MAKE_CANDIDATE" != x; then
19796     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19797 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19798     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19799     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19800     if test "x$IS_GNU_MAKE" = x; then
19801       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19802 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19803     else
19804       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19805       if test "x$IS_MODERN_MAKE" = x; then
19806         { $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
19807 $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;}
19808       else
19809         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19810           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19811             MAKE_EXPECTED_ENV='cygwin'
19812           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19813             MAKE_EXPECTED_ENV='msys'
19814           else
19815             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19816           fi
19817           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19818           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19819         else
19820           # Not relevant for non-Windows
19821           IS_MAKE_CORRECT_ENV=true
19822         fi
19823         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19824           { $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
19825 $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;}
19826         else
19827           FOUND_MAKE=$MAKE_CANDIDATE
19828 
19829   # Only process if variable expands to non-empty
19830 
19831   if test "x$FOUND_MAKE" != x; then
19832     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19833 
19834   # First separate the path from the arguments. This will split at the first
19835   # space.
19836   complete="$FOUND_MAKE"
19837   path="${complete%% *}"
19838   tmp="$complete EOL"
19839   arguments="${tmp#* }"
19840 
19841   # Input might be given as Windows format, start by converting to
19842   # unix format.
19843   new_path=`$CYGPATH -u "$path"`
19844 
19845   # Now try to locate executable using which
19846   new_path=`$WHICH "$new_path" 2> /dev/null`
19847   # bat and cmd files are not always considered executable in cygwin causing which
19848   # to not find them
19849   if test "x$new_path" = x \
19850       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19851       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19852     new_path=`$CYGPATH -u "$path"`
19853   fi
19854   if test "x$new_path" = x; then
19855     # Oops. Which didn't find the executable.
19856     # The splitting of arguments from the executable at a space might have been incorrect,
19857     # since paths with space are more likely in Windows. Give it another try with the whole
19858     # argument.
19859     path="$complete"
19860     arguments="EOL"
19861     new_path=`$CYGPATH -u "$path"`
19862     new_path=`$WHICH "$new_path" 2> /dev/null`
19863     # bat and cmd files are not always considered executable in cygwin causing which
19864     # to not find them
19865     if test "x$new_path" = x \
19866         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19867         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19868       new_path=`$CYGPATH -u "$path"`
19869     fi
19870     if test "x$new_path" = x; then
19871       # It's still not found. Now this is an unrecoverable error.
19872       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19873 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19874       has_space=`$ECHO "$complete" | $GREP " "`
19875       if test "x$has_space" != x; then
19876         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19877 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19878       fi
19879       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19880     fi
19881   fi
19882 
19883   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19884   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19885   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19886   # "foo.exe" is OK but "foo" is an error.
19887   #
19888   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19889   # It is also a way to make sure we got the proper file name for the real test later on.
19890   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19891   if test "x$test_shortpath" = x; then
19892     # Short path failed, file does not exist as specified.
19893     # Try adding .exe or .cmd
19894     if test -f "${new_path}.exe"; then
19895       input_to_shortpath="${new_path}.exe"
19896     elif test -f "${new_path}.cmd"; then
19897       input_to_shortpath="${new_path}.cmd"
19898     else
19899       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19900 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19901       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19902 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19903       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19904     fi
19905   else
19906     input_to_shortpath="$new_path"
19907   fi
19908 
19909   # Call helper function which possibly converts this using DOS-style short mode.
19910   # If so, the updated path is stored in $new_path.
19911   new_path="$input_to_shortpath"
19912 
19913   input_path="$input_to_shortpath"
19914   # Check if we need to convert this using DOS-style short mode. If the path
19915   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19916   # take no chances and rewrite it.
19917   # Note: m4 eats our [], so we need to use [ and ] instead.
19918   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19919   if test "x$has_forbidden_chars" != x; then
19920     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19921     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19922     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19923     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19924       # Going to short mode and back again did indeed matter. Since short mode is
19925       # case insensitive, let's make it lowercase to improve readability.
19926       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19927       # Now convert it back to Unix-style (cygpath)
19928       input_path=`$CYGPATH -u "$shortmode_path"`
19929       new_path="$input_path"
19930     fi
19931   fi
19932 
19933   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19934   if test "x$test_cygdrive_prefix" = x; then
19935     # As a simple fix, exclude /usr/bin since it's not a real path.
19936     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19937       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19938       # a path prefixed by /cygdrive for fixpath to work.
19939       new_path="$CYGWIN_ROOT_PATH$input_path"
19940     fi
19941   fi
19942 
19943   # remove trailing .exe if any
19944   new_path="${new_path/%.exe/}"
19945 
19946     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19947 
19948   # First separate the path from the arguments. This will split at the first
19949   # space.
19950   complete="$FOUND_MAKE"
19951   path="${complete%% *}"
19952   tmp="$complete EOL"
19953   arguments="${tmp#* }"
19954 
19955   # Input might be given as Windows format, start by converting to
19956   # unix format.
19957   new_path="$path"
19958 
19959   windows_path="$new_path"
19960   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19961     unix_path=`$CYGPATH -u "$windows_path"`
19962     new_path="$unix_path"
19963   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19964     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19965     new_path="$unix_path"
19966   fi
19967 
19968 
19969   # Now try to locate executable using which
19970   new_path=`$WHICH "$new_path" 2> /dev/null`
19971 
19972   if test "x$new_path" = x; then
19973     # Oops. Which didn't find the executable.
19974     # The splitting of arguments from the executable at a space might have been incorrect,
19975     # since paths with space are more likely in Windows. Give it another try with the whole
19976     # argument.
19977     path="$complete"
19978     arguments="EOL"
19979     new_path="$path"
19980 
19981   windows_path="$new_path"
19982   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19983     unix_path=`$CYGPATH -u "$windows_path"`
19984     new_path="$unix_path"
19985   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19986     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19987     new_path="$unix_path"
19988   fi
19989 
19990 
19991     new_path=`$WHICH "$new_path" 2> /dev/null`
19992     # bat and cmd files are not always considered executable in MSYS causing which
19993     # to not find them
19994     if test "x$new_path" = x \
19995         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19996         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19997       new_path="$path"
19998 
19999   windows_path="$new_path"
20000   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20001     unix_path=`$CYGPATH -u "$windows_path"`
20002     new_path="$unix_path"
20003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20004     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20005     new_path="$unix_path"
20006   fi
20007 
20008     fi
20009 
20010     if test "x$new_path" = x; then
20011       # It's still not found. Now this is an unrecoverable error.
20012       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20013 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20014       has_space=`$ECHO "$complete" | $GREP " "`
20015       if test "x$has_space" != x; then
20016         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20017 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20018       fi
20019       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20020     fi
20021   fi
20022 
20023   # Now new_path has a complete unix path to the binary
20024   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20025     # Keep paths in /bin as-is, but remove trailing .exe if any
20026     new_path="${new_path/%.exe/}"
20027     # Do not save /bin paths to all_fixpath_prefixes!
20028   else
20029     # Not in mixed or Windows style, start by that.
20030     new_path=`cmd //c echo $new_path`
20031 
20032   input_path="$new_path"
20033   # Check if we need to convert this using DOS-style short mode. If the path
20034   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20035   # take no chances and rewrite it.
20036   # Note: m4 eats our [], so we need to use [ and ] instead.
20037   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20038   if test "x$has_forbidden_chars" != x; then
20039     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20040     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20041   fi
20042 
20043     # Output is in $new_path
20044 
20045   windows_path="$new_path"
20046   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20047     unix_path=`$CYGPATH -u "$windows_path"`
20048     new_path="$unix_path"
20049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20050     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20051     new_path="$unix_path"
20052   fi
20053 
20054     # remove trailing .exe if any
20055     new_path="${new_path/%.exe/}"
20056 
20057     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20058     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20059   fi
20060 
20061     else
20062       # We're on a unix platform. Hooray! :)
20063       # First separate the path from the arguments. This will split at the first
20064       # space.
20065       complete="$FOUND_MAKE"
20066       path="${complete%% *}"
20067       tmp="$complete EOL"
20068       arguments="${tmp#* }"
20069 
20070       # Cannot rely on the command "which" here since it doesn't always work.
20071       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20072       if test -z "$is_absolute_path"; then
20073         # Path to executable is not absolute. Find it.
20074         IFS_save="$IFS"
20075         IFS=:
20076         for p in $PATH; do
20077           if test -f "$p/$path" && test -x "$p/$path"; then
20078             new_path="$p/$path"
20079             break
20080           fi
20081         done
20082         IFS="$IFS_save"
20083       else
20084         # This is an absolute path, we can use it without further modifications.
20085         new_path="$path"
20086       fi
20087 
20088       if test "x$new_path" = x; then
20089         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20090 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20091         has_space=`$ECHO "$complete" | $GREP " "`
20092         if test "x$has_space" != x; then
20093           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20094 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20095         fi
20096         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20097       fi
20098     fi
20099 
20100     # Now join together the path and the arguments once again
20101     if test "x$arguments" != xEOL; then
20102       new_complete="$new_path ${arguments% *}"
20103     else
20104       new_complete="$new_path"
20105     fi
20106 
20107     if test "x$complete" != "x$new_complete"; then
20108       FOUND_MAKE="$new_complete"
20109       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20110 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20111     fi
20112   fi
20113 
20114         fi
20115       fi
20116     fi
20117   fi
20118 
20119     if test "x$FOUND_MAKE" = x; then
20120       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20121     fi
20122 
20123   fi
20124 
20125 
20126   MAKE=$FOUND_MAKE
20127 
20128   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20129 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20130 
20131 
20132   # Check if make supports the output sync option and if so, setup using it.
20133   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20134 $as_echo_n "checking if make --output-sync is supported... " >&6; }
20135   if $MAKE --version -O > /dev/null 2>&1; then
20136     OUTPUT_SYNC_SUPPORTED=true
20137     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20138 $as_echo "yes" >&6; }
20139     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20140 $as_echo_n "checking for output-sync value... " >&6; }
20141 
20142 # Check whether --with-output-sync was given.
20143 if test "${with_output_sync+set}" = set; then :
20144   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20145 fi
20146 
20147     if test "x$OUTPUT_SYNC" = "x"; then
20148       OUTPUT_SYNC=none
20149     fi
20150     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20151 $as_echo "$OUTPUT_SYNC" >&6; }
20152     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20153       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20154     fi
20155   else
20156     OUTPUT_SYNC_SUPPORTED=false
20157     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20158 $as_echo "no" >&6; }
20159   fi
20160 
20161 
20162 
20163 
20164 
20165 
20166   # Test if find supports -delete
20167   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20168 $as_echo_n "checking if find supports -delete... " >&6; }
20169   FIND_DELETE="-delete"
20170 
20171   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20172 
20173   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20174 
20175   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20176   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20177     # No, it does not.
20178     rm $DELETEDIR/TestIfFindSupportsDelete
20179     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20180       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20181       FIND_DELETE="-print | xargs rm"
20182     else
20183       FIND_DELETE="-exec rm \{\} \+"
20184     fi
20185     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20186 $as_echo "no" >&6; }
20187   else
20188     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20189 $as_echo "yes" >&6; }
20190   fi
20191   rmdir $DELETEDIR
20192 
20193 
20194 
20195   # These tools might not be installed by default,
20196   # need hint on how to install them.
20197 
20198 
20199 
20200   # Publish this variable in the help.
20201 
20202 
20203   if [ -z "${UNZIP+x}" ]; then
20204     # The variable is not set by user, try to locate tool using the code snippet
20205     for ac_prog in unzip
20206 do
20207   # Extract the first word of "$ac_prog", so it can be a program name with args.
20208 set dummy $ac_prog; ac_word=$2
20209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20210 $as_echo_n "checking for $ac_word... " >&6; }
20211 if ${ac_cv_path_UNZIP+:} false; then :
20212   $as_echo_n "(cached) " >&6
20213 else
20214   case $UNZIP in
20215   [\\/]* | ?:[\\/]*)
20216   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20217   ;;
20218   *)
20219   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20220 for as_dir in $PATH
20221 do
20222   IFS=$as_save_IFS
20223   test -z "$as_dir" && as_dir=.
20224     for ac_exec_ext in '' $ac_executable_extensions; do
20225   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20226     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20227     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20228     break 2
20229   fi
20230 done
20231   done
20232 IFS=$as_save_IFS
20233 
20234   ;;
20235 esac
20236 fi
20237 UNZIP=$ac_cv_path_UNZIP
20238 if test -n "$UNZIP"; then
20239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20240 $as_echo "$UNZIP" >&6; }
20241 else
20242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20243 $as_echo "no" >&6; }
20244 fi
20245 
20246 
20247   test -n "$UNZIP" && break
20248 done
20249 
20250   else
20251     # The variable is set, but is it from the command line or the environment?
20252 
20253     # Try to remove the string !UNZIP! from our list.
20254     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20255     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20256       # If it failed, the variable was not from the command line. Ignore it,
20257       # but warn the user (except for BASH, which is always set by the calling BASH).
20258       if test "xUNZIP" != xBASH; then
20259         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20260 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20261       fi
20262       # Try to locate tool using the code snippet
20263       for ac_prog in unzip
20264 do
20265   # Extract the first word of "$ac_prog", so it can be a program name with args.
20266 set dummy $ac_prog; ac_word=$2
20267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20268 $as_echo_n "checking for $ac_word... " >&6; }
20269 if ${ac_cv_path_UNZIP+:} false; then :
20270   $as_echo_n "(cached) " >&6
20271 else
20272   case $UNZIP in
20273   [\\/]* | ?:[\\/]*)
20274   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20275   ;;
20276   *)
20277   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20278 for as_dir in $PATH
20279 do
20280   IFS=$as_save_IFS
20281   test -z "$as_dir" && as_dir=.
20282     for ac_exec_ext in '' $ac_executable_extensions; do
20283   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20284     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20285     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20286     break 2
20287   fi
20288 done
20289   done
20290 IFS=$as_save_IFS
20291 
20292   ;;
20293 esac
20294 fi
20295 UNZIP=$ac_cv_path_UNZIP
20296 if test -n "$UNZIP"; then
20297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20298 $as_echo "$UNZIP" >&6; }
20299 else
20300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20301 $as_echo "no" >&6; }
20302 fi
20303 
20304 
20305   test -n "$UNZIP" && break
20306 done
20307 
20308     else
20309       # If it succeeded, then it was overridden by the user. We will use it
20310       # for the tool.
20311 
20312       # First remove it from the list of overridden variables, so we can test
20313       # for unknown variables in the end.
20314       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20315 
20316       # Check if we try to supply an empty value
20317       if test "x$UNZIP" = x; then
20318         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20319 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20320         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20321 $as_echo_n "checking for UNZIP... " >&6; }
20322         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20323 $as_echo "disabled" >&6; }
20324       else
20325         # Check if the provided tool contains a complete path.
20326         tool_specified="$UNZIP"
20327         tool_basename="${tool_specified##*/}"
20328         if test "x$tool_basename" = "x$tool_specified"; then
20329           # A command without a complete path is provided, search $PATH.
20330           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20331 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20332           # Extract the first word of "$tool_basename", so it can be a program name with args.
20333 set dummy $tool_basename; ac_word=$2
20334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20335 $as_echo_n "checking for $ac_word... " >&6; }
20336 if ${ac_cv_path_UNZIP+:} false; then :
20337   $as_echo_n "(cached) " >&6
20338 else
20339   case $UNZIP in
20340   [\\/]* | ?:[\\/]*)
20341   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20342   ;;
20343   *)
20344   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20345 for as_dir in $PATH
20346 do
20347   IFS=$as_save_IFS
20348   test -z "$as_dir" && as_dir=.
20349     for ac_exec_ext in '' $ac_executable_extensions; do
20350   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20351     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20352     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20353     break 2
20354   fi
20355 done
20356   done
20357 IFS=$as_save_IFS
20358 
20359   ;;
20360 esac
20361 fi
20362 UNZIP=$ac_cv_path_UNZIP
20363 if test -n "$UNZIP"; then
20364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20365 $as_echo "$UNZIP" >&6; }
20366 else
20367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20368 $as_echo "no" >&6; }
20369 fi
20370 
20371 
20372           if test "x$UNZIP" = x; then
20373             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20374           fi
20375         else
20376           # Otherwise we believe it is a complete path. Use it as it is.
20377           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20378 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20379           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20380 $as_echo_n "checking for UNZIP... " >&6; }
20381           if test ! -x "$tool_specified"; then
20382             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20383 $as_echo "not found" >&6; }
20384             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20385           fi
20386           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20387 $as_echo "$tool_specified" >&6; }
20388         fi
20389       fi
20390     fi
20391 
20392   fi
20393 
20394 
20395 
20396   if test "x$UNZIP" = x; then
20397     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20398   fi
20399 
20400 
20401 
20402 
20403 
20404   # Publish this variable in the help.
20405 
20406 
20407   if [ -z "${ZIP+x}" ]; then
20408     # The variable is not set by user, try to locate tool using the code snippet
20409     for ac_prog in zip
20410 do
20411   # Extract the first word of "$ac_prog", so it can be a program name with args.
20412 set dummy $ac_prog; ac_word=$2
20413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20414 $as_echo_n "checking for $ac_word... " >&6; }
20415 if ${ac_cv_path_ZIP+:} false; then :
20416   $as_echo_n "(cached) " >&6
20417 else
20418   case $ZIP in
20419   [\\/]* | ?:[\\/]*)
20420   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20421   ;;
20422   *)
20423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20424 for as_dir in $PATH
20425 do
20426   IFS=$as_save_IFS
20427   test -z "$as_dir" && as_dir=.
20428     for ac_exec_ext in '' $ac_executable_extensions; do
20429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20430     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20432     break 2
20433   fi
20434 done
20435   done
20436 IFS=$as_save_IFS
20437 
20438   ;;
20439 esac
20440 fi
20441 ZIP=$ac_cv_path_ZIP
20442 if test -n "$ZIP"; then
20443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20444 $as_echo "$ZIP" >&6; }
20445 else
20446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20447 $as_echo "no" >&6; }
20448 fi
20449 
20450 
20451   test -n "$ZIP" && break
20452 done
20453 
20454   else
20455     # The variable is set, but is it from the command line or the environment?
20456 
20457     # Try to remove the string !ZIP! from our list.
20458     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20459     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20460       # If it failed, the variable was not from the command line. Ignore it,
20461       # but warn the user (except for BASH, which is always set by the calling BASH).
20462       if test "xZIP" != xBASH; then
20463         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20464 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20465       fi
20466       # Try to locate tool using the code snippet
20467       for ac_prog in zip
20468 do
20469   # Extract the first word of "$ac_prog", so it can be a program name with args.
20470 set dummy $ac_prog; ac_word=$2
20471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20472 $as_echo_n "checking for $ac_word... " >&6; }
20473 if ${ac_cv_path_ZIP+:} false; then :
20474   $as_echo_n "(cached) " >&6
20475 else
20476   case $ZIP in
20477   [\\/]* | ?:[\\/]*)
20478   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20479   ;;
20480   *)
20481   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20482 for as_dir in $PATH
20483 do
20484   IFS=$as_save_IFS
20485   test -z "$as_dir" && as_dir=.
20486     for ac_exec_ext in '' $ac_executable_extensions; do
20487   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20488     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20489     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20490     break 2
20491   fi
20492 done
20493   done
20494 IFS=$as_save_IFS
20495 
20496   ;;
20497 esac
20498 fi
20499 ZIP=$ac_cv_path_ZIP
20500 if test -n "$ZIP"; then
20501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20502 $as_echo "$ZIP" >&6; }
20503 else
20504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20505 $as_echo "no" >&6; }
20506 fi
20507 
20508 
20509   test -n "$ZIP" && break
20510 done
20511 
20512     else
20513       # If it succeeded, then it was overridden by the user. We will use it
20514       # for the tool.
20515 
20516       # First remove it from the list of overridden variables, so we can test
20517       # for unknown variables in the end.
20518       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20519 
20520       # Check if we try to supply an empty value
20521       if test "x$ZIP" = x; then
20522         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20523 $as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20524         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20525 $as_echo_n "checking for ZIP... " >&6; }
20526         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20527 $as_echo "disabled" >&6; }
20528       else
20529         # Check if the provided tool contains a complete path.
20530         tool_specified="$ZIP"
20531         tool_basename="${tool_specified##*/}"
20532         if test "x$tool_basename" = "x$tool_specified"; then
20533           # A command without a complete path is provided, search $PATH.
20534           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20535 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20536           # Extract the first word of "$tool_basename", so it can be a program name with args.
20537 set dummy $tool_basename; ac_word=$2
20538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20539 $as_echo_n "checking for $ac_word... " >&6; }
20540 if ${ac_cv_path_ZIP+:} false; then :
20541   $as_echo_n "(cached) " >&6
20542 else
20543   case $ZIP in
20544   [\\/]* | ?:[\\/]*)
20545   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20546   ;;
20547   *)
20548   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20549 for as_dir in $PATH
20550 do
20551   IFS=$as_save_IFS
20552   test -z "$as_dir" && as_dir=.
20553     for ac_exec_ext in '' $ac_executable_extensions; do
20554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20555     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20557     break 2
20558   fi
20559 done
20560   done
20561 IFS=$as_save_IFS
20562 
20563   ;;
20564 esac
20565 fi
20566 ZIP=$ac_cv_path_ZIP
20567 if test -n "$ZIP"; then
20568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20569 $as_echo "$ZIP" >&6; }
20570 else
20571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20572 $as_echo "no" >&6; }
20573 fi
20574 
20575 
20576           if test "x$ZIP" = x; then
20577             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20578           fi
20579         else
20580           # Otherwise we believe it is a complete path. Use it as it is.
20581           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20582 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20583           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20584 $as_echo_n "checking for ZIP... " >&6; }
20585           if test ! -x "$tool_specified"; then
20586             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20587 $as_echo "not found" >&6; }
20588             as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20589           fi
20590           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20591 $as_echo "$tool_specified" >&6; }
20592         fi
20593       fi
20594     fi
20595 
20596   fi
20597 
20598 
20599 
20600   if test "x$ZIP" = x; then
20601     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20602   fi
20603 
20604 
20605 
20606   # Non-required basic tools
20607 
20608 
20609 
20610   # Publish this variable in the help.
20611 
20612 
20613   if [ -z "${LDD+x}" ]; then
20614     # The variable is not set by user, try to locate tool using the code snippet
20615     for ac_prog in ldd
20616 do
20617   # Extract the first word of "$ac_prog", so it can be a program name with args.
20618 set dummy $ac_prog; ac_word=$2
20619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20620 $as_echo_n "checking for $ac_word... " >&6; }
20621 if ${ac_cv_path_LDD+:} false; then :
20622   $as_echo_n "(cached) " >&6
20623 else
20624   case $LDD in
20625   [\\/]* | ?:[\\/]*)
20626   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20627   ;;
20628   *)
20629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20630 for as_dir in $PATH
20631 do
20632   IFS=$as_save_IFS
20633   test -z "$as_dir" && as_dir=.
20634     for ac_exec_ext in '' $ac_executable_extensions; do
20635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20636     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20638     break 2
20639   fi
20640 done
20641   done
20642 IFS=$as_save_IFS
20643 
20644   ;;
20645 esac
20646 fi
20647 LDD=$ac_cv_path_LDD
20648 if test -n "$LDD"; then
20649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20650 $as_echo "$LDD" >&6; }
20651 else
20652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20653 $as_echo "no" >&6; }
20654 fi
20655 
20656 
20657   test -n "$LDD" && break
20658 done
20659 
20660   else
20661     # The variable is set, but is it from the command line or the environment?
20662 
20663     # Try to remove the string !LDD! from our list.
20664     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20665     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20666       # If it failed, the variable was not from the command line. Ignore it,
20667       # but warn the user (except for BASH, which is always set by the calling BASH).
20668       if test "xLDD" != xBASH; then
20669         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20670 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20671       fi
20672       # Try to locate tool using the code snippet
20673       for ac_prog in ldd
20674 do
20675   # Extract the first word of "$ac_prog", so it can be a program name with args.
20676 set dummy $ac_prog; ac_word=$2
20677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20678 $as_echo_n "checking for $ac_word... " >&6; }
20679 if ${ac_cv_path_LDD+:} false; then :
20680   $as_echo_n "(cached) " >&6
20681 else
20682   case $LDD in
20683   [\\/]* | ?:[\\/]*)
20684   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20685   ;;
20686   *)
20687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20688 for as_dir in $PATH
20689 do
20690   IFS=$as_save_IFS
20691   test -z "$as_dir" && as_dir=.
20692     for ac_exec_ext in '' $ac_executable_extensions; do
20693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20694     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20696     break 2
20697   fi
20698 done
20699   done
20700 IFS=$as_save_IFS
20701 
20702   ;;
20703 esac
20704 fi
20705 LDD=$ac_cv_path_LDD
20706 if test -n "$LDD"; then
20707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20708 $as_echo "$LDD" >&6; }
20709 else
20710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20711 $as_echo "no" >&6; }
20712 fi
20713 
20714 
20715   test -n "$LDD" && break
20716 done
20717 
20718     else
20719       # If it succeeded, then it was overridden by the user. We will use it
20720       # for the tool.
20721 
20722       # First remove it from the list of overridden variables, so we can test
20723       # for unknown variables in the end.
20724       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20725 
20726       # Check if we try to supply an empty value
20727       if test "x$LDD" = x; then
20728         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20729 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20730         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20731 $as_echo_n "checking for LDD... " >&6; }
20732         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20733 $as_echo "disabled" >&6; }
20734       else
20735         # Check if the provided tool contains a complete path.
20736         tool_specified="$LDD"
20737         tool_basename="${tool_specified##*/}"
20738         if test "x$tool_basename" = "x$tool_specified"; then
20739           # A command without a complete path is provided, search $PATH.
20740           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20741 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20742           # Extract the first word of "$tool_basename", so it can be a program name with args.
20743 set dummy $tool_basename; ac_word=$2
20744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20745 $as_echo_n "checking for $ac_word... " >&6; }
20746 if ${ac_cv_path_LDD+:} false; then :
20747   $as_echo_n "(cached) " >&6
20748 else
20749   case $LDD in
20750   [\\/]* | ?:[\\/]*)
20751   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20752   ;;
20753   *)
20754   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20755 for as_dir in $PATH
20756 do
20757   IFS=$as_save_IFS
20758   test -z "$as_dir" && as_dir=.
20759     for ac_exec_ext in '' $ac_executable_extensions; do
20760   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20761     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20762     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20763     break 2
20764   fi
20765 done
20766   done
20767 IFS=$as_save_IFS
20768 
20769   ;;
20770 esac
20771 fi
20772 LDD=$ac_cv_path_LDD
20773 if test -n "$LDD"; then
20774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20775 $as_echo "$LDD" >&6; }
20776 else
20777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20778 $as_echo "no" >&6; }
20779 fi
20780 
20781 
20782           if test "x$LDD" = x; then
20783             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20784           fi
20785         else
20786           # Otherwise we believe it is a complete path. Use it as it is.
20787           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20788 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20789           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20790 $as_echo_n "checking for LDD... " >&6; }
20791           if test ! -x "$tool_specified"; then
20792             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20793 $as_echo "not found" >&6; }
20794             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20795           fi
20796           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20797 $as_echo "$tool_specified" >&6; }
20798         fi
20799       fi
20800     fi
20801 
20802   fi
20803 
20804 
20805   if test "x$LDD" = "x"; then
20806     # List shared lib dependencies is used for
20807     # debug output and checking for forbidden dependencies.
20808     # We can build without it.
20809     LDD="true"
20810   fi
20811 
20812 
20813   # Publish this variable in the help.
20814 
20815 
20816   if [ -z "${OTOOL+x}" ]; then
20817     # The variable is not set by user, try to locate tool using the code snippet
20818     for ac_prog in otool
20819 do
20820   # Extract the first word of "$ac_prog", so it can be a program name with args.
20821 set dummy $ac_prog; ac_word=$2
20822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20823 $as_echo_n "checking for $ac_word... " >&6; }
20824 if ${ac_cv_path_OTOOL+:} false; then :
20825   $as_echo_n "(cached) " >&6
20826 else
20827   case $OTOOL in
20828   [\\/]* | ?:[\\/]*)
20829   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20830   ;;
20831   *)
20832   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20833 for as_dir in $PATH
20834 do
20835   IFS=$as_save_IFS
20836   test -z "$as_dir" && as_dir=.
20837     for ac_exec_ext in '' $ac_executable_extensions; do
20838   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20839     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20840     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20841     break 2
20842   fi
20843 done
20844   done
20845 IFS=$as_save_IFS
20846 
20847   ;;
20848 esac
20849 fi
20850 OTOOL=$ac_cv_path_OTOOL
20851 if test -n "$OTOOL"; then
20852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20853 $as_echo "$OTOOL" >&6; }
20854 else
20855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20856 $as_echo "no" >&6; }
20857 fi
20858 
20859 
20860   test -n "$OTOOL" && break
20861 done
20862 
20863   else
20864     # The variable is set, but is it from the command line or the environment?
20865 
20866     # Try to remove the string !OTOOL! from our list.
20867     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20868     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20869       # If it failed, the variable was not from the command line. Ignore it,
20870       # but warn the user (except for BASH, which is always set by the calling BASH).
20871       if test "xOTOOL" != xBASH; then
20872         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20873 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
20874       fi
20875       # Try to locate tool using the code snippet
20876       for ac_prog in otool
20877 do
20878   # Extract the first word of "$ac_prog", so it can be a program name with args.
20879 set dummy $ac_prog; ac_word=$2
20880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20881 $as_echo_n "checking for $ac_word... " >&6; }
20882 if ${ac_cv_path_OTOOL+:} false; then :
20883   $as_echo_n "(cached) " >&6
20884 else
20885   case $OTOOL in
20886   [\\/]* | ?:[\\/]*)
20887   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20888   ;;
20889   *)
20890   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20891 for as_dir in $PATH
20892 do
20893   IFS=$as_save_IFS
20894   test -z "$as_dir" && as_dir=.
20895     for ac_exec_ext in '' $ac_executable_extensions; do
20896   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20897     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20898     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20899     break 2
20900   fi
20901 done
20902   done
20903 IFS=$as_save_IFS
20904 
20905   ;;
20906 esac
20907 fi
20908 OTOOL=$ac_cv_path_OTOOL
20909 if test -n "$OTOOL"; then
20910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20911 $as_echo "$OTOOL" >&6; }
20912 else
20913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20914 $as_echo "no" >&6; }
20915 fi
20916 
20917 
20918   test -n "$OTOOL" && break
20919 done
20920 
20921     else
20922       # If it succeeded, then it was overridden by the user. We will use it
20923       # for the tool.
20924 
20925       # First remove it from the list of overridden variables, so we can test
20926       # for unknown variables in the end.
20927       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20928 
20929       # Check if we try to supply an empty value
20930       if test "x$OTOOL" = x; then
20931         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
20932 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
20933         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20934 $as_echo_n "checking for OTOOL... " >&6; }
20935         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20936 $as_echo "disabled" >&6; }
20937       else
20938         # Check if the provided tool contains a complete path.
20939         tool_specified="$OTOOL"
20940         tool_basename="${tool_specified##*/}"
20941         if test "x$tool_basename" = "x$tool_specified"; then
20942           # A command without a complete path is provided, search $PATH.
20943           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
20944 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
20945           # Extract the first word of "$tool_basename", so it can be a program name with args.
20946 set dummy $tool_basename; ac_word=$2
20947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20948 $as_echo_n "checking for $ac_word... " >&6; }
20949 if ${ac_cv_path_OTOOL+:} false; then :
20950   $as_echo_n "(cached) " >&6
20951 else
20952   case $OTOOL in
20953   [\\/]* | ?:[\\/]*)
20954   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20955   ;;
20956   *)
20957   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20958 for as_dir in $PATH
20959 do
20960   IFS=$as_save_IFS
20961   test -z "$as_dir" && as_dir=.
20962     for ac_exec_ext in '' $ac_executable_extensions; do
20963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20964     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20966     break 2
20967   fi
20968 done
20969   done
20970 IFS=$as_save_IFS
20971 
20972   ;;
20973 esac
20974 fi
20975 OTOOL=$ac_cv_path_OTOOL
20976 if test -n "$OTOOL"; then
20977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20978 $as_echo "$OTOOL" >&6; }
20979 else
20980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20981 $as_echo "no" >&6; }
20982 fi
20983 
20984 
20985           if test "x$OTOOL" = x; then
20986             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20987           fi
20988         else
20989           # Otherwise we believe it is a complete path. Use it as it is.
20990           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
20991 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
20992           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20993 $as_echo_n "checking for OTOOL... " >&6; }
20994           if test ! -x "$tool_specified"; then
20995             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20996 $as_echo "not found" >&6; }
20997             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
20998           fi
20999           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21000 $as_echo "$tool_specified" >&6; }
21001         fi
21002       fi
21003     fi
21004 
21005   fi
21006 
21007 
21008   if test "x$OTOOL" = "x"; then
21009     OTOOL="true"
21010   fi
21011 
21012 
21013   # Publish this variable in the help.
21014 
21015 
21016   if [ -z "${READELF+x}" ]; then
21017     # The variable is not set by user, try to locate tool using the code snippet
21018     for ac_prog in greadelf readelf
21019 do
21020   # Extract the first word of "$ac_prog", so it can be a program name with args.
21021 set dummy $ac_prog; ac_word=$2
21022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21023 $as_echo_n "checking for $ac_word... " >&6; }
21024 if ${ac_cv_path_READELF+:} false; then :
21025   $as_echo_n "(cached) " >&6
21026 else
21027   case $READELF in
21028   [\\/]* | ?:[\\/]*)
21029   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21030   ;;
21031   *)
21032   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21033 for as_dir in $PATH
21034 do
21035   IFS=$as_save_IFS
21036   test -z "$as_dir" && as_dir=.
21037     for ac_exec_ext in '' $ac_executable_extensions; do
21038   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21039     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21041     break 2
21042   fi
21043 done
21044   done
21045 IFS=$as_save_IFS
21046 
21047   ;;
21048 esac
21049 fi
21050 READELF=$ac_cv_path_READELF
21051 if test -n "$READELF"; then
21052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21053 $as_echo "$READELF" >&6; }
21054 else
21055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21056 $as_echo "no" >&6; }
21057 fi
21058 
21059 
21060   test -n "$READELF" && break
21061 done
21062 
21063   else
21064     # The variable is set, but is it from the command line or the environment?
21065 
21066     # Try to remove the string !READELF! from our list.
21067     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21068     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21069       # If it failed, the variable was not from the command line. Ignore it,
21070       # but warn the user (except for BASH, which is always set by the calling BASH).
21071       if test "xREADELF" != xBASH; then
21072         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21073 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21074       fi
21075       # Try to locate tool using the code snippet
21076       for ac_prog in greadelf readelf
21077 do
21078   # Extract the first word of "$ac_prog", so it can be a program name with args.
21079 set dummy $ac_prog; ac_word=$2
21080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21081 $as_echo_n "checking for $ac_word... " >&6; }
21082 if ${ac_cv_path_READELF+:} false; then :
21083   $as_echo_n "(cached) " >&6
21084 else
21085   case $READELF in
21086   [\\/]* | ?:[\\/]*)
21087   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21088   ;;
21089   *)
21090   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21091 for as_dir in $PATH
21092 do
21093   IFS=$as_save_IFS
21094   test -z "$as_dir" && as_dir=.
21095     for ac_exec_ext in '' $ac_executable_extensions; do
21096   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21097     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21098     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21099     break 2
21100   fi
21101 done
21102   done
21103 IFS=$as_save_IFS
21104 
21105   ;;
21106 esac
21107 fi
21108 READELF=$ac_cv_path_READELF
21109 if test -n "$READELF"; then
21110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21111 $as_echo "$READELF" >&6; }
21112 else
21113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21114 $as_echo "no" >&6; }
21115 fi
21116 
21117 
21118   test -n "$READELF" && break
21119 done
21120 
21121     else
21122       # If it succeeded, then it was overridden by the user. We will use it
21123       # for the tool.
21124 
21125       # First remove it from the list of overridden variables, so we can test
21126       # for unknown variables in the end.
21127       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21128 
21129       # Check if we try to supply an empty value
21130       if test "x$READELF" = x; then
21131         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21132 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21133         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21134 $as_echo_n "checking for READELF... " >&6; }
21135         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21136 $as_echo "disabled" >&6; }
21137       else
21138         # Check if the provided tool contains a complete path.
21139         tool_specified="$READELF"
21140         tool_basename="${tool_specified##*/}"
21141         if test "x$tool_basename" = "x$tool_specified"; then
21142           # A command without a complete path is provided, search $PATH.
21143           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21144 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21145           # Extract the first word of "$tool_basename", so it can be a program name with args.
21146 set dummy $tool_basename; ac_word=$2
21147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21148 $as_echo_n "checking for $ac_word... " >&6; }
21149 if ${ac_cv_path_READELF+:} false; then :
21150   $as_echo_n "(cached) " >&6
21151 else
21152   case $READELF in
21153   [\\/]* | ?:[\\/]*)
21154   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21155   ;;
21156   *)
21157   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21158 for as_dir in $PATH
21159 do
21160   IFS=$as_save_IFS
21161   test -z "$as_dir" && as_dir=.
21162     for ac_exec_ext in '' $ac_executable_extensions; do
21163   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21164     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21165     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21166     break 2
21167   fi
21168 done
21169   done
21170 IFS=$as_save_IFS
21171 
21172   ;;
21173 esac
21174 fi
21175 READELF=$ac_cv_path_READELF
21176 if test -n "$READELF"; then
21177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21178 $as_echo "$READELF" >&6; }
21179 else
21180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21181 $as_echo "no" >&6; }
21182 fi
21183 
21184 
21185           if test "x$READELF" = x; then
21186             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21187           fi
21188         else
21189           # Otherwise we believe it is a complete path. Use it as it is.
21190           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21191 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21192           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21193 $as_echo_n "checking for READELF... " >&6; }
21194           if test ! -x "$tool_specified"; then
21195             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21196 $as_echo "not found" >&6; }
21197             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21198           fi
21199           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21200 $as_echo "$tool_specified" >&6; }
21201         fi
21202       fi
21203     fi
21204 
21205   fi
21206 
21207 
21208 
21209 
21210   # Publish this variable in the help.
21211 
21212 
21213   if [ -z "${HG+x}" ]; then
21214     # The variable is not set by user, try to locate tool using the code snippet
21215     for ac_prog in hg
21216 do
21217   # Extract the first word of "$ac_prog", so it can be a program name with args.
21218 set dummy $ac_prog; ac_word=$2
21219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21220 $as_echo_n "checking for $ac_word... " >&6; }
21221 if ${ac_cv_path_HG+:} false; then :
21222   $as_echo_n "(cached) " >&6
21223 else
21224   case $HG in
21225   [\\/]* | ?:[\\/]*)
21226   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21227   ;;
21228   *)
21229   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21230 for as_dir in $PATH
21231 do
21232   IFS=$as_save_IFS
21233   test -z "$as_dir" && as_dir=.
21234     for ac_exec_ext in '' $ac_executable_extensions; do
21235   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21236     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21237     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21238     break 2
21239   fi
21240 done
21241   done
21242 IFS=$as_save_IFS
21243 
21244   ;;
21245 esac
21246 fi
21247 HG=$ac_cv_path_HG
21248 if test -n "$HG"; then
21249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21250 $as_echo "$HG" >&6; }
21251 else
21252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21253 $as_echo "no" >&6; }
21254 fi
21255 
21256 
21257   test -n "$HG" && break
21258 done
21259 
21260   else
21261     # The variable is set, but is it from the command line or the environment?
21262 
21263     # Try to remove the string !HG! from our list.
21264     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21265     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21266       # If it failed, the variable was not from the command line. Ignore it,
21267       # but warn the user (except for BASH, which is always set by the calling BASH).
21268       if test "xHG" != xBASH; then
21269         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21270 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21271       fi
21272       # Try to locate tool using the code snippet
21273       for ac_prog in hg
21274 do
21275   # Extract the first word of "$ac_prog", so it can be a program name with args.
21276 set dummy $ac_prog; ac_word=$2
21277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21278 $as_echo_n "checking for $ac_word... " >&6; }
21279 if ${ac_cv_path_HG+:} false; then :
21280   $as_echo_n "(cached) " >&6
21281 else
21282   case $HG in
21283   [\\/]* | ?:[\\/]*)
21284   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21285   ;;
21286   *)
21287   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21288 for as_dir in $PATH
21289 do
21290   IFS=$as_save_IFS
21291   test -z "$as_dir" && as_dir=.
21292     for ac_exec_ext in '' $ac_executable_extensions; do
21293   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21294     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21296     break 2
21297   fi
21298 done
21299   done
21300 IFS=$as_save_IFS
21301 
21302   ;;
21303 esac
21304 fi
21305 HG=$ac_cv_path_HG
21306 if test -n "$HG"; then
21307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21308 $as_echo "$HG" >&6; }
21309 else
21310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21311 $as_echo "no" >&6; }
21312 fi
21313 
21314 
21315   test -n "$HG" && break
21316 done
21317 
21318     else
21319       # If it succeeded, then it was overridden by the user. We will use it
21320       # for the tool.
21321 
21322       # First remove it from the list of overridden variables, so we can test
21323       # for unknown variables in the end.
21324       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21325 
21326       # Check if we try to supply an empty value
21327       if test "x$HG" = x; then
21328         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21329 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21330         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21331 $as_echo_n "checking for HG... " >&6; }
21332         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21333 $as_echo "disabled" >&6; }
21334       else
21335         # Check if the provided tool contains a complete path.
21336         tool_specified="$HG"
21337         tool_basename="${tool_specified##*/}"
21338         if test "x$tool_basename" = "x$tool_specified"; then
21339           # A command without a complete path is provided, search $PATH.
21340           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21341 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21342           # Extract the first word of "$tool_basename", so it can be a program name with args.
21343 set dummy $tool_basename; ac_word=$2
21344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21345 $as_echo_n "checking for $ac_word... " >&6; }
21346 if ${ac_cv_path_HG+:} false; then :
21347   $as_echo_n "(cached) " >&6
21348 else
21349   case $HG in
21350   [\\/]* | ?:[\\/]*)
21351   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21352   ;;
21353   *)
21354   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21355 for as_dir in $PATH
21356 do
21357   IFS=$as_save_IFS
21358   test -z "$as_dir" && as_dir=.
21359     for ac_exec_ext in '' $ac_executable_extensions; do
21360   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21361     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21363     break 2
21364   fi
21365 done
21366   done
21367 IFS=$as_save_IFS
21368 
21369   ;;
21370 esac
21371 fi
21372 HG=$ac_cv_path_HG
21373 if test -n "$HG"; then
21374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21375 $as_echo "$HG" >&6; }
21376 else
21377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21378 $as_echo "no" >&6; }
21379 fi
21380 
21381 
21382           if test "x$HG" = x; then
21383             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21384           fi
21385         else
21386           # Otherwise we believe it is a complete path. Use it as it is.
21387           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21388 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21389           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21390 $as_echo_n "checking for HG... " >&6; }
21391           if test ! -x "$tool_specified"; then
21392             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21393 $as_echo "not found" >&6; }
21394             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21395           fi
21396           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21397 $as_echo "$tool_specified" >&6; }
21398         fi
21399       fi
21400     fi
21401 
21402   fi
21403 
21404 
21405 
21406 
21407   # Publish this variable in the help.
21408 
21409 
21410   if [ -z "${STAT+x}" ]; then
21411     # The variable is not set by user, try to locate tool using the code snippet
21412     for ac_prog in stat
21413 do
21414   # Extract the first word of "$ac_prog", so it can be a program name with args.
21415 set dummy $ac_prog; ac_word=$2
21416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21417 $as_echo_n "checking for $ac_word... " >&6; }
21418 if ${ac_cv_path_STAT+:} false; then :
21419   $as_echo_n "(cached) " >&6
21420 else
21421   case $STAT in
21422   [\\/]* | ?:[\\/]*)
21423   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21424   ;;
21425   *)
21426   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21427 for as_dir in $PATH
21428 do
21429   IFS=$as_save_IFS
21430   test -z "$as_dir" && as_dir=.
21431     for ac_exec_ext in '' $ac_executable_extensions; do
21432   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21433     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21434     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21435     break 2
21436   fi
21437 done
21438   done
21439 IFS=$as_save_IFS
21440 
21441   ;;
21442 esac
21443 fi
21444 STAT=$ac_cv_path_STAT
21445 if test -n "$STAT"; then
21446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21447 $as_echo "$STAT" >&6; }
21448 else
21449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21450 $as_echo "no" >&6; }
21451 fi
21452 
21453 
21454   test -n "$STAT" && break
21455 done
21456 
21457   else
21458     # The variable is set, but is it from the command line or the environment?
21459 
21460     # Try to remove the string !STAT! from our list.
21461     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21462     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21463       # If it failed, the variable was not from the command line. Ignore it,
21464       # but warn the user (except for BASH, which is always set by the calling BASH).
21465       if test "xSTAT" != xBASH; then
21466         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21467 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21468       fi
21469       # Try to locate tool using the code snippet
21470       for ac_prog in stat
21471 do
21472   # Extract the first word of "$ac_prog", so it can be a program name with args.
21473 set dummy $ac_prog; ac_word=$2
21474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21475 $as_echo_n "checking for $ac_word... " >&6; }
21476 if ${ac_cv_path_STAT+:} false; then :
21477   $as_echo_n "(cached) " >&6
21478 else
21479   case $STAT in
21480   [\\/]* | ?:[\\/]*)
21481   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21482   ;;
21483   *)
21484   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21485 for as_dir in $PATH
21486 do
21487   IFS=$as_save_IFS
21488   test -z "$as_dir" && as_dir=.
21489     for ac_exec_ext in '' $ac_executable_extensions; do
21490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21491     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21493     break 2
21494   fi
21495 done
21496   done
21497 IFS=$as_save_IFS
21498 
21499   ;;
21500 esac
21501 fi
21502 STAT=$ac_cv_path_STAT
21503 if test -n "$STAT"; then
21504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21505 $as_echo "$STAT" >&6; }
21506 else
21507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21508 $as_echo "no" >&6; }
21509 fi
21510 
21511 
21512   test -n "$STAT" && break
21513 done
21514 
21515     else
21516       # If it succeeded, then it was overridden by the user. We will use it
21517       # for the tool.
21518 
21519       # First remove it from the list of overridden variables, so we can test
21520       # for unknown variables in the end.
21521       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21522 
21523       # Check if we try to supply an empty value
21524       if test "x$STAT" = x; then
21525         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21526 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21527         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21528 $as_echo_n "checking for STAT... " >&6; }
21529         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21530 $as_echo "disabled" >&6; }
21531       else
21532         # Check if the provided tool contains a complete path.
21533         tool_specified="$STAT"
21534         tool_basename="${tool_specified##*/}"
21535         if test "x$tool_basename" = "x$tool_specified"; then
21536           # A command without a complete path is provided, search $PATH.
21537           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21538 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21539           # Extract the first word of "$tool_basename", so it can be a program name with args.
21540 set dummy $tool_basename; ac_word=$2
21541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21542 $as_echo_n "checking for $ac_word... " >&6; }
21543 if ${ac_cv_path_STAT+:} false; then :
21544   $as_echo_n "(cached) " >&6
21545 else
21546   case $STAT in
21547   [\\/]* | ?:[\\/]*)
21548   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21549   ;;
21550   *)
21551   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21552 for as_dir in $PATH
21553 do
21554   IFS=$as_save_IFS
21555   test -z "$as_dir" && as_dir=.
21556     for ac_exec_ext in '' $ac_executable_extensions; do
21557   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21558     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21559     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21560     break 2
21561   fi
21562 done
21563   done
21564 IFS=$as_save_IFS
21565 
21566   ;;
21567 esac
21568 fi
21569 STAT=$ac_cv_path_STAT
21570 if test -n "$STAT"; then
21571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21572 $as_echo "$STAT" >&6; }
21573 else
21574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21575 $as_echo "no" >&6; }
21576 fi
21577 
21578 
21579           if test "x$STAT" = x; then
21580             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21581           fi
21582         else
21583           # Otherwise we believe it is a complete path. Use it as it is.
21584           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21585 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21586           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21587 $as_echo_n "checking for STAT... " >&6; }
21588           if test ! -x "$tool_specified"; then
21589             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21590 $as_echo "not found" >&6; }
21591             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21592           fi
21593           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21594 $as_echo "$tool_specified" >&6; }
21595         fi
21596       fi
21597     fi
21598 
21599   fi
21600 
21601 
21602 
21603 
21604   # Publish this variable in the help.
21605 
21606 
21607   if [ -z "${TIME+x}" ]; then
21608     # The variable is not set by user, try to locate tool using the code snippet
21609     for ac_prog in time
21610 do
21611   # Extract the first word of "$ac_prog", so it can be a program name with args.
21612 set dummy $ac_prog; ac_word=$2
21613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21614 $as_echo_n "checking for $ac_word... " >&6; }
21615 if ${ac_cv_path_TIME+:} false; then :
21616   $as_echo_n "(cached) " >&6
21617 else
21618   case $TIME in
21619   [\\/]* | ?:[\\/]*)
21620   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21621   ;;
21622   *)
21623   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21624 for as_dir in $PATH
21625 do
21626   IFS=$as_save_IFS
21627   test -z "$as_dir" && as_dir=.
21628     for ac_exec_ext in '' $ac_executable_extensions; do
21629   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21630     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21631     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21632     break 2
21633   fi
21634 done
21635   done
21636 IFS=$as_save_IFS
21637 
21638   ;;
21639 esac
21640 fi
21641 TIME=$ac_cv_path_TIME
21642 if test -n "$TIME"; then
21643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21644 $as_echo "$TIME" >&6; }
21645 else
21646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21647 $as_echo "no" >&6; }
21648 fi
21649 
21650 
21651   test -n "$TIME" && break
21652 done
21653 
21654   else
21655     # The variable is set, but is it from the command line or the environment?
21656 
21657     # Try to remove the string !TIME! from our list.
21658     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21659     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21660       # If it failed, the variable was not from the command line. Ignore it,
21661       # but warn the user (except for BASH, which is always set by the calling BASH).
21662       if test "xTIME" != xBASH; then
21663         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21664 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21665       fi
21666       # Try to locate tool using the code snippet
21667       for ac_prog in time
21668 do
21669   # Extract the first word of "$ac_prog", so it can be a program name with args.
21670 set dummy $ac_prog; ac_word=$2
21671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21672 $as_echo_n "checking for $ac_word... " >&6; }
21673 if ${ac_cv_path_TIME+:} false; then :
21674   $as_echo_n "(cached) " >&6
21675 else
21676   case $TIME in
21677   [\\/]* | ?:[\\/]*)
21678   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21679   ;;
21680   *)
21681   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21682 for as_dir in $PATH
21683 do
21684   IFS=$as_save_IFS
21685   test -z "$as_dir" && as_dir=.
21686     for ac_exec_ext in '' $ac_executable_extensions; do
21687   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21688     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21689     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21690     break 2
21691   fi
21692 done
21693   done
21694 IFS=$as_save_IFS
21695 
21696   ;;
21697 esac
21698 fi
21699 TIME=$ac_cv_path_TIME
21700 if test -n "$TIME"; then
21701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21702 $as_echo "$TIME" >&6; }
21703 else
21704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21705 $as_echo "no" >&6; }
21706 fi
21707 
21708 
21709   test -n "$TIME" && break
21710 done
21711 
21712     else
21713       # If it succeeded, then it was overridden by the user. We will use it
21714       # for the tool.
21715 
21716       # First remove it from the list of overridden variables, so we can test
21717       # for unknown variables in the end.
21718       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21719 
21720       # Check if we try to supply an empty value
21721       if test "x$TIME" = x; then
21722         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21723 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21724         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21725 $as_echo_n "checking for TIME... " >&6; }
21726         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21727 $as_echo "disabled" >&6; }
21728       else
21729         # Check if the provided tool contains a complete path.
21730         tool_specified="$TIME"
21731         tool_basename="${tool_specified##*/}"
21732         if test "x$tool_basename" = "x$tool_specified"; then
21733           # A command without a complete path is provided, search $PATH.
21734           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21735 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21736           # Extract the first word of "$tool_basename", so it can be a program name with args.
21737 set dummy $tool_basename; ac_word=$2
21738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21739 $as_echo_n "checking for $ac_word... " >&6; }
21740 if ${ac_cv_path_TIME+:} false; then :
21741   $as_echo_n "(cached) " >&6
21742 else
21743   case $TIME in
21744   [\\/]* | ?:[\\/]*)
21745   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21746   ;;
21747   *)
21748   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21749 for as_dir in $PATH
21750 do
21751   IFS=$as_save_IFS
21752   test -z "$as_dir" && as_dir=.
21753     for ac_exec_ext in '' $ac_executable_extensions; do
21754   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21755     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21757     break 2
21758   fi
21759 done
21760   done
21761 IFS=$as_save_IFS
21762 
21763   ;;
21764 esac
21765 fi
21766 TIME=$ac_cv_path_TIME
21767 if test -n "$TIME"; then
21768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21769 $as_echo "$TIME" >&6; }
21770 else
21771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21772 $as_echo "no" >&6; }
21773 fi
21774 
21775 
21776           if test "x$TIME" = x; then
21777             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21778           fi
21779         else
21780           # Otherwise we believe it is a complete path. Use it as it is.
21781           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21782 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21783           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21784 $as_echo_n "checking for TIME... " >&6; }
21785           if test ! -x "$tool_specified"; then
21786             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21787 $as_echo "not found" >&6; }
21788             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21789           fi
21790           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21791 $as_echo "$tool_specified" >&6; }
21792         fi
21793       fi
21794     fi
21795 
21796   fi
21797 
21798 
21799 
21800 
21801   # Publish this variable in the help.
21802 
21803 
21804   if [ -z "${PATCH+x}" ]; then
21805     # The variable is not set by user, try to locate tool using the code snippet
21806     for ac_prog in gpatch patch
21807 do
21808   # Extract the first word of "$ac_prog", so it can be a program name with args.
21809 set dummy $ac_prog; ac_word=$2
21810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21811 $as_echo_n "checking for $ac_word... " >&6; }
21812 if ${ac_cv_path_PATCH+:} false; then :
21813   $as_echo_n "(cached) " >&6
21814 else
21815   case $PATCH in
21816   [\\/]* | ?:[\\/]*)
21817   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21818   ;;
21819   *)
21820   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21821 for as_dir in $PATH
21822 do
21823   IFS=$as_save_IFS
21824   test -z "$as_dir" && as_dir=.
21825     for ac_exec_ext in '' $ac_executable_extensions; do
21826   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21827     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21828     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21829     break 2
21830   fi
21831 done
21832   done
21833 IFS=$as_save_IFS
21834 
21835   ;;
21836 esac
21837 fi
21838 PATCH=$ac_cv_path_PATCH
21839 if test -n "$PATCH"; then
21840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21841 $as_echo "$PATCH" >&6; }
21842 else
21843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21844 $as_echo "no" >&6; }
21845 fi
21846 
21847 
21848   test -n "$PATCH" && break
21849 done
21850 
21851   else
21852     # The variable is set, but is it from the command line or the environment?
21853 
21854     # Try to remove the string !PATCH! from our list.
21855     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21856     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21857       # If it failed, the variable was not from the command line. Ignore it,
21858       # but warn the user (except for BASH, which is always set by the calling BASH).
21859       if test "xPATCH" != xBASH; then
21860         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21861 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21862       fi
21863       # Try to locate tool using the code snippet
21864       for ac_prog in gpatch patch
21865 do
21866   # Extract the first word of "$ac_prog", so it can be a program name with args.
21867 set dummy $ac_prog; ac_word=$2
21868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21869 $as_echo_n "checking for $ac_word... " >&6; }
21870 if ${ac_cv_path_PATCH+:} false; then :
21871   $as_echo_n "(cached) " >&6
21872 else
21873   case $PATCH in
21874   [\\/]* | ?:[\\/]*)
21875   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21876   ;;
21877   *)
21878   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21879 for as_dir in $PATH
21880 do
21881   IFS=$as_save_IFS
21882   test -z "$as_dir" && as_dir=.
21883     for ac_exec_ext in '' $ac_executable_extensions; do
21884   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21885     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21886     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21887     break 2
21888   fi
21889 done
21890   done
21891 IFS=$as_save_IFS
21892 
21893   ;;
21894 esac
21895 fi
21896 PATCH=$ac_cv_path_PATCH
21897 if test -n "$PATCH"; then
21898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21899 $as_echo "$PATCH" >&6; }
21900 else
21901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21902 $as_echo "no" >&6; }
21903 fi
21904 
21905 
21906   test -n "$PATCH" && break
21907 done
21908 
21909     else
21910       # If it succeeded, then it was overridden by the user. We will use it
21911       # for the tool.
21912 
21913       # First remove it from the list of overridden variables, so we can test
21914       # for unknown variables in the end.
21915       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21916 
21917       # Check if we try to supply an empty value
21918       if test "x$PATCH" = x; then
21919         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
21920 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
21921         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21922 $as_echo_n "checking for PATCH... " >&6; }
21923         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21924 $as_echo "disabled" >&6; }
21925       else
21926         # Check if the provided tool contains a complete path.
21927         tool_specified="$PATCH"
21928         tool_basename="${tool_specified##*/}"
21929         if test "x$tool_basename" = "x$tool_specified"; then
21930           # A command without a complete path is provided, search $PATH.
21931           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
21932 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
21933           # Extract the first word of "$tool_basename", so it can be a program name with args.
21934 set dummy $tool_basename; ac_word=$2
21935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21936 $as_echo_n "checking for $ac_word... " >&6; }
21937 if ${ac_cv_path_PATCH+:} false; then :
21938   $as_echo_n "(cached) " >&6
21939 else
21940   case $PATCH in
21941   [\\/]* | ?:[\\/]*)
21942   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21943   ;;
21944   *)
21945   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21946 for as_dir in $PATH
21947 do
21948   IFS=$as_save_IFS
21949   test -z "$as_dir" && as_dir=.
21950     for ac_exec_ext in '' $ac_executable_extensions; do
21951   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21952     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21953     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21954     break 2
21955   fi
21956 done
21957   done
21958 IFS=$as_save_IFS
21959 
21960   ;;
21961 esac
21962 fi
21963 PATCH=$ac_cv_path_PATCH
21964 if test -n "$PATCH"; then
21965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21966 $as_echo "$PATCH" >&6; }
21967 else
21968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21969 $as_echo "no" >&6; }
21970 fi
21971 
21972 
21973           if test "x$PATCH" = x; then
21974             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21975           fi
21976         else
21977           # Otherwise we believe it is a complete path. Use it as it is.
21978           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
21979 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
21980           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21981 $as_echo_n "checking for PATCH... " >&6; }
21982           if test ! -x "$tool_specified"; then
21983             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21984 $as_echo "not found" >&6; }
21985             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
21986           fi
21987           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21988 $as_echo "$tool_specified" >&6; }
21989         fi
21990       fi
21991     fi
21992 
21993   fi
21994 
21995 
21996   # Check if it's GNU time
21997   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
21998   if test "x$IS_GNU_TIME" != x; then
21999     IS_GNU_TIME=yes
22000   else
22001     IS_GNU_TIME=no
22002   fi
22003 
22004 
22005   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22006 
22007 
22008 
22009   # Publish this variable in the help.
22010 
22011 
22012   if [ -z "${DSYMUTIL+x}" ]; then
22013     # The variable is not set by user, try to locate tool using the code snippet
22014     for ac_prog in dsymutil
22015 do
22016   # Extract the first word of "$ac_prog", so it can be a program name with args.
22017 set dummy $ac_prog; ac_word=$2
22018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22019 $as_echo_n "checking for $ac_word... " >&6; }
22020 if ${ac_cv_path_DSYMUTIL+:} false; then :
22021   $as_echo_n "(cached) " >&6
22022 else
22023   case $DSYMUTIL in
22024   [\\/]* | ?:[\\/]*)
22025   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22026   ;;
22027   *)
22028   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22029 for as_dir in $PATH
22030 do
22031   IFS=$as_save_IFS
22032   test -z "$as_dir" && as_dir=.
22033     for ac_exec_ext in '' $ac_executable_extensions; do
22034   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22035     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22036     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22037     break 2
22038   fi
22039 done
22040   done
22041 IFS=$as_save_IFS
22042 
22043   ;;
22044 esac
22045 fi
22046 DSYMUTIL=$ac_cv_path_DSYMUTIL
22047 if test -n "$DSYMUTIL"; then
22048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22049 $as_echo "$DSYMUTIL" >&6; }
22050 else
22051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22052 $as_echo "no" >&6; }
22053 fi
22054 
22055 
22056   test -n "$DSYMUTIL" && break
22057 done
22058 
22059   else
22060     # The variable is set, but is it from the command line or the environment?
22061 
22062     # Try to remove the string !DSYMUTIL! from our list.
22063     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22064     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22065       # If it failed, the variable was not from the command line. Ignore it,
22066       # but warn the user (except for BASH, which is always set by the calling BASH).
22067       if test "xDSYMUTIL" != xBASH; then
22068         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22069 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22070       fi
22071       # Try to locate tool using the code snippet
22072       for ac_prog in dsymutil
22073 do
22074   # Extract the first word of "$ac_prog", so it can be a program name with args.
22075 set dummy $ac_prog; ac_word=$2
22076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22077 $as_echo_n "checking for $ac_word... " >&6; }
22078 if ${ac_cv_path_DSYMUTIL+:} false; then :
22079   $as_echo_n "(cached) " >&6
22080 else
22081   case $DSYMUTIL in
22082   [\\/]* | ?:[\\/]*)
22083   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22084   ;;
22085   *)
22086   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22087 for as_dir in $PATH
22088 do
22089   IFS=$as_save_IFS
22090   test -z "$as_dir" && as_dir=.
22091     for ac_exec_ext in '' $ac_executable_extensions; do
22092   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22093     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22094     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22095     break 2
22096   fi
22097 done
22098   done
22099 IFS=$as_save_IFS
22100 
22101   ;;
22102 esac
22103 fi
22104 DSYMUTIL=$ac_cv_path_DSYMUTIL
22105 if test -n "$DSYMUTIL"; then
22106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22107 $as_echo "$DSYMUTIL" >&6; }
22108 else
22109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22110 $as_echo "no" >&6; }
22111 fi
22112 
22113 
22114   test -n "$DSYMUTIL" && break
22115 done
22116 
22117     else
22118       # If it succeeded, then it was overridden by the user. We will use it
22119       # for the tool.
22120 
22121       # First remove it from the list of overridden variables, so we can test
22122       # for unknown variables in the end.
22123       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22124 
22125       # Check if we try to supply an empty value
22126       if test "x$DSYMUTIL" = x; then
22127         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22128 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22129         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22130 $as_echo_n "checking for DSYMUTIL... " >&6; }
22131         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22132 $as_echo "disabled" >&6; }
22133       else
22134         # Check if the provided tool contains a complete path.
22135         tool_specified="$DSYMUTIL"
22136         tool_basename="${tool_specified##*/}"
22137         if test "x$tool_basename" = "x$tool_specified"; then
22138           # A command without a complete path is provided, search $PATH.
22139           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22140 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22141           # Extract the first word of "$tool_basename", so it can be a program name with args.
22142 set dummy $tool_basename; ac_word=$2
22143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22144 $as_echo_n "checking for $ac_word... " >&6; }
22145 if ${ac_cv_path_DSYMUTIL+:} false; then :
22146   $as_echo_n "(cached) " >&6
22147 else
22148   case $DSYMUTIL in
22149   [\\/]* | ?:[\\/]*)
22150   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22151   ;;
22152   *)
22153   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22154 for as_dir in $PATH
22155 do
22156   IFS=$as_save_IFS
22157   test -z "$as_dir" && as_dir=.
22158     for ac_exec_ext in '' $ac_executable_extensions; do
22159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22160     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22162     break 2
22163   fi
22164 done
22165   done
22166 IFS=$as_save_IFS
22167 
22168   ;;
22169 esac
22170 fi
22171 DSYMUTIL=$ac_cv_path_DSYMUTIL
22172 if test -n "$DSYMUTIL"; then
22173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22174 $as_echo "$DSYMUTIL" >&6; }
22175 else
22176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22177 $as_echo "no" >&6; }
22178 fi
22179 
22180 
22181           if test "x$DSYMUTIL" = x; then
22182             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22183           fi
22184         else
22185           # Otherwise we believe it is a complete path. Use it as it is.
22186           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22187 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22188           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22189 $as_echo_n "checking for DSYMUTIL... " >&6; }
22190           if test ! -x "$tool_specified"; then
22191             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22192 $as_echo "not found" >&6; }
22193             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22194           fi
22195           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22196 $as_echo "$tool_specified" >&6; }
22197         fi
22198       fi
22199     fi
22200 
22201   fi
22202 
22203 
22204 
22205   if test "x$DSYMUTIL" = x; then
22206     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22207   fi
22208 
22209 
22210 
22211 
22212 
22213   # Publish this variable in the help.
22214 
22215 
22216   if [ -z "${XATTR+x}" ]; then
22217     # The variable is not set by user, try to locate tool using the code snippet
22218     for ac_prog in xattr
22219 do
22220   # Extract the first word of "$ac_prog", so it can be a program name with args.
22221 set dummy $ac_prog; ac_word=$2
22222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22223 $as_echo_n "checking for $ac_word... " >&6; }
22224 if ${ac_cv_path_XATTR+:} false; then :
22225   $as_echo_n "(cached) " >&6
22226 else
22227   case $XATTR in
22228   [\\/]* | ?:[\\/]*)
22229   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22230   ;;
22231   *)
22232   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22233 for as_dir in $PATH
22234 do
22235   IFS=$as_save_IFS
22236   test -z "$as_dir" && as_dir=.
22237     for ac_exec_ext in '' $ac_executable_extensions; do
22238   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22239     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22240     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22241     break 2
22242   fi
22243 done
22244   done
22245 IFS=$as_save_IFS
22246 
22247   ;;
22248 esac
22249 fi
22250 XATTR=$ac_cv_path_XATTR
22251 if test -n "$XATTR"; then
22252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22253 $as_echo "$XATTR" >&6; }
22254 else
22255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22256 $as_echo "no" >&6; }
22257 fi
22258 
22259 
22260   test -n "$XATTR" && break
22261 done
22262 
22263   else
22264     # The variable is set, but is it from the command line or the environment?
22265 
22266     # Try to remove the string !XATTR! from our list.
22267     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22268     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22269       # If it failed, the variable was not from the command line. Ignore it,
22270       # but warn the user (except for BASH, which is always set by the calling BASH).
22271       if test "xXATTR" != xBASH; then
22272         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22273 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22274       fi
22275       # Try to locate tool using the code snippet
22276       for ac_prog in xattr
22277 do
22278   # Extract the first word of "$ac_prog", so it can be a program name with args.
22279 set dummy $ac_prog; ac_word=$2
22280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22281 $as_echo_n "checking for $ac_word... " >&6; }
22282 if ${ac_cv_path_XATTR+:} false; then :
22283   $as_echo_n "(cached) " >&6
22284 else
22285   case $XATTR in
22286   [\\/]* | ?:[\\/]*)
22287   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22288   ;;
22289   *)
22290   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22291 for as_dir in $PATH
22292 do
22293   IFS=$as_save_IFS
22294   test -z "$as_dir" && as_dir=.
22295     for ac_exec_ext in '' $ac_executable_extensions; do
22296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22297     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22299     break 2
22300   fi
22301 done
22302   done
22303 IFS=$as_save_IFS
22304 
22305   ;;
22306 esac
22307 fi
22308 XATTR=$ac_cv_path_XATTR
22309 if test -n "$XATTR"; then
22310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22311 $as_echo "$XATTR" >&6; }
22312 else
22313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22314 $as_echo "no" >&6; }
22315 fi
22316 
22317 
22318   test -n "$XATTR" && break
22319 done
22320 
22321     else
22322       # If it succeeded, then it was overridden by the user. We will use it
22323       # for the tool.
22324 
22325       # First remove it from the list of overridden variables, so we can test
22326       # for unknown variables in the end.
22327       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22328 
22329       # Check if we try to supply an empty value
22330       if test "x$XATTR" = x; then
22331         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22332 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22333         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22334 $as_echo_n "checking for XATTR... " >&6; }
22335         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22336 $as_echo "disabled" >&6; }
22337       else
22338         # Check if the provided tool contains a complete path.
22339         tool_specified="$XATTR"
22340         tool_basename="${tool_specified##*/}"
22341         if test "x$tool_basename" = "x$tool_specified"; then
22342           # A command without a complete path is provided, search $PATH.
22343           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22344 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22345           # Extract the first word of "$tool_basename", so it can be a program name with args.
22346 set dummy $tool_basename; ac_word=$2
22347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22348 $as_echo_n "checking for $ac_word... " >&6; }
22349 if ${ac_cv_path_XATTR+:} false; then :
22350   $as_echo_n "(cached) " >&6
22351 else
22352   case $XATTR in
22353   [\\/]* | ?:[\\/]*)
22354   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22355   ;;
22356   *)
22357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22358 for as_dir in $PATH
22359 do
22360   IFS=$as_save_IFS
22361   test -z "$as_dir" && as_dir=.
22362     for ac_exec_ext in '' $ac_executable_extensions; do
22363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22364     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22366     break 2
22367   fi
22368 done
22369   done
22370 IFS=$as_save_IFS
22371 
22372   ;;
22373 esac
22374 fi
22375 XATTR=$ac_cv_path_XATTR
22376 if test -n "$XATTR"; then
22377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22378 $as_echo "$XATTR" >&6; }
22379 else
22380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22381 $as_echo "no" >&6; }
22382 fi
22383 
22384 
22385           if test "x$XATTR" = x; then
22386             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22387           fi
22388         else
22389           # Otherwise we believe it is a complete path. Use it as it is.
22390           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22391 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22392           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22393 $as_echo_n "checking for XATTR... " >&6; }
22394           if test ! -x "$tool_specified"; then
22395             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22396 $as_echo "not found" >&6; }
22397             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22398           fi
22399           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22400 $as_echo "$tool_specified" >&6; }
22401         fi
22402       fi
22403     fi
22404 
22405   fi
22406 
22407 
22408 
22409   if test "x$XATTR" = x; then
22410     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22411   fi
22412 
22413 
22414 
22415 
22416   # Publish this variable in the help.
22417 
22418 
22419   if [ -z "${CODESIGN+x}" ]; then
22420     # The variable is not set by user, try to locate tool using the code snippet
22421     for ac_prog in codesign
22422 do
22423   # Extract the first word of "$ac_prog", so it can be a program name with args.
22424 set dummy $ac_prog; ac_word=$2
22425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22426 $as_echo_n "checking for $ac_word... " >&6; }
22427 if ${ac_cv_path_CODESIGN+:} false; then :
22428   $as_echo_n "(cached) " >&6
22429 else
22430   case $CODESIGN in
22431   [\\/]* | ?:[\\/]*)
22432   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22433   ;;
22434   *)
22435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22436 for as_dir in $PATH
22437 do
22438   IFS=$as_save_IFS
22439   test -z "$as_dir" && as_dir=.
22440     for ac_exec_ext in '' $ac_executable_extensions; do
22441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22442     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22444     break 2
22445   fi
22446 done
22447   done
22448 IFS=$as_save_IFS
22449 
22450   ;;
22451 esac
22452 fi
22453 CODESIGN=$ac_cv_path_CODESIGN
22454 if test -n "$CODESIGN"; then
22455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22456 $as_echo "$CODESIGN" >&6; }
22457 else
22458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22459 $as_echo "no" >&6; }
22460 fi
22461 
22462 
22463   test -n "$CODESIGN" && break
22464 done
22465 
22466   else
22467     # The variable is set, but is it from the command line or the environment?
22468 
22469     # Try to remove the string !CODESIGN! from our list.
22470     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22471     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22472       # If it failed, the variable was not from the command line. Ignore it,
22473       # but warn the user (except for BASH, which is always set by the calling BASH).
22474       if test "xCODESIGN" != xBASH; then
22475         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22476 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22477       fi
22478       # Try to locate tool using the code snippet
22479       for ac_prog in codesign
22480 do
22481   # Extract the first word of "$ac_prog", so it can be a program name with args.
22482 set dummy $ac_prog; ac_word=$2
22483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22484 $as_echo_n "checking for $ac_word... " >&6; }
22485 if ${ac_cv_path_CODESIGN+:} false; then :
22486   $as_echo_n "(cached) " >&6
22487 else
22488   case $CODESIGN in
22489   [\\/]* | ?:[\\/]*)
22490   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22491   ;;
22492   *)
22493   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22494 for as_dir in $PATH
22495 do
22496   IFS=$as_save_IFS
22497   test -z "$as_dir" && as_dir=.
22498     for ac_exec_ext in '' $ac_executable_extensions; do
22499   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22500     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22501     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22502     break 2
22503   fi
22504 done
22505   done
22506 IFS=$as_save_IFS
22507 
22508   ;;
22509 esac
22510 fi
22511 CODESIGN=$ac_cv_path_CODESIGN
22512 if test -n "$CODESIGN"; then
22513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22514 $as_echo "$CODESIGN" >&6; }
22515 else
22516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22517 $as_echo "no" >&6; }
22518 fi
22519 
22520 
22521   test -n "$CODESIGN" && break
22522 done
22523 
22524     else
22525       # If it succeeded, then it was overridden by the user. We will use it
22526       # for the tool.
22527 
22528       # First remove it from the list of overridden variables, so we can test
22529       # for unknown variables in the end.
22530       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22531 
22532       # Check if we try to supply an empty value
22533       if test "x$CODESIGN" = x; then
22534         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22535 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22536         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22537 $as_echo_n "checking for CODESIGN... " >&6; }
22538         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22539 $as_echo "disabled" >&6; }
22540       else
22541         # Check if the provided tool contains a complete path.
22542         tool_specified="$CODESIGN"
22543         tool_basename="${tool_specified##*/}"
22544         if test "x$tool_basename" = "x$tool_specified"; then
22545           # A command without a complete path is provided, search $PATH.
22546           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22547 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22548           # Extract the first word of "$tool_basename", so it can be a program name with args.
22549 set dummy $tool_basename; ac_word=$2
22550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22551 $as_echo_n "checking for $ac_word... " >&6; }
22552 if ${ac_cv_path_CODESIGN+:} false; then :
22553   $as_echo_n "(cached) " >&6
22554 else
22555   case $CODESIGN in
22556   [\\/]* | ?:[\\/]*)
22557   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22558   ;;
22559   *)
22560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22561 for as_dir in $PATH
22562 do
22563   IFS=$as_save_IFS
22564   test -z "$as_dir" && as_dir=.
22565     for ac_exec_ext in '' $ac_executable_extensions; do
22566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22567     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22569     break 2
22570   fi
22571 done
22572   done
22573 IFS=$as_save_IFS
22574 
22575   ;;
22576 esac
22577 fi
22578 CODESIGN=$ac_cv_path_CODESIGN
22579 if test -n "$CODESIGN"; then
22580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22581 $as_echo "$CODESIGN" >&6; }
22582 else
22583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22584 $as_echo "no" >&6; }
22585 fi
22586 
22587 
22588           if test "x$CODESIGN" = x; then
22589             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22590           fi
22591         else
22592           # Otherwise we believe it is a complete path. Use it as it is.
22593           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22594 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22595           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22596 $as_echo_n "checking for CODESIGN... " >&6; }
22597           if test ! -x "$tool_specified"; then
22598             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22599 $as_echo "not found" >&6; }
22600             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22601           fi
22602           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22603 $as_echo "$tool_specified" >&6; }
22604         fi
22605       fi
22606     fi
22607 
22608   fi
22609 
22610 
22611     if test "x$CODESIGN" != "x"; then
22612       # Verify that the openjdk_codesign certificate is present
22613       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22614 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22615       rm -f codesign-testfile
22616       touch codesign-testfile
22617       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22618       rm -f codesign-testfile
22619       if test "x$CODESIGN" = x; then
22620         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22621 $as_echo "no" >&6; }
22622       else
22623         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22624 $as_echo "yes" >&6; }
22625       fi
22626     fi
22627 
22628 
22629 
22630   # Publish this variable in the help.
22631 
22632 
22633   if [ -z "${SETFILE+x}" ]; then
22634     # The variable is not set by user, try to locate tool using the code snippet
22635     for ac_prog in SetFile
22636 do
22637   # Extract the first word of "$ac_prog", so it can be a program name with args.
22638 set dummy $ac_prog; ac_word=$2
22639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22640 $as_echo_n "checking for $ac_word... " >&6; }
22641 if ${ac_cv_path_SETFILE+:} false; then :
22642   $as_echo_n "(cached) " >&6
22643 else
22644   case $SETFILE in
22645   [\\/]* | ?:[\\/]*)
22646   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22647   ;;
22648   *)
22649   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22650 for as_dir in $PATH
22651 do
22652   IFS=$as_save_IFS
22653   test -z "$as_dir" && as_dir=.
22654     for ac_exec_ext in '' $ac_executable_extensions; do
22655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22656     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22658     break 2
22659   fi
22660 done
22661   done
22662 IFS=$as_save_IFS
22663 
22664   ;;
22665 esac
22666 fi
22667 SETFILE=$ac_cv_path_SETFILE
22668 if test -n "$SETFILE"; then
22669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22670 $as_echo "$SETFILE" >&6; }
22671 else
22672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22673 $as_echo "no" >&6; }
22674 fi
22675 
22676 
22677   test -n "$SETFILE" && break
22678 done
22679 
22680   else
22681     # The variable is set, but is it from the command line or the environment?
22682 
22683     # Try to remove the string !SETFILE! from our list.
22684     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22685     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22686       # If it failed, the variable was not from the command line. Ignore it,
22687       # but warn the user (except for BASH, which is always set by the calling BASH).
22688       if test "xSETFILE" != xBASH; then
22689         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22690 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22691       fi
22692       # Try to locate tool using the code snippet
22693       for ac_prog in SetFile
22694 do
22695   # Extract the first word of "$ac_prog", so it can be a program name with args.
22696 set dummy $ac_prog; ac_word=$2
22697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22698 $as_echo_n "checking for $ac_word... " >&6; }
22699 if ${ac_cv_path_SETFILE+:} false; then :
22700   $as_echo_n "(cached) " >&6
22701 else
22702   case $SETFILE in
22703   [\\/]* | ?:[\\/]*)
22704   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22705   ;;
22706   *)
22707   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22708 for as_dir in $PATH
22709 do
22710   IFS=$as_save_IFS
22711   test -z "$as_dir" && as_dir=.
22712     for ac_exec_ext in '' $ac_executable_extensions; do
22713   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22714     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22716     break 2
22717   fi
22718 done
22719   done
22720 IFS=$as_save_IFS
22721 
22722   ;;
22723 esac
22724 fi
22725 SETFILE=$ac_cv_path_SETFILE
22726 if test -n "$SETFILE"; then
22727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22728 $as_echo "$SETFILE" >&6; }
22729 else
22730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22731 $as_echo "no" >&6; }
22732 fi
22733 
22734 
22735   test -n "$SETFILE" && break
22736 done
22737 
22738     else
22739       # If it succeeded, then it was overridden by the user. We will use it
22740       # for the tool.
22741 
22742       # First remove it from the list of overridden variables, so we can test
22743       # for unknown variables in the end.
22744       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22745 
22746       # Check if we try to supply an empty value
22747       if test "x$SETFILE" = x; then
22748         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22749 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22750         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22751 $as_echo_n "checking for SETFILE... " >&6; }
22752         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22753 $as_echo "disabled" >&6; }
22754       else
22755         # Check if the provided tool contains a complete path.
22756         tool_specified="$SETFILE"
22757         tool_basename="${tool_specified##*/}"
22758         if test "x$tool_basename" = "x$tool_specified"; then
22759           # A command without a complete path is provided, search $PATH.
22760           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22761 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22762           # Extract the first word of "$tool_basename", so it can be a program name with args.
22763 set dummy $tool_basename; ac_word=$2
22764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22765 $as_echo_n "checking for $ac_word... " >&6; }
22766 if ${ac_cv_path_SETFILE+:} false; then :
22767   $as_echo_n "(cached) " >&6
22768 else
22769   case $SETFILE in
22770   [\\/]* | ?:[\\/]*)
22771   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22772   ;;
22773   *)
22774   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22775 for as_dir in $PATH
22776 do
22777   IFS=$as_save_IFS
22778   test -z "$as_dir" && as_dir=.
22779     for ac_exec_ext in '' $ac_executable_extensions; do
22780   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22781     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22782     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22783     break 2
22784   fi
22785 done
22786   done
22787 IFS=$as_save_IFS
22788 
22789   ;;
22790 esac
22791 fi
22792 SETFILE=$ac_cv_path_SETFILE
22793 if test -n "$SETFILE"; then
22794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22795 $as_echo "$SETFILE" >&6; }
22796 else
22797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22798 $as_echo "no" >&6; }
22799 fi
22800 
22801 
22802           if test "x$SETFILE" = x; then
22803             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22804           fi
22805         else
22806           # Otherwise we believe it is a complete path. Use it as it is.
22807           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22808 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22809           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22810 $as_echo_n "checking for SETFILE... " >&6; }
22811           if test ! -x "$tool_specified"; then
22812             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22813 $as_echo "not found" >&6; }
22814             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22815           fi
22816           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22817 $as_echo "$tool_specified" >&6; }
22818         fi
22819       fi
22820     fi
22821 
22822   fi
22823 
22824 
22825 
22826   if test "x$SETFILE" = x; then
22827     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22828   fi
22829 
22830 
22831   fi
22832 
22833 
22834   # Test if bash supports pipefail.
22835   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22836 $as_echo_n "checking if bash supports pipefail... " >&6; }
22837   if ${BASH} -c 'set -o pipefail'; then
22838     BASH_ARGS="$BASH_ARGS -o pipefail"
22839     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22840 $as_echo "yes" >&6; }
22841   else
22842     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22843 $as_echo "no" >&6; }
22844   fi
22845 
22846   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22847 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22848   if ${BASH} -e -c 'true'; then
22849     BASH_ARGS="$BASH_ARGS -e"
22850     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22851 $as_echo "yes" >&6; }
22852   else
22853     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22854 $as_echo "no" >&6; }
22855   fi
22856 
22857 
22858 
22859 
22860 # Check if pkg-config is available.
22861 
22862 
22863 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22864         if test -n "$ac_tool_prefix"; then
22865   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22866 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22868 $as_echo_n "checking for $ac_word... " >&6; }
22869 if ${ac_cv_path_PKG_CONFIG+:} false; then :
22870   $as_echo_n "(cached) " >&6
22871 else
22872   case $PKG_CONFIG in
22873   [\\/]* | ?:[\\/]*)
22874   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22875   ;;
22876   *)
22877   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22878 for as_dir in $PATH
22879 do
22880   IFS=$as_save_IFS
22881   test -z "$as_dir" && as_dir=.
22882     for ac_exec_ext in '' $ac_executable_extensions; do
22883   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22884     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22885     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22886     break 2
22887   fi
22888 done
22889   done
22890 IFS=$as_save_IFS
22891 
22892   ;;
22893 esac
22894 fi
22895 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22896 if test -n "$PKG_CONFIG"; then
22897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22898 $as_echo "$PKG_CONFIG" >&6; }
22899 else
22900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22901 $as_echo "no" >&6; }
22902 fi
22903 
22904 
22905 fi
22906 if test -z "$ac_cv_path_PKG_CONFIG"; then
22907   ac_pt_PKG_CONFIG=$PKG_CONFIG
22908   # Extract the first word of "pkg-config", so it can be a program name with args.
22909 set dummy pkg-config; ac_word=$2
22910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22911 $as_echo_n "checking for $ac_word... " >&6; }
22912 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
22913   $as_echo_n "(cached) " >&6
22914 else
22915   case $ac_pt_PKG_CONFIG in
22916   [\\/]* | ?:[\\/]*)
22917   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
22918   ;;
22919   *)
22920   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22921 for as_dir in $PATH
22922 do
22923   IFS=$as_save_IFS
22924   test -z "$as_dir" && as_dir=.
22925     for ac_exec_ext in '' $ac_executable_extensions; do
22926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22927     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22929     break 2
22930   fi
22931 done
22932   done
22933 IFS=$as_save_IFS
22934 
22935   ;;
22936 esac
22937 fi
22938 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
22939 if test -n "$ac_pt_PKG_CONFIG"; then
22940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
22941 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
22942 else
22943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22944 $as_echo "no" >&6; }
22945 fi
22946 
22947   if test "x$ac_pt_PKG_CONFIG" = x; then
22948     PKG_CONFIG=""
22949   else
22950     case $cross_compiling:$ac_tool_warned in
22951 yes:)
22952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22953 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22954 ac_tool_warned=yes ;;
22955 esac
22956     PKG_CONFIG=$ac_pt_PKG_CONFIG
22957   fi
22958 else
22959   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
22960 fi
22961 
22962 fi
22963 if test -n "$PKG_CONFIG"; then
22964         _pkg_min_version=0.9.0
22965         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
22966 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
22967         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
22968                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22969 $as_echo "yes" >&6; }
22970         else
22971                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22972 $as_echo "no" >&6; }
22973                 PKG_CONFIG=""
22974         fi
22975 
22976 fi
22977 
22978 # After basic tools have been setup, we can check build os specific details.
22979 
22980   ###############################################################################
22981 
22982   # Note that this is the build platform OS version!
22983 
22984   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
22985   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
22986   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
22987   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
22988 
22989 
22990 
22991 
22992 
22993 ###############################################################################
22994 #
22995 # Determine OpenJDK variants, options and version numbers.
22996 #
22997 ###############################################################################
22998 
22999 # We need build & target for this.
23000 
23001 
23002   ###############################################################################
23003   #
23004   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23005   # We always build headless support.
23006   #
23007   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23008 $as_echo_n "checking headful support... " >&6; }
23009   # Check whether --enable-headful was given.
23010 if test "${enable_headful+set}" = set; then :
23011   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23012 else
23013   SUPPORT_HEADFUL=yes
23014 fi
23015 
23016 
23017   SUPPORT_HEADLESS=yes
23018   BUILD_HEADLESS="BUILD_HEADLESS:=true"
23019 
23020   if test "x$SUPPORT_HEADFUL" = xyes; then
23021     # We are building both headful and headless.
23022     headful_msg="include support for both headful and headless"
23023   fi
23024 
23025   if test "x$SUPPORT_HEADFUL" = xno; then
23026     # Thus we are building headless only.
23027     BUILD_HEADLESS="BUILD_HEADLESS:=true"
23028     headful_msg="headless only"
23029   fi
23030 
23031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23032 $as_echo "$headful_msg" >&6; }
23033 
23034 
23035 
23036 
23037 
23038   # Control wether Hotspot runs Queens test after build.
23039   # Check whether --enable-hotspot-test-in-build was given.
23040 if test "${enable_hotspot_test_in_build+set}" = set; then :
23041   enableval=$enable_hotspot_test_in_build;
23042 else
23043   enable_hotspot_test_in_build=no
23044 fi
23045 
23046   if test "x$enable_hotspot_test_in_build" = "xyes"; then
23047     TEST_IN_BUILD=true
23048   else
23049     TEST_IN_BUILD=false
23050   fi
23051 
23052 
23053   ###############################################################################
23054   #
23055   # Choose cacerts source file
23056   #
23057 
23058 # Check whether --with-cacerts-file was given.
23059 if test "${with_cacerts_file+set}" = set; then :
23060   withval=$with_cacerts_file;
23061 fi
23062 
23063   if test "x$with_cacerts_file" != x; then
23064     CACERTS_FILE=$with_cacerts_file
23065   fi
23066 
23067 
23068   ###############################################################################
23069   #
23070   # Enable or disable unlimited crypto
23071   #
23072   # Check whether --enable-unlimited-crypto was given.
23073 if test "${enable_unlimited_crypto+set}" = set; then :
23074   enableval=$enable_unlimited_crypto;
23075 else
23076   enable_unlimited_crypto=no
23077 fi
23078 
23079   if test "x$enable_unlimited_crypto" = "xyes"; then
23080     UNLIMITED_CRYPTO=true
23081   else
23082     UNLIMITED_CRYPTO=false
23083   fi
23084 
23085 
23086   ###############################################################################
23087   #
23088   # Enable or disable the elliptic curve crypto implementation
23089   #
23090 
23091 
23092   ###############################################################################
23093   #
23094   # Compress jars
23095   #
23096   COMPRESS_JARS=false
23097 
23098 
23099 
23100 
23101   # Source the version numbers
23102   . $AUTOCONF_DIR/version-numbers
23103 
23104   # Get the settings from parameters
23105 
23106 # Check whether --with-milestone was given.
23107 if test "${with_milestone+set}" = set; then :
23108   withval=$with_milestone;
23109 fi
23110 
23111   if test "x$with_milestone" = xyes; then
23112     as_fn_error $? "Milestone must have a value" "$LINENO" 5
23113   elif test "x$with_milestone" != x; then
23114     MILESTONE="$with_milestone"
23115   fi
23116   if test "x$MILESTONE" = x; then
23117     MILESTONE=internal
23118   fi
23119 
23120 
23121 # Check whether --with-update-version was given.
23122 if test "${with_update_version+set}" = set; then :
23123   withval=$with_update_version;
23124 fi
23125 
23126   if test "x$with_update_version" = xyes; then
23127     as_fn_error $? "Update version must have a value" "$LINENO" 5
23128   elif test "x$with_update_version" != x; then
23129     JDK_UPDATE_VERSION="$with_update_version"
23130     # On macosx 10.7, it's not possible to set --with-update-version=0X due
23131     # to a bug in expr (which reduces it to just X). To work around this, we
23132     # always add a 0 to one digit update versions.
23133     if test "${#JDK_UPDATE_VERSION}" = "1"; then
23134       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
23135     fi
23136   fi
23137 
23138 
23139 # Check whether --with-user-release-suffix was given.
23140 if test "${with_user_release_suffix+set}" = set; then :
23141   withval=$with_user_release_suffix;
23142 fi
23143 
23144   if test "x$with_user_release_suffix" = xyes; then
23145     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
23146   elif test "x$with_user_release_suffix" != x; then
23147     USER_RELEASE_SUFFIX="$with_user_release_suffix"
23148   fi
23149 
23150 
23151 # Check whether --with-build-number was given.
23152 if test "${with_build_number+set}" = set; then :
23153   withval=$with_build_number;
23154 fi
23155 
23156   if test "x$with_build_number" = xyes; then
23157     as_fn_error $? "Build number must have a value" "$LINENO" 5
23158   elif test "x$with_build_number" != x; then
23159     JDK_BUILD_NUMBER="$with_build_number"
23160   fi
23161   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
23162   if test "x$JDK_BUILD_NUMBER" = x; then
23163     JDK_BUILD_NUMBER=b00
23164     if test "x$USER_RELEASE_SUFFIX" = x; then
23165       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
23166       # Avoid [:alnum:] since it depends on the locale.
23167       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
23168       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23169     fi
23170   fi
23171 
23172   # Now set the JDK version, milestone, build number etc.
23173 
23174 
23175 
23176 
23177 
23178 
23179 
23180 
23181 
23182 
23183 
23184 
23185 
23186 
23187 
23188 
23189 # Check whether --with-copyright-year was given.
23190 if test "${with_copyright_year+set}" = set; then :
23191   withval=$with_copyright_year;
23192 fi
23193 
23194   if test "x$with_copyright_year" = xyes; then
23195     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23196   elif test "x$with_copyright_year" != x; then
23197     COPYRIGHT_YEAR="$with_copyright_year"
23198   else
23199     COPYRIGHT_YEAR=`date +'%Y'`
23200   fi
23201 
23202 
23203   if test "x$JDK_UPDATE_VERSION" != x; then
23204     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
23205   else
23206     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
23207   fi
23208 
23209 
23210   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
23211 
23212 
23213 
23214 ###############################################################################
23215 #
23216 # Setup BootJDK, used to bootstrap the build.
23217 #
23218 ###############################################################################
23219 
23220 
23221   BOOT_JDK_FOUND=no
23222 
23223 # Check whether --with-boot-jdk was given.
23224 if test "${with_boot_jdk+set}" = set; then :
23225   withval=$with_boot_jdk;
23226 fi
23227 
23228 
23229   # We look for the Boot JDK through various means, going from more certain to
23230   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23231   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23232   # must check if this is indeed valid; otherwise we'll continue looking.
23233 
23234   # Test: Is bootjdk explicitely set by command line arguments?
23235 
23236   if test "x$BOOT_JDK_FOUND" = xno; then
23237     # Now execute the test
23238 
23239   if test "x$with_boot_jdk" != x; then
23240     BOOT_JDK=$with_boot_jdk
23241     BOOT_JDK_FOUND=maybe
23242     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23243 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23244   fi
23245 
23246 
23247     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23248     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23249       # Do we have a bin/java?
23250       if test ! -x "$BOOT_JDK/bin/java"; then
23251         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23252 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23253         BOOT_JDK_FOUND=no
23254       else
23255         # Do we have a bin/javac?
23256         if test ! -x "$BOOT_JDK/bin/javac"; then
23257           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23258 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23259           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23260 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23261           BOOT_JDK_FOUND=no
23262         else
23263           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23264           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23265 
23266           # Extra M4 quote needed to protect [] in grep expression.
23267           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23268           if test "x$FOUND_CORRECT_VERSION" = x; then
23269             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23270 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23271             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23272 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23273             BOOT_JDK_FOUND=no
23274           else
23275             # We're done! :-)
23276             BOOT_JDK_FOUND=yes
23277 
23278   # Only process if variable expands to non-empty
23279 
23280   if test "x$BOOT_JDK" != x; then
23281     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23282 
23283   # Input might be given as Windows format, start by converting to
23284   # unix format.
23285   path="$BOOT_JDK"
23286   new_path=`$CYGPATH -u "$path"`
23287 
23288   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23289   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23290   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23291   # "foo.exe" is OK but "foo" is an error.
23292   #
23293   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23294   # It is also a way to make sure we got the proper file name for the real test later on.
23295   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23296   if test "x$test_shortpath" = x; then
23297     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23298 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23299     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23300   fi
23301 
23302   # Call helper function which possibly converts this using DOS-style short mode.
23303   # If so, the updated path is stored in $new_path.
23304 
23305   input_path="$new_path"
23306   # Check if we need to convert this using DOS-style short mode. If the path
23307   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23308   # take no chances and rewrite it.
23309   # Note: m4 eats our [], so we need to use [ and ] instead.
23310   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23311   if test "x$has_forbidden_chars" != x; then
23312     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23313     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23314     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23315     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23316       # Going to short mode and back again did indeed matter. Since short mode is
23317       # case insensitive, let's make it lowercase to improve readability.
23318       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23319       # Now convert it back to Unix-style (cygpath)
23320       input_path=`$CYGPATH -u "$shortmode_path"`
23321       new_path="$input_path"
23322     fi
23323   fi
23324 
23325   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23326   if test "x$test_cygdrive_prefix" = x; then
23327     # As a simple fix, exclude /usr/bin since it's not a real path.
23328     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23329       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23330       # a path prefixed by /cygdrive for fixpath to work.
23331       new_path="$CYGWIN_ROOT_PATH$input_path"
23332     fi
23333   fi
23334 
23335 
23336   if test "x$path" != "x$new_path"; then
23337     BOOT_JDK="$new_path"
23338     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23339 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23340   fi
23341 
23342     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23343 
23344   path="$BOOT_JDK"
23345   has_colon=`$ECHO $path | $GREP ^.:`
23346   new_path="$path"
23347   if test "x$has_colon" = x; then
23348     # Not in mixed or Windows style, start by that.
23349     new_path=`cmd //c echo $path`
23350   fi
23351 
23352 
23353   input_path="$new_path"
23354   # Check if we need to convert this using DOS-style short mode. If the path
23355   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23356   # take no chances and rewrite it.
23357   # Note: m4 eats our [], so we need to use [ and ] instead.
23358   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23359   if test "x$has_forbidden_chars" != x; then
23360     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23361     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23362   fi
23363 
23364 
23365   windows_path="$new_path"
23366   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23367     unix_path=`$CYGPATH -u "$windows_path"`
23368     new_path="$unix_path"
23369   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23370     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23371     new_path="$unix_path"
23372   fi
23373 
23374   if test "x$path" != "x$new_path"; then
23375     BOOT_JDK="$new_path"
23376     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23377 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23378   fi
23379 
23380   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23381   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23382 
23383     else
23384       # We're on a unix platform. Hooray! :)
23385       path="$BOOT_JDK"
23386       has_space=`$ECHO "$path" | $GREP " "`
23387       if test "x$has_space" != x; then
23388         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23389 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23390         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23391       fi
23392 
23393       # Use eval to expand a potential ~
23394       eval path="$path"
23395       if test ! -f "$path" && test ! -d "$path"; then
23396         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23397       fi
23398 
23399       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23400     fi
23401   fi
23402 
23403             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23404 $as_echo_n "checking for Boot JDK... " >&6; }
23405             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23406 $as_echo "$BOOT_JDK" >&6; }
23407             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23408 $as_echo_n "checking Boot JDK version... " >&6; }
23409             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23410             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23411 $as_echo "$BOOT_JDK_VERSION" >&6; }
23412           fi # end check jdk version
23413         fi # end check javac
23414       fi # end check java
23415     fi # end check boot jdk found
23416   fi
23417 
23418   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23419     # Having specified an argument which is incorrect will produce an instant failure;
23420     # we should not go on looking
23421     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23422   fi
23423 
23424   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23425 
23426   if test "x$BOOT_JDK_FOUND" = xno; then
23427     # Now execute the test
23428 
23429   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23430     # First check at user selected default
23431 
23432   if test "x$BOOT_JDK_FOUND" = xno; then
23433     # Now execute the test
23434 
23435   if test -x /usr/libexec/java_home; then
23436     BOOT_JDK=`/usr/libexec/java_home `
23437     BOOT_JDK_FOUND=maybe
23438     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23439 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23440   fi
23441 
23442 
23443     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23444     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23445       # Do we have a bin/java?
23446       if test ! -x "$BOOT_JDK/bin/java"; then
23447         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23448 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23449         BOOT_JDK_FOUND=no
23450       else
23451         # Do we have a bin/javac?
23452         if test ! -x "$BOOT_JDK/bin/javac"; then
23453           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23454 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23455           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23456 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23457           BOOT_JDK_FOUND=no
23458         else
23459           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23460           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23461 
23462           # Extra M4 quote needed to protect [] in grep expression.
23463           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23464           if test "x$FOUND_CORRECT_VERSION" = x; then
23465             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23466 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23467             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23468 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23469             BOOT_JDK_FOUND=no
23470           else
23471             # We're done! :-)
23472             BOOT_JDK_FOUND=yes
23473 
23474   # Only process if variable expands to non-empty
23475 
23476   if test "x$BOOT_JDK" != x; then
23477     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23478 
23479   # Input might be given as Windows format, start by converting to
23480   # unix format.
23481   path="$BOOT_JDK"
23482   new_path=`$CYGPATH -u "$path"`
23483 
23484   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23485   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23486   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23487   # "foo.exe" is OK but "foo" is an error.
23488   #
23489   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23490   # It is also a way to make sure we got the proper file name for the real test later on.
23491   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23492   if test "x$test_shortpath" = x; then
23493     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23494 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23495     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23496   fi
23497 
23498   # Call helper function which possibly converts this using DOS-style short mode.
23499   # If so, the updated path is stored in $new_path.
23500 
23501   input_path="$new_path"
23502   # Check if we need to convert this using DOS-style short mode. If the path
23503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23504   # take no chances and rewrite it.
23505   # Note: m4 eats our [], so we need to use [ and ] instead.
23506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23507   if test "x$has_forbidden_chars" != x; then
23508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23509     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23510     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23511     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23512       # Going to short mode and back again did indeed matter. Since short mode is
23513       # case insensitive, let's make it lowercase to improve readability.
23514       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23515       # Now convert it back to Unix-style (cygpath)
23516       input_path=`$CYGPATH -u "$shortmode_path"`
23517       new_path="$input_path"
23518     fi
23519   fi
23520 
23521   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23522   if test "x$test_cygdrive_prefix" = x; then
23523     # As a simple fix, exclude /usr/bin since it's not a real path.
23524     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23525       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23526       # a path prefixed by /cygdrive for fixpath to work.
23527       new_path="$CYGWIN_ROOT_PATH$input_path"
23528     fi
23529   fi
23530 
23531 
23532   if test "x$path" != "x$new_path"; then
23533     BOOT_JDK="$new_path"
23534     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23535 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23536   fi
23537 
23538     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23539 
23540   path="$BOOT_JDK"
23541   has_colon=`$ECHO $path | $GREP ^.:`
23542   new_path="$path"
23543   if test "x$has_colon" = x; then
23544     # Not in mixed or Windows style, start by that.
23545     new_path=`cmd //c echo $path`
23546   fi
23547 
23548 
23549   input_path="$new_path"
23550   # Check if we need to convert this using DOS-style short mode. If the path
23551   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23552   # take no chances and rewrite it.
23553   # Note: m4 eats our [], so we need to use [ and ] instead.
23554   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23555   if test "x$has_forbidden_chars" != x; then
23556     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23557     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23558   fi
23559 
23560 
23561   windows_path="$new_path"
23562   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23563     unix_path=`$CYGPATH -u "$windows_path"`
23564     new_path="$unix_path"
23565   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23566     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23567     new_path="$unix_path"
23568   fi
23569 
23570   if test "x$path" != "x$new_path"; then
23571     BOOT_JDK="$new_path"
23572     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23573 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23574   fi
23575 
23576   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23577   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23578 
23579     else
23580       # We're on a unix platform. Hooray! :)
23581       path="$BOOT_JDK"
23582       has_space=`$ECHO "$path" | $GREP " "`
23583       if test "x$has_space" != x; then
23584         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23585 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23586         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23587       fi
23588 
23589       # Use eval to expand a potential ~
23590       eval path="$path"
23591       if test ! -f "$path" && test ! -d "$path"; then
23592         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23593       fi
23594 
23595       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23596     fi
23597   fi
23598 
23599             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23600 $as_echo_n "checking for Boot JDK... " >&6; }
23601             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23602 $as_echo "$BOOT_JDK" >&6; }
23603             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23604 $as_echo_n "checking Boot JDK version... " >&6; }
23605             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23606             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23607 $as_echo "$BOOT_JDK_VERSION" >&6; }
23608           fi # end check jdk version
23609         fi # end check javac
23610       fi # end check java
23611     fi # end check boot jdk found
23612   fi
23613 
23614     # If that did not work out (e.g. too old), try explicit versions instead
23615 
23616   if test "x$BOOT_JDK_FOUND" = xno; then
23617     # Now execute the test
23618 
23619   if test -x /usr/libexec/java_home; then
23620     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
23621     BOOT_JDK_FOUND=maybe
23622     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
23623 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
23624   fi
23625 
23626 
23627     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23628     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23629       # Do we have a bin/java?
23630       if test ! -x "$BOOT_JDK/bin/java"; then
23631         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23632 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23633         BOOT_JDK_FOUND=no
23634       else
23635         # Do we have a bin/javac?
23636         if test ! -x "$BOOT_JDK/bin/javac"; then
23637           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23638 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23639           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23640 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23641           BOOT_JDK_FOUND=no
23642         else
23643           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23644           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23645 
23646           # Extra M4 quote needed to protect [] in grep expression.
23647           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23648           if test "x$FOUND_CORRECT_VERSION" = x; then
23649             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23650 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23651             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23652 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23653             BOOT_JDK_FOUND=no
23654           else
23655             # We're done! :-)
23656             BOOT_JDK_FOUND=yes
23657 
23658   # Only process if variable expands to non-empty
23659 
23660   if test "x$BOOT_JDK" != x; then
23661     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23662 
23663   # Input might be given as Windows format, start by converting to
23664   # unix format.
23665   path="$BOOT_JDK"
23666   new_path=`$CYGPATH -u "$path"`
23667 
23668   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23669   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23670   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23671   # "foo.exe" is OK but "foo" is an error.
23672   #
23673   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23674   # It is also a way to make sure we got the proper file name for the real test later on.
23675   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23676   if test "x$test_shortpath" = x; then
23677     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23678 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23679     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23680   fi
23681 
23682   # Call helper function which possibly converts this using DOS-style short mode.
23683   # If so, the updated path is stored in $new_path.
23684 
23685   input_path="$new_path"
23686   # Check if we need to convert this using DOS-style short mode. If the path
23687   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23688   # take no chances and rewrite it.
23689   # Note: m4 eats our [], so we need to use [ and ] instead.
23690   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23691   if test "x$has_forbidden_chars" != x; then
23692     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23693     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23694     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23695     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23696       # Going to short mode and back again did indeed matter. Since short mode is
23697       # case insensitive, let's make it lowercase to improve readability.
23698       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23699       # Now convert it back to Unix-style (cygpath)
23700       input_path=`$CYGPATH -u "$shortmode_path"`
23701       new_path="$input_path"
23702     fi
23703   fi
23704 
23705   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23706   if test "x$test_cygdrive_prefix" = x; then
23707     # As a simple fix, exclude /usr/bin since it's not a real path.
23708     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23709       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23710       # a path prefixed by /cygdrive for fixpath to work.
23711       new_path="$CYGWIN_ROOT_PATH$input_path"
23712     fi
23713   fi
23714 
23715 
23716   if test "x$path" != "x$new_path"; then
23717     BOOT_JDK="$new_path"
23718     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23719 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23720   fi
23721 
23722     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23723 
23724   path="$BOOT_JDK"
23725   has_colon=`$ECHO $path | $GREP ^.:`
23726   new_path="$path"
23727   if test "x$has_colon" = x; then
23728     # Not in mixed or Windows style, start by that.
23729     new_path=`cmd //c echo $path`
23730   fi
23731 
23732 
23733   input_path="$new_path"
23734   # Check if we need to convert this using DOS-style short mode. If the path
23735   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23736   # take no chances and rewrite it.
23737   # Note: m4 eats our [], so we need to use [ and ] instead.
23738   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23739   if test "x$has_forbidden_chars" != x; then
23740     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23741     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23742   fi
23743 
23744 
23745   windows_path="$new_path"
23746   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23747     unix_path=`$CYGPATH -u "$windows_path"`
23748     new_path="$unix_path"
23749   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23750     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23751     new_path="$unix_path"
23752   fi
23753 
23754   if test "x$path" != "x$new_path"; then
23755     BOOT_JDK="$new_path"
23756     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23757 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23758   fi
23759 
23760   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23761   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23762 
23763     else
23764       # We're on a unix platform. Hooray! :)
23765       path="$BOOT_JDK"
23766       has_space=`$ECHO "$path" | $GREP " "`
23767       if test "x$has_space" != x; then
23768         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23769 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23770         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23771       fi
23772 
23773       # Use eval to expand a potential ~
23774       eval path="$path"
23775       if test ! -f "$path" && test ! -d "$path"; then
23776         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23777       fi
23778 
23779       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23780     fi
23781   fi
23782 
23783             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23784 $as_echo_n "checking for Boot JDK... " >&6; }
23785             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23786 $as_echo "$BOOT_JDK" >&6; }
23787             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23788 $as_echo_n "checking Boot JDK version... " >&6; }
23789             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23790             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23791 $as_echo "$BOOT_JDK_VERSION" >&6; }
23792           fi # end check jdk version
23793         fi # end check javac
23794       fi # end check java
23795     fi # end check boot jdk found
23796   fi
23797 
23798 
23799   if test "x$BOOT_JDK_FOUND" = xno; then
23800     # Now execute the test
23801 
23802   if test -x /usr/libexec/java_home; then
23803     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
23804     BOOT_JDK_FOUND=maybe
23805     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
23806 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
23807   fi
23808 
23809 
23810     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23811     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23812       # Do we have a bin/java?
23813       if test ! -x "$BOOT_JDK/bin/java"; then
23814         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23815 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23816         BOOT_JDK_FOUND=no
23817       else
23818         # Do we have a bin/javac?
23819         if test ! -x "$BOOT_JDK/bin/javac"; then
23820           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23821 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23822           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23823 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23824           BOOT_JDK_FOUND=no
23825         else
23826           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23827           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23828 
23829           # Extra M4 quote needed to protect [] in grep expression.
23830           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23831           if test "x$FOUND_CORRECT_VERSION" = x; then
23832             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23833 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23834             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23835 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23836             BOOT_JDK_FOUND=no
23837           else
23838             # We're done! :-)
23839             BOOT_JDK_FOUND=yes
23840 
23841   # Only process if variable expands to non-empty
23842 
23843   if test "x$BOOT_JDK" != x; then
23844     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23845 
23846   # Input might be given as Windows format, start by converting to
23847   # unix format.
23848   path="$BOOT_JDK"
23849   new_path=`$CYGPATH -u "$path"`
23850 
23851   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23852   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23853   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23854   # "foo.exe" is OK but "foo" is an error.
23855   #
23856   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23857   # It is also a way to make sure we got the proper file name for the real test later on.
23858   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23859   if test "x$test_shortpath" = x; then
23860     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23861 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23862     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23863   fi
23864 
23865   # Call helper function which possibly converts this using DOS-style short mode.
23866   # If so, the updated path is stored in $new_path.
23867 
23868   input_path="$new_path"
23869   # Check if we need to convert this using DOS-style short mode. If the path
23870   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23871   # take no chances and rewrite it.
23872   # Note: m4 eats our [], so we need to use [ and ] instead.
23873   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23874   if test "x$has_forbidden_chars" != x; then
23875     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23876     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23877     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23878     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23879       # Going to short mode and back again did indeed matter. Since short mode is
23880       # case insensitive, let's make it lowercase to improve readability.
23881       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23882       # Now convert it back to Unix-style (cygpath)
23883       input_path=`$CYGPATH -u "$shortmode_path"`
23884       new_path="$input_path"
23885     fi
23886   fi
23887 
23888   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23889   if test "x$test_cygdrive_prefix" = x; then
23890     # As a simple fix, exclude /usr/bin since it's not a real path.
23891     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23892       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23893       # a path prefixed by /cygdrive for fixpath to work.
23894       new_path="$CYGWIN_ROOT_PATH$input_path"
23895     fi
23896   fi
23897 
23898 
23899   if test "x$path" != "x$new_path"; then
23900     BOOT_JDK="$new_path"
23901     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23902 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23903   fi
23904 
23905     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23906 
23907   path="$BOOT_JDK"
23908   has_colon=`$ECHO $path | $GREP ^.:`
23909   new_path="$path"
23910   if test "x$has_colon" = x; then
23911     # Not in mixed or Windows style, start by that.
23912     new_path=`cmd //c echo $path`
23913   fi
23914 
23915 
23916   input_path="$new_path"
23917   # Check if we need to convert this using DOS-style short mode. If the path
23918   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23919   # take no chances and rewrite it.
23920   # Note: m4 eats our [], so we need to use [ and ] instead.
23921   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23922   if test "x$has_forbidden_chars" != x; then
23923     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23924     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23925   fi
23926 
23927 
23928   windows_path="$new_path"
23929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23930     unix_path=`$CYGPATH -u "$windows_path"`
23931     new_path="$unix_path"
23932   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23933     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23934     new_path="$unix_path"
23935   fi
23936 
23937   if test "x$path" != "x$new_path"; then
23938     BOOT_JDK="$new_path"
23939     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23940 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23941   fi
23942 
23943   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23944   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23945 
23946     else
23947       # We're on a unix platform. Hooray! :)
23948       path="$BOOT_JDK"
23949       has_space=`$ECHO "$path" | $GREP " "`
23950       if test "x$has_space" != x; then
23951         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23952 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23953         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23954       fi
23955 
23956       # Use eval to expand a potential ~
23957       eval path="$path"
23958       if test ! -f "$path" && test ! -d "$path"; then
23959         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23960       fi
23961 
23962       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23963     fi
23964   fi
23965 
23966             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23967 $as_echo_n "checking for Boot JDK... " >&6; }
23968             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23969 $as_echo "$BOOT_JDK" >&6; }
23970             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23971 $as_echo_n "checking Boot JDK version... " >&6; }
23972             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23973             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23974 $as_echo "$BOOT_JDK_VERSION" >&6; }
23975           fi # end check jdk version
23976         fi # end check javac
23977       fi # end check java
23978     fi # end check boot jdk found
23979   fi
23980 
23981 
23982   if test "x$BOOT_JDK_FOUND" = xno; then
23983     # Now execute the test
23984 
23985   if test -x /usr/libexec/java_home; then
23986     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
23987     BOOT_JDK_FOUND=maybe
23988     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
23989 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
23990   fi
23991 
23992 
23993     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23994     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23995       # Do we have a bin/java?
23996       if test ! -x "$BOOT_JDK/bin/java"; then
23997         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23998 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23999         BOOT_JDK_FOUND=no
24000       else
24001         # Do we have a bin/javac?
24002         if test ! -x "$BOOT_JDK/bin/javac"; then
24003           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24004 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24005           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24006 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24007           BOOT_JDK_FOUND=no
24008         else
24009           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24010           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24011 
24012           # Extra M4 quote needed to protect [] in grep expression.
24013           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24014           if test "x$FOUND_CORRECT_VERSION" = x; then
24015             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24016 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24017             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24018 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24019             BOOT_JDK_FOUND=no
24020           else
24021             # We're done! :-)
24022             BOOT_JDK_FOUND=yes
24023 
24024   # Only process if variable expands to non-empty
24025 
24026   if test "x$BOOT_JDK" != x; then
24027     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24028 
24029   # Input might be given as Windows format, start by converting to
24030   # unix format.
24031   path="$BOOT_JDK"
24032   new_path=`$CYGPATH -u "$path"`
24033 
24034   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24035   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24036   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24037   # "foo.exe" is OK but "foo" is an error.
24038   #
24039   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24040   # It is also a way to make sure we got the proper file name for the real test later on.
24041   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24042   if test "x$test_shortpath" = x; then
24043     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24044 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24045     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24046   fi
24047 
24048   # Call helper function which possibly converts this using DOS-style short mode.
24049   # If so, the updated path is stored in $new_path.
24050 
24051   input_path="$new_path"
24052   # Check if we need to convert this using DOS-style short mode. If the path
24053   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24054   # take no chances and rewrite it.
24055   # Note: m4 eats our [], so we need to use [ and ] instead.
24056   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24057   if test "x$has_forbidden_chars" != x; then
24058     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24059     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24060     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24061     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24062       # Going to short mode and back again did indeed matter. Since short mode is
24063       # case insensitive, let's make it lowercase to improve readability.
24064       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24065       # Now convert it back to Unix-style (cygpath)
24066       input_path=`$CYGPATH -u "$shortmode_path"`
24067       new_path="$input_path"
24068     fi
24069   fi
24070 
24071   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24072   if test "x$test_cygdrive_prefix" = x; then
24073     # As a simple fix, exclude /usr/bin since it's not a real path.
24074     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24075       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24076       # a path prefixed by /cygdrive for fixpath to work.
24077       new_path="$CYGWIN_ROOT_PATH$input_path"
24078     fi
24079   fi
24080 
24081 
24082   if test "x$path" != "x$new_path"; then
24083     BOOT_JDK="$new_path"
24084     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24085 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24086   fi
24087 
24088     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24089 
24090   path="$BOOT_JDK"
24091   has_colon=`$ECHO $path | $GREP ^.:`
24092   new_path="$path"
24093   if test "x$has_colon" = x; then
24094     # Not in mixed or Windows style, start by that.
24095     new_path=`cmd //c echo $path`
24096   fi
24097 
24098 
24099   input_path="$new_path"
24100   # Check if we need to convert this using DOS-style short mode. If the path
24101   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24102   # take no chances and rewrite it.
24103   # Note: m4 eats our [], so we need to use [ and ] instead.
24104   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24105   if test "x$has_forbidden_chars" != x; then
24106     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24107     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24108   fi
24109 
24110 
24111   windows_path="$new_path"
24112   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24113     unix_path=`$CYGPATH -u "$windows_path"`
24114     new_path="$unix_path"
24115   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24116     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24117     new_path="$unix_path"
24118   fi
24119 
24120   if test "x$path" != "x$new_path"; then
24121     BOOT_JDK="$new_path"
24122     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24123 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24124   fi
24125 
24126   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24127   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24128 
24129     else
24130       # We're on a unix platform. Hooray! :)
24131       path="$BOOT_JDK"
24132       has_space=`$ECHO "$path" | $GREP " "`
24133       if test "x$has_space" != x; then
24134         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24135 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24136         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24137       fi
24138 
24139       # Use eval to expand a potential ~
24140       eval path="$path"
24141       if test ! -f "$path" && test ! -d "$path"; then
24142         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24143       fi
24144 
24145       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24146     fi
24147   fi
24148 
24149             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24150 $as_echo_n "checking for Boot JDK... " >&6; }
24151             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24152 $as_echo "$BOOT_JDK" >&6; }
24153             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24154 $as_echo_n "checking Boot JDK version... " >&6; }
24155             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24156             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24157 $as_echo "$BOOT_JDK_VERSION" >&6; }
24158           fi # end check jdk version
24159         fi # end check javac
24160       fi # end check java
24161     fi # end check boot jdk found
24162   fi
24163 
24164   fi
24165 
24166 
24167     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24168     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24169       # Do we have a bin/java?
24170       if test ! -x "$BOOT_JDK/bin/java"; then
24171         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24172 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24173         BOOT_JDK_FOUND=no
24174       else
24175         # Do we have a bin/javac?
24176         if test ! -x "$BOOT_JDK/bin/javac"; then
24177           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24178 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24179           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24180 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24181           BOOT_JDK_FOUND=no
24182         else
24183           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24184           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24185 
24186           # Extra M4 quote needed to protect [] in grep expression.
24187           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24188           if test "x$FOUND_CORRECT_VERSION" = x; then
24189             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24190 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24191             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24192 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24193             BOOT_JDK_FOUND=no
24194           else
24195             # We're done! :-)
24196             BOOT_JDK_FOUND=yes
24197 
24198   # Only process if variable expands to non-empty
24199 
24200   if test "x$BOOT_JDK" != x; then
24201     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24202 
24203   # Input might be given as Windows format, start by converting to
24204   # unix format.
24205   path="$BOOT_JDK"
24206   new_path=`$CYGPATH -u "$path"`
24207 
24208   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24209   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24210   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24211   # "foo.exe" is OK but "foo" is an error.
24212   #
24213   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24214   # It is also a way to make sure we got the proper file name for the real test later on.
24215   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24216   if test "x$test_shortpath" = x; then
24217     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24218 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24219     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24220   fi
24221 
24222   # Call helper function which possibly converts this using DOS-style short mode.
24223   # If so, the updated path is stored in $new_path.
24224 
24225   input_path="$new_path"
24226   # Check if we need to convert this using DOS-style short mode. If the path
24227   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24228   # take no chances and rewrite it.
24229   # Note: m4 eats our [], so we need to use [ and ] instead.
24230   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24231   if test "x$has_forbidden_chars" != x; then
24232     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24233     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24234     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24235     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24236       # Going to short mode and back again did indeed matter. Since short mode is
24237       # case insensitive, let's make it lowercase to improve readability.
24238       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24239       # Now convert it back to Unix-style (cygpath)
24240       input_path=`$CYGPATH -u "$shortmode_path"`
24241       new_path="$input_path"
24242     fi
24243   fi
24244 
24245   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24246   if test "x$test_cygdrive_prefix" = x; then
24247     # As a simple fix, exclude /usr/bin since it's not a real path.
24248     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24249       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24250       # a path prefixed by /cygdrive for fixpath to work.
24251       new_path="$CYGWIN_ROOT_PATH$input_path"
24252     fi
24253   fi
24254 
24255 
24256   if test "x$path" != "x$new_path"; then
24257     BOOT_JDK="$new_path"
24258     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24259 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24260   fi
24261 
24262     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24263 
24264   path="$BOOT_JDK"
24265   has_colon=`$ECHO $path | $GREP ^.:`
24266   new_path="$path"
24267   if test "x$has_colon" = x; then
24268     # Not in mixed or Windows style, start by that.
24269     new_path=`cmd //c echo $path`
24270   fi
24271 
24272 
24273   input_path="$new_path"
24274   # Check if we need to convert this using DOS-style short mode. If the path
24275   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24276   # take no chances and rewrite it.
24277   # Note: m4 eats our [], so we need to use [ and ] instead.
24278   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24279   if test "x$has_forbidden_chars" != x; then
24280     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24281     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24282   fi
24283 
24284 
24285   windows_path="$new_path"
24286   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24287     unix_path=`$CYGPATH -u "$windows_path"`
24288     new_path="$unix_path"
24289   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24290     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24291     new_path="$unix_path"
24292   fi
24293 
24294   if test "x$path" != "x$new_path"; then
24295     BOOT_JDK="$new_path"
24296     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24297 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24298   fi
24299 
24300   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24301   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24302 
24303     else
24304       # We're on a unix platform. Hooray! :)
24305       path="$BOOT_JDK"
24306       has_space=`$ECHO "$path" | $GREP " "`
24307       if test "x$has_space" != x; then
24308         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24309 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24310         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24311       fi
24312 
24313       # Use eval to expand a potential ~
24314       eval path="$path"
24315       if test ! -f "$path" && test ! -d "$path"; then
24316         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24317       fi
24318 
24319       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24320     fi
24321   fi
24322 
24323             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24324 $as_echo_n "checking for Boot JDK... " >&6; }
24325             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24326 $as_echo "$BOOT_JDK" >&6; }
24327             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24328 $as_echo_n "checking Boot JDK version... " >&6; }
24329             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24330             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24331 $as_echo "$BOOT_JDK_VERSION" >&6; }
24332           fi # end check jdk version
24333         fi # end check javac
24334       fi # end check java
24335     fi # end check boot jdk found
24336   fi
24337 
24338 
24339   # Test: Is $JAVA_HOME set?
24340 
24341   if test "x$BOOT_JDK_FOUND" = xno; then
24342     # Now execute the test
24343 
24344   if test "x$JAVA_HOME" != x; then
24345     JAVA_HOME_PROCESSED="$JAVA_HOME"
24346 
24347   # Only process if variable expands to non-empty
24348 
24349   if test "x$JAVA_HOME_PROCESSED" != x; then
24350     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24351 
24352   # Input might be given as Windows format, start by converting to
24353   # unix format.
24354   path="$JAVA_HOME_PROCESSED"
24355   new_path=`$CYGPATH -u "$path"`
24356 
24357   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24358   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24359   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24360   # "foo.exe" is OK but "foo" is an error.
24361   #
24362   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24363   # It is also a way to make sure we got the proper file name for the real test later on.
24364   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24365   if test "x$test_shortpath" = x; then
24366     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24367 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24368     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24369   fi
24370 
24371   # Call helper function which possibly converts this using DOS-style short mode.
24372   # If so, the updated path is stored in $new_path.
24373 
24374   input_path="$new_path"
24375   # Check if we need to convert this using DOS-style short mode. If the path
24376   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24377   # take no chances and rewrite it.
24378   # Note: m4 eats our [], so we need to use [ and ] instead.
24379   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24380   if test "x$has_forbidden_chars" != x; then
24381     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24382     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24383     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24384     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24385       # Going to short mode and back again did indeed matter. Since short mode is
24386       # case insensitive, let's make it lowercase to improve readability.
24387       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24388       # Now convert it back to Unix-style (cygpath)
24389       input_path=`$CYGPATH -u "$shortmode_path"`
24390       new_path="$input_path"
24391     fi
24392   fi
24393 
24394   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24395   if test "x$test_cygdrive_prefix" = x; then
24396     # As a simple fix, exclude /usr/bin since it's not a real path.
24397     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24398       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24399       # a path prefixed by /cygdrive for fixpath to work.
24400       new_path="$CYGWIN_ROOT_PATH$input_path"
24401     fi
24402   fi
24403 
24404 
24405   if test "x$path" != "x$new_path"; then
24406     JAVA_HOME_PROCESSED="$new_path"
24407     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24408 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24409   fi
24410 
24411     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24412 
24413   path="$JAVA_HOME_PROCESSED"
24414   has_colon=`$ECHO $path | $GREP ^.:`
24415   new_path="$path"
24416   if test "x$has_colon" = x; then
24417     # Not in mixed or Windows style, start by that.
24418     new_path=`cmd //c echo $path`
24419   fi
24420 
24421 
24422   input_path="$new_path"
24423   # Check if we need to convert this using DOS-style short mode. If the path
24424   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24425   # take no chances and rewrite it.
24426   # Note: m4 eats our [], so we need to use [ and ] instead.
24427   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24428   if test "x$has_forbidden_chars" != x; then
24429     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24430     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24431   fi
24432 
24433 
24434   windows_path="$new_path"
24435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24436     unix_path=`$CYGPATH -u "$windows_path"`
24437     new_path="$unix_path"
24438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24439     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24440     new_path="$unix_path"
24441   fi
24442 
24443   if test "x$path" != "x$new_path"; then
24444     JAVA_HOME_PROCESSED="$new_path"
24445     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24446 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24447   fi
24448 
24449   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24450   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24451 
24452     else
24453       # We're on a unix platform. Hooray! :)
24454       path="$JAVA_HOME_PROCESSED"
24455       has_space=`$ECHO "$path" | $GREP " "`
24456       if test "x$has_space" != x; then
24457         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24458 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24459         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24460       fi
24461 
24462       # Use eval to expand a potential ~
24463       eval path="$path"
24464       if test ! -f "$path" && test ! -d "$path"; then
24465         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24466       fi
24467 
24468       JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24469     fi
24470   fi
24471 
24472     if test ! -d "$JAVA_HOME_PROCESSED"; then
24473       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24474 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24475     else
24476       # Aha, the user has set a JAVA_HOME
24477       # let us use that as the Boot JDK.
24478       BOOT_JDK="$JAVA_HOME_PROCESSED"
24479       BOOT_JDK_FOUND=maybe
24480       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24481 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24482     fi
24483   fi
24484 
24485 
24486     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24487     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24488       # Do we have a bin/java?
24489       if test ! -x "$BOOT_JDK/bin/java"; then
24490         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24491 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24492         BOOT_JDK_FOUND=no
24493       else
24494         # Do we have a bin/javac?
24495         if test ! -x "$BOOT_JDK/bin/javac"; then
24496           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24497 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24498           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24499 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24500           BOOT_JDK_FOUND=no
24501         else
24502           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24503           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24504 
24505           # Extra M4 quote needed to protect [] in grep expression.
24506           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24507           if test "x$FOUND_CORRECT_VERSION" = x; then
24508             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24509 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24510             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24511 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24512             BOOT_JDK_FOUND=no
24513           else
24514             # We're done! :-)
24515             BOOT_JDK_FOUND=yes
24516 
24517   # Only process if variable expands to non-empty
24518 
24519   if test "x$BOOT_JDK" != x; then
24520     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24521 
24522   # Input might be given as Windows format, start by converting to
24523   # unix format.
24524   path="$BOOT_JDK"
24525   new_path=`$CYGPATH -u "$path"`
24526 
24527   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24528   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24529   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24530   # "foo.exe" is OK but "foo" is an error.
24531   #
24532   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24533   # It is also a way to make sure we got the proper file name for the real test later on.
24534   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24535   if test "x$test_shortpath" = x; then
24536     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24537 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24538     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24539   fi
24540 
24541   # Call helper function which possibly converts this using DOS-style short mode.
24542   # If so, the updated path is stored in $new_path.
24543 
24544   input_path="$new_path"
24545   # Check if we need to convert this using DOS-style short mode. If the path
24546   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24547   # take no chances and rewrite it.
24548   # Note: m4 eats our [], so we need to use [ and ] instead.
24549   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24550   if test "x$has_forbidden_chars" != x; then
24551     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24552     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24553     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24554     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24555       # Going to short mode and back again did indeed matter. Since short mode is
24556       # case insensitive, let's make it lowercase to improve readability.
24557       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24558       # Now convert it back to Unix-style (cygpath)
24559       input_path=`$CYGPATH -u "$shortmode_path"`
24560       new_path="$input_path"
24561     fi
24562   fi
24563 
24564   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24565   if test "x$test_cygdrive_prefix" = x; then
24566     # As a simple fix, exclude /usr/bin since it's not a real path.
24567     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24568       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24569       # a path prefixed by /cygdrive for fixpath to work.
24570       new_path="$CYGWIN_ROOT_PATH$input_path"
24571     fi
24572   fi
24573 
24574 
24575   if test "x$path" != "x$new_path"; then
24576     BOOT_JDK="$new_path"
24577     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24578 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24579   fi
24580 
24581     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24582 
24583   path="$BOOT_JDK"
24584   has_colon=`$ECHO $path | $GREP ^.:`
24585   new_path="$path"
24586   if test "x$has_colon" = x; then
24587     # Not in mixed or Windows style, start by that.
24588     new_path=`cmd //c echo $path`
24589   fi
24590 
24591 
24592   input_path="$new_path"
24593   # Check if we need to convert this using DOS-style short mode. If the path
24594   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24595   # take no chances and rewrite it.
24596   # Note: m4 eats our [], so we need to use [ and ] instead.
24597   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24598   if test "x$has_forbidden_chars" != x; then
24599     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24600     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24601   fi
24602 
24603 
24604   windows_path="$new_path"
24605   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24606     unix_path=`$CYGPATH -u "$windows_path"`
24607     new_path="$unix_path"
24608   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24609     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24610     new_path="$unix_path"
24611   fi
24612 
24613   if test "x$path" != "x$new_path"; then
24614     BOOT_JDK="$new_path"
24615     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24616 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24617   fi
24618 
24619   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24620   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24621 
24622     else
24623       # We're on a unix platform. Hooray! :)
24624       path="$BOOT_JDK"
24625       has_space=`$ECHO "$path" | $GREP " "`
24626       if test "x$has_space" != x; then
24627         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24628 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24629         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24630       fi
24631 
24632       # Use eval to expand a potential ~
24633       eval path="$path"
24634       if test ! -f "$path" && test ! -d "$path"; then
24635         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24636       fi
24637 
24638       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24639     fi
24640   fi
24641 
24642             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24643 $as_echo_n "checking for Boot JDK... " >&6; }
24644             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24645 $as_echo "$BOOT_JDK" >&6; }
24646             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24647 $as_echo_n "checking Boot JDK version... " >&6; }
24648             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24649             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24650 $as_echo "$BOOT_JDK_VERSION" >&6; }
24651           fi # end check jdk version
24652         fi # end check javac
24653       fi # end check java
24654     fi # end check boot jdk found
24655   fi
24656 
24657 
24658   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
24659 
24660   if test "x$BOOT_JDK_FOUND" = xno; then
24661     # Now execute the test
24662 
24663   # Extract the first word of "javac", so it can be a program name with args.
24664 set dummy javac; ac_word=$2
24665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24666 $as_echo_n "checking for $ac_word... " >&6; }
24667 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
24668   $as_echo_n "(cached) " >&6
24669 else
24670   case $JAVAC_CHECK in
24671   [\\/]* | ?:[\\/]*)
24672   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
24673   ;;
24674   *)
24675   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24676 for as_dir in $PATH
24677 do
24678   IFS=$as_save_IFS
24679   test -z "$as_dir" && as_dir=.
24680     for ac_exec_ext in '' $ac_executable_extensions; do
24681   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24682     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
24683     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24684     break 2
24685   fi
24686 done
24687   done
24688 IFS=$as_save_IFS
24689 
24690   ;;
24691 esac
24692 fi
24693 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
24694 if test -n "$JAVAC_CHECK"; then
24695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
24696 $as_echo "$JAVAC_CHECK" >&6; }
24697 else
24698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24699 $as_echo "no" >&6; }
24700 fi
24701 
24702 
24703   # Extract the first word of "java", so it can be a program name with args.
24704 set dummy java; ac_word=$2
24705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24706 $as_echo_n "checking for $ac_word... " >&6; }
24707 if ${ac_cv_path_JAVA_CHECK+:} false; then :
24708   $as_echo_n "(cached) " >&6
24709 else
24710   case $JAVA_CHECK in
24711   [\\/]* | ?:[\\/]*)
24712   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
24713   ;;
24714   *)
24715   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24716 for as_dir in $PATH
24717 do
24718   IFS=$as_save_IFS
24719   test -z "$as_dir" && as_dir=.
24720     for ac_exec_ext in '' $ac_executable_extensions; do
24721   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24722     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
24723     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24724     break 2
24725   fi
24726 done
24727   done
24728 IFS=$as_save_IFS
24729 
24730   ;;
24731 esac
24732 fi
24733 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
24734 if test -n "$JAVA_CHECK"; then
24735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
24736 $as_echo "$JAVA_CHECK" >&6; }
24737 else
24738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24739 $as_echo "no" >&6; }
24740 fi
24741 
24742 
24743   BINARY="$JAVAC_CHECK"
24744   if test "x$JAVAC_CHECK" = x; then
24745     BINARY="$JAVA_CHECK"
24746   fi
24747   if test "x$BINARY" != x; then
24748     # So there is a java(c) binary, it might be part of a JDK.
24749     # Lets find the JDK/JRE directory by following symbolic links.
24750     # Linux/GNU systems often have links from /usr/bin/java to
24751     # /etc/alternatives/java to the real JDK binary.
24752 
24753   if test "x$OPENJDK_BUILD_OS" != xwindows; then
24754     # Follow a chain of symbolic links. Use readlink
24755     # where it exists, else fall back to horribly
24756     # complicated shell code.
24757     if test "x$READLINK_TESTED" != yes; then
24758       # On MacOSX there is a readlink tool with a different
24759       # purpose than the GNU readlink tool. Check the found readlink.
24760       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
24761       if test "x$ISGNU" = x; then
24762         # A readlink that we do not know how to use.
24763         # Are there other non-GNU readlinks out there?
24764         READLINK_TESTED=yes
24765         READLINK=
24766       fi
24767     fi
24768 
24769     if test "x$READLINK" != x; then
24770       BINARY=`$READLINK -f $BINARY`
24771     else
24772       # Save the current directory for restoring afterwards
24773       STARTDIR=$PWD
24774       COUNTER=0
24775       sym_link_dir=`$DIRNAME $BINARY`
24776       sym_link_file=`$BASENAME $BINARY`
24777       cd $sym_link_dir
24778       # Use -P flag to resolve symlinks in directories.
24779       cd `$THEPWDCMD -P`
24780       sym_link_dir=`$THEPWDCMD -P`
24781       # Resolve file symlinks
24782       while test $COUNTER -lt 20; do
24783         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
24784         if test "x$ISLINK" == x; then
24785           # This is not a symbolic link! We are done!
24786           break
24787         fi
24788         # Again resolve directory symlinks since the target of the just found
24789         # link could be in a different directory
24790         cd `$DIRNAME $ISLINK`
24791         sym_link_dir=`$THEPWDCMD -P`
24792         sym_link_file=`$BASENAME $ISLINK`
24793         let COUNTER=COUNTER+1
24794       done
24795       cd $STARTDIR
24796       BINARY=$sym_link_dir/$sym_link_file
24797     fi
24798   fi
24799 
24800     BOOT_JDK=`dirname "$BINARY"`
24801     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
24802     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
24803       # Looks like we found ourselves an JDK
24804       BOOT_JDK_FOUND=maybe
24805       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
24806 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
24807     fi
24808   fi
24809 
24810 
24811     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24812     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24813       # Do we have a bin/java?
24814       if test ! -x "$BOOT_JDK/bin/java"; then
24815         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24816 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24817         BOOT_JDK_FOUND=no
24818       else
24819         # Do we have a bin/javac?
24820         if test ! -x "$BOOT_JDK/bin/javac"; then
24821           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24822 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24823           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24824 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24825           BOOT_JDK_FOUND=no
24826         else
24827           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24828           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24829 
24830           # Extra M4 quote needed to protect [] in grep expression.
24831           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24832           if test "x$FOUND_CORRECT_VERSION" = x; then
24833             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24834 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24835             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24836 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24837             BOOT_JDK_FOUND=no
24838           else
24839             # We're done! :-)
24840             BOOT_JDK_FOUND=yes
24841 
24842   # Only process if variable expands to non-empty
24843 
24844   if test "x$BOOT_JDK" != x; then
24845     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24846 
24847   # Input might be given as Windows format, start by converting to
24848   # unix format.
24849   path="$BOOT_JDK"
24850   new_path=`$CYGPATH -u "$path"`
24851 
24852   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24853   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24854   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24855   # "foo.exe" is OK but "foo" is an error.
24856   #
24857   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24858   # It is also a way to make sure we got the proper file name for the real test later on.
24859   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24860   if test "x$test_shortpath" = x; then
24861     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24862 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24863     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24864   fi
24865 
24866   # Call helper function which possibly converts this using DOS-style short mode.
24867   # If so, the updated path is stored in $new_path.
24868 
24869   input_path="$new_path"
24870   # Check if we need to convert this using DOS-style short mode. If the path
24871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24872   # take no chances and rewrite it.
24873   # Note: m4 eats our [], so we need to use [ and ] instead.
24874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24875   if test "x$has_forbidden_chars" != x; then
24876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24877     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24878     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24879     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24880       # Going to short mode and back again did indeed matter. Since short mode is
24881       # case insensitive, let's make it lowercase to improve readability.
24882       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24883       # Now convert it back to Unix-style (cygpath)
24884       input_path=`$CYGPATH -u "$shortmode_path"`
24885       new_path="$input_path"
24886     fi
24887   fi
24888 
24889   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24890   if test "x$test_cygdrive_prefix" = x; then
24891     # As a simple fix, exclude /usr/bin since it's not a real path.
24892     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24893       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24894       # a path prefixed by /cygdrive for fixpath to work.
24895       new_path="$CYGWIN_ROOT_PATH$input_path"
24896     fi
24897   fi
24898 
24899 
24900   if test "x$path" != "x$new_path"; then
24901     BOOT_JDK="$new_path"
24902     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24903 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24904   fi
24905 
24906     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24907 
24908   path="$BOOT_JDK"
24909   has_colon=`$ECHO $path | $GREP ^.:`
24910   new_path="$path"
24911   if test "x$has_colon" = x; then
24912     # Not in mixed or Windows style, start by that.
24913     new_path=`cmd //c echo $path`
24914   fi
24915 
24916 
24917   input_path="$new_path"
24918   # Check if we need to convert this using DOS-style short mode. If the path
24919   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24920   # take no chances and rewrite it.
24921   # Note: m4 eats our [], so we need to use [ and ] instead.
24922   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24923   if test "x$has_forbidden_chars" != x; then
24924     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24925     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24926   fi
24927 
24928 
24929   windows_path="$new_path"
24930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24931     unix_path=`$CYGPATH -u "$windows_path"`
24932     new_path="$unix_path"
24933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24934     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24935     new_path="$unix_path"
24936   fi
24937 
24938   if test "x$path" != "x$new_path"; then
24939     BOOT_JDK="$new_path"
24940     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24941 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24942   fi
24943 
24944   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24945   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24946 
24947     else
24948       # We're on a unix platform. Hooray! :)
24949       path="$BOOT_JDK"
24950       has_space=`$ECHO "$path" | $GREP " "`
24951       if test "x$has_space" != x; then
24952         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24953 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24954         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24955       fi
24956 
24957       # Use eval to expand a potential ~
24958       eval path="$path"
24959       if test ! -f "$path" && test ! -d "$path"; then
24960         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24961       fi
24962 
24963       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24964     fi
24965   fi
24966 
24967             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24968 $as_echo_n "checking for Boot JDK... " >&6; }
24969             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24970 $as_echo "$BOOT_JDK" >&6; }
24971             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24972 $as_echo_n "checking Boot JDK version... " >&6; }
24973             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24974             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24975 $as_echo "$BOOT_JDK_VERSION" >&6; }
24976           fi # end check jdk version
24977         fi # end check javac
24978       fi # end check java
24979     fi # end check boot jdk found
24980   fi
24981 
24982 
24983   # Test: Is there a JDK installed in default, well-known locations?
24984 
24985   if test "x$BOOT_JDK_FOUND" = xno; then
24986     # Now execute the test
24987 
24988   if test "x$OPENJDK_TARGET_OS" = xwindows; then
24989 
24990   if test "x$BOOT_JDK_FOUND" = xno; then
24991     # Now execute the test
24992 
24993   if test "x$ProgramW6432" != x; then
24994     VIRTUAL_DIR="$ProgramW6432/Java"
24995 
24996   windows_path="$VIRTUAL_DIR"
24997   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24998     unix_path=`$CYGPATH -u "$windows_path"`
24999     VIRTUAL_DIR="$unix_path"
25000   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25001     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25002     VIRTUAL_DIR="$unix_path"
25003   fi
25004 
25005 
25006   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25007   BOOT_JDK_SUFFIX=""
25008   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25009   if test "x$ALL_JDKS_FOUND" != x; then
25010     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25011 
25012   if test "x$BOOT_JDK_FOUND" = xno; then
25013     # Now execute the test
25014 
25015         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25016         if test -d "$BOOT_JDK"; then
25017           BOOT_JDK_FOUND=maybe
25018           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25019 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25020         fi
25021 
25022 
25023     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25024     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25025       # Do we have a bin/java?
25026       if test ! -x "$BOOT_JDK/bin/java"; then
25027         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25028 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25029         BOOT_JDK_FOUND=no
25030       else
25031         # Do we have a bin/javac?
25032         if test ! -x "$BOOT_JDK/bin/javac"; then
25033           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25034 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25035           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25036 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25037           BOOT_JDK_FOUND=no
25038         else
25039           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25040           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25041 
25042           # Extra M4 quote needed to protect [] in grep expression.
25043           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25044           if test "x$FOUND_CORRECT_VERSION" = x; then
25045             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25046 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25047             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25048 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25049             BOOT_JDK_FOUND=no
25050           else
25051             # We're done! :-)
25052             BOOT_JDK_FOUND=yes
25053 
25054   # Only process if variable expands to non-empty
25055 
25056   if test "x$BOOT_JDK" != x; then
25057     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25058 
25059   # Input might be given as Windows format, start by converting to
25060   # unix format.
25061   path="$BOOT_JDK"
25062   new_path=`$CYGPATH -u "$path"`
25063 
25064   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25065   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25066   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25067   # "foo.exe" is OK but "foo" is an error.
25068   #
25069   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25070   # It is also a way to make sure we got the proper file name for the real test later on.
25071   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25072   if test "x$test_shortpath" = x; then
25073     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25074 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25075     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25076   fi
25077 
25078   # Call helper function which possibly converts this using DOS-style short mode.
25079   # If so, the updated path is stored in $new_path.
25080 
25081   input_path="$new_path"
25082   # Check if we need to convert this using DOS-style short mode. If the path
25083   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25084   # take no chances and rewrite it.
25085   # Note: m4 eats our [], so we need to use [ and ] instead.
25086   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25087   if test "x$has_forbidden_chars" != x; then
25088     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25089     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25090     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25091     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25092       # Going to short mode and back again did indeed matter. Since short mode is
25093       # case insensitive, let's make it lowercase to improve readability.
25094       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25095       # Now convert it back to Unix-style (cygpath)
25096       input_path=`$CYGPATH -u "$shortmode_path"`
25097       new_path="$input_path"
25098     fi
25099   fi
25100 
25101   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25102   if test "x$test_cygdrive_prefix" = x; then
25103     # As a simple fix, exclude /usr/bin since it's not a real path.
25104     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25105       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25106       # a path prefixed by /cygdrive for fixpath to work.
25107       new_path="$CYGWIN_ROOT_PATH$input_path"
25108     fi
25109   fi
25110 
25111 
25112   if test "x$path" != "x$new_path"; then
25113     BOOT_JDK="$new_path"
25114     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25115 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25116   fi
25117 
25118     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25119 
25120   path="$BOOT_JDK"
25121   has_colon=`$ECHO $path | $GREP ^.:`
25122   new_path="$path"
25123   if test "x$has_colon" = x; then
25124     # Not in mixed or Windows style, start by that.
25125     new_path=`cmd //c echo $path`
25126   fi
25127 
25128 
25129   input_path="$new_path"
25130   # Check if we need to convert this using DOS-style short mode. If the path
25131   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25132   # take no chances and rewrite it.
25133   # Note: m4 eats our [], so we need to use [ and ] instead.
25134   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25135   if test "x$has_forbidden_chars" != x; then
25136     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25137     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25138   fi
25139 
25140 
25141   windows_path="$new_path"
25142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25143     unix_path=`$CYGPATH -u "$windows_path"`
25144     new_path="$unix_path"
25145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25147     new_path="$unix_path"
25148   fi
25149 
25150   if test "x$path" != "x$new_path"; then
25151     BOOT_JDK="$new_path"
25152     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25153 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25154   fi
25155 
25156   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25157   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25158 
25159     else
25160       # We're on a unix platform. Hooray! :)
25161       path="$BOOT_JDK"
25162       has_space=`$ECHO "$path" | $GREP " "`
25163       if test "x$has_space" != x; then
25164         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25165 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25166         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25167       fi
25168 
25169       # Use eval to expand a potential ~
25170       eval path="$path"
25171       if test ! -f "$path" && test ! -d "$path"; then
25172         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25173       fi
25174 
25175       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25176     fi
25177   fi
25178 
25179             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25180 $as_echo_n "checking for Boot JDK... " >&6; }
25181             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25182 $as_echo "$BOOT_JDK" >&6; }
25183             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25184 $as_echo_n "checking Boot JDK version... " >&6; }
25185             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25186             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25187 $as_echo "$BOOT_JDK_VERSION" >&6; }
25188           fi # end check jdk version
25189         fi # end check javac
25190       fi # end check java
25191     fi # end check boot jdk found
25192   fi
25193 
25194     done
25195   fi
25196 
25197   fi
25198 
25199 
25200     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25201     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25202       # Do we have a bin/java?
25203       if test ! -x "$BOOT_JDK/bin/java"; then
25204         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25205 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25206         BOOT_JDK_FOUND=no
25207       else
25208         # Do we have a bin/javac?
25209         if test ! -x "$BOOT_JDK/bin/javac"; then
25210           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25211 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25212           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25213 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25214           BOOT_JDK_FOUND=no
25215         else
25216           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25217           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25218 
25219           # Extra M4 quote needed to protect [] in grep expression.
25220           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25221           if test "x$FOUND_CORRECT_VERSION" = x; then
25222             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25223 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25224             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25225 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25226             BOOT_JDK_FOUND=no
25227           else
25228             # We're done! :-)
25229             BOOT_JDK_FOUND=yes
25230 
25231   # Only process if variable expands to non-empty
25232 
25233   if test "x$BOOT_JDK" != x; then
25234     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25235 
25236   # Input might be given as Windows format, start by converting to
25237   # unix format.
25238   path="$BOOT_JDK"
25239   new_path=`$CYGPATH -u "$path"`
25240 
25241   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25242   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25243   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25244   # "foo.exe" is OK but "foo" is an error.
25245   #
25246   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25247   # It is also a way to make sure we got the proper file name for the real test later on.
25248   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25249   if test "x$test_shortpath" = x; then
25250     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25251 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25252     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25253   fi
25254 
25255   # Call helper function which possibly converts this using DOS-style short mode.
25256   # If so, the updated path is stored in $new_path.
25257 
25258   input_path="$new_path"
25259   # Check if we need to convert this using DOS-style short mode. If the path
25260   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25261   # take no chances and rewrite it.
25262   # Note: m4 eats our [], so we need to use [ and ] instead.
25263   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25264   if test "x$has_forbidden_chars" != x; then
25265     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25266     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25267     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25268     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25269       # Going to short mode and back again did indeed matter. Since short mode is
25270       # case insensitive, let's make it lowercase to improve readability.
25271       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25272       # Now convert it back to Unix-style (cygpath)
25273       input_path=`$CYGPATH -u "$shortmode_path"`
25274       new_path="$input_path"
25275     fi
25276   fi
25277 
25278   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25279   if test "x$test_cygdrive_prefix" = x; then
25280     # As a simple fix, exclude /usr/bin since it's not a real path.
25281     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25282       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25283       # a path prefixed by /cygdrive for fixpath to work.
25284       new_path="$CYGWIN_ROOT_PATH$input_path"
25285     fi
25286   fi
25287 
25288 
25289   if test "x$path" != "x$new_path"; then
25290     BOOT_JDK="$new_path"
25291     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25292 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25293   fi
25294 
25295     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25296 
25297   path="$BOOT_JDK"
25298   has_colon=`$ECHO $path | $GREP ^.:`
25299   new_path="$path"
25300   if test "x$has_colon" = x; then
25301     # Not in mixed or Windows style, start by that.
25302     new_path=`cmd //c echo $path`
25303   fi
25304 
25305 
25306   input_path="$new_path"
25307   # Check if we need to convert this using DOS-style short mode. If the path
25308   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25309   # take no chances and rewrite it.
25310   # Note: m4 eats our [], so we need to use [ and ] instead.
25311   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25312   if test "x$has_forbidden_chars" != x; then
25313     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25314     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25315   fi
25316 
25317 
25318   windows_path="$new_path"
25319   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25320     unix_path=`$CYGPATH -u "$windows_path"`
25321     new_path="$unix_path"
25322   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25323     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25324     new_path="$unix_path"
25325   fi
25326 
25327   if test "x$path" != "x$new_path"; then
25328     BOOT_JDK="$new_path"
25329     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25330 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25331   fi
25332 
25333   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25334   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25335 
25336     else
25337       # We're on a unix platform. Hooray! :)
25338       path="$BOOT_JDK"
25339       has_space=`$ECHO "$path" | $GREP " "`
25340       if test "x$has_space" != x; then
25341         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25342 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25343         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25344       fi
25345 
25346       # Use eval to expand a potential ~
25347       eval path="$path"
25348       if test ! -f "$path" && test ! -d "$path"; then
25349         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25350       fi
25351 
25352       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25353     fi
25354   fi
25355 
25356             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25357 $as_echo_n "checking for Boot JDK... " >&6; }
25358             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25359 $as_echo "$BOOT_JDK" >&6; }
25360             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25361 $as_echo_n "checking Boot JDK version... " >&6; }
25362             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25363             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25364 $as_echo "$BOOT_JDK_VERSION" >&6; }
25365           fi # end check jdk version
25366         fi # end check javac
25367       fi # end check java
25368     fi # end check boot jdk found
25369   fi
25370 
25371 
25372   if test "x$BOOT_JDK_FOUND" = xno; then
25373     # Now execute the test
25374 
25375   if test "x$PROGRAMW6432" != x; then
25376     VIRTUAL_DIR="$PROGRAMW6432/Java"
25377 
25378   windows_path="$VIRTUAL_DIR"
25379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25380     unix_path=`$CYGPATH -u "$windows_path"`
25381     VIRTUAL_DIR="$unix_path"
25382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25383     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25384     VIRTUAL_DIR="$unix_path"
25385   fi
25386 
25387 
25388   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25389   BOOT_JDK_SUFFIX=""
25390   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25391   if test "x$ALL_JDKS_FOUND" != x; then
25392     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25393 
25394   if test "x$BOOT_JDK_FOUND" = xno; then
25395     # Now execute the test
25396 
25397         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25398         if test -d "$BOOT_JDK"; then
25399           BOOT_JDK_FOUND=maybe
25400           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25401 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25402         fi
25403 
25404 
25405     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25406     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25407       # Do we have a bin/java?
25408       if test ! -x "$BOOT_JDK/bin/java"; then
25409         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25410 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25411         BOOT_JDK_FOUND=no
25412       else
25413         # Do we have a bin/javac?
25414         if test ! -x "$BOOT_JDK/bin/javac"; then
25415           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25416 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25417           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25418 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25419           BOOT_JDK_FOUND=no
25420         else
25421           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25422           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25423 
25424           # Extra M4 quote needed to protect [] in grep expression.
25425           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25426           if test "x$FOUND_CORRECT_VERSION" = x; then
25427             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25428 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25429             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25430 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25431             BOOT_JDK_FOUND=no
25432           else
25433             # We're done! :-)
25434             BOOT_JDK_FOUND=yes
25435 
25436   # Only process if variable expands to non-empty
25437 
25438   if test "x$BOOT_JDK" != x; then
25439     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25440 
25441   # Input might be given as Windows format, start by converting to
25442   # unix format.
25443   path="$BOOT_JDK"
25444   new_path=`$CYGPATH -u "$path"`
25445 
25446   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25447   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25448   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25449   # "foo.exe" is OK but "foo" is an error.
25450   #
25451   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25452   # It is also a way to make sure we got the proper file name for the real test later on.
25453   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25454   if test "x$test_shortpath" = x; then
25455     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25456 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25457     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25458   fi
25459 
25460   # Call helper function which possibly converts this using DOS-style short mode.
25461   # If so, the updated path is stored in $new_path.
25462 
25463   input_path="$new_path"
25464   # Check if we need to convert this using DOS-style short mode. If the path
25465   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25466   # take no chances and rewrite it.
25467   # Note: m4 eats our [], so we need to use [ and ] instead.
25468   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25469   if test "x$has_forbidden_chars" != x; then
25470     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25471     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25472     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25473     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25474       # Going to short mode and back again did indeed matter. Since short mode is
25475       # case insensitive, let's make it lowercase to improve readability.
25476       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25477       # Now convert it back to Unix-style (cygpath)
25478       input_path=`$CYGPATH -u "$shortmode_path"`
25479       new_path="$input_path"
25480     fi
25481   fi
25482 
25483   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25484   if test "x$test_cygdrive_prefix" = x; then
25485     # As a simple fix, exclude /usr/bin since it's not a real path.
25486     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25487       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25488       # a path prefixed by /cygdrive for fixpath to work.
25489       new_path="$CYGWIN_ROOT_PATH$input_path"
25490     fi
25491   fi
25492 
25493 
25494   if test "x$path" != "x$new_path"; then
25495     BOOT_JDK="$new_path"
25496     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25497 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25498   fi
25499 
25500     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25501 
25502   path="$BOOT_JDK"
25503   has_colon=`$ECHO $path | $GREP ^.:`
25504   new_path="$path"
25505   if test "x$has_colon" = x; then
25506     # Not in mixed or Windows style, start by that.
25507     new_path=`cmd //c echo $path`
25508   fi
25509 
25510 
25511   input_path="$new_path"
25512   # Check if we need to convert this using DOS-style short mode. If the path
25513   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25514   # take no chances and rewrite it.
25515   # Note: m4 eats our [], so we need to use [ and ] instead.
25516   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25517   if test "x$has_forbidden_chars" != x; then
25518     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25519     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25520   fi
25521 
25522 
25523   windows_path="$new_path"
25524   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25525     unix_path=`$CYGPATH -u "$windows_path"`
25526     new_path="$unix_path"
25527   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25528     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25529     new_path="$unix_path"
25530   fi
25531 
25532   if test "x$path" != "x$new_path"; then
25533     BOOT_JDK="$new_path"
25534     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25535 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25536   fi
25537 
25538   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25539   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25540 
25541     else
25542       # We're on a unix platform. Hooray! :)
25543       path="$BOOT_JDK"
25544       has_space=`$ECHO "$path" | $GREP " "`
25545       if test "x$has_space" != x; then
25546         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25547 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25548         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25549       fi
25550 
25551       # Use eval to expand a potential ~
25552       eval path="$path"
25553       if test ! -f "$path" && test ! -d "$path"; then
25554         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25555       fi
25556 
25557       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25558     fi
25559   fi
25560 
25561             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25562 $as_echo_n "checking for Boot JDK... " >&6; }
25563             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25564 $as_echo "$BOOT_JDK" >&6; }
25565             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25566 $as_echo_n "checking Boot JDK version... " >&6; }
25567             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25568             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25569 $as_echo "$BOOT_JDK_VERSION" >&6; }
25570           fi # end check jdk version
25571         fi # end check javac
25572       fi # end check java
25573     fi # end check boot jdk found
25574   fi
25575 
25576     done
25577   fi
25578 
25579   fi
25580 
25581 
25582     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25583     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25584       # Do we have a bin/java?
25585       if test ! -x "$BOOT_JDK/bin/java"; then
25586         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25587 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25588         BOOT_JDK_FOUND=no
25589       else
25590         # Do we have a bin/javac?
25591         if test ! -x "$BOOT_JDK/bin/javac"; then
25592           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25593 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25594           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25595 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25596           BOOT_JDK_FOUND=no
25597         else
25598           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25599           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25600 
25601           # Extra M4 quote needed to protect [] in grep expression.
25602           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25603           if test "x$FOUND_CORRECT_VERSION" = x; then
25604             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25605 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25606             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25607 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25608             BOOT_JDK_FOUND=no
25609           else
25610             # We're done! :-)
25611             BOOT_JDK_FOUND=yes
25612 
25613   # Only process if variable expands to non-empty
25614 
25615   if test "x$BOOT_JDK" != x; then
25616     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25617 
25618   # Input might be given as Windows format, start by converting to
25619   # unix format.
25620   path="$BOOT_JDK"
25621   new_path=`$CYGPATH -u "$path"`
25622 
25623   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25624   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25625   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25626   # "foo.exe" is OK but "foo" is an error.
25627   #
25628   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25629   # It is also a way to make sure we got the proper file name for the real test later on.
25630   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25631   if test "x$test_shortpath" = x; then
25632     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25633 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25634     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25635   fi
25636 
25637   # Call helper function which possibly converts this using DOS-style short mode.
25638   # If so, the updated path is stored in $new_path.
25639 
25640   input_path="$new_path"
25641   # Check if we need to convert this using DOS-style short mode. If the path
25642   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25643   # take no chances and rewrite it.
25644   # Note: m4 eats our [], so we need to use [ and ] instead.
25645   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25646   if test "x$has_forbidden_chars" != x; then
25647     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25648     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25649     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25650     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25651       # Going to short mode and back again did indeed matter. Since short mode is
25652       # case insensitive, let's make it lowercase to improve readability.
25653       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25654       # Now convert it back to Unix-style (cygpath)
25655       input_path=`$CYGPATH -u "$shortmode_path"`
25656       new_path="$input_path"
25657     fi
25658   fi
25659 
25660   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25661   if test "x$test_cygdrive_prefix" = x; then
25662     # As a simple fix, exclude /usr/bin since it's not a real path.
25663     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25664       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25665       # a path prefixed by /cygdrive for fixpath to work.
25666       new_path="$CYGWIN_ROOT_PATH$input_path"
25667     fi
25668   fi
25669 
25670 
25671   if test "x$path" != "x$new_path"; then
25672     BOOT_JDK="$new_path"
25673     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25674 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25675   fi
25676 
25677     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25678 
25679   path="$BOOT_JDK"
25680   has_colon=`$ECHO $path | $GREP ^.:`
25681   new_path="$path"
25682   if test "x$has_colon" = x; then
25683     # Not in mixed or Windows style, start by that.
25684     new_path=`cmd //c echo $path`
25685   fi
25686 
25687 
25688   input_path="$new_path"
25689   # Check if we need to convert this using DOS-style short mode. If the path
25690   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25691   # take no chances and rewrite it.
25692   # Note: m4 eats our [], so we need to use [ and ] instead.
25693   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25694   if test "x$has_forbidden_chars" != x; then
25695     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25696     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25697   fi
25698 
25699 
25700   windows_path="$new_path"
25701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25702     unix_path=`$CYGPATH -u "$windows_path"`
25703     new_path="$unix_path"
25704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25706     new_path="$unix_path"
25707   fi
25708 
25709   if test "x$path" != "x$new_path"; then
25710     BOOT_JDK="$new_path"
25711     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25712 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25713   fi
25714 
25715   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25716   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25717 
25718     else
25719       # We're on a unix platform. Hooray! :)
25720       path="$BOOT_JDK"
25721       has_space=`$ECHO "$path" | $GREP " "`
25722       if test "x$has_space" != x; then
25723         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25724 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25725         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25726       fi
25727 
25728       # Use eval to expand a potential ~
25729       eval path="$path"
25730       if test ! -f "$path" && test ! -d "$path"; then
25731         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25732       fi
25733 
25734       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25735     fi
25736   fi
25737 
25738             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25739 $as_echo_n "checking for Boot JDK... " >&6; }
25740             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25741 $as_echo "$BOOT_JDK" >&6; }
25742             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25743 $as_echo_n "checking Boot JDK version... " >&6; }
25744             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25745             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25746 $as_echo "$BOOT_JDK_VERSION" >&6; }
25747           fi # end check jdk version
25748         fi # end check javac
25749       fi # end check java
25750     fi # end check boot jdk found
25751   fi
25752 
25753 
25754   if test "x$BOOT_JDK_FOUND" = xno; then
25755     # Now execute the test
25756 
25757   if test "x$PROGRAMFILES" != x; then
25758     VIRTUAL_DIR="$PROGRAMFILES/Java"
25759 
25760   windows_path="$VIRTUAL_DIR"
25761   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25762     unix_path=`$CYGPATH -u "$windows_path"`
25763     VIRTUAL_DIR="$unix_path"
25764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25765     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25766     VIRTUAL_DIR="$unix_path"
25767   fi
25768 
25769 
25770   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25771   BOOT_JDK_SUFFIX=""
25772   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25773   if test "x$ALL_JDKS_FOUND" != x; then
25774     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25775 
25776   if test "x$BOOT_JDK_FOUND" = xno; then
25777     # Now execute the test
25778 
25779         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25780         if test -d "$BOOT_JDK"; then
25781           BOOT_JDK_FOUND=maybe
25782           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25783 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25784         fi
25785 
25786 
25787     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25788     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25789       # Do we have a bin/java?
25790       if test ! -x "$BOOT_JDK/bin/java"; then
25791         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25792 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25793         BOOT_JDK_FOUND=no
25794       else
25795         # Do we have a bin/javac?
25796         if test ! -x "$BOOT_JDK/bin/javac"; then
25797           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25798 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25799           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25800 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25801           BOOT_JDK_FOUND=no
25802         else
25803           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25804           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25805 
25806           # Extra M4 quote needed to protect [] in grep expression.
25807           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25808           if test "x$FOUND_CORRECT_VERSION" = x; then
25809             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25810 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25811             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25812 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25813             BOOT_JDK_FOUND=no
25814           else
25815             # We're done! :-)
25816             BOOT_JDK_FOUND=yes
25817 
25818   # Only process if variable expands to non-empty
25819 
25820   if test "x$BOOT_JDK" != x; then
25821     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25822 
25823   # Input might be given as Windows format, start by converting to
25824   # unix format.
25825   path="$BOOT_JDK"
25826   new_path=`$CYGPATH -u "$path"`
25827 
25828   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25829   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25830   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25831   # "foo.exe" is OK but "foo" is an error.
25832   #
25833   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25834   # It is also a way to make sure we got the proper file name for the real test later on.
25835   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25836   if test "x$test_shortpath" = x; then
25837     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25838 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25839     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25840   fi
25841 
25842   # Call helper function which possibly converts this using DOS-style short mode.
25843   # If so, the updated path is stored in $new_path.
25844 
25845   input_path="$new_path"
25846   # Check if we need to convert this using DOS-style short mode. If the path
25847   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25848   # take no chances and rewrite it.
25849   # Note: m4 eats our [], so we need to use [ and ] instead.
25850   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25851   if test "x$has_forbidden_chars" != x; then
25852     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25853     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25854     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25855     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25856       # Going to short mode and back again did indeed matter. Since short mode is
25857       # case insensitive, let's make it lowercase to improve readability.
25858       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25859       # Now convert it back to Unix-style (cygpath)
25860       input_path=`$CYGPATH -u "$shortmode_path"`
25861       new_path="$input_path"
25862     fi
25863   fi
25864 
25865   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25866   if test "x$test_cygdrive_prefix" = x; then
25867     # As a simple fix, exclude /usr/bin since it's not a real path.
25868     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25869       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25870       # a path prefixed by /cygdrive for fixpath to work.
25871       new_path="$CYGWIN_ROOT_PATH$input_path"
25872     fi
25873   fi
25874 
25875 
25876   if test "x$path" != "x$new_path"; then
25877     BOOT_JDK="$new_path"
25878     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25879 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25880   fi
25881 
25882     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25883 
25884   path="$BOOT_JDK"
25885   has_colon=`$ECHO $path | $GREP ^.:`
25886   new_path="$path"
25887   if test "x$has_colon" = x; then
25888     # Not in mixed or Windows style, start by that.
25889     new_path=`cmd //c echo $path`
25890   fi
25891 
25892 
25893   input_path="$new_path"
25894   # Check if we need to convert this using DOS-style short mode. If the path
25895   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25896   # take no chances and rewrite it.
25897   # Note: m4 eats our [], so we need to use [ and ] instead.
25898   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25899   if test "x$has_forbidden_chars" != x; then
25900     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25901     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25902   fi
25903 
25904 
25905   windows_path="$new_path"
25906   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25907     unix_path=`$CYGPATH -u "$windows_path"`
25908     new_path="$unix_path"
25909   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25910     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25911     new_path="$unix_path"
25912   fi
25913 
25914   if test "x$path" != "x$new_path"; then
25915     BOOT_JDK="$new_path"
25916     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25917 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25918   fi
25919 
25920   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25921   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25922 
25923     else
25924       # We're on a unix platform. Hooray! :)
25925       path="$BOOT_JDK"
25926       has_space=`$ECHO "$path" | $GREP " "`
25927       if test "x$has_space" != x; then
25928         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25929 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25930         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25931       fi
25932 
25933       # Use eval to expand a potential ~
25934       eval path="$path"
25935       if test ! -f "$path" && test ! -d "$path"; then
25936         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25937       fi
25938 
25939       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25940     fi
25941   fi
25942 
25943             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25944 $as_echo_n "checking for Boot JDK... " >&6; }
25945             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25946 $as_echo "$BOOT_JDK" >&6; }
25947             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25948 $as_echo_n "checking Boot JDK version... " >&6; }
25949             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25950             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25951 $as_echo "$BOOT_JDK_VERSION" >&6; }
25952           fi # end check jdk version
25953         fi # end check javac
25954       fi # end check java
25955     fi # end check boot jdk found
25956   fi
25957 
25958     done
25959   fi
25960 
25961   fi
25962 
25963 
25964     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25965     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25966       # Do we have a bin/java?
25967       if test ! -x "$BOOT_JDK/bin/java"; then
25968         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25969 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25970         BOOT_JDK_FOUND=no
25971       else
25972         # Do we have a bin/javac?
25973         if test ! -x "$BOOT_JDK/bin/javac"; then
25974           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25975 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25976           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25977 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25978           BOOT_JDK_FOUND=no
25979         else
25980           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25981           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25982 
25983           # Extra M4 quote needed to protect [] in grep expression.
25984           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25985           if test "x$FOUND_CORRECT_VERSION" = x; then
25986             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25987 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25988             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25989 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25990             BOOT_JDK_FOUND=no
25991           else
25992             # We're done! :-)
25993             BOOT_JDK_FOUND=yes
25994 
25995   # Only process if variable expands to non-empty
25996 
25997   if test "x$BOOT_JDK" != x; then
25998     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25999 
26000   # Input might be given as Windows format, start by converting to
26001   # unix format.
26002   path="$BOOT_JDK"
26003   new_path=`$CYGPATH -u "$path"`
26004 
26005   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26006   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26007   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26008   # "foo.exe" is OK but "foo" is an error.
26009   #
26010   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26011   # It is also a way to make sure we got the proper file name for the real test later on.
26012   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26013   if test "x$test_shortpath" = x; then
26014     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26015 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26016     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26017   fi
26018 
26019   # Call helper function which possibly converts this using DOS-style short mode.
26020   # If so, the updated path is stored in $new_path.
26021 
26022   input_path="$new_path"
26023   # Check if we need to convert this using DOS-style short mode. If the path
26024   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26025   # take no chances and rewrite it.
26026   # Note: m4 eats our [], so we need to use [ and ] instead.
26027   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26028   if test "x$has_forbidden_chars" != x; then
26029     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26030     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26031     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26032     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26033       # Going to short mode and back again did indeed matter. Since short mode is
26034       # case insensitive, let's make it lowercase to improve readability.
26035       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26036       # Now convert it back to Unix-style (cygpath)
26037       input_path=`$CYGPATH -u "$shortmode_path"`
26038       new_path="$input_path"
26039     fi
26040   fi
26041 
26042   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26043   if test "x$test_cygdrive_prefix" = x; then
26044     # As a simple fix, exclude /usr/bin since it's not a real path.
26045     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26046       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26047       # a path prefixed by /cygdrive for fixpath to work.
26048       new_path="$CYGWIN_ROOT_PATH$input_path"
26049     fi
26050   fi
26051 
26052 
26053   if test "x$path" != "x$new_path"; then
26054     BOOT_JDK="$new_path"
26055     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26056 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26057   fi
26058 
26059     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26060 
26061   path="$BOOT_JDK"
26062   has_colon=`$ECHO $path | $GREP ^.:`
26063   new_path="$path"
26064   if test "x$has_colon" = x; then
26065     # Not in mixed or Windows style, start by that.
26066     new_path=`cmd //c echo $path`
26067   fi
26068 
26069 
26070   input_path="$new_path"
26071   # Check if we need to convert this using DOS-style short mode. If the path
26072   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26073   # take no chances and rewrite it.
26074   # Note: m4 eats our [], so we need to use [ and ] instead.
26075   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26076   if test "x$has_forbidden_chars" != x; then
26077     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26078     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26079   fi
26080 
26081 
26082   windows_path="$new_path"
26083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26084     unix_path=`$CYGPATH -u "$windows_path"`
26085     new_path="$unix_path"
26086   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26087     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26088     new_path="$unix_path"
26089   fi
26090 
26091   if test "x$path" != "x$new_path"; then
26092     BOOT_JDK="$new_path"
26093     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26094 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26095   fi
26096 
26097   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26098   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26099 
26100     else
26101       # We're on a unix platform. Hooray! :)
26102       path="$BOOT_JDK"
26103       has_space=`$ECHO "$path" | $GREP " "`
26104       if test "x$has_space" != x; then
26105         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26106 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26107         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26108       fi
26109 
26110       # Use eval to expand a potential ~
26111       eval path="$path"
26112       if test ! -f "$path" && test ! -d "$path"; then
26113         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26114       fi
26115 
26116       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26117     fi
26118   fi
26119 
26120             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26121 $as_echo_n "checking for Boot JDK... " >&6; }
26122             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26123 $as_echo "$BOOT_JDK" >&6; }
26124             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26125 $as_echo_n "checking Boot JDK version... " >&6; }
26126             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26127             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26128 $as_echo "$BOOT_JDK_VERSION" >&6; }
26129           fi # end check jdk version
26130         fi # end check javac
26131       fi # end check java
26132     fi # end check boot jdk found
26133   fi
26134 
26135 
26136   if test "x$BOOT_JDK_FOUND" = xno; then
26137     # Now execute the test
26138 
26139   if test "x$ProgramFiles" != x; then
26140     VIRTUAL_DIR="$ProgramFiles/Java"
26141 
26142   windows_path="$VIRTUAL_DIR"
26143   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26144     unix_path=`$CYGPATH -u "$windows_path"`
26145     VIRTUAL_DIR="$unix_path"
26146   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26147     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26148     VIRTUAL_DIR="$unix_path"
26149   fi
26150 
26151 
26152   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26153   BOOT_JDK_SUFFIX=""
26154   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26155   if test "x$ALL_JDKS_FOUND" != x; then
26156     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26157 
26158   if test "x$BOOT_JDK_FOUND" = xno; then
26159     # Now execute the test
26160 
26161         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26162         if test -d "$BOOT_JDK"; then
26163           BOOT_JDK_FOUND=maybe
26164           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26165 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26166         fi
26167 
26168 
26169     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26170     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26171       # Do we have a bin/java?
26172       if test ! -x "$BOOT_JDK/bin/java"; then
26173         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26174 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26175         BOOT_JDK_FOUND=no
26176       else
26177         # Do we have a bin/javac?
26178         if test ! -x "$BOOT_JDK/bin/javac"; then
26179           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26180 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26181           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26182 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26183           BOOT_JDK_FOUND=no
26184         else
26185           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26186           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26187 
26188           # Extra M4 quote needed to protect [] in grep expression.
26189           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26190           if test "x$FOUND_CORRECT_VERSION" = x; then
26191             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26192 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26193             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26194 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26195             BOOT_JDK_FOUND=no
26196           else
26197             # We're done! :-)
26198             BOOT_JDK_FOUND=yes
26199 
26200   # Only process if variable expands to non-empty
26201 
26202   if test "x$BOOT_JDK" != x; then
26203     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26204 
26205   # Input might be given as Windows format, start by converting to
26206   # unix format.
26207   path="$BOOT_JDK"
26208   new_path=`$CYGPATH -u "$path"`
26209 
26210   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26211   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26212   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26213   # "foo.exe" is OK but "foo" is an error.
26214   #
26215   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26216   # It is also a way to make sure we got the proper file name for the real test later on.
26217   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26218   if test "x$test_shortpath" = x; then
26219     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26220 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26221     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26222   fi
26223 
26224   # Call helper function which possibly converts this using DOS-style short mode.
26225   # If so, the updated path is stored in $new_path.
26226 
26227   input_path="$new_path"
26228   # Check if we need to convert this using DOS-style short mode. If the path
26229   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26230   # take no chances and rewrite it.
26231   # Note: m4 eats our [], so we need to use [ and ] instead.
26232   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26233   if test "x$has_forbidden_chars" != x; then
26234     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26235     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26236     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26237     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26238       # Going to short mode and back again did indeed matter. Since short mode is
26239       # case insensitive, let's make it lowercase to improve readability.
26240       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26241       # Now convert it back to Unix-style (cygpath)
26242       input_path=`$CYGPATH -u "$shortmode_path"`
26243       new_path="$input_path"
26244     fi
26245   fi
26246 
26247   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26248   if test "x$test_cygdrive_prefix" = x; then
26249     # As a simple fix, exclude /usr/bin since it's not a real path.
26250     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26251       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26252       # a path prefixed by /cygdrive for fixpath to work.
26253       new_path="$CYGWIN_ROOT_PATH$input_path"
26254     fi
26255   fi
26256 
26257 
26258   if test "x$path" != "x$new_path"; then
26259     BOOT_JDK="$new_path"
26260     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26261 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26262   fi
26263 
26264     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26265 
26266   path="$BOOT_JDK"
26267   has_colon=`$ECHO $path | $GREP ^.:`
26268   new_path="$path"
26269   if test "x$has_colon" = x; then
26270     # Not in mixed or Windows style, start by that.
26271     new_path=`cmd //c echo $path`
26272   fi
26273 
26274 
26275   input_path="$new_path"
26276   # Check if we need to convert this using DOS-style short mode. If the path
26277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26278   # take no chances and rewrite it.
26279   # Note: m4 eats our [], so we need to use [ and ] instead.
26280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26281   if test "x$has_forbidden_chars" != x; then
26282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26283     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26284   fi
26285 
26286 
26287   windows_path="$new_path"
26288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26289     unix_path=`$CYGPATH -u "$windows_path"`
26290     new_path="$unix_path"
26291   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26292     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26293     new_path="$unix_path"
26294   fi
26295 
26296   if test "x$path" != "x$new_path"; then
26297     BOOT_JDK="$new_path"
26298     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26299 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26300   fi
26301 
26302   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26303   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26304 
26305     else
26306       # We're on a unix platform. Hooray! :)
26307       path="$BOOT_JDK"
26308       has_space=`$ECHO "$path" | $GREP " "`
26309       if test "x$has_space" != x; then
26310         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26311 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26312         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26313       fi
26314 
26315       # Use eval to expand a potential ~
26316       eval path="$path"
26317       if test ! -f "$path" && test ! -d "$path"; then
26318         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26319       fi
26320 
26321       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26322     fi
26323   fi
26324 
26325             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26326 $as_echo_n "checking for Boot JDK... " >&6; }
26327             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26328 $as_echo "$BOOT_JDK" >&6; }
26329             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26330 $as_echo_n "checking Boot JDK version... " >&6; }
26331             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26332             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26333 $as_echo "$BOOT_JDK_VERSION" >&6; }
26334           fi # end check jdk version
26335         fi # end check javac
26336       fi # end check java
26337     fi # end check boot jdk found
26338   fi
26339 
26340     done
26341   fi
26342 
26343   fi
26344 
26345 
26346     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26347     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26348       # Do we have a bin/java?
26349       if test ! -x "$BOOT_JDK/bin/java"; then
26350         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26351 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26352         BOOT_JDK_FOUND=no
26353       else
26354         # Do we have a bin/javac?
26355         if test ! -x "$BOOT_JDK/bin/javac"; then
26356           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26357 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26358           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26359 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26360           BOOT_JDK_FOUND=no
26361         else
26362           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26363           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26364 
26365           # Extra M4 quote needed to protect [] in grep expression.
26366           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26367           if test "x$FOUND_CORRECT_VERSION" = x; then
26368             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26369 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26370             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26371 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26372             BOOT_JDK_FOUND=no
26373           else
26374             # We're done! :-)
26375             BOOT_JDK_FOUND=yes
26376 
26377   # Only process if variable expands to non-empty
26378 
26379   if test "x$BOOT_JDK" != x; then
26380     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26381 
26382   # Input might be given as Windows format, start by converting to
26383   # unix format.
26384   path="$BOOT_JDK"
26385   new_path=`$CYGPATH -u "$path"`
26386 
26387   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26388   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26389   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26390   # "foo.exe" is OK but "foo" is an error.
26391   #
26392   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26393   # It is also a way to make sure we got the proper file name for the real test later on.
26394   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26395   if test "x$test_shortpath" = x; then
26396     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26397 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26398     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26399   fi
26400 
26401   # Call helper function which possibly converts this using DOS-style short mode.
26402   # If so, the updated path is stored in $new_path.
26403 
26404   input_path="$new_path"
26405   # Check if we need to convert this using DOS-style short mode. If the path
26406   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26407   # take no chances and rewrite it.
26408   # Note: m4 eats our [], so we need to use [ and ] instead.
26409   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26410   if test "x$has_forbidden_chars" != x; then
26411     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26412     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26413     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26414     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26415       # Going to short mode and back again did indeed matter. Since short mode is
26416       # case insensitive, let's make it lowercase to improve readability.
26417       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26418       # Now convert it back to Unix-style (cygpath)
26419       input_path=`$CYGPATH -u "$shortmode_path"`
26420       new_path="$input_path"
26421     fi
26422   fi
26423 
26424   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26425   if test "x$test_cygdrive_prefix" = x; then
26426     # As a simple fix, exclude /usr/bin since it's not a real path.
26427     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26428       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26429       # a path prefixed by /cygdrive for fixpath to work.
26430       new_path="$CYGWIN_ROOT_PATH$input_path"
26431     fi
26432   fi
26433 
26434 
26435   if test "x$path" != "x$new_path"; then
26436     BOOT_JDK="$new_path"
26437     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26438 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26439   fi
26440 
26441     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26442 
26443   path="$BOOT_JDK"
26444   has_colon=`$ECHO $path | $GREP ^.:`
26445   new_path="$path"
26446   if test "x$has_colon" = x; then
26447     # Not in mixed or Windows style, start by that.
26448     new_path=`cmd //c echo $path`
26449   fi
26450 
26451 
26452   input_path="$new_path"
26453   # Check if we need to convert this using DOS-style short mode. If the path
26454   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26455   # take no chances and rewrite it.
26456   # Note: m4 eats our [], so we need to use [ and ] instead.
26457   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26458   if test "x$has_forbidden_chars" != x; then
26459     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26460     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26461   fi
26462 
26463 
26464   windows_path="$new_path"
26465   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26466     unix_path=`$CYGPATH -u "$windows_path"`
26467     new_path="$unix_path"
26468   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26469     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26470     new_path="$unix_path"
26471   fi
26472 
26473   if test "x$path" != "x$new_path"; then
26474     BOOT_JDK="$new_path"
26475     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26476 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26477   fi
26478 
26479   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26480   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26481 
26482     else
26483       # We're on a unix platform. Hooray! :)
26484       path="$BOOT_JDK"
26485       has_space=`$ECHO "$path" | $GREP " "`
26486       if test "x$has_space" != x; then
26487         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26488 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26489         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26490       fi
26491 
26492       # Use eval to expand a potential ~
26493       eval path="$path"
26494       if test ! -f "$path" && test ! -d "$path"; then
26495         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26496       fi
26497 
26498       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26499     fi
26500   fi
26501 
26502             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26503 $as_echo_n "checking for Boot JDK... " >&6; }
26504             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26505 $as_echo "$BOOT_JDK" >&6; }
26506             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26507 $as_echo_n "checking Boot JDK version... " >&6; }
26508             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26509             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26510 $as_echo "$BOOT_JDK_VERSION" >&6; }
26511           fi # end check jdk version
26512         fi # end check javac
26513       fi # end check java
26514     fi # end check boot jdk found
26515   fi
26516 
26517 
26518   if test "x$BOOT_JDK_FOUND" = xno; then
26519     # Now execute the test
26520 
26521   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
26522   BOOT_JDK_SUFFIX=""
26523   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26524   if test "x$ALL_JDKS_FOUND" != x; then
26525     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26526 
26527   if test "x$BOOT_JDK_FOUND" = xno; then
26528     # Now execute the test
26529 
26530         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26531         if test -d "$BOOT_JDK"; then
26532           BOOT_JDK_FOUND=maybe
26533           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26534 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26535         fi
26536 
26537 
26538     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26539     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26540       # Do we have a bin/java?
26541       if test ! -x "$BOOT_JDK/bin/java"; then
26542         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26543 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26544         BOOT_JDK_FOUND=no
26545       else
26546         # Do we have a bin/javac?
26547         if test ! -x "$BOOT_JDK/bin/javac"; then
26548           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26549 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26550           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26551 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26552           BOOT_JDK_FOUND=no
26553         else
26554           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26555           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26556 
26557           # Extra M4 quote needed to protect [] in grep expression.
26558           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26559           if test "x$FOUND_CORRECT_VERSION" = x; then
26560             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26561 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26562             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26563 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26564             BOOT_JDK_FOUND=no
26565           else
26566             # We're done! :-)
26567             BOOT_JDK_FOUND=yes
26568 
26569   # Only process if variable expands to non-empty
26570 
26571   if test "x$BOOT_JDK" != x; then
26572     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26573 
26574   # Input might be given as Windows format, start by converting to
26575   # unix format.
26576   path="$BOOT_JDK"
26577   new_path=`$CYGPATH -u "$path"`
26578 
26579   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26580   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26581   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26582   # "foo.exe" is OK but "foo" is an error.
26583   #
26584   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26585   # It is also a way to make sure we got the proper file name for the real test later on.
26586   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26587   if test "x$test_shortpath" = x; then
26588     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26589 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26590     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26591   fi
26592 
26593   # Call helper function which possibly converts this using DOS-style short mode.
26594   # If so, the updated path is stored in $new_path.
26595 
26596   input_path="$new_path"
26597   # Check if we need to convert this using DOS-style short mode. If the path
26598   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26599   # take no chances and rewrite it.
26600   # Note: m4 eats our [], so we need to use [ and ] instead.
26601   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26602   if test "x$has_forbidden_chars" != x; then
26603     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26604     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26605     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26606     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26607       # Going to short mode and back again did indeed matter. Since short mode is
26608       # case insensitive, let's make it lowercase to improve readability.
26609       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26610       # Now convert it back to Unix-style (cygpath)
26611       input_path=`$CYGPATH -u "$shortmode_path"`
26612       new_path="$input_path"
26613     fi
26614   fi
26615 
26616   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26617   if test "x$test_cygdrive_prefix" = x; then
26618     # As a simple fix, exclude /usr/bin since it's not a real path.
26619     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26620       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26621       # a path prefixed by /cygdrive for fixpath to work.
26622       new_path="$CYGWIN_ROOT_PATH$input_path"
26623     fi
26624   fi
26625 
26626 
26627   if test "x$path" != "x$new_path"; then
26628     BOOT_JDK="$new_path"
26629     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26630 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26631   fi
26632 
26633     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26634 
26635   path="$BOOT_JDK"
26636   has_colon=`$ECHO $path | $GREP ^.:`
26637   new_path="$path"
26638   if test "x$has_colon" = x; then
26639     # Not in mixed or Windows style, start by that.
26640     new_path=`cmd //c echo $path`
26641   fi
26642 
26643 
26644   input_path="$new_path"
26645   # Check if we need to convert this using DOS-style short mode. If the path
26646   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26647   # take no chances and rewrite it.
26648   # Note: m4 eats our [], so we need to use [ and ] instead.
26649   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26650   if test "x$has_forbidden_chars" != x; then
26651     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26652     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26653   fi
26654 
26655 
26656   windows_path="$new_path"
26657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26658     unix_path=`$CYGPATH -u "$windows_path"`
26659     new_path="$unix_path"
26660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26661     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26662     new_path="$unix_path"
26663   fi
26664 
26665   if test "x$path" != "x$new_path"; then
26666     BOOT_JDK="$new_path"
26667     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26668 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26669   fi
26670 
26671   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26672   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26673 
26674     else
26675       # We're on a unix platform. Hooray! :)
26676       path="$BOOT_JDK"
26677       has_space=`$ECHO "$path" | $GREP " "`
26678       if test "x$has_space" != x; then
26679         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26680 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26681         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26682       fi
26683 
26684       # Use eval to expand a potential ~
26685       eval path="$path"
26686       if test ! -f "$path" && test ! -d "$path"; then
26687         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26688       fi
26689 
26690       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26691     fi
26692   fi
26693 
26694             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26695 $as_echo_n "checking for Boot JDK... " >&6; }
26696             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26697 $as_echo "$BOOT_JDK" >&6; }
26698             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26699 $as_echo_n "checking Boot JDK version... " >&6; }
26700             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26701             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26702 $as_echo "$BOOT_JDK_VERSION" >&6; }
26703           fi # end check jdk version
26704         fi # end check javac
26705       fi # end check java
26706     fi # end check boot jdk found
26707   fi
26708 
26709     done
26710   fi
26711 
26712 
26713     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26714     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26715       # Do we have a bin/java?
26716       if test ! -x "$BOOT_JDK/bin/java"; then
26717         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26718 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26719         BOOT_JDK_FOUND=no
26720       else
26721         # Do we have a bin/javac?
26722         if test ! -x "$BOOT_JDK/bin/javac"; then
26723           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26724 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26725           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26726 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26727           BOOT_JDK_FOUND=no
26728         else
26729           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26730           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26731 
26732           # Extra M4 quote needed to protect [] in grep expression.
26733           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26734           if test "x$FOUND_CORRECT_VERSION" = x; then
26735             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26736 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26737             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26738 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26739             BOOT_JDK_FOUND=no
26740           else
26741             # We're done! :-)
26742             BOOT_JDK_FOUND=yes
26743 
26744   # Only process if variable expands to non-empty
26745 
26746   if test "x$BOOT_JDK" != x; then
26747     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26748 
26749   # Input might be given as Windows format, start by converting to
26750   # unix format.
26751   path="$BOOT_JDK"
26752   new_path=`$CYGPATH -u "$path"`
26753 
26754   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26755   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26756   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26757   # "foo.exe" is OK but "foo" is an error.
26758   #
26759   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26760   # It is also a way to make sure we got the proper file name for the real test later on.
26761   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26762   if test "x$test_shortpath" = x; then
26763     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26764 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26765     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26766   fi
26767 
26768   # Call helper function which possibly converts this using DOS-style short mode.
26769   # If so, the updated path is stored in $new_path.
26770 
26771   input_path="$new_path"
26772   # Check if we need to convert this using DOS-style short mode. If the path
26773   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26774   # take no chances and rewrite it.
26775   # Note: m4 eats our [], so we need to use [ and ] instead.
26776   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26777   if test "x$has_forbidden_chars" != x; then
26778     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26779     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26780     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26781     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26782       # Going to short mode and back again did indeed matter. Since short mode is
26783       # case insensitive, let's make it lowercase to improve readability.
26784       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26785       # Now convert it back to Unix-style (cygpath)
26786       input_path=`$CYGPATH -u "$shortmode_path"`
26787       new_path="$input_path"
26788     fi
26789   fi
26790 
26791   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26792   if test "x$test_cygdrive_prefix" = x; then
26793     # As a simple fix, exclude /usr/bin since it's not a real path.
26794     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26795       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26796       # a path prefixed by /cygdrive for fixpath to work.
26797       new_path="$CYGWIN_ROOT_PATH$input_path"
26798     fi
26799   fi
26800 
26801 
26802   if test "x$path" != "x$new_path"; then
26803     BOOT_JDK="$new_path"
26804     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26805 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26806   fi
26807 
26808     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26809 
26810   path="$BOOT_JDK"
26811   has_colon=`$ECHO $path | $GREP ^.:`
26812   new_path="$path"
26813   if test "x$has_colon" = x; then
26814     # Not in mixed or Windows style, start by that.
26815     new_path=`cmd //c echo $path`
26816   fi
26817 
26818 
26819   input_path="$new_path"
26820   # Check if we need to convert this using DOS-style short mode. If the path
26821   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26822   # take no chances and rewrite it.
26823   # Note: m4 eats our [], so we need to use [ and ] instead.
26824   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26825   if test "x$has_forbidden_chars" != x; then
26826     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26827     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26828   fi
26829 
26830 
26831   windows_path="$new_path"
26832   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26833     unix_path=`$CYGPATH -u "$windows_path"`
26834     new_path="$unix_path"
26835   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26836     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26837     new_path="$unix_path"
26838   fi
26839 
26840   if test "x$path" != "x$new_path"; then
26841     BOOT_JDK="$new_path"
26842     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26843 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26844   fi
26845 
26846   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26847   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26848 
26849     else
26850       # We're on a unix platform. Hooray! :)
26851       path="$BOOT_JDK"
26852       has_space=`$ECHO "$path" | $GREP " "`
26853       if test "x$has_space" != x; then
26854         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26855 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26856         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26857       fi
26858 
26859       # Use eval to expand a potential ~
26860       eval path="$path"
26861       if test ! -f "$path" && test ! -d "$path"; then
26862         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26863       fi
26864 
26865       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26866     fi
26867   fi
26868 
26869             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26870 $as_echo_n "checking for Boot JDK... " >&6; }
26871             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26872 $as_echo "$BOOT_JDK" >&6; }
26873             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26874 $as_echo_n "checking Boot JDK version... " >&6; }
26875             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26876             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26877 $as_echo "$BOOT_JDK_VERSION" >&6; }
26878           fi # end check jdk version
26879         fi # end check javac
26880       fi # end check java
26881     fi # end check boot jdk found
26882   fi
26883 
26884   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
26885 
26886   if test "x$BOOT_JDK_FOUND" = xno; then
26887     # Now execute the test
26888 
26889   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
26890   BOOT_JDK_SUFFIX="/Contents/Home"
26891   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26892   if test "x$ALL_JDKS_FOUND" != x; then
26893     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26894 
26895   if test "x$BOOT_JDK_FOUND" = xno; then
26896     # Now execute the test
26897 
26898         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26899         if test -d "$BOOT_JDK"; then
26900           BOOT_JDK_FOUND=maybe
26901           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26902 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26903         fi
26904 
26905 
26906     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26907     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26908       # Do we have a bin/java?
26909       if test ! -x "$BOOT_JDK/bin/java"; then
26910         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26911 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26912         BOOT_JDK_FOUND=no
26913       else
26914         # Do we have a bin/javac?
26915         if test ! -x "$BOOT_JDK/bin/javac"; then
26916           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26917 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26918           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26919 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26920           BOOT_JDK_FOUND=no
26921         else
26922           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26923           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26924 
26925           # Extra M4 quote needed to protect [] in grep expression.
26926           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26927           if test "x$FOUND_CORRECT_VERSION" = x; then
26928             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26929 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26930             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26931 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26932             BOOT_JDK_FOUND=no
26933           else
26934             # We're done! :-)
26935             BOOT_JDK_FOUND=yes
26936 
26937   # Only process if variable expands to non-empty
26938 
26939   if test "x$BOOT_JDK" != x; then
26940     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26941 
26942   # Input might be given as Windows format, start by converting to
26943   # unix format.
26944   path="$BOOT_JDK"
26945   new_path=`$CYGPATH -u "$path"`
26946 
26947   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26948   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26949   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26950   # "foo.exe" is OK but "foo" is an error.
26951   #
26952   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26953   # It is also a way to make sure we got the proper file name for the real test later on.
26954   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26955   if test "x$test_shortpath" = x; then
26956     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26957 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26958     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26959   fi
26960 
26961   # Call helper function which possibly converts this using DOS-style short mode.
26962   # If so, the updated path is stored in $new_path.
26963 
26964   input_path="$new_path"
26965   # Check if we need to convert this using DOS-style short mode. If the path
26966   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26967   # take no chances and rewrite it.
26968   # Note: m4 eats our [], so we need to use [ and ] instead.
26969   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26970   if test "x$has_forbidden_chars" != x; then
26971     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26972     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26973     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26974     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26975       # Going to short mode and back again did indeed matter. Since short mode is
26976       # case insensitive, let's make it lowercase to improve readability.
26977       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26978       # Now convert it back to Unix-style (cygpath)
26979       input_path=`$CYGPATH -u "$shortmode_path"`
26980       new_path="$input_path"
26981     fi
26982   fi
26983 
26984   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26985   if test "x$test_cygdrive_prefix" = x; then
26986     # As a simple fix, exclude /usr/bin since it's not a real path.
26987     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26988       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26989       # a path prefixed by /cygdrive for fixpath to work.
26990       new_path="$CYGWIN_ROOT_PATH$input_path"
26991     fi
26992   fi
26993 
26994 
26995   if test "x$path" != "x$new_path"; then
26996     BOOT_JDK="$new_path"
26997     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26998 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26999   fi
27000 
27001     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27002 
27003   path="$BOOT_JDK"
27004   has_colon=`$ECHO $path | $GREP ^.:`
27005   new_path="$path"
27006   if test "x$has_colon" = x; then
27007     # Not in mixed or Windows style, start by that.
27008     new_path=`cmd //c echo $path`
27009   fi
27010 
27011 
27012   input_path="$new_path"
27013   # Check if we need to convert this using DOS-style short mode. If the path
27014   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27015   # take no chances and rewrite it.
27016   # Note: m4 eats our [], so we need to use [ and ] instead.
27017   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27018   if test "x$has_forbidden_chars" != x; then
27019     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27020     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27021   fi
27022 
27023 
27024   windows_path="$new_path"
27025   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27026     unix_path=`$CYGPATH -u "$windows_path"`
27027     new_path="$unix_path"
27028   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27029     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27030     new_path="$unix_path"
27031   fi
27032 
27033   if test "x$path" != "x$new_path"; then
27034     BOOT_JDK="$new_path"
27035     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27036 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27037   fi
27038 
27039   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27040   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27041 
27042     else
27043       # We're on a unix platform. Hooray! :)
27044       path="$BOOT_JDK"
27045       has_space=`$ECHO "$path" | $GREP " "`
27046       if test "x$has_space" != x; then
27047         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27048 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27049         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27050       fi
27051 
27052       # Use eval to expand a potential ~
27053       eval path="$path"
27054       if test ! -f "$path" && test ! -d "$path"; then
27055         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27056       fi
27057 
27058       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27059     fi
27060   fi
27061 
27062             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27063 $as_echo_n "checking for Boot JDK... " >&6; }
27064             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27065 $as_echo "$BOOT_JDK" >&6; }
27066             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27067 $as_echo_n "checking Boot JDK version... " >&6; }
27068             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27069             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27070 $as_echo "$BOOT_JDK_VERSION" >&6; }
27071           fi # end check jdk version
27072         fi # end check javac
27073       fi # end check java
27074     fi # end check boot jdk found
27075   fi
27076 
27077     done
27078   fi
27079 
27080 
27081     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27082     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27083       # Do we have a bin/java?
27084       if test ! -x "$BOOT_JDK/bin/java"; then
27085         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27086 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27087         BOOT_JDK_FOUND=no
27088       else
27089         # Do we have a bin/javac?
27090         if test ! -x "$BOOT_JDK/bin/javac"; then
27091           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27092 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27093           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27094 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27095           BOOT_JDK_FOUND=no
27096         else
27097           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27098           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27099 
27100           # Extra M4 quote needed to protect [] in grep expression.
27101           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27102           if test "x$FOUND_CORRECT_VERSION" = x; then
27103             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27104 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27105             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27106 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27107             BOOT_JDK_FOUND=no
27108           else
27109             # We're done! :-)
27110             BOOT_JDK_FOUND=yes
27111 
27112   # Only process if variable expands to non-empty
27113 
27114   if test "x$BOOT_JDK" != x; then
27115     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27116 
27117   # Input might be given as Windows format, start by converting to
27118   # unix format.
27119   path="$BOOT_JDK"
27120   new_path=`$CYGPATH -u "$path"`
27121 
27122   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27123   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27124   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27125   # "foo.exe" is OK but "foo" is an error.
27126   #
27127   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27128   # It is also a way to make sure we got the proper file name for the real test later on.
27129   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27130   if test "x$test_shortpath" = x; then
27131     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27132 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27133     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27134   fi
27135 
27136   # Call helper function which possibly converts this using DOS-style short mode.
27137   # If so, the updated path is stored in $new_path.
27138 
27139   input_path="$new_path"
27140   # Check if we need to convert this using DOS-style short mode. If the path
27141   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27142   # take no chances and rewrite it.
27143   # Note: m4 eats our [], so we need to use [ and ] instead.
27144   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27145   if test "x$has_forbidden_chars" != x; then
27146     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27147     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27148     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27149     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27150       # Going to short mode and back again did indeed matter. Since short mode is
27151       # case insensitive, let's make it lowercase to improve readability.
27152       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27153       # Now convert it back to Unix-style (cygpath)
27154       input_path=`$CYGPATH -u "$shortmode_path"`
27155       new_path="$input_path"
27156     fi
27157   fi
27158 
27159   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27160   if test "x$test_cygdrive_prefix" = x; then
27161     # As a simple fix, exclude /usr/bin since it's not a real path.
27162     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27163       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27164       # a path prefixed by /cygdrive for fixpath to work.
27165       new_path="$CYGWIN_ROOT_PATH$input_path"
27166     fi
27167   fi
27168 
27169 
27170   if test "x$path" != "x$new_path"; then
27171     BOOT_JDK="$new_path"
27172     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27173 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27174   fi
27175 
27176     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27177 
27178   path="$BOOT_JDK"
27179   has_colon=`$ECHO $path | $GREP ^.:`
27180   new_path="$path"
27181   if test "x$has_colon" = x; then
27182     # Not in mixed or Windows style, start by that.
27183     new_path=`cmd //c echo $path`
27184   fi
27185 
27186 
27187   input_path="$new_path"
27188   # Check if we need to convert this using DOS-style short mode. If the path
27189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27190   # take no chances and rewrite it.
27191   # Note: m4 eats our [], so we need to use [ and ] instead.
27192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27193   if test "x$has_forbidden_chars" != x; then
27194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27195     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27196   fi
27197 
27198 
27199   windows_path="$new_path"
27200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27201     unix_path=`$CYGPATH -u "$windows_path"`
27202     new_path="$unix_path"
27203   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27204     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27205     new_path="$unix_path"
27206   fi
27207 
27208   if test "x$path" != "x$new_path"; then
27209     BOOT_JDK="$new_path"
27210     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27211 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27212   fi
27213 
27214   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27215   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27216 
27217     else
27218       # We're on a unix platform. Hooray! :)
27219       path="$BOOT_JDK"
27220       has_space=`$ECHO "$path" | $GREP " "`
27221       if test "x$has_space" != x; then
27222         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27223 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27224         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27225       fi
27226 
27227       # Use eval to expand a potential ~
27228       eval path="$path"
27229       if test ! -f "$path" && test ! -d "$path"; then
27230         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27231       fi
27232 
27233       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27234     fi
27235   fi
27236 
27237             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27238 $as_echo_n "checking for Boot JDK... " >&6; }
27239             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27240 $as_echo "$BOOT_JDK" >&6; }
27241             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27242 $as_echo_n "checking Boot JDK version... " >&6; }
27243             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27244             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27245 $as_echo "$BOOT_JDK_VERSION" >&6; }
27246           fi # end check jdk version
27247         fi # end check javac
27248       fi # end check java
27249     fi # end check boot jdk found
27250   fi
27251 
27252 
27253   if test "x$BOOT_JDK_FOUND" = xno; then
27254     # Now execute the test
27255 
27256   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27257   BOOT_JDK_SUFFIX="/Contents/Home"
27258   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27259   if test "x$ALL_JDKS_FOUND" != x; then
27260     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27261 
27262   if test "x$BOOT_JDK_FOUND" = xno; then
27263     # Now execute the test
27264 
27265         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27266         if test -d "$BOOT_JDK"; then
27267           BOOT_JDK_FOUND=maybe
27268           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27269 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27270         fi
27271 
27272 
27273     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27274     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27275       # Do we have a bin/java?
27276       if test ! -x "$BOOT_JDK/bin/java"; then
27277         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27278 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27279         BOOT_JDK_FOUND=no
27280       else
27281         # Do we have a bin/javac?
27282         if test ! -x "$BOOT_JDK/bin/javac"; then
27283           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27284 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27285           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27286 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27287           BOOT_JDK_FOUND=no
27288         else
27289           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27290           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27291 
27292           # Extra M4 quote needed to protect [] in grep expression.
27293           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27294           if test "x$FOUND_CORRECT_VERSION" = x; then
27295             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27296 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27297             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27298 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27299             BOOT_JDK_FOUND=no
27300           else
27301             # We're done! :-)
27302             BOOT_JDK_FOUND=yes
27303 
27304   # Only process if variable expands to non-empty
27305 
27306   if test "x$BOOT_JDK" != x; then
27307     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27308 
27309   # Input might be given as Windows format, start by converting to
27310   # unix format.
27311   path="$BOOT_JDK"
27312   new_path=`$CYGPATH -u "$path"`
27313 
27314   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27315   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27316   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27317   # "foo.exe" is OK but "foo" is an error.
27318   #
27319   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27320   # It is also a way to make sure we got the proper file name for the real test later on.
27321   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27322   if test "x$test_shortpath" = x; then
27323     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27324 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27325     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27326   fi
27327 
27328   # Call helper function which possibly converts this using DOS-style short mode.
27329   # If so, the updated path is stored in $new_path.
27330 
27331   input_path="$new_path"
27332   # Check if we need to convert this using DOS-style short mode. If the path
27333   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27334   # take no chances and rewrite it.
27335   # Note: m4 eats our [], so we need to use [ and ] instead.
27336   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27337   if test "x$has_forbidden_chars" != x; then
27338     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27339     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27340     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27341     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27342       # Going to short mode and back again did indeed matter. Since short mode is
27343       # case insensitive, let's make it lowercase to improve readability.
27344       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27345       # Now convert it back to Unix-style (cygpath)
27346       input_path=`$CYGPATH -u "$shortmode_path"`
27347       new_path="$input_path"
27348     fi
27349   fi
27350 
27351   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27352   if test "x$test_cygdrive_prefix" = x; then
27353     # As a simple fix, exclude /usr/bin since it's not a real path.
27354     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27355       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27356       # a path prefixed by /cygdrive for fixpath to work.
27357       new_path="$CYGWIN_ROOT_PATH$input_path"
27358     fi
27359   fi
27360 
27361 
27362   if test "x$path" != "x$new_path"; then
27363     BOOT_JDK="$new_path"
27364     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27365 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27366   fi
27367 
27368     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27369 
27370   path="$BOOT_JDK"
27371   has_colon=`$ECHO $path | $GREP ^.:`
27372   new_path="$path"
27373   if test "x$has_colon" = x; then
27374     # Not in mixed or Windows style, start by that.
27375     new_path=`cmd //c echo $path`
27376   fi
27377 
27378 
27379   input_path="$new_path"
27380   # Check if we need to convert this using DOS-style short mode. If the path
27381   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27382   # take no chances and rewrite it.
27383   # Note: m4 eats our [], so we need to use [ and ] instead.
27384   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27385   if test "x$has_forbidden_chars" != x; then
27386     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27387     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27388   fi
27389 
27390 
27391   windows_path="$new_path"
27392   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27393     unix_path=`$CYGPATH -u "$windows_path"`
27394     new_path="$unix_path"
27395   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27396     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27397     new_path="$unix_path"
27398   fi
27399 
27400   if test "x$path" != "x$new_path"; then
27401     BOOT_JDK="$new_path"
27402     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27403 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27404   fi
27405 
27406   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27407   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27408 
27409     else
27410       # We're on a unix platform. Hooray! :)
27411       path="$BOOT_JDK"
27412       has_space=`$ECHO "$path" | $GREP " "`
27413       if test "x$has_space" != x; then
27414         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27415 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27416         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27417       fi
27418 
27419       # Use eval to expand a potential ~
27420       eval path="$path"
27421       if test ! -f "$path" && test ! -d "$path"; then
27422         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27423       fi
27424 
27425       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27426     fi
27427   fi
27428 
27429             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27430 $as_echo_n "checking for Boot JDK... " >&6; }
27431             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27432 $as_echo "$BOOT_JDK" >&6; }
27433             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27434 $as_echo_n "checking Boot JDK version... " >&6; }
27435             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27436             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27437 $as_echo "$BOOT_JDK_VERSION" >&6; }
27438           fi # end check jdk version
27439         fi # end check javac
27440       fi # end check java
27441     fi # end check boot jdk found
27442   fi
27443 
27444     done
27445   fi
27446 
27447 
27448     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27449     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27450       # Do we have a bin/java?
27451       if test ! -x "$BOOT_JDK/bin/java"; then
27452         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27453 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27454         BOOT_JDK_FOUND=no
27455       else
27456         # Do we have a bin/javac?
27457         if test ! -x "$BOOT_JDK/bin/javac"; then
27458           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27459 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27460           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27461 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27462           BOOT_JDK_FOUND=no
27463         else
27464           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27465           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27466 
27467           # Extra M4 quote needed to protect [] in grep expression.
27468           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27469           if test "x$FOUND_CORRECT_VERSION" = x; then
27470             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27471 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27472             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27473 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27474             BOOT_JDK_FOUND=no
27475           else
27476             # We're done! :-)
27477             BOOT_JDK_FOUND=yes
27478 
27479   # Only process if variable expands to non-empty
27480 
27481   if test "x$BOOT_JDK" != x; then
27482     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27483 
27484   # Input might be given as Windows format, start by converting to
27485   # unix format.
27486   path="$BOOT_JDK"
27487   new_path=`$CYGPATH -u "$path"`
27488 
27489   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27490   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27491   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27492   # "foo.exe" is OK but "foo" is an error.
27493   #
27494   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27495   # It is also a way to make sure we got the proper file name for the real test later on.
27496   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27497   if test "x$test_shortpath" = x; then
27498     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27499 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27500     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27501   fi
27502 
27503   # Call helper function which possibly converts this using DOS-style short mode.
27504   # If so, the updated path is stored in $new_path.
27505 
27506   input_path="$new_path"
27507   # Check if we need to convert this using DOS-style short mode. If the path
27508   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27509   # take no chances and rewrite it.
27510   # Note: m4 eats our [], so we need to use [ and ] instead.
27511   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27512   if test "x$has_forbidden_chars" != x; then
27513     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27514     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27515     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27516     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27517       # Going to short mode and back again did indeed matter. Since short mode is
27518       # case insensitive, let's make it lowercase to improve readability.
27519       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27520       # Now convert it back to Unix-style (cygpath)
27521       input_path=`$CYGPATH -u "$shortmode_path"`
27522       new_path="$input_path"
27523     fi
27524   fi
27525 
27526   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27527   if test "x$test_cygdrive_prefix" = x; then
27528     # As a simple fix, exclude /usr/bin since it's not a real path.
27529     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27530       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27531       # a path prefixed by /cygdrive for fixpath to work.
27532       new_path="$CYGWIN_ROOT_PATH$input_path"
27533     fi
27534   fi
27535 
27536 
27537   if test "x$path" != "x$new_path"; then
27538     BOOT_JDK="$new_path"
27539     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27540 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27541   fi
27542 
27543     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27544 
27545   path="$BOOT_JDK"
27546   has_colon=`$ECHO $path | $GREP ^.:`
27547   new_path="$path"
27548   if test "x$has_colon" = x; then
27549     # Not in mixed or Windows style, start by that.
27550     new_path=`cmd //c echo $path`
27551   fi
27552 
27553 
27554   input_path="$new_path"
27555   # Check if we need to convert this using DOS-style short mode. If the path
27556   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27557   # take no chances and rewrite it.
27558   # Note: m4 eats our [], so we need to use [ and ] instead.
27559   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27560   if test "x$has_forbidden_chars" != x; then
27561     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27562     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27563   fi
27564 
27565 
27566   windows_path="$new_path"
27567   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27568     unix_path=`$CYGPATH -u "$windows_path"`
27569     new_path="$unix_path"
27570   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27571     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27572     new_path="$unix_path"
27573   fi
27574 
27575   if test "x$path" != "x$new_path"; then
27576     BOOT_JDK="$new_path"
27577     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27578 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27579   fi
27580 
27581   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27582   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27583 
27584     else
27585       # We're on a unix platform. Hooray! :)
27586       path="$BOOT_JDK"
27587       has_space=`$ECHO "$path" | $GREP " "`
27588       if test "x$has_space" != x; then
27589         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27590 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27591         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27592       fi
27593 
27594       # Use eval to expand a potential ~
27595       eval path="$path"
27596       if test ! -f "$path" && test ! -d "$path"; then
27597         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27598       fi
27599 
27600       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27601     fi
27602   fi
27603 
27604             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27605 $as_echo_n "checking for Boot JDK... " >&6; }
27606             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27607 $as_echo "$BOOT_JDK" >&6; }
27608             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27609 $as_echo_n "checking Boot JDK version... " >&6; }
27610             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27611             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27612 $as_echo "$BOOT_JDK_VERSION" >&6; }
27613           fi # end check jdk version
27614         fi # end check javac
27615       fi # end check java
27616     fi # end check boot jdk found
27617   fi
27618 
27619   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
27620 
27621   if test "x$BOOT_JDK_FOUND" = xno; then
27622     # Now execute the test
27623 
27624   BOOT_JDK_PREFIX="/usr/lib/jvm"
27625   BOOT_JDK_SUFFIX=""
27626   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27627   if test "x$ALL_JDKS_FOUND" != x; then
27628     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27629 
27630   if test "x$BOOT_JDK_FOUND" = xno; then
27631     # Now execute the test
27632 
27633         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27634         if test -d "$BOOT_JDK"; then
27635           BOOT_JDK_FOUND=maybe
27636           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27637 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27638         fi
27639 
27640 
27641     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27642     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27643       # Do we have a bin/java?
27644       if test ! -x "$BOOT_JDK/bin/java"; then
27645         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27646 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27647         BOOT_JDK_FOUND=no
27648       else
27649         # Do we have a bin/javac?
27650         if test ! -x "$BOOT_JDK/bin/javac"; then
27651           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27652 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27653           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27654 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27655           BOOT_JDK_FOUND=no
27656         else
27657           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27658           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27659 
27660           # Extra M4 quote needed to protect [] in grep expression.
27661           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27662           if test "x$FOUND_CORRECT_VERSION" = x; then
27663             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27664 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27665             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27666 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27667             BOOT_JDK_FOUND=no
27668           else
27669             # We're done! :-)
27670             BOOT_JDK_FOUND=yes
27671 
27672   # Only process if variable expands to non-empty
27673 
27674   if test "x$BOOT_JDK" != x; then
27675     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27676 
27677   # Input might be given as Windows format, start by converting to
27678   # unix format.
27679   path="$BOOT_JDK"
27680   new_path=`$CYGPATH -u "$path"`
27681 
27682   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27683   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27684   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27685   # "foo.exe" is OK but "foo" is an error.
27686   #
27687   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27688   # It is also a way to make sure we got the proper file name for the real test later on.
27689   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27690   if test "x$test_shortpath" = x; then
27691     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27692 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27693     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27694   fi
27695 
27696   # Call helper function which possibly converts this using DOS-style short mode.
27697   # If so, the updated path is stored in $new_path.
27698 
27699   input_path="$new_path"
27700   # Check if we need to convert this using DOS-style short mode. If the path
27701   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27702   # take no chances and rewrite it.
27703   # Note: m4 eats our [], so we need to use [ and ] instead.
27704   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27705   if test "x$has_forbidden_chars" != x; then
27706     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27707     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27708     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27709     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27710       # Going to short mode and back again did indeed matter. Since short mode is
27711       # case insensitive, let's make it lowercase to improve readability.
27712       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27713       # Now convert it back to Unix-style (cygpath)
27714       input_path=`$CYGPATH -u "$shortmode_path"`
27715       new_path="$input_path"
27716     fi
27717   fi
27718 
27719   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27720   if test "x$test_cygdrive_prefix" = x; then
27721     # As a simple fix, exclude /usr/bin since it's not a real path.
27722     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27723       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27724       # a path prefixed by /cygdrive for fixpath to work.
27725       new_path="$CYGWIN_ROOT_PATH$input_path"
27726     fi
27727   fi
27728 
27729 
27730   if test "x$path" != "x$new_path"; then
27731     BOOT_JDK="$new_path"
27732     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27733 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27734   fi
27735 
27736     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27737 
27738   path="$BOOT_JDK"
27739   has_colon=`$ECHO $path | $GREP ^.:`
27740   new_path="$path"
27741   if test "x$has_colon" = x; then
27742     # Not in mixed or Windows style, start by that.
27743     new_path=`cmd //c echo $path`
27744   fi
27745 
27746 
27747   input_path="$new_path"
27748   # Check if we need to convert this using DOS-style short mode. If the path
27749   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27750   # take no chances and rewrite it.
27751   # Note: m4 eats our [], so we need to use [ and ] instead.
27752   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27753   if test "x$has_forbidden_chars" != x; then
27754     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27755     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27756   fi
27757 
27758 
27759   windows_path="$new_path"
27760   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27761     unix_path=`$CYGPATH -u "$windows_path"`
27762     new_path="$unix_path"
27763   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27764     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27765     new_path="$unix_path"
27766   fi
27767 
27768   if test "x$path" != "x$new_path"; then
27769     BOOT_JDK="$new_path"
27770     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27771 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27772   fi
27773 
27774   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27775   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27776 
27777     else
27778       # We're on a unix platform. Hooray! :)
27779       path="$BOOT_JDK"
27780       has_space=`$ECHO "$path" | $GREP " "`
27781       if test "x$has_space" != x; then
27782         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27783 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27784         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27785       fi
27786 
27787       # Use eval to expand a potential ~
27788       eval path="$path"
27789       if test ! -f "$path" && test ! -d "$path"; then
27790         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27791       fi
27792 
27793       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27794     fi
27795   fi
27796 
27797             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27798 $as_echo_n "checking for Boot JDK... " >&6; }
27799             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27800 $as_echo "$BOOT_JDK" >&6; }
27801             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27802 $as_echo_n "checking Boot JDK version... " >&6; }
27803             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27804             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27805 $as_echo "$BOOT_JDK_VERSION" >&6; }
27806           fi # end check jdk version
27807         fi # end check javac
27808       fi # end check java
27809     fi # end check boot jdk found
27810   fi
27811 
27812     done
27813   fi
27814 
27815 
27816     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27817     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27818       # Do we have a bin/java?
27819       if test ! -x "$BOOT_JDK/bin/java"; then
27820         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27821 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27822         BOOT_JDK_FOUND=no
27823       else
27824         # Do we have a bin/javac?
27825         if test ! -x "$BOOT_JDK/bin/javac"; then
27826           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27827 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27828           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27829 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27830           BOOT_JDK_FOUND=no
27831         else
27832           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27833           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27834 
27835           # Extra M4 quote needed to protect [] in grep expression.
27836           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27837           if test "x$FOUND_CORRECT_VERSION" = x; then
27838             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27839 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27840             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27841 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27842             BOOT_JDK_FOUND=no
27843           else
27844             # We're done! :-)
27845             BOOT_JDK_FOUND=yes
27846 
27847   # Only process if variable expands to non-empty
27848 
27849   if test "x$BOOT_JDK" != x; then
27850     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27851 
27852   # Input might be given as Windows format, start by converting to
27853   # unix format.
27854   path="$BOOT_JDK"
27855   new_path=`$CYGPATH -u "$path"`
27856 
27857   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27858   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27859   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27860   # "foo.exe" is OK but "foo" is an error.
27861   #
27862   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27863   # It is also a way to make sure we got the proper file name for the real test later on.
27864   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27865   if test "x$test_shortpath" = x; then
27866     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27867 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27868     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27869   fi
27870 
27871   # Call helper function which possibly converts this using DOS-style short mode.
27872   # If so, the updated path is stored in $new_path.
27873 
27874   input_path="$new_path"
27875   # Check if we need to convert this using DOS-style short mode. If the path
27876   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27877   # take no chances and rewrite it.
27878   # Note: m4 eats our [], so we need to use [ and ] instead.
27879   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27880   if test "x$has_forbidden_chars" != x; then
27881     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27882     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27883     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27884     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27885       # Going to short mode and back again did indeed matter. Since short mode is
27886       # case insensitive, let's make it lowercase to improve readability.
27887       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27888       # Now convert it back to Unix-style (cygpath)
27889       input_path=`$CYGPATH -u "$shortmode_path"`
27890       new_path="$input_path"
27891     fi
27892   fi
27893 
27894   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27895   if test "x$test_cygdrive_prefix" = x; then
27896     # As a simple fix, exclude /usr/bin since it's not a real path.
27897     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27898       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27899       # a path prefixed by /cygdrive for fixpath to work.
27900       new_path="$CYGWIN_ROOT_PATH$input_path"
27901     fi
27902   fi
27903 
27904 
27905   if test "x$path" != "x$new_path"; then
27906     BOOT_JDK="$new_path"
27907     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27908 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27909   fi
27910 
27911     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27912 
27913   path="$BOOT_JDK"
27914   has_colon=`$ECHO $path | $GREP ^.:`
27915   new_path="$path"
27916   if test "x$has_colon" = x; then
27917     # Not in mixed or Windows style, start by that.
27918     new_path=`cmd //c echo $path`
27919   fi
27920 
27921 
27922   input_path="$new_path"
27923   # Check if we need to convert this using DOS-style short mode. If the path
27924   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27925   # take no chances and rewrite it.
27926   # Note: m4 eats our [], so we need to use [ and ] instead.
27927   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27928   if test "x$has_forbidden_chars" != x; then
27929     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27930     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27931   fi
27932 
27933 
27934   windows_path="$new_path"
27935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27936     unix_path=`$CYGPATH -u "$windows_path"`
27937     new_path="$unix_path"
27938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27939     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27940     new_path="$unix_path"
27941   fi
27942 
27943   if test "x$path" != "x$new_path"; then
27944     BOOT_JDK="$new_path"
27945     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27946 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27947   fi
27948 
27949   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27950   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27951 
27952     else
27953       # We're on a unix platform. Hooray! :)
27954       path="$BOOT_JDK"
27955       has_space=`$ECHO "$path" | $GREP " "`
27956       if test "x$has_space" != x; then
27957         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27958 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27959         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27960       fi
27961 
27962       # Use eval to expand a potential ~
27963       eval path="$path"
27964       if test ! -f "$path" && test ! -d "$path"; then
27965         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27966       fi
27967 
27968       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27969     fi
27970   fi
27971 
27972             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27973 $as_echo_n "checking for Boot JDK... " >&6; }
27974             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27975 $as_echo "$BOOT_JDK" >&6; }
27976             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27977 $as_echo_n "checking Boot JDK version... " >&6; }
27978             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27979             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27980 $as_echo "$BOOT_JDK_VERSION" >&6; }
27981           fi # end check jdk version
27982         fi # end check javac
27983       fi # end check java
27984     fi # end check boot jdk found
27985   fi
27986 
27987   fi
27988 
27989 
27990     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27991     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27992       # Do we have a bin/java?
27993       if test ! -x "$BOOT_JDK/bin/java"; then
27994         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27995 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27996         BOOT_JDK_FOUND=no
27997       else
27998         # Do we have a bin/javac?
27999         if test ! -x "$BOOT_JDK/bin/javac"; then
28000           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28001 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28002           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28003 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28004           BOOT_JDK_FOUND=no
28005         else
28006           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28007           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28008 
28009           # Extra M4 quote needed to protect [] in grep expression.
28010           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
28011           if test "x$FOUND_CORRECT_VERSION" = x; then
28012             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28013 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28014             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28015 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28016             BOOT_JDK_FOUND=no
28017           else
28018             # We're done! :-)
28019             BOOT_JDK_FOUND=yes
28020 
28021   # Only process if variable expands to non-empty
28022 
28023   if test "x$BOOT_JDK" != x; then
28024     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28025 
28026   # Input might be given as Windows format, start by converting to
28027   # unix format.
28028   path="$BOOT_JDK"
28029   new_path=`$CYGPATH -u "$path"`
28030 
28031   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28032   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28033   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28034   # "foo.exe" is OK but "foo" is an error.
28035   #
28036   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28037   # It is also a way to make sure we got the proper file name for the real test later on.
28038   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28039   if test "x$test_shortpath" = x; then
28040     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28041 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28042     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28043   fi
28044 
28045   # Call helper function which possibly converts this using DOS-style short mode.
28046   # If so, the updated path is stored in $new_path.
28047 
28048   input_path="$new_path"
28049   # Check if we need to convert this using DOS-style short mode. If the path
28050   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28051   # take no chances and rewrite it.
28052   # Note: m4 eats our [], so we need to use [ and ] instead.
28053   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28054   if test "x$has_forbidden_chars" != x; then
28055     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28056     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28057     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28058     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28059       # Going to short mode and back again did indeed matter. Since short mode is
28060       # case insensitive, let's make it lowercase to improve readability.
28061       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28062       # Now convert it back to Unix-style (cygpath)
28063       input_path=`$CYGPATH -u "$shortmode_path"`
28064       new_path="$input_path"
28065     fi
28066   fi
28067 
28068   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28069   if test "x$test_cygdrive_prefix" = x; then
28070     # As a simple fix, exclude /usr/bin since it's not a real path.
28071     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28072       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28073       # a path prefixed by /cygdrive for fixpath to work.
28074       new_path="$CYGWIN_ROOT_PATH$input_path"
28075     fi
28076   fi
28077 
28078 
28079   if test "x$path" != "x$new_path"; then
28080     BOOT_JDK="$new_path"
28081     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28082 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28083   fi
28084 
28085     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28086 
28087   path="$BOOT_JDK"
28088   has_colon=`$ECHO $path | $GREP ^.:`
28089   new_path="$path"
28090   if test "x$has_colon" = x; then
28091     # Not in mixed or Windows style, start by that.
28092     new_path=`cmd //c echo $path`
28093   fi
28094 
28095 
28096   input_path="$new_path"
28097   # Check if we need to convert this using DOS-style short mode. If the path
28098   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28099   # take no chances and rewrite it.
28100   # Note: m4 eats our [], so we need to use [ and ] instead.
28101   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28102   if test "x$has_forbidden_chars" != x; then
28103     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28104     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28105   fi
28106 
28107 
28108   windows_path="$new_path"
28109   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28110     unix_path=`$CYGPATH -u "$windows_path"`
28111     new_path="$unix_path"
28112   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28113     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28114     new_path="$unix_path"
28115   fi
28116 
28117   if test "x$path" != "x$new_path"; then
28118     BOOT_JDK="$new_path"
28119     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28120 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28121   fi
28122 
28123   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28124   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28125 
28126     else
28127       # We're on a unix platform. Hooray! :)
28128       path="$BOOT_JDK"
28129       has_space=`$ECHO "$path" | $GREP " "`
28130       if test "x$has_space" != x; then
28131         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28132 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28133         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28134       fi
28135 
28136       # Use eval to expand a potential ~
28137       eval path="$path"
28138       if test ! -f "$path" && test ! -d "$path"; then
28139         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28140       fi
28141 
28142       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28143     fi
28144   fi
28145 
28146             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28147 $as_echo_n "checking for Boot JDK... " >&6; }
28148             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28149 $as_echo "$BOOT_JDK" >&6; }
28150             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28151 $as_echo_n "checking Boot JDK version... " >&6; }
28152             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28153             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28154 $as_echo "$BOOT_JDK_VERSION" >&6; }
28155           fi # end check jdk version
28156         fi # end check javac
28157       fi # end check java
28158     fi # end check boot jdk found
28159   fi
28160 
28161 
28162   # If we haven't found anything yet, we've truly lost. Give up.
28163   if test "x$BOOT_JDK_FOUND" = xno; then
28164 
28165   # Print a helpful message on how to acquire the necessary build dependency.
28166   # openjdk is the help tag: freetype, cups, alsa etc
28167   MISSING_DEPENDENCY=openjdk
28168 
28169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28170     cygwin_help $MISSING_DEPENDENCY
28171   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28172     msys_help $MISSING_DEPENDENCY
28173   else
28174     PKGHANDLER_COMMAND=
28175 
28176     case $PKGHANDLER in
28177       apt-get)
28178         apt_help     $MISSING_DEPENDENCY ;;
28179       yum)
28180         yum_help     $MISSING_DEPENDENCY ;;
28181       port)
28182         port_help    $MISSING_DEPENDENCY ;;
28183       pkgutil)
28184         pkgutil_help $MISSING_DEPENDENCY ;;
28185       pkgadd)
28186         pkgadd_help  $MISSING_DEPENDENCY ;;
28187     esac
28188 
28189     if test "x$PKGHANDLER_COMMAND" != x; then
28190       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28191     fi
28192   fi
28193 
28194     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28195 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28196     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28197 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28198     as_fn_error $? "Cannot continue" "$LINENO" 5
28199   fi
28200 
28201 
28202 
28203   # Setup tools from the Boot JDK.
28204 
28205   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28206 
28207   # Publish this variable in the help.
28208 
28209 
28210   if [ -z "${JAVA+x}" ]; then
28211     # The variable is not set by user, try to locate tool using the code snippet
28212 
28213       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28214 $as_echo_n "checking for java in Boot JDK... " >&6; }
28215       JAVA=$BOOT_JDK/bin/java
28216       if test ! -x $JAVA; then
28217         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28218 $as_echo "not found" >&6; }
28219         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28220 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28221         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28222       fi
28223       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28224 $as_echo "ok" >&6; }
28225 
28226 
28227   else
28228     # The variable is set, but is it from the command line or the environment?
28229 
28230     # Try to remove the string !JAVA! from our list.
28231     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28232     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28233       # If it failed, the variable was not from the command line. Ignore it,
28234       # but warn the user (except for BASH, which is always set by the calling BASH).
28235       if test "xJAVA" != xBASH; then
28236         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28237 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28238       fi
28239       # Try to locate tool using the code snippet
28240 
28241       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28242 $as_echo_n "checking for java in Boot JDK... " >&6; }
28243       JAVA=$BOOT_JDK/bin/java
28244       if test ! -x $JAVA; then
28245         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28246 $as_echo "not found" >&6; }
28247         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28248 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28249         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28250       fi
28251       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28252 $as_echo "ok" >&6; }
28253 
28254 
28255     else
28256       # If it succeeded, then it was overridden by the user. We will use it
28257       # for the tool.
28258 
28259       # First remove it from the list of overridden variables, so we can test
28260       # for unknown variables in the end.
28261       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28262 
28263       # Check if we try to supply an empty value
28264       if test "x$JAVA" = x; then
28265         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28266 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28267         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28268 $as_echo_n "checking for JAVA... " >&6; }
28269         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28270 $as_echo "disabled" >&6; }
28271       else
28272         # Check if the provided tool contains a complete path.
28273         tool_specified="$JAVA"
28274         tool_basename="${tool_specified##*/}"
28275         if test "x$tool_basename" = "x$tool_specified"; then
28276           # A command without a complete path is provided, search $PATH.
28277           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28278 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28279           # Extract the first word of "$tool_basename", so it can be a program name with args.
28280 set dummy $tool_basename; ac_word=$2
28281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28282 $as_echo_n "checking for $ac_word... " >&6; }
28283 if ${ac_cv_path_JAVA+:} false; then :
28284   $as_echo_n "(cached) " >&6
28285 else
28286   case $JAVA in
28287   [\\/]* | ?:[\\/]*)
28288   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28289   ;;
28290   *)
28291   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28292 for as_dir in $PATH
28293 do
28294   IFS=$as_save_IFS
28295   test -z "$as_dir" && as_dir=.
28296     for ac_exec_ext in '' $ac_executable_extensions; do
28297   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28298     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28299     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28300     break 2
28301   fi
28302 done
28303   done
28304 IFS=$as_save_IFS
28305 
28306   ;;
28307 esac
28308 fi
28309 JAVA=$ac_cv_path_JAVA
28310 if test -n "$JAVA"; then
28311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28312 $as_echo "$JAVA" >&6; }
28313 else
28314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28315 $as_echo "no" >&6; }
28316 fi
28317 
28318 
28319           if test "x$JAVA" = x; then
28320             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28321           fi
28322         else
28323           # Otherwise we believe it is a complete path. Use it as it is.
28324           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28325 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28326           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28327 $as_echo_n "checking for JAVA... " >&6; }
28328           if test ! -x "$tool_specified"; then
28329             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28330 $as_echo "not found" >&6; }
28331             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28332           fi
28333           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28334 $as_echo "$tool_specified" >&6; }
28335         fi
28336       fi
28337     fi
28338 
28339   fi
28340 
28341 
28342 
28343   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28344 
28345   # Publish this variable in the help.
28346 
28347 
28348   if [ -z "${JAVAC+x}" ]; then
28349     # The variable is not set by user, try to locate tool using the code snippet
28350 
28351       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28352 $as_echo_n "checking for javac in Boot JDK... " >&6; }
28353       JAVAC=$BOOT_JDK/bin/javac
28354       if test ! -x $JAVAC; then
28355         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28356 $as_echo "not found" >&6; }
28357         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28358 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28359         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28360       fi
28361       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28362 $as_echo "ok" >&6; }
28363 
28364 
28365   else
28366     # The variable is set, but is it from the command line or the environment?
28367 
28368     # Try to remove the string !JAVAC! from our list.
28369     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28370     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28371       # If it failed, the variable was not from the command line. Ignore it,
28372       # but warn the user (except for BASH, which is always set by the calling BASH).
28373       if test "xJAVAC" != xBASH; then
28374         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
28375 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
28376       fi
28377       # Try to locate tool using the code snippet
28378 
28379       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28380 $as_echo_n "checking for javac in Boot JDK... " >&6; }
28381       JAVAC=$BOOT_JDK/bin/javac
28382       if test ! -x $JAVAC; then
28383         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28384 $as_echo "not found" >&6; }
28385         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28386 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28387         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28388       fi
28389       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28390 $as_echo "ok" >&6; }
28391 
28392 
28393     else
28394       # If it succeeded, then it was overridden by the user. We will use it
28395       # for the tool.
28396 
28397       # First remove it from the list of overridden variables, so we can test
28398       # for unknown variables in the end.
28399       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28400 
28401       # Check if we try to supply an empty value
28402       if test "x$JAVAC" = x; then
28403         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
28404 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
28405         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28406 $as_echo_n "checking for JAVAC... " >&6; }
28407         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28408 $as_echo "disabled" >&6; }
28409       else
28410         # Check if the provided tool contains a complete path.
28411         tool_specified="$JAVAC"
28412         tool_basename="${tool_specified##*/}"
28413         if test "x$tool_basename" = "x$tool_specified"; then
28414           # A command without a complete path is provided, search $PATH.
28415           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
28416 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
28417           # Extract the first word of "$tool_basename", so it can be a program name with args.
28418 set dummy $tool_basename; ac_word=$2
28419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28420 $as_echo_n "checking for $ac_word... " >&6; }
28421 if ${ac_cv_path_JAVAC+:} false; then :
28422   $as_echo_n "(cached) " >&6
28423 else
28424   case $JAVAC in
28425   [\\/]* | ?:[\\/]*)
28426   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
28427   ;;
28428   *)
28429   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28430 for as_dir in $PATH
28431 do
28432   IFS=$as_save_IFS
28433   test -z "$as_dir" && as_dir=.
28434     for ac_exec_ext in '' $ac_executable_extensions; do
28435   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28436     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
28437     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28438     break 2
28439   fi
28440 done
28441   done
28442 IFS=$as_save_IFS
28443 
28444   ;;
28445 esac
28446 fi
28447 JAVAC=$ac_cv_path_JAVAC
28448 if test -n "$JAVAC"; then
28449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
28450 $as_echo "$JAVAC" >&6; }
28451 else
28452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28453 $as_echo "no" >&6; }
28454 fi
28455 
28456 
28457           if test "x$JAVAC" = x; then
28458             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28459           fi
28460         else
28461           # Otherwise we believe it is a complete path. Use it as it is.
28462           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
28463 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
28464           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28465 $as_echo_n "checking for JAVAC... " >&6; }
28466           if test ! -x "$tool_specified"; then
28467             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28468 $as_echo "not found" >&6; }
28469             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
28470           fi
28471           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28472 $as_echo "$tool_specified" >&6; }
28473         fi
28474       fi
28475     fi
28476 
28477   fi
28478 
28479 
28480 
28481   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28482 
28483   # Publish this variable in the help.
28484 
28485 
28486   if [ -z "${JAVAH+x}" ]; then
28487     # The variable is not set by user, try to locate tool using the code snippet
28488 
28489       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28490 $as_echo_n "checking for javah in Boot JDK... " >&6; }
28491       JAVAH=$BOOT_JDK/bin/javah
28492       if test ! -x $JAVAH; then
28493         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28494 $as_echo "not found" >&6; }
28495         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28496 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28497         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28498       fi
28499       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28500 $as_echo "ok" >&6; }
28501 
28502 
28503   else
28504     # The variable is set, but is it from the command line or the environment?
28505 
28506     # Try to remove the string !JAVAH! from our list.
28507     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
28508     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28509       # If it failed, the variable was not from the command line. Ignore it,
28510       # but warn the user (except for BASH, which is always set by the calling BASH).
28511       if test "xJAVAH" != xBASH; then
28512         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
28513 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
28514       fi
28515       # Try to locate tool using the code snippet
28516 
28517       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28518 $as_echo_n "checking for javah in Boot JDK... " >&6; }
28519       JAVAH=$BOOT_JDK/bin/javah
28520       if test ! -x $JAVAH; then
28521         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28522 $as_echo "not found" >&6; }
28523         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28524 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28525         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28526       fi
28527       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28528 $as_echo "ok" >&6; }
28529 
28530 
28531     else
28532       # If it succeeded, then it was overridden by the user. We will use it
28533       # for the tool.
28534 
28535       # First remove it from the list of overridden variables, so we can test
28536       # for unknown variables in the end.
28537       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28538 
28539       # Check if we try to supply an empty value
28540       if test "x$JAVAH" = x; then
28541         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
28542 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
28543         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28544 $as_echo_n "checking for JAVAH... " >&6; }
28545         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28546 $as_echo "disabled" >&6; }
28547       else
28548         # Check if the provided tool contains a complete path.
28549         tool_specified="$JAVAH"
28550         tool_basename="${tool_specified##*/}"
28551         if test "x$tool_basename" = "x$tool_specified"; then
28552           # A command without a complete path is provided, search $PATH.
28553           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
28554 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
28555           # Extract the first word of "$tool_basename", so it can be a program name with args.
28556 set dummy $tool_basename; ac_word=$2
28557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28558 $as_echo_n "checking for $ac_word... " >&6; }
28559 if ${ac_cv_path_JAVAH+:} false; then :
28560   $as_echo_n "(cached) " >&6
28561 else
28562   case $JAVAH in
28563   [\\/]* | ?:[\\/]*)
28564   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
28565   ;;
28566   *)
28567   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28568 for as_dir in $PATH
28569 do
28570   IFS=$as_save_IFS
28571   test -z "$as_dir" && as_dir=.
28572     for ac_exec_ext in '' $ac_executable_extensions; do
28573   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28574     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
28575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28576     break 2
28577   fi
28578 done
28579   done
28580 IFS=$as_save_IFS
28581 
28582   ;;
28583 esac
28584 fi
28585 JAVAH=$ac_cv_path_JAVAH
28586 if test -n "$JAVAH"; then
28587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
28588 $as_echo "$JAVAH" >&6; }
28589 else
28590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28591 $as_echo "no" >&6; }
28592 fi
28593 
28594 
28595           if test "x$JAVAH" = x; then
28596             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28597           fi
28598         else
28599           # Otherwise we believe it is a complete path. Use it as it is.
28600           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
28601 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
28602           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28603 $as_echo_n "checking for JAVAH... " >&6; }
28604           if test ! -x "$tool_specified"; then
28605             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28606 $as_echo "not found" >&6; }
28607             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
28608           fi
28609           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28610 $as_echo "$tool_specified" >&6; }
28611         fi
28612       fi
28613     fi
28614 
28615   fi
28616 
28617 
28618 
28619   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28620 
28621   # Publish this variable in the help.
28622 
28623 
28624   if [ -z "${JAR+x}" ]; then
28625     # The variable is not set by user, try to locate tool using the code snippet
28626 
28627       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28628 $as_echo_n "checking for jar in Boot JDK... " >&6; }
28629       JAR=$BOOT_JDK/bin/jar
28630       if test ! -x $JAR; then
28631         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28632 $as_echo "not found" >&6; }
28633         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28634 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28635         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28636       fi
28637       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28638 $as_echo "ok" >&6; }
28639 
28640 
28641   else
28642     # The variable is set, but is it from the command line or the environment?
28643 
28644     # Try to remove the string !JAR! from our list.
28645     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
28646     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28647       # If it failed, the variable was not from the command line. Ignore it,
28648       # but warn the user (except for BASH, which is always set by the calling BASH).
28649       if test "xJAR" != xBASH; then
28650         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
28651 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
28652       fi
28653       # Try to locate tool using the code snippet
28654 
28655       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28656 $as_echo_n "checking for jar in Boot JDK... " >&6; }
28657       JAR=$BOOT_JDK/bin/jar
28658       if test ! -x $JAR; then
28659         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28660 $as_echo "not found" >&6; }
28661         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28662 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28663         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28664       fi
28665       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28666 $as_echo "ok" >&6; }
28667 
28668 
28669     else
28670       # If it succeeded, then it was overridden by the user. We will use it
28671       # for the tool.
28672 
28673       # First remove it from the list of overridden variables, so we can test
28674       # for unknown variables in the end.
28675       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28676 
28677       # Check if we try to supply an empty value
28678       if test "x$JAR" = x; then
28679         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
28680 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
28681         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28682 $as_echo_n "checking for JAR... " >&6; }
28683         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28684 $as_echo "disabled" >&6; }
28685       else
28686         # Check if the provided tool contains a complete path.
28687         tool_specified="$JAR"
28688         tool_basename="${tool_specified##*/}"
28689         if test "x$tool_basename" = "x$tool_specified"; then
28690           # A command without a complete path is provided, search $PATH.
28691           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
28692 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
28693           # Extract the first word of "$tool_basename", so it can be a program name with args.
28694 set dummy $tool_basename; ac_word=$2
28695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28696 $as_echo_n "checking for $ac_word... " >&6; }
28697 if ${ac_cv_path_JAR+:} false; then :
28698   $as_echo_n "(cached) " >&6
28699 else
28700   case $JAR in
28701   [\\/]* | ?:[\\/]*)
28702   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
28703   ;;
28704   *)
28705   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28706 for as_dir in $PATH
28707 do
28708   IFS=$as_save_IFS
28709   test -z "$as_dir" && as_dir=.
28710     for ac_exec_ext in '' $ac_executable_extensions; do
28711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28712     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
28713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28714     break 2
28715   fi
28716 done
28717   done
28718 IFS=$as_save_IFS
28719 
28720   ;;
28721 esac
28722 fi
28723 JAR=$ac_cv_path_JAR
28724 if test -n "$JAR"; then
28725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
28726 $as_echo "$JAR" >&6; }
28727 else
28728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28729 $as_echo "no" >&6; }
28730 fi
28731 
28732 
28733           if test "x$JAR" = x; then
28734             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28735           fi
28736         else
28737           # Otherwise we believe it is a complete path. Use it as it is.
28738           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
28739 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
28740           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28741 $as_echo_n "checking for JAR... " >&6; }
28742           if test ! -x "$tool_specified"; then
28743             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28744 $as_echo "not found" >&6; }
28745             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
28746           fi
28747           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28748 $as_echo "$tool_specified" >&6; }
28749         fi
28750       fi
28751     fi
28752 
28753   fi
28754 
28755 
28756 
28757   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28758 
28759   # Publish this variable in the help.
28760 
28761 
28762   if [ -z "${JARSIGNER+x}" ]; then
28763     # The variable is not set by user, try to locate tool using the code snippet
28764 
28765       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28766 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28767       JARSIGNER=$BOOT_JDK/bin/jarsigner
28768       if test ! -x $JARSIGNER; then
28769         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28770 $as_echo "not found" >&6; }
28771         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28772 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28773         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28774       fi
28775       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28776 $as_echo "ok" >&6; }
28777 
28778 
28779   else
28780     # The variable is set, but is it from the command line or the environment?
28781 
28782     # Try to remove the string !JARSIGNER! from our list.
28783     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
28784     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28785       # If it failed, the variable was not from the command line. Ignore it,
28786       # but warn the user (except for BASH, which is always set by the calling BASH).
28787       if test "xJARSIGNER" != xBASH; then
28788         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
28789 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
28790       fi
28791       # Try to locate tool using the code snippet
28792 
28793       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28794 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28795       JARSIGNER=$BOOT_JDK/bin/jarsigner
28796       if test ! -x $JARSIGNER; then
28797         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28798 $as_echo "not found" >&6; }
28799         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28800 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28801         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28802       fi
28803       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28804 $as_echo "ok" >&6; }
28805 
28806 
28807     else
28808       # If it succeeded, then it was overridden by the user. We will use it
28809       # for the tool.
28810 
28811       # First remove it from the list of overridden variables, so we can test
28812       # for unknown variables in the end.
28813       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28814 
28815       # Check if we try to supply an empty value
28816       if test "x$JARSIGNER" = x; then
28817         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
28818 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
28819         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28820 $as_echo_n "checking for JARSIGNER... " >&6; }
28821         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28822 $as_echo "disabled" >&6; }
28823       else
28824         # Check if the provided tool contains a complete path.
28825         tool_specified="$JARSIGNER"
28826         tool_basename="${tool_specified##*/}"
28827         if test "x$tool_basename" = "x$tool_specified"; then
28828           # A command without a complete path is provided, search $PATH.
28829           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
28830 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
28831           # Extract the first word of "$tool_basename", so it can be a program name with args.
28832 set dummy $tool_basename; ac_word=$2
28833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28834 $as_echo_n "checking for $ac_word... " >&6; }
28835 if ${ac_cv_path_JARSIGNER+:} false; then :
28836   $as_echo_n "(cached) " >&6
28837 else
28838   case $JARSIGNER in
28839   [\\/]* | ?:[\\/]*)
28840   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
28841   ;;
28842   *)
28843   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28844 for as_dir in $PATH
28845 do
28846   IFS=$as_save_IFS
28847   test -z "$as_dir" && as_dir=.
28848     for ac_exec_ext in '' $ac_executable_extensions; do
28849   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28850     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
28851     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28852     break 2
28853   fi
28854 done
28855   done
28856 IFS=$as_save_IFS
28857 
28858   ;;
28859 esac
28860 fi
28861 JARSIGNER=$ac_cv_path_JARSIGNER
28862 if test -n "$JARSIGNER"; then
28863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
28864 $as_echo "$JARSIGNER" >&6; }
28865 else
28866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28867 $as_echo "no" >&6; }
28868 fi
28869 
28870 
28871           if test "x$JARSIGNER" = x; then
28872             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28873           fi
28874         else
28875           # Otherwise we believe it is a complete path. Use it as it is.
28876           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
28877 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
28878           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28879 $as_echo_n "checking for JARSIGNER... " >&6; }
28880           if test ! -x "$tool_specified"; then
28881             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28882 $as_echo "not found" >&6; }
28883             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
28884           fi
28885           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28886 $as_echo "$tool_specified" >&6; }
28887         fi
28888       fi
28889     fi
28890 
28891   fi
28892 
28893 
28894 
28895   # Finally, set some other options...
28896 
28897   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
28898   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
28899 
28900 
28901 
28902   # Check if the boot jdk is 32 or 64 bit
28903   if "$JAVA" -d64 -version > /dev/null 2>&1; then
28904     BOOT_JDK_BITS="64"
28905   else
28906     BOOT_JDK_BITS="32"
28907   fi
28908   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
28909 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
28910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
28911 $as_echo "$BOOT_JDK_BITS" >&6; }
28912 
28913 
28914 
28915 ###############################################################################
28916 #
28917 # Configure the sources to use. We can add or override individual directories.
28918 #
28919 ###############################################################################
28920 
28921 
28922   # Where are the sources.
28923   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
28924   CORBA_TOPDIR="$SRC_ROOT/corba"
28925   JAXP_TOPDIR="$SRC_ROOT/jaxp"
28926   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
28927   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
28928   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
28929   JDK_TOPDIR="$SRC_ROOT/jdk"
28930 
28931 
28932 
28933 
28934 
28935 
28936 
28937 
28938 
28939   # This feature is no longer supported.
28940 
28941 
28942 
28943 # Check whether --with-add-source-root was given.
28944 if test "${with_add_source_root+set}" = set; then :
28945   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
28946 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
28947 fi
28948 
28949 
28950 
28951 
28952 # Check whether --with-override-source-root was given.
28953 if test "${with_override_source_root+set}" = set; then :
28954   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
28955 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
28956 fi
28957 
28958 
28959 
28960 
28961 # Check whether --with-adds-and-overrides was given.
28962 if test "${with_adds_and_overrides+set}" = set; then :
28963   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
28964 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
28965 fi
28966 
28967 
28968 
28969 
28970 # Check whether --with-override-langtools was given.
28971 if test "${with_override_langtools+set}" = set; then :
28972   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
28973 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
28974 fi
28975 
28976 
28977 
28978 
28979 # Check whether --with-override-corba was given.
28980 if test "${with_override_corba+set}" = set; then :
28981   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
28982 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
28983 fi
28984 
28985 
28986 
28987 
28988 # Check whether --with-override-jaxp was given.
28989 if test "${with_override_jaxp+set}" = set; then :
28990   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
28991 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
28992 fi
28993 
28994 
28995 
28996 
28997 # Check whether --with-override-jaxws was given.
28998 if test "${with_override_jaxws+set}" = set; then :
28999   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29000 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29001 fi
29002 
29003 
29004 
29005 
29006 # Check whether --with-override-hotspot was given.
29007 if test "${with_override_hotspot+set}" = set; then :
29008   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29009 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29010 fi
29011 
29012 
29013 
29014 
29015 # Check whether --with-override-nashorn was given.
29016 if test "${with_override_nashorn+set}" = set; then :
29017   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29018 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29019 fi
29020 
29021 
29022 
29023 
29024 # Check whether --with-override-jdk was given.
29025 if test "${with_override_jdk+set}" = set; then :
29026   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29027 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29028 fi
29029 
29030 
29031 
29032 
29033   BUILD_OUTPUT="$OUTPUT_ROOT"
29034 
29035 
29036   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29037   BUILD_HOTSPOT=true
29038 
29039 
29040 
29041 # Check whether --with-import-hotspot was given.
29042 if test "${with_import_hotspot+set}" = set; then :
29043   withval=$with_import_hotspot;
29044 fi
29045 
29046   if test "x$with_import_hotspot" != x; then
29047     CURDIR="$PWD"
29048     cd "$with_import_hotspot"
29049     HOTSPOT_DIST="`pwd`"
29050     cd "$CURDIR"
29051     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29052       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29053     fi
29054     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29055 $as_echo_n "checking if hotspot should be imported... " >&6; }
29056     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29057 $as_echo "yes from $HOTSPOT_DIST" >&6; }
29058     BUILD_HOTSPOT=false
29059   fi
29060 
29061   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29062 
29063 
29064 ###############################################################################
29065 #
29066 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
29067 # native code.
29068 #
29069 ###############################################################################
29070 
29071 # See if we are doing a complete static build or not
29072 
29073   # Check whether --enable-static-build was given.
29074 if test "${enable_static_build+set}" = set; then :
29075   enableval=$enable_static_build;
29076 fi
29077 
29078   STATIC_BUILD=false
29079   if test "x$enable_static_build" = "xyes"; then
29080     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29081 $as_echo_n "checking if static build is enabled... " >&6; }
29082     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29083 $as_echo "yes" >&6; }
29084     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29085       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29086     fi
29087     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29088     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29089     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29090     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29091     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29092     STATIC_BUILD=true
29093   elif test "x$enable_static_build" = "xno"; then
29094     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29095 $as_echo_n "checking if static build is enabled... " >&6; }
29096     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29097 $as_echo "no" >&6; }
29098   elif test "x$enable_static_build" != "x"; then
29099     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29100   fi
29101 
29102 
29103 
29104 
29105 # First determine the toolchain type (compiler family)
29106 
29107 
29108 # Check whether --with-toolchain-type was given.
29109 if test "${with_toolchain_type+set}" = set; then :
29110   withval=$with_toolchain_type;
29111 fi
29112 
29113 
29114   # Use indirect variable referencing
29115   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29116   VALID_TOOLCHAINS=${!toolchain_var_name}
29117 
29118   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29119     if test -n "$XCODEBUILD"; then
29120       # On Mac OS X, default toolchain to clang after Xcode 5
29121       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29122       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29123       if test $? -ne 0; then
29124         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29125       fi
29126       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29127           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29128           $CUT -f 1 -d .`
29129       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29130 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29131       if test $XCODE_MAJOR_VERSION -ge 5; then
29132           DEFAULT_TOOLCHAIN="clang"
29133       else
29134           DEFAULT_TOOLCHAIN="gcc"
29135       fi
29136     else
29137       # If Xcode is not installed, but the command line tools are
29138       # then we can't run xcodebuild. On these systems we should
29139       # default to clang
29140       DEFAULT_TOOLCHAIN="clang"
29141     fi
29142   else
29143     # First toolchain type in the list is the default
29144     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29145   fi
29146 
29147   if test "x$with_toolchain_type" = xlist; then
29148     # List all toolchains
29149     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29150 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29151     for toolchain in $VALID_TOOLCHAINS; do
29152       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29153       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29154       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29155     done
29156 
29157     exit 0
29158   elif test "x$with_toolchain_type" != x; then
29159     # User override; check that it is valid
29160     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29161       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29162 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29163       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29164 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29165       as_fn_error $? "Cannot continue." "$LINENO" 5
29166     fi
29167     TOOLCHAIN_TYPE=$with_toolchain_type
29168   else
29169     # No flag given, use default
29170     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29171   fi
29172 
29173 
29174   TOOLCHAIN_CC_BINARY_clang="clang"
29175   TOOLCHAIN_CC_BINARY_gcc="gcc"
29176   TOOLCHAIN_CC_BINARY_microsoft="cl"
29177   TOOLCHAIN_CC_BINARY_solstudio="cc"
29178   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29179 
29180   TOOLCHAIN_CXX_BINARY_clang="clang++"
29181   TOOLCHAIN_CXX_BINARY_gcc="g++"
29182   TOOLCHAIN_CXX_BINARY_microsoft="cl"
29183   TOOLCHAIN_CXX_BINARY_solstudio="CC"
29184   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29185 
29186   # Use indirect variable referencing
29187   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29188   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29189   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29190   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29191   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29192   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29193 
29194 
29195   # Define filename patterns
29196   if test "x$OPENJDK_TARGET_OS" = xwindows; then
29197     LIBRARY_PREFIX=
29198     SHARED_LIBRARY_SUFFIX='.dll'
29199     STATIC_LIBRARY_SUFFIX='.lib'
29200     SHARED_LIBRARY='$1.dll'
29201     STATIC_LIBRARY='$1.lib'
29202     OBJ_SUFFIX='.obj'
29203     EXE_SUFFIX='.exe'
29204   else
29205     LIBRARY_PREFIX=lib
29206     SHARED_LIBRARY_SUFFIX='.so'
29207     STATIC_LIBRARY_SUFFIX='.a'
29208     SHARED_LIBRARY='lib$1.so'
29209     STATIC_LIBRARY='lib$1.a'
29210     OBJ_SUFFIX='.o'
29211     EXE_SUFFIX=''
29212     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29213       # For full static builds, we're overloading the SHARED_LIBRARY
29214       # variables in order to limit the amount of changes required.
29215       # It would be better to remove SHARED and just use LIBRARY and
29216       # LIBRARY_SUFFIX for libraries that can be built either
29217       # shared or static and use STATIC_* for libraries that are
29218       # always built statically.
29219       if test "x$STATIC_BUILD" = xtrue; then
29220         SHARED_LIBRARY='lib$1.a'
29221         SHARED_LIBRARY_SUFFIX='.a'
29222       else
29223         SHARED_LIBRARY='lib$1.dylib'
29224         SHARED_LIBRARY_SUFFIX='.dylib'
29225       fi
29226     fi
29227   fi
29228 
29229 
29230 
29231 
29232 
29233 
29234 
29235 
29236 
29237 
29238   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29239     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29240 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29241   else
29242     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29243 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29244   fi
29245 
29246 
29247 # User supplied flags should be used when configure detects compilers
29248 
29249   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29250     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29251 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29252   fi
29253 
29254   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29255     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29256 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29257   fi
29258 
29259   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29260     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29261 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29262   fi
29263 
29264 
29265 # Check whether --with-extra-cflags was given.
29266 if test "${with_extra_cflags+set}" = set; then :
29267   withval=$with_extra_cflags;
29268 fi
29269 
29270 
29271 
29272 # Check whether --with-extra-cxxflags was given.
29273 if test "${with_extra_cxxflags+set}" = set; then :
29274   withval=$with_extra_cxxflags;
29275 fi
29276 
29277 
29278 
29279 # Check whether --with-extra-ldflags was given.
29280 if test "${with_extra_ldflags+set}" = set; then :
29281   withval=$with_extra_ldflags;
29282 fi
29283 
29284 
29285   EXTRA_CFLAGS="$with_extra_cflags"
29286   EXTRA_CXXFLAGS="$with_extra_cxxflags"
29287   EXTRA_LDFLAGS="$with_extra_ldflags"
29288 
29289   # Hotspot needs these set in their legacy form
29290   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29291   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29292   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29293 
29294 
29295 
29296 
29297 
29298   # The global CFLAGS and LDLAGS variables are used by configure tests and
29299   # should include the extra parameters
29300   CFLAGS="$EXTRA_CFLAGS"
29301   CXXFLAGS="$EXTRA_CXXFLAGS"
29302   LDFLAGS="$EXTRA_LDFLAGS"
29303   CPPFLAGS=""
29304 
29305 # The sysroot cflags are needed for configure to be able to run the compilers
29306 
29307   if test "x$SYSROOT" != "x"; then
29308     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29309       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29310         # Solaris Studio does not have a concept of sysroot. Instead we must
29311         # make sure the default include and lib dirs are appended to each
29312         # compile and link command line.
29313         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29314         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29315             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29316             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29317       fi
29318     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29319       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29320       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29321     elif test "x$TOOLCHAIN_TYPE" = xclang; then
29322       SYSROOT_CFLAGS="-isysroot $SYSROOT"
29323       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29324     fi
29325     # Propagate the sysroot args to hotspot
29326     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29327     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29328     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29329     # The global CFLAGS and LDFLAGS variables need these for configure to function
29330     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29331     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29332     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29333     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29334   fi
29335 
29336   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29337     # We also need -iframework<path>/System/Library/Frameworks
29338     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29339     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29340     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29341     # set this here so it doesn't have to be peppered throughout the forest
29342     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29343     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29344   fi
29345 
29346 
29347 
29348 
29349 
29350 # Then detect the actual binaries needed
29351 
29352   # FIXME: Is this needed?
29353   ac_ext=cpp
29354 ac_cpp='$CXXCPP $CPPFLAGS'
29355 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29356 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29357 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29358 
29359 
29360   # Store the CFLAGS etc passed to the configure script.
29361   ORG_CFLAGS="$CFLAGS"
29362   ORG_CXXFLAGS="$CXXFLAGS"
29363 
29364   # autoconf magic only relies on PATH, so update it if tools dir is specified
29365   OLD_PATH="$PATH"
29366 
29367   # On Windows, we need to detect the visual studio installation first.
29368   # This will change the PATH, but we need to keep that new PATH even
29369   # after toolchain detection is done, since the compiler (on x86) uses
29370   # it for DLL resolution in runtime.
29371   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29372       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29373 
29374   # Store path to cygwin link.exe to help excluding it when searching for
29375   # VS linker. This must be done before changing the PATH when looking for VS.
29376   # Extract the first word of "link", so it can be a program name with args.
29377 set dummy link; ac_word=$2
29378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29379 $as_echo_n "checking for $ac_word... " >&6; }
29380 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
29381   $as_echo_n "(cached) " >&6
29382 else
29383   case $CYGWIN_LINK in
29384   [\\/]* | ?:[\\/]*)
29385   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
29386   ;;
29387   *)
29388   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29389 for as_dir in $PATH
29390 do
29391   IFS=$as_save_IFS
29392   test -z "$as_dir" && as_dir=.
29393     for ac_exec_ext in '' $ac_executable_extensions; do
29394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29395     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
29396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29397     break 2
29398   fi
29399 done
29400   done
29401 IFS=$as_save_IFS
29402 
29403   ;;
29404 esac
29405 fi
29406 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
29407 if test -n "$CYGWIN_LINK"; then
29408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
29409 $as_echo "$CYGWIN_LINK" >&6; }
29410 else
29411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29412 $as_echo "no" >&6; }
29413 fi
29414 
29415 
29416   if test "x$CYGWIN_LINK" != x; then
29417     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
29418 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
29419     "$CYGWIN_LINK" --version > /dev/null
29420     if test $? -eq 0 ; then
29421       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29422 $as_echo "yes" >&6; }
29423     else
29424       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29425 $as_echo "no" >&6; }
29426       # This might be the VS linker. Don't exclude it later on.
29427       CYGWIN_LINK=""
29428     fi
29429   fi
29430 
29431   # First-hand choice is to locate and run the vsvars bat file.
29432 
29433 
29434 # Check whether --with-toolchain-version was given.
29435 if test "${with_toolchain_version+set}" = set; then :
29436   withval=$with_toolchain_version;
29437 fi
29438 
29439 
29440   if test "x$with_toolchain_version" = xlist; then
29441     # List all toolchains
29442     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
29443 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
29444     for version in $VALID_VS_VERSIONS; do
29445       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
29446       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
29447     done
29448 
29449     exit 0
29450   elif test "x$DEVKIT_VS_VERSION" != x; then
29451     VS_VERSION=$DEVKIT_VS_VERSION
29452     TOOLCHAIN_VERSION=$VS_VERSION
29453     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
29454     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
29455     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
29456     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
29457     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29458     VS_PATH="$TOOLCHAIN_PATH:$PATH"
29459 
29460     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
29461     # can still be exported as INCLUDE for compiler invocations without
29462     # SYSROOT_CFLAGS
29463     OLDIFS="$IFS"
29464     IFS=";"
29465     for i in $DEVKIT_VS_INCLUDE; do
29466       ipath=$i
29467 
29468   unix_path="$ipath"
29469   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29470     windows_path=`$CYGPATH -m "$unix_path"`
29471     ipath="$windows_path"
29472   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29473     windows_path=`cmd //c echo $unix_path`
29474     ipath="$windows_path"
29475   fi
29476 
29477       VS_INCLUDE="$VS_INCLUDE;$ipath"
29478     done
29479     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
29480     # as LIB for compiler invocations without SYSROOT_LDFLAGS
29481     for i in $DEVKIT_VS_LIB; do
29482       libpath=$i
29483 
29484   unix_path="$libpath"
29485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29486     windows_path=`$CYGPATH -m "$unix_path"`
29487     libpath="$windows_path"
29488   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29489     windows_path=`cmd //c echo $unix_path`
29490     libpath="$windows_path"
29491   fi
29492 
29493       VS_LIB="$VS_LIB;$libpath"
29494     done
29495     IFS="$OLDIFS"
29496 
29497     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
29498 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
29499 
29500   elif test "x$with_toolchain_version" != x; then
29501     # User override; check that it is valid
29502     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
29503       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
29504 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
29505       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
29506 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
29507       as_fn_error $? "Cannot continue." "$LINENO" 5
29508     fi
29509     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
29510   else
29511     # No flag given, use default
29512     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
29513   fi
29514 
29515   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
29516 
29517   VS_VERSION="$VS_VERSION"
29518   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
29519   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
29520   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
29521   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
29522 
29523   # When using --with-tools-dir, assume it points to the correct and default
29524   # version of Visual Studio or that --with-toolchain-version was also set.
29525   if test "x$with_tools_dir" != x; then
29526 
29527   if test "x$VS_ENV_CMD" = x; then
29528     VS_VERSION="${VS_VERSION}"
29529     VS_BASE="$with_tools_dir/../.."
29530     METHOD="--with-tools-dir"
29531 
29532     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29533       VCVARSFILE="vc/bin/vcvars32.bat"
29534     else
29535       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29536     fi
29537 
29538 
29539   windows_path="$VS_BASE"
29540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29541     unix_path=`$CYGPATH -u "$windows_path"`
29542     VS_BASE="$unix_path"
29543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29544     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29545     VS_BASE="$unix_path"
29546   fi
29547 
29548     if test -d "$VS_BASE"; then
29549       if test -f "$VS_BASE/$VCVARSFILE"; then
29550         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29551 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29552         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29553         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29554         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29555         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29556       else
29557         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29558 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29559         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29560 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29561       fi
29562     fi
29563   fi
29564 
29565 
29566   if test "x$VS_ENV_CMD" = x; then
29567     VS_VERSION="${VS_VERSION}"
29568     VS_BASE="$with_tools_dir/../../.."
29569     METHOD="--with-tools-dir"
29570 
29571     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29572       VCVARSFILE="vc/bin/vcvars32.bat"
29573     else
29574       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29575     fi
29576 
29577 
29578   windows_path="$VS_BASE"
29579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29580     unix_path=`$CYGPATH -u "$windows_path"`
29581     VS_BASE="$unix_path"
29582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29584     VS_BASE="$unix_path"
29585   fi
29586 
29587     if test -d "$VS_BASE"; then
29588       if test -f "$VS_BASE/$VCVARSFILE"; then
29589         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29590 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29591         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29592         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29593         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29594         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29595       else
29596         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29597 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29598         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29599 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29600       fi
29601     fi
29602   fi
29603 
29604     if test "x$VS_ENV_CMD" = x; then
29605       # Having specified an argument which is incorrect will produce an instant failure;
29606       # we should not go on looking
29607       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
29608 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
29609       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
29610 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
29611       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
29612 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
29613       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
29614     fi
29615   fi
29616 
29617   VS_ENV_CMD=""
29618   VS_ENV_ARGS=""
29619 
29620   if test "x$VS_COMNTOOLS" != x; then
29621 
29622   if test "x$VS_ENV_CMD" = x; then
29623     VS_VERSION="${VS_VERSION}"
29624     VS_BASE="$VS_COMNTOOLS/../.."
29625     METHOD="$VS_COMNTOOLS_VAR variable"
29626 
29627     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29628       VCVARSFILE="vc/bin/vcvars32.bat"
29629     else
29630       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29631     fi
29632 
29633 
29634   windows_path="$VS_BASE"
29635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29636     unix_path=`$CYGPATH -u "$windows_path"`
29637     VS_BASE="$unix_path"
29638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29640     VS_BASE="$unix_path"
29641   fi
29642 
29643     if test -d "$VS_BASE"; then
29644       if test -f "$VS_BASE/$VCVARSFILE"; then
29645         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29646 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29647         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29648         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29649         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29650         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29651       else
29652         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29653 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29654         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29655 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29656       fi
29657     fi
29658   fi
29659 
29660   fi
29661   if test "x$PROGRAMFILES" != x; then
29662 
29663   if test "x$VS_ENV_CMD" = x; then
29664     VS_VERSION="${VS_VERSION}"
29665     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
29666     METHOD="well-known name"
29667 
29668     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29669       VCVARSFILE="vc/bin/vcvars32.bat"
29670     else
29671       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29672     fi
29673 
29674 
29675   windows_path="$VS_BASE"
29676   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29677     unix_path=`$CYGPATH -u "$windows_path"`
29678     VS_BASE="$unix_path"
29679   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29680     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29681     VS_BASE="$unix_path"
29682   fi
29683 
29684     if test -d "$VS_BASE"; then
29685       if test -f "$VS_BASE/$VCVARSFILE"; then
29686         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29687 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29688         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29689         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29690         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29691         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29692       else
29693         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29694 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29695         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29696 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29697       fi
29698     fi
29699   fi
29700 
29701   fi
29702   # Work around the insanely named ProgramFiles(x86) env variable
29703   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
29704   if test "x$PROGRAMFILES_X86" != x; then
29705 
29706   if test "x$VS_ENV_CMD" = x; then
29707     VS_VERSION="${VS_VERSION}"
29708     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
29709     METHOD="well-known name"
29710 
29711     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29712       VCVARSFILE="vc/bin/vcvars32.bat"
29713     else
29714       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29715     fi
29716 
29717 
29718   windows_path="$VS_BASE"
29719   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29720     unix_path=`$CYGPATH -u "$windows_path"`
29721     VS_BASE="$unix_path"
29722   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29723     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29724     VS_BASE="$unix_path"
29725   fi
29726 
29727     if test -d "$VS_BASE"; then
29728       if test -f "$VS_BASE/$VCVARSFILE"; then
29729         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29730 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29731         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29732         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29733         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29734         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29735       else
29736         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29737 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29738         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29739 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29740       fi
29741     fi
29742   fi
29743 
29744   fi
29745 
29746   if test "x$VS_ENV_CMD" = x; then
29747     VS_VERSION="${VS_VERSION}"
29748     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
29749     METHOD="well-known name"
29750 
29751     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29752       VCVARSFILE="vc/bin/vcvars32.bat"
29753     else
29754       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29755     fi
29756 
29757 
29758   windows_path="$VS_BASE"
29759   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29760     unix_path=`$CYGPATH -u "$windows_path"`
29761     VS_BASE="$unix_path"
29762   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29763     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29764     VS_BASE="$unix_path"
29765   fi
29766 
29767     if test -d "$VS_BASE"; then
29768       if test -f "$VS_BASE/$VCVARSFILE"; then
29769         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29770 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29771         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29772         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29773         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29774         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29775       else
29776         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29777 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29778         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29779 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29780       fi
29781     fi
29782   fi
29783 
29784 
29785   if test "x$VS_ENV_CMD" = x; then
29786     VS_VERSION="${VS_VERSION}"
29787     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
29788     METHOD="well-known name"
29789 
29790     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29791       VCVARSFILE="vc/bin/vcvars32.bat"
29792     else
29793       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29794     fi
29795 
29796 
29797   windows_path="$VS_BASE"
29798   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29799     unix_path=`$CYGPATH -u "$windows_path"`
29800     VS_BASE="$unix_path"
29801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29802     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29803     VS_BASE="$unix_path"
29804   fi
29805 
29806     if test -d "$VS_BASE"; then
29807       if test -f "$VS_BASE/$VCVARSFILE"; then
29808         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29809 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29810         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29811         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29812         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29813         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29814       else
29815         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29816 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29817         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29818 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29819       fi
29820     fi
29821   fi
29822 
29823 
29824   if test "x$SDK_INSTALL_DIR" != x; then
29825     if test "x$ProgramW6432" != x; then
29826 
29827   if test "x$VS_ENV_CMD" = x; then
29828     VS_VERSION="${VS_VERSION}"
29829     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
29830     METHOD="well-known name"
29831 
29832   windows_path="$WIN_SDK_BASE"
29833   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29834     unix_path=`$CYGPATH -u "$windows_path"`
29835     WIN_SDK_BASE="$unix_path"
29836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29837     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29838     WIN_SDK_BASE="$unix_path"
29839   fi
29840 
29841     if test -d "$WIN_SDK_BASE"; then
29842       # There have been cases of partial or broken SDK installations. A missing
29843       # lib dir is not going to work.
29844       if test ! -d "$WIN_SDK_BASE/lib"; then
29845         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29846 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29847         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29848 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29849       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; 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         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29853         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29854           VS_ENV_ARGS="/x86"
29855         else
29856           VS_ENV_ARGS="/x64"
29857         fi
29858         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29859         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29860         # TODO: improve detection for other versions of SDK
29861         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29862       else
29863         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29864 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29865         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29866 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29867       fi
29868     fi
29869   fi
29870 
29871     fi
29872     if test "x$PROGRAMW6432" != x; then
29873 
29874   if test "x$VS_ENV_CMD" = x; then
29875     VS_VERSION="${VS_VERSION}"
29876     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
29877     METHOD="well-known name"
29878 
29879   windows_path="$WIN_SDK_BASE"
29880   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29881     unix_path=`$CYGPATH -u "$windows_path"`
29882     WIN_SDK_BASE="$unix_path"
29883   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29884     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29885     WIN_SDK_BASE="$unix_path"
29886   fi
29887 
29888     if test -d "$WIN_SDK_BASE"; then
29889       # There have been cases of partial or broken SDK installations. A missing
29890       # lib dir is not going to work.
29891       if test ! -d "$WIN_SDK_BASE/lib"; then
29892         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29893 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29894         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29895 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29896       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; 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         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29900         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29901           VS_ENV_ARGS="/x86"
29902         else
29903           VS_ENV_ARGS="/x64"
29904         fi
29905         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29906         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29907         # TODO: improve detection for other versions of SDK
29908         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29909       else
29910         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29911 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29912         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29913 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29914       fi
29915     fi
29916   fi
29917 
29918     fi
29919     if test "x$PROGRAMFILES" != x; then
29920 
29921   if test "x$VS_ENV_CMD" = x; then
29922     VS_VERSION="${VS_VERSION}"
29923     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
29924     METHOD="well-known name"
29925 
29926   windows_path="$WIN_SDK_BASE"
29927   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29928     unix_path=`$CYGPATH -u "$windows_path"`
29929     WIN_SDK_BASE="$unix_path"
29930   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29931     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29932     WIN_SDK_BASE="$unix_path"
29933   fi
29934 
29935     if test -d "$WIN_SDK_BASE"; then
29936       # There have been cases of partial or broken SDK installations. A missing
29937       # lib dir is not going to work.
29938       if test ! -d "$WIN_SDK_BASE/lib"; then
29939         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29940 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29941         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29942 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29943       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; 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         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29947         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29948           VS_ENV_ARGS="/x86"
29949         else
29950           VS_ENV_ARGS="/x64"
29951         fi
29952         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29953         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29954         # TODO: improve detection for other versions of SDK
29955         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29956       else
29957         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29958 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29959         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29960 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29961       fi
29962     fi
29963   fi
29964 
29965     fi
29966 
29967   if test "x$VS_ENV_CMD" = x; then
29968     VS_VERSION="${VS_VERSION}"
29969     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
29970     METHOD="well-known name"
29971 
29972   windows_path="$WIN_SDK_BASE"
29973   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29974     unix_path=`$CYGPATH -u "$windows_path"`
29975     WIN_SDK_BASE="$unix_path"
29976   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29977     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29978     WIN_SDK_BASE="$unix_path"
29979   fi
29980 
29981     if test -d "$WIN_SDK_BASE"; then
29982       # There have been cases of partial or broken SDK installations. A missing
29983       # lib dir is not going to work.
29984       if test ! -d "$WIN_SDK_BASE/lib"; then
29985         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29986 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29987         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29988 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29989       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; 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         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29993         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29994           VS_ENV_ARGS="/x86"
29995         else
29996           VS_ENV_ARGS="/x64"
29997         fi
29998         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29999         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30000         # TODO: improve detection for other versions of SDK
30001         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30002       else
30003         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30004 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30005         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30006 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30007       fi
30008     fi
30009   fi
30010 
30011 
30012   if test "x$VS_ENV_CMD" = x; then
30013     VS_VERSION="${VS_VERSION}"
30014     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30015     METHOD="well-known name"
30016 
30017   windows_path="$WIN_SDK_BASE"
30018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30019     unix_path=`$CYGPATH -u "$windows_path"`
30020     WIN_SDK_BASE="$unix_path"
30021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30022     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30023     WIN_SDK_BASE="$unix_path"
30024   fi
30025 
30026     if test -d "$WIN_SDK_BASE"; then
30027       # There have been cases of partial or broken SDK installations. A missing
30028       # lib dir is not going to work.
30029       if test ! -d "$WIN_SDK_BASE/lib"; then
30030         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30031 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30032         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30033 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30034       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; 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         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30038         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30039           VS_ENV_ARGS="/x86"
30040         else
30041           VS_ENV_ARGS="/x64"
30042         fi
30043         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30044         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30045         # TODO: improve detection for other versions of SDK
30046         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30047       else
30048         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30049 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30050         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30051 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30052       fi
30053     fi
30054   fi
30055 
30056   fi
30057 
30058     if test "x$VS_ENV_CMD" != x; then
30059       TOOLCHAIN_VERSION=$VS_VERSION
30060       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30061       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30062       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30063       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30064       # The rest of the variables are already evaled while probing
30065       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30066 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30067       break
30068     fi
30069   done
30070 
30071 
30072   # If we have a devkit, skip all of the below.
30073   if test "x$DEVKIT_VS_VERSION" = x; then
30074     if test "x$VS_ENV_CMD" != x; then
30075       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30076 
30077   # Only process if variable expands to non-empty
30078 
30079   if test "x$VS_ENV_CMD" != x; then
30080     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30081 
30082   # First separate the path from the arguments. This will split at the first
30083   # space.
30084   complete="$VS_ENV_CMD"
30085   path="${complete%% *}"
30086   tmp="$complete EOL"
30087   arguments="${tmp#* }"
30088 
30089   # Input might be given as Windows format, start by converting to
30090   # unix format.
30091   new_path=`$CYGPATH -u "$path"`
30092 
30093   # Now try to locate executable using which
30094   new_path=`$WHICH "$new_path" 2> /dev/null`
30095   # bat and cmd files are not always considered executable in cygwin causing which
30096   # to not find them
30097   if test "x$new_path" = x \
30098       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30099       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30100     new_path=`$CYGPATH -u "$path"`
30101   fi
30102   if test "x$new_path" = x; then
30103     # Oops. Which didn't find the executable.
30104     # The splitting of arguments from the executable at a space might have been incorrect,
30105     # since paths with space are more likely in Windows. Give it another try with the whole
30106     # argument.
30107     path="$complete"
30108     arguments="EOL"
30109     new_path=`$CYGPATH -u "$path"`
30110     new_path=`$WHICH "$new_path" 2> /dev/null`
30111     # bat and cmd files are not always considered executable in cygwin causing which
30112     # to not find them
30113     if test "x$new_path" = x \
30114         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30115         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30116       new_path=`$CYGPATH -u "$path"`
30117     fi
30118     if test "x$new_path" = x; then
30119       # It's still not found. Now this is an unrecoverable error.
30120       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30121 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30122       has_space=`$ECHO "$complete" | $GREP " "`
30123       if test "x$has_space" != x; then
30124         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30125 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30126       fi
30127       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30128     fi
30129   fi
30130 
30131   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30132   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30133   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30134   # "foo.exe" is OK but "foo" is an error.
30135   #
30136   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30137   # It is also a way to make sure we got the proper file name for the real test later on.
30138   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30139   if test "x$test_shortpath" = x; then
30140     # Short path failed, file does not exist as specified.
30141     # Try adding .exe or .cmd
30142     if test -f "${new_path}.exe"; then
30143       input_to_shortpath="${new_path}.exe"
30144     elif test -f "${new_path}.cmd"; then
30145       input_to_shortpath="${new_path}.cmd"
30146     else
30147       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30148 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30149       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30150 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30151       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30152     fi
30153   else
30154     input_to_shortpath="$new_path"
30155   fi
30156 
30157   # Call helper function which possibly converts this using DOS-style short mode.
30158   # If so, the updated path is stored in $new_path.
30159   new_path="$input_to_shortpath"
30160 
30161   input_path="$input_to_shortpath"
30162   # Check if we need to convert this using DOS-style short mode. If the path
30163   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30164   # take no chances and rewrite it.
30165   # Note: m4 eats our [], so we need to use [ and ] instead.
30166   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30167   if test "x$has_forbidden_chars" != x; then
30168     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30169     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30170     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30171     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30172       # Going to short mode and back again did indeed matter. Since short mode is
30173       # case insensitive, let's make it lowercase to improve readability.
30174       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30175       # Now convert it back to Unix-style (cygpath)
30176       input_path=`$CYGPATH -u "$shortmode_path"`
30177       new_path="$input_path"
30178     fi
30179   fi
30180 
30181   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30182   if test "x$test_cygdrive_prefix" = x; then
30183     # As a simple fix, exclude /usr/bin since it's not a real path.
30184     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30185       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30186       # a path prefixed by /cygdrive for fixpath to work.
30187       new_path="$CYGWIN_ROOT_PATH$input_path"
30188     fi
30189   fi
30190 
30191   # remove trailing .exe if any
30192   new_path="${new_path/%.exe/}"
30193 
30194     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30195 
30196   # First separate the path from the arguments. This will split at the first
30197   # space.
30198   complete="$VS_ENV_CMD"
30199   path="${complete%% *}"
30200   tmp="$complete EOL"
30201   arguments="${tmp#* }"
30202 
30203   # Input might be given as Windows format, start by converting to
30204   # unix format.
30205   new_path="$path"
30206 
30207   windows_path="$new_path"
30208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30209     unix_path=`$CYGPATH -u "$windows_path"`
30210     new_path="$unix_path"
30211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30212     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30213     new_path="$unix_path"
30214   fi
30215 
30216 
30217   # Now try to locate executable using which
30218   new_path=`$WHICH "$new_path" 2> /dev/null`
30219 
30220   if test "x$new_path" = x; then
30221     # Oops. Which didn't find the executable.
30222     # The splitting of arguments from the executable at a space might have been incorrect,
30223     # since paths with space are more likely in Windows. Give it another try with the whole
30224     # argument.
30225     path="$complete"
30226     arguments="EOL"
30227     new_path="$path"
30228 
30229   windows_path="$new_path"
30230   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30231     unix_path=`$CYGPATH -u "$windows_path"`
30232     new_path="$unix_path"
30233   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30234     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30235     new_path="$unix_path"
30236   fi
30237 
30238 
30239     new_path=`$WHICH "$new_path" 2> /dev/null`
30240     # bat and cmd files are not always considered executable in MSYS causing which
30241     # to not find them
30242     if test "x$new_path" = x \
30243         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30244         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30245       new_path="$path"
30246 
30247   windows_path="$new_path"
30248   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30249     unix_path=`$CYGPATH -u "$windows_path"`
30250     new_path="$unix_path"
30251   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30252     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30253     new_path="$unix_path"
30254   fi
30255 
30256     fi
30257 
30258     if test "x$new_path" = x; then
30259       # It's still not found. Now this is an unrecoverable error.
30260       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30261 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30262       has_space=`$ECHO "$complete" | $GREP " "`
30263       if test "x$has_space" != x; then
30264         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30265 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30266       fi
30267       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30268     fi
30269   fi
30270 
30271   # Now new_path has a complete unix path to the binary
30272   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30273     # Keep paths in /bin as-is, but remove trailing .exe if any
30274     new_path="${new_path/%.exe/}"
30275     # Do not save /bin paths to all_fixpath_prefixes!
30276   else
30277     # Not in mixed or Windows style, start by that.
30278     new_path=`cmd //c echo $new_path`
30279 
30280   input_path="$new_path"
30281   # Check if we need to convert this using DOS-style short mode. If the path
30282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30283   # take no chances and rewrite it.
30284   # Note: m4 eats our [], so we need to use [ and ] instead.
30285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30286   if test "x$has_forbidden_chars" != x; then
30287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30288     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30289   fi
30290 
30291     # Output is in $new_path
30292 
30293   windows_path="$new_path"
30294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30295     unix_path=`$CYGPATH -u "$windows_path"`
30296     new_path="$unix_path"
30297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30298     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30299     new_path="$unix_path"
30300   fi
30301 
30302     # remove trailing .exe if any
30303     new_path="${new_path/%.exe/}"
30304 
30305     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30306     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30307   fi
30308 
30309     else
30310       # We're on a unix platform. Hooray! :)
30311       # First separate the path from the arguments. This will split at the first
30312       # space.
30313       complete="$VS_ENV_CMD"
30314       path="${complete%% *}"
30315       tmp="$complete EOL"
30316       arguments="${tmp#* }"
30317 
30318       # Cannot rely on the command "which" here since it doesn't always work.
30319       is_absolute_path=`$ECHO "$path" | $GREP ^/`
30320       if test -z "$is_absolute_path"; then
30321         # Path to executable is not absolute. Find it.
30322         IFS_save="$IFS"
30323         IFS=:
30324         for p in $PATH; do
30325           if test -f "$p/$path" && test -x "$p/$path"; then
30326             new_path="$p/$path"
30327             break
30328           fi
30329         done
30330         IFS="$IFS_save"
30331       else
30332         # This is an absolute path, we can use it without further modifications.
30333         new_path="$path"
30334       fi
30335 
30336       if test "x$new_path" = x; then
30337         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30338 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30339         has_space=`$ECHO "$complete" | $GREP " "`
30340         if test "x$has_space" != x; then
30341           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30342 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30343         fi
30344         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30345       fi
30346     fi
30347 
30348     # Now join together the path and the arguments once again
30349     if test "x$arguments" != xEOL; then
30350       new_complete="$new_path ${arguments% *}"
30351     else
30352       new_complete="$new_path"
30353     fi
30354 
30355     if test "x$complete" != "x$new_complete"; then
30356       VS_ENV_CMD="$new_complete"
30357       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30358 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30359     fi
30360   fi
30361 
30362 
30363       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30364       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30365 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30366 
30367       # We need to create a couple of temporary files.
30368       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30369       $MKDIR -p $VS_ENV_TMP_DIR
30370 
30371       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30372       # Instead create a shell script which will set the relevant variables when run.
30373       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30374 
30375   unix_path="$WINPATH_VS_ENV_CMD"
30376   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30377     windows_path=`$CYGPATH -m "$unix_path"`
30378     WINPATH_VS_ENV_CMD="$windows_path"
30379   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30380     windows_path=`cmd //c echo $unix_path`
30381     WINPATH_VS_ENV_CMD="$windows_path"
30382   fi
30383 
30384       WINPATH_BASH="$BASH"
30385 
30386   unix_path="$WINPATH_BASH"
30387   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30388     windows_path=`$CYGPATH -m "$unix_path"`
30389     WINPATH_BASH="$windows_path"
30390   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30391     windows_path=`cmd //c echo $unix_path`
30392     WINPATH_BASH="$windows_path"
30393   fi
30394 
30395 
30396       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
30397       # script (executable by bash) that will setup the important variables.
30398       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
30399       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
30400       # This will end up something like:
30401       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
30402       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
30403       # These will end up something like:
30404       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
30405       # The trailing space for everyone except PATH is no typo, but is needed due
30406       # to trailing \ in the Windows paths. These will be stripped later.
30407       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
30408           >> $EXTRACT_VC_ENV_BAT_FILE
30409       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
30410           >> $EXTRACT_VC_ENV_BAT_FILE
30411       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
30412           >> $EXTRACT_VC_ENV_BAT_FILE
30413       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
30414           >> $EXTRACT_VC_ENV_BAT_FILE
30415       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
30416           >> $EXTRACT_VC_ENV_BAT_FILE
30417       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
30418           >> $EXTRACT_VC_ENV_BAT_FILE
30419 
30420       # Now execute the newly created bat file.
30421       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
30422       # Change directory so we don't need to mess with Windows paths in redirects.
30423       cd $VS_ENV_TMP_DIR
30424       cmd /c extract-vs-env.bat | $CAT
30425       cd $CURDIR
30426 
30427       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
30428         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
30429 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
30430         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30431 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30432         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30433 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30434         as_fn_error $? "Cannot continue" "$LINENO" 5
30435       fi
30436 
30437       # Now set all paths and other env variables. This will allow the rest of
30438       # the configure script to find and run the compiler in the proper way.
30439       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
30440 $as_echo "$as_me: Setting extracted environment variables" >&6;}
30441       . $VS_ENV_TMP_DIR/set-vs-env.sh
30442       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
30443       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
30444     else
30445       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
30446       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
30447 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
30448     fi
30449   fi
30450 
30451   # At this point, we should have correct variables in the environment, or we can't continue.
30452   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
30453 $as_echo_n "checking for Visual Studio variables... " >&6; }
30454 
30455   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
30456       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
30457     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
30458       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
30459 $as_echo "present but broken" >&6; }
30460       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
30461     else
30462       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30463 $as_echo "ok" >&6; }
30464       # Remove any trailing "\" ";" and " " from the variables.
30465       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
30466       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
30467       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
30468       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
30469       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
30470       # Remove any paths containing # (typically F#) as that messes up make. This
30471       # is needed if visual studio was installed with F# support.
30472       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
30473 
30474 
30475 
30476 
30477 
30478       # Convert VS_INCLUDE into SYSROOT_CFLAGS
30479       OLDIFS="$IFS"
30480       IFS=";"
30481       for i in $VS_INCLUDE; do
30482         ipath=$i
30483         # Only process non-empty elements
30484         if test "x$ipath" != x; then
30485           IFS="$OLDIFS"
30486           # Check that directory exists before calling fixup_path
30487           testpath=$ipath
30488 
30489   windows_path="$testpath"
30490   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30491     unix_path=`$CYGPATH -u "$windows_path"`
30492     testpath="$unix_path"
30493   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30494     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30495     testpath="$unix_path"
30496   fi
30497 
30498           if test -d "$testpath"; then
30499 
30500   # Only process if variable expands to non-empty
30501 
30502   if test "x$ipath" != x; then
30503     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30504 
30505   # Input might be given as Windows format, start by converting to
30506   # unix format.
30507   path="$ipath"
30508   new_path=`$CYGPATH -u "$path"`
30509 
30510   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30511   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30512   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30513   # "foo.exe" is OK but "foo" is an error.
30514   #
30515   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30516   # It is also a way to make sure we got the proper file name for the real test later on.
30517   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30518   if test "x$test_shortpath" = x; then
30519     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30520 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30521     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
30522   fi
30523 
30524   # Call helper function which possibly converts this using DOS-style short mode.
30525   # If so, the updated path is stored in $new_path.
30526 
30527   input_path="$new_path"
30528   # Check if we need to convert this using DOS-style short mode. If the path
30529   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30530   # take no chances and rewrite it.
30531   # Note: m4 eats our [], so we need to use [ and ] instead.
30532   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30533   if test "x$has_forbidden_chars" != x; then
30534     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30535     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30536     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30537     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30538       # Going to short mode and back again did indeed matter. Since short mode is
30539       # case insensitive, let's make it lowercase to improve readability.
30540       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30541       # Now convert it back to Unix-style (cygpath)
30542       input_path=`$CYGPATH -u "$shortmode_path"`
30543       new_path="$input_path"
30544     fi
30545   fi
30546 
30547   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30548   if test "x$test_cygdrive_prefix" = x; then
30549     # As a simple fix, exclude /usr/bin since it's not a real path.
30550     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30551       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30552       # a path prefixed by /cygdrive for fixpath to work.
30553       new_path="$CYGWIN_ROOT_PATH$input_path"
30554     fi
30555   fi
30556 
30557 
30558   if test "x$path" != "x$new_path"; then
30559     ipath="$new_path"
30560     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30561 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30562   fi
30563 
30564     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30565 
30566   path="$ipath"
30567   has_colon=`$ECHO $path | $GREP ^.:`
30568   new_path="$path"
30569   if test "x$has_colon" = x; then
30570     # Not in mixed or Windows style, start by that.
30571     new_path=`cmd //c echo $path`
30572   fi
30573 
30574 
30575   input_path="$new_path"
30576   # Check if we need to convert this using DOS-style short mode. If the path
30577   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30578   # take no chances and rewrite it.
30579   # Note: m4 eats our [], so we need to use [ and ] instead.
30580   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30581   if test "x$has_forbidden_chars" != x; then
30582     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30583     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30584   fi
30585 
30586 
30587   windows_path="$new_path"
30588   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30589     unix_path=`$CYGPATH -u "$windows_path"`
30590     new_path="$unix_path"
30591   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30592     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30593     new_path="$unix_path"
30594   fi
30595 
30596   if test "x$path" != "x$new_path"; then
30597     ipath="$new_path"
30598     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30599 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30600   fi
30601 
30602   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30603   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30604 
30605     else
30606       # We're on a unix platform. Hooray! :)
30607       path="$ipath"
30608       has_space=`$ECHO "$path" | $GREP " "`
30609       if test "x$has_space" != x; then
30610         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30611 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30612         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30613       fi
30614 
30615       # Use eval to expand a potential ~
30616       eval path="$path"
30617       if test ! -f "$path" && test ! -d "$path"; then
30618         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
30619       fi
30620 
30621       ipath="`cd "$path"; $THEPWDCMD -L`"
30622     fi
30623   fi
30624 
30625             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
30626           fi
30627           IFS=";"
30628         fi
30629       done
30630       # Convert VS_LIB into SYSROOT_LDFLAGS
30631       for i in $VS_LIB; do
30632         libpath=$i
30633         # Only process non-empty elements
30634         if test "x$libpath" != x; then
30635           IFS="$OLDIFS"
30636           # Check that directory exists before calling fixup_path
30637           testpath=$libpath
30638 
30639   windows_path="$testpath"
30640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30641     unix_path=`$CYGPATH -u "$windows_path"`
30642     testpath="$unix_path"
30643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30645     testpath="$unix_path"
30646   fi
30647 
30648           if test -d "$testpath"; then
30649 
30650   # Only process if variable expands to non-empty
30651 
30652   if test "x$libpath" != x; then
30653     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30654 
30655   # Input might be given as Windows format, start by converting to
30656   # unix format.
30657   path="$libpath"
30658   new_path=`$CYGPATH -u "$path"`
30659 
30660   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30661   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30662   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30663   # "foo.exe" is OK but "foo" is an error.
30664   #
30665   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30666   # It is also a way to make sure we got the proper file name for the real test later on.
30667   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30668   if test "x$test_shortpath" = x; then
30669     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30670 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30671     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
30672   fi
30673 
30674   # Call helper function which possibly converts this using DOS-style short mode.
30675   # If so, the updated path is stored in $new_path.
30676 
30677   input_path="$new_path"
30678   # Check if we need to convert this using DOS-style short mode. If the path
30679   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30680   # take no chances and rewrite it.
30681   # Note: m4 eats our [], so we need to use [ and ] instead.
30682   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30683   if test "x$has_forbidden_chars" != x; then
30684     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30685     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30686     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30687     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30688       # Going to short mode and back again did indeed matter. Since short mode is
30689       # case insensitive, let's make it lowercase to improve readability.
30690       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30691       # Now convert it back to Unix-style (cygpath)
30692       input_path=`$CYGPATH -u "$shortmode_path"`
30693       new_path="$input_path"
30694     fi
30695   fi
30696 
30697   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30698   if test "x$test_cygdrive_prefix" = x; then
30699     # As a simple fix, exclude /usr/bin since it's not a real path.
30700     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30701       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30702       # a path prefixed by /cygdrive for fixpath to work.
30703       new_path="$CYGWIN_ROOT_PATH$input_path"
30704     fi
30705   fi
30706 
30707 
30708   if test "x$path" != "x$new_path"; then
30709     libpath="$new_path"
30710     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30711 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30712   fi
30713 
30714     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30715 
30716   path="$libpath"
30717   has_colon=`$ECHO $path | $GREP ^.:`
30718   new_path="$path"
30719   if test "x$has_colon" = x; then
30720     # Not in mixed or Windows style, start by that.
30721     new_path=`cmd //c echo $path`
30722   fi
30723 
30724 
30725   input_path="$new_path"
30726   # Check if we need to convert this using DOS-style short mode. If the path
30727   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30728   # take no chances and rewrite it.
30729   # Note: m4 eats our [], so we need to use [ and ] instead.
30730   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30731   if test "x$has_forbidden_chars" != x; then
30732     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30733     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30734   fi
30735 
30736 
30737   windows_path="$new_path"
30738   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30739     unix_path=`$CYGPATH -u "$windows_path"`
30740     new_path="$unix_path"
30741   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30742     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30743     new_path="$unix_path"
30744   fi
30745 
30746   if test "x$path" != "x$new_path"; then
30747     libpath="$new_path"
30748     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30749 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30750   fi
30751 
30752   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30753   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30754 
30755     else
30756       # We're on a unix platform. Hooray! :)
30757       path="$libpath"
30758       has_space=`$ECHO "$path" | $GREP " "`
30759       if test "x$has_space" != x; then
30760         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30761 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30762         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30763       fi
30764 
30765       # Use eval to expand a potential ~
30766       eval path="$path"
30767       if test ! -f "$path" && test ! -d "$path"; then
30768         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
30769       fi
30770 
30771       libpath="`cd "$path"; $THEPWDCMD -L`"
30772     fi
30773   fi
30774 
30775             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
30776           fi
30777           IFS=";"
30778         fi
30779       done
30780       IFS="$OLDIFS"
30781     fi
30782   else
30783     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30784 $as_echo "not found" >&6; }
30785 
30786     if test "x$VS_ENV_CMD" = x; then
30787       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
30788 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
30789       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
30790 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
30791     else
30792       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
30793 $as_echo "$as_me: Running the extraction script failed." >&6;}
30794     fi
30795     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30796 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30797     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30798 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30799     as_fn_error $? "Cannot continue" "$LINENO" 5
30800   fi
30801 
30802     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
30803     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
30804     PATH="$VS_PATH"
30805     # The microsoft toolchain also requires INCLUDE and LIB to be set.
30806     export INCLUDE="$VS_INCLUDE"
30807     export LIB="$VS_LIB"
30808   fi
30809 
30810   # For solaris we really need solaris tools, and not the GNU equivalent.
30811   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
30812   # so add that to path before starting to probe.
30813   # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
30814   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
30815     PATH="/usr/ccs/bin:$PATH"
30816   fi
30817 
30818   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
30819   # override all other locations.
30820   if test "x$TOOLCHAIN_PATH" != x; then
30821     PATH=$TOOLCHAIN_PATH:$PATH
30822   fi
30823 
30824 
30825   #
30826   # Setup the compilers (CC and CXX)
30827   #
30828 
30829   COMPILER_NAME=C
30830   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
30831 
30832   if test "x$CC" != x; then
30833     # User has supplied compiler name already, always let that override.
30834     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
30835 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
30836     if test "x`basename $CC`" = "x$CC"; then
30837       # A command without a complete path is provided, search $PATH.
30838 
30839       for ac_prog in $CC
30840 do
30841   # Extract the first word of "$ac_prog", so it can be a program name with args.
30842 set dummy $ac_prog; ac_word=$2
30843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30844 $as_echo_n "checking for $ac_word... " >&6; }
30845 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30846   $as_echo_n "(cached) " >&6
30847 else
30848   case $POTENTIAL_CC in
30849   [\\/]* | ?:[\\/]*)
30850   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30851   ;;
30852   *)
30853   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30854 for as_dir in $PATH
30855 do
30856   IFS=$as_save_IFS
30857   test -z "$as_dir" && as_dir=.
30858     for ac_exec_ext in '' $ac_executable_extensions; do
30859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30860     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30862     break 2
30863   fi
30864 done
30865   done
30866 IFS=$as_save_IFS
30867 
30868   ;;
30869 esac
30870 fi
30871 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
30872 if test -n "$POTENTIAL_CC"; then
30873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
30874 $as_echo "$POTENTIAL_CC" >&6; }
30875 else
30876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30877 $as_echo "no" >&6; }
30878 fi
30879 
30880 
30881   test -n "$POTENTIAL_CC" && break
30882 done
30883 
30884       if test "x$POTENTIAL_CC" != x; then
30885         CC=$POTENTIAL_CC
30886       else
30887         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
30888       fi
30889     else
30890       # Otherwise it might already be a complete path
30891       if test ! -x "$CC"; then
30892         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
30893       fi
30894     fi
30895   else
30896     # No user supplied value. Locate compiler ourselves.
30897 
30898     # If we are cross compiling, assume cross compilation tools follows the
30899     # cross compilation standard where they are prefixed with the autoconf
30900     # standard name for the target. For example the binary
30901     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30902     # If we are not cross compiling, then the default compiler name will be
30903     # used.
30904 
30905     CC=
30906     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30907     # before checking the rest of the PATH.
30908     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30909     # step, this should not be necessary.
30910     if test -n "$TOOLCHAIN_PATH"; then
30911       PATH_save="$PATH"
30912       PATH="$TOOLCHAIN_PATH"
30913       for ac_prog in $SEARCH_LIST
30914 do
30915   # Extract the first word of "$ac_prog", so it can be a program name with args.
30916 set dummy $ac_prog; ac_word=$2
30917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30918 $as_echo_n "checking for $ac_word... " >&6; }
30919 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
30920   $as_echo_n "(cached) " >&6
30921 else
30922   case $TOOLCHAIN_PATH_CC in
30923   [\\/]* | ?:[\\/]*)
30924   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
30925   ;;
30926   *)
30927   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30928 for as_dir in $PATH
30929 do
30930   IFS=$as_save_IFS
30931   test -z "$as_dir" && as_dir=.
30932     for ac_exec_ext in '' $ac_executable_extensions; do
30933   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30934     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
30935     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30936     break 2
30937   fi
30938 done
30939   done
30940 IFS=$as_save_IFS
30941 
30942   ;;
30943 esac
30944 fi
30945 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
30946 if test -n "$TOOLCHAIN_PATH_CC"; then
30947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
30948 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
30949 else
30950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30951 $as_echo "no" >&6; }
30952 fi
30953 
30954 
30955   test -n "$TOOLCHAIN_PATH_CC" && break
30956 done
30957 
30958       CC=$TOOLCHAIN_PATH_CC
30959       PATH="$PATH_save"
30960     fi
30961 
30962     # AC_PATH_PROGS can't be run multiple times with the same variable,
30963     # so create a new name for this run.
30964     if test "x$CC" = x; then
30965       for ac_prog in $SEARCH_LIST
30966 do
30967   # Extract the first word of "$ac_prog", so it can be a program name with args.
30968 set dummy $ac_prog; ac_word=$2
30969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30970 $as_echo_n "checking for $ac_word... " >&6; }
30971 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30972   $as_echo_n "(cached) " >&6
30973 else
30974   case $POTENTIAL_CC in
30975   [\\/]* | ?:[\\/]*)
30976   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30977   ;;
30978   *)
30979   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30980 for as_dir in $PATH
30981 do
30982   IFS=$as_save_IFS
30983   test -z "$as_dir" && as_dir=.
30984     for ac_exec_ext in '' $ac_executable_extensions; do
30985   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30986     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30987     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30988     break 2
30989   fi
30990 done
30991   done
30992 IFS=$as_save_IFS
30993 
30994   ;;
30995 esac
30996 fi
30997 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
30998 if test -n "$POTENTIAL_CC"; then
30999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31000 $as_echo "$POTENTIAL_CC" >&6; }
31001 else
31002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31003 $as_echo "no" >&6; }
31004 fi
31005 
31006 
31007   test -n "$POTENTIAL_CC" && break
31008 done
31009 
31010       CC=$POTENTIAL_CC
31011     fi
31012 
31013     if test "x$CC" = x; then
31014 
31015   # Print a helpful message on how to acquire the necessary build dependency.
31016   # devkit is the help tag: freetype, cups, alsa etc
31017   MISSING_DEPENDENCY=devkit
31018 
31019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31020     cygwin_help $MISSING_DEPENDENCY
31021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31022     msys_help $MISSING_DEPENDENCY
31023   else
31024     PKGHANDLER_COMMAND=
31025 
31026     case $PKGHANDLER in
31027       apt-get)
31028         apt_help     $MISSING_DEPENDENCY ;;
31029       yum)
31030         yum_help     $MISSING_DEPENDENCY ;;
31031       port)
31032         port_help    $MISSING_DEPENDENCY ;;
31033       pkgutil)
31034         pkgutil_help $MISSING_DEPENDENCY ;;
31035       pkgadd)
31036         pkgadd_help  $MISSING_DEPENDENCY ;;
31037     esac
31038 
31039     if test "x$PKGHANDLER_COMMAND" != x; then
31040       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31041     fi
31042   fi
31043 
31044       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31045     fi
31046   fi
31047 
31048   # Now we have a compiler binary in CC. Make sure it's okay.
31049 
31050   # Only process if variable expands to non-empty
31051 
31052   if test "x$CC" != x; then
31053     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31054 
31055   # First separate the path from the arguments. This will split at the first
31056   # space.
31057   complete="$CC"
31058   path="${complete%% *}"
31059   tmp="$complete EOL"
31060   arguments="${tmp#* }"
31061 
31062   # Input might be given as Windows format, start by converting to
31063   # unix format.
31064   new_path=`$CYGPATH -u "$path"`
31065 
31066   # Now try to locate executable using which
31067   new_path=`$WHICH "$new_path" 2> /dev/null`
31068   # bat and cmd files are not always considered executable in cygwin causing which
31069   # to not find them
31070   if test "x$new_path" = x \
31071       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31072       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31073     new_path=`$CYGPATH -u "$path"`
31074   fi
31075   if test "x$new_path" = x; then
31076     # Oops. Which didn't find the executable.
31077     # The splitting of arguments from the executable at a space might have been incorrect,
31078     # since paths with space are more likely in Windows. Give it another try with the whole
31079     # argument.
31080     path="$complete"
31081     arguments="EOL"
31082     new_path=`$CYGPATH -u "$path"`
31083     new_path=`$WHICH "$new_path" 2> /dev/null`
31084     # bat and cmd files are not always considered executable in cygwin causing which
31085     # to not find them
31086     if test "x$new_path" = x \
31087         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31088         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31089       new_path=`$CYGPATH -u "$path"`
31090     fi
31091     if test "x$new_path" = x; then
31092       # It's still not found. Now this is an unrecoverable error.
31093       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31094 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31095       has_space=`$ECHO "$complete" | $GREP " "`
31096       if test "x$has_space" != x; then
31097         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31098 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31099       fi
31100       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31101     fi
31102   fi
31103 
31104   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31105   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31106   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31107   # "foo.exe" is OK but "foo" is an error.
31108   #
31109   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31110   # It is also a way to make sure we got the proper file name for the real test later on.
31111   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31112   if test "x$test_shortpath" = x; then
31113     # Short path failed, file does not exist as specified.
31114     # Try adding .exe or .cmd
31115     if test -f "${new_path}.exe"; then
31116       input_to_shortpath="${new_path}.exe"
31117     elif test -f "${new_path}.cmd"; then
31118       input_to_shortpath="${new_path}.cmd"
31119     else
31120       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31121 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31122       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31123 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31124       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31125     fi
31126   else
31127     input_to_shortpath="$new_path"
31128   fi
31129 
31130   # Call helper function which possibly converts this using DOS-style short mode.
31131   # If so, the updated path is stored in $new_path.
31132   new_path="$input_to_shortpath"
31133 
31134   input_path="$input_to_shortpath"
31135   # Check if we need to convert this using DOS-style short mode. If the path
31136   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31137   # take no chances and rewrite it.
31138   # Note: m4 eats our [], so we need to use [ and ] instead.
31139   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31140   if test "x$has_forbidden_chars" != x; then
31141     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31142     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31143     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31144     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31145       # Going to short mode and back again did indeed matter. Since short mode is
31146       # case insensitive, let's make it lowercase to improve readability.
31147       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31148       # Now convert it back to Unix-style (cygpath)
31149       input_path=`$CYGPATH -u "$shortmode_path"`
31150       new_path="$input_path"
31151     fi
31152   fi
31153 
31154   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31155   if test "x$test_cygdrive_prefix" = x; then
31156     # As a simple fix, exclude /usr/bin since it's not a real path.
31157     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31158       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31159       # a path prefixed by /cygdrive for fixpath to work.
31160       new_path="$CYGWIN_ROOT_PATH$input_path"
31161     fi
31162   fi
31163 
31164   # remove trailing .exe if any
31165   new_path="${new_path/%.exe/}"
31166 
31167     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31168 
31169   # First separate the path from the arguments. This will split at the first
31170   # space.
31171   complete="$CC"
31172   path="${complete%% *}"
31173   tmp="$complete EOL"
31174   arguments="${tmp#* }"
31175 
31176   # Input might be given as Windows format, start by converting to
31177   # unix format.
31178   new_path="$path"
31179 
31180   windows_path="$new_path"
31181   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31182     unix_path=`$CYGPATH -u "$windows_path"`
31183     new_path="$unix_path"
31184   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31185     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31186     new_path="$unix_path"
31187   fi
31188 
31189 
31190   # Now try to locate executable using which
31191   new_path=`$WHICH "$new_path" 2> /dev/null`
31192 
31193   if test "x$new_path" = x; then
31194     # Oops. Which didn't find the executable.
31195     # The splitting of arguments from the executable at a space might have been incorrect,
31196     # since paths with space are more likely in Windows. Give it another try with the whole
31197     # argument.
31198     path="$complete"
31199     arguments="EOL"
31200     new_path="$path"
31201 
31202   windows_path="$new_path"
31203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31204     unix_path=`$CYGPATH -u "$windows_path"`
31205     new_path="$unix_path"
31206   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31207     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31208     new_path="$unix_path"
31209   fi
31210 
31211 
31212     new_path=`$WHICH "$new_path" 2> /dev/null`
31213     # bat and cmd files are not always considered executable in MSYS causing which
31214     # to not find them
31215     if test "x$new_path" = x \
31216         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31217         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31218       new_path="$path"
31219 
31220   windows_path="$new_path"
31221   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31222     unix_path=`$CYGPATH -u "$windows_path"`
31223     new_path="$unix_path"
31224   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31225     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31226     new_path="$unix_path"
31227   fi
31228 
31229     fi
31230 
31231     if test "x$new_path" = x; then
31232       # It's still not found. Now this is an unrecoverable error.
31233       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31234 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31235       has_space=`$ECHO "$complete" | $GREP " "`
31236       if test "x$has_space" != x; then
31237         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31238 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31239       fi
31240       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31241     fi
31242   fi
31243 
31244   # Now new_path has a complete unix path to the binary
31245   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31246     # Keep paths in /bin as-is, but remove trailing .exe if any
31247     new_path="${new_path/%.exe/}"
31248     # Do not save /bin paths to all_fixpath_prefixes!
31249   else
31250     # Not in mixed or Windows style, start by that.
31251     new_path=`cmd //c echo $new_path`
31252 
31253   input_path="$new_path"
31254   # Check if we need to convert this using DOS-style short mode. If the path
31255   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31256   # take no chances and rewrite it.
31257   # Note: m4 eats our [], so we need to use [ and ] instead.
31258   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31259   if test "x$has_forbidden_chars" != x; then
31260     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31261     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31262   fi
31263 
31264     # Output is in $new_path
31265 
31266   windows_path="$new_path"
31267   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31268     unix_path=`$CYGPATH -u "$windows_path"`
31269     new_path="$unix_path"
31270   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31271     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31272     new_path="$unix_path"
31273   fi
31274 
31275     # remove trailing .exe if any
31276     new_path="${new_path/%.exe/}"
31277 
31278     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31279     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31280   fi
31281 
31282     else
31283       # We're on a unix platform. Hooray! :)
31284       # First separate the path from the arguments. This will split at the first
31285       # space.
31286       complete="$CC"
31287       path="${complete%% *}"
31288       tmp="$complete EOL"
31289       arguments="${tmp#* }"
31290 
31291       # Cannot rely on the command "which" here since it doesn't always work.
31292       is_absolute_path=`$ECHO "$path" | $GREP ^/`
31293       if test -z "$is_absolute_path"; then
31294         # Path to executable is not absolute. Find it.
31295         IFS_save="$IFS"
31296         IFS=:
31297         for p in $PATH; do
31298           if test -f "$p/$path" && test -x "$p/$path"; then
31299             new_path="$p/$path"
31300             break
31301           fi
31302         done
31303         IFS="$IFS_save"
31304       else
31305         # This is an absolute path, we can use it without further modifications.
31306         new_path="$path"
31307       fi
31308 
31309       if test "x$new_path" = x; then
31310         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31311 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31312         has_space=`$ECHO "$complete" | $GREP " "`
31313         if test "x$has_space" != x; then
31314           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31315 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31316         fi
31317         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31318       fi
31319     fi
31320 
31321     # Now join together the path and the arguments once again
31322     if test "x$arguments" != xEOL; then
31323       new_complete="$new_path ${arguments% *}"
31324     else
31325       new_complete="$new_path"
31326     fi
31327 
31328     if test "x$complete" != "x$new_complete"; then
31329       CC="$new_complete"
31330       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31331 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31332     fi
31333   fi
31334 
31335   TEST_COMPILER="$CC"
31336   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31337   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31338   if test "x$OPENJDK_BUILD_OS" != xaix; then
31339     # FIXME: This test should not be needed anymore; we don't do that for any platform.
31340     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31341 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
31342 
31343   if test "x$OPENJDK_BUILD_OS" != xwindows; then
31344     # Follow a chain of symbolic links. Use readlink
31345     # where it exists, else fall back to horribly
31346     # complicated shell code.
31347     if test "x$READLINK_TESTED" != yes; then
31348       # On MacOSX there is a readlink tool with a different
31349       # purpose than the GNU readlink tool. Check the found readlink.
31350       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31351       if test "x$ISGNU" = x; then
31352         # A readlink that we do not know how to use.
31353         # Are there other non-GNU readlinks out there?
31354         READLINK_TESTED=yes
31355         READLINK=
31356       fi
31357     fi
31358 
31359     if test "x$READLINK" != x; then
31360       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31361     else
31362       # Save the current directory for restoring afterwards
31363       STARTDIR=$PWD
31364       COUNTER=0
31365       sym_link_dir=`$DIRNAME $TEST_COMPILER`
31366       sym_link_file=`$BASENAME $TEST_COMPILER`
31367       cd $sym_link_dir
31368       # Use -P flag to resolve symlinks in directories.
31369       cd `$THEPWDCMD -P`
31370       sym_link_dir=`$THEPWDCMD -P`
31371       # Resolve file symlinks
31372       while test $COUNTER -lt 20; do
31373         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31374         if test "x$ISLINK" == x; then
31375           # This is not a symbolic link! We are done!
31376           break
31377         fi
31378         # Again resolve directory symlinks since the target of the just found
31379         # link could be in a different directory
31380         cd `$DIRNAME $ISLINK`
31381         sym_link_dir=`$THEPWDCMD -P`
31382         sym_link_file=`$BASENAME $ISLINK`
31383         let COUNTER=COUNTER+1
31384       done
31385       cd $STARTDIR
31386       TEST_COMPILER=$sym_link_dir/$sym_link_file
31387     fi
31388   fi
31389 
31390     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31391 $as_echo "$TEST_COMPILER" >&6; }
31392   fi
31393   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
31394 $as_echo_n "checking if CC is disguised ccache... " >&6; }
31395 
31396   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31397   if test "x$COMPILER_BASENAME" = "xccache"; then
31398     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31399 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31400     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31401     # We want to control ccache invocation ourselves, so ignore this cc and try
31402     # searching again.
31403 
31404     # Remove the path to the fake ccache cc from the PATH
31405     RETRY_COMPILER_SAVED_PATH="$PATH"
31406     COMPILER_DIRNAME=`$DIRNAME $CC`
31407     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31408 
31409     # Try again looking for our compiler
31410     if test -n "$ac_tool_prefix"; then
31411   for ac_prog in $TOOLCHAIN_CC_BINARY
31412   do
31413     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31414 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31416 $as_echo_n "checking for $ac_word... " >&6; }
31417 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
31418   $as_echo_n "(cached) " >&6
31419 else
31420   if test -n "$PROPER_COMPILER_CC"; then
31421   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
31422 else
31423 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31424 for as_dir in $PATH
31425 do
31426   IFS=$as_save_IFS
31427   test -z "$as_dir" && as_dir=.
31428     for ac_exec_ext in '' $ac_executable_extensions; do
31429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31430     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
31431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31432     break 2
31433   fi
31434 done
31435   done
31436 IFS=$as_save_IFS
31437 
31438 fi
31439 fi
31440 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
31441 if test -n "$PROPER_COMPILER_CC"; then
31442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31443 $as_echo "$PROPER_COMPILER_CC" >&6; }
31444 else
31445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31446 $as_echo "no" >&6; }
31447 fi
31448 
31449 
31450     test -n "$PROPER_COMPILER_CC" && break
31451   done
31452 fi
31453 if test -z "$PROPER_COMPILER_CC"; then
31454   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
31455   for ac_prog in $TOOLCHAIN_CC_BINARY
31456 do
31457   # Extract the first word of "$ac_prog", so it can be a program name with args.
31458 set dummy $ac_prog; ac_word=$2
31459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31460 $as_echo_n "checking for $ac_word... " >&6; }
31461 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
31462   $as_echo_n "(cached) " >&6
31463 else
31464   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31465   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
31466 else
31467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31468 for as_dir in $PATH
31469 do
31470   IFS=$as_save_IFS
31471   test -z "$as_dir" && as_dir=.
31472     for ac_exec_ext in '' $ac_executable_extensions; do
31473   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31474     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
31475     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31476     break 2
31477   fi
31478 done
31479   done
31480 IFS=$as_save_IFS
31481 
31482 fi
31483 fi
31484 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
31485 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
31487 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
31488 else
31489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31490 $as_echo "no" >&6; }
31491 fi
31492 
31493 
31494   test -n "$ac_ct_PROPER_COMPILER_CC" && break
31495 done
31496 
31497   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
31498     PROPER_COMPILER_CC=""
31499   else
31500     case $cross_compiling:$ac_tool_warned in
31501 yes:)
31502 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31503 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31504 ac_tool_warned=yes ;;
31505 esac
31506     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
31507   fi
31508 fi
31509 
31510 
31511   # Only process if variable expands to non-empty
31512 
31513   if test "x$PROPER_COMPILER_CC" != x; then
31514     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31515 
31516   # First separate the path from the arguments. This will split at the first
31517   # space.
31518   complete="$PROPER_COMPILER_CC"
31519   path="${complete%% *}"
31520   tmp="$complete EOL"
31521   arguments="${tmp#* }"
31522 
31523   # Input might be given as Windows format, start by converting to
31524   # unix format.
31525   new_path=`$CYGPATH -u "$path"`
31526 
31527   # Now try to locate executable using which
31528   new_path=`$WHICH "$new_path" 2> /dev/null`
31529   # bat and cmd files are not always considered executable in cygwin causing which
31530   # to not find them
31531   if test "x$new_path" = x \
31532       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31533       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31534     new_path=`$CYGPATH -u "$path"`
31535   fi
31536   if test "x$new_path" = x; then
31537     # Oops. Which didn't find the executable.
31538     # The splitting of arguments from the executable at a space might have been incorrect,
31539     # since paths with space are more likely in Windows. Give it another try with the whole
31540     # argument.
31541     path="$complete"
31542     arguments="EOL"
31543     new_path=`$CYGPATH -u "$path"`
31544     new_path=`$WHICH "$new_path" 2> /dev/null`
31545     # bat and cmd files are not always considered executable in cygwin causing which
31546     # to not find them
31547     if test "x$new_path" = x \
31548         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31549         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31550       new_path=`$CYGPATH -u "$path"`
31551     fi
31552     if test "x$new_path" = x; then
31553       # It's still not found. Now this is an unrecoverable error.
31554       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31555 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31556       has_space=`$ECHO "$complete" | $GREP " "`
31557       if test "x$has_space" != x; then
31558         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31559 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31560       fi
31561       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31562     fi
31563   fi
31564 
31565   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31566   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31567   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31568   # "foo.exe" is OK but "foo" is an error.
31569   #
31570   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31571   # It is also a way to make sure we got the proper file name for the real test later on.
31572   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31573   if test "x$test_shortpath" = x; then
31574     # Short path failed, file does not exist as specified.
31575     # Try adding .exe or .cmd
31576     if test -f "${new_path}.exe"; then
31577       input_to_shortpath="${new_path}.exe"
31578     elif test -f "${new_path}.cmd"; then
31579       input_to_shortpath="${new_path}.cmd"
31580     else
31581       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
31582 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
31583       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31584 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31585       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31586     fi
31587   else
31588     input_to_shortpath="$new_path"
31589   fi
31590 
31591   # Call helper function which possibly converts this using DOS-style short mode.
31592   # If so, the updated path is stored in $new_path.
31593   new_path="$input_to_shortpath"
31594 
31595   input_path="$input_to_shortpath"
31596   # Check if we need to convert this using DOS-style short mode. If the path
31597   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31598   # take no chances and rewrite it.
31599   # Note: m4 eats our [], so we need to use [ and ] instead.
31600   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31601   if test "x$has_forbidden_chars" != x; then
31602     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31603     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31604     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31605     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31606       # Going to short mode and back again did indeed matter. Since short mode is
31607       # case insensitive, let's make it lowercase to improve readability.
31608       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31609       # Now convert it back to Unix-style (cygpath)
31610       input_path=`$CYGPATH -u "$shortmode_path"`
31611       new_path="$input_path"
31612     fi
31613   fi
31614 
31615   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31616   if test "x$test_cygdrive_prefix" = x; then
31617     # As a simple fix, exclude /usr/bin since it's not a real path.
31618     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31619       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31620       # a path prefixed by /cygdrive for fixpath to work.
31621       new_path="$CYGWIN_ROOT_PATH$input_path"
31622     fi
31623   fi
31624 
31625   # remove trailing .exe if any
31626   new_path="${new_path/%.exe/}"
31627 
31628     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31629 
31630   # First separate the path from the arguments. This will split at the first
31631   # space.
31632   complete="$PROPER_COMPILER_CC"
31633   path="${complete%% *}"
31634   tmp="$complete EOL"
31635   arguments="${tmp#* }"
31636 
31637   # Input might be given as Windows format, start by converting to
31638   # unix format.
31639   new_path="$path"
31640 
31641   windows_path="$new_path"
31642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31643     unix_path=`$CYGPATH -u "$windows_path"`
31644     new_path="$unix_path"
31645   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31646     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31647     new_path="$unix_path"
31648   fi
31649 
31650 
31651   # Now try to locate executable using which
31652   new_path=`$WHICH "$new_path" 2> /dev/null`
31653 
31654   if test "x$new_path" = x; then
31655     # Oops. Which didn't find the executable.
31656     # The splitting of arguments from the executable at a space might have been incorrect,
31657     # since paths with space are more likely in Windows. Give it another try with the whole
31658     # argument.
31659     path="$complete"
31660     arguments="EOL"
31661     new_path="$path"
31662 
31663   windows_path="$new_path"
31664   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31665     unix_path=`$CYGPATH -u "$windows_path"`
31666     new_path="$unix_path"
31667   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31668     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31669     new_path="$unix_path"
31670   fi
31671 
31672 
31673     new_path=`$WHICH "$new_path" 2> /dev/null`
31674     # bat and cmd files are not always considered executable in MSYS causing which
31675     # to not find them
31676     if test "x$new_path" = x \
31677         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31678         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31679       new_path="$path"
31680 
31681   windows_path="$new_path"
31682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31683     unix_path=`$CYGPATH -u "$windows_path"`
31684     new_path="$unix_path"
31685   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31686     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31687     new_path="$unix_path"
31688   fi
31689 
31690     fi
31691 
31692     if test "x$new_path" = x; then
31693       # It's still not found. Now this is an unrecoverable error.
31694       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31695 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31696       has_space=`$ECHO "$complete" | $GREP " "`
31697       if test "x$has_space" != x; then
31698         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31699 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31700       fi
31701       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31702     fi
31703   fi
31704 
31705   # Now new_path has a complete unix path to the binary
31706   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31707     # Keep paths in /bin as-is, but remove trailing .exe if any
31708     new_path="${new_path/%.exe/}"
31709     # Do not save /bin paths to all_fixpath_prefixes!
31710   else
31711     # Not in mixed or Windows style, start by that.
31712     new_path=`cmd //c echo $new_path`
31713 
31714   input_path="$new_path"
31715   # Check if we need to convert this using DOS-style short mode. If the path
31716   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31717   # take no chances and rewrite it.
31718   # Note: m4 eats our [], so we need to use [ and ] instead.
31719   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31720   if test "x$has_forbidden_chars" != x; then
31721     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31722     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31723   fi
31724 
31725     # Output is in $new_path
31726 
31727   windows_path="$new_path"
31728   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31729     unix_path=`$CYGPATH -u "$windows_path"`
31730     new_path="$unix_path"
31731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31732     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31733     new_path="$unix_path"
31734   fi
31735 
31736     # remove trailing .exe if any
31737     new_path="${new_path/%.exe/}"
31738 
31739     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31740     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31741   fi
31742 
31743     else
31744       # We're on a unix platform. Hooray! :)
31745       # First separate the path from the arguments. This will split at the first
31746       # space.
31747       complete="$PROPER_COMPILER_CC"
31748       path="${complete%% *}"
31749       tmp="$complete EOL"
31750       arguments="${tmp#* }"
31751 
31752       # Cannot rely on the command "which" here since it doesn't always work.
31753       is_absolute_path=`$ECHO "$path" | $GREP ^/`
31754       if test -z "$is_absolute_path"; then
31755         # Path to executable is not absolute. Find it.
31756         IFS_save="$IFS"
31757         IFS=:
31758         for p in $PATH; do
31759           if test -f "$p/$path" && test -x "$p/$path"; then
31760             new_path="$p/$path"
31761             break
31762           fi
31763         done
31764         IFS="$IFS_save"
31765       else
31766         # This is an absolute path, we can use it without further modifications.
31767         new_path="$path"
31768       fi
31769 
31770       if test "x$new_path" = x; then
31771         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31772 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31773         has_space=`$ECHO "$complete" | $GREP " "`
31774         if test "x$has_space" != x; then
31775           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31776 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31777         fi
31778         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31779       fi
31780     fi
31781 
31782     # Now join together the path and the arguments once again
31783     if test "x$arguments" != xEOL; then
31784       new_complete="$new_path ${arguments% *}"
31785     else
31786       new_complete="$new_path"
31787     fi
31788 
31789     if test "x$complete" != "x$new_complete"; then
31790       PROPER_COMPILER_CC="$new_complete"
31791       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
31792 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
31793     fi
31794   fi
31795 
31796     PATH="$RETRY_COMPILER_SAVED_PATH"
31797 
31798     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
31799 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
31800 
31801   if test "x$OPENJDK_BUILD_OS" != xwindows; then
31802     # Follow a chain of symbolic links. Use readlink
31803     # where it exists, else fall back to horribly
31804     # complicated shell code.
31805     if test "x$READLINK_TESTED" != yes; then
31806       # On MacOSX there is a readlink tool with a different
31807       # purpose than the GNU readlink tool. Check the found readlink.
31808       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31809       if test "x$ISGNU" = x; then
31810         # A readlink that we do not know how to use.
31811         # Are there other non-GNU readlinks out there?
31812         READLINK_TESTED=yes
31813         READLINK=
31814       fi
31815     fi
31816 
31817     if test "x$READLINK" != x; then
31818       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
31819     else
31820       # Save the current directory for restoring afterwards
31821       STARTDIR=$PWD
31822       COUNTER=0
31823       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
31824       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
31825       cd $sym_link_dir
31826       # Use -P flag to resolve symlinks in directories.
31827       cd `$THEPWDCMD -P`
31828       sym_link_dir=`$THEPWDCMD -P`
31829       # Resolve file symlinks
31830       while test $COUNTER -lt 20; do
31831         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31832         if test "x$ISLINK" == x; then
31833           # This is not a symbolic link! We are done!
31834           break
31835         fi
31836         # Again resolve directory symlinks since the target of the just found
31837         # link could be in a different directory
31838         cd `$DIRNAME $ISLINK`
31839         sym_link_dir=`$THEPWDCMD -P`
31840         sym_link_file=`$BASENAME $ISLINK`
31841         let COUNTER=COUNTER+1
31842       done
31843       cd $STARTDIR
31844       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
31845     fi
31846   fi
31847 
31848     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31849 $as_echo "$PROPER_COMPILER_CC" >&6; }
31850     CC="$PROPER_COMPILER_CC"
31851   else
31852     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
31853 $as_echo "no, keeping CC" >&6; }
31854   fi
31855 
31856 
31857   COMPILER=$CC
31858   COMPILER_NAME=$COMPILER_NAME
31859 
31860   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31861     # cc -V output typically looks like
31862     #     cc: Sun C 5.12 Linux_i386 2011/11/16
31863     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31864     # Check that this is likely to be the Solaris Studio cc.
31865     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31866     if test $? -ne 0; then
31867       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31868       { $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
31869 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31870       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31871 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31872       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31873 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31874       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31875     fi
31876     # Remove usage instructions (if present), and
31877     # collapse compiler output into a single line
31878     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31879         $SED -e 's/ *[Uu]sage:.*//'`
31880     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31881         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31882   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31883     # xlc -qversion output typically looks like
31884     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31885     #     Version: 11.01.0000.0015
31886     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31887     # Check that this is likely to be the IBM XL C compiler.
31888     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31889     if test $? -ne 0; then
31890       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31891       { $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
31892 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31893       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31894 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31895       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31896 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31897       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31898     fi
31899     # Collapse compiler output into a single line
31900     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31901     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31902         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31903   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31904     # There is no specific version flag, but all output starts with a version string.
31905     # First line typically looks something like:
31906     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31907     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31908     # Check that this is likely to be Microsoft CL.EXE.
31909     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31910     if test $? -ne 0; then
31911       { $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
31912 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31913       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31914 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31915       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31916     fi
31917     # Collapse compiler output into a single line
31918     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31919     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31920         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31921   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31922     # gcc --version output typically looks like
31923     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31924     #     Copyright (C) 2013 Free Software Foundation, Inc.
31925     #     This is free software; see the source for copying conditions.  There is NO
31926     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31927     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31928     # Check that this is likely to be GCC.
31929     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31930     if test $? -ne 0; then
31931       { $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
31932 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31933       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31934 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31935       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31936     fi
31937     # Remove Copyright and legalese from version string, and
31938     # collapse into a single line
31939     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31940         $SED -e 's/ *Copyright .*//'`
31941     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31942         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31943   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31944     # clang --version output typically looks like
31945     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31946     #    clang version 3.3 (tags/RELEASE_33/final)
31947     # or
31948     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31949     #    Target: x86_64-pc-linux-gnu
31950     #    Thread model: posix
31951     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31952     # Check that this is likely to be clang
31953     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31954     if test $? -ne 0; then
31955       { $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
31956 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31957       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31958 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31959       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31960     fi
31961     # Collapse compiler output into a single line
31962     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31963     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31964         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31965   else
31966       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31967   fi
31968   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31969   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31970   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31971   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
31972 
31973   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31974 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31975 
31976 
31977   # Now that we have resolved CC ourself, let autoconf have its go at it
31978   ac_ext=c
31979 ac_cpp='$CPP $CPPFLAGS'
31980 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31981 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31982 ac_compiler_gnu=$ac_cv_c_compiler_gnu
31983 if test -n "$ac_tool_prefix"; then
31984   for ac_prog in $CC
31985   do
31986     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31987 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31989 $as_echo_n "checking for $ac_word... " >&6; }
31990 if ${ac_cv_prog_CC+:} false; then :
31991   $as_echo_n "(cached) " >&6
31992 else
31993   if test -n "$CC"; then
31994   ac_cv_prog_CC="$CC" # Let the user override the test.
31995 else
31996 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31997 for as_dir in $PATH
31998 do
31999   IFS=$as_save_IFS
32000   test -z "$as_dir" && as_dir=.
32001     for ac_exec_ext in '' $ac_executable_extensions; do
32002   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32003     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32005     break 2
32006   fi
32007 done
32008   done
32009 IFS=$as_save_IFS
32010 
32011 fi
32012 fi
32013 CC=$ac_cv_prog_CC
32014 if test -n "$CC"; then
32015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32016 $as_echo "$CC" >&6; }
32017 else
32018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32019 $as_echo "no" >&6; }
32020 fi
32021 
32022 
32023     test -n "$CC" && break
32024   done
32025 fi
32026 if test -z "$CC"; then
32027   ac_ct_CC=$CC
32028   for ac_prog in $CC
32029 do
32030   # Extract the first word of "$ac_prog", so it can be a program name with args.
32031 set dummy $ac_prog; ac_word=$2
32032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32033 $as_echo_n "checking for $ac_word... " >&6; }
32034 if ${ac_cv_prog_ac_ct_CC+:} false; then :
32035   $as_echo_n "(cached) " >&6
32036 else
32037   if test -n "$ac_ct_CC"; then
32038   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32039 else
32040 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32041 for as_dir in $PATH
32042 do
32043   IFS=$as_save_IFS
32044   test -z "$as_dir" && as_dir=.
32045     for ac_exec_ext in '' $ac_executable_extensions; do
32046   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32047     ac_cv_prog_ac_ct_CC="$ac_prog"
32048     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32049     break 2
32050   fi
32051 done
32052   done
32053 IFS=$as_save_IFS
32054 
32055 fi
32056 fi
32057 ac_ct_CC=$ac_cv_prog_ac_ct_CC
32058 if test -n "$ac_ct_CC"; then
32059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32060 $as_echo "$ac_ct_CC" >&6; }
32061 else
32062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32063 $as_echo "no" >&6; }
32064 fi
32065 
32066 
32067   test -n "$ac_ct_CC" && break
32068 done
32069 
32070   if test "x$ac_ct_CC" = x; then
32071     CC=""
32072   else
32073     case $cross_compiling:$ac_tool_warned in
32074 yes:)
32075 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32076 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32077 ac_tool_warned=yes ;;
32078 esac
32079     CC=$ac_ct_CC
32080   fi
32081 fi
32082 
32083 
32084 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32085 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32086 as_fn_error $? "no acceptable C compiler found in \$PATH
32087 See \`config.log' for more details" "$LINENO" 5; }
32088 
32089 # Provide some information about the compiler.
32090 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32091 set X $ac_compile
32092 ac_compiler=$2
32093 for ac_option in --version -v -V -qversion; do
32094   { { ac_try="$ac_compiler $ac_option >&5"
32095 case "(($ac_try" in
32096   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32097   *) ac_try_echo=$ac_try;;
32098 esac
32099 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32100 $as_echo "$ac_try_echo"; } >&5
32101   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32102   ac_status=$?
32103   if test -s conftest.err; then
32104     sed '10a\
32105 ... rest of stderr output deleted ...
32106          10q' conftest.err >conftest.er1
32107     cat conftest.er1 >&5
32108   fi
32109   rm -f conftest.er1 conftest.err
32110   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32111   test $ac_status = 0; }
32112 done
32113 
32114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32115 /* end confdefs.h.  */
32116 
32117 int
32118 main ()
32119 {
32120 
32121   ;
32122   return 0;
32123 }
32124 _ACEOF
32125 ac_clean_files_save=$ac_clean_files
32126 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32127 # Try to create an executable without -o first, disregard a.out.
32128 # It will help us diagnose broken compilers, and finding out an intuition
32129 # of exeext.
32130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32131 $as_echo_n "checking whether the C compiler works... " >&6; }
32132 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32133 
32134 # The possible output files:
32135 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32136 
32137 ac_rmfiles=
32138 for ac_file in $ac_files
32139 do
32140   case $ac_file in
32141     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32142     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32143   esac
32144 done
32145 rm -f $ac_rmfiles
32146 
32147 if { { ac_try="$ac_link_default"
32148 case "(($ac_try" in
32149   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32150   *) ac_try_echo=$ac_try;;
32151 esac
32152 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32153 $as_echo "$ac_try_echo"; } >&5
32154   (eval "$ac_link_default") 2>&5
32155   ac_status=$?
32156   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32157   test $ac_status = 0; }; then :
32158   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32159 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32160 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
32161 # so that the user can short-circuit this test for compilers unknown to
32162 # Autoconf.
32163 for ac_file in $ac_files ''
32164 do
32165   test -f "$ac_file" || continue
32166   case $ac_file in
32167     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32168         ;;
32169     [ab].out )
32170         # We found the default executable, but exeext='' is most
32171         # certainly right.
32172         break;;
32173     *.* )
32174         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32175         then :; else
32176            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32177         fi
32178         # We set ac_cv_exeext here because the later test for it is not
32179         # safe: cross compilers may not add the suffix if given an `-o'
32180         # argument, so we may need to know it at that point already.
32181         # Even if this section looks crufty: it has the advantage of
32182         # actually working.
32183         break;;
32184     * )
32185         break;;
32186   esac
32187 done
32188 test "$ac_cv_exeext" = no && ac_cv_exeext=
32189 
32190 else
32191   ac_file=''
32192 fi
32193 if test -z "$ac_file"; then :
32194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32195 $as_echo "no" >&6; }
32196 $as_echo "$as_me: failed program was:" >&5
32197 sed 's/^/| /' conftest.$ac_ext >&5
32198 
32199 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32200 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32201 as_fn_error 77 "C compiler cannot create executables
32202 See \`config.log' for more details" "$LINENO" 5; }
32203 else
32204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32205 $as_echo "yes" >&6; }
32206 fi
32207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32208 $as_echo_n "checking for C compiler default output file name... " >&6; }
32209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32210 $as_echo "$ac_file" >&6; }
32211 ac_exeext=$ac_cv_exeext
32212 
32213 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32214 ac_clean_files=$ac_clean_files_save
32215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32216 $as_echo_n "checking for suffix of executables... " >&6; }
32217 if { { ac_try="$ac_link"
32218 case "(($ac_try" in
32219   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32220   *) ac_try_echo=$ac_try;;
32221 esac
32222 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32223 $as_echo "$ac_try_echo"; } >&5
32224   (eval "$ac_link") 2>&5
32225   ac_status=$?
32226   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32227   test $ac_status = 0; }; then :
32228   # If both `conftest.exe' and `conftest' are `present' (well, observable)
32229 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32230 # work properly (i.e., refer to `conftest.exe'), while it won't with
32231 # `rm'.
32232 for ac_file in conftest.exe conftest conftest.*; do
32233   test -f "$ac_file" || continue
32234   case $ac_file in
32235     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32236     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32237           break;;
32238     * ) break;;
32239   esac
32240 done
32241 else
32242   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32243 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32244 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32245 See \`config.log' for more details" "$LINENO" 5; }
32246 fi
32247 rm -f conftest conftest$ac_cv_exeext
32248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32249 $as_echo "$ac_cv_exeext" >&6; }
32250 
32251 rm -f conftest.$ac_ext
32252 EXEEXT=$ac_cv_exeext
32253 ac_exeext=$EXEEXT
32254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32255 /* end confdefs.h.  */
32256 #include <stdio.h>
32257 int
32258 main ()
32259 {
32260 FILE *f = fopen ("conftest.out", "w");
32261  return ferror (f) || fclose (f) != 0;
32262 
32263   ;
32264   return 0;
32265 }
32266 _ACEOF
32267 ac_clean_files="$ac_clean_files conftest.out"
32268 # Check that the compiler produces executables we can run.  If not, either
32269 # the compiler is broken, or we cross compile.
32270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32271 $as_echo_n "checking whether we are cross compiling... " >&6; }
32272 if test "$cross_compiling" != yes; then
32273   { { ac_try="$ac_link"
32274 case "(($ac_try" in
32275   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32276   *) ac_try_echo=$ac_try;;
32277 esac
32278 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32279 $as_echo "$ac_try_echo"; } >&5
32280   (eval "$ac_link") 2>&5
32281   ac_status=$?
32282   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32283   test $ac_status = 0; }
32284   if { ac_try='./conftest$ac_cv_exeext'
32285   { { case "(($ac_try" in
32286   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32287   *) ac_try_echo=$ac_try;;
32288 esac
32289 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32290 $as_echo "$ac_try_echo"; } >&5
32291   (eval "$ac_try") 2>&5
32292   ac_status=$?
32293   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32294   test $ac_status = 0; }; }; then
32295     cross_compiling=no
32296   else
32297     if test "$cross_compiling" = maybe; then
32298         cross_compiling=yes
32299     else
32300         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32301 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32302 as_fn_error $? "cannot run C compiled programs.
32303 If you meant to cross compile, use \`--host'.
32304 See \`config.log' for more details" "$LINENO" 5; }
32305     fi
32306   fi
32307 fi
32308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32309 $as_echo "$cross_compiling" >&6; }
32310 
32311 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32312 ac_clean_files=$ac_clean_files_save
32313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32314 $as_echo_n "checking for suffix of object files... " >&6; }
32315 if ${ac_cv_objext+:} false; then :
32316   $as_echo_n "(cached) " >&6
32317 else
32318   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32319 /* end confdefs.h.  */
32320 
32321 int
32322 main ()
32323 {
32324 
32325   ;
32326   return 0;
32327 }
32328 _ACEOF
32329 rm -f conftest.o conftest.obj
32330 if { { ac_try="$ac_compile"
32331 case "(($ac_try" in
32332   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32333   *) ac_try_echo=$ac_try;;
32334 esac
32335 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32336 $as_echo "$ac_try_echo"; } >&5
32337   (eval "$ac_compile") 2>&5
32338   ac_status=$?
32339   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32340   test $ac_status = 0; }; then :
32341   for ac_file in conftest.o conftest.obj conftest.*; do
32342   test -f "$ac_file" || continue;
32343   case $ac_file in
32344     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32345     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32346        break;;
32347   esac
32348 done
32349 else
32350   $as_echo "$as_me: failed program was:" >&5
32351 sed 's/^/| /' conftest.$ac_ext >&5
32352 
32353 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32354 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32355 as_fn_error $? "cannot compute suffix of object files: cannot compile
32356 See \`config.log' for more details" "$LINENO" 5; }
32357 fi
32358 rm -f conftest.$ac_cv_objext conftest.$ac_ext
32359 fi
32360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32361 $as_echo "$ac_cv_objext" >&6; }
32362 OBJEXT=$ac_cv_objext
32363 ac_objext=$OBJEXT
32364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32365 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32366 if ${ac_cv_c_compiler_gnu+:} false; then :
32367   $as_echo_n "(cached) " >&6
32368 else
32369   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32370 /* end confdefs.h.  */
32371 
32372 int
32373 main ()
32374 {
32375 #ifndef __GNUC__
32376        choke me
32377 #endif
32378 
32379   ;
32380   return 0;
32381 }
32382 _ACEOF
32383 if ac_fn_c_try_compile "$LINENO"; then :
32384   ac_compiler_gnu=yes
32385 else
32386   ac_compiler_gnu=no
32387 fi
32388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32389 ac_cv_c_compiler_gnu=$ac_compiler_gnu
32390 
32391 fi
32392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32393 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
32394 if test $ac_compiler_gnu = yes; then
32395   GCC=yes
32396 else
32397   GCC=
32398 fi
32399 ac_test_CFLAGS=${CFLAGS+set}
32400 ac_save_CFLAGS=$CFLAGS
32401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32402 $as_echo_n "checking whether $CC accepts -g... " >&6; }
32403 if ${ac_cv_prog_cc_g+:} false; then :
32404   $as_echo_n "(cached) " >&6
32405 else
32406   ac_save_c_werror_flag=$ac_c_werror_flag
32407    ac_c_werror_flag=yes
32408    ac_cv_prog_cc_g=no
32409    CFLAGS="-g"
32410    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32411 /* end confdefs.h.  */
32412 
32413 int
32414 main ()
32415 {
32416 
32417   ;
32418   return 0;
32419 }
32420 _ACEOF
32421 if ac_fn_c_try_compile "$LINENO"; then :
32422   ac_cv_prog_cc_g=yes
32423 else
32424   CFLAGS=""
32425       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32426 /* end confdefs.h.  */
32427 
32428 int
32429 main ()
32430 {
32431 
32432   ;
32433   return 0;
32434 }
32435 _ACEOF
32436 if ac_fn_c_try_compile "$LINENO"; then :
32437 
32438 else
32439   ac_c_werror_flag=$ac_save_c_werror_flag
32440          CFLAGS="-g"
32441          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32442 /* end confdefs.h.  */
32443 
32444 int
32445 main ()
32446 {
32447 
32448   ;
32449   return 0;
32450 }
32451 _ACEOF
32452 if ac_fn_c_try_compile "$LINENO"; then :
32453   ac_cv_prog_cc_g=yes
32454 fi
32455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32456 fi
32457 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32458 fi
32459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32460    ac_c_werror_flag=$ac_save_c_werror_flag
32461 fi
32462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32463 $as_echo "$ac_cv_prog_cc_g" >&6; }
32464 if test "$ac_test_CFLAGS" = set; then
32465   CFLAGS=$ac_save_CFLAGS
32466 elif test $ac_cv_prog_cc_g = yes; then
32467   if test "$GCC" = yes; then
32468     CFLAGS="-g -O2"
32469   else
32470     CFLAGS="-g"
32471   fi
32472 else
32473   if test "$GCC" = yes; then
32474     CFLAGS="-O2"
32475   else
32476     CFLAGS=
32477   fi
32478 fi
32479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32480 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32481 if ${ac_cv_prog_cc_c89+:} false; then :
32482   $as_echo_n "(cached) " >&6
32483 else
32484   ac_cv_prog_cc_c89=no
32485 ac_save_CC=$CC
32486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32487 /* end confdefs.h.  */
32488 #include <stdarg.h>
32489 #include <stdio.h>
32490 struct stat;
32491 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32492 struct buf { int x; };
32493 FILE * (*rcsopen) (struct buf *, struct stat *, int);
32494 static char *e (p, i)
32495      char **p;
32496      int i;
32497 {
32498   return p[i];
32499 }
32500 static char *f (char * (*g) (char **, int), char **p, ...)
32501 {
32502   char *s;
32503   va_list v;
32504   va_start (v,p);
32505   s = g (p, va_arg (v,int));
32506   va_end (v);
32507   return s;
32508 }
32509 
32510 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32511    function prototypes and stuff, but not '\xHH' hex character constants.
32512    These don't provoke an error unfortunately, instead are silently treated
32513    as 'x'.  The following induces an error, until -std is added to get
32514    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32515    array size at least.  It's necessary to write '\x00'==0 to get something
32516    that's true only with -std.  */
32517 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32518 
32519 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32520    inside strings and character constants.  */
32521 #define FOO(x) 'x'
32522 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32523 
32524 int test (int i, double x);
32525 struct s1 {int (*f) (int a);};
32526 struct s2 {int (*f) (double a);};
32527 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32528 int argc;
32529 char **argv;
32530 int
32531 main ()
32532 {
32533 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32534   ;
32535   return 0;
32536 }
32537 _ACEOF
32538 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32539         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32540 do
32541   CC="$ac_save_CC $ac_arg"
32542   if ac_fn_c_try_compile "$LINENO"; then :
32543   ac_cv_prog_cc_c89=$ac_arg
32544 fi
32545 rm -f core conftest.err conftest.$ac_objext
32546   test "x$ac_cv_prog_cc_c89" != "xno" && break
32547 done
32548 rm -f conftest.$ac_ext
32549 CC=$ac_save_CC
32550 
32551 fi
32552 # AC_CACHE_VAL
32553 case "x$ac_cv_prog_cc_c89" in
32554   x)
32555     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32556 $as_echo "none needed" >&6; } ;;
32557   xno)
32558     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32559 $as_echo "unsupported" >&6; } ;;
32560   *)
32561     CC="$CC $ac_cv_prog_cc_c89"
32562     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32563 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32564 esac
32565 if test "x$ac_cv_prog_cc_c89" != xno; then :
32566 
32567 fi
32568 
32569 ac_ext=cpp
32570 ac_cpp='$CXXCPP $CPPFLAGS'
32571 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32572 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32573 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32574 
32575 
32576 
32577   COMPILER_NAME=C++
32578   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32579 
32580   if test "x$CXX" != x; then
32581     # User has supplied compiler name already, always let that override.
32582     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32583 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32584     if test "x`basename $CXX`" = "x$CXX"; then
32585       # A command without a complete path is provided, search $PATH.
32586 
32587       for ac_prog in $CXX
32588 do
32589   # Extract the first word of "$ac_prog", so it can be a program name with args.
32590 set dummy $ac_prog; ac_word=$2
32591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32592 $as_echo_n "checking for $ac_word... " >&6; }
32593 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32594   $as_echo_n "(cached) " >&6
32595 else
32596   case $POTENTIAL_CXX in
32597   [\\/]* | ?:[\\/]*)
32598   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32599   ;;
32600   *)
32601   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32602 for as_dir in $PATH
32603 do
32604   IFS=$as_save_IFS
32605   test -z "$as_dir" && as_dir=.
32606     for ac_exec_ext in '' $ac_executable_extensions; do
32607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32608     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32610     break 2
32611   fi
32612 done
32613   done
32614 IFS=$as_save_IFS
32615 
32616   ;;
32617 esac
32618 fi
32619 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32620 if test -n "$POTENTIAL_CXX"; then
32621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32622 $as_echo "$POTENTIAL_CXX" >&6; }
32623 else
32624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32625 $as_echo "no" >&6; }
32626 fi
32627 
32628 
32629   test -n "$POTENTIAL_CXX" && break
32630 done
32631 
32632       if test "x$POTENTIAL_CXX" != x; then
32633         CXX=$POTENTIAL_CXX
32634       else
32635         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
32636       fi
32637     else
32638       # Otherwise it might already be a complete path
32639       if test ! -x "$CXX"; then
32640         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
32641       fi
32642     fi
32643   else
32644     # No user supplied value. Locate compiler ourselves.
32645 
32646     # If we are cross compiling, assume cross compilation tools follows the
32647     # cross compilation standard where they are prefixed with the autoconf
32648     # standard name for the target. For example the binary
32649     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32650     # If we are not cross compiling, then the default compiler name will be
32651     # used.
32652 
32653     CXX=
32654     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32655     # before checking the rest of the PATH.
32656     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32657     # step, this should not be necessary.
32658     if test -n "$TOOLCHAIN_PATH"; then
32659       PATH_save="$PATH"
32660       PATH="$TOOLCHAIN_PATH"
32661       for ac_prog in $SEARCH_LIST
32662 do
32663   # Extract the first word of "$ac_prog", so it can be a program name with args.
32664 set dummy $ac_prog; ac_word=$2
32665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32666 $as_echo_n "checking for $ac_word... " >&6; }
32667 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
32668   $as_echo_n "(cached) " >&6
32669 else
32670   case $TOOLCHAIN_PATH_CXX in
32671   [\\/]* | ?:[\\/]*)
32672   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
32673   ;;
32674   *)
32675   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32676 for as_dir in $PATH
32677 do
32678   IFS=$as_save_IFS
32679   test -z "$as_dir" && as_dir=.
32680     for ac_exec_ext in '' $ac_executable_extensions; do
32681   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32682     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
32683     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32684     break 2
32685   fi
32686 done
32687   done
32688 IFS=$as_save_IFS
32689 
32690   ;;
32691 esac
32692 fi
32693 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
32694 if test -n "$TOOLCHAIN_PATH_CXX"; then
32695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
32696 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
32697 else
32698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32699 $as_echo "no" >&6; }
32700 fi
32701 
32702 
32703   test -n "$TOOLCHAIN_PATH_CXX" && break
32704 done
32705 
32706       CXX=$TOOLCHAIN_PATH_CXX
32707       PATH="$PATH_save"
32708     fi
32709 
32710     # AC_PATH_PROGS can't be run multiple times with the same variable,
32711     # so create a new name for this run.
32712     if test "x$CXX" = x; then
32713       for ac_prog in $SEARCH_LIST
32714 do
32715   # Extract the first word of "$ac_prog", so it can be a program name with args.
32716 set dummy $ac_prog; ac_word=$2
32717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32718 $as_echo_n "checking for $ac_word... " >&6; }
32719 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32720   $as_echo_n "(cached) " >&6
32721 else
32722   case $POTENTIAL_CXX in
32723   [\\/]* | ?:[\\/]*)
32724   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32725   ;;
32726   *)
32727   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32728 for as_dir in $PATH
32729 do
32730   IFS=$as_save_IFS
32731   test -z "$as_dir" && as_dir=.
32732     for ac_exec_ext in '' $ac_executable_extensions; do
32733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32734     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32736     break 2
32737   fi
32738 done
32739   done
32740 IFS=$as_save_IFS
32741 
32742   ;;
32743 esac
32744 fi
32745 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32746 if test -n "$POTENTIAL_CXX"; then
32747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32748 $as_echo "$POTENTIAL_CXX" >&6; }
32749 else
32750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32751 $as_echo "no" >&6; }
32752 fi
32753 
32754 
32755   test -n "$POTENTIAL_CXX" && break
32756 done
32757 
32758       CXX=$POTENTIAL_CXX
32759     fi
32760 
32761     if test "x$CXX" = x; then
32762 
32763   # Print a helpful message on how to acquire the necessary build dependency.
32764   # devkit is the help tag: freetype, cups, alsa etc
32765   MISSING_DEPENDENCY=devkit
32766 
32767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32768     cygwin_help $MISSING_DEPENDENCY
32769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32770     msys_help $MISSING_DEPENDENCY
32771   else
32772     PKGHANDLER_COMMAND=
32773 
32774     case $PKGHANDLER in
32775       apt-get)
32776         apt_help     $MISSING_DEPENDENCY ;;
32777       yum)
32778         yum_help     $MISSING_DEPENDENCY ;;
32779       port)
32780         port_help    $MISSING_DEPENDENCY ;;
32781       pkgutil)
32782         pkgutil_help $MISSING_DEPENDENCY ;;
32783       pkgadd)
32784         pkgadd_help  $MISSING_DEPENDENCY ;;
32785     esac
32786 
32787     if test "x$PKGHANDLER_COMMAND" != x; then
32788       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32789     fi
32790   fi
32791 
32792       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32793     fi
32794   fi
32795 
32796   # Now we have a compiler binary in CXX. Make sure it's okay.
32797 
32798   # Only process if variable expands to non-empty
32799 
32800   if test "x$CXX" != x; then
32801     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32802 
32803   # First separate the path from the arguments. This will split at the first
32804   # space.
32805   complete="$CXX"
32806   path="${complete%% *}"
32807   tmp="$complete EOL"
32808   arguments="${tmp#* }"
32809 
32810   # Input might be given as Windows format, start by converting to
32811   # unix format.
32812   new_path=`$CYGPATH -u "$path"`
32813 
32814   # Now try to locate executable using which
32815   new_path=`$WHICH "$new_path" 2> /dev/null`
32816   # bat and cmd files are not always considered executable in cygwin causing which
32817   # to not find them
32818   if test "x$new_path" = x \
32819       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32820       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32821     new_path=`$CYGPATH -u "$path"`
32822   fi
32823   if test "x$new_path" = x; then
32824     # Oops. Which didn't find the executable.
32825     # The splitting of arguments from the executable at a space might have been incorrect,
32826     # since paths with space are more likely in Windows. Give it another try with the whole
32827     # argument.
32828     path="$complete"
32829     arguments="EOL"
32830     new_path=`$CYGPATH -u "$path"`
32831     new_path=`$WHICH "$new_path" 2> /dev/null`
32832     # bat and cmd files are not always considered executable in cygwin causing which
32833     # to not find them
32834     if test "x$new_path" = x \
32835         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32836         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32837       new_path=`$CYGPATH -u "$path"`
32838     fi
32839     if test "x$new_path" = x; then
32840       # It's still not found. Now this is an unrecoverable error.
32841       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32842 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32843       has_space=`$ECHO "$complete" | $GREP " "`
32844       if test "x$has_space" != x; then
32845         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32846 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32847       fi
32848       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32849     fi
32850   fi
32851 
32852   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32853   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32854   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32855   # "foo.exe" is OK but "foo" is an error.
32856   #
32857   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32858   # It is also a way to make sure we got the proper file name for the real test later on.
32859   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32860   if test "x$test_shortpath" = x; then
32861     # Short path failed, file does not exist as specified.
32862     # Try adding .exe or .cmd
32863     if test -f "${new_path}.exe"; then
32864       input_to_shortpath="${new_path}.exe"
32865     elif test -f "${new_path}.cmd"; then
32866       input_to_shortpath="${new_path}.cmd"
32867     else
32868       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
32869 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
32870       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32871 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32872       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32873     fi
32874   else
32875     input_to_shortpath="$new_path"
32876   fi
32877 
32878   # Call helper function which possibly converts this using DOS-style short mode.
32879   # If so, the updated path is stored in $new_path.
32880   new_path="$input_to_shortpath"
32881 
32882   input_path="$input_to_shortpath"
32883   # Check if we need to convert this using DOS-style short mode. If the path
32884   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32885   # take no chances and rewrite it.
32886   # Note: m4 eats our [], so we need to use [ and ] instead.
32887   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32888   if test "x$has_forbidden_chars" != x; then
32889     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32890     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32891     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32892     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32893       # Going to short mode and back again did indeed matter. Since short mode is
32894       # case insensitive, let's make it lowercase to improve readability.
32895       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32896       # Now convert it back to Unix-style (cygpath)
32897       input_path=`$CYGPATH -u "$shortmode_path"`
32898       new_path="$input_path"
32899     fi
32900   fi
32901 
32902   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32903   if test "x$test_cygdrive_prefix" = x; then
32904     # As a simple fix, exclude /usr/bin since it's not a real path.
32905     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32906       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32907       # a path prefixed by /cygdrive for fixpath to work.
32908       new_path="$CYGWIN_ROOT_PATH$input_path"
32909     fi
32910   fi
32911 
32912   # remove trailing .exe if any
32913   new_path="${new_path/%.exe/}"
32914 
32915     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32916 
32917   # First separate the path from the arguments. This will split at the first
32918   # space.
32919   complete="$CXX"
32920   path="${complete%% *}"
32921   tmp="$complete EOL"
32922   arguments="${tmp#* }"
32923 
32924   # Input might be given as Windows format, start by converting to
32925   # unix format.
32926   new_path="$path"
32927 
32928   windows_path="$new_path"
32929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32930     unix_path=`$CYGPATH -u "$windows_path"`
32931     new_path="$unix_path"
32932   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32933     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32934     new_path="$unix_path"
32935   fi
32936 
32937 
32938   # Now try to locate executable using which
32939   new_path=`$WHICH "$new_path" 2> /dev/null`
32940 
32941   if test "x$new_path" = x; then
32942     # Oops. Which didn't find the executable.
32943     # The splitting of arguments from the executable at a space might have been incorrect,
32944     # since paths with space are more likely in Windows. Give it another try with the whole
32945     # argument.
32946     path="$complete"
32947     arguments="EOL"
32948     new_path="$path"
32949 
32950   windows_path="$new_path"
32951   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32952     unix_path=`$CYGPATH -u "$windows_path"`
32953     new_path="$unix_path"
32954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32955     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32956     new_path="$unix_path"
32957   fi
32958 
32959 
32960     new_path=`$WHICH "$new_path" 2> /dev/null`
32961     # bat and cmd files are not always considered executable in MSYS causing which
32962     # to not find them
32963     if test "x$new_path" = x \
32964         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32965         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32966       new_path="$path"
32967 
32968   windows_path="$new_path"
32969   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32970     unix_path=`$CYGPATH -u "$windows_path"`
32971     new_path="$unix_path"
32972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32973     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32974     new_path="$unix_path"
32975   fi
32976 
32977     fi
32978 
32979     if test "x$new_path" = x; then
32980       # It's still not found. Now this is an unrecoverable error.
32981       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32982 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32983       has_space=`$ECHO "$complete" | $GREP " "`
32984       if test "x$has_space" != x; then
32985         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32986 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32987       fi
32988       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32989     fi
32990   fi
32991 
32992   # Now new_path has a complete unix path to the binary
32993   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32994     # Keep paths in /bin as-is, but remove trailing .exe if any
32995     new_path="${new_path/%.exe/}"
32996     # Do not save /bin paths to all_fixpath_prefixes!
32997   else
32998     # Not in mixed or Windows style, start by that.
32999     new_path=`cmd //c echo $new_path`
33000 
33001   input_path="$new_path"
33002   # Check if we need to convert this using DOS-style short mode. If the path
33003   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33004   # take no chances and rewrite it.
33005   # Note: m4 eats our [], so we need to use [ and ] instead.
33006   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33007   if test "x$has_forbidden_chars" != x; then
33008     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33009     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33010   fi
33011 
33012     # Output is in $new_path
33013 
33014   windows_path="$new_path"
33015   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33016     unix_path=`$CYGPATH -u "$windows_path"`
33017     new_path="$unix_path"
33018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33019     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33020     new_path="$unix_path"
33021   fi
33022 
33023     # remove trailing .exe if any
33024     new_path="${new_path/%.exe/}"
33025 
33026     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33027     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33028   fi
33029 
33030     else
33031       # We're on a unix platform. Hooray! :)
33032       # First separate the path from the arguments. This will split at the first
33033       # space.
33034       complete="$CXX"
33035       path="${complete%% *}"
33036       tmp="$complete EOL"
33037       arguments="${tmp#* }"
33038 
33039       # Cannot rely on the command "which" here since it doesn't always work.
33040       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33041       if test -z "$is_absolute_path"; then
33042         # Path to executable is not absolute. Find it.
33043         IFS_save="$IFS"
33044         IFS=:
33045         for p in $PATH; do
33046           if test -f "$p/$path" && test -x "$p/$path"; then
33047             new_path="$p/$path"
33048             break
33049           fi
33050         done
33051         IFS="$IFS_save"
33052       else
33053         # This is an absolute path, we can use it without further modifications.
33054         new_path="$path"
33055       fi
33056 
33057       if test "x$new_path" = x; then
33058         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33059 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33060         has_space=`$ECHO "$complete" | $GREP " "`
33061         if test "x$has_space" != x; then
33062           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33063 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33064         fi
33065         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33066       fi
33067     fi
33068 
33069     # Now join together the path and the arguments once again
33070     if test "x$arguments" != xEOL; then
33071       new_complete="$new_path ${arguments% *}"
33072     else
33073       new_complete="$new_path"
33074     fi
33075 
33076     if test "x$complete" != "x$new_complete"; then
33077       CXX="$new_complete"
33078       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33079 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33080     fi
33081   fi
33082 
33083   TEST_COMPILER="$CXX"
33084   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33085   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33086   if test "x$OPENJDK_BUILD_OS" != xaix; then
33087     # FIXME: This test should not be needed anymore; we don't do that for any platform.
33088     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33089 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33090 
33091   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33092     # Follow a chain of symbolic links. Use readlink
33093     # where it exists, else fall back to horribly
33094     # complicated shell code.
33095     if test "x$READLINK_TESTED" != yes; then
33096       # On MacOSX there is a readlink tool with a different
33097       # purpose than the GNU readlink tool. Check the found readlink.
33098       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33099       if test "x$ISGNU" = x; then
33100         # A readlink that we do not know how to use.
33101         # Are there other non-GNU readlinks out there?
33102         READLINK_TESTED=yes
33103         READLINK=
33104       fi
33105     fi
33106 
33107     if test "x$READLINK" != x; then
33108       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33109     else
33110       # Save the current directory for restoring afterwards
33111       STARTDIR=$PWD
33112       COUNTER=0
33113       sym_link_dir=`$DIRNAME $TEST_COMPILER`
33114       sym_link_file=`$BASENAME $TEST_COMPILER`
33115       cd $sym_link_dir
33116       # Use -P flag to resolve symlinks in directories.
33117       cd `$THEPWDCMD -P`
33118       sym_link_dir=`$THEPWDCMD -P`
33119       # Resolve file symlinks
33120       while test $COUNTER -lt 20; do
33121         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33122         if test "x$ISLINK" == x; then
33123           # This is not a symbolic link! We are done!
33124           break
33125         fi
33126         # Again resolve directory symlinks since the target of the just found
33127         # link could be in a different directory
33128         cd `$DIRNAME $ISLINK`
33129         sym_link_dir=`$THEPWDCMD -P`
33130         sym_link_file=`$BASENAME $ISLINK`
33131         let COUNTER=COUNTER+1
33132       done
33133       cd $STARTDIR
33134       TEST_COMPILER=$sym_link_dir/$sym_link_file
33135     fi
33136   fi
33137 
33138     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33139 $as_echo "$TEST_COMPILER" >&6; }
33140   fi
33141   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33142 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
33143 
33144   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33145   if test "x$COMPILER_BASENAME" = "xccache"; then
33146     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33147 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33148     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33149     # We want to control ccache invocation ourselves, so ignore this cc and try
33150     # searching again.
33151 
33152     # Remove the path to the fake ccache cc from the PATH
33153     RETRY_COMPILER_SAVED_PATH="$PATH"
33154     COMPILER_DIRNAME=`$DIRNAME $CXX`
33155     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33156 
33157     # Try again looking for our compiler
33158     if test -n "$ac_tool_prefix"; then
33159   for ac_prog in $TOOLCHAIN_CXX_BINARY
33160   do
33161     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33162 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33164 $as_echo_n "checking for $ac_word... " >&6; }
33165 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33166   $as_echo_n "(cached) " >&6
33167 else
33168   if test -n "$PROPER_COMPILER_CXX"; then
33169   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33170 else
33171 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33172 for as_dir in $PATH
33173 do
33174   IFS=$as_save_IFS
33175   test -z "$as_dir" && as_dir=.
33176     for ac_exec_ext in '' $ac_executable_extensions; do
33177   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33178     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33179     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33180     break 2
33181   fi
33182 done
33183   done
33184 IFS=$as_save_IFS
33185 
33186 fi
33187 fi
33188 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33189 if test -n "$PROPER_COMPILER_CXX"; then
33190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33191 $as_echo "$PROPER_COMPILER_CXX" >&6; }
33192 else
33193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33194 $as_echo "no" >&6; }
33195 fi
33196 
33197 
33198     test -n "$PROPER_COMPILER_CXX" && break
33199   done
33200 fi
33201 if test -z "$PROPER_COMPILER_CXX"; then
33202   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33203   for ac_prog in $TOOLCHAIN_CXX_BINARY
33204 do
33205   # Extract the first word of "$ac_prog", so it can be a program name with args.
33206 set dummy $ac_prog; ac_word=$2
33207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33208 $as_echo_n "checking for $ac_word... " >&6; }
33209 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33210   $as_echo_n "(cached) " >&6
33211 else
33212   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33213   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33214 else
33215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33216 for as_dir in $PATH
33217 do
33218   IFS=$as_save_IFS
33219   test -z "$as_dir" && as_dir=.
33220     for ac_exec_ext in '' $ac_executable_extensions; do
33221   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33222     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33223     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33224     break 2
33225   fi
33226 done
33227   done
33228 IFS=$as_save_IFS
33229 
33230 fi
33231 fi
33232 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33233 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33235 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33236 else
33237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33238 $as_echo "no" >&6; }
33239 fi
33240 
33241 
33242   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33243 done
33244 
33245   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33246     PROPER_COMPILER_CXX=""
33247   else
33248     case $cross_compiling:$ac_tool_warned in
33249 yes:)
33250 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33251 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33252 ac_tool_warned=yes ;;
33253 esac
33254     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33255   fi
33256 fi
33257 
33258 
33259   # Only process if variable expands to non-empty
33260 
33261   if test "x$PROPER_COMPILER_CXX" != x; then
33262     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33263 
33264   # First separate the path from the arguments. This will split at the first
33265   # space.
33266   complete="$PROPER_COMPILER_CXX"
33267   path="${complete%% *}"
33268   tmp="$complete EOL"
33269   arguments="${tmp#* }"
33270 
33271   # Input might be given as Windows format, start by converting to
33272   # unix format.
33273   new_path=`$CYGPATH -u "$path"`
33274 
33275   # Now try to locate executable using which
33276   new_path=`$WHICH "$new_path" 2> /dev/null`
33277   # bat and cmd files are not always considered executable in cygwin causing which
33278   # to not find them
33279   if test "x$new_path" = x \
33280       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33281       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33282     new_path=`$CYGPATH -u "$path"`
33283   fi
33284   if test "x$new_path" = x; then
33285     # Oops. Which didn't find the executable.
33286     # The splitting of arguments from the executable at a space might have been incorrect,
33287     # since paths with space are more likely in Windows. Give it another try with the whole
33288     # argument.
33289     path="$complete"
33290     arguments="EOL"
33291     new_path=`$CYGPATH -u "$path"`
33292     new_path=`$WHICH "$new_path" 2> /dev/null`
33293     # bat and cmd files are not always considered executable in cygwin causing which
33294     # to not find them
33295     if test "x$new_path" = x \
33296         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33297         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33298       new_path=`$CYGPATH -u "$path"`
33299     fi
33300     if test "x$new_path" = x; then
33301       # It's still not found. Now this is an unrecoverable error.
33302       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33303 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33304       has_space=`$ECHO "$complete" | $GREP " "`
33305       if test "x$has_space" != x; then
33306         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33307 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33308       fi
33309       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33310     fi
33311   fi
33312 
33313   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33314   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33315   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33316   # "foo.exe" is OK but "foo" is an error.
33317   #
33318   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33319   # It is also a way to make sure we got the proper file name for the real test later on.
33320   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33321   if test "x$test_shortpath" = x; then
33322     # Short path failed, file does not exist as specified.
33323     # Try adding .exe or .cmd
33324     if test -f "${new_path}.exe"; then
33325       input_to_shortpath="${new_path}.exe"
33326     elif test -f "${new_path}.cmd"; then
33327       input_to_shortpath="${new_path}.cmd"
33328     else
33329       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33330 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33331       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33332 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33333       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33334     fi
33335   else
33336     input_to_shortpath="$new_path"
33337   fi
33338 
33339   # Call helper function which possibly converts this using DOS-style short mode.
33340   # If so, the updated path is stored in $new_path.
33341   new_path="$input_to_shortpath"
33342 
33343   input_path="$input_to_shortpath"
33344   # Check if we need to convert this using DOS-style short mode. If the path
33345   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33346   # take no chances and rewrite it.
33347   # Note: m4 eats our [], so we need to use [ and ] instead.
33348   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33349   if test "x$has_forbidden_chars" != x; then
33350     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33351     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33352     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33353     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33354       # Going to short mode and back again did indeed matter. Since short mode is
33355       # case insensitive, let's make it lowercase to improve readability.
33356       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33357       # Now convert it back to Unix-style (cygpath)
33358       input_path=`$CYGPATH -u "$shortmode_path"`
33359       new_path="$input_path"
33360     fi
33361   fi
33362 
33363   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33364   if test "x$test_cygdrive_prefix" = x; then
33365     # As a simple fix, exclude /usr/bin since it's not a real path.
33366     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33367       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33368       # a path prefixed by /cygdrive for fixpath to work.
33369       new_path="$CYGWIN_ROOT_PATH$input_path"
33370     fi
33371   fi
33372 
33373   # remove trailing .exe if any
33374   new_path="${new_path/%.exe/}"
33375 
33376     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33377 
33378   # First separate the path from the arguments. This will split at the first
33379   # space.
33380   complete="$PROPER_COMPILER_CXX"
33381   path="${complete%% *}"
33382   tmp="$complete EOL"
33383   arguments="${tmp#* }"
33384 
33385   # Input might be given as Windows format, start by converting to
33386   # unix format.
33387   new_path="$path"
33388 
33389   windows_path="$new_path"
33390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33391     unix_path=`$CYGPATH -u "$windows_path"`
33392     new_path="$unix_path"
33393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33394     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33395     new_path="$unix_path"
33396   fi
33397 
33398 
33399   # Now try to locate executable using which
33400   new_path=`$WHICH "$new_path" 2> /dev/null`
33401 
33402   if test "x$new_path" = x; then
33403     # Oops. Which didn't find the executable.
33404     # The splitting of arguments from the executable at a space might have been incorrect,
33405     # since paths with space are more likely in Windows. Give it another try with the whole
33406     # argument.
33407     path="$complete"
33408     arguments="EOL"
33409     new_path="$path"
33410 
33411   windows_path="$new_path"
33412   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33413     unix_path=`$CYGPATH -u "$windows_path"`
33414     new_path="$unix_path"
33415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33416     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33417     new_path="$unix_path"
33418   fi
33419 
33420 
33421     new_path=`$WHICH "$new_path" 2> /dev/null`
33422     # bat and cmd files are not always considered executable in MSYS causing which
33423     # to not find them
33424     if test "x$new_path" = x \
33425         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33426         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33427       new_path="$path"
33428 
33429   windows_path="$new_path"
33430   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33431     unix_path=`$CYGPATH -u "$windows_path"`
33432     new_path="$unix_path"
33433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33434     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33435     new_path="$unix_path"
33436   fi
33437 
33438     fi
33439 
33440     if test "x$new_path" = x; then
33441       # It's still not found. Now this is an unrecoverable error.
33442       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33443 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33444       has_space=`$ECHO "$complete" | $GREP " "`
33445       if test "x$has_space" != x; then
33446         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33447 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33448       fi
33449       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33450     fi
33451   fi
33452 
33453   # Now new_path has a complete unix path to the binary
33454   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33455     # Keep paths in /bin as-is, but remove trailing .exe if any
33456     new_path="${new_path/%.exe/}"
33457     # Do not save /bin paths to all_fixpath_prefixes!
33458   else
33459     # Not in mixed or Windows style, start by that.
33460     new_path=`cmd //c echo $new_path`
33461 
33462   input_path="$new_path"
33463   # Check if we need to convert this using DOS-style short mode. If the path
33464   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33465   # take no chances and rewrite it.
33466   # Note: m4 eats our [], so we need to use [ and ] instead.
33467   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33468   if test "x$has_forbidden_chars" != x; then
33469     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33470     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33471   fi
33472 
33473     # Output is in $new_path
33474 
33475   windows_path="$new_path"
33476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33477     unix_path=`$CYGPATH -u "$windows_path"`
33478     new_path="$unix_path"
33479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33480     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33481     new_path="$unix_path"
33482   fi
33483 
33484     # remove trailing .exe if any
33485     new_path="${new_path/%.exe/}"
33486 
33487     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33488     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33489   fi
33490 
33491     else
33492       # We're on a unix platform. Hooray! :)
33493       # First separate the path from the arguments. This will split at the first
33494       # space.
33495       complete="$PROPER_COMPILER_CXX"
33496       path="${complete%% *}"
33497       tmp="$complete EOL"
33498       arguments="${tmp#* }"
33499 
33500       # Cannot rely on the command "which" here since it doesn't always work.
33501       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33502       if test -z "$is_absolute_path"; then
33503         # Path to executable is not absolute. Find it.
33504         IFS_save="$IFS"
33505         IFS=:
33506         for p in $PATH; do
33507           if test -f "$p/$path" && test -x "$p/$path"; then
33508             new_path="$p/$path"
33509             break
33510           fi
33511         done
33512         IFS="$IFS_save"
33513       else
33514         # This is an absolute path, we can use it without further modifications.
33515         new_path="$path"
33516       fi
33517 
33518       if test "x$new_path" = x; then
33519         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33520 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33521         has_space=`$ECHO "$complete" | $GREP " "`
33522         if test "x$has_space" != x; then
33523           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33524 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33525         fi
33526         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33527       fi
33528     fi
33529 
33530     # Now join together the path and the arguments once again
33531     if test "x$arguments" != xEOL; then
33532       new_complete="$new_path ${arguments% *}"
33533     else
33534       new_complete="$new_path"
33535     fi
33536 
33537     if test "x$complete" != "x$new_complete"; then
33538       PROPER_COMPILER_CXX="$new_complete"
33539       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
33540 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
33541     fi
33542   fi
33543 
33544     PATH="$RETRY_COMPILER_SAVED_PATH"
33545 
33546     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
33547 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
33548 
33549   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33550     # Follow a chain of symbolic links. Use readlink
33551     # where it exists, else fall back to horribly
33552     # complicated shell code.
33553     if test "x$READLINK_TESTED" != yes; then
33554       # On MacOSX there is a readlink tool with a different
33555       # purpose than the GNU readlink tool. Check the found readlink.
33556       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33557       if test "x$ISGNU" = x; then
33558         # A readlink that we do not know how to use.
33559         # Are there other non-GNU readlinks out there?
33560         READLINK_TESTED=yes
33561         READLINK=
33562       fi
33563     fi
33564 
33565     if test "x$READLINK" != x; then
33566       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
33567     else
33568       # Save the current directory for restoring afterwards
33569       STARTDIR=$PWD
33570       COUNTER=0
33571       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
33572       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
33573       cd $sym_link_dir
33574       # Use -P flag to resolve symlinks in directories.
33575       cd `$THEPWDCMD -P`
33576       sym_link_dir=`$THEPWDCMD -P`
33577       # Resolve file symlinks
33578       while test $COUNTER -lt 20; do
33579         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33580         if test "x$ISLINK" == x; then
33581           # This is not a symbolic link! We are done!
33582           break
33583         fi
33584         # Again resolve directory symlinks since the target of the just found
33585         # link could be in a different directory
33586         cd `$DIRNAME $ISLINK`
33587         sym_link_dir=`$THEPWDCMD -P`
33588         sym_link_file=`$BASENAME $ISLINK`
33589         let COUNTER=COUNTER+1
33590       done
33591       cd $STARTDIR
33592       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
33593     fi
33594   fi
33595 
33596     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33597 $as_echo "$PROPER_COMPILER_CXX" >&6; }
33598     CXX="$PROPER_COMPILER_CXX"
33599   else
33600     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
33601 $as_echo "no, keeping CXX" >&6; }
33602   fi
33603 
33604 
33605   COMPILER=$CXX
33606   COMPILER_NAME=$COMPILER_NAME
33607 
33608   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33609     # cc -V output typically looks like
33610     #     cc: Sun C 5.12 Linux_i386 2011/11/16
33611     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33612     # Check that this is likely to be the Solaris Studio cc.
33613     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33614     if test $? -ne 0; then
33615       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33616       { $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
33617 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33618       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33619 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33620       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33621 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33622       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33623     fi
33624     # Remove usage instructions (if present), and
33625     # collapse compiler output into a single line
33626     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33627         $SED -e 's/ *[Uu]sage:.*//'`
33628     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33629         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33630   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33631     # xlc -qversion output typically looks like
33632     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33633     #     Version: 11.01.0000.0015
33634     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33635     # Check that this is likely to be the IBM XL C compiler.
33636     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33637     if test $? -ne 0; then
33638       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33639       { $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
33640 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33641       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33642 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33643       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33644 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33645       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33646     fi
33647     # Collapse compiler output into a single line
33648     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33649     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33650         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33651   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33652     # There is no specific version flag, but all output starts with a version string.
33653     # First line typically looks something like:
33654     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33655     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33656     # Check that this is likely to be Microsoft CL.EXE.
33657     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33658     if test $? -ne 0; then
33659       { $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
33660 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33661       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33662 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33663       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33664     fi
33665     # Collapse compiler output into a single line
33666     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33667     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33668         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33669   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33670     # gcc --version output typically looks like
33671     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33672     #     Copyright (C) 2013 Free Software Foundation, Inc.
33673     #     This is free software; see the source for copying conditions.  There is NO
33674     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33675     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33676     # Check that this is likely to be GCC.
33677     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33678     if test $? -ne 0; then
33679       { $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
33680 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33681       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33682 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33683       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33684     fi
33685     # Remove Copyright and legalese from version string, and
33686     # collapse into a single line
33687     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33688         $SED -e 's/ *Copyright .*//'`
33689     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33690         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
33691   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33692     # clang --version output typically looks like
33693     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33694     #    clang version 3.3 (tags/RELEASE_33/final)
33695     # or
33696     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33697     #    Target: x86_64-pc-linux-gnu
33698     #    Thread model: posix
33699     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33700     # Check that this is likely to be clang
33701     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33702     if test $? -ne 0; then
33703       { $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
33704 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33705       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33706 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33707       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33708     fi
33709     # Collapse compiler output into a single line
33710     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33711     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33712         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
33713   else
33714       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33715   fi
33716   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33717   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33718   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33719   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
33720 
33721   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33722 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33723 
33724 
33725   # Now that we have resolved CXX ourself, let autoconf have its go at it
33726   ac_ext=cpp
33727 ac_cpp='$CXXCPP $CPPFLAGS'
33728 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33729 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33730 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33731 if test -z "$CXX"; then
33732   if test -n "$CCC"; then
33733     CXX=$CCC
33734   else
33735     if test -n "$ac_tool_prefix"; then
33736   for ac_prog in $CXX
33737   do
33738     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33739 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33741 $as_echo_n "checking for $ac_word... " >&6; }
33742 if ${ac_cv_prog_CXX+:} false; then :
33743   $as_echo_n "(cached) " >&6
33744 else
33745   if test -n "$CXX"; then
33746   ac_cv_prog_CXX="$CXX" # Let the user override the test.
33747 else
33748 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33749 for as_dir in $PATH
33750 do
33751   IFS=$as_save_IFS
33752   test -z "$as_dir" && as_dir=.
33753     for ac_exec_ext in '' $ac_executable_extensions; do
33754   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33755     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33757     break 2
33758   fi
33759 done
33760   done
33761 IFS=$as_save_IFS
33762 
33763 fi
33764 fi
33765 CXX=$ac_cv_prog_CXX
33766 if test -n "$CXX"; then
33767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33768 $as_echo "$CXX" >&6; }
33769 else
33770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33771 $as_echo "no" >&6; }
33772 fi
33773 
33774 
33775     test -n "$CXX" && break
33776   done
33777 fi
33778 if test -z "$CXX"; then
33779   ac_ct_CXX=$CXX
33780   for ac_prog in $CXX
33781 do
33782   # Extract the first word of "$ac_prog", so it can be a program name with args.
33783 set dummy $ac_prog; ac_word=$2
33784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33785 $as_echo_n "checking for $ac_word... " >&6; }
33786 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33787   $as_echo_n "(cached) " >&6
33788 else
33789   if test -n "$ac_ct_CXX"; then
33790   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33791 else
33792 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33793 for as_dir in $PATH
33794 do
33795   IFS=$as_save_IFS
33796   test -z "$as_dir" && as_dir=.
33797     for ac_exec_ext in '' $ac_executable_extensions; do
33798   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33799     ac_cv_prog_ac_ct_CXX="$ac_prog"
33800     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33801     break 2
33802   fi
33803 done
33804   done
33805 IFS=$as_save_IFS
33806 
33807 fi
33808 fi
33809 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33810 if test -n "$ac_ct_CXX"; then
33811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33812 $as_echo "$ac_ct_CXX" >&6; }
33813 else
33814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33815 $as_echo "no" >&6; }
33816 fi
33817 
33818 
33819   test -n "$ac_ct_CXX" && break
33820 done
33821 
33822   if test "x$ac_ct_CXX" = x; then
33823     CXX="g++"
33824   else
33825     case $cross_compiling:$ac_tool_warned in
33826 yes:)
33827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33828 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33829 ac_tool_warned=yes ;;
33830 esac
33831     CXX=$ac_ct_CXX
33832   fi
33833 fi
33834 
33835   fi
33836 fi
33837 # Provide some information about the compiler.
33838 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
33839 set X $ac_compile
33840 ac_compiler=$2
33841 for ac_option in --version -v -V -qversion; do
33842   { { ac_try="$ac_compiler $ac_option >&5"
33843 case "(($ac_try" in
33844   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33845   *) ac_try_echo=$ac_try;;
33846 esac
33847 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33848 $as_echo "$ac_try_echo"; } >&5
33849   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33850   ac_status=$?
33851   if test -s conftest.err; then
33852     sed '10a\
33853 ... rest of stderr output deleted ...
33854          10q' conftest.err >conftest.er1
33855     cat conftest.er1 >&5
33856   fi
33857   rm -f conftest.er1 conftest.err
33858   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33859   test $ac_status = 0; }
33860 done
33861 
33862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
33863 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
33864 if ${ac_cv_cxx_compiler_gnu+:} false; then :
33865   $as_echo_n "(cached) " >&6
33866 else
33867   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33868 /* end confdefs.h.  */
33869 
33870 int
33871 main ()
33872 {
33873 #ifndef __GNUC__
33874        choke me
33875 #endif
33876 
33877   ;
33878   return 0;
33879 }
33880 _ACEOF
33881 if ac_fn_cxx_try_compile "$LINENO"; then :
33882   ac_compiler_gnu=yes
33883 else
33884   ac_compiler_gnu=no
33885 fi
33886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33887 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
33888 
33889 fi
33890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
33891 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
33892 if test $ac_compiler_gnu = yes; then
33893   GXX=yes
33894 else
33895   GXX=
33896 fi
33897 ac_test_CXXFLAGS=${CXXFLAGS+set}
33898 ac_save_CXXFLAGS=$CXXFLAGS
33899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
33900 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
33901 if ${ac_cv_prog_cxx_g+:} false; then :
33902   $as_echo_n "(cached) " >&6
33903 else
33904   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
33905    ac_cxx_werror_flag=yes
33906    ac_cv_prog_cxx_g=no
33907    CXXFLAGS="-g"
33908    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33909 /* end confdefs.h.  */
33910 
33911 int
33912 main ()
33913 {
33914 
33915   ;
33916   return 0;
33917 }
33918 _ACEOF
33919 if ac_fn_cxx_try_compile "$LINENO"; then :
33920   ac_cv_prog_cxx_g=yes
33921 else
33922   CXXFLAGS=""
33923       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33924 /* end confdefs.h.  */
33925 
33926 int
33927 main ()
33928 {
33929 
33930   ;
33931   return 0;
33932 }
33933 _ACEOF
33934 if ac_fn_cxx_try_compile "$LINENO"; then :
33935 
33936 else
33937   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33938          CXXFLAGS="-g"
33939          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33940 /* end confdefs.h.  */
33941 
33942 int
33943 main ()
33944 {
33945 
33946   ;
33947   return 0;
33948 }
33949 _ACEOF
33950 if ac_fn_cxx_try_compile "$LINENO"; then :
33951   ac_cv_prog_cxx_g=yes
33952 fi
33953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33954 fi
33955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33956 fi
33957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33958    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33959 fi
33960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
33961 $as_echo "$ac_cv_prog_cxx_g" >&6; }
33962 if test "$ac_test_CXXFLAGS" = set; then
33963   CXXFLAGS=$ac_save_CXXFLAGS
33964 elif test $ac_cv_prog_cxx_g = yes; then
33965   if test "$GXX" = yes; then
33966     CXXFLAGS="-g -O2"
33967   else
33968     CXXFLAGS="-g"
33969   fi
33970 else
33971   if test "$GXX" = yes; then
33972     CXXFLAGS="-O2"
33973   else
33974     CXXFLAGS=
33975   fi
33976 fi
33977 ac_ext=cpp
33978 ac_cpp='$CXXCPP $CPPFLAGS'
33979 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33980 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33981 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33982 
33983 
33984   #
33985   # Setup the preprocessor (CPP and CXXCPP)
33986   #
33987   ac_ext=c
33988 ac_cpp='$CPP $CPPFLAGS'
33989 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33990 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33991 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
33993 $as_echo_n "checking how to run the C preprocessor... " >&6; }
33994 # On Suns, sometimes $CPP names a directory.
33995 if test -n "$CPP" && test -d "$CPP"; then
33996   CPP=
33997 fi
33998 if test -z "$CPP"; then
33999   if ${ac_cv_prog_CPP+:} false; then :
34000   $as_echo_n "(cached) " >&6
34001 else
34002       # Double quotes because CPP needs to be expanded
34003     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34004     do
34005       ac_preproc_ok=false
34006 for ac_c_preproc_warn_flag in '' yes
34007 do
34008   # Use a header file that comes with gcc, so configuring glibc
34009   # with a fresh cross-compiler works.
34010   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34011   # <limits.h> exists even on freestanding compilers.
34012   # On the NeXT, cc -E runs the code through the compiler's parser,
34013   # not just through cpp. "Syntax error" is here to catch this case.
34014   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34015 /* end confdefs.h.  */
34016 #ifdef __STDC__
34017 # include <limits.h>
34018 #else
34019 # include <assert.h>
34020 #endif
34021                      Syntax error
34022 _ACEOF
34023 if ac_fn_c_try_cpp "$LINENO"; then :
34024 
34025 else
34026   # Broken: fails on valid input.
34027 continue
34028 fi
34029 rm -f conftest.err conftest.i conftest.$ac_ext
34030 
34031   # OK, works on sane cases.  Now check whether nonexistent headers
34032   # can be detected and how.
34033   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34034 /* end confdefs.h.  */
34035 #include <ac_nonexistent.h>
34036 _ACEOF
34037 if ac_fn_c_try_cpp "$LINENO"; then :
34038   # Broken: success on invalid input.
34039 continue
34040 else
34041   # Passes both tests.
34042 ac_preproc_ok=:
34043 break
34044 fi
34045 rm -f conftest.err conftest.i conftest.$ac_ext
34046 
34047 done
34048 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34049 rm -f conftest.i conftest.err conftest.$ac_ext
34050 if $ac_preproc_ok; then :
34051   break
34052 fi
34053 
34054     done
34055     ac_cv_prog_CPP=$CPP
34056 
34057 fi
34058   CPP=$ac_cv_prog_CPP
34059 else
34060   ac_cv_prog_CPP=$CPP
34061 fi
34062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34063 $as_echo "$CPP" >&6; }
34064 ac_preproc_ok=false
34065 for ac_c_preproc_warn_flag in '' yes
34066 do
34067   # Use a header file that comes with gcc, so configuring glibc
34068   # with a fresh cross-compiler works.
34069   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34070   # <limits.h> exists even on freestanding compilers.
34071   # On the NeXT, cc -E runs the code through the compiler's parser,
34072   # not just through cpp. "Syntax error" is here to catch this case.
34073   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34074 /* end confdefs.h.  */
34075 #ifdef __STDC__
34076 # include <limits.h>
34077 #else
34078 # include <assert.h>
34079 #endif
34080                      Syntax error
34081 _ACEOF
34082 if ac_fn_c_try_cpp "$LINENO"; then :
34083 
34084 else
34085   # Broken: fails on valid input.
34086 continue
34087 fi
34088 rm -f conftest.err conftest.i conftest.$ac_ext
34089 
34090   # OK, works on sane cases.  Now check whether nonexistent headers
34091   # can be detected and how.
34092   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34093 /* end confdefs.h.  */
34094 #include <ac_nonexistent.h>
34095 _ACEOF
34096 if ac_fn_c_try_cpp "$LINENO"; then :
34097   # Broken: success on invalid input.
34098 continue
34099 else
34100   # Passes both tests.
34101 ac_preproc_ok=:
34102 break
34103 fi
34104 rm -f conftest.err conftest.i conftest.$ac_ext
34105 
34106 done
34107 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34108 rm -f conftest.i conftest.err conftest.$ac_ext
34109 if $ac_preproc_ok; then :
34110 
34111 else
34112   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34113 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34114 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34115 See \`config.log' for more details" "$LINENO" 5; }
34116 fi
34117 
34118 ac_ext=cpp
34119 ac_cpp='$CXXCPP $CPPFLAGS'
34120 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34121 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34122 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34123 
34124 
34125   # Only process if variable expands to non-empty
34126 
34127   if test "x$CPP" != x; then
34128     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34129 
34130   # First separate the path from the arguments. This will split at the first
34131   # space.
34132   complete="$CPP"
34133   path="${complete%% *}"
34134   tmp="$complete EOL"
34135   arguments="${tmp#* }"
34136 
34137   # Input might be given as Windows format, start by converting to
34138   # unix format.
34139   new_path=`$CYGPATH -u "$path"`
34140 
34141   # Now try to locate executable using which
34142   new_path=`$WHICH "$new_path" 2> /dev/null`
34143   # bat and cmd files are not always considered executable in cygwin causing which
34144   # to not find them
34145   if test "x$new_path" = x \
34146       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34147       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34148     new_path=`$CYGPATH -u "$path"`
34149   fi
34150   if test "x$new_path" = x; then
34151     # Oops. Which didn't find the executable.
34152     # The splitting of arguments from the executable at a space might have been incorrect,
34153     # since paths with space are more likely in Windows. Give it another try with the whole
34154     # argument.
34155     path="$complete"
34156     arguments="EOL"
34157     new_path=`$CYGPATH -u "$path"`
34158     new_path=`$WHICH "$new_path" 2> /dev/null`
34159     # bat and cmd files are not always considered executable in cygwin causing which
34160     # to not find them
34161     if test "x$new_path" = x \
34162         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34163         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34164       new_path=`$CYGPATH -u "$path"`
34165     fi
34166     if test "x$new_path" = x; then
34167       # It's still not found. Now this is an unrecoverable error.
34168       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34169 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34170       has_space=`$ECHO "$complete" | $GREP " "`
34171       if test "x$has_space" != x; then
34172         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34173 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34174       fi
34175       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34176     fi
34177   fi
34178 
34179   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34180   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34181   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34182   # "foo.exe" is OK but "foo" is an error.
34183   #
34184   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34185   # It is also a way to make sure we got the proper file name for the real test later on.
34186   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34187   if test "x$test_shortpath" = x; then
34188     # Short path failed, file does not exist as specified.
34189     # Try adding .exe or .cmd
34190     if test -f "${new_path}.exe"; then
34191       input_to_shortpath="${new_path}.exe"
34192     elif test -f "${new_path}.cmd"; then
34193       input_to_shortpath="${new_path}.cmd"
34194     else
34195       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34196 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34197       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34198 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34199       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34200     fi
34201   else
34202     input_to_shortpath="$new_path"
34203   fi
34204 
34205   # Call helper function which possibly converts this using DOS-style short mode.
34206   # If so, the updated path is stored in $new_path.
34207   new_path="$input_to_shortpath"
34208 
34209   input_path="$input_to_shortpath"
34210   # Check if we need to convert this using DOS-style short mode. If the path
34211   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34212   # take no chances and rewrite it.
34213   # Note: m4 eats our [], so we need to use [ and ] instead.
34214   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34215   if test "x$has_forbidden_chars" != x; then
34216     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34217     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34218     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34219     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34220       # Going to short mode and back again did indeed matter. Since short mode is
34221       # case insensitive, let's make it lowercase to improve readability.
34222       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34223       # Now convert it back to Unix-style (cygpath)
34224       input_path=`$CYGPATH -u "$shortmode_path"`
34225       new_path="$input_path"
34226     fi
34227   fi
34228 
34229   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34230   if test "x$test_cygdrive_prefix" = x; then
34231     # As a simple fix, exclude /usr/bin since it's not a real path.
34232     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34233       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34234       # a path prefixed by /cygdrive for fixpath to work.
34235       new_path="$CYGWIN_ROOT_PATH$input_path"
34236     fi
34237   fi
34238 
34239   # remove trailing .exe if any
34240   new_path="${new_path/%.exe/}"
34241 
34242     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34243 
34244   # First separate the path from the arguments. This will split at the first
34245   # space.
34246   complete="$CPP"
34247   path="${complete%% *}"
34248   tmp="$complete EOL"
34249   arguments="${tmp#* }"
34250 
34251   # Input might be given as Windows format, start by converting to
34252   # unix format.
34253   new_path="$path"
34254 
34255   windows_path="$new_path"
34256   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34257     unix_path=`$CYGPATH -u "$windows_path"`
34258     new_path="$unix_path"
34259   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34260     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34261     new_path="$unix_path"
34262   fi
34263 
34264 
34265   # Now try to locate executable using which
34266   new_path=`$WHICH "$new_path" 2> /dev/null`
34267 
34268   if test "x$new_path" = x; then
34269     # Oops. Which didn't find the executable.
34270     # The splitting of arguments from the executable at a space might have been incorrect,
34271     # since paths with space are more likely in Windows. Give it another try with the whole
34272     # argument.
34273     path="$complete"
34274     arguments="EOL"
34275     new_path="$path"
34276 
34277   windows_path="$new_path"
34278   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34279     unix_path=`$CYGPATH -u "$windows_path"`
34280     new_path="$unix_path"
34281   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34282     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34283     new_path="$unix_path"
34284   fi
34285 
34286 
34287     new_path=`$WHICH "$new_path" 2> /dev/null`
34288     # bat and cmd files are not always considered executable in MSYS causing which
34289     # to not find them
34290     if test "x$new_path" = x \
34291         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34292         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34293       new_path="$path"
34294 
34295   windows_path="$new_path"
34296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34297     unix_path=`$CYGPATH -u "$windows_path"`
34298     new_path="$unix_path"
34299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34300     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34301     new_path="$unix_path"
34302   fi
34303 
34304     fi
34305 
34306     if test "x$new_path" = x; then
34307       # It's still not found. Now this is an unrecoverable error.
34308       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34309 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34310       has_space=`$ECHO "$complete" | $GREP " "`
34311       if test "x$has_space" != x; then
34312         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34313 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34314       fi
34315       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34316     fi
34317   fi
34318 
34319   # Now new_path has a complete unix path to the binary
34320   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34321     # Keep paths in /bin as-is, but remove trailing .exe if any
34322     new_path="${new_path/%.exe/}"
34323     # Do not save /bin paths to all_fixpath_prefixes!
34324   else
34325     # Not in mixed or Windows style, start by that.
34326     new_path=`cmd //c echo $new_path`
34327 
34328   input_path="$new_path"
34329   # Check if we need to convert this using DOS-style short mode. If the path
34330   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34331   # take no chances and rewrite it.
34332   # Note: m4 eats our [], so we need to use [ and ] instead.
34333   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34334   if test "x$has_forbidden_chars" != x; then
34335     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34336     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34337   fi
34338 
34339     # Output is in $new_path
34340 
34341   windows_path="$new_path"
34342   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34343     unix_path=`$CYGPATH -u "$windows_path"`
34344     new_path="$unix_path"
34345   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34346     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34347     new_path="$unix_path"
34348   fi
34349 
34350     # remove trailing .exe if any
34351     new_path="${new_path/%.exe/}"
34352 
34353     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34354     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34355   fi
34356 
34357     else
34358       # We're on a unix platform. Hooray! :)
34359       # First separate the path from the arguments. This will split at the first
34360       # space.
34361       complete="$CPP"
34362       path="${complete%% *}"
34363       tmp="$complete EOL"
34364       arguments="${tmp#* }"
34365 
34366       # Cannot rely on the command "which" here since it doesn't always work.
34367       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34368       if test -z "$is_absolute_path"; then
34369         # Path to executable is not absolute. Find it.
34370         IFS_save="$IFS"
34371         IFS=:
34372         for p in $PATH; do
34373           if test -f "$p/$path" && test -x "$p/$path"; then
34374             new_path="$p/$path"
34375             break
34376           fi
34377         done
34378         IFS="$IFS_save"
34379       else
34380         # This is an absolute path, we can use it without further modifications.
34381         new_path="$path"
34382       fi
34383 
34384       if test "x$new_path" = x; then
34385         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34386 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34387         has_space=`$ECHO "$complete" | $GREP " "`
34388         if test "x$has_space" != x; then
34389           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34390 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34391         fi
34392         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34393       fi
34394     fi
34395 
34396     # Now join together the path and the arguments once again
34397     if test "x$arguments" != xEOL; then
34398       new_complete="$new_path ${arguments% *}"
34399     else
34400       new_complete="$new_path"
34401     fi
34402 
34403     if test "x$complete" != "x$new_complete"; then
34404       CPP="$new_complete"
34405       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34406 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34407     fi
34408   fi
34409 
34410   ac_ext=cpp
34411 ac_cpp='$CXXCPP $CPPFLAGS'
34412 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34413 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34414 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34416 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34417 if test -z "$CXXCPP"; then
34418   if ${ac_cv_prog_CXXCPP+:} false; then :
34419   $as_echo_n "(cached) " >&6
34420 else
34421       # Double quotes because CXXCPP needs to be expanded
34422     for CXXCPP in "$CXX -E" "/lib/cpp"
34423     do
34424       ac_preproc_ok=false
34425 for ac_cxx_preproc_warn_flag in '' yes
34426 do
34427   # Use a header file that comes with gcc, so configuring glibc
34428   # with a fresh cross-compiler works.
34429   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34430   # <limits.h> exists even on freestanding compilers.
34431   # On the NeXT, cc -E runs the code through the compiler's parser,
34432   # not just through cpp. "Syntax error" is here to catch this case.
34433   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34434 /* end confdefs.h.  */
34435 #ifdef __STDC__
34436 # include <limits.h>
34437 #else
34438 # include <assert.h>
34439 #endif
34440                      Syntax error
34441 _ACEOF
34442 if ac_fn_cxx_try_cpp "$LINENO"; then :
34443 
34444 else
34445   # Broken: fails on valid input.
34446 continue
34447 fi
34448 rm -f conftest.err conftest.i conftest.$ac_ext
34449 
34450   # OK, works on sane cases.  Now check whether nonexistent headers
34451   # can be detected and how.
34452   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34453 /* end confdefs.h.  */
34454 #include <ac_nonexistent.h>
34455 _ACEOF
34456 if ac_fn_cxx_try_cpp "$LINENO"; then :
34457   # Broken: success on invalid input.
34458 continue
34459 else
34460   # Passes both tests.
34461 ac_preproc_ok=:
34462 break
34463 fi
34464 rm -f conftest.err conftest.i conftest.$ac_ext
34465 
34466 done
34467 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34468 rm -f conftest.i conftest.err conftest.$ac_ext
34469 if $ac_preproc_ok; then :
34470   break
34471 fi
34472 
34473     done
34474     ac_cv_prog_CXXCPP=$CXXCPP
34475 
34476 fi
34477   CXXCPP=$ac_cv_prog_CXXCPP
34478 else
34479   ac_cv_prog_CXXCPP=$CXXCPP
34480 fi
34481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34482 $as_echo "$CXXCPP" >&6; }
34483 ac_preproc_ok=false
34484 for ac_cxx_preproc_warn_flag in '' yes
34485 do
34486   # Use a header file that comes with gcc, so configuring glibc
34487   # with a fresh cross-compiler works.
34488   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34489   # <limits.h> exists even on freestanding compilers.
34490   # On the NeXT, cc -E runs the code through the compiler's parser,
34491   # not just through cpp. "Syntax error" is here to catch this case.
34492   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34493 /* end confdefs.h.  */
34494 #ifdef __STDC__
34495 # include <limits.h>
34496 #else
34497 # include <assert.h>
34498 #endif
34499                      Syntax error
34500 _ACEOF
34501 if ac_fn_cxx_try_cpp "$LINENO"; then :
34502 
34503 else
34504   # Broken: fails on valid input.
34505 continue
34506 fi
34507 rm -f conftest.err conftest.i conftest.$ac_ext
34508 
34509   # OK, works on sane cases.  Now check whether nonexistent headers
34510   # can be detected and how.
34511   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34512 /* end confdefs.h.  */
34513 #include <ac_nonexistent.h>
34514 _ACEOF
34515 if ac_fn_cxx_try_cpp "$LINENO"; then :
34516   # Broken: success on invalid input.
34517 continue
34518 else
34519   # Passes both tests.
34520 ac_preproc_ok=:
34521 break
34522 fi
34523 rm -f conftest.err conftest.i conftest.$ac_ext
34524 
34525 done
34526 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34527 rm -f conftest.i conftest.err conftest.$ac_ext
34528 if $ac_preproc_ok; then :
34529 
34530 else
34531   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34532 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34533 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34534 See \`config.log' for more details" "$LINENO" 5; }
34535 fi
34536 
34537 ac_ext=cpp
34538 ac_cpp='$CXXCPP $CPPFLAGS'
34539 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34540 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34541 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34542 
34543 
34544   # Only process if variable expands to non-empty
34545 
34546   if test "x$CXXCPP" != x; then
34547     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34548 
34549   # First separate the path from the arguments. This will split at the first
34550   # space.
34551   complete="$CXXCPP"
34552   path="${complete%% *}"
34553   tmp="$complete EOL"
34554   arguments="${tmp#* }"
34555 
34556   # Input might be given as Windows format, start by converting to
34557   # unix format.
34558   new_path=`$CYGPATH -u "$path"`
34559 
34560   # Now try to locate executable using which
34561   new_path=`$WHICH "$new_path" 2> /dev/null`
34562   # bat and cmd files are not always considered executable in cygwin causing which
34563   # to not find them
34564   if test "x$new_path" = x \
34565       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34566       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34567     new_path=`$CYGPATH -u "$path"`
34568   fi
34569   if test "x$new_path" = x; then
34570     # Oops. Which didn't find the executable.
34571     # The splitting of arguments from the executable at a space might have been incorrect,
34572     # since paths with space are more likely in Windows. Give it another try with the whole
34573     # argument.
34574     path="$complete"
34575     arguments="EOL"
34576     new_path=`$CYGPATH -u "$path"`
34577     new_path=`$WHICH "$new_path" 2> /dev/null`
34578     # bat and cmd files are not always considered executable in cygwin causing which
34579     # to not find them
34580     if test "x$new_path" = x \
34581         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34582         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34583       new_path=`$CYGPATH -u "$path"`
34584     fi
34585     if test "x$new_path" = x; then
34586       # It's still not found. Now this is an unrecoverable error.
34587       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34588 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34589       has_space=`$ECHO "$complete" | $GREP " "`
34590       if test "x$has_space" != x; then
34591         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34592 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34593       fi
34594       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34595     fi
34596   fi
34597 
34598   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34599   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34600   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34601   # "foo.exe" is OK but "foo" is an error.
34602   #
34603   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34604   # It is also a way to make sure we got the proper file name for the real test later on.
34605   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34606   if test "x$test_shortpath" = x; then
34607     # Short path failed, file does not exist as specified.
34608     # Try adding .exe or .cmd
34609     if test -f "${new_path}.exe"; then
34610       input_to_shortpath="${new_path}.exe"
34611     elif test -f "${new_path}.cmd"; then
34612       input_to_shortpath="${new_path}.cmd"
34613     else
34614       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34615 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34616       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34617 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34618       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34619     fi
34620   else
34621     input_to_shortpath="$new_path"
34622   fi
34623 
34624   # Call helper function which possibly converts this using DOS-style short mode.
34625   # If so, the updated path is stored in $new_path.
34626   new_path="$input_to_shortpath"
34627 
34628   input_path="$input_to_shortpath"
34629   # Check if we need to convert this using DOS-style short mode. If the path
34630   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34631   # take no chances and rewrite it.
34632   # Note: m4 eats our [], so we need to use [ and ] instead.
34633   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34634   if test "x$has_forbidden_chars" != x; then
34635     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34636     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34637     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34638     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34639       # Going to short mode and back again did indeed matter. Since short mode is
34640       # case insensitive, let's make it lowercase to improve readability.
34641       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34642       # Now convert it back to Unix-style (cygpath)
34643       input_path=`$CYGPATH -u "$shortmode_path"`
34644       new_path="$input_path"
34645     fi
34646   fi
34647 
34648   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34649   if test "x$test_cygdrive_prefix" = x; then
34650     # As a simple fix, exclude /usr/bin since it's not a real path.
34651     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34652       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34653       # a path prefixed by /cygdrive for fixpath to work.
34654       new_path="$CYGWIN_ROOT_PATH$input_path"
34655     fi
34656   fi
34657 
34658   # remove trailing .exe if any
34659   new_path="${new_path/%.exe/}"
34660 
34661     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34662 
34663   # First separate the path from the arguments. This will split at the first
34664   # space.
34665   complete="$CXXCPP"
34666   path="${complete%% *}"
34667   tmp="$complete EOL"
34668   arguments="${tmp#* }"
34669 
34670   # Input might be given as Windows format, start by converting to
34671   # unix format.
34672   new_path="$path"
34673 
34674   windows_path="$new_path"
34675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34676     unix_path=`$CYGPATH -u "$windows_path"`
34677     new_path="$unix_path"
34678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34680     new_path="$unix_path"
34681   fi
34682 
34683 
34684   # Now try to locate executable using which
34685   new_path=`$WHICH "$new_path" 2> /dev/null`
34686 
34687   if test "x$new_path" = x; then
34688     # Oops. Which didn't find the executable.
34689     # The splitting of arguments from the executable at a space might have been incorrect,
34690     # since paths with space are more likely in Windows. Give it another try with the whole
34691     # argument.
34692     path="$complete"
34693     arguments="EOL"
34694     new_path="$path"
34695 
34696   windows_path="$new_path"
34697   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34698     unix_path=`$CYGPATH -u "$windows_path"`
34699     new_path="$unix_path"
34700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34701     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34702     new_path="$unix_path"
34703   fi
34704 
34705 
34706     new_path=`$WHICH "$new_path" 2> /dev/null`
34707     # bat and cmd files are not always considered executable in MSYS causing which
34708     # to not find them
34709     if test "x$new_path" = x \
34710         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34711         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34712       new_path="$path"
34713 
34714   windows_path="$new_path"
34715   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34716     unix_path=`$CYGPATH -u "$windows_path"`
34717     new_path="$unix_path"
34718   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34719     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34720     new_path="$unix_path"
34721   fi
34722 
34723     fi
34724 
34725     if test "x$new_path" = x; then
34726       # It's still not found. Now this is an unrecoverable error.
34727       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34728 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34729       has_space=`$ECHO "$complete" | $GREP " "`
34730       if test "x$has_space" != x; then
34731         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34732 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34733       fi
34734       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34735     fi
34736   fi
34737 
34738   # Now new_path has a complete unix path to the binary
34739   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34740     # Keep paths in /bin as-is, but remove trailing .exe if any
34741     new_path="${new_path/%.exe/}"
34742     # Do not save /bin paths to all_fixpath_prefixes!
34743   else
34744     # Not in mixed or Windows style, start by that.
34745     new_path=`cmd //c echo $new_path`
34746 
34747   input_path="$new_path"
34748   # Check if we need to convert this using DOS-style short mode. If the path
34749   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34750   # take no chances and rewrite it.
34751   # Note: m4 eats our [], so we need to use [ and ] instead.
34752   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34753   if test "x$has_forbidden_chars" != x; then
34754     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34755     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34756   fi
34757 
34758     # Output is in $new_path
34759 
34760   windows_path="$new_path"
34761   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34762     unix_path=`$CYGPATH -u "$windows_path"`
34763     new_path="$unix_path"
34764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34765     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34766     new_path="$unix_path"
34767   fi
34768 
34769     # remove trailing .exe if any
34770     new_path="${new_path/%.exe/}"
34771 
34772     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34773     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34774   fi
34775 
34776     else
34777       # We're on a unix platform. Hooray! :)
34778       # First separate the path from the arguments. This will split at the first
34779       # space.
34780       complete="$CXXCPP"
34781       path="${complete%% *}"
34782       tmp="$complete EOL"
34783       arguments="${tmp#* }"
34784 
34785       # Cannot rely on the command "which" here since it doesn't always work.
34786       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34787       if test -z "$is_absolute_path"; then
34788         # Path to executable is not absolute. Find it.
34789         IFS_save="$IFS"
34790         IFS=:
34791         for p in $PATH; do
34792           if test -f "$p/$path" && test -x "$p/$path"; then
34793             new_path="$p/$path"
34794             break
34795           fi
34796         done
34797         IFS="$IFS_save"
34798       else
34799         # This is an absolute path, we can use it without further modifications.
34800         new_path="$path"
34801       fi
34802 
34803       if test "x$new_path" = x; then
34804         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34805 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34806         has_space=`$ECHO "$complete" | $GREP " "`
34807         if test "x$has_space" != x; then
34808           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34809 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34810         fi
34811         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34812       fi
34813     fi
34814 
34815     # Now join together the path and the arguments once again
34816     if test "x$arguments" != xEOL; then
34817       new_complete="$new_path ${arguments% *}"
34818     else
34819       new_complete="$new_path"
34820     fi
34821 
34822     if test "x$complete" != "x$new_complete"; then
34823       CXXCPP="$new_complete"
34824       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34825 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34826     fi
34827   fi
34828 
34829 
34830   #
34831   # Setup the linker (LD)
34832   #
34833   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34834     # In the Microsoft toolchain we have a separate LD command "link".
34835     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
34836     # a cygwin program for something completely different.
34837     # Extract the first word of "link", so it can be a program name with args.
34838 set dummy link; ac_word=$2
34839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34840 $as_echo_n "checking for $ac_word... " >&6; }
34841 if ${ac_cv_prog_LD+:} false; then :
34842   $as_echo_n "(cached) " >&6
34843 else
34844   if test -n "$LD"; then
34845   ac_cv_prog_LD="$LD" # Let the user override the test.
34846 else
34847   ac_prog_rejected=no
34848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34849 for as_dir in $PATH
34850 do
34851   IFS=$as_save_IFS
34852   test -z "$as_dir" && as_dir=.
34853     for ac_exec_ext in '' $ac_executable_extensions; do
34854   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34855     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
34856        ac_prog_rejected=yes
34857        continue
34858      fi
34859     ac_cv_prog_LD="link"
34860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34861     break 2
34862   fi
34863 done
34864   done
34865 IFS=$as_save_IFS
34866 
34867 if test $ac_prog_rejected = yes; then
34868   # We found a bogon in the path, so make sure we never use it.
34869   set dummy $ac_cv_prog_LD
34870   shift
34871   if test $# != 0; then
34872     # We chose a different compiler from the bogus one.
34873     # However, it has the same basename, so the bogon will be chosen
34874     # first if we set LD to just the basename; use the full file name.
34875     shift
34876     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
34877   fi
34878 fi
34879 fi
34880 fi
34881 LD=$ac_cv_prog_LD
34882 if test -n "$LD"; then
34883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34884 $as_echo "$LD" >&6; }
34885 else
34886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34887 $as_echo "no" >&6; }
34888 fi
34889 
34890 
34891 
34892   # Only process if variable expands to non-empty
34893 
34894   if test "x$LD" != x; then
34895     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34896 
34897   # First separate the path from the arguments. This will split at the first
34898   # space.
34899   complete="$LD"
34900   path="${complete%% *}"
34901   tmp="$complete EOL"
34902   arguments="${tmp#* }"
34903 
34904   # Input might be given as Windows format, start by converting to
34905   # unix format.
34906   new_path=`$CYGPATH -u "$path"`
34907 
34908   # Now try to locate executable using which
34909   new_path=`$WHICH "$new_path" 2> /dev/null`
34910   # bat and cmd files are not always considered executable in cygwin causing which
34911   # to not find them
34912   if test "x$new_path" = x \
34913       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34914       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34915     new_path=`$CYGPATH -u "$path"`
34916   fi
34917   if test "x$new_path" = x; then
34918     # Oops. Which didn't find the executable.
34919     # The splitting of arguments from the executable at a space might have been incorrect,
34920     # since paths with space are more likely in Windows. Give it another try with the whole
34921     # argument.
34922     path="$complete"
34923     arguments="EOL"
34924     new_path=`$CYGPATH -u "$path"`
34925     new_path=`$WHICH "$new_path" 2> /dev/null`
34926     # bat and cmd files are not always considered executable in cygwin causing which
34927     # to not find them
34928     if test "x$new_path" = x \
34929         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34930         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34931       new_path=`$CYGPATH -u "$path"`
34932     fi
34933     if test "x$new_path" = x; then
34934       # It's still not found. Now this is an unrecoverable error.
34935       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34936 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34937       has_space=`$ECHO "$complete" | $GREP " "`
34938       if test "x$has_space" != x; then
34939         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34940 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34941       fi
34942       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34943     fi
34944   fi
34945 
34946   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34947   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34948   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34949   # "foo.exe" is OK but "foo" is an error.
34950   #
34951   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34952   # It is also a way to make sure we got the proper file name for the real test later on.
34953   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34954   if test "x$test_shortpath" = x; then
34955     # Short path failed, file does not exist as specified.
34956     # Try adding .exe or .cmd
34957     if test -f "${new_path}.exe"; then
34958       input_to_shortpath="${new_path}.exe"
34959     elif test -f "${new_path}.cmd"; then
34960       input_to_shortpath="${new_path}.cmd"
34961     else
34962       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
34963 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
34964       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34965 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34966       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34967     fi
34968   else
34969     input_to_shortpath="$new_path"
34970   fi
34971 
34972   # Call helper function which possibly converts this using DOS-style short mode.
34973   # If so, the updated path is stored in $new_path.
34974   new_path="$input_to_shortpath"
34975 
34976   input_path="$input_to_shortpath"
34977   # Check if we need to convert this using DOS-style short mode. If the path
34978   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34979   # take no chances and rewrite it.
34980   # Note: m4 eats our [], so we need to use [ and ] instead.
34981   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34982   if test "x$has_forbidden_chars" != x; then
34983     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34984     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34985     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34986     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34987       # Going to short mode and back again did indeed matter. Since short mode is
34988       # case insensitive, let's make it lowercase to improve readability.
34989       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34990       # Now convert it back to Unix-style (cygpath)
34991       input_path=`$CYGPATH -u "$shortmode_path"`
34992       new_path="$input_path"
34993     fi
34994   fi
34995 
34996   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34997   if test "x$test_cygdrive_prefix" = x; then
34998     # As a simple fix, exclude /usr/bin since it's not a real path.
34999     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35000       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35001       # a path prefixed by /cygdrive for fixpath to work.
35002       new_path="$CYGWIN_ROOT_PATH$input_path"
35003     fi
35004   fi
35005 
35006   # remove trailing .exe if any
35007   new_path="${new_path/%.exe/}"
35008 
35009     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35010 
35011   # First separate the path from the arguments. This will split at the first
35012   # space.
35013   complete="$LD"
35014   path="${complete%% *}"
35015   tmp="$complete EOL"
35016   arguments="${tmp#* }"
35017 
35018   # Input might be given as Windows format, start by converting to
35019   # unix format.
35020   new_path="$path"
35021 
35022   windows_path="$new_path"
35023   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35024     unix_path=`$CYGPATH -u "$windows_path"`
35025     new_path="$unix_path"
35026   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35027     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35028     new_path="$unix_path"
35029   fi
35030 
35031 
35032   # Now try to locate executable using which
35033   new_path=`$WHICH "$new_path" 2> /dev/null`
35034 
35035   if test "x$new_path" = x; then
35036     # Oops. Which didn't find the executable.
35037     # The splitting of arguments from the executable at a space might have been incorrect,
35038     # since paths with space are more likely in Windows. Give it another try with the whole
35039     # argument.
35040     path="$complete"
35041     arguments="EOL"
35042     new_path="$path"
35043 
35044   windows_path="$new_path"
35045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35046     unix_path=`$CYGPATH -u "$windows_path"`
35047     new_path="$unix_path"
35048   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35049     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35050     new_path="$unix_path"
35051   fi
35052 
35053 
35054     new_path=`$WHICH "$new_path" 2> /dev/null`
35055     # bat and cmd files are not always considered executable in MSYS causing which
35056     # to not find them
35057     if test "x$new_path" = x \
35058         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35059         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35060       new_path="$path"
35061 
35062   windows_path="$new_path"
35063   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35064     unix_path=`$CYGPATH -u "$windows_path"`
35065     new_path="$unix_path"
35066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35067     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35068     new_path="$unix_path"
35069   fi
35070 
35071     fi
35072 
35073     if test "x$new_path" = x; then
35074       # It's still not found. Now this is an unrecoverable error.
35075       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35076 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35077       has_space=`$ECHO "$complete" | $GREP " "`
35078       if test "x$has_space" != x; then
35079         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35080 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35081       fi
35082       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35083     fi
35084   fi
35085 
35086   # Now new_path has a complete unix path to the binary
35087   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35088     # Keep paths in /bin as-is, but remove trailing .exe if any
35089     new_path="${new_path/%.exe/}"
35090     # Do not save /bin paths to all_fixpath_prefixes!
35091   else
35092     # Not in mixed or Windows style, start by that.
35093     new_path=`cmd //c echo $new_path`
35094 
35095   input_path="$new_path"
35096   # Check if we need to convert this using DOS-style short mode. If the path
35097   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35098   # take no chances and rewrite it.
35099   # Note: m4 eats our [], so we need to use [ and ] instead.
35100   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35101   if test "x$has_forbidden_chars" != x; then
35102     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35103     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35104   fi
35105 
35106     # Output is in $new_path
35107 
35108   windows_path="$new_path"
35109   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35110     unix_path=`$CYGPATH -u "$windows_path"`
35111     new_path="$unix_path"
35112   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35113     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35114     new_path="$unix_path"
35115   fi
35116 
35117     # remove trailing .exe if any
35118     new_path="${new_path/%.exe/}"
35119 
35120     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35121     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35122   fi
35123 
35124     else
35125       # We're on a unix platform. Hooray! :)
35126       # First separate the path from the arguments. This will split at the first
35127       # space.
35128       complete="$LD"
35129       path="${complete%% *}"
35130       tmp="$complete EOL"
35131       arguments="${tmp#* }"
35132 
35133       # Cannot rely on the command "which" here since it doesn't always work.
35134       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35135       if test -z "$is_absolute_path"; then
35136         # Path to executable is not absolute. Find it.
35137         IFS_save="$IFS"
35138         IFS=:
35139         for p in $PATH; do
35140           if test -f "$p/$path" && test -x "$p/$path"; then
35141             new_path="$p/$path"
35142             break
35143           fi
35144         done
35145         IFS="$IFS_save"
35146       else
35147         # This is an absolute path, we can use it without further modifications.
35148         new_path="$path"
35149       fi
35150 
35151       if test "x$new_path" = x; then
35152         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35153 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35154         has_space=`$ECHO "$complete" | $GREP " "`
35155         if test "x$has_space" != x; then
35156           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35157 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35158         fi
35159         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35160       fi
35161     fi
35162 
35163     # Now join together the path and the arguments once again
35164     if test "x$arguments" != xEOL; then
35165       new_complete="$new_path ${arguments% *}"
35166     else
35167       new_complete="$new_path"
35168     fi
35169 
35170     if test "x$complete" != "x$new_complete"; then
35171       LD="$new_complete"
35172       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35173 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35174     fi
35175   fi
35176 
35177     # Verify that we indeed succeeded with this trick.
35178     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35179 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35180     "$LD" --version > /dev/null
35181     if test $? -eq 0 ; then
35182       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35183 $as_echo "no" >&6; }
35184       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35185     else
35186       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35187 $as_echo "yes" >&6; }
35188     fi
35189     LDCXX="$LD"
35190   else
35191     # All other toolchains use the compiler to link.
35192     LD="$CC"
35193     LDCXX="$CXX"
35194   fi
35195 
35196   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35197 
35198 
35199   #
35200   # Setup the assembler (AS)
35201   #
35202   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35203     # FIXME: should this really be solaris, or solstudio?
35204 
35205 
35206   # Publish this variable in the help.
35207 
35208 
35209   if [ -z "${AS+x}" ]; then
35210     # The variable is not set by user, try to locate tool using the code snippet
35211     for ac_prog in as
35212 do
35213   # Extract the first word of "$ac_prog", so it can be a program name with args.
35214 set dummy $ac_prog; ac_word=$2
35215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35216 $as_echo_n "checking for $ac_word... " >&6; }
35217 if ${ac_cv_path_AS+:} false; then :
35218   $as_echo_n "(cached) " >&6
35219 else
35220   case $AS in
35221   [\\/]* | ?:[\\/]*)
35222   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35223   ;;
35224   *)
35225   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35226 for as_dir in $PATH
35227 do
35228   IFS=$as_save_IFS
35229   test -z "$as_dir" && as_dir=.
35230     for ac_exec_ext in '' $ac_executable_extensions; do
35231   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35232     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35233     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35234     break 2
35235   fi
35236 done
35237   done
35238 IFS=$as_save_IFS
35239 
35240   ;;
35241 esac
35242 fi
35243 AS=$ac_cv_path_AS
35244 if test -n "$AS"; then
35245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35246 $as_echo "$AS" >&6; }
35247 else
35248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35249 $as_echo "no" >&6; }
35250 fi
35251 
35252 
35253   test -n "$AS" && break
35254 done
35255 
35256   else
35257     # The variable is set, but is it from the command line or the environment?
35258 
35259     # Try to remove the string !AS! from our list.
35260     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35261     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35262       # If it failed, the variable was not from the command line. Ignore it,
35263       # but warn the user (except for BASH, which is always set by the calling BASH).
35264       if test "xAS" != xBASH; then
35265         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35266 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35267       fi
35268       # Try to locate tool using the code snippet
35269       for ac_prog in as
35270 do
35271   # Extract the first word of "$ac_prog", so it can be a program name with args.
35272 set dummy $ac_prog; ac_word=$2
35273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35274 $as_echo_n "checking for $ac_word... " >&6; }
35275 if ${ac_cv_path_AS+:} false; then :
35276   $as_echo_n "(cached) " >&6
35277 else
35278   case $AS in
35279   [\\/]* | ?:[\\/]*)
35280   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35281   ;;
35282   *)
35283   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35284 for as_dir in $PATH
35285 do
35286   IFS=$as_save_IFS
35287   test -z "$as_dir" && as_dir=.
35288     for ac_exec_ext in '' $ac_executable_extensions; do
35289   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35290     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35291     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35292     break 2
35293   fi
35294 done
35295   done
35296 IFS=$as_save_IFS
35297 
35298   ;;
35299 esac
35300 fi
35301 AS=$ac_cv_path_AS
35302 if test -n "$AS"; then
35303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35304 $as_echo "$AS" >&6; }
35305 else
35306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35307 $as_echo "no" >&6; }
35308 fi
35309 
35310 
35311   test -n "$AS" && break
35312 done
35313 
35314     else
35315       # If it succeeded, then it was overridden by the user. We will use it
35316       # for the tool.
35317 
35318       # First remove it from the list of overridden variables, so we can test
35319       # for unknown variables in the end.
35320       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35321 
35322       # Check if we try to supply an empty value
35323       if test "x$AS" = x; then
35324         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35325 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35326         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35327 $as_echo_n "checking for AS... " >&6; }
35328         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35329 $as_echo "disabled" >&6; }
35330       else
35331         # Check if the provided tool contains a complete path.
35332         tool_specified="$AS"
35333         tool_basename="${tool_specified##*/}"
35334         if test "x$tool_basename" = "x$tool_specified"; then
35335           # A command without a complete path is provided, search $PATH.
35336           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35337 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35338           # Extract the first word of "$tool_basename", so it can be a program name with args.
35339 set dummy $tool_basename; ac_word=$2
35340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35341 $as_echo_n "checking for $ac_word... " >&6; }
35342 if ${ac_cv_path_AS+:} false; then :
35343   $as_echo_n "(cached) " >&6
35344 else
35345   case $AS in
35346   [\\/]* | ?:[\\/]*)
35347   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35348   ;;
35349   *)
35350   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35351 for as_dir in $PATH
35352 do
35353   IFS=$as_save_IFS
35354   test -z "$as_dir" && as_dir=.
35355     for ac_exec_ext in '' $ac_executable_extensions; do
35356   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35357     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35358     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35359     break 2
35360   fi
35361 done
35362   done
35363 IFS=$as_save_IFS
35364 
35365   ;;
35366 esac
35367 fi
35368 AS=$ac_cv_path_AS
35369 if test -n "$AS"; then
35370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35371 $as_echo "$AS" >&6; }
35372 else
35373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35374 $as_echo "no" >&6; }
35375 fi
35376 
35377 
35378           if test "x$AS" = x; then
35379             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35380           fi
35381         else
35382           # Otherwise we believe it is a complete path. Use it as it is.
35383           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35384 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35385           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35386 $as_echo_n "checking for AS... " >&6; }
35387           if test ! -x "$tool_specified"; then
35388             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35389 $as_echo "not found" >&6; }
35390             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35391           fi
35392           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35393 $as_echo "$tool_specified" >&6; }
35394         fi
35395       fi
35396     fi
35397 
35398   fi
35399 
35400 
35401 
35402   # Only process if variable expands to non-empty
35403 
35404   if test "x$AS" != x; then
35405     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35406 
35407   # First separate the path from the arguments. This will split at the first
35408   # space.
35409   complete="$AS"
35410   path="${complete%% *}"
35411   tmp="$complete EOL"
35412   arguments="${tmp#* }"
35413 
35414   # Input might be given as Windows format, start by converting to
35415   # unix format.
35416   new_path=`$CYGPATH -u "$path"`
35417 
35418   # Now try to locate executable using which
35419   new_path=`$WHICH "$new_path" 2> /dev/null`
35420   # bat and cmd files are not always considered executable in cygwin causing which
35421   # to not find them
35422   if test "x$new_path" = x \
35423       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35424       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35425     new_path=`$CYGPATH -u "$path"`
35426   fi
35427   if test "x$new_path" = x; then
35428     # Oops. Which didn't find the executable.
35429     # The splitting of arguments from the executable at a space might have been incorrect,
35430     # since paths with space are more likely in Windows. Give it another try with the whole
35431     # argument.
35432     path="$complete"
35433     arguments="EOL"
35434     new_path=`$CYGPATH -u "$path"`
35435     new_path=`$WHICH "$new_path" 2> /dev/null`
35436     # bat and cmd files are not always considered executable in cygwin causing which
35437     # to not find them
35438     if test "x$new_path" = x \
35439         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35440         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35441       new_path=`$CYGPATH -u "$path"`
35442     fi
35443     if test "x$new_path" = x; then
35444       # It's still not found. Now this is an unrecoverable error.
35445       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35446 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35447       has_space=`$ECHO "$complete" | $GREP " "`
35448       if test "x$has_space" != x; then
35449         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35450 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35451       fi
35452       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35453     fi
35454   fi
35455 
35456   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35457   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35458   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35459   # "foo.exe" is OK but "foo" is an error.
35460   #
35461   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35462   # It is also a way to make sure we got the proper file name for the real test later on.
35463   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35464   if test "x$test_shortpath" = x; then
35465     # Short path failed, file does not exist as specified.
35466     # Try adding .exe or .cmd
35467     if test -f "${new_path}.exe"; then
35468       input_to_shortpath="${new_path}.exe"
35469     elif test -f "${new_path}.cmd"; then
35470       input_to_shortpath="${new_path}.cmd"
35471     else
35472       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35473 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35474       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35475 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35476       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35477     fi
35478   else
35479     input_to_shortpath="$new_path"
35480   fi
35481 
35482   # Call helper function which possibly converts this using DOS-style short mode.
35483   # If so, the updated path is stored in $new_path.
35484   new_path="$input_to_shortpath"
35485 
35486   input_path="$input_to_shortpath"
35487   # Check if we need to convert this using DOS-style short mode. If the path
35488   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35489   # take no chances and rewrite it.
35490   # Note: m4 eats our [], so we need to use [ and ] instead.
35491   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35492   if test "x$has_forbidden_chars" != x; then
35493     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35494     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35495     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35496     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35497       # Going to short mode and back again did indeed matter. Since short mode is
35498       # case insensitive, let's make it lowercase to improve readability.
35499       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35500       # Now convert it back to Unix-style (cygpath)
35501       input_path=`$CYGPATH -u "$shortmode_path"`
35502       new_path="$input_path"
35503     fi
35504   fi
35505 
35506   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35507   if test "x$test_cygdrive_prefix" = x; then
35508     # As a simple fix, exclude /usr/bin since it's not a real path.
35509     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35510       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35511       # a path prefixed by /cygdrive for fixpath to work.
35512       new_path="$CYGWIN_ROOT_PATH$input_path"
35513     fi
35514   fi
35515 
35516   # remove trailing .exe if any
35517   new_path="${new_path/%.exe/}"
35518 
35519     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35520 
35521   # First separate the path from the arguments. This will split at the first
35522   # space.
35523   complete="$AS"
35524   path="${complete%% *}"
35525   tmp="$complete EOL"
35526   arguments="${tmp#* }"
35527 
35528   # Input might be given as Windows format, start by converting to
35529   # unix format.
35530   new_path="$path"
35531 
35532   windows_path="$new_path"
35533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35534     unix_path=`$CYGPATH -u "$windows_path"`
35535     new_path="$unix_path"
35536   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35537     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35538     new_path="$unix_path"
35539   fi
35540 
35541 
35542   # Now try to locate executable using which
35543   new_path=`$WHICH "$new_path" 2> /dev/null`
35544 
35545   if test "x$new_path" = x; then
35546     # Oops. Which didn't find the executable.
35547     # The splitting of arguments from the executable at a space might have been incorrect,
35548     # since paths with space are more likely in Windows. Give it another try with the whole
35549     # argument.
35550     path="$complete"
35551     arguments="EOL"
35552     new_path="$path"
35553 
35554   windows_path="$new_path"
35555   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35556     unix_path=`$CYGPATH -u "$windows_path"`
35557     new_path="$unix_path"
35558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35559     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35560     new_path="$unix_path"
35561   fi
35562 
35563 
35564     new_path=`$WHICH "$new_path" 2> /dev/null`
35565     # bat and cmd files are not always considered executable in MSYS causing which
35566     # to not find them
35567     if test "x$new_path" = x \
35568         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35569         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35570       new_path="$path"
35571 
35572   windows_path="$new_path"
35573   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35574     unix_path=`$CYGPATH -u "$windows_path"`
35575     new_path="$unix_path"
35576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35577     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35578     new_path="$unix_path"
35579   fi
35580 
35581     fi
35582 
35583     if test "x$new_path" = x; then
35584       # It's still not found. Now this is an unrecoverable error.
35585       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35586 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35587       has_space=`$ECHO "$complete" | $GREP " "`
35588       if test "x$has_space" != x; then
35589         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35590 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35591       fi
35592       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35593     fi
35594   fi
35595 
35596   # Now new_path has a complete unix path to the binary
35597   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35598     # Keep paths in /bin as-is, but remove trailing .exe if any
35599     new_path="${new_path/%.exe/}"
35600     # Do not save /bin paths to all_fixpath_prefixes!
35601   else
35602     # Not in mixed or Windows style, start by that.
35603     new_path=`cmd //c echo $new_path`
35604 
35605   input_path="$new_path"
35606   # Check if we need to convert this using DOS-style short mode. If the path
35607   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35608   # take no chances and rewrite it.
35609   # Note: m4 eats our [], so we need to use [ and ] instead.
35610   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35611   if test "x$has_forbidden_chars" != x; then
35612     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35613     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35614   fi
35615 
35616     # Output is in $new_path
35617 
35618   windows_path="$new_path"
35619   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35620     unix_path=`$CYGPATH -u "$windows_path"`
35621     new_path="$unix_path"
35622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35623     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35624     new_path="$unix_path"
35625   fi
35626 
35627     # remove trailing .exe if any
35628     new_path="${new_path/%.exe/}"
35629 
35630     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35631     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35632   fi
35633 
35634     else
35635       # We're on a unix platform. Hooray! :)
35636       # First separate the path from the arguments. This will split at the first
35637       # space.
35638       complete="$AS"
35639       path="${complete%% *}"
35640       tmp="$complete EOL"
35641       arguments="${tmp#* }"
35642 
35643       # Cannot rely on the command "which" here since it doesn't always work.
35644       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35645       if test -z "$is_absolute_path"; then
35646         # Path to executable is not absolute. Find it.
35647         IFS_save="$IFS"
35648         IFS=:
35649         for p in $PATH; do
35650           if test -f "$p/$path" && test -x "$p/$path"; then
35651             new_path="$p/$path"
35652             break
35653           fi
35654         done
35655         IFS="$IFS_save"
35656       else
35657         # This is an absolute path, we can use it without further modifications.
35658         new_path="$path"
35659       fi
35660 
35661       if test "x$new_path" = x; then
35662         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35663 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35664         has_space=`$ECHO "$complete" | $GREP " "`
35665         if test "x$has_space" != x; then
35666           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35667 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35668         fi
35669         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35670       fi
35671     fi
35672 
35673     # Now join together the path and the arguments once again
35674     if test "x$arguments" != xEOL; then
35675       new_complete="$new_path ${arguments% *}"
35676     else
35677       new_complete="$new_path"
35678     fi
35679 
35680     if test "x$complete" != "x$new_complete"; then
35681       AS="$new_complete"
35682       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
35683 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
35684     fi
35685   fi
35686 
35687   else
35688     # FIXME: is this correct for microsoft?
35689     AS="$CC -c"
35690   fi
35691 
35692 
35693   #
35694   # Setup the archiver (AR)
35695   #
35696   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35697     # The corresponding ar tool is lib.exe (used to create static libraries)
35698     # Extract the first word of "lib", so it can be a program name with args.
35699 set dummy lib; ac_word=$2
35700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35701 $as_echo_n "checking for $ac_word... " >&6; }
35702 if ${ac_cv_prog_AR+:} false; then :
35703   $as_echo_n "(cached) " >&6
35704 else
35705   if test -n "$AR"; then
35706   ac_cv_prog_AR="$AR" # Let the user override the test.
35707 else
35708 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35709 for as_dir in $PATH
35710 do
35711   IFS=$as_save_IFS
35712   test -z "$as_dir" && as_dir=.
35713     for ac_exec_ext in '' $ac_executable_extensions; do
35714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35715     ac_cv_prog_AR="lib"
35716     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35717     break 2
35718   fi
35719 done
35720   done
35721 IFS=$as_save_IFS
35722 
35723 fi
35724 fi
35725 AR=$ac_cv_prog_AR
35726 if test -n "$AR"; then
35727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35728 $as_echo "$AR" >&6; }
35729 else
35730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35731 $as_echo "no" >&6; }
35732 fi
35733 
35734 
35735   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
35736 
35737 
35738   # Publish this variable in the help.
35739 
35740 
35741   if [ -z "${AR+x}" ]; then
35742     # The variable is not set by user, try to locate tool using the code snippet
35743     if test -n "$ac_tool_prefix"; then
35744   for ac_prog in ar gcc-ar
35745   do
35746     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35747 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35749 $as_echo_n "checking for $ac_word... " >&6; }
35750 if ${ac_cv_prog_AR+:} false; then :
35751   $as_echo_n "(cached) " >&6
35752 else
35753   if test -n "$AR"; then
35754   ac_cv_prog_AR="$AR" # Let the user override the test.
35755 else
35756 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35757 for as_dir in $PATH
35758 do
35759   IFS=$as_save_IFS
35760   test -z "$as_dir" && as_dir=.
35761     for ac_exec_ext in '' $ac_executable_extensions; do
35762   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35763     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35764     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35765     break 2
35766   fi
35767 done
35768   done
35769 IFS=$as_save_IFS
35770 
35771 fi
35772 fi
35773 AR=$ac_cv_prog_AR
35774 if test -n "$AR"; then
35775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35776 $as_echo "$AR" >&6; }
35777 else
35778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35779 $as_echo "no" >&6; }
35780 fi
35781 
35782 
35783     test -n "$AR" && break
35784   done
35785 fi
35786 if test -z "$AR"; then
35787   ac_ct_AR=$AR
35788   for ac_prog in ar gcc-ar
35789 do
35790   # Extract the first word of "$ac_prog", so it can be a program name with args.
35791 set dummy $ac_prog; ac_word=$2
35792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35793 $as_echo_n "checking for $ac_word... " >&6; }
35794 if ${ac_cv_prog_ac_ct_AR+:} false; then :
35795   $as_echo_n "(cached) " >&6
35796 else
35797   if test -n "$ac_ct_AR"; then
35798   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35799 else
35800 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35801 for as_dir in $PATH
35802 do
35803   IFS=$as_save_IFS
35804   test -z "$as_dir" && as_dir=.
35805     for ac_exec_ext in '' $ac_executable_extensions; do
35806   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35807     ac_cv_prog_ac_ct_AR="$ac_prog"
35808     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35809     break 2
35810   fi
35811 done
35812   done
35813 IFS=$as_save_IFS
35814 
35815 fi
35816 fi
35817 ac_ct_AR=$ac_cv_prog_ac_ct_AR
35818 if test -n "$ac_ct_AR"; then
35819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35820 $as_echo "$ac_ct_AR" >&6; }
35821 else
35822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35823 $as_echo "no" >&6; }
35824 fi
35825 
35826 
35827   test -n "$ac_ct_AR" && break
35828 done
35829 
35830   if test "x$ac_ct_AR" = x; then
35831     AR=""
35832   else
35833     case $cross_compiling:$ac_tool_warned in
35834 yes:)
35835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35836 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35837 ac_tool_warned=yes ;;
35838 esac
35839     AR=$ac_ct_AR
35840   fi
35841 fi
35842 
35843   else
35844     # The variable is set, but is it from the command line or the environment?
35845 
35846     # Try to remove the string !AR! from our list.
35847     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35848     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35849       # If it failed, the variable was not from the command line. Ignore it,
35850       # but warn the user (except for BASH, which is always set by the calling BASH).
35851       if test "xAR" != xBASH; then
35852         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35853 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35854       fi
35855       # Try to locate tool using the code snippet
35856       if test -n "$ac_tool_prefix"; then
35857   for ac_prog in ar gcc-ar
35858   do
35859     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35860 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35862 $as_echo_n "checking for $ac_word... " >&6; }
35863 if ${ac_cv_prog_AR+:} false; then :
35864   $as_echo_n "(cached) " >&6
35865 else
35866   if test -n "$AR"; then
35867   ac_cv_prog_AR="$AR" # Let the user override the test.
35868 else
35869 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35870 for as_dir in $PATH
35871 do
35872   IFS=$as_save_IFS
35873   test -z "$as_dir" && as_dir=.
35874     for ac_exec_ext in '' $ac_executable_extensions; do
35875   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35876     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35877     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35878     break 2
35879   fi
35880 done
35881   done
35882 IFS=$as_save_IFS
35883 
35884 fi
35885 fi
35886 AR=$ac_cv_prog_AR
35887 if test -n "$AR"; then
35888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35889 $as_echo "$AR" >&6; }
35890 else
35891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35892 $as_echo "no" >&6; }
35893 fi
35894 
35895 
35896     test -n "$AR" && break
35897   done
35898 fi
35899 if test -z "$AR"; then
35900   ac_ct_AR=$AR
35901   for ac_prog in ar gcc-ar
35902 do
35903   # Extract the first word of "$ac_prog", so it can be a program name with args.
35904 set dummy $ac_prog; ac_word=$2
35905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35906 $as_echo_n "checking for $ac_word... " >&6; }
35907 if ${ac_cv_prog_ac_ct_AR+:} false; then :
35908   $as_echo_n "(cached) " >&6
35909 else
35910   if test -n "$ac_ct_AR"; then
35911   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35912 else
35913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35914 for as_dir in $PATH
35915 do
35916   IFS=$as_save_IFS
35917   test -z "$as_dir" && as_dir=.
35918     for ac_exec_ext in '' $ac_executable_extensions; do
35919   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35920     ac_cv_prog_ac_ct_AR="$ac_prog"
35921     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35922     break 2
35923   fi
35924 done
35925   done
35926 IFS=$as_save_IFS
35927 
35928 fi
35929 fi
35930 ac_ct_AR=$ac_cv_prog_ac_ct_AR
35931 if test -n "$ac_ct_AR"; then
35932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35933 $as_echo "$ac_ct_AR" >&6; }
35934 else
35935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35936 $as_echo "no" >&6; }
35937 fi
35938 
35939 
35940   test -n "$ac_ct_AR" && break
35941 done
35942 
35943   if test "x$ac_ct_AR" = x; then
35944     AR=""
35945   else
35946     case $cross_compiling:$ac_tool_warned in
35947 yes:)
35948 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35949 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35950 ac_tool_warned=yes ;;
35951 esac
35952     AR=$ac_ct_AR
35953   fi
35954 fi
35955 
35956     else
35957       # If it succeeded, then it was overridden by the user. We will use it
35958       # for the tool.
35959 
35960       # First remove it from the list of overridden variables, so we can test
35961       # for unknown variables in the end.
35962       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35963 
35964       # Check if we try to supply an empty value
35965       if test "x$AR" = x; then
35966         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
35967 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
35968         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35969 $as_echo_n "checking for AR... " >&6; }
35970         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35971 $as_echo "disabled" >&6; }
35972       else
35973         # Check if the provided tool contains a complete path.
35974         tool_specified="$AR"
35975         tool_basename="${tool_specified##*/}"
35976         if test "x$tool_basename" = "x$tool_specified"; then
35977           # A command without a complete path is provided, search $PATH.
35978           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
35979 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
35980           # Extract the first word of "$tool_basename", so it can be a program name with args.
35981 set dummy $tool_basename; ac_word=$2
35982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35983 $as_echo_n "checking for $ac_word... " >&6; }
35984 if ${ac_cv_path_AR+:} false; then :
35985   $as_echo_n "(cached) " >&6
35986 else
35987   case $AR in
35988   [\\/]* | ?:[\\/]*)
35989   ac_cv_path_AR="$AR" # Let the user override the test with a path.
35990   ;;
35991   *)
35992   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35993 for as_dir in $PATH
35994 do
35995   IFS=$as_save_IFS
35996   test -z "$as_dir" && as_dir=.
35997     for ac_exec_ext in '' $ac_executable_extensions; do
35998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35999     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36001     break 2
36002   fi
36003 done
36004   done
36005 IFS=$as_save_IFS
36006 
36007   ;;
36008 esac
36009 fi
36010 AR=$ac_cv_path_AR
36011 if test -n "$AR"; then
36012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36013 $as_echo "$AR" >&6; }
36014 else
36015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36016 $as_echo "no" >&6; }
36017 fi
36018 
36019 
36020           if test "x$AR" = x; then
36021             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36022           fi
36023         else
36024           # Otherwise we believe it is a complete path. Use it as it is.
36025           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36026 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36027           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36028 $as_echo_n "checking for AR... " >&6; }
36029           if test ! -x "$tool_specified"; then
36030             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36031 $as_echo "not found" >&6; }
36032             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36033           fi
36034           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36035 $as_echo "$tool_specified" >&6; }
36036         fi
36037       fi
36038     fi
36039 
36040   fi
36041 
36042 
36043   else
36044 
36045 
36046   # Publish this variable in the help.
36047 
36048 
36049   if [ -z "${AR+x}" ]; then
36050     # The variable is not set by user, try to locate tool using the code snippet
36051     if test -n "$ac_tool_prefix"; then
36052   for ac_prog in ar
36053   do
36054     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36055 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36057 $as_echo_n "checking for $ac_word... " >&6; }
36058 if ${ac_cv_prog_AR+:} false; then :
36059   $as_echo_n "(cached) " >&6
36060 else
36061   if test -n "$AR"; then
36062   ac_cv_prog_AR="$AR" # Let the user override the test.
36063 else
36064 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36065 for as_dir in $PATH
36066 do
36067   IFS=$as_save_IFS
36068   test -z "$as_dir" && as_dir=.
36069     for ac_exec_ext in '' $ac_executable_extensions; do
36070   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36071     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36072     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36073     break 2
36074   fi
36075 done
36076   done
36077 IFS=$as_save_IFS
36078 
36079 fi
36080 fi
36081 AR=$ac_cv_prog_AR
36082 if test -n "$AR"; then
36083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36084 $as_echo "$AR" >&6; }
36085 else
36086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36087 $as_echo "no" >&6; }
36088 fi
36089 
36090 
36091     test -n "$AR" && break
36092   done
36093 fi
36094 if test -z "$AR"; then
36095   ac_ct_AR=$AR
36096   for ac_prog in ar
36097 do
36098   # Extract the first word of "$ac_prog", so it can be a program name with args.
36099 set dummy $ac_prog; ac_word=$2
36100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36101 $as_echo_n "checking for $ac_word... " >&6; }
36102 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36103   $as_echo_n "(cached) " >&6
36104 else
36105   if test -n "$ac_ct_AR"; then
36106   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36107 else
36108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36109 for as_dir in $PATH
36110 do
36111   IFS=$as_save_IFS
36112   test -z "$as_dir" && as_dir=.
36113     for ac_exec_ext in '' $ac_executable_extensions; do
36114   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36115     ac_cv_prog_ac_ct_AR="$ac_prog"
36116     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36117     break 2
36118   fi
36119 done
36120   done
36121 IFS=$as_save_IFS
36122 
36123 fi
36124 fi
36125 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36126 if test -n "$ac_ct_AR"; then
36127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36128 $as_echo "$ac_ct_AR" >&6; }
36129 else
36130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36131 $as_echo "no" >&6; }
36132 fi
36133 
36134 
36135   test -n "$ac_ct_AR" && break
36136 done
36137 
36138   if test "x$ac_ct_AR" = x; then
36139     AR=""
36140   else
36141     case $cross_compiling:$ac_tool_warned in
36142 yes:)
36143 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36144 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36145 ac_tool_warned=yes ;;
36146 esac
36147     AR=$ac_ct_AR
36148   fi
36149 fi
36150 
36151   else
36152     # The variable is set, but is it from the command line or the environment?
36153 
36154     # Try to remove the string !AR! from our list.
36155     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36156     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36157       # If it failed, the variable was not from the command line. Ignore it,
36158       # but warn the user (except for BASH, which is always set by the calling BASH).
36159       if test "xAR" != xBASH; then
36160         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36161 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36162       fi
36163       # Try to locate tool using the code snippet
36164       if test -n "$ac_tool_prefix"; then
36165   for ac_prog in ar
36166   do
36167     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36168 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36170 $as_echo_n "checking for $ac_word... " >&6; }
36171 if ${ac_cv_prog_AR+:} false; then :
36172   $as_echo_n "(cached) " >&6
36173 else
36174   if test -n "$AR"; then
36175   ac_cv_prog_AR="$AR" # Let the user override the test.
36176 else
36177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36178 for as_dir in $PATH
36179 do
36180   IFS=$as_save_IFS
36181   test -z "$as_dir" && as_dir=.
36182     for ac_exec_ext in '' $ac_executable_extensions; do
36183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36184     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36186     break 2
36187   fi
36188 done
36189   done
36190 IFS=$as_save_IFS
36191 
36192 fi
36193 fi
36194 AR=$ac_cv_prog_AR
36195 if test -n "$AR"; then
36196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36197 $as_echo "$AR" >&6; }
36198 else
36199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36200 $as_echo "no" >&6; }
36201 fi
36202 
36203 
36204     test -n "$AR" && break
36205   done
36206 fi
36207 if test -z "$AR"; then
36208   ac_ct_AR=$AR
36209   for ac_prog in ar
36210 do
36211   # Extract the first word of "$ac_prog", so it can be a program name with args.
36212 set dummy $ac_prog; ac_word=$2
36213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36214 $as_echo_n "checking for $ac_word... " >&6; }
36215 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36216   $as_echo_n "(cached) " >&6
36217 else
36218   if test -n "$ac_ct_AR"; then
36219   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36220 else
36221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36222 for as_dir in $PATH
36223 do
36224   IFS=$as_save_IFS
36225   test -z "$as_dir" && as_dir=.
36226     for ac_exec_ext in '' $ac_executable_extensions; do
36227   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36228     ac_cv_prog_ac_ct_AR="$ac_prog"
36229     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36230     break 2
36231   fi
36232 done
36233   done
36234 IFS=$as_save_IFS
36235 
36236 fi
36237 fi
36238 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36239 if test -n "$ac_ct_AR"; then
36240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36241 $as_echo "$ac_ct_AR" >&6; }
36242 else
36243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36244 $as_echo "no" >&6; }
36245 fi
36246 
36247 
36248   test -n "$ac_ct_AR" && break
36249 done
36250 
36251   if test "x$ac_ct_AR" = x; then
36252     AR=""
36253   else
36254     case $cross_compiling:$ac_tool_warned in
36255 yes:)
36256 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36257 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36258 ac_tool_warned=yes ;;
36259 esac
36260     AR=$ac_ct_AR
36261   fi
36262 fi
36263 
36264     else
36265       # If it succeeded, then it was overridden by the user. We will use it
36266       # for the tool.
36267 
36268       # First remove it from the list of overridden variables, so we can test
36269       # for unknown variables in the end.
36270       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36271 
36272       # Check if we try to supply an empty value
36273       if test "x$AR" = x; then
36274         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36275 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36276         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36277 $as_echo_n "checking for AR... " >&6; }
36278         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36279 $as_echo "disabled" >&6; }
36280       else
36281         # Check if the provided tool contains a complete path.
36282         tool_specified="$AR"
36283         tool_basename="${tool_specified##*/}"
36284         if test "x$tool_basename" = "x$tool_specified"; then
36285           # A command without a complete path is provided, search $PATH.
36286           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36287 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36288           # Extract the first word of "$tool_basename", so it can be a program name with args.
36289 set dummy $tool_basename; ac_word=$2
36290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36291 $as_echo_n "checking for $ac_word... " >&6; }
36292 if ${ac_cv_path_AR+:} false; then :
36293   $as_echo_n "(cached) " >&6
36294 else
36295   case $AR in
36296   [\\/]* | ?:[\\/]*)
36297   ac_cv_path_AR="$AR" # Let the user override the test with a path.
36298   ;;
36299   *)
36300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36301 for as_dir in $PATH
36302 do
36303   IFS=$as_save_IFS
36304   test -z "$as_dir" && as_dir=.
36305     for ac_exec_ext in '' $ac_executable_extensions; do
36306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36307     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36309     break 2
36310   fi
36311 done
36312   done
36313 IFS=$as_save_IFS
36314 
36315   ;;
36316 esac
36317 fi
36318 AR=$ac_cv_path_AR
36319 if test -n "$AR"; then
36320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36321 $as_echo "$AR" >&6; }
36322 else
36323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36324 $as_echo "no" >&6; }
36325 fi
36326 
36327 
36328           if test "x$AR" = x; then
36329             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36330           fi
36331         else
36332           # Otherwise we believe it is a complete path. Use it as it is.
36333           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36334 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36335           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36336 $as_echo_n "checking for AR... " >&6; }
36337           if test ! -x "$tool_specified"; then
36338             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36339 $as_echo "not found" >&6; }
36340             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36341           fi
36342           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36343 $as_echo "$tool_specified" >&6; }
36344         fi
36345       fi
36346     fi
36347 
36348   fi
36349 
36350 
36351   fi
36352 
36353   # Only process if variable expands to non-empty
36354 
36355   if test "x$AR" != x; then
36356     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36357 
36358   # First separate the path from the arguments. This will split at the first
36359   # space.
36360   complete="$AR"
36361   path="${complete%% *}"
36362   tmp="$complete EOL"
36363   arguments="${tmp#* }"
36364 
36365   # Input might be given as Windows format, start by converting to
36366   # unix format.
36367   new_path=`$CYGPATH -u "$path"`
36368 
36369   # Now try to locate executable using which
36370   new_path=`$WHICH "$new_path" 2> /dev/null`
36371   # bat and cmd files are not always considered executable in cygwin causing which
36372   # to not find them
36373   if test "x$new_path" = x \
36374       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36375       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36376     new_path=`$CYGPATH -u "$path"`
36377   fi
36378   if test "x$new_path" = x; then
36379     # Oops. Which didn't find the executable.
36380     # The splitting of arguments from the executable at a space might have been incorrect,
36381     # since paths with space are more likely in Windows. Give it another try with the whole
36382     # argument.
36383     path="$complete"
36384     arguments="EOL"
36385     new_path=`$CYGPATH -u "$path"`
36386     new_path=`$WHICH "$new_path" 2> /dev/null`
36387     # bat and cmd files are not always considered executable in cygwin causing which
36388     # to not find them
36389     if test "x$new_path" = x \
36390         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36391         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36392       new_path=`$CYGPATH -u "$path"`
36393     fi
36394     if test "x$new_path" = x; then
36395       # It's still not found. Now this is an unrecoverable error.
36396       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36397 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36398       has_space=`$ECHO "$complete" | $GREP " "`
36399       if test "x$has_space" != x; then
36400         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36401 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36402       fi
36403       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36404     fi
36405   fi
36406 
36407   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36408   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36409   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36410   # "foo.exe" is OK but "foo" is an error.
36411   #
36412   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36413   # It is also a way to make sure we got the proper file name for the real test later on.
36414   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36415   if test "x$test_shortpath" = x; then
36416     # Short path failed, file does not exist as specified.
36417     # Try adding .exe or .cmd
36418     if test -f "${new_path}.exe"; then
36419       input_to_shortpath="${new_path}.exe"
36420     elif test -f "${new_path}.cmd"; then
36421       input_to_shortpath="${new_path}.cmd"
36422     else
36423       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36424 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36425       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36426 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36427       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36428     fi
36429   else
36430     input_to_shortpath="$new_path"
36431   fi
36432 
36433   # Call helper function which possibly converts this using DOS-style short mode.
36434   # If so, the updated path is stored in $new_path.
36435   new_path="$input_to_shortpath"
36436 
36437   input_path="$input_to_shortpath"
36438   # Check if we need to convert this using DOS-style short mode. If the path
36439   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36440   # take no chances and rewrite it.
36441   # Note: m4 eats our [], so we need to use [ and ] instead.
36442   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36443   if test "x$has_forbidden_chars" != x; then
36444     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36445     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36446     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36447     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36448       # Going to short mode and back again did indeed matter. Since short mode is
36449       # case insensitive, let's make it lowercase to improve readability.
36450       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36451       # Now convert it back to Unix-style (cygpath)
36452       input_path=`$CYGPATH -u "$shortmode_path"`
36453       new_path="$input_path"
36454     fi
36455   fi
36456 
36457   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36458   if test "x$test_cygdrive_prefix" = x; then
36459     # As a simple fix, exclude /usr/bin since it's not a real path.
36460     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36461       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36462       # a path prefixed by /cygdrive for fixpath to work.
36463       new_path="$CYGWIN_ROOT_PATH$input_path"
36464     fi
36465   fi
36466 
36467   # remove trailing .exe if any
36468   new_path="${new_path/%.exe/}"
36469 
36470     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36471 
36472   # First separate the path from the arguments. This will split at the first
36473   # space.
36474   complete="$AR"
36475   path="${complete%% *}"
36476   tmp="$complete EOL"
36477   arguments="${tmp#* }"
36478 
36479   # Input might be given as Windows format, start by converting to
36480   # unix format.
36481   new_path="$path"
36482 
36483   windows_path="$new_path"
36484   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36485     unix_path=`$CYGPATH -u "$windows_path"`
36486     new_path="$unix_path"
36487   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36488     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36489     new_path="$unix_path"
36490   fi
36491 
36492 
36493   # Now try to locate executable using which
36494   new_path=`$WHICH "$new_path" 2> /dev/null`
36495 
36496   if test "x$new_path" = x; then
36497     # Oops. Which didn't find the executable.
36498     # The splitting of arguments from the executable at a space might have been incorrect,
36499     # since paths with space are more likely in Windows. Give it another try with the whole
36500     # argument.
36501     path="$complete"
36502     arguments="EOL"
36503     new_path="$path"
36504 
36505   windows_path="$new_path"
36506   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36507     unix_path=`$CYGPATH -u "$windows_path"`
36508     new_path="$unix_path"
36509   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36510     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36511     new_path="$unix_path"
36512   fi
36513 
36514 
36515     new_path=`$WHICH "$new_path" 2> /dev/null`
36516     # bat and cmd files are not always considered executable in MSYS causing which
36517     # to not find them
36518     if test "x$new_path" = x \
36519         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36520         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36521       new_path="$path"
36522 
36523   windows_path="$new_path"
36524   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36525     unix_path=`$CYGPATH -u "$windows_path"`
36526     new_path="$unix_path"
36527   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36528     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36529     new_path="$unix_path"
36530   fi
36531 
36532     fi
36533 
36534     if test "x$new_path" = x; then
36535       # It's still not found. Now this is an unrecoverable error.
36536       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36537 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36538       has_space=`$ECHO "$complete" | $GREP " "`
36539       if test "x$has_space" != x; then
36540         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36541 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36542       fi
36543       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36544     fi
36545   fi
36546 
36547   # Now new_path has a complete unix path to the binary
36548   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36549     # Keep paths in /bin as-is, but remove trailing .exe if any
36550     new_path="${new_path/%.exe/}"
36551     # Do not save /bin paths to all_fixpath_prefixes!
36552   else
36553     # Not in mixed or Windows style, start by that.
36554     new_path=`cmd //c echo $new_path`
36555 
36556   input_path="$new_path"
36557   # Check if we need to convert this using DOS-style short mode. If the path
36558   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36559   # take no chances and rewrite it.
36560   # Note: m4 eats our [], so we need to use [ and ] instead.
36561   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36562   if test "x$has_forbidden_chars" != x; then
36563     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36564     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36565   fi
36566 
36567     # Output is in $new_path
36568 
36569   windows_path="$new_path"
36570   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36571     unix_path=`$CYGPATH -u "$windows_path"`
36572     new_path="$unix_path"
36573   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36574     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36575     new_path="$unix_path"
36576   fi
36577 
36578     # remove trailing .exe if any
36579     new_path="${new_path/%.exe/}"
36580 
36581     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36582     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36583   fi
36584 
36585     else
36586       # We're on a unix platform. Hooray! :)
36587       # First separate the path from the arguments. This will split at the first
36588       # space.
36589       complete="$AR"
36590       path="${complete%% *}"
36591       tmp="$complete EOL"
36592       arguments="${tmp#* }"
36593 
36594       # Cannot rely on the command "which" here since it doesn't always work.
36595       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36596       if test -z "$is_absolute_path"; then
36597         # Path to executable is not absolute. Find it.
36598         IFS_save="$IFS"
36599         IFS=:
36600         for p in $PATH; do
36601           if test -f "$p/$path" && test -x "$p/$path"; then
36602             new_path="$p/$path"
36603             break
36604           fi
36605         done
36606         IFS="$IFS_save"
36607       else
36608         # This is an absolute path, we can use it without further modifications.
36609         new_path="$path"
36610       fi
36611 
36612       if test "x$new_path" = x; then
36613         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36614 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36615         has_space=`$ECHO "$complete" | $GREP " "`
36616         if test "x$has_space" != x; then
36617           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36618 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36619         fi
36620         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36621       fi
36622     fi
36623 
36624     # Now join together the path and the arguments once again
36625     if test "x$arguments" != xEOL; then
36626       new_complete="$new_path ${arguments% *}"
36627     else
36628       new_complete="$new_path"
36629     fi
36630 
36631     if test "x$complete" != "x$new_complete"; then
36632       AR="$new_complete"
36633       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36634 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36635     fi
36636   fi
36637 
36638 
36639 
36640   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36641 
36642 
36643   # Publish this variable in the help.
36644 
36645 
36646   if [ -z "${LIPO+x}" ]; then
36647     # The variable is not set by user, try to locate tool using the code snippet
36648     for ac_prog in lipo
36649 do
36650   # Extract the first word of "$ac_prog", so it can be a program name with args.
36651 set dummy $ac_prog; ac_word=$2
36652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36653 $as_echo_n "checking for $ac_word... " >&6; }
36654 if ${ac_cv_path_LIPO+:} false; then :
36655   $as_echo_n "(cached) " >&6
36656 else
36657   case $LIPO in
36658   [\\/]* | ?:[\\/]*)
36659   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36660   ;;
36661   *)
36662   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36663 for as_dir in $PATH
36664 do
36665   IFS=$as_save_IFS
36666   test -z "$as_dir" && as_dir=.
36667     for ac_exec_ext in '' $ac_executable_extensions; do
36668   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36669     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36671     break 2
36672   fi
36673 done
36674   done
36675 IFS=$as_save_IFS
36676 
36677   ;;
36678 esac
36679 fi
36680 LIPO=$ac_cv_path_LIPO
36681 if test -n "$LIPO"; then
36682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36683 $as_echo "$LIPO" >&6; }
36684 else
36685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36686 $as_echo "no" >&6; }
36687 fi
36688 
36689 
36690   test -n "$LIPO" && break
36691 done
36692 
36693   else
36694     # The variable is set, but is it from the command line or the environment?
36695 
36696     # Try to remove the string !LIPO! from our list.
36697     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36698     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36699       # If it failed, the variable was not from the command line. Ignore it,
36700       # but warn the user (except for BASH, which is always set by the calling BASH).
36701       if test "xLIPO" != xBASH; then
36702         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36703 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36704       fi
36705       # Try to locate tool using the code snippet
36706       for ac_prog in lipo
36707 do
36708   # Extract the first word of "$ac_prog", so it can be a program name with args.
36709 set dummy $ac_prog; ac_word=$2
36710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36711 $as_echo_n "checking for $ac_word... " >&6; }
36712 if ${ac_cv_path_LIPO+:} false; then :
36713   $as_echo_n "(cached) " >&6
36714 else
36715   case $LIPO in
36716   [\\/]* | ?:[\\/]*)
36717   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36718   ;;
36719   *)
36720   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36721 for as_dir in $PATH
36722 do
36723   IFS=$as_save_IFS
36724   test -z "$as_dir" && as_dir=.
36725     for ac_exec_ext in '' $ac_executable_extensions; do
36726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36727     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36729     break 2
36730   fi
36731 done
36732   done
36733 IFS=$as_save_IFS
36734 
36735   ;;
36736 esac
36737 fi
36738 LIPO=$ac_cv_path_LIPO
36739 if test -n "$LIPO"; then
36740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36741 $as_echo "$LIPO" >&6; }
36742 else
36743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36744 $as_echo "no" >&6; }
36745 fi
36746 
36747 
36748   test -n "$LIPO" && break
36749 done
36750 
36751     else
36752       # If it succeeded, then it was overridden by the user. We will use it
36753       # for the tool.
36754 
36755       # First remove it from the list of overridden variables, so we can test
36756       # for unknown variables in the end.
36757       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36758 
36759       # Check if we try to supply an empty value
36760       if test "x$LIPO" = x; then
36761         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36762 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36763         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36764 $as_echo_n "checking for LIPO... " >&6; }
36765         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36766 $as_echo "disabled" >&6; }
36767       else
36768         # Check if the provided tool contains a complete path.
36769         tool_specified="$LIPO"
36770         tool_basename="${tool_specified##*/}"
36771         if test "x$tool_basename" = "x$tool_specified"; then
36772           # A command without a complete path is provided, search $PATH.
36773           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36774 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36775           # Extract the first word of "$tool_basename", so it can be a program name with args.
36776 set dummy $tool_basename; ac_word=$2
36777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36778 $as_echo_n "checking for $ac_word... " >&6; }
36779 if ${ac_cv_path_LIPO+:} false; then :
36780   $as_echo_n "(cached) " >&6
36781 else
36782   case $LIPO in
36783   [\\/]* | ?:[\\/]*)
36784   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36785   ;;
36786   *)
36787   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36788 for as_dir in $PATH
36789 do
36790   IFS=$as_save_IFS
36791   test -z "$as_dir" && as_dir=.
36792     for ac_exec_ext in '' $ac_executable_extensions; do
36793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36794     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36796     break 2
36797   fi
36798 done
36799   done
36800 IFS=$as_save_IFS
36801 
36802   ;;
36803 esac
36804 fi
36805 LIPO=$ac_cv_path_LIPO
36806 if test -n "$LIPO"; then
36807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36808 $as_echo "$LIPO" >&6; }
36809 else
36810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36811 $as_echo "no" >&6; }
36812 fi
36813 
36814 
36815           if test "x$LIPO" = x; then
36816             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36817           fi
36818         else
36819           # Otherwise we believe it is a complete path. Use it as it is.
36820           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36821 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36822           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36823 $as_echo_n "checking for LIPO... " >&6; }
36824           if test ! -x "$tool_specified"; then
36825             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36826 $as_echo "not found" >&6; }
36827             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36828           fi
36829           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36830 $as_echo "$tool_specified" >&6; }
36831         fi
36832       fi
36833     fi
36834 
36835   fi
36836 
36837 
36838 
36839   # Only process if variable expands to non-empty
36840 
36841   if test "x$LIPO" != x; then
36842     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36843 
36844   # First separate the path from the arguments. This will split at the first
36845   # space.
36846   complete="$LIPO"
36847   path="${complete%% *}"
36848   tmp="$complete EOL"
36849   arguments="${tmp#* }"
36850 
36851   # Input might be given as Windows format, start by converting to
36852   # unix format.
36853   new_path=`$CYGPATH -u "$path"`
36854 
36855   # Now try to locate executable using which
36856   new_path=`$WHICH "$new_path" 2> /dev/null`
36857   # bat and cmd files are not always considered executable in cygwin causing which
36858   # to not find them
36859   if test "x$new_path" = x \
36860       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36861       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36862     new_path=`$CYGPATH -u "$path"`
36863   fi
36864   if test "x$new_path" = x; then
36865     # Oops. Which didn't find the executable.
36866     # The splitting of arguments from the executable at a space might have been incorrect,
36867     # since paths with space are more likely in Windows. Give it another try with the whole
36868     # argument.
36869     path="$complete"
36870     arguments="EOL"
36871     new_path=`$CYGPATH -u "$path"`
36872     new_path=`$WHICH "$new_path" 2> /dev/null`
36873     # bat and cmd files are not always considered executable in cygwin causing which
36874     # to not find them
36875     if test "x$new_path" = x \
36876         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36877         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36878       new_path=`$CYGPATH -u "$path"`
36879     fi
36880     if test "x$new_path" = x; then
36881       # It's still not found. Now this is an unrecoverable error.
36882       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36883 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36884       has_space=`$ECHO "$complete" | $GREP " "`
36885       if test "x$has_space" != x; then
36886         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36887 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36888       fi
36889       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36890     fi
36891   fi
36892 
36893   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36894   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36895   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36896   # "foo.exe" is OK but "foo" is an error.
36897   #
36898   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36899   # It is also a way to make sure we got the proper file name for the real test later on.
36900   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36901   if test "x$test_shortpath" = x; then
36902     # Short path failed, file does not exist as specified.
36903     # Try adding .exe or .cmd
36904     if test -f "${new_path}.exe"; then
36905       input_to_shortpath="${new_path}.exe"
36906     elif test -f "${new_path}.cmd"; then
36907       input_to_shortpath="${new_path}.cmd"
36908     else
36909       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36910 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36911       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36912 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36913       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36914     fi
36915   else
36916     input_to_shortpath="$new_path"
36917   fi
36918 
36919   # Call helper function which possibly converts this using DOS-style short mode.
36920   # If so, the updated path is stored in $new_path.
36921   new_path="$input_to_shortpath"
36922 
36923   input_path="$input_to_shortpath"
36924   # Check if we need to convert this using DOS-style short mode. If the path
36925   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36926   # take no chances and rewrite it.
36927   # Note: m4 eats our [], so we need to use [ and ] instead.
36928   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36929   if test "x$has_forbidden_chars" != x; then
36930     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36931     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36932     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36933     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36934       # Going to short mode and back again did indeed matter. Since short mode is
36935       # case insensitive, let's make it lowercase to improve readability.
36936       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36937       # Now convert it back to Unix-style (cygpath)
36938       input_path=`$CYGPATH -u "$shortmode_path"`
36939       new_path="$input_path"
36940     fi
36941   fi
36942 
36943   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36944   if test "x$test_cygdrive_prefix" = x; then
36945     # As a simple fix, exclude /usr/bin since it's not a real path.
36946     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36947       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36948       # a path prefixed by /cygdrive for fixpath to work.
36949       new_path="$CYGWIN_ROOT_PATH$input_path"
36950     fi
36951   fi
36952 
36953   # remove trailing .exe if any
36954   new_path="${new_path/%.exe/}"
36955 
36956     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36957 
36958   # First separate the path from the arguments. This will split at the first
36959   # space.
36960   complete="$LIPO"
36961   path="${complete%% *}"
36962   tmp="$complete EOL"
36963   arguments="${tmp#* }"
36964 
36965   # Input might be given as Windows format, start by converting to
36966   # unix format.
36967   new_path="$path"
36968 
36969   windows_path="$new_path"
36970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36971     unix_path=`$CYGPATH -u "$windows_path"`
36972     new_path="$unix_path"
36973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36974     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36975     new_path="$unix_path"
36976   fi
36977 
36978 
36979   # Now try to locate executable using which
36980   new_path=`$WHICH "$new_path" 2> /dev/null`
36981 
36982   if test "x$new_path" = x; then
36983     # Oops. Which didn't find the executable.
36984     # The splitting of arguments from the executable at a space might have been incorrect,
36985     # since paths with space are more likely in Windows. Give it another try with the whole
36986     # argument.
36987     path="$complete"
36988     arguments="EOL"
36989     new_path="$path"
36990 
36991   windows_path="$new_path"
36992   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36993     unix_path=`$CYGPATH -u "$windows_path"`
36994     new_path="$unix_path"
36995   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36996     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36997     new_path="$unix_path"
36998   fi
36999 
37000 
37001     new_path=`$WHICH "$new_path" 2> /dev/null`
37002     # bat and cmd files are not always considered executable in MSYS causing which
37003     # to not find them
37004     if test "x$new_path" = x \
37005         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37006         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37007       new_path="$path"
37008 
37009   windows_path="$new_path"
37010   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37011     unix_path=`$CYGPATH -u "$windows_path"`
37012     new_path="$unix_path"
37013   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37014     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37015     new_path="$unix_path"
37016   fi
37017 
37018     fi
37019 
37020     if test "x$new_path" = x; then
37021       # It's still not found. Now this is an unrecoverable error.
37022       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37023 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37024       has_space=`$ECHO "$complete" | $GREP " "`
37025       if test "x$has_space" != x; then
37026         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37027 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37028       fi
37029       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37030     fi
37031   fi
37032 
37033   # Now new_path has a complete unix path to the binary
37034   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37035     # Keep paths in /bin as-is, but remove trailing .exe if any
37036     new_path="${new_path/%.exe/}"
37037     # Do not save /bin paths to all_fixpath_prefixes!
37038   else
37039     # Not in mixed or Windows style, start by that.
37040     new_path=`cmd //c echo $new_path`
37041 
37042   input_path="$new_path"
37043   # Check if we need to convert this using DOS-style short mode. If the path
37044   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37045   # take no chances and rewrite it.
37046   # Note: m4 eats our [], so we need to use [ and ] instead.
37047   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37048   if test "x$has_forbidden_chars" != x; then
37049     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37050     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37051   fi
37052 
37053     # Output is in $new_path
37054 
37055   windows_path="$new_path"
37056   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37057     unix_path=`$CYGPATH -u "$windows_path"`
37058     new_path="$unix_path"
37059   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37060     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37061     new_path="$unix_path"
37062   fi
37063 
37064     # remove trailing .exe if any
37065     new_path="${new_path/%.exe/}"
37066 
37067     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37068     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37069   fi
37070 
37071     else
37072       # We're on a unix platform. Hooray! :)
37073       # First separate the path from the arguments. This will split at the first
37074       # space.
37075       complete="$LIPO"
37076       path="${complete%% *}"
37077       tmp="$complete EOL"
37078       arguments="${tmp#* }"
37079 
37080       # Cannot rely on the command "which" here since it doesn't always work.
37081       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37082       if test -z "$is_absolute_path"; then
37083         # Path to executable is not absolute. Find it.
37084         IFS_save="$IFS"
37085         IFS=:
37086         for p in $PATH; do
37087           if test -f "$p/$path" && test -x "$p/$path"; then
37088             new_path="$p/$path"
37089             break
37090           fi
37091         done
37092         IFS="$IFS_save"
37093       else
37094         # This is an absolute path, we can use it without further modifications.
37095         new_path="$path"
37096       fi
37097 
37098       if test "x$new_path" = x; then
37099         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37100 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37101         has_space=`$ECHO "$complete" | $GREP " "`
37102         if test "x$has_space" != x; then
37103           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37104 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37105         fi
37106         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37107       fi
37108     fi
37109 
37110     # Now join together the path and the arguments once again
37111     if test "x$arguments" != xEOL; then
37112       new_complete="$new_path ${arguments% *}"
37113     else
37114       new_complete="$new_path"
37115     fi
37116 
37117     if test "x$complete" != "x$new_complete"; then
37118       LIPO="$new_complete"
37119       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37120 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37121     fi
37122   fi
37123 
37124   fi
37125 
37126   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37127     # Extract the first word of "mt", so it can be a program name with args.
37128 set dummy mt; ac_word=$2
37129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37130 $as_echo_n "checking for $ac_word... " >&6; }
37131 if ${ac_cv_prog_MT+:} false; then :
37132   $as_echo_n "(cached) " >&6
37133 else
37134   if test -n "$MT"; then
37135   ac_cv_prog_MT="$MT" # Let the user override the test.
37136 else
37137   ac_prog_rejected=no
37138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37139 for as_dir in $PATH
37140 do
37141   IFS=$as_save_IFS
37142   test -z "$as_dir" && as_dir=.
37143     for ac_exec_ext in '' $ac_executable_extensions; do
37144   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37145     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37146        ac_prog_rejected=yes
37147        continue
37148      fi
37149     ac_cv_prog_MT="mt"
37150     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37151     break 2
37152   fi
37153 done
37154   done
37155 IFS=$as_save_IFS
37156 
37157 if test $ac_prog_rejected = yes; then
37158   # We found a bogon in the path, so make sure we never use it.
37159   set dummy $ac_cv_prog_MT
37160   shift
37161   if test $# != 0; then
37162     # We chose a different compiler from the bogus one.
37163     # However, it has the same basename, so the bogon will be chosen
37164     # first if we set MT to just the basename; use the full file name.
37165     shift
37166     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37167   fi
37168 fi
37169 fi
37170 fi
37171 MT=$ac_cv_prog_MT
37172 if test -n "$MT"; then
37173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37174 $as_echo "$MT" >&6; }
37175 else
37176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37177 $as_echo "no" >&6; }
37178 fi
37179 
37180 
37181 
37182   # Only process if variable expands to non-empty
37183 
37184   if test "x$MT" != x; then
37185     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37186 
37187   # First separate the path from the arguments. This will split at the first
37188   # space.
37189   complete="$MT"
37190   path="${complete%% *}"
37191   tmp="$complete EOL"
37192   arguments="${tmp#* }"
37193 
37194   # Input might be given as Windows format, start by converting to
37195   # unix format.
37196   new_path=`$CYGPATH -u "$path"`
37197 
37198   # Now try to locate executable using which
37199   new_path=`$WHICH "$new_path" 2> /dev/null`
37200   # bat and cmd files are not always considered executable in cygwin causing which
37201   # to not find them
37202   if test "x$new_path" = x \
37203       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37204       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37205     new_path=`$CYGPATH -u "$path"`
37206   fi
37207   if test "x$new_path" = x; then
37208     # Oops. Which didn't find the executable.
37209     # The splitting of arguments from the executable at a space might have been incorrect,
37210     # since paths with space are more likely in Windows. Give it another try with the whole
37211     # argument.
37212     path="$complete"
37213     arguments="EOL"
37214     new_path=`$CYGPATH -u "$path"`
37215     new_path=`$WHICH "$new_path" 2> /dev/null`
37216     # bat and cmd files are not always considered executable in cygwin causing which
37217     # to not find them
37218     if test "x$new_path" = x \
37219         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37220         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37221       new_path=`$CYGPATH -u "$path"`
37222     fi
37223     if test "x$new_path" = x; then
37224       # It's still not found. Now this is an unrecoverable error.
37225       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37226 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37227       has_space=`$ECHO "$complete" | $GREP " "`
37228       if test "x$has_space" != x; then
37229         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37230 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37231       fi
37232       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37233     fi
37234   fi
37235 
37236   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37237   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37238   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37239   # "foo.exe" is OK but "foo" is an error.
37240   #
37241   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37242   # It is also a way to make sure we got the proper file name for the real test later on.
37243   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37244   if test "x$test_shortpath" = x; then
37245     # Short path failed, file does not exist as specified.
37246     # Try adding .exe or .cmd
37247     if test -f "${new_path}.exe"; then
37248       input_to_shortpath="${new_path}.exe"
37249     elif test -f "${new_path}.cmd"; then
37250       input_to_shortpath="${new_path}.cmd"
37251     else
37252       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37253 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37254       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37255 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37256       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37257     fi
37258   else
37259     input_to_shortpath="$new_path"
37260   fi
37261 
37262   # Call helper function which possibly converts this using DOS-style short mode.
37263   # If so, the updated path is stored in $new_path.
37264   new_path="$input_to_shortpath"
37265 
37266   input_path="$input_to_shortpath"
37267   # Check if we need to convert this using DOS-style short mode. If the path
37268   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37269   # take no chances and rewrite it.
37270   # Note: m4 eats our [], so we need to use [ and ] instead.
37271   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37272   if test "x$has_forbidden_chars" != x; then
37273     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37274     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37275     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37276     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37277       # Going to short mode and back again did indeed matter. Since short mode is
37278       # case insensitive, let's make it lowercase to improve readability.
37279       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37280       # Now convert it back to Unix-style (cygpath)
37281       input_path=`$CYGPATH -u "$shortmode_path"`
37282       new_path="$input_path"
37283     fi
37284   fi
37285 
37286   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37287   if test "x$test_cygdrive_prefix" = x; then
37288     # As a simple fix, exclude /usr/bin since it's not a real path.
37289     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37290       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37291       # a path prefixed by /cygdrive for fixpath to work.
37292       new_path="$CYGWIN_ROOT_PATH$input_path"
37293     fi
37294   fi
37295 
37296   # remove trailing .exe if any
37297   new_path="${new_path/%.exe/}"
37298 
37299     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37300 
37301   # First separate the path from the arguments. This will split at the first
37302   # space.
37303   complete="$MT"
37304   path="${complete%% *}"
37305   tmp="$complete EOL"
37306   arguments="${tmp#* }"
37307 
37308   # Input might be given as Windows format, start by converting to
37309   # unix format.
37310   new_path="$path"
37311 
37312   windows_path="$new_path"
37313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37314     unix_path=`$CYGPATH -u "$windows_path"`
37315     new_path="$unix_path"
37316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37317     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37318     new_path="$unix_path"
37319   fi
37320 
37321 
37322   # Now try to locate executable using which
37323   new_path=`$WHICH "$new_path" 2> /dev/null`
37324 
37325   if test "x$new_path" = x; then
37326     # Oops. Which didn't find the executable.
37327     # The splitting of arguments from the executable at a space might have been incorrect,
37328     # since paths with space are more likely in Windows. Give it another try with the whole
37329     # argument.
37330     path="$complete"
37331     arguments="EOL"
37332     new_path="$path"
37333 
37334   windows_path="$new_path"
37335   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37336     unix_path=`$CYGPATH -u "$windows_path"`
37337     new_path="$unix_path"
37338   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37339     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37340     new_path="$unix_path"
37341   fi
37342 
37343 
37344     new_path=`$WHICH "$new_path" 2> /dev/null`
37345     # bat and cmd files are not always considered executable in MSYS causing which
37346     # to not find them
37347     if test "x$new_path" = x \
37348         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37349         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37350       new_path="$path"
37351 
37352   windows_path="$new_path"
37353   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37354     unix_path=`$CYGPATH -u "$windows_path"`
37355     new_path="$unix_path"
37356   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37357     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37358     new_path="$unix_path"
37359   fi
37360 
37361     fi
37362 
37363     if test "x$new_path" = x; then
37364       # It's still not found. Now this is an unrecoverable error.
37365       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37366 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37367       has_space=`$ECHO "$complete" | $GREP " "`
37368       if test "x$has_space" != x; then
37369         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37370 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37371       fi
37372       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37373     fi
37374   fi
37375 
37376   # Now new_path has a complete unix path to the binary
37377   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37378     # Keep paths in /bin as-is, but remove trailing .exe if any
37379     new_path="${new_path/%.exe/}"
37380     # Do not save /bin paths to all_fixpath_prefixes!
37381   else
37382     # Not in mixed or Windows style, start by that.
37383     new_path=`cmd //c echo $new_path`
37384 
37385   input_path="$new_path"
37386   # Check if we need to convert this using DOS-style short mode. If the path
37387   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37388   # take no chances and rewrite it.
37389   # Note: m4 eats our [], so we need to use [ and ] instead.
37390   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37391   if test "x$has_forbidden_chars" != x; then
37392     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37393     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37394   fi
37395 
37396     # Output is in $new_path
37397 
37398   windows_path="$new_path"
37399   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37400     unix_path=`$CYGPATH -u "$windows_path"`
37401     new_path="$unix_path"
37402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37403     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37404     new_path="$unix_path"
37405   fi
37406 
37407     # remove trailing .exe if any
37408     new_path="${new_path/%.exe/}"
37409 
37410     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37411     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37412   fi
37413 
37414     else
37415       # We're on a unix platform. Hooray! :)
37416       # First separate the path from the arguments. This will split at the first
37417       # space.
37418       complete="$MT"
37419       path="${complete%% *}"
37420       tmp="$complete EOL"
37421       arguments="${tmp#* }"
37422 
37423       # Cannot rely on the command "which" here since it doesn't always work.
37424       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37425       if test -z "$is_absolute_path"; then
37426         # Path to executable is not absolute. Find it.
37427         IFS_save="$IFS"
37428         IFS=:
37429         for p in $PATH; do
37430           if test -f "$p/$path" && test -x "$p/$path"; then
37431             new_path="$p/$path"
37432             break
37433           fi
37434         done
37435         IFS="$IFS_save"
37436       else
37437         # This is an absolute path, we can use it without further modifications.
37438         new_path="$path"
37439       fi
37440 
37441       if test "x$new_path" = x; then
37442         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37443 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37444         has_space=`$ECHO "$complete" | $GREP " "`
37445         if test "x$has_space" != x; then
37446           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37447 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37448         fi
37449         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37450       fi
37451     fi
37452 
37453     # Now join together the path and the arguments once again
37454     if test "x$arguments" != xEOL; then
37455       new_complete="$new_path ${arguments% *}"
37456     else
37457       new_complete="$new_path"
37458     fi
37459 
37460     if test "x$complete" != "x$new_complete"; then
37461       MT="$new_complete"
37462       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37463 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37464     fi
37465   fi
37466 
37467     # Setup the resource compiler (RC)
37468     # Extract the first word of "rc", so it can be a program name with args.
37469 set dummy rc; ac_word=$2
37470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37471 $as_echo_n "checking for $ac_word... " >&6; }
37472 if ${ac_cv_prog_RC+:} false; then :
37473   $as_echo_n "(cached) " >&6
37474 else
37475   if test -n "$RC"; then
37476   ac_cv_prog_RC="$RC" # Let the user override the test.
37477 else
37478   ac_prog_rejected=no
37479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37480 for as_dir in $PATH
37481 do
37482   IFS=$as_save_IFS
37483   test -z "$as_dir" && as_dir=.
37484     for ac_exec_ext in '' $ac_executable_extensions; do
37485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37486     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37487        ac_prog_rejected=yes
37488        continue
37489      fi
37490     ac_cv_prog_RC="rc"
37491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37492     break 2
37493   fi
37494 done
37495   done
37496 IFS=$as_save_IFS
37497 
37498 if test $ac_prog_rejected = yes; then
37499   # We found a bogon in the path, so make sure we never use it.
37500   set dummy $ac_cv_prog_RC
37501   shift
37502   if test $# != 0; then
37503     # We chose a different compiler from the bogus one.
37504     # However, it has the same basename, so the bogon will be chosen
37505     # first if we set RC to just the basename; use the full file name.
37506     shift
37507     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37508   fi
37509 fi
37510 fi
37511 fi
37512 RC=$ac_cv_prog_RC
37513 if test -n "$RC"; then
37514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37515 $as_echo "$RC" >&6; }
37516 else
37517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37518 $as_echo "no" >&6; }
37519 fi
37520 
37521 
37522 
37523   # Only process if variable expands to non-empty
37524 
37525   if test "x$RC" != x; then
37526     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37527 
37528   # First separate the path from the arguments. This will split at the first
37529   # space.
37530   complete="$RC"
37531   path="${complete%% *}"
37532   tmp="$complete EOL"
37533   arguments="${tmp#* }"
37534 
37535   # Input might be given as Windows format, start by converting to
37536   # unix format.
37537   new_path=`$CYGPATH -u "$path"`
37538 
37539   # Now try to locate executable using which
37540   new_path=`$WHICH "$new_path" 2> /dev/null`
37541   # bat and cmd files are not always considered executable in cygwin causing which
37542   # to not find them
37543   if test "x$new_path" = x \
37544       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37545       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37546     new_path=`$CYGPATH -u "$path"`
37547   fi
37548   if test "x$new_path" = x; then
37549     # Oops. Which didn't find the executable.
37550     # The splitting of arguments from the executable at a space might have been incorrect,
37551     # since paths with space are more likely in Windows. Give it another try with the whole
37552     # argument.
37553     path="$complete"
37554     arguments="EOL"
37555     new_path=`$CYGPATH -u "$path"`
37556     new_path=`$WHICH "$new_path" 2> /dev/null`
37557     # bat and cmd files are not always considered executable in cygwin causing which
37558     # to not find them
37559     if test "x$new_path" = x \
37560         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37561         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37562       new_path=`$CYGPATH -u "$path"`
37563     fi
37564     if test "x$new_path" = x; then
37565       # It's still not found. Now this is an unrecoverable error.
37566       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37567 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37568       has_space=`$ECHO "$complete" | $GREP " "`
37569       if test "x$has_space" != x; then
37570         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37571 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37572       fi
37573       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37574     fi
37575   fi
37576 
37577   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37578   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37579   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37580   # "foo.exe" is OK but "foo" is an error.
37581   #
37582   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37583   # It is also a way to make sure we got the proper file name for the real test later on.
37584   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37585   if test "x$test_shortpath" = x; then
37586     # Short path failed, file does not exist as specified.
37587     # Try adding .exe or .cmd
37588     if test -f "${new_path}.exe"; then
37589       input_to_shortpath="${new_path}.exe"
37590     elif test -f "${new_path}.cmd"; then
37591       input_to_shortpath="${new_path}.cmd"
37592     else
37593       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37594 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37595       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37596 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37597       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37598     fi
37599   else
37600     input_to_shortpath="$new_path"
37601   fi
37602 
37603   # Call helper function which possibly converts this using DOS-style short mode.
37604   # If so, the updated path is stored in $new_path.
37605   new_path="$input_to_shortpath"
37606 
37607   input_path="$input_to_shortpath"
37608   # Check if we need to convert this using DOS-style short mode. If the path
37609   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37610   # take no chances and rewrite it.
37611   # Note: m4 eats our [], so we need to use [ and ] instead.
37612   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37613   if test "x$has_forbidden_chars" != x; then
37614     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37615     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37616     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37617     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37618       # Going to short mode and back again did indeed matter. Since short mode is
37619       # case insensitive, let's make it lowercase to improve readability.
37620       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37621       # Now convert it back to Unix-style (cygpath)
37622       input_path=`$CYGPATH -u "$shortmode_path"`
37623       new_path="$input_path"
37624     fi
37625   fi
37626 
37627   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37628   if test "x$test_cygdrive_prefix" = x; then
37629     # As a simple fix, exclude /usr/bin since it's not a real path.
37630     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37631       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37632       # a path prefixed by /cygdrive for fixpath to work.
37633       new_path="$CYGWIN_ROOT_PATH$input_path"
37634     fi
37635   fi
37636 
37637   # remove trailing .exe if any
37638   new_path="${new_path/%.exe/}"
37639 
37640     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37641 
37642   # First separate the path from the arguments. This will split at the first
37643   # space.
37644   complete="$RC"
37645   path="${complete%% *}"
37646   tmp="$complete EOL"
37647   arguments="${tmp#* }"
37648 
37649   # Input might be given as Windows format, start by converting to
37650   # unix format.
37651   new_path="$path"
37652 
37653   windows_path="$new_path"
37654   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37655     unix_path=`$CYGPATH -u "$windows_path"`
37656     new_path="$unix_path"
37657   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37658     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37659     new_path="$unix_path"
37660   fi
37661 
37662 
37663   # Now try to locate executable using which
37664   new_path=`$WHICH "$new_path" 2> /dev/null`
37665 
37666   if test "x$new_path" = x; then
37667     # Oops. Which didn't find the executable.
37668     # The splitting of arguments from the executable at a space might have been incorrect,
37669     # since paths with space are more likely in Windows. Give it another try with the whole
37670     # argument.
37671     path="$complete"
37672     arguments="EOL"
37673     new_path="$path"
37674 
37675   windows_path="$new_path"
37676   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37677     unix_path=`$CYGPATH -u "$windows_path"`
37678     new_path="$unix_path"
37679   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37680     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37681     new_path="$unix_path"
37682   fi
37683 
37684 
37685     new_path=`$WHICH "$new_path" 2> /dev/null`
37686     # bat and cmd files are not always considered executable in MSYS causing which
37687     # to not find them
37688     if test "x$new_path" = x \
37689         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37690         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37691       new_path="$path"
37692 
37693   windows_path="$new_path"
37694   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37695     unix_path=`$CYGPATH -u "$windows_path"`
37696     new_path="$unix_path"
37697   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37698     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37699     new_path="$unix_path"
37700   fi
37701 
37702     fi
37703 
37704     if test "x$new_path" = x; then
37705       # It's still not found. Now this is an unrecoverable error.
37706       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37707 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37708       has_space=`$ECHO "$complete" | $GREP " "`
37709       if test "x$has_space" != x; then
37710         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37711 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37712       fi
37713       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37714     fi
37715   fi
37716 
37717   # Now new_path has a complete unix path to the binary
37718   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37719     # Keep paths in /bin as-is, but remove trailing .exe if any
37720     new_path="${new_path/%.exe/}"
37721     # Do not save /bin paths to all_fixpath_prefixes!
37722   else
37723     # Not in mixed or Windows style, start by that.
37724     new_path=`cmd //c echo $new_path`
37725 
37726   input_path="$new_path"
37727   # Check if we need to convert this using DOS-style short mode. If the path
37728   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37729   # take no chances and rewrite it.
37730   # Note: m4 eats our [], so we need to use [ and ] instead.
37731   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37732   if test "x$has_forbidden_chars" != x; then
37733     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37734     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37735   fi
37736 
37737     # Output is in $new_path
37738 
37739   windows_path="$new_path"
37740   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37741     unix_path=`$CYGPATH -u "$windows_path"`
37742     new_path="$unix_path"
37743   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37744     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37745     new_path="$unix_path"
37746   fi
37747 
37748     # remove trailing .exe if any
37749     new_path="${new_path/%.exe/}"
37750 
37751     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37752     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37753   fi
37754 
37755     else
37756       # We're on a unix platform. Hooray! :)
37757       # First separate the path from the arguments. This will split at the first
37758       # space.
37759       complete="$RC"
37760       path="${complete%% *}"
37761       tmp="$complete EOL"
37762       arguments="${tmp#* }"
37763 
37764       # Cannot rely on the command "which" here since it doesn't always work.
37765       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37766       if test -z "$is_absolute_path"; then
37767         # Path to executable is not absolute. Find it.
37768         IFS_save="$IFS"
37769         IFS=:
37770         for p in $PATH; do
37771           if test -f "$p/$path" && test -x "$p/$path"; then
37772             new_path="$p/$path"
37773             break
37774           fi
37775         done
37776         IFS="$IFS_save"
37777       else
37778         # This is an absolute path, we can use it without further modifications.
37779         new_path="$path"
37780       fi
37781 
37782       if test "x$new_path" = x; then
37783         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37784 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37785         has_space=`$ECHO "$complete" | $GREP " "`
37786         if test "x$has_space" != x; then
37787           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37788 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37789         fi
37790         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37791       fi
37792     fi
37793 
37794     # Now join together the path and the arguments once again
37795     if test "x$arguments" != xEOL; then
37796       new_complete="$new_path ${arguments% *}"
37797     else
37798       new_complete="$new_path"
37799     fi
37800 
37801     if test "x$complete" != "x$new_complete"; then
37802       RC="$new_complete"
37803       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37804 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37805     fi
37806   fi
37807 
37808     # Extract the first word of "dumpbin", so it can be a program name with args.
37809 set dummy dumpbin; ac_word=$2
37810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37811 $as_echo_n "checking for $ac_word... " >&6; }
37812 if ${ac_cv_prog_DUMPBIN+:} false; then :
37813   $as_echo_n "(cached) " >&6
37814 else
37815   if test -n "$DUMPBIN"; then
37816   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37817 else
37818 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37819 for as_dir in $PATH
37820 do
37821   IFS=$as_save_IFS
37822   test -z "$as_dir" && as_dir=.
37823     for ac_exec_ext in '' $ac_executable_extensions; do
37824   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37825     ac_cv_prog_DUMPBIN="dumpbin"
37826     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37827     break 2
37828   fi
37829 done
37830   done
37831 IFS=$as_save_IFS
37832 
37833 fi
37834 fi
37835 DUMPBIN=$ac_cv_prog_DUMPBIN
37836 if test -n "$DUMPBIN"; then
37837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37838 $as_echo "$DUMPBIN" >&6; }
37839 else
37840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37841 $as_echo "no" >&6; }
37842 fi
37843 
37844 
37845 
37846   # Only process if variable expands to non-empty
37847 
37848   if test "x$DUMPBIN" != x; then
37849     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37850 
37851   # First separate the path from the arguments. This will split at the first
37852   # space.
37853   complete="$DUMPBIN"
37854   path="${complete%% *}"
37855   tmp="$complete EOL"
37856   arguments="${tmp#* }"
37857 
37858   # Input might be given as Windows format, start by converting to
37859   # unix format.
37860   new_path=`$CYGPATH -u "$path"`
37861 
37862   # Now try to locate executable using which
37863   new_path=`$WHICH "$new_path" 2> /dev/null`
37864   # bat and cmd files are not always considered executable in cygwin causing which
37865   # to not find them
37866   if test "x$new_path" = x \
37867       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37868       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37869     new_path=`$CYGPATH -u "$path"`
37870   fi
37871   if test "x$new_path" = x; then
37872     # Oops. Which didn't find the executable.
37873     # The splitting of arguments from the executable at a space might have been incorrect,
37874     # since paths with space are more likely in Windows. Give it another try with the whole
37875     # argument.
37876     path="$complete"
37877     arguments="EOL"
37878     new_path=`$CYGPATH -u "$path"`
37879     new_path=`$WHICH "$new_path" 2> /dev/null`
37880     # bat and cmd files are not always considered executable in cygwin causing which
37881     # to not find them
37882     if test "x$new_path" = x \
37883         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37884         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37885       new_path=`$CYGPATH -u "$path"`
37886     fi
37887     if test "x$new_path" = x; then
37888       # It's still not found. Now this is an unrecoverable error.
37889       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37890 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37891       has_space=`$ECHO "$complete" | $GREP " "`
37892       if test "x$has_space" != x; then
37893         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37894 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37895       fi
37896       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37897     fi
37898   fi
37899 
37900   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37901   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37902   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37903   # "foo.exe" is OK but "foo" is an error.
37904   #
37905   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37906   # It is also a way to make sure we got the proper file name for the real test later on.
37907   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37908   if test "x$test_shortpath" = x; then
37909     # Short path failed, file does not exist as specified.
37910     # Try adding .exe or .cmd
37911     if test -f "${new_path}.exe"; then
37912       input_to_shortpath="${new_path}.exe"
37913     elif test -f "${new_path}.cmd"; then
37914       input_to_shortpath="${new_path}.cmd"
37915     else
37916       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37917 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37918       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37919 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37920       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37921     fi
37922   else
37923     input_to_shortpath="$new_path"
37924   fi
37925 
37926   # Call helper function which possibly converts this using DOS-style short mode.
37927   # If so, the updated path is stored in $new_path.
37928   new_path="$input_to_shortpath"
37929 
37930   input_path="$input_to_shortpath"
37931   # Check if we need to convert this using DOS-style short mode. If the path
37932   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37933   # take no chances and rewrite it.
37934   # Note: m4 eats our [], so we need to use [ and ] instead.
37935   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37936   if test "x$has_forbidden_chars" != x; then
37937     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37938     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37939     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37940     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37941       # Going to short mode and back again did indeed matter. Since short mode is
37942       # case insensitive, let's make it lowercase to improve readability.
37943       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37944       # Now convert it back to Unix-style (cygpath)
37945       input_path=`$CYGPATH -u "$shortmode_path"`
37946       new_path="$input_path"
37947     fi
37948   fi
37949 
37950   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37951   if test "x$test_cygdrive_prefix" = x; then
37952     # As a simple fix, exclude /usr/bin since it's not a real path.
37953     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37954       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37955       # a path prefixed by /cygdrive for fixpath to work.
37956       new_path="$CYGWIN_ROOT_PATH$input_path"
37957     fi
37958   fi
37959 
37960   # remove trailing .exe if any
37961   new_path="${new_path/%.exe/}"
37962 
37963     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37964 
37965   # First separate the path from the arguments. This will split at the first
37966   # space.
37967   complete="$DUMPBIN"
37968   path="${complete%% *}"
37969   tmp="$complete EOL"
37970   arguments="${tmp#* }"
37971 
37972   # Input might be given as Windows format, start by converting to
37973   # unix format.
37974   new_path="$path"
37975 
37976   windows_path="$new_path"
37977   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37978     unix_path=`$CYGPATH -u "$windows_path"`
37979     new_path="$unix_path"
37980   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37981     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37982     new_path="$unix_path"
37983   fi
37984 
37985 
37986   # Now try to locate executable using which
37987   new_path=`$WHICH "$new_path" 2> /dev/null`
37988 
37989   if test "x$new_path" = x; then
37990     # Oops. Which didn't find the executable.
37991     # The splitting of arguments from the executable at a space might have been incorrect,
37992     # since paths with space are more likely in Windows. Give it another try with the whole
37993     # argument.
37994     path="$complete"
37995     arguments="EOL"
37996     new_path="$path"
37997 
37998   windows_path="$new_path"
37999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38000     unix_path=`$CYGPATH -u "$windows_path"`
38001     new_path="$unix_path"
38002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38003     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38004     new_path="$unix_path"
38005   fi
38006 
38007 
38008     new_path=`$WHICH "$new_path" 2> /dev/null`
38009     # bat and cmd files are not always considered executable in MSYS causing which
38010     # to not find them
38011     if test "x$new_path" = x \
38012         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38013         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38014       new_path="$path"
38015 
38016   windows_path="$new_path"
38017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38018     unix_path=`$CYGPATH -u "$windows_path"`
38019     new_path="$unix_path"
38020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38021     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38022     new_path="$unix_path"
38023   fi
38024 
38025     fi
38026 
38027     if test "x$new_path" = x; then
38028       # It's still not found. Now this is an unrecoverable error.
38029       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38030 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38031       has_space=`$ECHO "$complete" | $GREP " "`
38032       if test "x$has_space" != x; then
38033         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38034 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38035       fi
38036       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38037     fi
38038   fi
38039 
38040   # Now new_path has a complete unix path to the binary
38041   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38042     # Keep paths in /bin as-is, but remove trailing .exe if any
38043     new_path="${new_path/%.exe/}"
38044     # Do not save /bin paths to all_fixpath_prefixes!
38045   else
38046     # Not in mixed or Windows style, start by that.
38047     new_path=`cmd //c echo $new_path`
38048 
38049   input_path="$new_path"
38050   # Check if we need to convert this using DOS-style short mode. If the path
38051   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38052   # take no chances and rewrite it.
38053   # Note: m4 eats our [], so we need to use [ and ] instead.
38054   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38055   if test "x$has_forbidden_chars" != x; then
38056     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38057     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38058   fi
38059 
38060     # Output is in $new_path
38061 
38062   windows_path="$new_path"
38063   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38064     unix_path=`$CYGPATH -u "$windows_path"`
38065     new_path="$unix_path"
38066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38067     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38068     new_path="$unix_path"
38069   fi
38070 
38071     # remove trailing .exe if any
38072     new_path="${new_path/%.exe/}"
38073 
38074     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38075     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38076   fi
38077 
38078     else
38079       # We're on a unix platform. Hooray! :)
38080       # First separate the path from the arguments. This will split at the first
38081       # space.
38082       complete="$DUMPBIN"
38083       path="${complete%% *}"
38084       tmp="$complete EOL"
38085       arguments="${tmp#* }"
38086 
38087       # Cannot rely on the command "which" here since it doesn't always work.
38088       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38089       if test -z "$is_absolute_path"; then
38090         # Path to executable is not absolute. Find it.
38091         IFS_save="$IFS"
38092         IFS=:
38093         for p in $PATH; do
38094           if test -f "$p/$path" && test -x "$p/$path"; then
38095             new_path="$p/$path"
38096             break
38097           fi
38098         done
38099         IFS="$IFS_save"
38100       else
38101         # This is an absolute path, we can use it without further modifications.
38102         new_path="$path"
38103       fi
38104 
38105       if test "x$new_path" = x; then
38106         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38107 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38108         has_space=`$ECHO "$complete" | $GREP " "`
38109         if test "x$has_space" != x; then
38110           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38111 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38112         fi
38113         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38114       fi
38115     fi
38116 
38117     # Now join together the path and the arguments once again
38118     if test "x$arguments" != xEOL; then
38119       new_complete="$new_path ${arguments% *}"
38120     else
38121       new_complete="$new_path"
38122     fi
38123 
38124     if test "x$complete" != "x$new_complete"; then
38125       DUMPBIN="$new_complete"
38126       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38127 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38128     fi
38129   fi
38130 
38131     # We need to check for 'msbuild.exe' because at the place where we expect to
38132     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38133     # won't find the 'msbuild.exe' executable in that case (and the
38134     # 'ac_executable_extensions' is unusable due to performance reasons).
38135     # Notice that we intentionally don't fix up the path to MSBUILD because we
38136     # will call it in a DOS shell during freetype detection on Windows (see
38137     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38138     # Extract the first word of "msbuild.exe", so it can be a program name with args.
38139 set dummy msbuild.exe; ac_word=$2
38140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38141 $as_echo_n "checking for $ac_word... " >&6; }
38142 if ${ac_cv_prog_MSBUILD+:} false; then :
38143   $as_echo_n "(cached) " >&6
38144 else
38145   if test -n "$MSBUILD"; then
38146   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38147 else
38148 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38149 for as_dir in $PATH
38150 do
38151   IFS=$as_save_IFS
38152   test -z "$as_dir" && as_dir=.
38153     for ac_exec_ext in '' $ac_executable_extensions; do
38154   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38155     ac_cv_prog_MSBUILD="msbuild.exe"
38156     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38157     break 2
38158   fi
38159 done
38160   done
38161 IFS=$as_save_IFS
38162 
38163 fi
38164 fi
38165 MSBUILD=$ac_cv_prog_MSBUILD
38166 if test -n "$MSBUILD"; then
38167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38168 $as_echo "$MSBUILD" >&6; }
38169 else
38170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38171 $as_echo "no" >&6; }
38172 fi
38173 
38174 
38175   fi
38176 
38177   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38178 
38179 
38180   # Publish this variable in the help.
38181 
38182 
38183   if [ -z "${STRIP+x}" ]; then
38184     # The variable is not set by user, try to locate tool using the code snippet
38185     for ac_prog in strip
38186 do
38187   # Extract the first word of "$ac_prog", so it can be a program name with args.
38188 set dummy $ac_prog; ac_word=$2
38189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38190 $as_echo_n "checking for $ac_word... " >&6; }
38191 if ${ac_cv_path_STRIP+:} false; then :
38192   $as_echo_n "(cached) " >&6
38193 else
38194   case $STRIP in
38195   [\\/]* | ?:[\\/]*)
38196   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38197   ;;
38198   *)
38199   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38200 for as_dir in $PATH
38201 do
38202   IFS=$as_save_IFS
38203   test -z "$as_dir" && as_dir=.
38204     for ac_exec_ext in '' $ac_executable_extensions; do
38205   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38206     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38207     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38208     break 2
38209   fi
38210 done
38211   done
38212 IFS=$as_save_IFS
38213 
38214   ;;
38215 esac
38216 fi
38217 STRIP=$ac_cv_path_STRIP
38218 if test -n "$STRIP"; then
38219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38220 $as_echo "$STRIP" >&6; }
38221 else
38222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38223 $as_echo "no" >&6; }
38224 fi
38225 
38226 
38227   test -n "$STRIP" && break
38228 done
38229 
38230   else
38231     # The variable is set, but is it from the command line or the environment?
38232 
38233     # Try to remove the string !STRIP! from our list.
38234     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38235     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38236       # If it failed, the variable was not from the command line. Ignore it,
38237       # but warn the user (except for BASH, which is always set by the calling BASH).
38238       if test "xSTRIP" != xBASH; then
38239         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38240 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38241       fi
38242       # Try to locate tool using the code snippet
38243       for ac_prog in strip
38244 do
38245   # Extract the first word of "$ac_prog", so it can be a program name with args.
38246 set dummy $ac_prog; ac_word=$2
38247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38248 $as_echo_n "checking for $ac_word... " >&6; }
38249 if ${ac_cv_path_STRIP+:} false; then :
38250   $as_echo_n "(cached) " >&6
38251 else
38252   case $STRIP in
38253   [\\/]* | ?:[\\/]*)
38254   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38255   ;;
38256   *)
38257   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38258 for as_dir in $PATH
38259 do
38260   IFS=$as_save_IFS
38261   test -z "$as_dir" && as_dir=.
38262     for ac_exec_ext in '' $ac_executable_extensions; do
38263   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38264     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38265     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38266     break 2
38267   fi
38268 done
38269   done
38270 IFS=$as_save_IFS
38271 
38272   ;;
38273 esac
38274 fi
38275 STRIP=$ac_cv_path_STRIP
38276 if test -n "$STRIP"; then
38277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38278 $as_echo "$STRIP" >&6; }
38279 else
38280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38281 $as_echo "no" >&6; }
38282 fi
38283 
38284 
38285   test -n "$STRIP" && break
38286 done
38287 
38288     else
38289       # If it succeeded, then it was overridden by the user. We will use it
38290       # for the tool.
38291 
38292       # First remove it from the list of overridden variables, so we can test
38293       # for unknown variables in the end.
38294       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38295 
38296       # Check if we try to supply an empty value
38297       if test "x$STRIP" = x; then
38298         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38299 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38300         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38301 $as_echo_n "checking for STRIP... " >&6; }
38302         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38303 $as_echo "disabled" >&6; }
38304       else
38305         # Check if the provided tool contains a complete path.
38306         tool_specified="$STRIP"
38307         tool_basename="${tool_specified##*/}"
38308         if test "x$tool_basename" = "x$tool_specified"; then
38309           # A command without a complete path is provided, search $PATH.
38310           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38311 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38312           # Extract the first word of "$tool_basename", so it can be a program name with args.
38313 set dummy $tool_basename; ac_word=$2
38314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38315 $as_echo_n "checking for $ac_word... " >&6; }
38316 if ${ac_cv_path_STRIP+:} false; then :
38317   $as_echo_n "(cached) " >&6
38318 else
38319   case $STRIP in
38320   [\\/]* | ?:[\\/]*)
38321   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38322   ;;
38323   *)
38324   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38325 for as_dir in $PATH
38326 do
38327   IFS=$as_save_IFS
38328   test -z "$as_dir" && as_dir=.
38329     for ac_exec_ext in '' $ac_executable_extensions; do
38330   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38331     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38333     break 2
38334   fi
38335 done
38336   done
38337 IFS=$as_save_IFS
38338 
38339   ;;
38340 esac
38341 fi
38342 STRIP=$ac_cv_path_STRIP
38343 if test -n "$STRIP"; then
38344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38345 $as_echo "$STRIP" >&6; }
38346 else
38347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38348 $as_echo "no" >&6; }
38349 fi
38350 
38351 
38352           if test "x$STRIP" = x; then
38353             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38354           fi
38355         else
38356           # Otherwise we believe it is a complete path. Use it as it is.
38357           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38358 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38359           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38360 $as_echo_n "checking for STRIP... " >&6; }
38361           if test ! -x "$tool_specified"; then
38362             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38363 $as_echo "not found" >&6; }
38364             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38365           fi
38366           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38367 $as_echo "$tool_specified" >&6; }
38368         fi
38369       fi
38370     fi
38371 
38372   fi
38373 
38374 
38375 
38376   # Only process if variable expands to non-empty
38377 
38378   if test "x$STRIP" != x; then
38379     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38380 
38381   # First separate the path from the arguments. This will split at the first
38382   # space.
38383   complete="$STRIP"
38384   path="${complete%% *}"
38385   tmp="$complete EOL"
38386   arguments="${tmp#* }"
38387 
38388   # Input might be given as Windows format, start by converting to
38389   # unix format.
38390   new_path=`$CYGPATH -u "$path"`
38391 
38392   # Now try to locate executable using which
38393   new_path=`$WHICH "$new_path" 2> /dev/null`
38394   # bat and cmd files are not always considered executable in cygwin causing which
38395   # to not find them
38396   if test "x$new_path" = x \
38397       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38398       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38399     new_path=`$CYGPATH -u "$path"`
38400   fi
38401   if test "x$new_path" = x; then
38402     # Oops. Which didn't find the executable.
38403     # The splitting of arguments from the executable at a space might have been incorrect,
38404     # since paths with space are more likely in Windows. Give it another try with the whole
38405     # argument.
38406     path="$complete"
38407     arguments="EOL"
38408     new_path=`$CYGPATH -u "$path"`
38409     new_path=`$WHICH "$new_path" 2> /dev/null`
38410     # bat and cmd files are not always considered executable in cygwin causing which
38411     # to not find them
38412     if test "x$new_path" = x \
38413         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38414         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38415       new_path=`$CYGPATH -u "$path"`
38416     fi
38417     if test "x$new_path" = x; then
38418       # It's still not found. Now this is an unrecoverable error.
38419       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38420 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38421       has_space=`$ECHO "$complete" | $GREP " "`
38422       if test "x$has_space" != x; then
38423         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38424 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38425       fi
38426       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38427     fi
38428   fi
38429 
38430   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38431   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38432   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38433   # "foo.exe" is OK but "foo" is an error.
38434   #
38435   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38436   # It is also a way to make sure we got the proper file name for the real test later on.
38437   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38438   if test "x$test_shortpath" = x; then
38439     # Short path failed, file does not exist as specified.
38440     # Try adding .exe or .cmd
38441     if test -f "${new_path}.exe"; then
38442       input_to_shortpath="${new_path}.exe"
38443     elif test -f "${new_path}.cmd"; then
38444       input_to_shortpath="${new_path}.cmd"
38445     else
38446       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38447 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38448       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38449 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38450       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38451     fi
38452   else
38453     input_to_shortpath="$new_path"
38454   fi
38455 
38456   # Call helper function which possibly converts this using DOS-style short mode.
38457   # If so, the updated path is stored in $new_path.
38458   new_path="$input_to_shortpath"
38459 
38460   input_path="$input_to_shortpath"
38461   # Check if we need to convert this using DOS-style short mode. If the path
38462   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38463   # take no chances and rewrite it.
38464   # Note: m4 eats our [], so we need to use [ and ] instead.
38465   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38466   if test "x$has_forbidden_chars" != x; then
38467     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38468     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38469     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38470     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38471       # Going to short mode and back again did indeed matter. Since short mode is
38472       # case insensitive, let's make it lowercase to improve readability.
38473       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38474       # Now convert it back to Unix-style (cygpath)
38475       input_path=`$CYGPATH -u "$shortmode_path"`
38476       new_path="$input_path"
38477     fi
38478   fi
38479 
38480   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38481   if test "x$test_cygdrive_prefix" = x; then
38482     # As a simple fix, exclude /usr/bin since it's not a real path.
38483     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38484       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38485       # a path prefixed by /cygdrive for fixpath to work.
38486       new_path="$CYGWIN_ROOT_PATH$input_path"
38487     fi
38488   fi
38489 
38490   # remove trailing .exe if any
38491   new_path="${new_path/%.exe/}"
38492 
38493     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38494 
38495   # First separate the path from the arguments. This will split at the first
38496   # space.
38497   complete="$STRIP"
38498   path="${complete%% *}"
38499   tmp="$complete EOL"
38500   arguments="${tmp#* }"
38501 
38502   # Input might be given as Windows format, start by converting to
38503   # unix format.
38504   new_path="$path"
38505 
38506   windows_path="$new_path"
38507   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38508     unix_path=`$CYGPATH -u "$windows_path"`
38509     new_path="$unix_path"
38510   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38511     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38512     new_path="$unix_path"
38513   fi
38514 
38515 
38516   # Now try to locate executable using which
38517   new_path=`$WHICH "$new_path" 2> /dev/null`
38518 
38519   if test "x$new_path" = x; then
38520     # Oops. Which didn't find the executable.
38521     # The splitting of arguments from the executable at a space might have been incorrect,
38522     # since paths with space are more likely in Windows. Give it another try with the whole
38523     # argument.
38524     path="$complete"
38525     arguments="EOL"
38526     new_path="$path"
38527 
38528   windows_path="$new_path"
38529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38530     unix_path=`$CYGPATH -u "$windows_path"`
38531     new_path="$unix_path"
38532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38533     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38534     new_path="$unix_path"
38535   fi
38536 
38537 
38538     new_path=`$WHICH "$new_path" 2> /dev/null`
38539     # bat and cmd files are not always considered executable in MSYS causing which
38540     # to not find them
38541     if test "x$new_path" = x \
38542         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38543         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38544       new_path="$path"
38545 
38546   windows_path="$new_path"
38547   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38548     unix_path=`$CYGPATH -u "$windows_path"`
38549     new_path="$unix_path"
38550   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38551     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38552     new_path="$unix_path"
38553   fi
38554 
38555     fi
38556 
38557     if test "x$new_path" = x; then
38558       # It's still not found. Now this is an unrecoverable error.
38559       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38560 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38561       has_space=`$ECHO "$complete" | $GREP " "`
38562       if test "x$has_space" != x; then
38563         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38564 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38565       fi
38566       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38567     fi
38568   fi
38569 
38570   # Now new_path has a complete unix path to the binary
38571   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38572     # Keep paths in /bin as-is, but remove trailing .exe if any
38573     new_path="${new_path/%.exe/}"
38574     # Do not save /bin paths to all_fixpath_prefixes!
38575   else
38576     # Not in mixed or Windows style, start by that.
38577     new_path=`cmd //c echo $new_path`
38578 
38579   input_path="$new_path"
38580   # Check if we need to convert this using DOS-style short mode. If the path
38581   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38582   # take no chances and rewrite it.
38583   # Note: m4 eats our [], so we need to use [ and ] instead.
38584   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38585   if test "x$has_forbidden_chars" != x; then
38586     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38587     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38588   fi
38589 
38590     # Output is in $new_path
38591 
38592   windows_path="$new_path"
38593   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38594     unix_path=`$CYGPATH -u "$windows_path"`
38595     new_path="$unix_path"
38596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38597     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38598     new_path="$unix_path"
38599   fi
38600 
38601     # remove trailing .exe if any
38602     new_path="${new_path/%.exe/}"
38603 
38604     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38605     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38606   fi
38607 
38608     else
38609       # We're on a unix platform. Hooray! :)
38610       # First separate the path from the arguments. This will split at the first
38611       # space.
38612       complete="$STRIP"
38613       path="${complete%% *}"
38614       tmp="$complete EOL"
38615       arguments="${tmp#* }"
38616 
38617       # Cannot rely on the command "which" here since it doesn't always work.
38618       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38619       if test -z "$is_absolute_path"; then
38620         # Path to executable is not absolute. Find it.
38621         IFS_save="$IFS"
38622         IFS=:
38623         for p in $PATH; do
38624           if test -f "$p/$path" && test -x "$p/$path"; then
38625             new_path="$p/$path"
38626             break
38627           fi
38628         done
38629         IFS="$IFS_save"
38630       else
38631         # This is an absolute path, we can use it without further modifications.
38632         new_path="$path"
38633       fi
38634 
38635       if test "x$new_path" = x; then
38636         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38637 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38638         has_space=`$ECHO "$complete" | $GREP " "`
38639         if test "x$has_space" != x; then
38640           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38641 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38642         fi
38643         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38644       fi
38645     fi
38646 
38647     # Now join together the path and the arguments once again
38648     if test "x$arguments" != xEOL; then
38649       new_complete="$new_path ${arguments% *}"
38650     else
38651       new_complete="$new_path"
38652     fi
38653 
38654     if test "x$complete" != "x$new_complete"; then
38655       STRIP="$new_complete"
38656       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38657 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38658     fi
38659   fi
38660 
38661 
38662 
38663   # Publish this variable in the help.
38664 
38665 
38666   if [ -z "${NM+x}" ]; then
38667     # The variable is not set by user, try to locate tool using the code snippet
38668     for ac_prog in nm
38669 do
38670   # Extract the first word of "$ac_prog", so it can be a program name with args.
38671 set dummy $ac_prog; ac_word=$2
38672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38673 $as_echo_n "checking for $ac_word... " >&6; }
38674 if ${ac_cv_path_NM+:} false; then :
38675   $as_echo_n "(cached) " >&6
38676 else
38677   case $NM in
38678   [\\/]* | ?:[\\/]*)
38679   ac_cv_path_NM="$NM" # Let the user override the test with a path.
38680   ;;
38681   *)
38682   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38683 for as_dir in $PATH
38684 do
38685   IFS=$as_save_IFS
38686   test -z "$as_dir" && as_dir=.
38687     for ac_exec_ext in '' $ac_executable_extensions; do
38688   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38689     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38690     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38691     break 2
38692   fi
38693 done
38694   done
38695 IFS=$as_save_IFS
38696 
38697   ;;
38698 esac
38699 fi
38700 NM=$ac_cv_path_NM
38701 if test -n "$NM"; then
38702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38703 $as_echo "$NM" >&6; }
38704 else
38705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38706 $as_echo "no" >&6; }
38707 fi
38708 
38709 
38710   test -n "$NM" && break
38711 done
38712 
38713   else
38714     # The variable is set, but is it from the command line or the environment?
38715 
38716     # Try to remove the string !NM! from our list.
38717     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38718     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38719       # If it failed, the variable was not from the command line. Ignore it,
38720       # but warn the user (except for BASH, which is always set by the calling BASH).
38721       if test "xNM" != xBASH; then
38722         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38723 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38724       fi
38725       # Try to locate tool using the code snippet
38726       for ac_prog in nm
38727 do
38728   # Extract the first word of "$ac_prog", so it can be a program name with args.
38729 set dummy $ac_prog; ac_word=$2
38730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38731 $as_echo_n "checking for $ac_word... " >&6; }
38732 if ${ac_cv_path_NM+:} false; then :
38733   $as_echo_n "(cached) " >&6
38734 else
38735   case $NM in
38736   [\\/]* | ?:[\\/]*)
38737   ac_cv_path_NM="$NM" # Let the user override the test with a path.
38738   ;;
38739   *)
38740   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38741 for as_dir in $PATH
38742 do
38743   IFS=$as_save_IFS
38744   test -z "$as_dir" && as_dir=.
38745     for ac_exec_ext in '' $ac_executable_extensions; do
38746   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38747     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38748     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38749     break 2
38750   fi
38751 done
38752   done
38753 IFS=$as_save_IFS
38754 
38755   ;;
38756 esac
38757 fi
38758 NM=$ac_cv_path_NM
38759 if test -n "$NM"; then
38760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38761 $as_echo "$NM" >&6; }
38762 else
38763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38764 $as_echo "no" >&6; }
38765 fi
38766 
38767 
38768   test -n "$NM" && break
38769 done
38770 
38771     else
38772       # If it succeeded, then it was overridden by the user. We will use it
38773       # for the tool.
38774 
38775       # First remove it from the list of overridden variables, so we can test
38776       # for unknown variables in the end.
38777       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38778 
38779       # Check if we try to supply an empty value
38780       if test "x$NM" = x; then
38781         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38782 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38783         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38784 $as_echo_n "checking for NM... " >&6; }
38785         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38786 $as_echo "disabled" >&6; }
38787       else
38788         # Check if the provided tool contains a complete path.
38789         tool_specified="$NM"
38790         tool_basename="${tool_specified##*/}"
38791         if test "x$tool_basename" = "x$tool_specified"; then
38792           # A command without a complete path is provided, search $PATH.
38793           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38794 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38795           # Extract the first word of "$tool_basename", so it can be a program name with args.
38796 set dummy $tool_basename; ac_word=$2
38797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38798 $as_echo_n "checking for $ac_word... " >&6; }
38799 if ${ac_cv_path_NM+:} false; then :
38800   $as_echo_n "(cached) " >&6
38801 else
38802   case $NM in
38803   [\\/]* | ?:[\\/]*)
38804   ac_cv_path_NM="$NM" # Let the user override the test with a path.
38805   ;;
38806   *)
38807   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38808 for as_dir in $PATH
38809 do
38810   IFS=$as_save_IFS
38811   test -z "$as_dir" && as_dir=.
38812     for ac_exec_ext in '' $ac_executable_extensions; do
38813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38814     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38816     break 2
38817   fi
38818 done
38819   done
38820 IFS=$as_save_IFS
38821 
38822   ;;
38823 esac
38824 fi
38825 NM=$ac_cv_path_NM
38826 if test -n "$NM"; then
38827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38828 $as_echo "$NM" >&6; }
38829 else
38830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38831 $as_echo "no" >&6; }
38832 fi
38833 
38834 
38835           if test "x$NM" = x; then
38836             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38837           fi
38838         else
38839           # Otherwise we believe it is a complete path. Use it as it is.
38840           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38841 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38842           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38843 $as_echo_n "checking for NM... " >&6; }
38844           if test ! -x "$tool_specified"; then
38845             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38846 $as_echo "not found" >&6; }
38847             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38848           fi
38849           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38850 $as_echo "$tool_specified" >&6; }
38851         fi
38852       fi
38853     fi
38854 
38855   fi
38856 
38857 
38858 
38859   # Only process if variable expands to non-empty
38860 
38861   if test "x$NM" != x; then
38862     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38863 
38864   # First separate the path from the arguments. This will split at the first
38865   # space.
38866   complete="$NM"
38867   path="${complete%% *}"
38868   tmp="$complete EOL"
38869   arguments="${tmp#* }"
38870 
38871   # Input might be given as Windows format, start by converting to
38872   # unix format.
38873   new_path=`$CYGPATH -u "$path"`
38874 
38875   # Now try to locate executable using which
38876   new_path=`$WHICH "$new_path" 2> /dev/null`
38877   # bat and cmd files are not always considered executable in cygwin causing which
38878   # to not find them
38879   if test "x$new_path" = x \
38880       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38881       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38882     new_path=`$CYGPATH -u "$path"`
38883   fi
38884   if test "x$new_path" = x; then
38885     # Oops. Which didn't find the executable.
38886     # The splitting of arguments from the executable at a space might have been incorrect,
38887     # since paths with space are more likely in Windows. Give it another try with the whole
38888     # argument.
38889     path="$complete"
38890     arguments="EOL"
38891     new_path=`$CYGPATH -u "$path"`
38892     new_path=`$WHICH "$new_path" 2> /dev/null`
38893     # bat and cmd files are not always considered executable in cygwin causing which
38894     # to not find them
38895     if test "x$new_path" = x \
38896         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38897         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38898       new_path=`$CYGPATH -u "$path"`
38899     fi
38900     if test "x$new_path" = x; then
38901       # It's still not found. Now this is an unrecoverable error.
38902       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38903 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38904       has_space=`$ECHO "$complete" | $GREP " "`
38905       if test "x$has_space" != x; then
38906         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38907 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38908       fi
38909       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38910     fi
38911   fi
38912 
38913   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38914   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38915   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38916   # "foo.exe" is OK but "foo" is an error.
38917   #
38918   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38919   # It is also a way to make sure we got the proper file name for the real test later on.
38920   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38921   if test "x$test_shortpath" = x; then
38922     # Short path failed, file does not exist as specified.
38923     # Try adding .exe or .cmd
38924     if test -f "${new_path}.exe"; then
38925       input_to_shortpath="${new_path}.exe"
38926     elif test -f "${new_path}.cmd"; then
38927       input_to_shortpath="${new_path}.cmd"
38928     else
38929       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38930 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38931       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38932 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38933       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38934     fi
38935   else
38936     input_to_shortpath="$new_path"
38937   fi
38938 
38939   # Call helper function which possibly converts this using DOS-style short mode.
38940   # If so, the updated path is stored in $new_path.
38941   new_path="$input_to_shortpath"
38942 
38943   input_path="$input_to_shortpath"
38944   # Check if we need to convert this using DOS-style short mode. If the path
38945   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38946   # take no chances and rewrite it.
38947   # Note: m4 eats our [], so we need to use [ and ] instead.
38948   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38949   if test "x$has_forbidden_chars" != x; then
38950     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38951     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38952     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38953     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38954       # Going to short mode and back again did indeed matter. Since short mode is
38955       # case insensitive, let's make it lowercase to improve readability.
38956       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38957       # Now convert it back to Unix-style (cygpath)
38958       input_path=`$CYGPATH -u "$shortmode_path"`
38959       new_path="$input_path"
38960     fi
38961   fi
38962 
38963   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38964   if test "x$test_cygdrive_prefix" = x; then
38965     # As a simple fix, exclude /usr/bin since it's not a real path.
38966     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38967       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38968       # a path prefixed by /cygdrive for fixpath to work.
38969       new_path="$CYGWIN_ROOT_PATH$input_path"
38970     fi
38971   fi
38972 
38973   # remove trailing .exe if any
38974   new_path="${new_path/%.exe/}"
38975 
38976     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38977 
38978   # First separate the path from the arguments. This will split at the first
38979   # space.
38980   complete="$NM"
38981   path="${complete%% *}"
38982   tmp="$complete EOL"
38983   arguments="${tmp#* }"
38984 
38985   # Input might be given as Windows format, start by converting to
38986   # unix format.
38987   new_path="$path"
38988 
38989   windows_path="$new_path"
38990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38991     unix_path=`$CYGPATH -u "$windows_path"`
38992     new_path="$unix_path"
38993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38994     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38995     new_path="$unix_path"
38996   fi
38997 
38998 
38999   # Now try to locate executable using which
39000   new_path=`$WHICH "$new_path" 2> /dev/null`
39001 
39002   if test "x$new_path" = x; then
39003     # Oops. Which didn't find the executable.
39004     # The splitting of arguments from the executable at a space might have been incorrect,
39005     # since paths with space are more likely in Windows. Give it another try with the whole
39006     # argument.
39007     path="$complete"
39008     arguments="EOL"
39009     new_path="$path"
39010 
39011   windows_path="$new_path"
39012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39013     unix_path=`$CYGPATH -u "$windows_path"`
39014     new_path="$unix_path"
39015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39016     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39017     new_path="$unix_path"
39018   fi
39019 
39020 
39021     new_path=`$WHICH "$new_path" 2> /dev/null`
39022     # bat and cmd files are not always considered executable in MSYS causing which
39023     # to not find them
39024     if test "x$new_path" = x \
39025         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39026         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39027       new_path="$path"
39028 
39029   windows_path="$new_path"
39030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39031     unix_path=`$CYGPATH -u "$windows_path"`
39032     new_path="$unix_path"
39033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39034     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39035     new_path="$unix_path"
39036   fi
39037 
39038     fi
39039 
39040     if test "x$new_path" = x; then
39041       # It's still not found. Now this is an unrecoverable error.
39042       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39043 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39044       has_space=`$ECHO "$complete" | $GREP " "`
39045       if test "x$has_space" != x; then
39046         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39047 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39048       fi
39049       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39050     fi
39051   fi
39052 
39053   # Now new_path has a complete unix path to the binary
39054   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39055     # Keep paths in /bin as-is, but remove trailing .exe if any
39056     new_path="${new_path/%.exe/}"
39057     # Do not save /bin paths to all_fixpath_prefixes!
39058   else
39059     # Not in mixed or Windows style, start by that.
39060     new_path=`cmd //c echo $new_path`
39061 
39062   input_path="$new_path"
39063   # Check if we need to convert this using DOS-style short mode. If the path
39064   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39065   # take no chances and rewrite it.
39066   # Note: m4 eats our [], so we need to use [ and ] instead.
39067   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39068   if test "x$has_forbidden_chars" != x; then
39069     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39070     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39071   fi
39072 
39073     # Output is in $new_path
39074 
39075   windows_path="$new_path"
39076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39077     unix_path=`$CYGPATH -u "$windows_path"`
39078     new_path="$unix_path"
39079   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39080     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39081     new_path="$unix_path"
39082   fi
39083 
39084     # remove trailing .exe if any
39085     new_path="${new_path/%.exe/}"
39086 
39087     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39088     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39089   fi
39090 
39091     else
39092       # We're on a unix platform. Hooray! :)
39093       # First separate the path from the arguments. This will split at the first
39094       # space.
39095       complete="$NM"
39096       path="${complete%% *}"
39097       tmp="$complete EOL"
39098       arguments="${tmp#* }"
39099 
39100       # Cannot rely on the command "which" here since it doesn't always work.
39101       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39102       if test -z "$is_absolute_path"; then
39103         # Path to executable is not absolute. Find it.
39104         IFS_save="$IFS"
39105         IFS=:
39106         for p in $PATH; do
39107           if test -f "$p/$path" && test -x "$p/$path"; then
39108             new_path="$p/$path"
39109             break
39110           fi
39111         done
39112         IFS="$IFS_save"
39113       else
39114         # This is an absolute path, we can use it without further modifications.
39115         new_path="$path"
39116       fi
39117 
39118       if test "x$new_path" = x; then
39119         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39120 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39121         has_space=`$ECHO "$complete" | $GREP " "`
39122         if test "x$has_space" != x; then
39123           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39124 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39125         fi
39126         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39127       fi
39128     fi
39129 
39130     # Now join together the path and the arguments once again
39131     if test "x$arguments" != xEOL; then
39132       new_complete="$new_path ${arguments% *}"
39133     else
39134       new_complete="$new_path"
39135     fi
39136 
39137     if test "x$complete" != "x$new_complete"; then
39138       NM="$new_complete"
39139       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39140 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39141     fi
39142   fi
39143 
39144 
39145 
39146   # Publish this variable in the help.
39147 
39148 
39149   if [ -z "${GNM+x}" ]; then
39150     # The variable is not set by user, try to locate tool using the code snippet
39151     for ac_prog in gnm
39152 do
39153   # Extract the first word of "$ac_prog", so it can be a program name with args.
39154 set dummy $ac_prog; ac_word=$2
39155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39156 $as_echo_n "checking for $ac_word... " >&6; }
39157 if ${ac_cv_path_GNM+:} false; then :
39158   $as_echo_n "(cached) " >&6
39159 else
39160   case $GNM in
39161   [\\/]* | ?:[\\/]*)
39162   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39163   ;;
39164   *)
39165   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39166 for as_dir in $PATH
39167 do
39168   IFS=$as_save_IFS
39169   test -z "$as_dir" && as_dir=.
39170     for ac_exec_ext in '' $ac_executable_extensions; do
39171   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39172     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39174     break 2
39175   fi
39176 done
39177   done
39178 IFS=$as_save_IFS
39179 
39180   ;;
39181 esac
39182 fi
39183 GNM=$ac_cv_path_GNM
39184 if test -n "$GNM"; then
39185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39186 $as_echo "$GNM" >&6; }
39187 else
39188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39189 $as_echo "no" >&6; }
39190 fi
39191 
39192 
39193   test -n "$GNM" && break
39194 done
39195 
39196   else
39197     # The variable is set, but is it from the command line or the environment?
39198 
39199     # Try to remove the string !GNM! from our list.
39200     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39201     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39202       # If it failed, the variable was not from the command line. Ignore it,
39203       # but warn the user (except for BASH, which is always set by the calling BASH).
39204       if test "xGNM" != xBASH; then
39205         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39206 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39207       fi
39208       # Try to locate tool using the code snippet
39209       for ac_prog in gnm
39210 do
39211   # Extract the first word of "$ac_prog", so it can be a program name with args.
39212 set dummy $ac_prog; ac_word=$2
39213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39214 $as_echo_n "checking for $ac_word... " >&6; }
39215 if ${ac_cv_path_GNM+:} false; then :
39216   $as_echo_n "(cached) " >&6
39217 else
39218   case $GNM in
39219   [\\/]* | ?:[\\/]*)
39220   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39221   ;;
39222   *)
39223   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39224 for as_dir in $PATH
39225 do
39226   IFS=$as_save_IFS
39227   test -z "$as_dir" && as_dir=.
39228     for ac_exec_ext in '' $ac_executable_extensions; do
39229   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39230     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39231     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39232     break 2
39233   fi
39234 done
39235   done
39236 IFS=$as_save_IFS
39237 
39238   ;;
39239 esac
39240 fi
39241 GNM=$ac_cv_path_GNM
39242 if test -n "$GNM"; then
39243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39244 $as_echo "$GNM" >&6; }
39245 else
39246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39247 $as_echo "no" >&6; }
39248 fi
39249 
39250 
39251   test -n "$GNM" && break
39252 done
39253 
39254     else
39255       # If it succeeded, then it was overridden by the user. We will use it
39256       # for the tool.
39257 
39258       # First remove it from the list of overridden variables, so we can test
39259       # for unknown variables in the end.
39260       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39261 
39262       # Check if we try to supply an empty value
39263       if test "x$GNM" = x; then
39264         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39265 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39266         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39267 $as_echo_n "checking for GNM... " >&6; }
39268         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39269 $as_echo "disabled" >&6; }
39270       else
39271         # Check if the provided tool contains a complete path.
39272         tool_specified="$GNM"
39273         tool_basename="${tool_specified##*/}"
39274         if test "x$tool_basename" = "x$tool_specified"; then
39275           # A command without a complete path is provided, search $PATH.
39276           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39277 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39278           # Extract the first word of "$tool_basename", so it can be a program name with args.
39279 set dummy $tool_basename; ac_word=$2
39280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39281 $as_echo_n "checking for $ac_word... " >&6; }
39282 if ${ac_cv_path_GNM+:} false; then :
39283   $as_echo_n "(cached) " >&6
39284 else
39285   case $GNM in
39286   [\\/]* | ?:[\\/]*)
39287   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39288   ;;
39289   *)
39290   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39291 for as_dir in $PATH
39292 do
39293   IFS=$as_save_IFS
39294   test -z "$as_dir" && as_dir=.
39295     for ac_exec_ext in '' $ac_executable_extensions; do
39296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39297     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39299     break 2
39300   fi
39301 done
39302   done
39303 IFS=$as_save_IFS
39304 
39305   ;;
39306 esac
39307 fi
39308 GNM=$ac_cv_path_GNM
39309 if test -n "$GNM"; then
39310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39311 $as_echo "$GNM" >&6; }
39312 else
39313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39314 $as_echo "no" >&6; }
39315 fi
39316 
39317 
39318           if test "x$GNM" = x; then
39319             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39320           fi
39321         else
39322           # Otherwise we believe it is a complete path. Use it as it is.
39323           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39324 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39325           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39326 $as_echo_n "checking for GNM... " >&6; }
39327           if test ! -x "$tool_specified"; then
39328             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39329 $as_echo "not found" >&6; }
39330             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39331           fi
39332           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39333 $as_echo "$tool_specified" >&6; }
39334         fi
39335       fi
39336     fi
39337 
39338   fi
39339 
39340 
39341 
39342   # Only process if variable expands to non-empty
39343 
39344   if test "x$GNM" != x; then
39345     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39346 
39347   # First separate the path from the arguments. This will split at the first
39348   # space.
39349   complete="$GNM"
39350   path="${complete%% *}"
39351   tmp="$complete EOL"
39352   arguments="${tmp#* }"
39353 
39354   # Input might be given as Windows format, start by converting to
39355   # unix format.
39356   new_path=`$CYGPATH -u "$path"`
39357 
39358   # Now try to locate executable using which
39359   new_path=`$WHICH "$new_path" 2> /dev/null`
39360   # bat and cmd files are not always considered executable in cygwin causing which
39361   # to not find them
39362   if test "x$new_path" = x \
39363       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39364       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39365     new_path=`$CYGPATH -u "$path"`
39366   fi
39367   if test "x$new_path" = x; then
39368     # Oops. Which didn't find the executable.
39369     # The splitting of arguments from the executable at a space might have been incorrect,
39370     # since paths with space are more likely in Windows. Give it another try with the whole
39371     # argument.
39372     path="$complete"
39373     arguments="EOL"
39374     new_path=`$CYGPATH -u "$path"`
39375     new_path=`$WHICH "$new_path" 2> /dev/null`
39376     # bat and cmd files are not always considered executable in cygwin causing which
39377     # to not find them
39378     if test "x$new_path" = x \
39379         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39380         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39381       new_path=`$CYGPATH -u "$path"`
39382     fi
39383     if test "x$new_path" = x; then
39384       # It's still not found. Now this is an unrecoverable error.
39385       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39386 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39387       has_space=`$ECHO "$complete" | $GREP " "`
39388       if test "x$has_space" != x; then
39389         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39390 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39391       fi
39392       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39393     fi
39394   fi
39395 
39396   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39397   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39398   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39399   # "foo.exe" is OK but "foo" is an error.
39400   #
39401   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39402   # It is also a way to make sure we got the proper file name for the real test later on.
39403   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39404   if test "x$test_shortpath" = x; then
39405     # Short path failed, file does not exist as specified.
39406     # Try adding .exe or .cmd
39407     if test -f "${new_path}.exe"; then
39408       input_to_shortpath="${new_path}.exe"
39409     elif test -f "${new_path}.cmd"; then
39410       input_to_shortpath="${new_path}.cmd"
39411     else
39412       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39413 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39414       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39415 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39416       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39417     fi
39418   else
39419     input_to_shortpath="$new_path"
39420   fi
39421 
39422   # Call helper function which possibly converts this using DOS-style short mode.
39423   # If so, the updated path is stored in $new_path.
39424   new_path="$input_to_shortpath"
39425 
39426   input_path="$input_to_shortpath"
39427   # Check if we need to convert this using DOS-style short mode. If the path
39428   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39429   # take no chances and rewrite it.
39430   # Note: m4 eats our [], so we need to use [ and ] instead.
39431   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39432   if test "x$has_forbidden_chars" != x; then
39433     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39434     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39435     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39436     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39437       # Going to short mode and back again did indeed matter. Since short mode is
39438       # case insensitive, let's make it lowercase to improve readability.
39439       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39440       # Now convert it back to Unix-style (cygpath)
39441       input_path=`$CYGPATH -u "$shortmode_path"`
39442       new_path="$input_path"
39443     fi
39444   fi
39445 
39446   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39447   if test "x$test_cygdrive_prefix" = x; then
39448     # As a simple fix, exclude /usr/bin since it's not a real path.
39449     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39450       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39451       # a path prefixed by /cygdrive for fixpath to work.
39452       new_path="$CYGWIN_ROOT_PATH$input_path"
39453     fi
39454   fi
39455 
39456   # remove trailing .exe if any
39457   new_path="${new_path/%.exe/}"
39458 
39459     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39460 
39461   # First separate the path from the arguments. This will split at the first
39462   # space.
39463   complete="$GNM"
39464   path="${complete%% *}"
39465   tmp="$complete EOL"
39466   arguments="${tmp#* }"
39467 
39468   # Input might be given as Windows format, start by converting to
39469   # unix format.
39470   new_path="$path"
39471 
39472   windows_path="$new_path"
39473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39474     unix_path=`$CYGPATH -u "$windows_path"`
39475     new_path="$unix_path"
39476   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39477     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39478     new_path="$unix_path"
39479   fi
39480 
39481 
39482   # Now try to locate executable using which
39483   new_path=`$WHICH "$new_path" 2> /dev/null`
39484 
39485   if test "x$new_path" = x; then
39486     # Oops. Which didn't find the executable.
39487     # The splitting of arguments from the executable at a space might have been incorrect,
39488     # since paths with space are more likely in Windows. Give it another try with the whole
39489     # argument.
39490     path="$complete"
39491     arguments="EOL"
39492     new_path="$path"
39493 
39494   windows_path="$new_path"
39495   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39496     unix_path=`$CYGPATH -u "$windows_path"`
39497     new_path="$unix_path"
39498   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39499     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39500     new_path="$unix_path"
39501   fi
39502 
39503 
39504     new_path=`$WHICH "$new_path" 2> /dev/null`
39505     # bat and cmd files are not always considered executable in MSYS causing which
39506     # to not find them
39507     if test "x$new_path" = x \
39508         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39509         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39510       new_path="$path"
39511 
39512   windows_path="$new_path"
39513   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39514     unix_path=`$CYGPATH -u "$windows_path"`
39515     new_path="$unix_path"
39516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39517     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39518     new_path="$unix_path"
39519   fi
39520 
39521     fi
39522 
39523     if test "x$new_path" = x; then
39524       # It's still not found. Now this is an unrecoverable error.
39525       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39526 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39527       has_space=`$ECHO "$complete" | $GREP " "`
39528       if test "x$has_space" != x; then
39529         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39530 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39531       fi
39532       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39533     fi
39534   fi
39535 
39536   # Now new_path has a complete unix path to the binary
39537   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39538     # Keep paths in /bin as-is, but remove trailing .exe if any
39539     new_path="${new_path/%.exe/}"
39540     # Do not save /bin paths to all_fixpath_prefixes!
39541   else
39542     # Not in mixed or Windows style, start by that.
39543     new_path=`cmd //c echo $new_path`
39544 
39545   input_path="$new_path"
39546   # Check if we need to convert this using DOS-style short mode. If the path
39547   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39548   # take no chances and rewrite it.
39549   # Note: m4 eats our [], so we need to use [ and ] instead.
39550   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39551   if test "x$has_forbidden_chars" != x; then
39552     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39553     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39554   fi
39555 
39556     # Output is in $new_path
39557 
39558   windows_path="$new_path"
39559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39560     unix_path=`$CYGPATH -u "$windows_path"`
39561     new_path="$unix_path"
39562   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39563     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39564     new_path="$unix_path"
39565   fi
39566 
39567     # remove trailing .exe if any
39568     new_path="${new_path/%.exe/}"
39569 
39570     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39571     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39572   fi
39573 
39574     else
39575       # We're on a unix platform. Hooray! :)
39576       # First separate the path from the arguments. This will split at the first
39577       # space.
39578       complete="$GNM"
39579       path="${complete%% *}"
39580       tmp="$complete EOL"
39581       arguments="${tmp#* }"
39582 
39583       # Cannot rely on the command "which" here since it doesn't always work.
39584       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39585       if test -z "$is_absolute_path"; then
39586         # Path to executable is not absolute. Find it.
39587         IFS_save="$IFS"
39588         IFS=:
39589         for p in $PATH; do
39590           if test -f "$p/$path" && test -x "$p/$path"; then
39591             new_path="$p/$path"
39592             break
39593           fi
39594         done
39595         IFS="$IFS_save"
39596       else
39597         # This is an absolute path, we can use it without further modifications.
39598         new_path="$path"
39599       fi
39600 
39601       if test "x$new_path" = x; then
39602         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39603 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39604         has_space=`$ECHO "$complete" | $GREP " "`
39605         if test "x$has_space" != x; then
39606           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39607 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39608         fi
39609         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39610       fi
39611     fi
39612 
39613     # Now join together the path and the arguments once again
39614     if test "x$arguments" != xEOL; then
39615       new_complete="$new_path ${arguments% *}"
39616     else
39617       new_complete="$new_path"
39618     fi
39619 
39620     if test "x$complete" != "x$new_complete"; then
39621       GNM="$new_complete"
39622       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39623 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39624     fi
39625   fi
39626 
39627   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39628     # FIXME: we should unify this with the solaris case above.
39629 
39630 
39631   # Publish this variable in the help.
39632 
39633 
39634   if [ -z "${STRIP+x}" ]; then
39635     # The variable is not set by user, try to locate tool using the code snippet
39636     if test -n "$ac_tool_prefix"; then
39637   for ac_prog in strip
39638   do
39639     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39640 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39642 $as_echo_n "checking for $ac_word... " >&6; }
39643 if ${ac_cv_prog_STRIP+:} false; then :
39644   $as_echo_n "(cached) " >&6
39645 else
39646   if test -n "$STRIP"; then
39647   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39648 else
39649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39650 for as_dir in $PATH
39651 do
39652   IFS=$as_save_IFS
39653   test -z "$as_dir" && as_dir=.
39654     for ac_exec_ext in '' $ac_executable_extensions; do
39655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39656     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39658     break 2
39659   fi
39660 done
39661   done
39662 IFS=$as_save_IFS
39663 
39664 fi
39665 fi
39666 STRIP=$ac_cv_prog_STRIP
39667 if test -n "$STRIP"; then
39668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39669 $as_echo "$STRIP" >&6; }
39670 else
39671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39672 $as_echo "no" >&6; }
39673 fi
39674 
39675 
39676     test -n "$STRIP" && break
39677   done
39678 fi
39679 if test -z "$STRIP"; then
39680   ac_ct_STRIP=$STRIP
39681   for ac_prog in strip
39682 do
39683   # Extract the first word of "$ac_prog", so it can be a program name with args.
39684 set dummy $ac_prog; ac_word=$2
39685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39686 $as_echo_n "checking for $ac_word... " >&6; }
39687 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39688   $as_echo_n "(cached) " >&6
39689 else
39690   if test -n "$ac_ct_STRIP"; then
39691   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39692 else
39693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39694 for as_dir in $PATH
39695 do
39696   IFS=$as_save_IFS
39697   test -z "$as_dir" && as_dir=.
39698     for ac_exec_ext in '' $ac_executable_extensions; do
39699   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39700     ac_cv_prog_ac_ct_STRIP="$ac_prog"
39701     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39702     break 2
39703   fi
39704 done
39705   done
39706 IFS=$as_save_IFS
39707 
39708 fi
39709 fi
39710 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39711 if test -n "$ac_ct_STRIP"; then
39712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39713 $as_echo "$ac_ct_STRIP" >&6; }
39714 else
39715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39716 $as_echo "no" >&6; }
39717 fi
39718 
39719 
39720   test -n "$ac_ct_STRIP" && break
39721 done
39722 
39723   if test "x$ac_ct_STRIP" = x; then
39724     STRIP=""
39725   else
39726     case $cross_compiling:$ac_tool_warned in
39727 yes:)
39728 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39729 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39730 ac_tool_warned=yes ;;
39731 esac
39732     STRIP=$ac_ct_STRIP
39733   fi
39734 fi
39735 
39736   else
39737     # The variable is set, but is it from the command line or the environment?
39738 
39739     # Try to remove the string !STRIP! from our list.
39740     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39741     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39742       # If it failed, the variable was not from the command line. Ignore it,
39743       # but warn the user (except for BASH, which is always set by the calling BASH).
39744       if test "xSTRIP" != xBASH; then
39745         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39746 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39747       fi
39748       # Try to locate tool using the code snippet
39749       if test -n "$ac_tool_prefix"; then
39750   for ac_prog in strip
39751   do
39752     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39753 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39755 $as_echo_n "checking for $ac_word... " >&6; }
39756 if ${ac_cv_prog_STRIP+:} false; then :
39757   $as_echo_n "(cached) " >&6
39758 else
39759   if test -n "$STRIP"; then
39760   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39761 else
39762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39763 for as_dir in $PATH
39764 do
39765   IFS=$as_save_IFS
39766   test -z "$as_dir" && as_dir=.
39767     for ac_exec_ext in '' $ac_executable_extensions; do
39768   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39769     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39771     break 2
39772   fi
39773 done
39774   done
39775 IFS=$as_save_IFS
39776 
39777 fi
39778 fi
39779 STRIP=$ac_cv_prog_STRIP
39780 if test -n "$STRIP"; then
39781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39782 $as_echo "$STRIP" >&6; }
39783 else
39784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39785 $as_echo "no" >&6; }
39786 fi
39787 
39788 
39789     test -n "$STRIP" && break
39790   done
39791 fi
39792 if test -z "$STRIP"; then
39793   ac_ct_STRIP=$STRIP
39794   for ac_prog in strip
39795 do
39796   # Extract the first word of "$ac_prog", so it can be a program name with args.
39797 set dummy $ac_prog; ac_word=$2
39798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39799 $as_echo_n "checking for $ac_word... " >&6; }
39800 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39801   $as_echo_n "(cached) " >&6
39802 else
39803   if test -n "$ac_ct_STRIP"; then
39804   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39805 else
39806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39807 for as_dir in $PATH
39808 do
39809   IFS=$as_save_IFS
39810   test -z "$as_dir" && as_dir=.
39811     for ac_exec_ext in '' $ac_executable_extensions; do
39812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39813     ac_cv_prog_ac_ct_STRIP="$ac_prog"
39814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39815     break 2
39816   fi
39817 done
39818   done
39819 IFS=$as_save_IFS
39820 
39821 fi
39822 fi
39823 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39824 if test -n "$ac_ct_STRIP"; then
39825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39826 $as_echo "$ac_ct_STRIP" >&6; }
39827 else
39828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39829 $as_echo "no" >&6; }
39830 fi
39831 
39832 
39833   test -n "$ac_ct_STRIP" && break
39834 done
39835 
39836   if test "x$ac_ct_STRIP" = x; then
39837     STRIP=""
39838   else
39839     case $cross_compiling:$ac_tool_warned in
39840 yes:)
39841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39842 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39843 ac_tool_warned=yes ;;
39844 esac
39845     STRIP=$ac_ct_STRIP
39846   fi
39847 fi
39848 
39849     else
39850       # If it succeeded, then it was overridden by the user. We will use it
39851       # for the tool.
39852 
39853       # First remove it from the list of overridden variables, so we can test
39854       # for unknown variables in the end.
39855       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39856 
39857       # Check if we try to supply an empty value
39858       if test "x$STRIP" = x; then
39859         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39860 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39861         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39862 $as_echo_n "checking for STRIP... " >&6; }
39863         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39864 $as_echo "disabled" >&6; }
39865       else
39866         # Check if the provided tool contains a complete path.
39867         tool_specified="$STRIP"
39868         tool_basename="${tool_specified##*/}"
39869         if test "x$tool_basename" = "x$tool_specified"; then
39870           # A command without a complete path is provided, search $PATH.
39871           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39872 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39873           # Extract the first word of "$tool_basename", so it can be a program name with args.
39874 set dummy $tool_basename; ac_word=$2
39875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39876 $as_echo_n "checking for $ac_word... " >&6; }
39877 if ${ac_cv_path_STRIP+:} false; then :
39878   $as_echo_n "(cached) " >&6
39879 else
39880   case $STRIP in
39881   [\\/]* | ?:[\\/]*)
39882   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39883   ;;
39884   *)
39885   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39886 for as_dir in $PATH
39887 do
39888   IFS=$as_save_IFS
39889   test -z "$as_dir" && as_dir=.
39890     for ac_exec_ext in '' $ac_executable_extensions; do
39891   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39892     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39893     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39894     break 2
39895   fi
39896 done
39897   done
39898 IFS=$as_save_IFS
39899 
39900   ;;
39901 esac
39902 fi
39903 STRIP=$ac_cv_path_STRIP
39904 if test -n "$STRIP"; then
39905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39906 $as_echo "$STRIP" >&6; }
39907 else
39908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39909 $as_echo "no" >&6; }
39910 fi
39911 
39912 
39913           if test "x$STRIP" = x; then
39914             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39915           fi
39916         else
39917           # Otherwise we believe it is a complete path. Use it as it is.
39918           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39919 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39920           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39921 $as_echo_n "checking for STRIP... " >&6; }
39922           if test ! -x "$tool_specified"; then
39923             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39924 $as_echo "not found" >&6; }
39925             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39926           fi
39927           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39928 $as_echo "$tool_specified" >&6; }
39929         fi
39930       fi
39931     fi
39932 
39933   fi
39934 
39935 
39936 
39937   # Only process if variable expands to non-empty
39938 
39939   if test "x$STRIP" != x; then
39940     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39941 
39942   # First separate the path from the arguments. This will split at the first
39943   # space.
39944   complete="$STRIP"
39945   path="${complete%% *}"
39946   tmp="$complete EOL"
39947   arguments="${tmp#* }"
39948 
39949   # Input might be given as Windows format, start by converting to
39950   # unix format.
39951   new_path=`$CYGPATH -u "$path"`
39952 
39953   # Now try to locate executable using which
39954   new_path=`$WHICH "$new_path" 2> /dev/null`
39955   # bat and cmd files are not always considered executable in cygwin causing which
39956   # to not find them
39957   if test "x$new_path" = x \
39958       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39959       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39960     new_path=`$CYGPATH -u "$path"`
39961   fi
39962   if test "x$new_path" = x; then
39963     # Oops. Which didn't find the executable.
39964     # The splitting of arguments from the executable at a space might have been incorrect,
39965     # since paths with space are more likely in Windows. Give it another try with the whole
39966     # argument.
39967     path="$complete"
39968     arguments="EOL"
39969     new_path=`$CYGPATH -u "$path"`
39970     new_path=`$WHICH "$new_path" 2> /dev/null`
39971     # bat and cmd files are not always considered executable in cygwin causing which
39972     # to not find them
39973     if test "x$new_path" = x \
39974         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39975         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39976       new_path=`$CYGPATH -u "$path"`
39977     fi
39978     if test "x$new_path" = x; then
39979       # It's still not found. Now this is an unrecoverable error.
39980       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39981 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39982       has_space=`$ECHO "$complete" | $GREP " "`
39983       if test "x$has_space" != x; then
39984         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39985 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39986       fi
39987       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39988     fi
39989   fi
39990 
39991   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39992   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39993   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39994   # "foo.exe" is OK but "foo" is an error.
39995   #
39996   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39997   # It is also a way to make sure we got the proper file name for the real test later on.
39998   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39999   if test "x$test_shortpath" = x; then
40000     # Short path failed, file does not exist as specified.
40001     # Try adding .exe or .cmd
40002     if test -f "${new_path}.exe"; then
40003       input_to_shortpath="${new_path}.exe"
40004     elif test -f "${new_path}.cmd"; then
40005       input_to_shortpath="${new_path}.cmd"
40006     else
40007       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40008 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40009       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40010 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40011       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40012     fi
40013   else
40014     input_to_shortpath="$new_path"
40015   fi
40016 
40017   # Call helper function which possibly converts this using DOS-style short mode.
40018   # If so, the updated path is stored in $new_path.
40019   new_path="$input_to_shortpath"
40020 
40021   input_path="$input_to_shortpath"
40022   # Check if we need to convert this using DOS-style short mode. If the path
40023   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40024   # take no chances and rewrite it.
40025   # Note: m4 eats our [], so we need to use [ and ] instead.
40026   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40027   if test "x$has_forbidden_chars" != x; then
40028     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40029     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40030     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40031     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40032       # Going to short mode and back again did indeed matter. Since short mode is
40033       # case insensitive, let's make it lowercase to improve readability.
40034       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40035       # Now convert it back to Unix-style (cygpath)
40036       input_path=`$CYGPATH -u "$shortmode_path"`
40037       new_path="$input_path"
40038     fi
40039   fi
40040 
40041   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40042   if test "x$test_cygdrive_prefix" = x; then
40043     # As a simple fix, exclude /usr/bin since it's not a real path.
40044     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40045       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40046       # a path prefixed by /cygdrive for fixpath to work.
40047       new_path="$CYGWIN_ROOT_PATH$input_path"
40048     fi
40049   fi
40050 
40051   # remove trailing .exe if any
40052   new_path="${new_path/%.exe/}"
40053 
40054     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40055 
40056   # First separate the path from the arguments. This will split at the first
40057   # space.
40058   complete="$STRIP"
40059   path="${complete%% *}"
40060   tmp="$complete EOL"
40061   arguments="${tmp#* }"
40062 
40063   # Input might be given as Windows format, start by converting to
40064   # unix format.
40065   new_path="$path"
40066 
40067   windows_path="$new_path"
40068   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40069     unix_path=`$CYGPATH -u "$windows_path"`
40070     new_path="$unix_path"
40071   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40072     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40073     new_path="$unix_path"
40074   fi
40075 
40076 
40077   # Now try to locate executable using which
40078   new_path=`$WHICH "$new_path" 2> /dev/null`
40079 
40080   if test "x$new_path" = x; then
40081     # Oops. Which didn't find the executable.
40082     # The splitting of arguments from the executable at a space might have been incorrect,
40083     # since paths with space are more likely in Windows. Give it another try with the whole
40084     # argument.
40085     path="$complete"
40086     arguments="EOL"
40087     new_path="$path"
40088 
40089   windows_path="$new_path"
40090   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40091     unix_path=`$CYGPATH -u "$windows_path"`
40092     new_path="$unix_path"
40093   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40094     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40095     new_path="$unix_path"
40096   fi
40097 
40098 
40099     new_path=`$WHICH "$new_path" 2> /dev/null`
40100     # bat and cmd files are not always considered executable in MSYS causing which
40101     # to not find them
40102     if test "x$new_path" = x \
40103         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40104         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40105       new_path="$path"
40106 
40107   windows_path="$new_path"
40108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40109     unix_path=`$CYGPATH -u "$windows_path"`
40110     new_path="$unix_path"
40111   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40112     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40113     new_path="$unix_path"
40114   fi
40115 
40116     fi
40117 
40118     if test "x$new_path" = x; then
40119       # It's still not found. Now this is an unrecoverable error.
40120       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40121 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40122       has_space=`$ECHO "$complete" | $GREP " "`
40123       if test "x$has_space" != x; then
40124         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40125 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40126       fi
40127       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40128     fi
40129   fi
40130 
40131   # Now new_path has a complete unix path to the binary
40132   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40133     # Keep paths in /bin as-is, but remove trailing .exe if any
40134     new_path="${new_path/%.exe/}"
40135     # Do not save /bin paths to all_fixpath_prefixes!
40136   else
40137     # Not in mixed or Windows style, start by that.
40138     new_path=`cmd //c echo $new_path`
40139 
40140   input_path="$new_path"
40141   # Check if we need to convert this using DOS-style short mode. If the path
40142   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40143   # take no chances and rewrite it.
40144   # Note: m4 eats our [], so we need to use [ and ] instead.
40145   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40146   if test "x$has_forbidden_chars" != x; then
40147     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40148     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40149   fi
40150 
40151     # Output is in $new_path
40152 
40153   windows_path="$new_path"
40154   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40155     unix_path=`$CYGPATH -u "$windows_path"`
40156     new_path="$unix_path"
40157   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40158     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40159     new_path="$unix_path"
40160   fi
40161 
40162     # remove trailing .exe if any
40163     new_path="${new_path/%.exe/}"
40164 
40165     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40166     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40167   fi
40168 
40169     else
40170       # We're on a unix platform. Hooray! :)
40171       # First separate the path from the arguments. This will split at the first
40172       # space.
40173       complete="$STRIP"
40174       path="${complete%% *}"
40175       tmp="$complete EOL"
40176       arguments="${tmp#* }"
40177 
40178       # Cannot rely on the command "which" here since it doesn't always work.
40179       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40180       if test -z "$is_absolute_path"; then
40181         # Path to executable is not absolute. Find it.
40182         IFS_save="$IFS"
40183         IFS=:
40184         for p in $PATH; do
40185           if test -f "$p/$path" && test -x "$p/$path"; then
40186             new_path="$p/$path"
40187             break
40188           fi
40189         done
40190         IFS="$IFS_save"
40191       else
40192         # This is an absolute path, we can use it without further modifications.
40193         new_path="$path"
40194       fi
40195 
40196       if test "x$new_path" = x; then
40197         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40198 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40199         has_space=`$ECHO "$complete" | $GREP " "`
40200         if test "x$has_space" != x; then
40201           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40202 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40203         fi
40204         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40205       fi
40206     fi
40207 
40208     # Now join together the path and the arguments once again
40209     if test "x$arguments" != xEOL; then
40210       new_complete="$new_path ${arguments% *}"
40211     else
40212       new_complete="$new_path"
40213     fi
40214 
40215     if test "x$complete" != "x$new_complete"; then
40216       STRIP="$new_complete"
40217       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40218 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40219     fi
40220   fi
40221 
40222     if test "x$TOOLCHAIN_TYPE" = xgcc; then
40223 
40224 
40225   # Publish this variable in the help.
40226 
40227 
40228   if [ -z "${NM+x}" ]; then
40229     # The variable is not set by user, try to locate tool using the code snippet
40230     if test -n "$ac_tool_prefix"; then
40231   for ac_prog in nm gcc-nm
40232   do
40233     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40234 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40236 $as_echo_n "checking for $ac_word... " >&6; }
40237 if ${ac_cv_prog_NM+:} false; then :
40238   $as_echo_n "(cached) " >&6
40239 else
40240   if test -n "$NM"; then
40241   ac_cv_prog_NM="$NM" # Let the user override the test.
40242 else
40243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40244 for as_dir in $PATH
40245 do
40246   IFS=$as_save_IFS
40247   test -z "$as_dir" && as_dir=.
40248     for ac_exec_ext in '' $ac_executable_extensions; do
40249   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40250     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40251     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40252     break 2
40253   fi
40254 done
40255   done
40256 IFS=$as_save_IFS
40257 
40258 fi
40259 fi
40260 NM=$ac_cv_prog_NM
40261 if test -n "$NM"; then
40262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40263 $as_echo "$NM" >&6; }
40264 else
40265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40266 $as_echo "no" >&6; }
40267 fi
40268 
40269 
40270     test -n "$NM" && break
40271   done
40272 fi
40273 if test -z "$NM"; then
40274   ac_ct_NM=$NM
40275   for ac_prog in nm gcc-nm
40276 do
40277   # Extract the first word of "$ac_prog", so it can be a program name with args.
40278 set dummy $ac_prog; ac_word=$2
40279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40280 $as_echo_n "checking for $ac_word... " >&6; }
40281 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40282   $as_echo_n "(cached) " >&6
40283 else
40284   if test -n "$ac_ct_NM"; then
40285   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40286 else
40287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40288 for as_dir in $PATH
40289 do
40290   IFS=$as_save_IFS
40291   test -z "$as_dir" && as_dir=.
40292     for ac_exec_ext in '' $ac_executable_extensions; do
40293   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40294     ac_cv_prog_ac_ct_NM="$ac_prog"
40295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40296     break 2
40297   fi
40298 done
40299   done
40300 IFS=$as_save_IFS
40301 
40302 fi
40303 fi
40304 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40305 if test -n "$ac_ct_NM"; then
40306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40307 $as_echo "$ac_ct_NM" >&6; }
40308 else
40309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40310 $as_echo "no" >&6; }
40311 fi
40312 
40313 
40314   test -n "$ac_ct_NM" && break
40315 done
40316 
40317   if test "x$ac_ct_NM" = x; then
40318     NM=""
40319   else
40320     case $cross_compiling:$ac_tool_warned in
40321 yes:)
40322 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40323 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40324 ac_tool_warned=yes ;;
40325 esac
40326     NM=$ac_ct_NM
40327   fi
40328 fi
40329 
40330   else
40331     # The variable is set, but is it from the command line or the environment?
40332 
40333     # Try to remove the string !NM! from our list.
40334     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40335     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40336       # If it failed, the variable was not from the command line. Ignore it,
40337       # but warn the user (except for BASH, which is always set by the calling BASH).
40338       if test "xNM" != xBASH; then
40339         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40340 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40341       fi
40342       # Try to locate tool using the code snippet
40343       if test -n "$ac_tool_prefix"; then
40344   for ac_prog in nm gcc-nm
40345   do
40346     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40347 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40349 $as_echo_n "checking for $ac_word... " >&6; }
40350 if ${ac_cv_prog_NM+:} false; then :
40351   $as_echo_n "(cached) " >&6
40352 else
40353   if test -n "$NM"; then
40354   ac_cv_prog_NM="$NM" # Let the user override the test.
40355 else
40356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40357 for as_dir in $PATH
40358 do
40359   IFS=$as_save_IFS
40360   test -z "$as_dir" && as_dir=.
40361     for ac_exec_ext in '' $ac_executable_extensions; do
40362   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40363     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40364     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40365     break 2
40366   fi
40367 done
40368   done
40369 IFS=$as_save_IFS
40370 
40371 fi
40372 fi
40373 NM=$ac_cv_prog_NM
40374 if test -n "$NM"; then
40375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40376 $as_echo "$NM" >&6; }
40377 else
40378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40379 $as_echo "no" >&6; }
40380 fi
40381 
40382 
40383     test -n "$NM" && break
40384   done
40385 fi
40386 if test -z "$NM"; then
40387   ac_ct_NM=$NM
40388   for ac_prog in nm gcc-nm
40389 do
40390   # Extract the first word of "$ac_prog", so it can be a program name with args.
40391 set dummy $ac_prog; ac_word=$2
40392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40393 $as_echo_n "checking for $ac_word... " >&6; }
40394 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40395   $as_echo_n "(cached) " >&6
40396 else
40397   if test -n "$ac_ct_NM"; then
40398   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40399 else
40400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40401 for as_dir in $PATH
40402 do
40403   IFS=$as_save_IFS
40404   test -z "$as_dir" && as_dir=.
40405     for ac_exec_ext in '' $ac_executable_extensions; do
40406   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40407     ac_cv_prog_ac_ct_NM="$ac_prog"
40408     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40409     break 2
40410   fi
40411 done
40412   done
40413 IFS=$as_save_IFS
40414 
40415 fi
40416 fi
40417 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40418 if test -n "$ac_ct_NM"; then
40419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40420 $as_echo "$ac_ct_NM" >&6; }
40421 else
40422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40423 $as_echo "no" >&6; }
40424 fi
40425 
40426 
40427   test -n "$ac_ct_NM" && break
40428 done
40429 
40430   if test "x$ac_ct_NM" = x; then
40431     NM=""
40432   else
40433     case $cross_compiling:$ac_tool_warned in
40434 yes:)
40435 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40436 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40437 ac_tool_warned=yes ;;
40438 esac
40439     NM=$ac_ct_NM
40440   fi
40441 fi
40442 
40443     else
40444       # If it succeeded, then it was overridden by the user. We will use it
40445       # for the tool.
40446 
40447       # First remove it from the list of overridden variables, so we can test
40448       # for unknown variables in the end.
40449       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40450 
40451       # Check if we try to supply an empty value
40452       if test "x$NM" = x; then
40453         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40454 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40455         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40456 $as_echo_n "checking for NM... " >&6; }
40457         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40458 $as_echo "disabled" >&6; }
40459       else
40460         # Check if the provided tool contains a complete path.
40461         tool_specified="$NM"
40462         tool_basename="${tool_specified##*/}"
40463         if test "x$tool_basename" = "x$tool_specified"; then
40464           # A command without a complete path is provided, search $PATH.
40465           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40466 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40467           # Extract the first word of "$tool_basename", so it can be a program name with args.
40468 set dummy $tool_basename; ac_word=$2
40469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40470 $as_echo_n "checking for $ac_word... " >&6; }
40471 if ${ac_cv_path_NM+:} false; then :
40472   $as_echo_n "(cached) " >&6
40473 else
40474   case $NM in
40475   [\\/]* | ?:[\\/]*)
40476   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40477   ;;
40478   *)
40479   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40480 for as_dir in $PATH
40481 do
40482   IFS=$as_save_IFS
40483   test -z "$as_dir" && as_dir=.
40484     for ac_exec_ext in '' $ac_executable_extensions; do
40485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40486     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40487     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40488     break 2
40489   fi
40490 done
40491   done
40492 IFS=$as_save_IFS
40493 
40494   ;;
40495 esac
40496 fi
40497 NM=$ac_cv_path_NM
40498 if test -n "$NM"; then
40499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40500 $as_echo "$NM" >&6; }
40501 else
40502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40503 $as_echo "no" >&6; }
40504 fi
40505 
40506 
40507           if test "x$NM" = x; then
40508             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40509           fi
40510         else
40511           # Otherwise we believe it is a complete path. Use it as it is.
40512           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40513 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40514           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40515 $as_echo_n "checking for NM... " >&6; }
40516           if test ! -x "$tool_specified"; then
40517             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40518 $as_echo "not found" >&6; }
40519             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40520           fi
40521           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40522 $as_echo "$tool_specified" >&6; }
40523         fi
40524       fi
40525     fi
40526 
40527   fi
40528 
40529 
40530     else
40531 
40532 
40533   # Publish this variable in the help.
40534 
40535 
40536   if [ -z "${NM+x}" ]; then
40537     # The variable is not set by user, try to locate tool using the code snippet
40538     if test -n "$ac_tool_prefix"; then
40539   for ac_prog in nm
40540   do
40541     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40542 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40544 $as_echo_n "checking for $ac_word... " >&6; }
40545 if ${ac_cv_prog_NM+:} false; then :
40546   $as_echo_n "(cached) " >&6
40547 else
40548   if test -n "$NM"; then
40549   ac_cv_prog_NM="$NM" # Let the user override the test.
40550 else
40551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40552 for as_dir in $PATH
40553 do
40554   IFS=$as_save_IFS
40555   test -z "$as_dir" && as_dir=.
40556     for ac_exec_ext in '' $ac_executable_extensions; do
40557   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40558     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40559     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40560     break 2
40561   fi
40562 done
40563   done
40564 IFS=$as_save_IFS
40565 
40566 fi
40567 fi
40568 NM=$ac_cv_prog_NM
40569 if test -n "$NM"; then
40570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40571 $as_echo "$NM" >&6; }
40572 else
40573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40574 $as_echo "no" >&6; }
40575 fi
40576 
40577 
40578     test -n "$NM" && break
40579   done
40580 fi
40581 if test -z "$NM"; then
40582   ac_ct_NM=$NM
40583   for ac_prog in nm
40584 do
40585   # Extract the first word of "$ac_prog", so it can be a program name with args.
40586 set dummy $ac_prog; ac_word=$2
40587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40588 $as_echo_n "checking for $ac_word... " >&6; }
40589 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40590   $as_echo_n "(cached) " >&6
40591 else
40592   if test -n "$ac_ct_NM"; then
40593   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40594 else
40595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40596 for as_dir in $PATH
40597 do
40598   IFS=$as_save_IFS
40599   test -z "$as_dir" && as_dir=.
40600     for ac_exec_ext in '' $ac_executable_extensions; do
40601   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40602     ac_cv_prog_ac_ct_NM="$ac_prog"
40603     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40604     break 2
40605   fi
40606 done
40607   done
40608 IFS=$as_save_IFS
40609 
40610 fi
40611 fi
40612 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40613 if test -n "$ac_ct_NM"; then
40614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40615 $as_echo "$ac_ct_NM" >&6; }
40616 else
40617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40618 $as_echo "no" >&6; }
40619 fi
40620 
40621 
40622   test -n "$ac_ct_NM" && break
40623 done
40624 
40625   if test "x$ac_ct_NM" = x; then
40626     NM=""
40627   else
40628     case $cross_compiling:$ac_tool_warned in
40629 yes:)
40630 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40631 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40632 ac_tool_warned=yes ;;
40633 esac
40634     NM=$ac_ct_NM
40635   fi
40636 fi
40637 
40638   else
40639     # The variable is set, but is it from the command line or the environment?
40640 
40641     # Try to remove the string !NM! from our list.
40642     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40643     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40644       # If it failed, the variable was not from the command line. Ignore it,
40645       # but warn the user (except for BASH, which is always set by the calling BASH).
40646       if test "xNM" != xBASH; then
40647         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40648 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40649       fi
40650       # Try to locate tool using the code snippet
40651       if test -n "$ac_tool_prefix"; then
40652   for ac_prog in nm
40653   do
40654     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40655 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40657 $as_echo_n "checking for $ac_word... " >&6; }
40658 if ${ac_cv_prog_NM+:} false; then :
40659   $as_echo_n "(cached) " >&6
40660 else
40661   if test -n "$NM"; then
40662   ac_cv_prog_NM="$NM" # Let the user override the test.
40663 else
40664 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40665 for as_dir in $PATH
40666 do
40667   IFS=$as_save_IFS
40668   test -z "$as_dir" && as_dir=.
40669     for ac_exec_ext in '' $ac_executable_extensions; do
40670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40671     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40673     break 2
40674   fi
40675 done
40676   done
40677 IFS=$as_save_IFS
40678 
40679 fi
40680 fi
40681 NM=$ac_cv_prog_NM
40682 if test -n "$NM"; then
40683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40684 $as_echo "$NM" >&6; }
40685 else
40686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40687 $as_echo "no" >&6; }
40688 fi
40689 
40690 
40691     test -n "$NM" && break
40692   done
40693 fi
40694 if test -z "$NM"; then
40695   ac_ct_NM=$NM
40696   for ac_prog in nm
40697 do
40698   # Extract the first word of "$ac_prog", so it can be a program name with args.
40699 set dummy $ac_prog; ac_word=$2
40700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40701 $as_echo_n "checking for $ac_word... " >&6; }
40702 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40703   $as_echo_n "(cached) " >&6
40704 else
40705   if test -n "$ac_ct_NM"; then
40706   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40707 else
40708 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40709 for as_dir in $PATH
40710 do
40711   IFS=$as_save_IFS
40712   test -z "$as_dir" && as_dir=.
40713     for ac_exec_ext in '' $ac_executable_extensions; do
40714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40715     ac_cv_prog_ac_ct_NM="$ac_prog"
40716     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40717     break 2
40718   fi
40719 done
40720   done
40721 IFS=$as_save_IFS
40722 
40723 fi
40724 fi
40725 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40726 if test -n "$ac_ct_NM"; then
40727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40728 $as_echo "$ac_ct_NM" >&6; }
40729 else
40730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40731 $as_echo "no" >&6; }
40732 fi
40733 
40734 
40735   test -n "$ac_ct_NM" && break
40736 done
40737 
40738   if test "x$ac_ct_NM" = x; then
40739     NM=""
40740   else
40741     case $cross_compiling:$ac_tool_warned in
40742 yes:)
40743 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40744 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40745 ac_tool_warned=yes ;;
40746 esac
40747     NM=$ac_ct_NM
40748   fi
40749 fi
40750 
40751     else
40752       # If it succeeded, then it was overridden by the user. We will use it
40753       # for the tool.
40754 
40755       # First remove it from the list of overridden variables, so we can test
40756       # for unknown variables in the end.
40757       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40758 
40759       # Check if we try to supply an empty value
40760       if test "x$NM" = x; then
40761         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40762 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40763         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40764 $as_echo_n "checking for NM... " >&6; }
40765         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40766 $as_echo "disabled" >&6; }
40767       else
40768         # Check if the provided tool contains a complete path.
40769         tool_specified="$NM"
40770         tool_basename="${tool_specified##*/}"
40771         if test "x$tool_basename" = "x$tool_specified"; then
40772           # A command without a complete path is provided, search $PATH.
40773           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40774 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40775           # Extract the first word of "$tool_basename", so it can be a program name with args.
40776 set dummy $tool_basename; ac_word=$2
40777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40778 $as_echo_n "checking for $ac_word... " >&6; }
40779 if ${ac_cv_path_NM+:} false; then :
40780   $as_echo_n "(cached) " >&6
40781 else
40782   case $NM in
40783   [\\/]* | ?:[\\/]*)
40784   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40785   ;;
40786   *)
40787   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40788 for as_dir in $PATH
40789 do
40790   IFS=$as_save_IFS
40791   test -z "$as_dir" && as_dir=.
40792     for ac_exec_ext in '' $ac_executable_extensions; do
40793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40794     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40796     break 2
40797   fi
40798 done
40799   done
40800 IFS=$as_save_IFS
40801 
40802   ;;
40803 esac
40804 fi
40805 NM=$ac_cv_path_NM
40806 if test -n "$NM"; then
40807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40808 $as_echo "$NM" >&6; }
40809 else
40810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40811 $as_echo "no" >&6; }
40812 fi
40813 
40814 
40815           if test "x$NM" = x; then
40816             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40817           fi
40818         else
40819           # Otherwise we believe it is a complete path. Use it as it is.
40820           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40821 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40822           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40823 $as_echo_n "checking for NM... " >&6; }
40824           if test ! -x "$tool_specified"; then
40825             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40826 $as_echo "not found" >&6; }
40827             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40828           fi
40829           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40830 $as_echo "$tool_specified" >&6; }
40831         fi
40832       fi
40833     fi
40834 
40835   fi
40836 
40837 
40838     fi
40839 
40840   # Only process if variable expands to non-empty
40841 
40842   if test "x$NM" != x; then
40843     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40844 
40845   # First separate the path from the arguments. This will split at the first
40846   # space.
40847   complete="$NM"
40848   path="${complete%% *}"
40849   tmp="$complete EOL"
40850   arguments="${tmp#* }"
40851 
40852   # Input might be given as Windows format, start by converting to
40853   # unix format.
40854   new_path=`$CYGPATH -u "$path"`
40855 
40856   # Now try to locate executable using which
40857   new_path=`$WHICH "$new_path" 2> /dev/null`
40858   # bat and cmd files are not always considered executable in cygwin causing which
40859   # to not find them
40860   if test "x$new_path" = x \
40861       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40862       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40863     new_path=`$CYGPATH -u "$path"`
40864   fi
40865   if test "x$new_path" = x; then
40866     # Oops. Which didn't find the executable.
40867     # The splitting of arguments from the executable at a space might have been incorrect,
40868     # since paths with space are more likely in Windows. Give it another try with the whole
40869     # argument.
40870     path="$complete"
40871     arguments="EOL"
40872     new_path=`$CYGPATH -u "$path"`
40873     new_path=`$WHICH "$new_path" 2> /dev/null`
40874     # bat and cmd files are not always considered executable in cygwin causing which
40875     # to not find them
40876     if test "x$new_path" = x \
40877         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40878         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40879       new_path=`$CYGPATH -u "$path"`
40880     fi
40881     if test "x$new_path" = x; then
40882       # It's still not found. Now this is an unrecoverable error.
40883       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40884 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40885       has_space=`$ECHO "$complete" | $GREP " "`
40886       if test "x$has_space" != x; then
40887         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40888 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40889       fi
40890       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40891     fi
40892   fi
40893 
40894   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40895   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40896   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40897   # "foo.exe" is OK but "foo" is an error.
40898   #
40899   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40900   # It is also a way to make sure we got the proper file name for the real test later on.
40901   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40902   if test "x$test_shortpath" = x; then
40903     # Short path failed, file does not exist as specified.
40904     # Try adding .exe or .cmd
40905     if test -f "${new_path}.exe"; then
40906       input_to_shortpath="${new_path}.exe"
40907     elif test -f "${new_path}.cmd"; then
40908       input_to_shortpath="${new_path}.cmd"
40909     else
40910       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40911 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40912       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40913 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40914       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40915     fi
40916   else
40917     input_to_shortpath="$new_path"
40918   fi
40919 
40920   # Call helper function which possibly converts this using DOS-style short mode.
40921   # If so, the updated path is stored in $new_path.
40922   new_path="$input_to_shortpath"
40923 
40924   input_path="$input_to_shortpath"
40925   # Check if we need to convert this using DOS-style short mode. If the path
40926   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40927   # take no chances and rewrite it.
40928   # Note: m4 eats our [], so we need to use [ and ] instead.
40929   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40930   if test "x$has_forbidden_chars" != x; then
40931     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40932     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40933     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40934     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40935       # Going to short mode and back again did indeed matter. Since short mode is
40936       # case insensitive, let's make it lowercase to improve readability.
40937       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40938       # Now convert it back to Unix-style (cygpath)
40939       input_path=`$CYGPATH -u "$shortmode_path"`
40940       new_path="$input_path"
40941     fi
40942   fi
40943 
40944   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40945   if test "x$test_cygdrive_prefix" = x; then
40946     # As a simple fix, exclude /usr/bin since it's not a real path.
40947     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40948       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40949       # a path prefixed by /cygdrive for fixpath to work.
40950       new_path="$CYGWIN_ROOT_PATH$input_path"
40951     fi
40952   fi
40953 
40954   # remove trailing .exe if any
40955   new_path="${new_path/%.exe/}"
40956 
40957     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40958 
40959   # First separate the path from the arguments. This will split at the first
40960   # space.
40961   complete="$NM"
40962   path="${complete%% *}"
40963   tmp="$complete EOL"
40964   arguments="${tmp#* }"
40965 
40966   # Input might be given as Windows format, start by converting to
40967   # unix format.
40968   new_path="$path"
40969 
40970   windows_path="$new_path"
40971   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40972     unix_path=`$CYGPATH -u "$windows_path"`
40973     new_path="$unix_path"
40974   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40975     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40976     new_path="$unix_path"
40977   fi
40978 
40979 
40980   # Now try to locate executable using which
40981   new_path=`$WHICH "$new_path" 2> /dev/null`
40982 
40983   if test "x$new_path" = x; then
40984     # Oops. Which didn't find the executable.
40985     # The splitting of arguments from the executable at a space might have been incorrect,
40986     # since paths with space are more likely in Windows. Give it another try with the whole
40987     # argument.
40988     path="$complete"
40989     arguments="EOL"
40990     new_path="$path"
40991 
40992   windows_path="$new_path"
40993   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40994     unix_path=`$CYGPATH -u "$windows_path"`
40995     new_path="$unix_path"
40996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40997     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40998     new_path="$unix_path"
40999   fi
41000 
41001 
41002     new_path=`$WHICH "$new_path" 2> /dev/null`
41003     # bat and cmd files are not always considered executable in MSYS causing which
41004     # to not find them
41005     if test "x$new_path" = x \
41006         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41007         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41008       new_path="$path"
41009 
41010   windows_path="$new_path"
41011   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41012     unix_path=`$CYGPATH -u "$windows_path"`
41013     new_path="$unix_path"
41014   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41015     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41016     new_path="$unix_path"
41017   fi
41018 
41019     fi
41020 
41021     if test "x$new_path" = x; then
41022       # It's still not found. Now this is an unrecoverable error.
41023       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41024 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41025       has_space=`$ECHO "$complete" | $GREP " "`
41026       if test "x$has_space" != x; then
41027         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41028 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41029       fi
41030       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41031     fi
41032   fi
41033 
41034   # Now new_path has a complete unix path to the binary
41035   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41036     # Keep paths in /bin as-is, but remove trailing .exe if any
41037     new_path="${new_path/%.exe/}"
41038     # Do not save /bin paths to all_fixpath_prefixes!
41039   else
41040     # Not in mixed or Windows style, start by that.
41041     new_path=`cmd //c echo $new_path`
41042 
41043   input_path="$new_path"
41044   # Check if we need to convert this using DOS-style short mode. If the path
41045   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41046   # take no chances and rewrite it.
41047   # Note: m4 eats our [], so we need to use [ and ] instead.
41048   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41049   if test "x$has_forbidden_chars" != x; then
41050     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41051     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41052   fi
41053 
41054     # Output is in $new_path
41055 
41056   windows_path="$new_path"
41057   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41058     unix_path=`$CYGPATH -u "$windows_path"`
41059     new_path="$unix_path"
41060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41061     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41062     new_path="$unix_path"
41063   fi
41064 
41065     # remove trailing .exe if any
41066     new_path="${new_path/%.exe/}"
41067 
41068     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41069     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41070   fi
41071 
41072     else
41073       # We're on a unix platform. Hooray! :)
41074       # First separate the path from the arguments. This will split at the first
41075       # space.
41076       complete="$NM"
41077       path="${complete%% *}"
41078       tmp="$complete EOL"
41079       arguments="${tmp#* }"
41080 
41081       # Cannot rely on the command "which" here since it doesn't always work.
41082       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41083       if test -z "$is_absolute_path"; then
41084         # Path to executable is not absolute. Find it.
41085         IFS_save="$IFS"
41086         IFS=:
41087         for p in $PATH; do
41088           if test -f "$p/$path" && test -x "$p/$path"; then
41089             new_path="$p/$path"
41090             break
41091           fi
41092         done
41093         IFS="$IFS_save"
41094       else
41095         # This is an absolute path, we can use it without further modifications.
41096         new_path="$path"
41097       fi
41098 
41099       if test "x$new_path" = x; then
41100         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41101 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41102         has_space=`$ECHO "$complete" | $GREP " "`
41103         if test "x$has_space" != x; then
41104           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41105 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41106         fi
41107         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41108       fi
41109     fi
41110 
41111     # Now join together the path and the arguments once again
41112     if test "x$arguments" != xEOL; then
41113       new_complete="$new_path ${arguments% *}"
41114     else
41115       new_complete="$new_path"
41116     fi
41117 
41118     if test "x$complete" != "x$new_complete"; then
41119       NM="$new_complete"
41120       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41121 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41122     fi
41123   fi
41124 
41125     GNM="$NM"
41126 
41127   fi
41128 
41129   # objcopy is used for moving debug symbols to separate files when
41130   # full debug symbols are enabled.
41131   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41132 
41133 
41134   # Publish this variable in the help.
41135 
41136 
41137   if [ -z "${OBJCOPY+x}" ]; then
41138     # The variable is not set by user, try to locate tool using the code snippet
41139     if test -n "$ac_tool_prefix"; then
41140   for ac_prog in gobjcopy objcopy
41141   do
41142     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41143 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41145 $as_echo_n "checking for $ac_word... " >&6; }
41146 if ${ac_cv_prog_OBJCOPY+:} false; then :
41147   $as_echo_n "(cached) " >&6
41148 else
41149   if test -n "$OBJCOPY"; then
41150   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41151 else
41152 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41153 for as_dir in $PATH
41154 do
41155   IFS=$as_save_IFS
41156   test -z "$as_dir" && as_dir=.
41157     for ac_exec_ext in '' $ac_executable_extensions; do
41158   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41159     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41160     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41161     break 2
41162   fi
41163 done
41164   done
41165 IFS=$as_save_IFS
41166 
41167 fi
41168 fi
41169 OBJCOPY=$ac_cv_prog_OBJCOPY
41170 if test -n "$OBJCOPY"; then
41171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41172 $as_echo "$OBJCOPY" >&6; }
41173 else
41174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41175 $as_echo "no" >&6; }
41176 fi
41177 
41178 
41179     test -n "$OBJCOPY" && break
41180   done
41181 fi
41182 if test -z "$OBJCOPY"; then
41183   ac_ct_OBJCOPY=$OBJCOPY
41184   for ac_prog in gobjcopy objcopy
41185 do
41186   # Extract the first word of "$ac_prog", so it can be a program name with args.
41187 set dummy $ac_prog; ac_word=$2
41188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41189 $as_echo_n "checking for $ac_word... " >&6; }
41190 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41191   $as_echo_n "(cached) " >&6
41192 else
41193   if test -n "$ac_ct_OBJCOPY"; then
41194   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41195 else
41196 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41197 for as_dir in $PATH
41198 do
41199   IFS=$as_save_IFS
41200   test -z "$as_dir" && as_dir=.
41201     for ac_exec_ext in '' $ac_executable_extensions; do
41202   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41203     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41205     break 2
41206   fi
41207 done
41208   done
41209 IFS=$as_save_IFS
41210 
41211 fi
41212 fi
41213 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41214 if test -n "$ac_ct_OBJCOPY"; then
41215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41216 $as_echo "$ac_ct_OBJCOPY" >&6; }
41217 else
41218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41219 $as_echo "no" >&6; }
41220 fi
41221 
41222 
41223   test -n "$ac_ct_OBJCOPY" && break
41224 done
41225 
41226   if test "x$ac_ct_OBJCOPY" = x; then
41227     OBJCOPY=""
41228   else
41229     case $cross_compiling:$ac_tool_warned in
41230 yes:)
41231 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41232 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41233 ac_tool_warned=yes ;;
41234 esac
41235     OBJCOPY=$ac_ct_OBJCOPY
41236   fi
41237 fi
41238 
41239   else
41240     # The variable is set, but is it from the command line or the environment?
41241 
41242     # Try to remove the string !OBJCOPY! from our list.
41243     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41244     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41245       # If it failed, the variable was not from the command line. Ignore it,
41246       # but warn the user (except for BASH, which is always set by the calling BASH).
41247       if test "xOBJCOPY" != xBASH; then
41248         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41249 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41250       fi
41251       # Try to locate tool using the code snippet
41252       if test -n "$ac_tool_prefix"; then
41253   for ac_prog in gobjcopy objcopy
41254   do
41255     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41256 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41258 $as_echo_n "checking for $ac_word... " >&6; }
41259 if ${ac_cv_prog_OBJCOPY+:} false; then :
41260   $as_echo_n "(cached) " >&6
41261 else
41262   if test -n "$OBJCOPY"; then
41263   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41264 else
41265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41266 for as_dir in $PATH
41267 do
41268   IFS=$as_save_IFS
41269   test -z "$as_dir" && as_dir=.
41270     for ac_exec_ext in '' $ac_executable_extensions; do
41271   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41272     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41273     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41274     break 2
41275   fi
41276 done
41277   done
41278 IFS=$as_save_IFS
41279 
41280 fi
41281 fi
41282 OBJCOPY=$ac_cv_prog_OBJCOPY
41283 if test -n "$OBJCOPY"; then
41284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41285 $as_echo "$OBJCOPY" >&6; }
41286 else
41287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41288 $as_echo "no" >&6; }
41289 fi
41290 
41291 
41292     test -n "$OBJCOPY" && break
41293   done
41294 fi
41295 if test -z "$OBJCOPY"; then
41296   ac_ct_OBJCOPY=$OBJCOPY
41297   for ac_prog in gobjcopy objcopy
41298 do
41299   # Extract the first word of "$ac_prog", so it can be a program name with args.
41300 set dummy $ac_prog; ac_word=$2
41301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41302 $as_echo_n "checking for $ac_word... " >&6; }
41303 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41304   $as_echo_n "(cached) " >&6
41305 else
41306   if test -n "$ac_ct_OBJCOPY"; then
41307   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41308 else
41309 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41310 for as_dir in $PATH
41311 do
41312   IFS=$as_save_IFS
41313   test -z "$as_dir" && as_dir=.
41314     for ac_exec_ext in '' $ac_executable_extensions; do
41315   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41316     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41317     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41318     break 2
41319   fi
41320 done
41321   done
41322 IFS=$as_save_IFS
41323 
41324 fi
41325 fi
41326 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41327 if test -n "$ac_ct_OBJCOPY"; then
41328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41329 $as_echo "$ac_ct_OBJCOPY" >&6; }
41330 else
41331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41332 $as_echo "no" >&6; }
41333 fi
41334 
41335 
41336   test -n "$ac_ct_OBJCOPY" && break
41337 done
41338 
41339   if test "x$ac_ct_OBJCOPY" = x; then
41340     OBJCOPY=""
41341   else
41342     case $cross_compiling:$ac_tool_warned in
41343 yes:)
41344 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41345 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41346 ac_tool_warned=yes ;;
41347 esac
41348     OBJCOPY=$ac_ct_OBJCOPY
41349   fi
41350 fi
41351 
41352     else
41353       # If it succeeded, then it was overridden by the user. We will use it
41354       # for the tool.
41355 
41356       # First remove it from the list of overridden variables, so we can test
41357       # for unknown variables in the end.
41358       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41359 
41360       # Check if we try to supply an empty value
41361       if test "x$OBJCOPY" = x; then
41362         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41363 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41364         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41365 $as_echo_n "checking for OBJCOPY... " >&6; }
41366         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41367 $as_echo "disabled" >&6; }
41368       else
41369         # Check if the provided tool contains a complete path.
41370         tool_specified="$OBJCOPY"
41371         tool_basename="${tool_specified##*/}"
41372         if test "x$tool_basename" = "x$tool_specified"; then
41373           # A command without a complete path is provided, search $PATH.
41374           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41375 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41376           # Extract the first word of "$tool_basename", so it can be a program name with args.
41377 set dummy $tool_basename; ac_word=$2
41378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41379 $as_echo_n "checking for $ac_word... " >&6; }
41380 if ${ac_cv_path_OBJCOPY+:} false; then :
41381   $as_echo_n "(cached) " >&6
41382 else
41383   case $OBJCOPY in
41384   [\\/]* | ?:[\\/]*)
41385   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41386   ;;
41387   *)
41388   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41389 for as_dir in $PATH
41390 do
41391   IFS=$as_save_IFS
41392   test -z "$as_dir" && as_dir=.
41393     for ac_exec_ext in '' $ac_executable_extensions; do
41394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41395     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41397     break 2
41398   fi
41399 done
41400   done
41401 IFS=$as_save_IFS
41402 
41403   ;;
41404 esac
41405 fi
41406 OBJCOPY=$ac_cv_path_OBJCOPY
41407 if test -n "$OBJCOPY"; then
41408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41409 $as_echo "$OBJCOPY" >&6; }
41410 else
41411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41412 $as_echo "no" >&6; }
41413 fi
41414 
41415 
41416           if test "x$OBJCOPY" = x; then
41417             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41418           fi
41419         else
41420           # Otherwise we believe it is a complete path. Use it as it is.
41421           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41422 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41423           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41424 $as_echo_n "checking for OBJCOPY... " >&6; }
41425           if test ! -x "$tool_specified"; then
41426             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41427 $as_echo "not found" >&6; }
41428             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41429           fi
41430           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41431 $as_echo "$tool_specified" >&6; }
41432         fi
41433       fi
41434     fi
41435 
41436   fi
41437 
41438 
41439     # Only call fixup if objcopy was found.
41440     if test -n "$OBJCOPY"; then
41441 
41442   # Only process if variable expands to non-empty
41443 
41444   if test "x$OBJCOPY" != x; then
41445     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41446 
41447   # First separate the path from the arguments. This will split at the first
41448   # space.
41449   complete="$OBJCOPY"
41450   path="${complete%% *}"
41451   tmp="$complete EOL"
41452   arguments="${tmp#* }"
41453 
41454   # Input might be given as Windows format, start by converting to
41455   # unix format.
41456   new_path=`$CYGPATH -u "$path"`
41457 
41458   # Now try to locate executable using which
41459   new_path=`$WHICH "$new_path" 2> /dev/null`
41460   # bat and cmd files are not always considered executable in cygwin causing which
41461   # to not find them
41462   if test "x$new_path" = x \
41463       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41464       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41465     new_path=`$CYGPATH -u "$path"`
41466   fi
41467   if test "x$new_path" = x; then
41468     # Oops. Which didn't find the executable.
41469     # The splitting of arguments from the executable at a space might have been incorrect,
41470     # since paths with space are more likely in Windows. Give it another try with the whole
41471     # argument.
41472     path="$complete"
41473     arguments="EOL"
41474     new_path=`$CYGPATH -u "$path"`
41475     new_path=`$WHICH "$new_path" 2> /dev/null`
41476     # bat and cmd files are not always considered executable in cygwin causing which
41477     # to not find them
41478     if test "x$new_path" = x \
41479         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41480         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41481       new_path=`$CYGPATH -u "$path"`
41482     fi
41483     if test "x$new_path" = x; then
41484       # It's still not found. Now this is an unrecoverable error.
41485       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41486 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41487       has_space=`$ECHO "$complete" | $GREP " "`
41488       if test "x$has_space" != x; then
41489         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41490 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41491       fi
41492       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41493     fi
41494   fi
41495 
41496   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41497   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41498   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41499   # "foo.exe" is OK but "foo" is an error.
41500   #
41501   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41502   # It is also a way to make sure we got the proper file name for the real test later on.
41503   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41504   if test "x$test_shortpath" = x; then
41505     # Short path failed, file does not exist as specified.
41506     # Try adding .exe or .cmd
41507     if test -f "${new_path}.exe"; then
41508       input_to_shortpath="${new_path}.exe"
41509     elif test -f "${new_path}.cmd"; then
41510       input_to_shortpath="${new_path}.cmd"
41511     else
41512       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
41513 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
41514       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41515 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41516       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41517     fi
41518   else
41519     input_to_shortpath="$new_path"
41520   fi
41521 
41522   # Call helper function which possibly converts this using DOS-style short mode.
41523   # If so, the updated path is stored in $new_path.
41524   new_path="$input_to_shortpath"
41525 
41526   input_path="$input_to_shortpath"
41527   # Check if we need to convert this using DOS-style short mode. If the path
41528   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41529   # take no chances and rewrite it.
41530   # Note: m4 eats our [], so we need to use [ and ] instead.
41531   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41532   if test "x$has_forbidden_chars" != x; then
41533     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41534     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41535     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41536     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41537       # Going to short mode and back again did indeed matter. Since short mode is
41538       # case insensitive, let's make it lowercase to improve readability.
41539       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41540       # Now convert it back to Unix-style (cygpath)
41541       input_path=`$CYGPATH -u "$shortmode_path"`
41542       new_path="$input_path"
41543     fi
41544   fi
41545 
41546   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41547   if test "x$test_cygdrive_prefix" = x; then
41548     # As a simple fix, exclude /usr/bin since it's not a real path.
41549     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41550       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41551       # a path prefixed by /cygdrive for fixpath to work.
41552       new_path="$CYGWIN_ROOT_PATH$input_path"
41553     fi
41554   fi
41555 
41556   # remove trailing .exe if any
41557   new_path="${new_path/%.exe/}"
41558 
41559     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41560 
41561   # First separate the path from the arguments. This will split at the first
41562   # space.
41563   complete="$OBJCOPY"
41564   path="${complete%% *}"
41565   tmp="$complete EOL"
41566   arguments="${tmp#* }"
41567 
41568   # Input might be given as Windows format, start by converting to
41569   # unix format.
41570   new_path="$path"
41571 
41572   windows_path="$new_path"
41573   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41574     unix_path=`$CYGPATH -u "$windows_path"`
41575     new_path="$unix_path"
41576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41577     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41578     new_path="$unix_path"
41579   fi
41580 
41581 
41582   # Now try to locate executable using which
41583   new_path=`$WHICH "$new_path" 2> /dev/null`
41584 
41585   if test "x$new_path" = x; then
41586     # Oops. Which didn't find the executable.
41587     # The splitting of arguments from the executable at a space might have been incorrect,
41588     # since paths with space are more likely in Windows. Give it another try with the whole
41589     # argument.
41590     path="$complete"
41591     arguments="EOL"
41592     new_path="$path"
41593 
41594   windows_path="$new_path"
41595   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41596     unix_path=`$CYGPATH -u "$windows_path"`
41597     new_path="$unix_path"
41598   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41599     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41600     new_path="$unix_path"
41601   fi
41602 
41603 
41604     new_path=`$WHICH "$new_path" 2> /dev/null`
41605     # bat and cmd files are not always considered executable in MSYS causing which
41606     # to not find them
41607     if test "x$new_path" = x \
41608         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41609         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41610       new_path="$path"
41611 
41612   windows_path="$new_path"
41613   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41614     unix_path=`$CYGPATH -u "$windows_path"`
41615     new_path="$unix_path"
41616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41617     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41618     new_path="$unix_path"
41619   fi
41620 
41621     fi
41622 
41623     if test "x$new_path" = x; then
41624       # It's still not found. Now this is an unrecoverable error.
41625       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41626 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41627       has_space=`$ECHO "$complete" | $GREP " "`
41628       if test "x$has_space" != x; then
41629         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41630 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41631       fi
41632       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41633     fi
41634   fi
41635 
41636   # Now new_path has a complete unix path to the binary
41637   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41638     # Keep paths in /bin as-is, but remove trailing .exe if any
41639     new_path="${new_path/%.exe/}"
41640     # Do not save /bin paths to all_fixpath_prefixes!
41641   else
41642     # Not in mixed or Windows style, start by that.
41643     new_path=`cmd //c echo $new_path`
41644 
41645   input_path="$new_path"
41646   # Check if we need to convert this using DOS-style short mode. If the path
41647   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41648   # take no chances and rewrite it.
41649   # Note: m4 eats our [], so we need to use [ and ] instead.
41650   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41651   if test "x$has_forbidden_chars" != x; then
41652     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41653     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41654   fi
41655 
41656     # Output is in $new_path
41657 
41658   windows_path="$new_path"
41659   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41660     unix_path=`$CYGPATH -u "$windows_path"`
41661     new_path="$unix_path"
41662   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41663     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41664     new_path="$unix_path"
41665   fi
41666 
41667     # remove trailing .exe if any
41668     new_path="${new_path/%.exe/}"
41669 
41670     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41671     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41672   fi
41673 
41674     else
41675       # We're on a unix platform. Hooray! :)
41676       # First separate the path from the arguments. This will split at the first
41677       # space.
41678       complete="$OBJCOPY"
41679       path="${complete%% *}"
41680       tmp="$complete EOL"
41681       arguments="${tmp#* }"
41682 
41683       # Cannot rely on the command "which" here since it doesn't always work.
41684       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41685       if test -z "$is_absolute_path"; then
41686         # Path to executable is not absolute. Find it.
41687         IFS_save="$IFS"
41688         IFS=:
41689         for p in $PATH; do
41690           if test -f "$p/$path" && test -x "$p/$path"; then
41691             new_path="$p/$path"
41692             break
41693           fi
41694         done
41695         IFS="$IFS_save"
41696       else
41697         # This is an absolute path, we can use it without further modifications.
41698         new_path="$path"
41699       fi
41700 
41701       if test "x$new_path" = x; then
41702         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41703 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41704         has_space=`$ECHO "$complete" | $GREP " "`
41705         if test "x$has_space" != x; then
41706           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41707 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41708         fi
41709         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41710       fi
41711     fi
41712 
41713     # Now join together the path and the arguments once again
41714     if test "x$arguments" != xEOL; then
41715       new_complete="$new_path ${arguments% *}"
41716     else
41717       new_complete="$new_path"
41718     fi
41719 
41720     if test "x$complete" != "x$new_complete"; then
41721       OBJCOPY="$new_complete"
41722       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41723 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41724     fi
41725   fi
41726 
41727       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41728         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41729         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41730         # - version number is last blank separate word on first line
41731         # - version number formats that have been seen:
41732         #   - <major>.<minor>
41733         #   - <major>.<minor>.<micro>
41734         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41735         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41736          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41737               -e 's/.* //' \
41738               -e '/^[01]\./b bad' \
41739               -e '/^2\./{' \
41740               -e '  s/^2\.//' \
41741               -e '  /^[0-9]$/b bad' \
41742               -e '  /^[0-9]\./b bad' \
41743               -e '  /^1[0-9]$/b bad' \
41744               -e '  /^1[0-9]\./b bad' \
41745               -e '  /^20\./b bad' \
41746               -e '  /^21\.0$/b bad' \
41747               -e '  /^21\.0\./b bad' \
41748               -e '}' \
41749               -e ':good' \
41750               -e 's/.*/VALID_VERSION/p' \
41751               -e 'q' \
41752               -e ':bad' \
41753               -e 's/.*/BAD_VERSION/p' \
41754               -e 'q'`
41755         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41756           OBJCOPY=
41757           { $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
41758 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41759           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41760 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41761           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41762 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41763           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41764 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41765           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41766 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41767         fi
41768       fi
41769     fi
41770   fi
41771 
41772 
41773 
41774   # Publish this variable in the help.
41775 
41776 
41777   if [ -z "${OBJDUMP+x}" ]; then
41778     # The variable is not set by user, try to locate tool using the code snippet
41779     if test -n "$ac_tool_prefix"; then
41780   for ac_prog in gobjdump objdump
41781   do
41782     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41783 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41785 $as_echo_n "checking for $ac_word... " >&6; }
41786 if ${ac_cv_prog_OBJDUMP+:} false; then :
41787   $as_echo_n "(cached) " >&6
41788 else
41789   if test -n "$OBJDUMP"; then
41790   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41791 else
41792 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41793 for as_dir in $PATH
41794 do
41795   IFS=$as_save_IFS
41796   test -z "$as_dir" && as_dir=.
41797     for ac_exec_ext in '' $ac_executable_extensions; do
41798   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41799     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41800     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41801     break 2
41802   fi
41803 done
41804   done
41805 IFS=$as_save_IFS
41806 
41807 fi
41808 fi
41809 OBJDUMP=$ac_cv_prog_OBJDUMP
41810 if test -n "$OBJDUMP"; then
41811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41812 $as_echo "$OBJDUMP" >&6; }
41813 else
41814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41815 $as_echo "no" >&6; }
41816 fi
41817 
41818 
41819     test -n "$OBJDUMP" && break
41820   done
41821 fi
41822 if test -z "$OBJDUMP"; then
41823   ac_ct_OBJDUMP=$OBJDUMP
41824   for ac_prog in gobjdump objdump
41825 do
41826   # Extract the first word of "$ac_prog", so it can be a program name with args.
41827 set dummy $ac_prog; ac_word=$2
41828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41829 $as_echo_n "checking for $ac_word... " >&6; }
41830 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41831   $as_echo_n "(cached) " >&6
41832 else
41833   if test -n "$ac_ct_OBJDUMP"; then
41834   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41835 else
41836 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41837 for as_dir in $PATH
41838 do
41839   IFS=$as_save_IFS
41840   test -z "$as_dir" && as_dir=.
41841     for ac_exec_ext in '' $ac_executable_extensions; do
41842   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41843     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41844     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41845     break 2
41846   fi
41847 done
41848   done
41849 IFS=$as_save_IFS
41850 
41851 fi
41852 fi
41853 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41854 if test -n "$ac_ct_OBJDUMP"; then
41855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41856 $as_echo "$ac_ct_OBJDUMP" >&6; }
41857 else
41858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41859 $as_echo "no" >&6; }
41860 fi
41861 
41862 
41863   test -n "$ac_ct_OBJDUMP" && break
41864 done
41865 
41866   if test "x$ac_ct_OBJDUMP" = x; then
41867     OBJDUMP=""
41868   else
41869     case $cross_compiling:$ac_tool_warned in
41870 yes:)
41871 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41872 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41873 ac_tool_warned=yes ;;
41874 esac
41875     OBJDUMP=$ac_ct_OBJDUMP
41876   fi
41877 fi
41878 
41879   else
41880     # The variable is set, but is it from the command line or the environment?
41881 
41882     # Try to remove the string !OBJDUMP! from our list.
41883     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41884     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41885       # If it failed, the variable was not from the command line. Ignore it,
41886       # but warn the user (except for BASH, which is always set by the calling BASH).
41887       if test "xOBJDUMP" != xBASH; then
41888         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41889 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41890       fi
41891       # Try to locate tool using the code snippet
41892       if test -n "$ac_tool_prefix"; then
41893   for ac_prog in gobjdump objdump
41894   do
41895     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41896 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41898 $as_echo_n "checking for $ac_word... " >&6; }
41899 if ${ac_cv_prog_OBJDUMP+:} false; then :
41900   $as_echo_n "(cached) " >&6
41901 else
41902   if test -n "$OBJDUMP"; then
41903   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41904 else
41905 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41906 for as_dir in $PATH
41907 do
41908   IFS=$as_save_IFS
41909   test -z "$as_dir" && as_dir=.
41910     for ac_exec_ext in '' $ac_executable_extensions; do
41911   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41912     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41913     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41914     break 2
41915   fi
41916 done
41917   done
41918 IFS=$as_save_IFS
41919 
41920 fi
41921 fi
41922 OBJDUMP=$ac_cv_prog_OBJDUMP
41923 if test -n "$OBJDUMP"; then
41924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41925 $as_echo "$OBJDUMP" >&6; }
41926 else
41927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41928 $as_echo "no" >&6; }
41929 fi
41930 
41931 
41932     test -n "$OBJDUMP" && break
41933   done
41934 fi
41935 if test -z "$OBJDUMP"; then
41936   ac_ct_OBJDUMP=$OBJDUMP
41937   for ac_prog in gobjdump objdump
41938 do
41939   # Extract the first word of "$ac_prog", so it can be a program name with args.
41940 set dummy $ac_prog; ac_word=$2
41941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41942 $as_echo_n "checking for $ac_word... " >&6; }
41943 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41944   $as_echo_n "(cached) " >&6
41945 else
41946   if test -n "$ac_ct_OBJDUMP"; then
41947   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41948 else
41949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41950 for as_dir in $PATH
41951 do
41952   IFS=$as_save_IFS
41953   test -z "$as_dir" && as_dir=.
41954     for ac_exec_ext in '' $ac_executable_extensions; do
41955   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41956     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41957     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41958     break 2
41959   fi
41960 done
41961   done
41962 IFS=$as_save_IFS
41963 
41964 fi
41965 fi
41966 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41967 if test -n "$ac_ct_OBJDUMP"; then
41968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41969 $as_echo "$ac_ct_OBJDUMP" >&6; }
41970 else
41971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41972 $as_echo "no" >&6; }
41973 fi
41974 
41975 
41976   test -n "$ac_ct_OBJDUMP" && break
41977 done
41978 
41979   if test "x$ac_ct_OBJDUMP" = x; then
41980     OBJDUMP=""
41981   else
41982     case $cross_compiling:$ac_tool_warned in
41983 yes:)
41984 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41985 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41986 ac_tool_warned=yes ;;
41987 esac
41988     OBJDUMP=$ac_ct_OBJDUMP
41989   fi
41990 fi
41991 
41992     else
41993       # If it succeeded, then it was overridden by the user. We will use it
41994       # for the tool.
41995 
41996       # First remove it from the list of overridden variables, so we can test
41997       # for unknown variables in the end.
41998       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41999 
42000       # Check if we try to supply an empty value
42001       if test "x$OBJDUMP" = x; then
42002         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42003 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42004         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42005 $as_echo_n "checking for OBJDUMP... " >&6; }
42006         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42007 $as_echo "disabled" >&6; }
42008       else
42009         # Check if the provided tool contains a complete path.
42010         tool_specified="$OBJDUMP"
42011         tool_basename="${tool_specified##*/}"
42012         if test "x$tool_basename" = "x$tool_specified"; then
42013           # A command without a complete path is provided, search $PATH.
42014           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42015 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42016           # Extract the first word of "$tool_basename", so it can be a program name with args.
42017 set dummy $tool_basename; ac_word=$2
42018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42019 $as_echo_n "checking for $ac_word... " >&6; }
42020 if ${ac_cv_path_OBJDUMP+:} false; then :
42021   $as_echo_n "(cached) " >&6
42022 else
42023   case $OBJDUMP in
42024   [\\/]* | ?:[\\/]*)
42025   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42026   ;;
42027   *)
42028   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42029 for as_dir in $PATH
42030 do
42031   IFS=$as_save_IFS
42032   test -z "$as_dir" && as_dir=.
42033     for ac_exec_ext in '' $ac_executable_extensions; do
42034   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42035     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42036     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42037     break 2
42038   fi
42039 done
42040   done
42041 IFS=$as_save_IFS
42042 
42043   ;;
42044 esac
42045 fi
42046 OBJDUMP=$ac_cv_path_OBJDUMP
42047 if test -n "$OBJDUMP"; then
42048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42049 $as_echo "$OBJDUMP" >&6; }
42050 else
42051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42052 $as_echo "no" >&6; }
42053 fi
42054 
42055 
42056           if test "x$OBJDUMP" = x; then
42057             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42058           fi
42059         else
42060           # Otherwise we believe it is a complete path. Use it as it is.
42061           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42062 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42063           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42064 $as_echo_n "checking for OBJDUMP... " >&6; }
42065           if test ! -x "$tool_specified"; then
42066             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42067 $as_echo "not found" >&6; }
42068             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42069           fi
42070           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42071 $as_echo "$tool_specified" >&6; }
42072         fi
42073       fi
42074     fi
42075 
42076   fi
42077 
42078 
42079   if test "x$OBJDUMP" != x; then
42080     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42081     # bails if argument is missing.
42082 
42083   # Only process if variable expands to non-empty
42084 
42085   if test "x$OBJDUMP" != x; then
42086     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42087 
42088   # First separate the path from the arguments. This will split at the first
42089   # space.
42090   complete="$OBJDUMP"
42091   path="${complete%% *}"
42092   tmp="$complete EOL"
42093   arguments="${tmp#* }"
42094 
42095   # Input might be given as Windows format, start by converting to
42096   # unix format.
42097   new_path=`$CYGPATH -u "$path"`
42098 
42099   # Now try to locate executable using which
42100   new_path=`$WHICH "$new_path" 2> /dev/null`
42101   # bat and cmd files are not always considered executable in cygwin causing which
42102   # to not find them
42103   if test "x$new_path" = x \
42104       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42105       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42106     new_path=`$CYGPATH -u "$path"`
42107   fi
42108   if test "x$new_path" = x; then
42109     # Oops. Which didn't find the executable.
42110     # The splitting of arguments from the executable at a space might have been incorrect,
42111     # since paths with space are more likely in Windows. Give it another try with the whole
42112     # argument.
42113     path="$complete"
42114     arguments="EOL"
42115     new_path=`$CYGPATH -u "$path"`
42116     new_path=`$WHICH "$new_path" 2> /dev/null`
42117     # bat and cmd files are not always considered executable in cygwin causing which
42118     # to not find them
42119     if test "x$new_path" = x \
42120         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42121         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42122       new_path=`$CYGPATH -u "$path"`
42123     fi
42124     if test "x$new_path" = x; then
42125       # It's still not found. Now this is an unrecoverable error.
42126       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42127 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42128       has_space=`$ECHO "$complete" | $GREP " "`
42129       if test "x$has_space" != x; then
42130         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42131 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42132       fi
42133       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42134     fi
42135   fi
42136 
42137   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42138   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42139   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42140   # "foo.exe" is OK but "foo" is an error.
42141   #
42142   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42143   # It is also a way to make sure we got the proper file name for the real test later on.
42144   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42145   if test "x$test_shortpath" = x; then
42146     # Short path failed, file does not exist as specified.
42147     # Try adding .exe or .cmd
42148     if test -f "${new_path}.exe"; then
42149       input_to_shortpath="${new_path}.exe"
42150     elif test -f "${new_path}.cmd"; then
42151       input_to_shortpath="${new_path}.cmd"
42152     else
42153       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42154 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42155       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42156 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42157       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42158     fi
42159   else
42160     input_to_shortpath="$new_path"
42161   fi
42162 
42163   # Call helper function which possibly converts this using DOS-style short mode.
42164   # If so, the updated path is stored in $new_path.
42165   new_path="$input_to_shortpath"
42166 
42167   input_path="$input_to_shortpath"
42168   # Check if we need to convert this using DOS-style short mode. If the path
42169   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42170   # take no chances and rewrite it.
42171   # Note: m4 eats our [], so we need to use [ and ] instead.
42172   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42173   if test "x$has_forbidden_chars" != x; then
42174     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42175     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42176     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42177     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42178       # Going to short mode and back again did indeed matter. Since short mode is
42179       # case insensitive, let's make it lowercase to improve readability.
42180       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42181       # Now convert it back to Unix-style (cygpath)
42182       input_path=`$CYGPATH -u "$shortmode_path"`
42183       new_path="$input_path"
42184     fi
42185   fi
42186 
42187   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42188   if test "x$test_cygdrive_prefix" = x; then
42189     # As a simple fix, exclude /usr/bin since it's not a real path.
42190     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42191       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42192       # a path prefixed by /cygdrive for fixpath to work.
42193       new_path="$CYGWIN_ROOT_PATH$input_path"
42194     fi
42195   fi
42196 
42197   # remove trailing .exe if any
42198   new_path="${new_path/%.exe/}"
42199 
42200     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42201 
42202   # First separate the path from the arguments. This will split at the first
42203   # space.
42204   complete="$OBJDUMP"
42205   path="${complete%% *}"
42206   tmp="$complete EOL"
42207   arguments="${tmp#* }"
42208 
42209   # Input might be given as Windows format, start by converting to
42210   # unix format.
42211   new_path="$path"
42212 
42213   windows_path="$new_path"
42214   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42215     unix_path=`$CYGPATH -u "$windows_path"`
42216     new_path="$unix_path"
42217   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42218     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42219     new_path="$unix_path"
42220   fi
42221 
42222 
42223   # Now try to locate executable using which
42224   new_path=`$WHICH "$new_path" 2> /dev/null`
42225 
42226   if test "x$new_path" = x; then
42227     # Oops. Which didn't find the executable.
42228     # The splitting of arguments from the executable at a space might have been incorrect,
42229     # since paths with space are more likely in Windows. Give it another try with the whole
42230     # argument.
42231     path="$complete"
42232     arguments="EOL"
42233     new_path="$path"
42234 
42235   windows_path="$new_path"
42236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42237     unix_path=`$CYGPATH -u "$windows_path"`
42238     new_path="$unix_path"
42239   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42240     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42241     new_path="$unix_path"
42242   fi
42243 
42244 
42245     new_path=`$WHICH "$new_path" 2> /dev/null`
42246     # bat and cmd files are not always considered executable in MSYS causing which
42247     # to not find them
42248     if test "x$new_path" = x \
42249         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42250         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42251       new_path="$path"
42252 
42253   windows_path="$new_path"
42254   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42255     unix_path=`$CYGPATH -u "$windows_path"`
42256     new_path="$unix_path"
42257   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42258     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42259     new_path="$unix_path"
42260   fi
42261 
42262     fi
42263 
42264     if test "x$new_path" = x; then
42265       # It's still not found. Now this is an unrecoverable error.
42266       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42267 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42268       has_space=`$ECHO "$complete" | $GREP " "`
42269       if test "x$has_space" != x; then
42270         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42271 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42272       fi
42273       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42274     fi
42275   fi
42276 
42277   # Now new_path has a complete unix path to the binary
42278   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42279     # Keep paths in /bin as-is, but remove trailing .exe if any
42280     new_path="${new_path/%.exe/}"
42281     # Do not save /bin paths to all_fixpath_prefixes!
42282   else
42283     # Not in mixed or Windows style, start by that.
42284     new_path=`cmd //c echo $new_path`
42285 
42286   input_path="$new_path"
42287   # Check if we need to convert this using DOS-style short mode. If the path
42288   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42289   # take no chances and rewrite it.
42290   # Note: m4 eats our [], so we need to use [ and ] instead.
42291   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42292   if test "x$has_forbidden_chars" != x; then
42293     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42294     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42295   fi
42296 
42297     # Output is in $new_path
42298 
42299   windows_path="$new_path"
42300   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42301     unix_path=`$CYGPATH -u "$windows_path"`
42302     new_path="$unix_path"
42303   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42304     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42305     new_path="$unix_path"
42306   fi
42307 
42308     # remove trailing .exe if any
42309     new_path="${new_path/%.exe/}"
42310 
42311     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42312     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42313   fi
42314 
42315     else
42316       # We're on a unix platform. Hooray! :)
42317       # First separate the path from the arguments. This will split at the first
42318       # space.
42319       complete="$OBJDUMP"
42320       path="${complete%% *}"
42321       tmp="$complete EOL"
42322       arguments="${tmp#* }"
42323 
42324       # Cannot rely on the command "which" here since it doesn't always work.
42325       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42326       if test -z "$is_absolute_path"; then
42327         # Path to executable is not absolute. Find it.
42328         IFS_save="$IFS"
42329         IFS=:
42330         for p in $PATH; do
42331           if test -f "$p/$path" && test -x "$p/$path"; then
42332             new_path="$p/$path"
42333             break
42334           fi
42335         done
42336         IFS="$IFS_save"
42337       else
42338         # This is an absolute path, we can use it without further modifications.
42339         new_path="$path"
42340       fi
42341 
42342       if test "x$new_path" = x; then
42343         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42344 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42345         has_space=`$ECHO "$complete" | $GREP " "`
42346         if test "x$has_space" != x; then
42347           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42348 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42349         fi
42350         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42351       fi
42352     fi
42353 
42354     # Now join together the path and the arguments once again
42355     if test "x$arguments" != xEOL; then
42356       new_complete="$new_path ${arguments% *}"
42357     else
42358       new_complete="$new_path"
42359     fi
42360 
42361     if test "x$complete" != "x$new_complete"; then
42362       OBJDUMP="$new_complete"
42363       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42364 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42365     fi
42366   fi
42367 
42368   fi
42369 
42370 
42371   # Restore old path.
42372   PATH="$OLD_PATH"
42373 
42374   # Restore the flags to the user specified values.
42375   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42376   CFLAGS="$ORG_CFLAGS"
42377   CXXFLAGS="$ORG_CXXFLAGS"
42378 
42379 
42380 # Finally do some processing after the detection phase
42381 
42382   if test "x$COMPILE_TYPE" = "xcross"; then
42383     # Now we need to find a C/C++ compiler that can build executables for the
42384     # build platform. We can't use the AC_PROG_CC macro, since it can only be
42385     # used once. Also, we need to do this without adding a tools dir to the
42386     # path, otherwise we might pick up cross-compilers which don't use standard
42387     # naming.
42388 
42389     OLDPATH="$PATH"
42390 
42391 
42392 # Check whether --with-build-devkit was given.
42393 if test "${with_build_devkit+set}" = set; then :
42394   withval=$with_build_devkit;
42395 fi
42396 
42397     if test "x$with_build_devkit" = "xyes"; then
42398       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42399     elif test -n "$with_build_devkit"; then
42400       if test ! -d "$with_build_devkit"; then
42401         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42402       else
42403 
42404   # Only process if variable expands to non-empty
42405 
42406   if test "x$with_build_devkit" != x; then
42407     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42408 
42409   # Input might be given as Windows format, start by converting to
42410   # unix format.
42411   path="$with_build_devkit"
42412   new_path=`$CYGPATH -u "$path"`
42413 
42414   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42415   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42416   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42417   # "foo.exe" is OK but "foo" is an error.
42418   #
42419   # This test is therefore slightly more accurate than "test -f" to check for file precense.
42420   # It is also a way to make sure we got the proper file name for the real test later on.
42421   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42422   if test "x$test_shortpath" = x; then
42423     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42424 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42425     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42426   fi
42427 
42428   # Call helper function which possibly converts this using DOS-style short mode.
42429   # If so, the updated path is stored in $new_path.
42430 
42431   input_path="$new_path"
42432   # Check if we need to convert this using DOS-style short mode. If the path
42433   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42434   # take no chances and rewrite it.
42435   # Note: m4 eats our [], so we need to use [ and ] instead.
42436   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42437   if test "x$has_forbidden_chars" != x; then
42438     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42439     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42440     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42441     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42442       # Going to short mode and back again did indeed matter. Since short mode is
42443       # case insensitive, let's make it lowercase to improve readability.
42444       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42445       # Now convert it back to Unix-style (cygpath)
42446       input_path=`$CYGPATH -u "$shortmode_path"`
42447       new_path="$input_path"
42448     fi
42449   fi
42450 
42451   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42452   if test "x$test_cygdrive_prefix" = x; then
42453     # As a simple fix, exclude /usr/bin since it's not a real path.
42454     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42455       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42456       # a path prefixed by /cygdrive for fixpath to work.
42457       new_path="$CYGWIN_ROOT_PATH$input_path"
42458     fi
42459   fi
42460 
42461 
42462   if test "x$path" != "x$new_path"; then
42463     with_build_devkit="$new_path"
42464     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42465 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42466   fi
42467 
42468     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42469 
42470   path="$with_build_devkit"
42471   has_colon=`$ECHO $path | $GREP ^.:`
42472   new_path="$path"
42473   if test "x$has_colon" = x; then
42474     # Not in mixed or Windows style, start by that.
42475     new_path=`cmd //c echo $path`
42476   fi
42477 
42478 
42479   input_path="$new_path"
42480   # Check if we need to convert this using DOS-style short mode. If the path
42481   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42482   # take no chances and rewrite it.
42483   # Note: m4 eats our [], so we need to use [ and ] instead.
42484   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42485   if test "x$has_forbidden_chars" != x; then
42486     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42487     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42488   fi
42489 
42490 
42491   windows_path="$new_path"
42492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42493     unix_path=`$CYGPATH -u "$windows_path"`
42494     new_path="$unix_path"
42495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42496     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42497     new_path="$unix_path"
42498   fi
42499 
42500   if test "x$path" != "x$new_path"; then
42501     with_build_devkit="$new_path"
42502     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42503 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42504   fi
42505 
42506   # Save the first 10 bytes of this path to the storage, so fixpath can work.
42507   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42508 
42509     else
42510       # We're on a unix platform. Hooray! :)
42511       path="$with_build_devkit"
42512       has_space=`$ECHO "$path" | $GREP " "`
42513       if test "x$has_space" != x; then
42514         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42515 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42516         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42517       fi
42518 
42519       # Use eval to expand a potential ~
42520       eval path="$path"
42521       if test ! -f "$path" && test ! -d "$path"; then
42522         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
42523       fi
42524 
42525       with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
42526     fi
42527   fi
42528 
42529         BUILD_DEVKIT_ROOT="$with_build_devkit"
42530         # Check for a meta data info file in the root of the devkit
42531         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
42532           # Process devkit.info so that existing devkit variables are not
42533           # modified by this
42534           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
42535               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
42536               -e "s/\$host/\$build/g" \
42537               $BUILD_DEVKIT_ROOT/devkit.info \
42538               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42539           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42540           # This potentially sets the following:
42541           # A descriptive name of the devkit
42542 
42543   if test "x$BUILD_DEVKIT_NAME" = x; then
42544     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
42545   fi
42546 
42547           # Corresponds to --with-extra-path
42548 
42549   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
42550     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
42551   fi
42552 
42553           # Corresponds to --with-toolchain-path
42554 
42555   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42556     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
42557   fi
42558 
42559           # Corresponds to --with-sysroot
42560 
42561   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
42562     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
42563   fi
42564 
42565           # Skip the Window specific parts
42566         fi
42567 
42568         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
42569 $as_echo_n "checking for build platform devkit... " >&6; }
42570         if test "x$BUILD_DEVKIT_NAME" != x; then
42571           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
42572 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
42573         else
42574           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
42575 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
42576         fi
42577 
42578         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
42579 
42580   if test "x$BUILD_SYSROOT" != "x"; then
42581     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42582       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42583         # Solaris Studio does not have a concept of sysroot. Instead we must
42584         # make sure the default include and lib dirs are appended to each
42585         # compile and link command line.
42586         BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
42587         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42588             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42589             -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42590       fi
42591     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42592       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
42593       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
42594     elif test "x$TOOLCHAIN_TYPE" = xclang; then
42595       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
42596       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
42597     fi
42598     # Propagate the sysroot args to hotspot
42599     BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
42600     BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42601     BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42602     # The global CFLAGS and LDFLAGS variables need these for configure to function
42603     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
42604     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
42605     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42606     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42607   fi
42608 
42609   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42610     # We also need -iframework<path>/System/Library/Frameworks
42611     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42612     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42613     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
42614     # set this here so it doesn't have to be peppered throughout the forest
42615     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42616     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42617   fi
42618 
42619 
42620 
42621 
42622 
42623          # Fallback default of just /bin if DEVKIT_PATH is not defined
42624         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42625           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
42626         fi
42627         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
42628       fi
42629     fi
42630 
42631     # FIXME: we should list the discovered compilers as an exclude pattern!
42632     # If we do that, we can do this detection before POST_DETECTION, and still
42633     # find the build compilers in the tools dir, if needed.
42634 
42635 
42636 
42637   # Publish this variable in the help.
42638 
42639 
42640   if [ -z "${BUILD_CC+x}" ]; then
42641     # The variable is not set by user, try to locate tool using the code snippet
42642     for ac_prog in cl cc gcc
42643 do
42644   # Extract the first word of "$ac_prog", so it can be a program name with args.
42645 set dummy $ac_prog; ac_word=$2
42646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42647 $as_echo_n "checking for $ac_word... " >&6; }
42648 if ${ac_cv_path_BUILD_CC+:} false; then :
42649   $as_echo_n "(cached) " >&6
42650 else
42651   case $BUILD_CC in
42652   [\\/]* | ?:[\\/]*)
42653   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42654   ;;
42655   *)
42656   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42657 for as_dir in $PATH
42658 do
42659   IFS=$as_save_IFS
42660   test -z "$as_dir" && as_dir=.
42661     for ac_exec_ext in '' $ac_executable_extensions; do
42662   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42663     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42664     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42665     break 2
42666   fi
42667 done
42668   done
42669 IFS=$as_save_IFS
42670 
42671   ;;
42672 esac
42673 fi
42674 BUILD_CC=$ac_cv_path_BUILD_CC
42675 if test -n "$BUILD_CC"; then
42676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42677 $as_echo "$BUILD_CC" >&6; }
42678 else
42679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42680 $as_echo "no" >&6; }
42681 fi
42682 
42683 
42684   test -n "$BUILD_CC" && break
42685 done
42686 
42687   else
42688     # The variable is set, but is it from the command line or the environment?
42689 
42690     # Try to remove the string !BUILD_CC! from our list.
42691     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42692     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42693       # If it failed, the variable was not from the command line. Ignore it,
42694       # but warn the user (except for BASH, which is always set by the calling BASH).
42695       if test "xBUILD_CC" != xBASH; then
42696         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42697 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42698       fi
42699       # Try to locate tool using the code snippet
42700       for ac_prog in cl cc gcc
42701 do
42702   # Extract the first word of "$ac_prog", so it can be a program name with args.
42703 set dummy $ac_prog; ac_word=$2
42704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42705 $as_echo_n "checking for $ac_word... " >&6; }
42706 if ${ac_cv_path_BUILD_CC+:} false; then :
42707   $as_echo_n "(cached) " >&6
42708 else
42709   case $BUILD_CC in
42710   [\\/]* | ?:[\\/]*)
42711   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42712   ;;
42713   *)
42714   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42715 for as_dir in $PATH
42716 do
42717   IFS=$as_save_IFS
42718   test -z "$as_dir" && as_dir=.
42719     for ac_exec_ext in '' $ac_executable_extensions; do
42720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42721     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42723     break 2
42724   fi
42725 done
42726   done
42727 IFS=$as_save_IFS
42728 
42729   ;;
42730 esac
42731 fi
42732 BUILD_CC=$ac_cv_path_BUILD_CC
42733 if test -n "$BUILD_CC"; then
42734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42735 $as_echo "$BUILD_CC" >&6; }
42736 else
42737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42738 $as_echo "no" >&6; }
42739 fi
42740 
42741 
42742   test -n "$BUILD_CC" && break
42743 done
42744 
42745     else
42746       # If it succeeded, then it was overridden by the user. We will use it
42747       # for the tool.
42748 
42749       # First remove it from the list of overridden variables, so we can test
42750       # for unknown variables in the end.
42751       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42752 
42753       # Check if we try to supply an empty value
42754       if test "x$BUILD_CC" = x; then
42755         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42756 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42757         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42758 $as_echo_n "checking for BUILD_CC... " >&6; }
42759         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42760 $as_echo "disabled" >&6; }
42761       else
42762         # Check if the provided tool contains a complete path.
42763         tool_specified="$BUILD_CC"
42764         tool_basename="${tool_specified##*/}"
42765         if test "x$tool_basename" = "x$tool_specified"; then
42766           # A command without a complete path is provided, search $PATH.
42767           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42768 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42769           # Extract the first word of "$tool_basename", so it can be a program name with args.
42770 set dummy $tool_basename; ac_word=$2
42771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42772 $as_echo_n "checking for $ac_word... " >&6; }
42773 if ${ac_cv_path_BUILD_CC+:} false; then :
42774   $as_echo_n "(cached) " >&6
42775 else
42776   case $BUILD_CC in
42777   [\\/]* | ?:[\\/]*)
42778   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42779   ;;
42780   *)
42781   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42782 for as_dir in $PATH
42783 do
42784   IFS=$as_save_IFS
42785   test -z "$as_dir" && as_dir=.
42786     for ac_exec_ext in '' $ac_executable_extensions; do
42787   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42788     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42789     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42790     break 2
42791   fi
42792 done
42793   done
42794 IFS=$as_save_IFS
42795 
42796   ;;
42797 esac
42798 fi
42799 BUILD_CC=$ac_cv_path_BUILD_CC
42800 if test -n "$BUILD_CC"; then
42801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42802 $as_echo "$BUILD_CC" >&6; }
42803 else
42804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42805 $as_echo "no" >&6; }
42806 fi
42807 
42808 
42809           if test "x$BUILD_CC" = x; then
42810             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42811           fi
42812         else
42813           # Otherwise we believe it is a complete path. Use it as it is.
42814           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42815 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42816           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42817 $as_echo_n "checking for BUILD_CC... " >&6; }
42818           if test ! -x "$tool_specified"; then
42819             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42820 $as_echo "not found" >&6; }
42821             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42822           fi
42823           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42824 $as_echo "$tool_specified" >&6; }
42825         fi
42826       fi
42827     fi
42828 
42829   fi
42830 
42831 
42832 
42833   if test "x$BUILD_CC" = x; then
42834     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42835   fi
42836 
42837 
42838 
42839   # Only process if variable expands to non-empty
42840 
42841   if test "x$BUILD_CC" != x; then
42842     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42843 
42844   # First separate the path from the arguments. This will split at the first
42845   # space.
42846   complete="$BUILD_CC"
42847   path="${complete%% *}"
42848   tmp="$complete EOL"
42849   arguments="${tmp#* }"
42850 
42851   # Input might be given as Windows format, start by converting to
42852   # unix format.
42853   new_path=`$CYGPATH -u "$path"`
42854 
42855   # Now try to locate executable using which
42856   new_path=`$WHICH "$new_path" 2> /dev/null`
42857   # bat and cmd files are not always considered executable in cygwin causing which
42858   # to not find them
42859   if test "x$new_path" = x \
42860       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42861       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42862     new_path=`$CYGPATH -u "$path"`
42863   fi
42864   if test "x$new_path" = x; then
42865     # Oops. Which didn't find the executable.
42866     # The splitting of arguments from the executable at a space might have been incorrect,
42867     # since paths with space are more likely in Windows. Give it another try with the whole
42868     # argument.
42869     path="$complete"
42870     arguments="EOL"
42871     new_path=`$CYGPATH -u "$path"`
42872     new_path=`$WHICH "$new_path" 2> /dev/null`
42873     # bat and cmd files are not always considered executable in cygwin causing which
42874     # to not find them
42875     if test "x$new_path" = x \
42876         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42877         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42878       new_path=`$CYGPATH -u "$path"`
42879     fi
42880     if test "x$new_path" = x; then
42881       # It's still not found. Now this is an unrecoverable error.
42882       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42883 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42884       has_space=`$ECHO "$complete" | $GREP " "`
42885       if test "x$has_space" != x; then
42886         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42887 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42888       fi
42889       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42890     fi
42891   fi
42892 
42893   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42894   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42895   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42896   # "foo.exe" is OK but "foo" is an error.
42897   #
42898   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42899   # It is also a way to make sure we got the proper file name for the real test later on.
42900   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42901   if test "x$test_shortpath" = x; then
42902     # Short path failed, file does not exist as specified.
42903     # Try adding .exe or .cmd
42904     if test -f "${new_path}.exe"; then
42905       input_to_shortpath="${new_path}.exe"
42906     elif test -f "${new_path}.cmd"; then
42907       input_to_shortpath="${new_path}.cmd"
42908     else
42909       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42910 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42911       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42912 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42913       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42914     fi
42915   else
42916     input_to_shortpath="$new_path"
42917   fi
42918 
42919   # Call helper function which possibly converts this using DOS-style short mode.
42920   # If so, the updated path is stored in $new_path.
42921   new_path="$input_to_shortpath"
42922 
42923   input_path="$input_to_shortpath"
42924   # Check if we need to convert this using DOS-style short mode. If the path
42925   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42926   # take no chances and rewrite it.
42927   # Note: m4 eats our [], so we need to use [ and ] instead.
42928   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42929   if test "x$has_forbidden_chars" != x; then
42930     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42931     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42932     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42933     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42934       # Going to short mode and back again did indeed matter. Since short mode is
42935       # case insensitive, let's make it lowercase to improve readability.
42936       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42937       # Now convert it back to Unix-style (cygpath)
42938       input_path=`$CYGPATH -u "$shortmode_path"`
42939       new_path="$input_path"
42940     fi
42941   fi
42942 
42943   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42944   if test "x$test_cygdrive_prefix" = x; then
42945     # As a simple fix, exclude /usr/bin since it's not a real path.
42946     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42947       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42948       # a path prefixed by /cygdrive for fixpath to work.
42949       new_path="$CYGWIN_ROOT_PATH$input_path"
42950     fi
42951   fi
42952 
42953   # remove trailing .exe if any
42954   new_path="${new_path/%.exe/}"
42955 
42956     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42957 
42958   # First separate the path from the arguments. This will split at the first
42959   # space.
42960   complete="$BUILD_CC"
42961   path="${complete%% *}"
42962   tmp="$complete EOL"
42963   arguments="${tmp#* }"
42964 
42965   # Input might be given as Windows format, start by converting to
42966   # unix format.
42967   new_path="$path"
42968 
42969   windows_path="$new_path"
42970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42971     unix_path=`$CYGPATH -u "$windows_path"`
42972     new_path="$unix_path"
42973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42974     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42975     new_path="$unix_path"
42976   fi
42977 
42978 
42979   # Now try to locate executable using which
42980   new_path=`$WHICH "$new_path" 2> /dev/null`
42981 
42982   if test "x$new_path" = x; then
42983     # Oops. Which didn't find the executable.
42984     # The splitting of arguments from the executable at a space might have been incorrect,
42985     # since paths with space are more likely in Windows. Give it another try with the whole
42986     # argument.
42987     path="$complete"
42988     arguments="EOL"
42989     new_path="$path"
42990 
42991   windows_path="$new_path"
42992   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42993     unix_path=`$CYGPATH -u "$windows_path"`
42994     new_path="$unix_path"
42995   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42996     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42997     new_path="$unix_path"
42998   fi
42999 
43000 
43001     new_path=`$WHICH "$new_path" 2> /dev/null`
43002     # bat and cmd files are not always considered executable in MSYS causing which
43003     # to not find them
43004     if test "x$new_path" = x \
43005         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43006         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43007       new_path="$path"
43008 
43009   windows_path="$new_path"
43010   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43011     unix_path=`$CYGPATH -u "$windows_path"`
43012     new_path="$unix_path"
43013   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43014     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43015     new_path="$unix_path"
43016   fi
43017 
43018     fi
43019 
43020     if test "x$new_path" = x; then
43021       # It's still not found. Now this is an unrecoverable error.
43022       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43023 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43024       has_space=`$ECHO "$complete" | $GREP " "`
43025       if test "x$has_space" != x; then
43026         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43027 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43028       fi
43029       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43030     fi
43031   fi
43032 
43033   # Now new_path has a complete unix path to the binary
43034   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43035     # Keep paths in /bin as-is, but remove trailing .exe if any
43036     new_path="${new_path/%.exe/}"
43037     # Do not save /bin paths to all_fixpath_prefixes!
43038   else
43039     # Not in mixed or Windows style, start by that.
43040     new_path=`cmd //c echo $new_path`
43041 
43042   input_path="$new_path"
43043   # Check if we need to convert this using DOS-style short mode. If the path
43044   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43045   # take no chances and rewrite it.
43046   # Note: m4 eats our [], so we need to use [ and ] instead.
43047   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43048   if test "x$has_forbidden_chars" != x; then
43049     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43050     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43051   fi
43052 
43053     # Output is in $new_path
43054 
43055   windows_path="$new_path"
43056   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43057     unix_path=`$CYGPATH -u "$windows_path"`
43058     new_path="$unix_path"
43059   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43060     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43061     new_path="$unix_path"
43062   fi
43063 
43064     # remove trailing .exe if any
43065     new_path="${new_path/%.exe/}"
43066 
43067     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43068     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43069   fi
43070 
43071     else
43072       # We're on a unix platform. Hooray! :)
43073       # First separate the path from the arguments. This will split at the first
43074       # space.
43075       complete="$BUILD_CC"
43076       path="${complete%% *}"
43077       tmp="$complete EOL"
43078       arguments="${tmp#* }"
43079 
43080       # Cannot rely on the command "which" here since it doesn't always work.
43081       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43082       if test -z "$is_absolute_path"; then
43083         # Path to executable is not absolute. Find it.
43084         IFS_save="$IFS"
43085         IFS=:
43086         for p in $PATH; do
43087           if test -f "$p/$path" && test -x "$p/$path"; then
43088             new_path="$p/$path"
43089             break
43090           fi
43091         done
43092         IFS="$IFS_save"
43093       else
43094         # This is an absolute path, we can use it without further modifications.
43095         new_path="$path"
43096       fi
43097 
43098       if test "x$new_path" = x; then
43099         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43100 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43101         has_space=`$ECHO "$complete" | $GREP " "`
43102         if test "x$has_space" != x; then
43103           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43104 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43105         fi
43106         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43107       fi
43108     fi
43109 
43110     # Now join together the path and the arguments once again
43111     if test "x$arguments" != xEOL; then
43112       new_complete="$new_path ${arguments% *}"
43113     else
43114       new_complete="$new_path"
43115     fi
43116 
43117     if test "x$complete" != "x$new_complete"; then
43118       BUILD_CC="$new_complete"
43119       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43120 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43121     fi
43122   fi
43123 
43124 
43125 
43126 
43127   # Publish this variable in the help.
43128 
43129 
43130   if [ -z "${BUILD_CXX+x}" ]; then
43131     # The variable is not set by user, try to locate tool using the code snippet
43132     for ac_prog in cl CC g++
43133 do
43134   # Extract the first word of "$ac_prog", so it can be a program name with args.
43135 set dummy $ac_prog; ac_word=$2
43136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43137 $as_echo_n "checking for $ac_word... " >&6; }
43138 if ${ac_cv_path_BUILD_CXX+:} false; then :
43139   $as_echo_n "(cached) " >&6
43140 else
43141   case $BUILD_CXX in
43142   [\\/]* | ?:[\\/]*)
43143   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43144   ;;
43145   *)
43146   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43147 for as_dir in $PATH
43148 do
43149   IFS=$as_save_IFS
43150   test -z "$as_dir" && as_dir=.
43151     for ac_exec_ext in '' $ac_executable_extensions; do
43152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43153     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43155     break 2
43156   fi
43157 done
43158   done
43159 IFS=$as_save_IFS
43160 
43161   ;;
43162 esac
43163 fi
43164 BUILD_CXX=$ac_cv_path_BUILD_CXX
43165 if test -n "$BUILD_CXX"; then
43166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43167 $as_echo "$BUILD_CXX" >&6; }
43168 else
43169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43170 $as_echo "no" >&6; }
43171 fi
43172 
43173 
43174   test -n "$BUILD_CXX" && break
43175 done
43176 
43177   else
43178     # The variable is set, but is it from the command line or the environment?
43179 
43180     # Try to remove the string !BUILD_CXX! from our list.
43181     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43182     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43183       # If it failed, the variable was not from the command line. Ignore it,
43184       # but warn the user (except for BASH, which is always set by the calling BASH).
43185       if test "xBUILD_CXX" != xBASH; then
43186         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43187 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43188       fi
43189       # Try to locate tool using the code snippet
43190       for ac_prog in cl CC g++
43191 do
43192   # Extract the first word of "$ac_prog", so it can be a program name with args.
43193 set dummy $ac_prog; ac_word=$2
43194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43195 $as_echo_n "checking for $ac_word... " >&6; }
43196 if ${ac_cv_path_BUILD_CXX+:} false; then :
43197   $as_echo_n "(cached) " >&6
43198 else
43199   case $BUILD_CXX in
43200   [\\/]* | ?:[\\/]*)
43201   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43202   ;;
43203   *)
43204   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43205 for as_dir in $PATH
43206 do
43207   IFS=$as_save_IFS
43208   test -z "$as_dir" && as_dir=.
43209     for ac_exec_ext in '' $ac_executable_extensions; do
43210   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43211     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43212     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43213     break 2
43214   fi
43215 done
43216   done
43217 IFS=$as_save_IFS
43218 
43219   ;;
43220 esac
43221 fi
43222 BUILD_CXX=$ac_cv_path_BUILD_CXX
43223 if test -n "$BUILD_CXX"; then
43224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43225 $as_echo "$BUILD_CXX" >&6; }
43226 else
43227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43228 $as_echo "no" >&6; }
43229 fi
43230 
43231 
43232   test -n "$BUILD_CXX" && break
43233 done
43234 
43235     else
43236       # If it succeeded, then it was overridden by the user. We will use it
43237       # for the tool.
43238 
43239       # First remove it from the list of overridden variables, so we can test
43240       # for unknown variables in the end.
43241       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43242 
43243       # Check if we try to supply an empty value
43244       if test "x$BUILD_CXX" = x; then
43245         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43246 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43247         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43248 $as_echo_n "checking for BUILD_CXX... " >&6; }
43249         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43250 $as_echo "disabled" >&6; }
43251       else
43252         # Check if the provided tool contains a complete path.
43253         tool_specified="$BUILD_CXX"
43254         tool_basename="${tool_specified##*/}"
43255         if test "x$tool_basename" = "x$tool_specified"; then
43256           # A command without a complete path is provided, search $PATH.
43257           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43258 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43259           # Extract the first word of "$tool_basename", so it can be a program name with args.
43260 set dummy $tool_basename; ac_word=$2
43261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43262 $as_echo_n "checking for $ac_word... " >&6; }
43263 if ${ac_cv_path_BUILD_CXX+:} false; then :
43264   $as_echo_n "(cached) " >&6
43265 else
43266   case $BUILD_CXX in
43267   [\\/]* | ?:[\\/]*)
43268   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43269   ;;
43270   *)
43271   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43272 for as_dir in $PATH
43273 do
43274   IFS=$as_save_IFS
43275   test -z "$as_dir" && as_dir=.
43276     for ac_exec_ext in '' $ac_executable_extensions; do
43277   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43278     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43279     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43280     break 2
43281   fi
43282 done
43283   done
43284 IFS=$as_save_IFS
43285 
43286   ;;
43287 esac
43288 fi
43289 BUILD_CXX=$ac_cv_path_BUILD_CXX
43290 if test -n "$BUILD_CXX"; then
43291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43292 $as_echo "$BUILD_CXX" >&6; }
43293 else
43294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43295 $as_echo "no" >&6; }
43296 fi
43297 
43298 
43299           if test "x$BUILD_CXX" = x; then
43300             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43301           fi
43302         else
43303           # Otherwise we believe it is a complete path. Use it as it is.
43304           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43305 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43306           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43307 $as_echo_n "checking for BUILD_CXX... " >&6; }
43308           if test ! -x "$tool_specified"; then
43309             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43310 $as_echo "not found" >&6; }
43311             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43312           fi
43313           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43314 $as_echo "$tool_specified" >&6; }
43315         fi
43316       fi
43317     fi
43318 
43319   fi
43320 
43321 
43322 
43323   if test "x$BUILD_CXX" = x; then
43324     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43325   fi
43326 
43327 
43328 
43329   # Only process if variable expands to non-empty
43330 
43331   if test "x$BUILD_CXX" != x; then
43332     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43333 
43334   # First separate the path from the arguments. This will split at the first
43335   # space.
43336   complete="$BUILD_CXX"
43337   path="${complete%% *}"
43338   tmp="$complete EOL"
43339   arguments="${tmp#* }"
43340 
43341   # Input might be given as Windows format, start by converting to
43342   # unix format.
43343   new_path=`$CYGPATH -u "$path"`
43344 
43345   # Now try to locate executable using which
43346   new_path=`$WHICH "$new_path" 2> /dev/null`
43347   # bat and cmd files are not always considered executable in cygwin causing which
43348   # to not find them
43349   if test "x$new_path" = x \
43350       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43351       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43352     new_path=`$CYGPATH -u "$path"`
43353   fi
43354   if test "x$new_path" = x; then
43355     # Oops. Which didn't find the executable.
43356     # The splitting of arguments from the executable at a space might have been incorrect,
43357     # since paths with space are more likely in Windows. Give it another try with the whole
43358     # argument.
43359     path="$complete"
43360     arguments="EOL"
43361     new_path=`$CYGPATH -u "$path"`
43362     new_path=`$WHICH "$new_path" 2> /dev/null`
43363     # bat and cmd files are not always considered executable in cygwin causing which
43364     # to not find them
43365     if test "x$new_path" = x \
43366         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43367         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43368       new_path=`$CYGPATH -u "$path"`
43369     fi
43370     if test "x$new_path" = x; then
43371       # It's still not found. Now this is an unrecoverable error.
43372       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43373 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43374       has_space=`$ECHO "$complete" | $GREP " "`
43375       if test "x$has_space" != x; then
43376         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43377 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43378       fi
43379       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43380     fi
43381   fi
43382 
43383   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43384   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43385   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43386   # "foo.exe" is OK but "foo" is an error.
43387   #
43388   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43389   # It is also a way to make sure we got the proper file name for the real test later on.
43390   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43391   if test "x$test_shortpath" = x; then
43392     # Short path failed, file does not exist as specified.
43393     # Try adding .exe or .cmd
43394     if test -f "${new_path}.exe"; then
43395       input_to_shortpath="${new_path}.exe"
43396     elif test -f "${new_path}.cmd"; then
43397       input_to_shortpath="${new_path}.cmd"
43398     else
43399       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43400 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43401       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43402 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43403       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43404     fi
43405   else
43406     input_to_shortpath="$new_path"
43407   fi
43408 
43409   # Call helper function which possibly converts this using DOS-style short mode.
43410   # If so, the updated path is stored in $new_path.
43411   new_path="$input_to_shortpath"
43412 
43413   input_path="$input_to_shortpath"
43414   # Check if we need to convert this using DOS-style short mode. If the path
43415   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43416   # take no chances and rewrite it.
43417   # Note: m4 eats our [], so we need to use [ and ] instead.
43418   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43419   if test "x$has_forbidden_chars" != x; then
43420     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43421     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43422     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43423     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43424       # Going to short mode and back again did indeed matter. Since short mode is
43425       # case insensitive, let's make it lowercase to improve readability.
43426       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43427       # Now convert it back to Unix-style (cygpath)
43428       input_path=`$CYGPATH -u "$shortmode_path"`
43429       new_path="$input_path"
43430     fi
43431   fi
43432 
43433   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43434   if test "x$test_cygdrive_prefix" = x; then
43435     # As a simple fix, exclude /usr/bin since it's not a real path.
43436     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43437       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43438       # a path prefixed by /cygdrive for fixpath to work.
43439       new_path="$CYGWIN_ROOT_PATH$input_path"
43440     fi
43441   fi
43442 
43443   # remove trailing .exe if any
43444   new_path="${new_path/%.exe/}"
43445 
43446     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43447 
43448   # First separate the path from the arguments. This will split at the first
43449   # space.
43450   complete="$BUILD_CXX"
43451   path="${complete%% *}"
43452   tmp="$complete EOL"
43453   arguments="${tmp#* }"
43454 
43455   # Input might be given as Windows format, start by converting to
43456   # unix format.
43457   new_path="$path"
43458 
43459   windows_path="$new_path"
43460   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43461     unix_path=`$CYGPATH -u "$windows_path"`
43462     new_path="$unix_path"
43463   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43464     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43465     new_path="$unix_path"
43466   fi
43467 
43468 
43469   # Now try to locate executable using which
43470   new_path=`$WHICH "$new_path" 2> /dev/null`
43471 
43472   if test "x$new_path" = x; then
43473     # Oops. Which didn't find the executable.
43474     # The splitting of arguments from the executable at a space might have been incorrect,
43475     # since paths with space are more likely in Windows. Give it another try with the whole
43476     # argument.
43477     path="$complete"
43478     arguments="EOL"
43479     new_path="$path"
43480 
43481   windows_path="$new_path"
43482   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43483     unix_path=`$CYGPATH -u "$windows_path"`
43484     new_path="$unix_path"
43485   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43486     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43487     new_path="$unix_path"
43488   fi
43489 
43490 
43491     new_path=`$WHICH "$new_path" 2> /dev/null`
43492     # bat and cmd files are not always considered executable in MSYS causing which
43493     # to not find them
43494     if test "x$new_path" = x \
43495         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43496         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43497       new_path="$path"
43498 
43499   windows_path="$new_path"
43500   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43501     unix_path=`$CYGPATH -u "$windows_path"`
43502     new_path="$unix_path"
43503   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43504     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43505     new_path="$unix_path"
43506   fi
43507 
43508     fi
43509 
43510     if test "x$new_path" = x; then
43511       # It's still not found. Now this is an unrecoverable error.
43512       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43513 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43514       has_space=`$ECHO "$complete" | $GREP " "`
43515       if test "x$has_space" != x; then
43516         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43517 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43518       fi
43519       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43520     fi
43521   fi
43522 
43523   # Now new_path has a complete unix path to the binary
43524   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43525     # Keep paths in /bin as-is, but remove trailing .exe if any
43526     new_path="${new_path/%.exe/}"
43527     # Do not save /bin paths to all_fixpath_prefixes!
43528   else
43529     # Not in mixed or Windows style, start by that.
43530     new_path=`cmd //c echo $new_path`
43531 
43532   input_path="$new_path"
43533   # Check if we need to convert this using DOS-style short mode. If the path
43534   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43535   # take no chances and rewrite it.
43536   # Note: m4 eats our [], so we need to use [ and ] instead.
43537   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43538   if test "x$has_forbidden_chars" != x; then
43539     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43540     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43541   fi
43542 
43543     # Output is in $new_path
43544 
43545   windows_path="$new_path"
43546   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43547     unix_path=`$CYGPATH -u "$windows_path"`
43548     new_path="$unix_path"
43549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43550     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43551     new_path="$unix_path"
43552   fi
43553 
43554     # remove trailing .exe if any
43555     new_path="${new_path/%.exe/}"
43556 
43557     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43558     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43559   fi
43560 
43561     else
43562       # We're on a unix platform. Hooray! :)
43563       # First separate the path from the arguments. This will split at the first
43564       # space.
43565       complete="$BUILD_CXX"
43566       path="${complete%% *}"
43567       tmp="$complete EOL"
43568       arguments="${tmp#* }"
43569 
43570       # Cannot rely on the command "which" here since it doesn't always work.
43571       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43572       if test -z "$is_absolute_path"; then
43573         # Path to executable is not absolute. Find it.
43574         IFS_save="$IFS"
43575         IFS=:
43576         for p in $PATH; do
43577           if test -f "$p/$path" && test -x "$p/$path"; then
43578             new_path="$p/$path"
43579             break
43580           fi
43581         done
43582         IFS="$IFS_save"
43583       else
43584         # This is an absolute path, we can use it without further modifications.
43585         new_path="$path"
43586       fi
43587 
43588       if test "x$new_path" = x; then
43589         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43590 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43591         has_space=`$ECHO "$complete" | $GREP " "`
43592         if test "x$has_space" != x; then
43593           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43594 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43595         fi
43596         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43597       fi
43598     fi
43599 
43600     # Now join together the path and the arguments once again
43601     if test "x$arguments" != xEOL; then
43602       new_complete="$new_path ${arguments% *}"
43603     else
43604       new_complete="$new_path"
43605     fi
43606 
43607     if test "x$complete" != "x$new_complete"; then
43608       BUILD_CXX="$new_complete"
43609       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
43610 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
43611     fi
43612   fi
43613 
43614 
43615 
43616   # Publish this variable in the help.
43617 
43618 
43619   if [ -z "${BUILD_NM+x}" ]; then
43620     # The variable is not set by user, try to locate tool using the code snippet
43621     for ac_prog in nm gcc-nm
43622 do
43623   # Extract the first word of "$ac_prog", so it can be a program name with args.
43624 set dummy $ac_prog; ac_word=$2
43625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43626 $as_echo_n "checking for $ac_word... " >&6; }
43627 if ${ac_cv_path_BUILD_NM+:} false; then :
43628   $as_echo_n "(cached) " >&6
43629 else
43630   case $BUILD_NM in
43631   [\\/]* | ?:[\\/]*)
43632   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43633   ;;
43634   *)
43635   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43636 for as_dir in $PATH
43637 do
43638   IFS=$as_save_IFS
43639   test -z "$as_dir" && as_dir=.
43640     for ac_exec_ext in '' $ac_executable_extensions; do
43641   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43642     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43643     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43644     break 2
43645   fi
43646 done
43647   done
43648 IFS=$as_save_IFS
43649 
43650   ;;
43651 esac
43652 fi
43653 BUILD_NM=$ac_cv_path_BUILD_NM
43654 if test -n "$BUILD_NM"; then
43655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43656 $as_echo "$BUILD_NM" >&6; }
43657 else
43658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43659 $as_echo "no" >&6; }
43660 fi
43661 
43662 
43663   test -n "$BUILD_NM" && break
43664 done
43665 
43666   else
43667     # The variable is set, but is it from the command line or the environment?
43668 
43669     # Try to remove the string !BUILD_NM! from our list.
43670     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
43671     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43672       # If it failed, the variable was not from the command line. Ignore it,
43673       # but warn the user (except for BASH, which is always set by the calling BASH).
43674       if test "xBUILD_NM" != xBASH; then
43675         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
43676 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
43677       fi
43678       # Try to locate tool using the code snippet
43679       for ac_prog in nm gcc-nm
43680 do
43681   # Extract the first word of "$ac_prog", so it can be a program name with args.
43682 set dummy $ac_prog; ac_word=$2
43683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43684 $as_echo_n "checking for $ac_word... " >&6; }
43685 if ${ac_cv_path_BUILD_NM+:} false; then :
43686   $as_echo_n "(cached) " >&6
43687 else
43688   case $BUILD_NM in
43689   [\\/]* | ?:[\\/]*)
43690   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43691   ;;
43692   *)
43693   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43694 for as_dir in $PATH
43695 do
43696   IFS=$as_save_IFS
43697   test -z "$as_dir" && as_dir=.
43698     for ac_exec_ext in '' $ac_executable_extensions; do
43699   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43700     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43701     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43702     break 2
43703   fi
43704 done
43705   done
43706 IFS=$as_save_IFS
43707 
43708   ;;
43709 esac
43710 fi
43711 BUILD_NM=$ac_cv_path_BUILD_NM
43712 if test -n "$BUILD_NM"; then
43713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43714 $as_echo "$BUILD_NM" >&6; }
43715 else
43716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43717 $as_echo "no" >&6; }
43718 fi
43719 
43720 
43721   test -n "$BUILD_NM" && break
43722 done
43723 
43724     else
43725       # If it succeeded, then it was overridden by the user. We will use it
43726       # for the tool.
43727 
43728       # First remove it from the list of overridden variables, so we can test
43729       # for unknown variables in the end.
43730       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43731 
43732       # Check if we try to supply an empty value
43733       if test "x$BUILD_NM" = x; then
43734         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
43735 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
43736         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43737 $as_echo_n "checking for BUILD_NM... " >&6; }
43738         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43739 $as_echo "disabled" >&6; }
43740       else
43741         # Check if the provided tool contains a complete path.
43742         tool_specified="$BUILD_NM"
43743         tool_basename="${tool_specified##*/}"
43744         if test "x$tool_basename" = "x$tool_specified"; then
43745           # A command without a complete path is provided, search $PATH.
43746           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
43747 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
43748           # Extract the first word of "$tool_basename", so it can be a program name with args.
43749 set dummy $tool_basename; ac_word=$2
43750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43751 $as_echo_n "checking for $ac_word... " >&6; }
43752 if ${ac_cv_path_BUILD_NM+:} false; then :
43753   $as_echo_n "(cached) " >&6
43754 else
43755   case $BUILD_NM in
43756   [\\/]* | ?:[\\/]*)
43757   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43758   ;;
43759   *)
43760   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43761 for as_dir in $PATH
43762 do
43763   IFS=$as_save_IFS
43764   test -z "$as_dir" && as_dir=.
43765     for ac_exec_ext in '' $ac_executable_extensions; do
43766   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43767     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43769     break 2
43770   fi
43771 done
43772   done
43773 IFS=$as_save_IFS
43774 
43775   ;;
43776 esac
43777 fi
43778 BUILD_NM=$ac_cv_path_BUILD_NM
43779 if test -n "$BUILD_NM"; then
43780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43781 $as_echo "$BUILD_NM" >&6; }
43782 else
43783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43784 $as_echo "no" >&6; }
43785 fi
43786 
43787 
43788           if test "x$BUILD_NM" = x; then
43789             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43790           fi
43791         else
43792           # Otherwise we believe it is a complete path. Use it as it is.
43793           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
43794 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
43795           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43796 $as_echo_n "checking for BUILD_NM... " >&6; }
43797           if test ! -x "$tool_specified"; then
43798             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43799 $as_echo "not found" >&6; }
43800             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43801           fi
43802           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43803 $as_echo "$tool_specified" >&6; }
43804         fi
43805       fi
43806     fi
43807 
43808   fi
43809 
43810 
43811 
43812   # Only process if variable expands to non-empty
43813 
43814   if test "x$BUILD_NM" != x; then
43815     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43816 
43817   # First separate the path from the arguments. This will split at the first
43818   # space.
43819   complete="$BUILD_NM"
43820   path="${complete%% *}"
43821   tmp="$complete EOL"
43822   arguments="${tmp#* }"
43823 
43824   # Input might be given as Windows format, start by converting to
43825   # unix format.
43826   new_path=`$CYGPATH -u "$path"`
43827 
43828   # Now try to locate executable using which
43829   new_path=`$WHICH "$new_path" 2> /dev/null`
43830   # bat and cmd files are not always considered executable in cygwin causing which
43831   # to not find them
43832   if test "x$new_path" = x \
43833       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43834       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43835     new_path=`$CYGPATH -u "$path"`
43836   fi
43837   if test "x$new_path" = x; then
43838     # Oops. Which didn't find the executable.
43839     # The splitting of arguments from the executable at a space might have been incorrect,
43840     # since paths with space are more likely in Windows. Give it another try with the whole
43841     # argument.
43842     path="$complete"
43843     arguments="EOL"
43844     new_path=`$CYGPATH -u "$path"`
43845     new_path=`$WHICH "$new_path" 2> /dev/null`
43846     # bat and cmd files are not always considered executable in cygwin causing which
43847     # to not find them
43848     if test "x$new_path" = x \
43849         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43850         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43851       new_path=`$CYGPATH -u "$path"`
43852     fi
43853     if test "x$new_path" = x; then
43854       # It's still not found. Now this is an unrecoverable error.
43855       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43856 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43857       has_space=`$ECHO "$complete" | $GREP " "`
43858       if test "x$has_space" != x; then
43859         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43860 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43861       fi
43862       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43863     fi
43864   fi
43865 
43866   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43867   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43868   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43869   # "foo.exe" is OK but "foo" is an error.
43870   #
43871   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43872   # It is also a way to make sure we got the proper file name for the real test later on.
43873   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43874   if test "x$test_shortpath" = x; then
43875     # Short path failed, file does not exist as specified.
43876     # Try adding .exe or .cmd
43877     if test -f "${new_path}.exe"; then
43878       input_to_shortpath="${new_path}.exe"
43879     elif test -f "${new_path}.cmd"; then
43880       input_to_shortpath="${new_path}.cmd"
43881     else
43882       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
43883 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
43884       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43885 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43886       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43887     fi
43888   else
43889     input_to_shortpath="$new_path"
43890   fi
43891 
43892   # Call helper function which possibly converts this using DOS-style short mode.
43893   # If so, the updated path is stored in $new_path.
43894   new_path="$input_to_shortpath"
43895 
43896   input_path="$input_to_shortpath"
43897   # Check if we need to convert this using DOS-style short mode. If the path
43898   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43899   # take no chances and rewrite it.
43900   # Note: m4 eats our [], so we need to use [ and ] instead.
43901   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43902   if test "x$has_forbidden_chars" != x; then
43903     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43904     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43905     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43906     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43907       # Going to short mode and back again did indeed matter. Since short mode is
43908       # case insensitive, let's make it lowercase to improve readability.
43909       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43910       # Now convert it back to Unix-style (cygpath)
43911       input_path=`$CYGPATH -u "$shortmode_path"`
43912       new_path="$input_path"
43913     fi
43914   fi
43915 
43916   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43917   if test "x$test_cygdrive_prefix" = x; then
43918     # As a simple fix, exclude /usr/bin since it's not a real path.
43919     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43920       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43921       # a path prefixed by /cygdrive for fixpath to work.
43922       new_path="$CYGWIN_ROOT_PATH$input_path"
43923     fi
43924   fi
43925 
43926   # remove trailing .exe if any
43927   new_path="${new_path/%.exe/}"
43928 
43929     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43930 
43931   # First separate the path from the arguments. This will split at the first
43932   # space.
43933   complete="$BUILD_NM"
43934   path="${complete%% *}"
43935   tmp="$complete EOL"
43936   arguments="${tmp#* }"
43937 
43938   # Input might be given as Windows format, start by converting to
43939   # unix format.
43940   new_path="$path"
43941 
43942   windows_path="$new_path"
43943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43944     unix_path=`$CYGPATH -u "$windows_path"`
43945     new_path="$unix_path"
43946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43947     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43948     new_path="$unix_path"
43949   fi
43950 
43951 
43952   # Now try to locate executable using which
43953   new_path=`$WHICH "$new_path" 2> /dev/null`
43954 
43955   if test "x$new_path" = x; then
43956     # Oops. Which didn't find the executable.
43957     # The splitting of arguments from the executable at a space might have been incorrect,
43958     # since paths with space are more likely in Windows. Give it another try with the whole
43959     # argument.
43960     path="$complete"
43961     arguments="EOL"
43962     new_path="$path"
43963 
43964   windows_path="$new_path"
43965   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43966     unix_path=`$CYGPATH -u "$windows_path"`
43967     new_path="$unix_path"
43968   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43969     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43970     new_path="$unix_path"
43971   fi
43972 
43973 
43974     new_path=`$WHICH "$new_path" 2> /dev/null`
43975     # bat and cmd files are not always considered executable in MSYS causing which
43976     # to not find them
43977     if test "x$new_path" = x \
43978         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43979         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43980       new_path="$path"
43981 
43982   windows_path="$new_path"
43983   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43984     unix_path=`$CYGPATH -u "$windows_path"`
43985     new_path="$unix_path"
43986   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43987     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43988     new_path="$unix_path"
43989   fi
43990 
43991     fi
43992 
43993     if test "x$new_path" = x; then
43994       # It's still not found. Now this is an unrecoverable error.
43995       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43996 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43997       has_space=`$ECHO "$complete" | $GREP " "`
43998       if test "x$has_space" != x; then
43999         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44000 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44001       fi
44002       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44003     fi
44004   fi
44005 
44006   # Now new_path has a complete unix path to the binary
44007   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44008     # Keep paths in /bin as-is, but remove trailing .exe if any
44009     new_path="${new_path/%.exe/}"
44010     # Do not save /bin paths to all_fixpath_prefixes!
44011   else
44012     # Not in mixed or Windows style, start by that.
44013     new_path=`cmd //c echo $new_path`
44014 
44015   input_path="$new_path"
44016   # Check if we need to convert this using DOS-style short mode. If the path
44017   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44018   # take no chances and rewrite it.
44019   # Note: m4 eats our [], so we need to use [ and ] instead.
44020   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44021   if test "x$has_forbidden_chars" != x; then
44022     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44023     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44024   fi
44025 
44026     # Output is in $new_path
44027 
44028   windows_path="$new_path"
44029   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44030     unix_path=`$CYGPATH -u "$windows_path"`
44031     new_path="$unix_path"
44032   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44033     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44034     new_path="$unix_path"
44035   fi
44036 
44037     # remove trailing .exe if any
44038     new_path="${new_path/%.exe/}"
44039 
44040     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44041     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44042   fi
44043 
44044     else
44045       # We're on a unix platform. Hooray! :)
44046       # First separate the path from the arguments. This will split at the first
44047       # space.
44048       complete="$BUILD_NM"
44049       path="${complete%% *}"
44050       tmp="$complete EOL"
44051       arguments="${tmp#* }"
44052 
44053       # Cannot rely on the command "which" here since it doesn't always work.
44054       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44055       if test -z "$is_absolute_path"; then
44056         # Path to executable is not absolute. Find it.
44057         IFS_save="$IFS"
44058         IFS=:
44059         for p in $PATH; do
44060           if test -f "$p/$path" && test -x "$p/$path"; then
44061             new_path="$p/$path"
44062             break
44063           fi
44064         done
44065         IFS="$IFS_save"
44066       else
44067         # This is an absolute path, we can use it without further modifications.
44068         new_path="$path"
44069       fi
44070 
44071       if test "x$new_path" = x; then
44072         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44073 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44074         has_space=`$ECHO "$complete" | $GREP " "`
44075         if test "x$has_space" != x; then
44076           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44077 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44078         fi
44079         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44080       fi
44081     fi
44082 
44083     # Now join together the path and the arguments once again
44084     if test "x$arguments" != xEOL; then
44085       new_complete="$new_path ${arguments% *}"
44086     else
44087       new_complete="$new_path"
44088     fi
44089 
44090     if test "x$complete" != "x$new_complete"; then
44091       BUILD_NM="$new_complete"
44092       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44093 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44094     fi
44095   fi
44096 
44097 
44098 
44099   # Publish this variable in the help.
44100 
44101 
44102   if [ -z "${BUILD_AR+x}" ]; then
44103     # The variable is not set by user, try to locate tool using the code snippet
44104     for ac_prog in ar gcc-ar
44105 do
44106   # Extract the first word of "$ac_prog", so it can be a program name with args.
44107 set dummy $ac_prog; ac_word=$2
44108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44109 $as_echo_n "checking for $ac_word... " >&6; }
44110 if ${ac_cv_path_BUILD_AR+:} false; then :
44111   $as_echo_n "(cached) " >&6
44112 else
44113   case $BUILD_AR in
44114   [\\/]* | ?:[\\/]*)
44115   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44116   ;;
44117   *)
44118   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44119 for as_dir in $PATH
44120 do
44121   IFS=$as_save_IFS
44122   test -z "$as_dir" && as_dir=.
44123     for ac_exec_ext in '' $ac_executable_extensions; do
44124   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44125     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44126     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44127     break 2
44128   fi
44129 done
44130   done
44131 IFS=$as_save_IFS
44132 
44133   ;;
44134 esac
44135 fi
44136 BUILD_AR=$ac_cv_path_BUILD_AR
44137 if test -n "$BUILD_AR"; then
44138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44139 $as_echo "$BUILD_AR" >&6; }
44140 else
44141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44142 $as_echo "no" >&6; }
44143 fi
44144 
44145 
44146   test -n "$BUILD_AR" && break
44147 done
44148 
44149   else
44150     # The variable is set, but is it from the command line or the environment?
44151 
44152     # Try to remove the string !BUILD_AR! from our list.
44153     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44154     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44155       # If it failed, the variable was not from the command line. Ignore it,
44156       # but warn the user (except for BASH, which is always set by the calling BASH).
44157       if test "xBUILD_AR" != xBASH; then
44158         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44159 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44160       fi
44161       # Try to locate tool using the code snippet
44162       for ac_prog in ar gcc-ar
44163 do
44164   # Extract the first word of "$ac_prog", so it can be a program name with args.
44165 set dummy $ac_prog; ac_word=$2
44166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44167 $as_echo_n "checking for $ac_word... " >&6; }
44168 if ${ac_cv_path_BUILD_AR+:} false; then :
44169   $as_echo_n "(cached) " >&6
44170 else
44171   case $BUILD_AR in
44172   [\\/]* | ?:[\\/]*)
44173   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44174   ;;
44175   *)
44176   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44177 for as_dir in $PATH
44178 do
44179   IFS=$as_save_IFS
44180   test -z "$as_dir" && as_dir=.
44181     for ac_exec_ext in '' $ac_executable_extensions; do
44182   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44183     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44185     break 2
44186   fi
44187 done
44188   done
44189 IFS=$as_save_IFS
44190 
44191   ;;
44192 esac
44193 fi
44194 BUILD_AR=$ac_cv_path_BUILD_AR
44195 if test -n "$BUILD_AR"; then
44196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44197 $as_echo "$BUILD_AR" >&6; }
44198 else
44199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44200 $as_echo "no" >&6; }
44201 fi
44202 
44203 
44204   test -n "$BUILD_AR" && break
44205 done
44206 
44207     else
44208       # If it succeeded, then it was overridden by the user. We will use it
44209       # for the tool.
44210 
44211       # First remove it from the list of overridden variables, so we can test
44212       # for unknown variables in the end.
44213       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44214 
44215       # Check if we try to supply an empty value
44216       if test "x$BUILD_AR" = x; then
44217         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44218 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44219         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44220 $as_echo_n "checking for BUILD_AR... " >&6; }
44221         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44222 $as_echo "disabled" >&6; }
44223       else
44224         # Check if the provided tool contains a complete path.
44225         tool_specified="$BUILD_AR"
44226         tool_basename="${tool_specified##*/}"
44227         if test "x$tool_basename" = "x$tool_specified"; then
44228           # A command without a complete path is provided, search $PATH.
44229           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44230 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44231           # Extract the first word of "$tool_basename", so it can be a program name with args.
44232 set dummy $tool_basename; ac_word=$2
44233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44234 $as_echo_n "checking for $ac_word... " >&6; }
44235 if ${ac_cv_path_BUILD_AR+:} false; then :
44236   $as_echo_n "(cached) " >&6
44237 else
44238   case $BUILD_AR in
44239   [\\/]* | ?:[\\/]*)
44240   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44241   ;;
44242   *)
44243   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44244 for as_dir in $PATH
44245 do
44246   IFS=$as_save_IFS
44247   test -z "$as_dir" && as_dir=.
44248     for ac_exec_ext in '' $ac_executable_extensions; do
44249   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44250     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44251     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44252     break 2
44253   fi
44254 done
44255   done
44256 IFS=$as_save_IFS
44257 
44258   ;;
44259 esac
44260 fi
44261 BUILD_AR=$ac_cv_path_BUILD_AR
44262 if test -n "$BUILD_AR"; then
44263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44264 $as_echo "$BUILD_AR" >&6; }
44265 else
44266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44267 $as_echo "no" >&6; }
44268 fi
44269 
44270 
44271           if test "x$BUILD_AR" = x; then
44272             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44273           fi
44274         else
44275           # Otherwise we believe it is a complete path. Use it as it is.
44276           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44277 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44278           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44279 $as_echo_n "checking for BUILD_AR... " >&6; }
44280           if test ! -x "$tool_specified"; then
44281             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44282 $as_echo "not found" >&6; }
44283             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44284           fi
44285           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44286 $as_echo "$tool_specified" >&6; }
44287         fi
44288       fi
44289     fi
44290 
44291   fi
44292 
44293 
44294 
44295   # Only process if variable expands to non-empty
44296 
44297   if test "x$BUILD_AR" != x; then
44298     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44299 
44300   # First separate the path from the arguments. This will split at the first
44301   # space.
44302   complete="$BUILD_AR"
44303   path="${complete%% *}"
44304   tmp="$complete EOL"
44305   arguments="${tmp#* }"
44306 
44307   # Input might be given as Windows format, start by converting to
44308   # unix format.
44309   new_path=`$CYGPATH -u "$path"`
44310 
44311   # Now try to locate executable using which
44312   new_path=`$WHICH "$new_path" 2> /dev/null`
44313   # bat and cmd files are not always considered executable in cygwin causing which
44314   # to not find them
44315   if test "x$new_path" = x \
44316       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44317       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44318     new_path=`$CYGPATH -u "$path"`
44319   fi
44320   if test "x$new_path" = x; then
44321     # Oops. Which didn't find the executable.
44322     # The splitting of arguments from the executable at a space might have been incorrect,
44323     # since paths with space are more likely in Windows. Give it another try with the whole
44324     # argument.
44325     path="$complete"
44326     arguments="EOL"
44327     new_path=`$CYGPATH -u "$path"`
44328     new_path=`$WHICH "$new_path" 2> /dev/null`
44329     # bat and cmd files are not always considered executable in cygwin causing which
44330     # to not find them
44331     if test "x$new_path" = x \
44332         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44333         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44334       new_path=`$CYGPATH -u "$path"`
44335     fi
44336     if test "x$new_path" = x; then
44337       # It's still not found. Now this is an unrecoverable error.
44338       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44339 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44340       has_space=`$ECHO "$complete" | $GREP " "`
44341       if test "x$has_space" != x; then
44342         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44343 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44344       fi
44345       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44346     fi
44347   fi
44348 
44349   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44350   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44351   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44352   # "foo.exe" is OK but "foo" is an error.
44353   #
44354   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44355   # It is also a way to make sure we got the proper file name for the real test later on.
44356   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44357   if test "x$test_shortpath" = x; then
44358     # Short path failed, file does not exist as specified.
44359     # Try adding .exe or .cmd
44360     if test -f "${new_path}.exe"; then
44361       input_to_shortpath="${new_path}.exe"
44362     elif test -f "${new_path}.cmd"; then
44363       input_to_shortpath="${new_path}.cmd"
44364     else
44365       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
44366 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
44367       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44368 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44369       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44370     fi
44371   else
44372     input_to_shortpath="$new_path"
44373   fi
44374 
44375   # Call helper function which possibly converts this using DOS-style short mode.
44376   # If so, the updated path is stored in $new_path.
44377   new_path="$input_to_shortpath"
44378 
44379   input_path="$input_to_shortpath"
44380   # Check if we need to convert this using DOS-style short mode. If the path
44381   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44382   # take no chances and rewrite it.
44383   # Note: m4 eats our [], so we need to use [ and ] instead.
44384   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44385   if test "x$has_forbidden_chars" != x; then
44386     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44387     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44388     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44389     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44390       # Going to short mode and back again did indeed matter. Since short mode is
44391       # case insensitive, let's make it lowercase to improve readability.
44392       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44393       # Now convert it back to Unix-style (cygpath)
44394       input_path=`$CYGPATH -u "$shortmode_path"`
44395       new_path="$input_path"
44396     fi
44397   fi
44398 
44399   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44400   if test "x$test_cygdrive_prefix" = x; then
44401     # As a simple fix, exclude /usr/bin since it's not a real path.
44402     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44403       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44404       # a path prefixed by /cygdrive for fixpath to work.
44405       new_path="$CYGWIN_ROOT_PATH$input_path"
44406     fi
44407   fi
44408 
44409   # remove trailing .exe if any
44410   new_path="${new_path/%.exe/}"
44411 
44412     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44413 
44414   # First separate the path from the arguments. This will split at the first
44415   # space.
44416   complete="$BUILD_AR"
44417   path="${complete%% *}"
44418   tmp="$complete EOL"
44419   arguments="${tmp#* }"
44420 
44421   # Input might be given as Windows format, start by converting to
44422   # unix format.
44423   new_path="$path"
44424 
44425   windows_path="$new_path"
44426   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44427     unix_path=`$CYGPATH -u "$windows_path"`
44428     new_path="$unix_path"
44429   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44430     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44431     new_path="$unix_path"
44432   fi
44433 
44434 
44435   # Now try to locate executable using which
44436   new_path=`$WHICH "$new_path" 2> /dev/null`
44437 
44438   if test "x$new_path" = x; then
44439     # Oops. Which didn't find the executable.
44440     # The splitting of arguments from the executable at a space might have been incorrect,
44441     # since paths with space are more likely in Windows. Give it another try with the whole
44442     # argument.
44443     path="$complete"
44444     arguments="EOL"
44445     new_path="$path"
44446 
44447   windows_path="$new_path"
44448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44449     unix_path=`$CYGPATH -u "$windows_path"`
44450     new_path="$unix_path"
44451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44452     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44453     new_path="$unix_path"
44454   fi
44455 
44456 
44457     new_path=`$WHICH "$new_path" 2> /dev/null`
44458     # bat and cmd files are not always considered executable in MSYS causing which
44459     # to not find them
44460     if test "x$new_path" = x \
44461         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44462         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44463       new_path="$path"
44464 
44465   windows_path="$new_path"
44466   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44467     unix_path=`$CYGPATH -u "$windows_path"`
44468     new_path="$unix_path"
44469   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44470     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44471     new_path="$unix_path"
44472   fi
44473 
44474     fi
44475 
44476     if test "x$new_path" = x; then
44477       # It's still not found. Now this is an unrecoverable error.
44478       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44479 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44480       has_space=`$ECHO "$complete" | $GREP " "`
44481       if test "x$has_space" != x; then
44482         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44483 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44484       fi
44485       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44486     fi
44487   fi
44488 
44489   # Now new_path has a complete unix path to the binary
44490   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44491     # Keep paths in /bin as-is, but remove trailing .exe if any
44492     new_path="${new_path/%.exe/}"
44493     # Do not save /bin paths to all_fixpath_prefixes!
44494   else
44495     # Not in mixed or Windows style, start by that.
44496     new_path=`cmd //c echo $new_path`
44497 
44498   input_path="$new_path"
44499   # Check if we need to convert this using DOS-style short mode. If the path
44500   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44501   # take no chances and rewrite it.
44502   # Note: m4 eats our [], so we need to use [ and ] instead.
44503   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44504   if test "x$has_forbidden_chars" != x; then
44505     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44506     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44507   fi
44508 
44509     # Output is in $new_path
44510 
44511   windows_path="$new_path"
44512   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44513     unix_path=`$CYGPATH -u "$windows_path"`
44514     new_path="$unix_path"
44515   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44516     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44517     new_path="$unix_path"
44518   fi
44519 
44520     # remove trailing .exe if any
44521     new_path="${new_path/%.exe/}"
44522 
44523     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44524     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44525   fi
44526 
44527     else
44528       # We're on a unix platform. Hooray! :)
44529       # First separate the path from the arguments. This will split at the first
44530       # space.
44531       complete="$BUILD_AR"
44532       path="${complete%% *}"
44533       tmp="$complete EOL"
44534       arguments="${tmp#* }"
44535 
44536       # Cannot rely on the command "which" here since it doesn't always work.
44537       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44538       if test -z "$is_absolute_path"; then
44539         # Path to executable is not absolute. Find it.
44540         IFS_save="$IFS"
44541         IFS=:
44542         for p in $PATH; do
44543           if test -f "$p/$path" && test -x "$p/$path"; then
44544             new_path="$p/$path"
44545             break
44546           fi
44547         done
44548         IFS="$IFS_save"
44549       else
44550         # This is an absolute path, we can use it without further modifications.
44551         new_path="$path"
44552       fi
44553 
44554       if test "x$new_path" = x; then
44555         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44556 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44557         has_space=`$ECHO "$complete" | $GREP " "`
44558         if test "x$has_space" != x; then
44559           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44560 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44561         fi
44562         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44563       fi
44564     fi
44565 
44566     # Now join together the path and the arguments once again
44567     if test "x$arguments" != xEOL; then
44568       new_complete="$new_path ${arguments% *}"
44569     else
44570       new_complete="$new_path"
44571     fi
44572 
44573     if test "x$complete" != "x$new_complete"; then
44574       BUILD_AR="$new_complete"
44575       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
44576 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
44577     fi
44578   fi
44579 
44580     # Assume the C compiler is the assembler
44581     BUILD_AS="$BUILD_CC -c"
44582     # Just like for the target compiler, use the compiler as linker
44583     BUILD_LD="$BUILD_CC"
44584 
44585     PATH="$OLDPATH"
44586   else
44587     # If we are not cross compiling, use the normal target compilers for
44588     # building the build platform executables.
44589     BUILD_CC="$CC"
44590     BUILD_CXX="$CXX"
44591     BUILD_LD="$LD"
44592     BUILD_NM="$NM"
44593     BUILD_AS="$AS"
44594     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
44595     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
44596     BUILD_AR="$AR"
44597   fi
44598 
44599 
44600 
44601 
44602 
44603 
44604 
44605 
44606 
44607 
44608 
44609   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44610     # For hotspot, we need these in Windows mixed path,
44611     # so rewrite them all. Need added .exe suffix.
44612     HOTSPOT_CXX="$CXX.exe"
44613     HOTSPOT_LD="$LD.exe"
44614     HOTSPOT_MT="$MT.exe"
44615     HOTSPOT_RC="$RC.exe"
44616 
44617   unix_path="$HOTSPOT_CXX"
44618   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44619     windows_path=`$CYGPATH -m "$unix_path"`
44620     HOTSPOT_CXX="$windows_path"
44621   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44622     windows_path=`cmd //c echo $unix_path`
44623     HOTSPOT_CXX="$windows_path"
44624   fi
44625 
44626 
44627   unix_path="$HOTSPOT_LD"
44628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44629     windows_path=`$CYGPATH -m "$unix_path"`
44630     HOTSPOT_LD="$windows_path"
44631   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44632     windows_path=`cmd //c echo $unix_path`
44633     HOTSPOT_LD="$windows_path"
44634   fi
44635 
44636 
44637   unix_path="$HOTSPOT_MT"
44638   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44639     windows_path=`$CYGPATH -m "$unix_path"`
44640     HOTSPOT_MT="$windows_path"
44641   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44642     windows_path=`cmd //c echo $unix_path`
44643     HOTSPOT_MT="$windows_path"
44644   fi
44645 
44646 
44647   unix_path="$HOTSPOT_RC"
44648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44649     windows_path=`$CYGPATH -m "$unix_path"`
44650     HOTSPOT_RC="$windows_path"
44651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44652     windows_path=`cmd //c echo $unix_path`
44653     HOTSPOT_RC="$windows_path"
44654   fi
44655 
44656 
44657 
44658   else
44659     HOTSPOT_CXX="$CXX"
44660     HOTSPOT_LD="$LD"
44661   fi
44662 
44663 
44664 
44665   if test  "x$TOOLCHAIN_TYPE" = xclang; then
44666     USE_CLANG=true
44667   fi
44668 
44669 
44670 
44671 
44672 
44673   # The package path is used only on macosx?
44674   # FIXME: clean this up, and/or move it elsewhere.
44675   PACKAGE_PATH=/opt/local
44676 
44677 
44678   # Check for extra potential brokenness.
44679   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44680     # On Windows, double-check that we got the right compiler.
44681     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
44682     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
44683     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
44684       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
44685         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
44686       fi
44687     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
44688       if test "x$COMPILER_CPU_TEST" != "xx64"; then
44689         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
44690       fi
44691     fi
44692   fi
44693 
44694   if test "x$TOOLCHAIN_TYPE" = xgcc; then
44695     # If this is a --hash-style=gnu system, use --hash-style=both, why?
44696     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
44697     # This is later checked when setting flags.
44698 
44699     # "-Og" suppported for GCC 4.8 and later
44700     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
44701 
44702   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
44703 $as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
44704   supports=yes
44705 
44706   saved_cflags="$CFLAGS"
44707   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
44708   ac_ext=c
44709 ac_cpp='$CPP $CPPFLAGS'
44710 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44711 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44712 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44713 
44714   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44715 /* end confdefs.h.  */
44716 int i;
44717 _ACEOF
44718 if ac_fn_c_try_compile "$LINENO"; then :
44719 
44720 else
44721   supports=no
44722 fi
44723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44724   ac_ext=cpp
44725 ac_cpp='$CXXCPP $CPPFLAGS'
44726 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44727 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44728 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44729 
44730   CFLAGS="$saved_cflags"
44731 
44732   saved_cxxflags="$CXXFLAGS"
44733   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
44734   ac_ext=cpp
44735 ac_cpp='$CXXCPP $CPPFLAGS'
44736 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44737 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44738 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44739 
44740   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44741 /* end confdefs.h.  */
44742 int i;
44743 _ACEOF
44744 if ac_fn_cxx_try_compile "$LINENO"; then :
44745 
44746 else
44747   supports=no
44748 fi
44749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44750   ac_ext=cpp
44751 ac_cpp='$CXXCPP $CPPFLAGS'
44752 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44753 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44754 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44755 
44756   CXXFLAGS="$saved_cxxflags"
44757 
44758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44759 $as_echo "$supports" >&6; }
44760   if test "x$supports" = "xyes" ; then
44761     HAS_CFLAG_OPTIMIZE_DEBUG=true
44762   else
44763     HAS_CFLAG_OPTIMIZE_DEBUG=false
44764   fi
44765 
44766 
44767     # "-z relro" supported in GNU binutils 2.17 and later
44768     LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
44769 
44770   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
44771 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
44772   supports=yes
44773 
44774   saved_ldflags="$LDFLAGS"
44775   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
44776   ac_ext=c
44777 ac_cpp='$CPP $CPPFLAGS'
44778 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44779 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44780 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44781 
44782   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44783 /* end confdefs.h.  */
44784 
44785 int
44786 main ()
44787 {
44788 
44789   ;
44790   return 0;
44791 }
44792 _ACEOF
44793 if ac_fn_c_try_link "$LINENO"; then :
44794 
44795 else
44796   supports=no
44797 fi
44798 rm -f core conftest.err conftest.$ac_objext \
44799     conftest$ac_exeext conftest.$ac_ext
44800   ac_ext=cpp
44801 ac_cpp='$CXXCPP $CPPFLAGS'
44802 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44803 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44804 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44805 
44806   LDFLAGS="$saved_ldflags"
44807 
44808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44809 $as_echo "$supports" >&6; }
44810   if test "x$supports" = "xyes" ; then
44811     HAS_LINKER_RELRO=true
44812   else
44813     HAS_LINKER_RELRO=false
44814   fi
44815 
44816 
44817     # "-z now" supported in GNU binutils 2.11 and later
44818     LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
44819 
44820   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
44821 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
44822   supports=yes
44823 
44824   saved_ldflags="$LDFLAGS"
44825   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
44826   ac_ext=c
44827 ac_cpp='$CPP $CPPFLAGS'
44828 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44829 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44830 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44831 
44832   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44833 /* end confdefs.h.  */
44834 
44835 int
44836 main ()
44837 {
44838 
44839   ;
44840   return 0;
44841 }
44842 _ACEOF
44843 if ac_fn_c_try_link "$LINENO"; then :
44844 
44845 else
44846   supports=no
44847 fi
44848 rm -f core conftest.err conftest.$ac_objext \
44849     conftest$ac_exeext conftest.$ac_ext
44850   ac_ext=cpp
44851 ac_cpp='$CXXCPP $CPPFLAGS'
44852 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44853 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44854 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44855 
44856   LDFLAGS="$saved_ldflags"
44857 
44858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44859 $as_echo "$supports" >&6; }
44860   if test "x$supports" = "xyes" ; then
44861     HAS_LINKER_NOW=true
44862   else
44863     HAS_LINKER_NOW=false
44864   fi
44865 
44866   fi
44867 
44868   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
44869   # in executable.'
44870   USING_BROKEN_SUSE_LD=no
44871   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
44872     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
44873 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
44874     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
44875     $ECHO "int main() { }" > main.c
44876     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
44877       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44878 $as_echo "no" >&6; }
44879       USING_BROKEN_SUSE_LD=no
44880     else
44881       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44882 $as_echo "yes" >&6; }
44883       USING_BROKEN_SUSE_LD=yes
44884     fi
44885     rm -rf version-script.map main.c a.out
44886   fi
44887 
44888 
44889 
44890 # Setup the JTReg Regression Test Harness.
44891 
44892 
44893 # Check whether --with-jtreg was given.
44894 if test "${with_jtreg+set}" = set; then :
44895   withval=$with_jtreg;
44896 else
44897   with_jtreg=no
44898 fi
44899 
44900 
44901   if test "x$with_jtreg" = xno; then
44902     # jtreg disabled
44903     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
44904 $as_echo_n "checking for jtreg... " >&6; }
44905     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44906 $as_echo "no" >&6; }
44907   else
44908     if test "x$with_jtreg" != xyes; then
44909       # with path specified.
44910       JT_HOME="$with_jtreg"
44911     fi
44912 
44913     if test "x$JT_HOME" != x; then
44914       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
44915 $as_echo_n "checking for jtreg... " >&6; }
44916 
44917       # use JT_HOME enviroment var.
44918 
44919   # Only process if variable expands to non-empty
44920 
44921   if test "x$JT_HOME" != x; then
44922     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44923 
44924   # Input might be given as Windows format, start by converting to
44925   # unix format.
44926   path="$JT_HOME"
44927   new_path=`$CYGPATH -u "$path"`
44928 
44929   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44930   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44931   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44932   # "foo.exe" is OK but "foo" is an error.
44933   #
44934   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44935   # It is also a way to make sure we got the proper file name for the real test later on.
44936   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44937   if test "x$test_shortpath" = x; then
44938     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
44939 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
44940     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
44941   fi
44942 
44943   # Call helper function which possibly converts this using DOS-style short mode.
44944   # If so, the updated path is stored in $new_path.
44945 
44946   input_path="$new_path"
44947   # Check if we need to convert this using DOS-style short mode. If the path
44948   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44949   # take no chances and rewrite it.
44950   # Note: m4 eats our [], so we need to use [ and ] instead.
44951   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44952   if test "x$has_forbidden_chars" != x; then
44953     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44954     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44955     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44956     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44957       # Going to short mode and back again did indeed matter. Since short mode is
44958       # case insensitive, let's make it lowercase to improve readability.
44959       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44960       # Now convert it back to Unix-style (cygpath)
44961       input_path=`$CYGPATH -u "$shortmode_path"`
44962       new_path="$input_path"
44963     fi
44964   fi
44965 
44966   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44967   if test "x$test_cygdrive_prefix" = x; then
44968     # As a simple fix, exclude /usr/bin since it's not a real path.
44969     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44970       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44971       # a path prefixed by /cygdrive for fixpath to work.
44972       new_path="$CYGWIN_ROOT_PATH$input_path"
44973     fi
44974   fi
44975 
44976 
44977   if test "x$path" != "x$new_path"; then
44978     JT_HOME="$new_path"
44979     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
44980 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
44981   fi
44982 
44983     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44984 
44985   path="$JT_HOME"
44986   has_colon=`$ECHO $path | $GREP ^.:`
44987   new_path="$path"
44988   if test "x$has_colon" = x; then
44989     # Not in mixed or Windows style, start by that.
44990     new_path=`cmd //c echo $path`
44991   fi
44992 
44993 
44994   input_path="$new_path"
44995   # Check if we need to convert this using DOS-style short mode. If the path
44996   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44997   # take no chances and rewrite it.
44998   # Note: m4 eats our [], so we need to use [ and ] instead.
44999   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45000   if test "x$has_forbidden_chars" != x; then
45001     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45002     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45003   fi
45004 
45005 
45006   windows_path="$new_path"
45007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45008     unix_path=`$CYGPATH -u "$windows_path"`
45009     new_path="$unix_path"
45010   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45011     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45012     new_path="$unix_path"
45013   fi
45014 
45015   if test "x$path" != "x$new_path"; then
45016     JT_HOME="$new_path"
45017     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45018 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45019   fi
45020 
45021   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45022   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45023 
45024     else
45025       # We're on a unix platform. Hooray! :)
45026       path="$JT_HOME"
45027       has_space=`$ECHO "$path" | $GREP " "`
45028       if test "x$has_space" != x; then
45029         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45030 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45031         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45032       fi
45033 
45034       # Use eval to expand a potential ~
45035       eval path="$path"
45036       if test ! -f "$path" && test ! -d "$path"; then
45037         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45038       fi
45039 
45040       JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45041     fi
45042   fi
45043 
45044 
45045       # jtreg win32 script works for everybody
45046       JTREGEXE="$JT_HOME/bin/jtreg"
45047 
45048       if test ! -f "$JTREGEXE"; then
45049         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45050       fi
45051 
45052       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45053 $as_echo "$JTREGEXE" >&6; }
45054     else
45055       # try to find jtreg on path
45056 
45057 
45058 
45059   # Publish this variable in the help.
45060 
45061 
45062   if [ -z "${JTREGEXE+x}" ]; then
45063     # The variable is not set by user, try to locate tool using the code snippet
45064     for ac_prog in jtreg
45065 do
45066   # Extract the first word of "$ac_prog", so it can be a program name with args.
45067 set dummy $ac_prog; ac_word=$2
45068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45069 $as_echo_n "checking for $ac_word... " >&6; }
45070 if ${ac_cv_path_JTREGEXE+:} false; then :
45071   $as_echo_n "(cached) " >&6
45072 else
45073   case $JTREGEXE in
45074   [\\/]* | ?:[\\/]*)
45075   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45076   ;;
45077   *)
45078   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45079 for as_dir in $PATH
45080 do
45081   IFS=$as_save_IFS
45082   test -z "$as_dir" && as_dir=.
45083     for ac_exec_ext in '' $ac_executable_extensions; do
45084   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45085     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45086     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45087     break 2
45088   fi
45089 done
45090   done
45091 IFS=$as_save_IFS
45092 
45093   ;;
45094 esac
45095 fi
45096 JTREGEXE=$ac_cv_path_JTREGEXE
45097 if test -n "$JTREGEXE"; then
45098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45099 $as_echo "$JTREGEXE" >&6; }
45100 else
45101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45102 $as_echo "no" >&6; }
45103 fi
45104 
45105 
45106   test -n "$JTREGEXE" && break
45107 done
45108 
45109   else
45110     # The variable is set, but is it from the command line or the environment?
45111 
45112     # Try to remove the string !JTREGEXE! from our list.
45113     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45114     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45115       # If it failed, the variable was not from the command line. Ignore it,
45116       # but warn the user (except for BASH, which is always set by the calling BASH).
45117       if test "xJTREGEXE" != xBASH; then
45118         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45119 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45120       fi
45121       # Try to locate tool using the code snippet
45122       for ac_prog in jtreg
45123 do
45124   # Extract the first word of "$ac_prog", so it can be a program name with args.
45125 set dummy $ac_prog; ac_word=$2
45126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45127 $as_echo_n "checking for $ac_word... " >&6; }
45128 if ${ac_cv_path_JTREGEXE+:} false; then :
45129   $as_echo_n "(cached) " >&6
45130 else
45131   case $JTREGEXE in
45132   [\\/]* | ?:[\\/]*)
45133   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45134   ;;
45135   *)
45136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45137 for as_dir in $PATH
45138 do
45139   IFS=$as_save_IFS
45140   test -z "$as_dir" && as_dir=.
45141     for ac_exec_ext in '' $ac_executable_extensions; do
45142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45143     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45145     break 2
45146   fi
45147 done
45148   done
45149 IFS=$as_save_IFS
45150 
45151   ;;
45152 esac
45153 fi
45154 JTREGEXE=$ac_cv_path_JTREGEXE
45155 if test -n "$JTREGEXE"; then
45156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45157 $as_echo "$JTREGEXE" >&6; }
45158 else
45159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45160 $as_echo "no" >&6; }
45161 fi
45162 
45163 
45164   test -n "$JTREGEXE" && break
45165 done
45166 
45167     else
45168       # If it succeeded, then it was overridden by the user. We will use it
45169       # for the tool.
45170 
45171       # First remove it from the list of overridden variables, so we can test
45172       # for unknown variables in the end.
45173       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45174 
45175       # Check if we try to supply an empty value
45176       if test "x$JTREGEXE" = x; then
45177         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
45178 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
45179         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45180 $as_echo_n "checking for JTREGEXE... " >&6; }
45181         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45182 $as_echo "disabled" >&6; }
45183       else
45184         # Check if the provided tool contains a complete path.
45185         tool_specified="$JTREGEXE"
45186         tool_basename="${tool_specified##*/}"
45187         if test "x$tool_basename" = "x$tool_specified"; then
45188           # A command without a complete path is provided, search $PATH.
45189           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
45190 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
45191           # Extract the first word of "$tool_basename", so it can be a program name with args.
45192 set dummy $tool_basename; ac_word=$2
45193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45194 $as_echo_n "checking for $ac_word... " >&6; }
45195 if ${ac_cv_path_JTREGEXE+:} false; then :
45196   $as_echo_n "(cached) " >&6
45197 else
45198   case $JTREGEXE in
45199   [\\/]* | ?:[\\/]*)
45200   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45201   ;;
45202   *)
45203   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45204 for as_dir in $PATH
45205 do
45206   IFS=$as_save_IFS
45207   test -z "$as_dir" && as_dir=.
45208     for ac_exec_ext in '' $ac_executable_extensions; do
45209   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45210     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45211     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45212     break 2
45213   fi
45214 done
45215   done
45216 IFS=$as_save_IFS
45217 
45218   ;;
45219 esac
45220 fi
45221 JTREGEXE=$ac_cv_path_JTREGEXE
45222 if test -n "$JTREGEXE"; then
45223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45224 $as_echo "$JTREGEXE" >&6; }
45225 else
45226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45227 $as_echo "no" >&6; }
45228 fi
45229 
45230 
45231           if test "x$JTREGEXE" = x; then
45232             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45233           fi
45234         else
45235           # Otherwise we believe it is a complete path. Use it as it is.
45236           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
45237 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
45238           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45239 $as_echo_n "checking for JTREGEXE... " >&6; }
45240           if test ! -x "$tool_specified"; then
45241             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45242 $as_echo "not found" >&6; }
45243             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
45244           fi
45245           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45246 $as_echo "$tool_specified" >&6; }
45247         fi
45248       fi
45249     fi
45250 
45251   fi
45252 
45253 
45254 
45255   if test "x$JTREGEXE" = x; then
45256     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
45257   fi
45258 
45259 
45260       JT_HOME="`$DIRNAME $JTREGEXE`"
45261     fi
45262   fi
45263 
45264 
45265 
45266 
45267 
45268 
45269   # Option used to tell the compiler whether to create 32- or 64-bit executables
45270   if test "x$TOOLCHAIN_TYPE" = xxlc; then
45271     COMPILER_TARGET_BITS_FLAG="-q"
45272   else
45273     COMPILER_TARGET_BITS_FLAG="-m"
45274   fi
45275 
45276 
45277   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
45278   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45279     ARFLAGS="-r"
45280   elif test "x$OPENJDK_TARGET_OS" = xaix; then
45281     ARFLAGS="-X64"
45282   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
45283     # lib.exe is used as AR to create static libraries.
45284     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
45285   else
45286     ARFLAGS=""
45287   fi
45288 
45289 
45290   ## Setup strip.
45291   # FIXME: should this really be per platform, or should it be per toolchain type?
45292   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
45293   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
45294   if test "x$OPENJDK_TARGET_OS" = xlinux; then
45295     STRIPFLAGS="-g"
45296   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
45297     STRIPFLAGS="-x"
45298   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
45299     STRIPFLAGS="-S"
45300   elif test "x$OPENJDK_TARGET_OS" = xaix; then
45301     STRIPFLAGS="-X32_64"
45302   fi
45303 
45304 
45305 
45306   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45307     CC_OUT_OPTION=-Fo
45308     EXE_OUT_OPTION=-out:
45309     LD_OUT_OPTION=-out:
45310     AR_OUT_OPTION=-out:
45311   else
45312     # The option used to specify the target .o,.a or .so file.
45313     # When compiling, how to specify the to be created object file.
45314     CC_OUT_OPTION='-o$(SPACE)'
45315     # When linking, how to specify the to be created executable.
45316     EXE_OUT_OPTION='-o$(SPACE)'
45317     # When linking, how to specify the to be created dynamically linkable library.
45318     LD_OUT_OPTION='-o$(SPACE)'
45319     # When archiving, how to specify the to be create static archive for object files.
45320     AR_OUT_OPTION='rcs$(SPACE)'
45321   fi
45322 
45323 
45324 
45325 
45326 
45327   # On Windows, we need to set RC flags.
45328   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45329     RC_FLAGS="-nologo -l0x409"
45330     if test "x$VARIANT" = xOPT; then
45331       RC_FLAGS="$RC_FLAGS -DNDEBUG"
45332     fi
45333 
45334     # The version variables used to create RC_FLAGS may be overridden
45335     # in a custom configure script, or possibly the command line.
45336     # Let those variables be expanded at make time in spec.gmk.
45337     # The \$ are escaped to the shell, and the $(...) variables
45338     # are evaluated by make.
45339     RC_FLAGS="$RC_FLAGS \
45340         -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
45341         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
45342         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
45343         -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
45344         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
45345         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
45346         -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
45347   fi
45348 
45349 
45350   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45351     # silence copyright notice and other headers.
45352     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
45353   fi
45354 
45355 
45356 # FIXME: Currently we must test this after toolchain but before flags. Fix!
45357 
45358 # Now we can test some aspects on the target using configure macros.
45359 
45360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
45361 $as_echo_n "checking for ANSI C header files... " >&6; }
45362 if ${ac_cv_header_stdc+:} false; then :
45363   $as_echo_n "(cached) " >&6
45364 else
45365   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45366 /* end confdefs.h.  */
45367 #include <stdlib.h>
45368 #include <stdarg.h>
45369 #include <string.h>
45370 #include <float.h>
45371 
45372 int
45373 main ()
45374 {
45375 
45376   ;
45377   return 0;
45378 }
45379 _ACEOF
45380 if ac_fn_cxx_try_compile "$LINENO"; then :
45381   ac_cv_header_stdc=yes
45382 else
45383   ac_cv_header_stdc=no
45384 fi
45385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45386 
45387 if test $ac_cv_header_stdc = yes; then
45388   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
45389   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45390 /* end confdefs.h.  */
45391 #include <string.h>
45392 
45393 _ACEOF
45394 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45395   $EGREP "memchr" >/dev/null 2>&1; then :
45396 
45397 else
45398   ac_cv_header_stdc=no
45399 fi
45400 rm -f conftest*
45401 
45402 fi
45403 
45404 if test $ac_cv_header_stdc = yes; then
45405   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
45406   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45407 /* end confdefs.h.  */
45408 #include <stdlib.h>
45409 
45410 _ACEOF
45411 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45412   $EGREP "free" >/dev/null 2>&1; then :
45413 
45414 else
45415   ac_cv_header_stdc=no
45416 fi
45417 rm -f conftest*
45418 
45419 fi
45420 
45421 if test $ac_cv_header_stdc = yes; then
45422   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
45423   if test "$cross_compiling" = yes; then :
45424   :
45425 else
45426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45427 /* end confdefs.h.  */
45428 #include <ctype.h>
45429 #include <stdlib.h>
45430 #if ((' ' & 0x0FF) == 0x020)
45431 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
45432 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
45433 #else
45434 # define ISLOWER(c) \
45435                    (('a' <= (c) && (c) <= 'i') \
45436                      || ('j' <= (c) && (c) <= 'r') \
45437                      || ('s' <= (c) && (c) <= 'z'))
45438 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
45439 #endif
45440 
45441 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
45442 int
45443 main ()
45444 {
45445   int i;
45446   for (i = 0; i < 256; i++)
45447     if (XOR (islower (i), ISLOWER (i))
45448         || toupper (i) != TOUPPER (i))
45449       return 2;
45450   return 0;
45451 }
45452 _ACEOF
45453 if ac_fn_cxx_try_run "$LINENO"; then :
45454 
45455 else
45456   ac_cv_header_stdc=no
45457 fi
45458 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45459   conftest.$ac_objext conftest.beam conftest.$ac_ext
45460 fi
45461 
45462 fi
45463 fi
45464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
45465 $as_echo "$ac_cv_header_stdc" >&6; }
45466 if test $ac_cv_header_stdc = yes; then
45467 
45468 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
45469 
45470 fi
45471 
45472 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
45473 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
45474                   inttypes.h stdint.h unistd.h
45475 do :
45476   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
45477 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
45478 "
45479 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
45480   cat >>confdefs.h <<_ACEOF
45481 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
45482 _ACEOF
45483 
45484 fi
45485 
45486 done
45487 
45488 
45489 
45490   ###############################################################################
45491   #
45492   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
45493   # (The JVM can use 32 or 64 bit Java pointers but that decision
45494   # is made at runtime.)
45495   #
45496 
45497   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
45498     # Always specify -m flag on Solaris
45499     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
45500 
45501   # When we add flags to the "official" CFLAGS etc, we need to
45502   # keep track of these additions in ADDED_CFLAGS etc. These
45503   # will later be checked to make sure only controlled additions
45504   # have been made to CFLAGS etc.
45505   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45506   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45507   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45508 
45509   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45510   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45511   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45512 
45513   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45514   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45515   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45516 
45517   elif test "x$COMPILE_TYPE" = xreduced; then
45518     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
45519       # Specify -m if running reduced on unix platforms
45520 
45521   # When we add flags to the "official" CFLAGS etc, we need to
45522   # keep track of these additions in ADDED_CFLAGS etc. These
45523   # will later be checked to make sure only controlled additions
45524   # have been made to CFLAGS etc.
45525   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45526   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45527   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45528 
45529   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45530   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45531   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45532 
45533   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45534   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45535   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45536 
45537     fi
45538   fi
45539 
45540   # Make compilation sanity check
45541   for ac_header in stdio.h
45542 do :
45543   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
45544 if test "x$ac_cv_header_stdio_h" = xyes; then :
45545   cat >>confdefs.h <<_ACEOF
45546 #define HAVE_STDIO_H 1
45547 _ACEOF
45548 
45549 else
45550 
45551     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
45552 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
45553     if test "x$COMPILE_TYPE" = xreduced; then
45554 
45555   # Print a helpful message on how to acquire the necessary build dependency.
45556   # reduced is the help tag: freetype, cups, alsa etc
45557   MISSING_DEPENDENCY=reduced
45558 
45559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45560     cygwin_help $MISSING_DEPENDENCY
45561   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45562     msys_help $MISSING_DEPENDENCY
45563   else
45564     PKGHANDLER_COMMAND=
45565 
45566     case $PKGHANDLER in
45567       apt-get)
45568         apt_help     $MISSING_DEPENDENCY ;;
45569       yum)
45570         yum_help     $MISSING_DEPENDENCY ;;
45571       port)
45572         port_help    $MISSING_DEPENDENCY ;;
45573       pkgutil)
45574         pkgutil_help $MISSING_DEPENDENCY ;;
45575       pkgadd)
45576         pkgadd_help  $MISSING_DEPENDENCY ;;
45577     esac
45578 
45579     if test "x$PKGHANDLER_COMMAND" != x; then
45580       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45581     fi
45582   fi
45583 
45584       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45585 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45586     elif test "x$COMPILE_TYPE" = xcross; then
45587       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45588 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45589     fi
45590     as_fn_error $? "Cannot continue." "$LINENO" 5
45591 
45592 fi
45593 
45594 done
45595 
45596 
45597   # The cast to long int works around a bug in the HP C Compiler
45598 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45599 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45600 # This bug is HP SR number 8606223364.
45601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45602 $as_echo_n "checking size of int *... " >&6; }
45603 if ${ac_cv_sizeof_int_p+:} false; then :
45604   $as_echo_n "(cached) " >&6
45605 else
45606   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45607 
45608 else
45609   if test "$ac_cv_type_int_p" = yes; then
45610      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45611 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45612 as_fn_error 77 "cannot compute sizeof (int *)
45613 See \`config.log' for more details" "$LINENO" 5; }
45614    else
45615      ac_cv_sizeof_int_p=0
45616    fi
45617 fi
45618 
45619 fi
45620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45621 $as_echo "$ac_cv_sizeof_int_p" >&6; }
45622 
45623 
45624 
45625 cat >>confdefs.h <<_ACEOF
45626 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
45627 _ACEOF
45628 
45629 
45630 
45631   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
45632   if test "x$ac_cv_sizeof_int_p" = x; then
45633     # The test failed, lets stick to the assumed value.
45634     { $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
45635 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
45636   else
45637     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45638 
45639     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45640       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
45641       # Let's try to implicitely set the compilers target architecture and retry the test
45642       { $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
45643 $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;}
45644       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
45645 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
45646 
45647   # When we add flags to the "official" CFLAGS etc, we need to
45648   # keep track of these additions in ADDED_CFLAGS etc. These
45649   # will later be checked to make sure only controlled additions
45650   # have been made to CFLAGS etc.
45651   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45652   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45653   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45654 
45655   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45656   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45657   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45658 
45659   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45660   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45661   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45662 
45663 
45664       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
45665       unset ac_cv_sizeof_int_p
45666       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
45667       cat >>confdefs.h <<_ACEOF
45668 #undef SIZEOF_INT_P
45669 _ACEOF
45670 
45671       # The cast to long int works around a bug in the HP C Compiler
45672 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45673 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45674 # This bug is HP SR number 8606223364.
45675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45676 $as_echo_n "checking size of int *... " >&6; }
45677 if ${ac_cv_sizeof_int_p+:} false; then :
45678   $as_echo_n "(cached) " >&6
45679 else
45680   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45681 
45682 else
45683   if test "$ac_cv_type_int_p" = yes; then
45684      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45685 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45686 as_fn_error 77 "cannot compute sizeof (int *)
45687 See \`config.log' for more details" "$LINENO" 5; }
45688    else
45689      ac_cv_sizeof_int_p=0
45690    fi
45691 fi
45692 
45693 fi
45694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45695 $as_echo "$ac_cv_sizeof_int_p" >&6; }
45696 
45697 
45698 
45699 cat >>confdefs.h <<_ACEOF
45700 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
45701 _ACEOF
45702 
45703 
45704 
45705       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45706 
45707       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45708         { $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
45709 $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;}
45710         if test "x$COMPILE_TYPE" = xreduced; then
45711 
45712   # Print a helpful message on how to acquire the necessary build dependency.
45713   # reduced is the help tag: freetype, cups, alsa etc
45714   MISSING_DEPENDENCY=reduced
45715 
45716   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45717     cygwin_help $MISSING_DEPENDENCY
45718   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45719     msys_help $MISSING_DEPENDENCY
45720   else
45721     PKGHANDLER_COMMAND=
45722 
45723     case $PKGHANDLER in
45724       apt-get)
45725         apt_help     $MISSING_DEPENDENCY ;;
45726       yum)
45727         yum_help     $MISSING_DEPENDENCY ;;
45728       port)
45729         port_help    $MISSING_DEPENDENCY ;;
45730       pkgutil)
45731         pkgutil_help $MISSING_DEPENDENCY ;;
45732       pkgadd)
45733         pkgadd_help  $MISSING_DEPENDENCY ;;
45734     esac
45735 
45736     if test "x$PKGHANDLER_COMMAND" != x; then
45737       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45738     fi
45739   fi
45740 
45741           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45742 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45743         elif test "x$COMPILE_TYPE" = xcross; then
45744           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45745 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45746         fi
45747         as_fn_error $? "Cannot continue." "$LINENO" 5
45748       fi
45749     fi
45750   fi
45751 
45752   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
45753 $as_echo_n "checking for target address size... " >&6; }
45754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
45755 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
45756 
45757 
45758   ###############################################################################
45759   #
45760   # Is the target little of big endian?
45761   #
45762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
45763 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
45764 if ${ac_cv_c_bigendian+:} false; then :
45765   $as_echo_n "(cached) " >&6
45766 else
45767   ac_cv_c_bigendian=unknown
45768     # See if we're dealing with a universal compiler.
45769     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45770 /* end confdefs.h.  */
45771 #ifndef __APPLE_CC__
45772                not a universal capable compiler
45773              #endif
45774              typedef int dummy;
45775 
45776 _ACEOF
45777 if ac_fn_cxx_try_compile "$LINENO"; then :
45778 
45779         # Check for potential -arch flags.  It is not universal unless
45780         # there are at least two -arch flags with different values.
45781         ac_arch=
45782         ac_prev=
45783         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
45784          if test -n "$ac_prev"; then
45785            case $ac_word in
45786              i?86 | x86_64 | ppc | ppc64)
45787                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
45788                  ac_arch=$ac_word
45789                else
45790                  ac_cv_c_bigendian=universal
45791                  break
45792                fi
45793                ;;
45794            esac
45795            ac_prev=
45796          elif test "x$ac_word" = "x-arch"; then
45797            ac_prev=arch
45798          fi
45799        done
45800 fi
45801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45802     if test $ac_cv_c_bigendian = unknown; then
45803       # See if sys/param.h defines the BYTE_ORDER macro.
45804       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45805 /* end confdefs.h.  */
45806 #include <sys/types.h>
45807              #include <sys/param.h>
45808 
45809 int
45810 main ()
45811 {
45812 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
45813                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
45814                      && LITTLE_ENDIAN)
45815               bogus endian macros
45816              #endif
45817 
45818   ;
45819   return 0;
45820 }
45821 _ACEOF
45822 if ac_fn_cxx_try_compile "$LINENO"; then :
45823   # It does; now see whether it defined to BIG_ENDIAN or not.
45824          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45825 /* end confdefs.h.  */
45826 #include <sys/types.h>
45827                 #include <sys/param.h>
45828 
45829 int
45830 main ()
45831 {
45832 #if BYTE_ORDER != BIG_ENDIAN
45833                  not big endian
45834                 #endif
45835 
45836   ;
45837   return 0;
45838 }
45839 _ACEOF
45840 if ac_fn_cxx_try_compile "$LINENO"; then :
45841   ac_cv_c_bigendian=yes
45842 else
45843   ac_cv_c_bigendian=no
45844 fi
45845 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45846 fi
45847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45848     fi
45849     if test $ac_cv_c_bigendian = unknown; then
45850       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
45851       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45852 /* end confdefs.h.  */
45853 #include <limits.h>
45854 
45855 int
45856 main ()
45857 {
45858 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
45859               bogus endian macros
45860              #endif
45861 
45862   ;
45863   return 0;
45864 }
45865 _ACEOF
45866 if ac_fn_cxx_try_compile "$LINENO"; then :
45867   # It does; now see whether it defined to _BIG_ENDIAN or not.
45868          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45869 /* end confdefs.h.  */
45870 #include <limits.h>
45871 
45872 int
45873 main ()
45874 {
45875 #ifndef _BIG_ENDIAN
45876                  not big endian
45877                 #endif
45878 
45879   ;
45880   return 0;
45881 }
45882 _ACEOF
45883 if ac_fn_cxx_try_compile "$LINENO"; then :
45884   ac_cv_c_bigendian=yes
45885 else
45886   ac_cv_c_bigendian=no
45887 fi
45888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45889 fi
45890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45891     fi
45892     if test $ac_cv_c_bigendian = unknown; then
45893       # Compile a test program.
45894       if test "$cross_compiling" = yes; then :
45895   # Try to guess by grepping values from an object file.
45896          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45897 /* end confdefs.h.  */
45898 short int ascii_mm[] =
45899                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
45900                 short int ascii_ii[] =
45901                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
45902                 int use_ascii (int i) {
45903                   return ascii_mm[i] + ascii_ii[i];
45904                 }
45905                 short int ebcdic_ii[] =
45906                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
45907                 short int ebcdic_mm[] =
45908                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
45909                 int use_ebcdic (int i) {
45910                   return ebcdic_mm[i] + ebcdic_ii[i];
45911                 }
45912                 extern int foo;
45913 
45914 int
45915 main ()
45916 {
45917 return use_ascii (foo) == use_ebcdic (foo);
45918   ;
45919   return 0;
45920 }
45921 _ACEOF
45922 if ac_fn_cxx_try_compile "$LINENO"; then :
45923   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
45924               ac_cv_c_bigendian=yes
45925             fi
45926             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
45927               if test "$ac_cv_c_bigendian" = unknown; then
45928                 ac_cv_c_bigendian=no
45929               else
45930                 # finding both strings is unlikely to happen, but who knows?
45931                 ac_cv_c_bigendian=unknown
45932               fi
45933             fi
45934 fi
45935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45936 else
45937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45938 /* end confdefs.h.  */
45939 $ac_includes_default
45940 int
45941 main ()
45942 {
45943 
45944              /* Are we little or big endian?  From Harbison&Steele.  */
45945              union
45946              {
45947                long int l;
45948                char c[sizeof (long int)];
45949              } u;
45950              u.l = 1;
45951              return u.c[sizeof (long int) - 1] == 1;
45952 
45953   ;
45954   return 0;
45955 }
45956 _ACEOF
45957 if ac_fn_cxx_try_run "$LINENO"; then :
45958   ac_cv_c_bigendian=no
45959 else
45960   ac_cv_c_bigendian=yes
45961 fi
45962 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45963   conftest.$ac_objext conftest.beam conftest.$ac_ext
45964 fi
45965 
45966     fi
45967 fi
45968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
45969 $as_echo "$ac_cv_c_bigendian" >&6; }
45970  case $ac_cv_c_bigendian in #(
45971    yes)
45972      ENDIAN="big";; #(
45973    no)
45974      ENDIAN="little" ;; #(
45975    universal)
45976      ENDIAN="universal_endianness"
45977      ;; #(
45978    *)
45979      ENDIAN="unknown" ;;
45980  esac
45981 
45982 
45983   if test "x$ENDIAN" = xuniversal_endianness; then
45984     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
45985   fi
45986   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
45987     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
45988   fi
45989 
45990 
45991 # Configure flags for the tools
45992 
45993   ###############################################################################
45994   #
45995   # How to compile shared libraries.
45996   #
45997 
45998   if test "x$TOOLCHAIN_TYPE" = xgcc; then
45999     PICFLAG="-fPIC"
46000     C_FLAG_REORDER=''
46001     CXX_FLAG_REORDER=''
46002 
46003     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46004       # Linking is different on MacOSX
46005       if test "x$STATIC_BUILD" = xtrue; then
46006         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46007       else
46008         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46009       fi
46010       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
46011       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46012       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
46013       SET_SHARED_LIBRARY_MAPFILE=''
46014     else
46015       # Default works for linux, might work on other platforms as well.
46016       SHARED_LIBRARY_FLAGS='-shared'
46017       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
46018       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
46019       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
46020       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
46021     fi
46022   elif test "x$TOOLCHAIN_TYPE" = xclang; then
46023     PICFLAG=''
46024     C_FLAG_REORDER=''
46025     CXX_FLAG_REORDER=''
46026 
46027     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46028       # Linking is different on MacOSX
46029       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46030       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
46031       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46032       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
46033       SET_SHARED_LIBRARY_MAPFILE=''
46034     else
46035       # Default works for linux, might work on other platforms as well.
46036       SHARED_LIBRARY_FLAGS='-shared'
46037       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
46038       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
46039       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
46040       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
46041     fi
46042   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46043     PICFLAG="-KPIC"
46044     C_FLAG_REORDER='-xF'
46045     CXX_FLAG_REORDER='-xF'
46046     SHARED_LIBRARY_FLAGS="-G"
46047     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46048     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46049     SET_SHARED_LIBRARY_NAME=''
46050     SET_SHARED_LIBRARY_MAPFILE='-M$1'
46051   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46052     PICFLAG="-qpic=large"
46053     C_FLAG_REORDER=''
46054     CXX_FLAG_REORDER=''
46055     SHARED_LIBRARY_FLAGS="-qmkshrobj"
46056     SET_EXECUTABLE_ORIGIN=""
46057     SET_SHARED_LIBRARY_ORIGIN=''
46058     SET_SHARED_LIBRARY_NAME=''
46059     SET_SHARED_LIBRARY_MAPFILE=''
46060   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46061     PICFLAG=""
46062     C_FLAG_REORDER=''
46063     CXX_FLAG_REORDER=''
46064     SHARED_LIBRARY_FLAGS="-LD"
46065     SET_EXECUTABLE_ORIGIN=''
46066     SET_SHARED_LIBRARY_ORIGIN=''
46067     SET_SHARED_LIBRARY_NAME=''
46068     SET_SHARED_LIBRARY_MAPFILE=''
46069   fi
46070 
46071 
46072 
46073 
46074 
46075 
46076 
46077 
46078   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46079     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46080     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46081     CFLAGS_JDKLIB_EXTRA='-xstrconst'
46082   fi
46083   # The (cross) compiler is now configured, we can now test capabilities
46084   # of the target platform.
46085 
46086 
46087 
46088   ###############################################################################
46089   #
46090   # Setup the opt flags for different compilers
46091   # and different operating systems.
46092   #
46093 
46094   # FIXME: this was indirectly the old default, but just inherited.
46095   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46096   #   C_FLAG_DEPS="-MMD -MF"
46097   # fi
46098 
46099   # Generate make dependency files
46100   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46101     C_FLAG_DEPS="-MMD -MF"
46102   elif test "x$TOOLCHAIN_TYPE" = xclang; then
46103     C_FLAG_DEPS="-MMD -MF"
46104   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46105     C_FLAG_DEPS="-xMMD -xMF"
46106   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46107     C_FLAG_DEPS="-qmakedep=gcc -MF"
46108   fi
46109   CXX_FLAG_DEPS="$C_FLAG_DEPS"
46110 
46111 
46112 
46113   # Debug symbols
46114   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46115     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
46116       # reduce from default "-g2" option to save space
46117       CFLAGS_DEBUG_SYMBOLS="-g1"
46118       CXXFLAGS_DEBUG_SYMBOLS="-g1"
46119     else
46120       CFLAGS_DEBUG_SYMBOLS="-g"
46121       CXXFLAGS_DEBUG_SYMBOLS="-g"
46122     fi
46123   elif test "x$TOOLCHAIN_TYPE" = xclang; then
46124     CFLAGS_DEBUG_SYMBOLS="-g"
46125     CXXFLAGS_DEBUG_SYMBOLS="-g"
46126   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46127     CFLAGS_DEBUG_SYMBOLS="-g -xs"
46128     # FIXME: likely a bug, this disables debug symbols rather than enables them
46129     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
46130   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46131     CFLAGS_DEBUG_SYMBOLS="-g"
46132     CXXFLAGS_DEBUG_SYMBOLS="-g"
46133   fi
46134 
46135 
46136 
46137   # bounds, memory and behavior checking options
46138   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46139     case $DEBUG_LEVEL in
46140     release )
46141       # no adjustment
46142       ;;
46143     fastdebug )
46144       # no adjustment
46145       ;;
46146     slowdebug )
46147       # Add runtime stack smashing and undefined behavior checks.
46148       # Not all versions of gcc support -fstack-protector
46149       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
46150 
46151   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
46152 $as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
46153   supports=yes
46154 
46155   saved_cflags="$CFLAGS"
46156   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
46157   ac_ext=c
46158 ac_cpp='$CPP $CPPFLAGS'
46159 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46160 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46161 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46162 
46163   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46164 /* end confdefs.h.  */
46165 int i;
46166 _ACEOF
46167 if ac_fn_c_try_compile "$LINENO"; then :
46168 
46169 else
46170   supports=no
46171 fi
46172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46173   ac_ext=cpp
46174 ac_cpp='$CXXCPP $CPPFLAGS'
46175 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46176 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46177 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46178 
46179   CFLAGS="$saved_cflags"
46180 
46181   saved_cxxflags="$CXXFLAGS"
46182   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
46183   ac_ext=cpp
46184 ac_cpp='$CXXCPP $CPPFLAGS'
46185 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46186 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46187 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46188 
46189   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46190 /* end confdefs.h.  */
46191 int i;
46192 _ACEOF
46193 if ac_fn_cxx_try_compile "$LINENO"; then :
46194 
46195 else
46196   supports=no
46197 fi
46198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46199   ac_ext=cpp
46200 ac_cpp='$CXXCPP $CPPFLAGS'
46201 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46202 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46203 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46204 
46205   CXXFLAGS="$saved_cxxflags"
46206 
46207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46208 $as_echo "$supports" >&6; }
46209   if test "x$supports" = "xyes" ; then
46210     :
46211   else
46212     STACK_PROTECTOR_CFLAG=""
46213   fi
46214 
46215 
46216       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46217       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46218       ;;
46219     esac
46220   fi
46221 
46222   # Optimization levels
46223   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46224     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
46225 
46226     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
46227       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
46228       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
46229       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
46230       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
46231       C_O_FLAG_DEBUG="-xregs=no%frameptr"
46232       C_O_FLAG_NONE="-xregs=no%frameptr"
46233       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
46234       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
46235       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
46236       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
46237       CXX_O_FLAG_NONE="-xregs=no%frameptr"
46238       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46239         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
46240         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
46241       fi
46242     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46243       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
46244       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46245       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46246       C_O_FLAG_DEBUG=""
46247       C_O_FLAG_NONE=""
46248       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
46249       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46250       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46251       C_O_FLAG_DEBUG=""
46252       CXX_O_FLAG_NONE=""
46253     fi
46254   else
46255     # The remaining toolchains share opt flags between CC and CXX;
46256     # setup for C and duplicate afterwards.
46257     if test "x$TOOLCHAIN_TYPE" = xgcc; then
46258       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46259         # On MacOSX we optimize for size, something
46260         # we should do for all platforms?
46261         C_O_FLAG_HIGHEST="-Os"
46262         C_O_FLAG_HI="-Os"
46263         C_O_FLAG_NORM="-Os"
46264       else
46265         C_O_FLAG_HIGHEST="-O3"
46266         C_O_FLAG_HI="-O3"
46267         C_O_FLAG_NORM="-O2"
46268       fi
46269       C_O_FLAG_DEBUG="-O0"
46270       C_O_FLAG_NONE="-O0"
46271     elif test "x$TOOLCHAIN_TYPE" = xclang; then
46272       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46273         # On MacOSX we optimize for size, something
46274         # we should do for all platforms?
46275         C_O_FLAG_HIGHEST="-Os"
46276         C_O_FLAG_HI="-Os"
46277         C_O_FLAG_NORM="-Os"
46278       else
46279         C_O_FLAG_HIGHEST="-O3"
46280         C_O_FLAG_HI="-O3"
46281         C_O_FLAG_NORM="-O2"
46282       fi
46283       C_O_FLAG_DEBUG="-O0"
46284       C_O_FLAG_NONE="-O0"
46285     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46286       C_O_FLAG_HIGHEST="-O3"
46287       C_O_FLAG_HI="-O3 -qstrict"
46288       C_O_FLAG_NORM="-O2"
46289       C_O_FLAG_DEBUG="-qnoopt"
46290       C_O_FLAG_NONE="-qnoop"
46291     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46292       C_O_FLAG_HIGHEST="-O2"
46293       C_O_FLAG_HI="-O1"
46294       C_O_FLAG_NORM="-O1"
46295       C_O_FLAG_DEBUG="-Od"
46296       C_O_FLAG_NONE="-Od"
46297     fi
46298     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
46299     CXX_O_FLAG_HI="$C_O_FLAG_HI"
46300     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
46301     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
46302     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
46303   fi
46304 
46305   # Adjust optimization flags according to debug level.
46306   case $DEBUG_LEVEL in
46307     release )
46308       # no adjustment
46309       ;;
46310     fastdebug )
46311       # Not quite so much optimization
46312       C_O_FLAG_HI="$C_O_FLAG_NORM"
46313       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
46314       ;;
46315     slowdebug )
46316       # Disable optimization
46317       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
46318       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
46319       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
46320       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
46321       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
46322       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
46323       ;;
46324   esac
46325 
46326 
46327 
46328 
46329 
46330 
46331 
46332 
46333 
46334 
46335 
46336 
46337 
46338   # Special extras...
46339   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46340     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46341       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46342       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46343     fi
46344     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46345     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46346   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46347     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46348     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46349   fi
46350 
46351   CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
46352   CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
46353   LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
46354 
46355   ###############################################################################
46356   #
46357   # Now setup the CFLAGS and LDFLAGS for the JDK build.
46358   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
46359   #
46360 
46361   # Setup compiler/platform specific flags into
46362   #    CFLAGS_JDK    - C Compiler flags
46363   #    CXXFLAGS_JDK  - C++ Compiler flags
46364   #    COMMON_CCXXFLAGS_JDK - common to C and C++
46365   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46366     if test "x$OPENJDK_TARGET_CPU" = xx86; then
46367       # Force compatibility with i586 on 32 bit intel platforms.
46368       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
46369     fi
46370     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
46371         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
46372     case $OPENJDK_TARGET_CPU_ARCH in
46373       arm )
46374         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46375         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46376         ;;
46377       ppc )
46378         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46379         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46380         ;;
46381       * )
46382         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
46383         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46384         ;;
46385     esac
46386   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46387     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
46388     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
46389       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
46390     fi
46391 
46392     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
46393     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
46394   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46395     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46396     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46397   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46398     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
46399         -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
46400         -DWIN32_LEAN_AND_MEAN \
46401         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
46402         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
46403         -DWIN32 -DIAL"
46404     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
46405       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
46406     else
46407       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
46408     fi
46409     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
46410     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
46411     # studio.
46412     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
46413       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46414           -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
46415     fi
46416   fi
46417 
46418   ###############################################################################
46419 
46420   # Adjust flags according to debug level.
46421   case $DEBUG_LEVEL in
46422     fastdebug | slowdebug )
46423       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
46424       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
46425       JAVAC_FLAGS="$JAVAC_FLAGS -g"
46426       ;;
46427     release )
46428       ;;
46429     * )
46430       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46431       ;;
46432   esac
46433 
46434   # Setup LP64
46435   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
46436 
46437   # Set some common defines. These works for all compilers, but assume
46438   # -D is universally accepted.
46439 
46440   # Setup endianness
46441   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
46442     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
46443     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
46444     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
46445     #   Note: -Dmacro         is the same as    #define macro 1
46446     #         -Dmacro=        is the same as    #define macro
46447     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46448       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
46449     else
46450       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
46451     fi
46452   else
46453     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
46454     # are defined in the system?
46455     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46456       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
46457     else
46458       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
46459     fi
46460   fi
46461 
46462   # Setup target OS define. Use OS target name but in upper case.
46463   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
46464   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
46465 
46466   # Setup target CPU
46467   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
46468 
46469   # Setup debug/release defines
46470   if test "x$DEBUG_LEVEL" = xrelease; then
46471     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
46472     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46473       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
46474     fi
46475   else
46476     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
46477   fi
46478 
46479   # Setup release name
46480   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
46481 
46482 
46483   # Set some additional per-OS defines.
46484   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46485     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
46486   elif test "x$OPENJDK_TARGET_OS" = xaix; then
46487     # FIXME: PPC64 should not be here.
46488     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
46489   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
46490     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
46491   fi
46492 
46493   # Additional macosx handling
46494   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46495     # Setting these parameters makes it an error to link to macosx APIs that are
46496     # newer than the given OS version and makes the linked binaries compatible
46497     # even if built on a newer version of the OS.
46498     # The expected format is X.Y.Z
46499     MACOSX_VERSION_MIN=10.7.0
46500 
46501 
46502     # The macro takes the version with no dots, ex: 1070
46503     # Let the flags variables get resolved in make for easier override on make
46504     # command line.
46505     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46506     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46507   fi
46508 
46509   # Setup some hard coded includes
46510   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46511       -I${JDK_TOPDIR}/src/java.base/share/native/include \
46512       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
46513       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
46514       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
46515       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
46516 
46517   # The shared libraries are compiled using the picflag.
46518   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46519   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46520 
46521   # Executable flags
46522   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46523   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46524 
46525 
46526 
46527 
46528 
46529 
46530   # Flags for compiling test libraries
46531   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46532   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46533 
46534   # Flags for compiling test executables
46535   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46536   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46537 
46538 
46539 
46540 
46541 
46542 
46543   # Setup LDFLAGS et al.
46544   #
46545 
46546   # Now this is odd. The JDK native libraries have to link against libjvm.so
46547   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
46548   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
46549   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
46550   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
46551   # libraries will link to whatever is in memory. Yuck.
46552   #
46553   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
46554   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46555     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
46556     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46557       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
46558     fi
46559     # TODO: make -debug optional "--disable-full-debug-symbols"
46560     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
46561   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
46562     # If this is a --hash-style=gnu system, use --hash-style=both, why?
46563     # We have previously set HAS_GNU_HASH if this is the case
46564     if test -n "$HAS_GNU_HASH"; then
46565       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
46566     fi
46567     if test "x$OPENJDK_TARGET_OS" = xlinux; then
46568       # And since we now know that the linker is gnu, then add -z defs, to forbid
46569       # undefined symbols in object files.
46570       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
46571       case $DEBUG_LEVEL in
46572         release )
46573           # tell linker to optimize libraries.
46574           # Should this be supplied to the OSS linker as well?
46575           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
46576           ;;
46577         slowdebug )
46578           if test "x$HAS_LINKER_NOW" = "xtrue"; then
46579             # do relocations at load
46580             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
46581             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
46582           fi
46583           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46584             # mark relocations read only
46585             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46586             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46587           fi
46588           ;;
46589         fastdebug )
46590           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46591             # mark relocations read only
46592             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46593             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46594           fi
46595           ;;
46596         * )
46597           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46598           ;;
46599         esac
46600     fi
46601   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46602     LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
46603     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
46604   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46605     LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
46606   fi
46607 
46608   # Customize LDFLAGS for executables
46609 
46610   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
46611 
46612   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46613     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
46614       LDFLAGS_STACK_SIZE=1048576
46615     else
46616       LDFLAGS_STACK_SIZE=327680
46617     fi
46618     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
46619   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
46620     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
46621   fi
46622 
46623   # Customize LDFLAGS for libs
46624   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
46625 
46626   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46627     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
46628     JDKLIB_LIBS=""
46629   else
46630     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
46631         -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
46632 
46633     # On some platforms (mac) the linker warns about non existing -L dirs.
46634     # Add server first if available. Linking aginst client does not always produce the same results.
46635     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
46636     # Default to server for other variants.
46637     if test "x$JVM_VARIANT_SERVER" = xtrue; then
46638       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46639     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
46640       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
46641     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
46642       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
46643     else
46644       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46645     fi
46646 
46647     JDKLIB_LIBS="-ljava -ljvm"
46648     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46649       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
46650     fi
46651   fi
46652 
46653 
46654 
46655 
46656 
46657 
46658 
46659   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
46660   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
46661 
46662 
46663 
46664 
46665 
46666   # Some Zero and Shark settings.
46667   # ZERO_ARCHFLAG tells the compiler which mode to build for
46668   case "${OPENJDK_TARGET_CPU}" in
46669     s390)
46670       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
46671       ;;
46672     *)
46673       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46674   esac
46675 
46676   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
46677 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
46678   supports=yes
46679 
46680   saved_cflags="$CFLAGS"
46681   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
46682   ac_ext=c
46683 ac_cpp='$CPP $CPPFLAGS'
46684 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46685 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46686 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46687 
46688   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46689 /* end confdefs.h.  */
46690 int i;
46691 _ACEOF
46692 if ac_fn_c_try_compile "$LINENO"; then :
46693 
46694 else
46695   supports=no
46696 fi
46697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46698   ac_ext=cpp
46699 ac_cpp='$CXXCPP $CPPFLAGS'
46700 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46701 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46702 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46703 
46704   CFLAGS="$saved_cflags"
46705 
46706   saved_cxxflags="$CXXFLAGS"
46707   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
46708   ac_ext=cpp
46709 ac_cpp='$CXXCPP $CPPFLAGS'
46710 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46711 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46712 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46713 
46714   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46715 /* end confdefs.h.  */
46716 int i;
46717 _ACEOF
46718 if ac_fn_cxx_try_compile "$LINENO"; then :
46719 
46720 else
46721   supports=no
46722 fi
46723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46724   ac_ext=cpp
46725 ac_cpp='$CXXCPP $CPPFLAGS'
46726 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46727 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46728 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46729 
46730   CXXFLAGS="$saved_cxxflags"
46731 
46732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46733 $as_echo "$supports" >&6; }
46734   if test "x$supports" = "xyes" ; then
46735     :
46736   else
46737     ZERO_ARCHFLAG=""
46738   fi
46739 
46740 
46741 
46742   # Check that the compiler supports -mX (or -qX on AIX) flags
46743   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
46744 
46745   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
46746 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
46747   supports=yes
46748 
46749   saved_cflags="$CFLAGS"
46750   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46751   ac_ext=c
46752 ac_cpp='$CPP $CPPFLAGS'
46753 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46754 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46755 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46756 
46757   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46758 /* end confdefs.h.  */
46759 int i;
46760 _ACEOF
46761 if ac_fn_c_try_compile "$LINENO"; then :
46762 
46763 else
46764   supports=no
46765 fi
46766 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46767   ac_ext=cpp
46768 ac_cpp='$CXXCPP $CPPFLAGS'
46769 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46770 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46771 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46772 
46773   CFLAGS="$saved_cflags"
46774 
46775   saved_cxxflags="$CXXFLAGS"
46776   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46777   ac_ext=cpp
46778 ac_cpp='$CXXCPP $CPPFLAGS'
46779 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46780 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46781 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46782 
46783   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46784 /* end confdefs.h.  */
46785 int i;
46786 _ACEOF
46787 if ac_fn_cxx_try_compile "$LINENO"; then :
46788 
46789 else
46790   supports=no
46791 fi
46792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46793   ac_ext=cpp
46794 ac_cpp='$CXXCPP $CPPFLAGS'
46795 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46796 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46797 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46798 
46799   CXXFLAGS="$saved_cxxflags"
46800 
46801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46802 $as_echo "$supports" >&6; }
46803   if test "x$supports" = "xyes" ; then
46804     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
46805   else
46806     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
46807   fi
46808 
46809 
46810 
46811   # Check whether --enable-warnings-as-errors was given.
46812 if test "${enable_warnings_as_errors+set}" = set; then :
46813   enableval=$enable_warnings_as_errors;
46814 fi
46815 
46816 
46817   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
46818 $as_echo_n "checking if native warnings are errors... " >&6; }
46819   if test "x$enable_warnings_as_errors" = "xyes"; then
46820     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
46821 $as_echo "yes (explicitely set)" >&6; }
46822     WARNINGS_AS_ERRORS=true
46823   elif test "x$enable_warnings_as_errors" = "xno"; then
46824     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46825 $as_echo "no" >&6; }
46826     WARNINGS_AS_ERRORS=false
46827   elif test "x$enable_warnings_as_errors" = "x"; then
46828     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
46829 $as_echo "yes (default)" >&6; }
46830     WARNINGS_AS_ERRORS=true
46831   else
46832     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
46833   fi
46834 
46835   if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
46836     # Set legacy hotspot variable
46837     HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
46838   else
46839     HOTSPOT_SET_WARNINGS_AS_ERRORS=""
46840   fi
46841 
46842 
46843 
46844 
46845   case "${TOOLCHAIN_TYPE}" in
46846     microsoft)
46847       DISABLE_WARNING_PREFIX="-wd"
46848       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
46849       ;;
46850     solstudio)
46851       DISABLE_WARNING_PREFIX="-erroff="
46852       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
46853       ;;
46854     gcc)
46855       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
46856 
46857   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
46858 $as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
46859   supports=yes
46860 
46861   saved_cflags="$CFLAGS"
46862   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
46863   ac_ext=c
46864 ac_cpp='$CPP $CPPFLAGS'
46865 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46866 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46867 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46868 
46869   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46870 /* end confdefs.h.  */
46871 int i;
46872 _ACEOF
46873 if ac_fn_c_try_compile "$LINENO"; then :
46874 
46875 else
46876   supports=no
46877 fi
46878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46879   ac_ext=cpp
46880 ac_cpp='$CXXCPP $CPPFLAGS'
46881 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46882 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46883 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46884 
46885   CFLAGS="$saved_cflags"
46886 
46887   saved_cxxflags="$CXXFLAGS"
46888   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
46889   ac_ext=cpp
46890 ac_cpp='$CXXCPP $CPPFLAGS'
46891 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46892 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46893 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46894 
46895   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46896 /* end confdefs.h.  */
46897 int i;
46898 _ACEOF
46899 if ac_fn_cxx_try_compile "$LINENO"; then :
46900 
46901 else
46902   supports=no
46903 fi
46904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46905   ac_ext=cpp
46906 ac_cpp='$CXXCPP $CPPFLAGS'
46907 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46908 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46909 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46910 
46911   CXXFLAGS="$saved_cxxflags"
46912 
46913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46914 $as_echo "$supports" >&6; }
46915   if test "x$supports" = "xyes" ; then
46916     GCC_CAN_DISABLE_WARNINGS=true
46917   else
46918     GCC_CAN_DISABLE_WARNINGS=false
46919 
46920   fi
46921 
46922       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
46923         DISABLE_WARNING_PREFIX="-Wno-"
46924       else
46925         DISABLE_WARNING_PREFIX=
46926       fi
46927       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
46928       # Repeate the check for the BUILD_CC
46929       CC_OLD="$CC"
46930       CC="$BUILD_CC"
46931 
46932   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
46933 $as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
46934   supports=yes
46935 
46936   saved_cflags="$CFLAGS"
46937   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
46938   ac_ext=c
46939 ac_cpp='$CPP $CPPFLAGS'
46940 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46941 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46942 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46943 
46944   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46945 /* end confdefs.h.  */
46946 int i;
46947 _ACEOF
46948 if ac_fn_c_try_compile "$LINENO"; then :
46949 
46950 else
46951   supports=no
46952 fi
46953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46954   ac_ext=cpp
46955 ac_cpp='$CXXCPP $CPPFLAGS'
46956 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46957 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46958 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46959 
46960   CFLAGS="$saved_cflags"
46961 
46962   saved_cxxflags="$CXXFLAGS"
46963   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
46964   ac_ext=cpp
46965 ac_cpp='$CXXCPP $CPPFLAGS'
46966 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46967 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46968 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46969 
46970   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46971 /* end confdefs.h.  */
46972 int i;
46973 _ACEOF
46974 if ac_fn_cxx_try_compile "$LINENO"; then :
46975 
46976 else
46977   supports=no
46978 fi
46979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46980   ac_ext=cpp
46981 ac_cpp='$CXXCPP $CPPFLAGS'
46982 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46983 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46984 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46985 
46986   CXXFLAGS="$saved_cxxflags"
46987 
46988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46989 $as_echo "$supports" >&6; }
46990   if test "x$supports" = "xyes" ; then
46991     BUILD_CC_CAN_DISABLE_WARNINGS=true
46992   else
46993     BUILD_CC_CAN_DISABLE_WARNINGS=false
46994 
46995   fi
46996 
46997       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
46998         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
46999       else
47000         BUILD_CC_DISABLE_WARNING_PREFIX=
47001       fi
47002       CC="$CC_OLD"
47003       ;;
47004     clang)
47005       DISABLE_WARNING_PREFIX="-Wno-"
47006       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47007       ;;
47008   esac
47009 
47010 
47011 
47012 
47013 # Setup debug symbols (need objcopy from the toolchain for that)
47014 
47015   #
47016   # NATIVE_DEBUG_SYMBOLS
47017   #
47018   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
47019 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
47020 
47021 # Check whether --with-native-debug-symbols was given.
47022 if test "${with_native_debug_symbols+set}" = set; then :
47023   withval=$with_native_debug_symbols;
47024 else
47025   with_native_debug_symbols="zipped"
47026 fi
47027 
47028   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
47029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
47030 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
47031 
47032   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
47033 
47034     if test "x$OBJCOPY" = x; then
47035       # explicit enabling of enable-debug-symbols and can't find objcopy
47036       # this is an error
47037       as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
47038     fi
47039 
47040     ENABLE_DEBUG_SYMBOLS=true
47041     ZIP_DEBUGINFO_FILES=true
47042     DEBUG_BINARIES=true
47043     STRIP_POLICY=min_strip
47044   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
47045     ENABLE_DEBUG_SYMBOLS=false
47046     ZIP_DEBUGINFO_FILES=false
47047     DEBUG_BINARIES=false
47048     STRIP_POLICY=no_strip
47049   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
47050     ENABLE_DEBUG_SYMBOLS=false  # -g option only
47051     ZIP_DEBUGINFO_FILES=false
47052     DEBUG_BINARIES=true
47053     STRIP_POLICY=no_strip
47054     STRIP=""
47055   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
47056 
47057     if test "x$OBJCOPY" = x; then
47058       # explicit enabling of enable-debug-symbols and can't find objcopy
47059       # this is an error
47060       as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
47061     fi
47062 
47063     ENABLE_DEBUG_SYMBOLS=true
47064     ZIP_DEBUGINFO_FILES=false
47065     DEBUG_BINARIES=true
47066     STRIP_POLICY=min_strip
47067   else
47068     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
47069   fi
47070 
47071   # --enable-debug-symbols is deprecated.
47072   # Please use --with-debug-symbols=[internal,external,zipped] .
47073 
47074   # Check whether --enable-debug-symbols was given.
47075 if test "${enable_debug_symbols+set}" = set; then :
47076   enableval=$enable_debug_symbols;
47077 fi
47078 
47079   if test "x$enable_debug_symbols" != x; then
47080     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
47081 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
47082   fi
47083 
47084 
47085   # --enable-zip-debug-info is deprecated.
47086   # Please use --with-debug-symbols=zipped .
47087 
47088   # Check whether --enable-zip-debug-info was given.
47089 if test "${enable_zip_debug_info+set}" = set; then :
47090   enableval=$enable_zip_debug_info;
47091 fi
47092 
47093   if test "x$enable_zip_debug_info" != x; then
47094     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
47095 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
47096   fi
47097 
47098 
47099 
47100 
47101 
47102 
47103 
47104 
47105 
47106   # Check whether --enable-native-coverage was given.
47107 if test "${enable_native_coverage+set}" = set; then :
47108   enableval=$enable_native_coverage;
47109 fi
47110 
47111   GCOV_ENABLED="false"
47112   if test "x$enable_native_coverage" = "xyes"; then
47113     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
47114       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47115 $as_echo_n "checking if native coverage is enabled... " >&6; }
47116       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47117 $as_echo "yes" >&6; }
47118       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
47119       GCOV_LDFLAGS="-fprofile-arcs"
47120       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
47121       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
47122       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
47123       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
47124       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
47125       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
47126       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
47127       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
47128       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
47129       GCOV_ENABLED="true"
47130     else
47131       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
47132     fi
47133   elif test "x$enable_native_coverage" = "xno"; then
47134     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47135 $as_echo_n "checking if native coverage is enabled... " >&6; }
47136     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47137 $as_echo "no" >&6; }
47138   elif test "x$enable_native_coverage" != "x"; then
47139     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
47140   fi
47141 
47142 
47143 
47144 
47145 ###############################################################################
47146 #
47147 # Check dependencies for external and internal libraries.
47148 #
47149 ###############################################################################
47150 
47151 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
47152 
47153   # When using cygwin or msys, we need a wrapper binary that renames
47154   # /cygdrive/c/ arguments into c:/ arguments and peeks into
47155   # @files and rewrites these too! This wrapper binary is
47156   # called fixpath.
47157   FIXPATH=
47158   if test "x$OPENJDK_BUILD_OS" = xwindows; then
47159     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
47160 $as_echo_n "checking if fixpath can be created... " >&6; }
47161     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
47162     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
47163     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
47164     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
47165       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
47166       FIXPATH="$FIXPATH_BIN -c"
47167     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
47168       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
47169       # @ was chosen as separator to minimize risk of other tools messing around with it
47170       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
47171           | tr ' ' '\n' | grep '^/./' | sort | uniq`
47172       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
47173       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
47174     fi
47175     FIXPATH_SRC_W="$FIXPATH_SRC"
47176     FIXPATH_BIN_W="$FIXPATH_BIN"
47177 
47178   unix_path="$FIXPATH_SRC_W"
47179   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47180     windows_path=`$CYGPATH -m "$unix_path"`
47181     FIXPATH_SRC_W="$windows_path"
47182   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47183     windows_path=`cmd //c echo $unix_path`
47184     FIXPATH_SRC_W="$windows_path"
47185   fi
47186 
47187 
47188   unix_path="$FIXPATH_BIN_W"
47189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47190     windows_path=`$CYGPATH -m "$unix_path"`
47191     FIXPATH_BIN_W="$windows_path"
47192   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47193     windows_path=`cmd //c echo $unix_path`
47194     FIXPATH_BIN_W="$windows_path"
47195   fi
47196 
47197     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
47198     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
47199     cd $FIXPATH_DIR
47200     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
47201     cd $CURDIR
47202 
47203     if test ! -x $FIXPATH_BIN; then
47204       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47205 $as_echo "no" >&6; }
47206       cat $FIXPATH_DIR/fixpath1.log
47207       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
47208     fi
47209     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47210 $as_echo "yes" >&6; }
47211     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
47212 $as_echo_n "checking if fixpath.exe works... " >&6; }
47213     cd $FIXPATH_DIR
47214     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
47215         > $FIXPATH_DIR/fixpath2.log 2>&1
47216     cd $CURDIR
47217     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
47218       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47219 $as_echo "no" >&6; }
47220       cat $FIXPATH_DIR/fixpath2.log
47221       as_fn_error $? "fixpath did not work!" "$LINENO" 5
47222     fi
47223     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47224 $as_echo "yes" >&6; }
47225 
47226     FIXPATH_DETACH_FLAG="--detach"
47227   fi
47228 
47229 
47230 
47231 
47232 
47233 
47234   # Check if X11 is needed
47235   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
47236     # No X11 support on windows or macosx
47237     NEEDS_LIB_X11=false
47238   else
47239     if test "x$SUPPORT_HEADFUL" = xno; then
47240       # No X11 support if building headless-only
47241       NEEDS_LIB_X11=false
47242     else
47243       # All other instances need X11
47244       NEEDS_LIB_X11=true
47245     fi
47246   fi
47247 
47248   # Check if cups is needed
47249   if test "x$OPENJDK_TARGET_OS" = xwindows; then
47250     # Windows have a separate print system
47251     NEEDS_LIB_CUPS=false
47252   else
47253     NEEDS_LIB_CUPS=true
47254   fi
47255 
47256   # Check if freetype is needed
47257   if test "x$OPENJDK" = "xtrue"; then
47258     NEEDS_LIB_FREETYPE=true
47259   else
47260     NEEDS_LIB_FREETYPE=false
47261   fi
47262 
47263   # Check if alsa is needed
47264   if test "x$OPENJDK_TARGET_OS" = xlinux; then
47265     NEEDS_LIB_ALSA=true
47266   else
47267     NEEDS_LIB_ALSA=false
47268   fi
47269 
47270   # Check if ffi is needed
47271   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47272     NEEDS_LIB_FFI=true
47273   else
47274     NEEDS_LIB_FFI=false
47275   fi
47276 
47277 
47278   # statically link libstdc++ before C++ ABI is stablized on Linux unless
47279   # dynamic build is configured on command line.
47280 
47281 # Check whether --with-stdc++lib was given.
47282 if test "${with_stdc__lib+set}" = set; then :
47283   withval=$with_stdc__lib;
47284         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47285                 && test "x$with_stdc__lib" != xdefault; then
47286           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47287         fi
47288 
47289 else
47290   with_stdc__lib=default
47291 
47292 fi
47293 
47294 
47295   if test "x$OPENJDK_TARGET_OS" = xlinux; then
47296     # Test if -lstdc++ works.
47297     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47298 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47299     ac_ext=cpp
47300 ac_cpp='$CXXCPP $CPPFLAGS'
47301 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47302 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47303 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47304 
47305     OLD_CXXFLAGS="$CXXFLAGS"
47306     CXXFLAGS="$CXXFLAGS -lstdc++"
47307     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47308 /* end confdefs.h.  */
47309 
47310 int
47311 main ()
47312 {
47313 return 0;
47314   ;
47315   return 0;
47316 }
47317 _ACEOF
47318 if ac_fn_cxx_try_link "$LINENO"; then :
47319   has_dynamic_libstdcxx=yes
47320 else
47321   has_dynamic_libstdcxx=no
47322 fi
47323 rm -f core conftest.err conftest.$ac_objext \
47324     conftest$ac_exeext conftest.$ac_ext
47325     CXXFLAGS="$OLD_CXXFLAGS"
47326     ac_ext=cpp
47327 ac_cpp='$CXXCPP $CPPFLAGS'
47328 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47329 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47330 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47331 
47332     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47333 $as_echo "$has_dynamic_libstdcxx" >&6; }
47334 
47335     # Test if stdc++ can be linked statically.
47336     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47337 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47338     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47339     ac_ext=cpp
47340 ac_cpp='$CXXCPP $CPPFLAGS'
47341 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47342 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47343 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47344 
47345     OLD_LIBS="$LIBS"
47346     OLD_CXX="$CXX"
47347     LIBS="$STATIC_STDCXX_FLAGS"
47348     CXX="$CC"
47349     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47350 /* end confdefs.h.  */
47351 
47352 int
47353 main ()
47354 {
47355 return 0;
47356   ;
47357   return 0;
47358 }
47359 _ACEOF
47360 if ac_fn_cxx_try_link "$LINENO"; then :
47361   has_static_libstdcxx=yes
47362 else
47363   has_static_libstdcxx=no
47364 fi
47365 rm -f core conftest.err conftest.$ac_objext \
47366     conftest$ac_exeext conftest.$ac_ext
47367     LIBS="$OLD_LIBS"
47368     CXX="$OLD_CXX"
47369     ac_ext=cpp
47370 ac_cpp='$CXXCPP $CPPFLAGS'
47371 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47372 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47373 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47374 
47375     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47376 $as_echo "$has_static_libstdcxx" >&6; }
47377 
47378     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47379       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47380     fi
47381 
47382     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47383       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47384     fi
47385 
47386     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47387       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47388     fi
47389 
47390     # If dynamic was requested, it's available since it would fail above otherwise.
47391     # If dynamic wasn't requested, go with static unless it isn't available.
47392     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47393 $as_echo_n "checking how to link with libstdc++... " >&6; }
47394     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47395       LIBCXX="$LIBCXX -lstdc++"
47396       LDCXX="$CXX"
47397       STATIC_CXX_SETTING="STATIC_CXX=false"
47398       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47399 $as_echo "dynamic" >&6; }
47400     else
47401       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47402       LDCXX="$CC"
47403       STATIC_CXX_SETTING="STATIC_CXX=true"
47404       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47405 $as_echo "static" >&6; }
47406     fi
47407   fi
47408 
47409 
47410   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47411   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47412     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47413   fi
47414 
47415   # TODO better (platform agnostic) test
47416   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47417     LIBCXX="-lstdc++"
47418   fi
47419 
47420 
47421   # Setup Windows runtime dlls
47422   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47423 
47424 
47425 # Check whether --with-msvcr-dll was given.
47426 if test "${with_msvcr_dll+set}" = set; then :
47427   withval=$with_msvcr_dll;
47428 fi
47429 
47430 
47431   if test "x$with_msvcr_dll" != x; then
47432     # If given explicitely by user, do not probe. If not present, fail directly.
47433 
47434   DLL_NAME="$MSVCR_NAME"
47435   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
47436   METHOD="--with-msvcr-dll"
47437   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47438     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47439 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47440 
47441     # Need to check if the found msvcr is correct architecture
47442     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47443 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47444     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47445     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47446       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47447       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47448       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47449         CORRECT_MSVCR_ARCH="PE32 executable"
47450       else
47451         CORRECT_MSVCR_ARCH="PE32+ executable"
47452       fi
47453     else
47454       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47455         CORRECT_MSVCR_ARCH=386
47456       else
47457         CORRECT_MSVCR_ARCH=x86-64
47458       fi
47459     fi
47460     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47461       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47462 $as_echo "ok" >&6; }
47463       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47464 
47465   # Only process if variable expands to non-empty
47466 
47467   if test "x$MSVC_DLL" != x; then
47468     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47469 
47470   # Input might be given as Windows format, start by converting to
47471   # unix format.
47472   path="$MSVC_DLL"
47473   new_path=`$CYGPATH -u "$path"`
47474 
47475   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47476   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47477   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47478   # "foo.exe" is OK but "foo" is an error.
47479   #
47480   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47481   # It is also a way to make sure we got the proper file name for the real test later on.
47482   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47483   if test "x$test_shortpath" = x; then
47484     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47485 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47486     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47487   fi
47488 
47489   # Call helper function which possibly converts this using DOS-style short mode.
47490   # If so, the updated path is stored in $new_path.
47491 
47492   input_path="$new_path"
47493   # Check if we need to convert this using DOS-style short mode. If the path
47494   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47495   # take no chances and rewrite it.
47496   # Note: m4 eats our [], so we need to use [ and ] instead.
47497   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47498   if test "x$has_forbidden_chars" != x; then
47499     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47500     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47501     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47502     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47503       # Going to short mode and back again did indeed matter. Since short mode is
47504       # case insensitive, let's make it lowercase to improve readability.
47505       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47506       # Now convert it back to Unix-style (cygpath)
47507       input_path=`$CYGPATH -u "$shortmode_path"`
47508       new_path="$input_path"
47509     fi
47510   fi
47511 
47512   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47513   if test "x$test_cygdrive_prefix" = x; then
47514     # As a simple fix, exclude /usr/bin since it's not a real path.
47515     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47516       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47517       # a path prefixed by /cygdrive for fixpath to work.
47518       new_path="$CYGWIN_ROOT_PATH$input_path"
47519     fi
47520   fi
47521 
47522 
47523   if test "x$path" != "x$new_path"; then
47524     MSVC_DLL="$new_path"
47525     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47526 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47527   fi
47528 
47529     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47530 
47531   path="$MSVC_DLL"
47532   has_colon=`$ECHO $path | $GREP ^.:`
47533   new_path="$path"
47534   if test "x$has_colon" = x; then
47535     # Not in mixed or Windows style, start by that.
47536     new_path=`cmd //c echo $path`
47537   fi
47538 
47539 
47540   input_path="$new_path"
47541   # Check if we need to convert this using DOS-style short mode. If the path
47542   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47543   # take no chances and rewrite it.
47544   # Note: m4 eats our [], so we need to use [ and ] instead.
47545   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47546   if test "x$has_forbidden_chars" != x; then
47547     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47548     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47549   fi
47550 
47551 
47552   windows_path="$new_path"
47553   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47554     unix_path=`$CYGPATH -u "$windows_path"`
47555     new_path="$unix_path"
47556   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47557     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47558     new_path="$unix_path"
47559   fi
47560 
47561   if test "x$path" != "x$new_path"; then
47562     MSVC_DLL="$new_path"
47563     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47564 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47565   fi
47566 
47567   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47568   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47569 
47570     else
47571       # We're on a unix platform. Hooray! :)
47572       path="$MSVC_DLL"
47573       has_space=`$ECHO "$path" | $GREP " "`
47574       if test "x$has_space" != x; then
47575         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47576 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47577         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47578       fi
47579 
47580       # Use eval to expand a potential ~
47581       eval path="$path"
47582       if test ! -f "$path" && test ! -d "$path"; then
47583         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47584       fi
47585 
47586       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47587     fi
47588   fi
47589 
47590       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47591 $as_echo_n "checking for $DLL_NAME... " >&6; }
47592       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47593 $as_echo "$MSVC_DLL" >&6; }
47594     else
47595       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47596 $as_echo "incorrect, ignoring" >&6; }
47597       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47598 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47599     fi
47600   fi
47601 
47602     if test "x$MSVC_DLL" = x; then
47603       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
47604     fi
47605     MSVCR_DLL="$MSVC_DLL"
47606   elif test "x$DEVKIT_MSVCR_DLL" != x; then
47607 
47608   DLL_NAME="$MSVCR_NAME"
47609   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
47610   METHOD="devkit"
47611   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47612     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47613 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47614 
47615     # Need to check if the found msvcr is correct architecture
47616     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47617 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47618     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47619     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47620       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47621       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47622       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47623         CORRECT_MSVCR_ARCH="PE32 executable"
47624       else
47625         CORRECT_MSVCR_ARCH="PE32+ executable"
47626       fi
47627     else
47628       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47629         CORRECT_MSVCR_ARCH=386
47630       else
47631         CORRECT_MSVCR_ARCH=x86-64
47632       fi
47633     fi
47634     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47635       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47636 $as_echo "ok" >&6; }
47637       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47638 
47639   # Only process if variable expands to non-empty
47640 
47641   if test "x$MSVC_DLL" != x; then
47642     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47643 
47644   # Input might be given as Windows format, start by converting to
47645   # unix format.
47646   path="$MSVC_DLL"
47647   new_path=`$CYGPATH -u "$path"`
47648 
47649   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47650   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47651   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47652   # "foo.exe" is OK but "foo" is an error.
47653   #
47654   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47655   # It is also a way to make sure we got the proper file name for the real test later on.
47656   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47657   if test "x$test_shortpath" = x; then
47658     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47659 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47660     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47661   fi
47662 
47663   # Call helper function which possibly converts this using DOS-style short mode.
47664   # If so, the updated path is stored in $new_path.
47665 
47666   input_path="$new_path"
47667   # Check if we need to convert this using DOS-style short mode. If the path
47668   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47669   # take no chances and rewrite it.
47670   # Note: m4 eats our [], so we need to use [ and ] instead.
47671   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47672   if test "x$has_forbidden_chars" != x; then
47673     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47674     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47675     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47676     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47677       # Going to short mode and back again did indeed matter. Since short mode is
47678       # case insensitive, let's make it lowercase to improve readability.
47679       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47680       # Now convert it back to Unix-style (cygpath)
47681       input_path=`$CYGPATH -u "$shortmode_path"`
47682       new_path="$input_path"
47683     fi
47684   fi
47685 
47686   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47687   if test "x$test_cygdrive_prefix" = x; then
47688     # As a simple fix, exclude /usr/bin since it's not a real path.
47689     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47690       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47691       # a path prefixed by /cygdrive for fixpath to work.
47692       new_path="$CYGWIN_ROOT_PATH$input_path"
47693     fi
47694   fi
47695 
47696 
47697   if test "x$path" != "x$new_path"; then
47698     MSVC_DLL="$new_path"
47699     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47700 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47701   fi
47702 
47703     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47704 
47705   path="$MSVC_DLL"
47706   has_colon=`$ECHO $path | $GREP ^.:`
47707   new_path="$path"
47708   if test "x$has_colon" = x; then
47709     # Not in mixed or Windows style, start by that.
47710     new_path=`cmd //c echo $path`
47711   fi
47712 
47713 
47714   input_path="$new_path"
47715   # Check if we need to convert this using DOS-style short mode. If the path
47716   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47717   # take no chances and rewrite it.
47718   # Note: m4 eats our [], so we need to use [ and ] instead.
47719   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47720   if test "x$has_forbidden_chars" != x; then
47721     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47722     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47723   fi
47724 
47725 
47726   windows_path="$new_path"
47727   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47728     unix_path=`$CYGPATH -u "$windows_path"`
47729     new_path="$unix_path"
47730   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47731     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47732     new_path="$unix_path"
47733   fi
47734 
47735   if test "x$path" != "x$new_path"; then
47736     MSVC_DLL="$new_path"
47737     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47738 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47739   fi
47740 
47741   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47742   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47743 
47744     else
47745       # We're on a unix platform. Hooray! :)
47746       path="$MSVC_DLL"
47747       has_space=`$ECHO "$path" | $GREP " "`
47748       if test "x$has_space" != x; then
47749         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47750 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47751         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47752       fi
47753 
47754       # Use eval to expand a potential ~
47755       eval path="$path"
47756       if test ! -f "$path" && test ! -d "$path"; then
47757         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47758       fi
47759 
47760       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47761     fi
47762   fi
47763 
47764       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47765 $as_echo_n "checking for $DLL_NAME... " >&6; }
47766       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47767 $as_echo "$MSVC_DLL" >&6; }
47768     else
47769       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47770 $as_echo "incorrect, ignoring" >&6; }
47771       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47772 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47773     fi
47774   fi
47775 
47776     if test "x$MSVC_DLL" = x; then
47777       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
47778     fi
47779     MSVCR_DLL="$MSVC_DLL"
47780   else
47781 
47782   DLL_NAME="${MSVCR_NAME}"
47783   MSVC_DLL=
47784 
47785   if test "x$MSVC_DLL" = x; then
47786     # Probe: Using well-known location from Visual Studio 10.0
47787     if test "x$VCINSTALLDIR" != x; then
47788       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47789 
47790   windows_path="$CYGWIN_VC_INSTALL_DIR"
47791   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47792     unix_path=`$CYGPATH -u "$windows_path"`
47793     CYGWIN_VC_INSTALL_DIR="$unix_path"
47794   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47795     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47796     CYGWIN_VC_INSTALL_DIR="$unix_path"
47797   fi
47798 
47799       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47800         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47801       else
47802         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47803       fi
47804       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
47805 
47806   DLL_NAME="$DLL_NAME"
47807   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47808   METHOD="well-known location in VCINSTALLDIR"
47809   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47810     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47811 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47812 
47813     # Need to check if the found msvcr is correct architecture
47814     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47815 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47816     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47817     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47818       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47819       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47820       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47821         CORRECT_MSVCR_ARCH="PE32 executable"
47822       else
47823         CORRECT_MSVCR_ARCH="PE32+ executable"
47824       fi
47825     else
47826       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47827         CORRECT_MSVCR_ARCH=386
47828       else
47829         CORRECT_MSVCR_ARCH=x86-64
47830       fi
47831     fi
47832     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47833       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47834 $as_echo "ok" >&6; }
47835       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47836 
47837   # Only process if variable expands to non-empty
47838 
47839   if test "x$MSVC_DLL" != x; then
47840     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47841 
47842   # Input might be given as Windows format, start by converting to
47843   # unix format.
47844   path="$MSVC_DLL"
47845   new_path=`$CYGPATH -u "$path"`
47846 
47847   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47848   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47849   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47850   # "foo.exe" is OK but "foo" is an error.
47851   #
47852   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47853   # It is also a way to make sure we got the proper file name for the real test later on.
47854   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47855   if test "x$test_shortpath" = x; then
47856     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47857 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47858     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47859   fi
47860 
47861   # Call helper function which possibly converts this using DOS-style short mode.
47862   # If so, the updated path is stored in $new_path.
47863 
47864   input_path="$new_path"
47865   # Check if we need to convert this using DOS-style short mode. If the path
47866   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47867   # take no chances and rewrite it.
47868   # Note: m4 eats our [], so we need to use [ and ] instead.
47869   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47870   if test "x$has_forbidden_chars" != x; then
47871     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47872     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47873     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47874     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47875       # Going to short mode and back again did indeed matter. Since short mode is
47876       # case insensitive, let's make it lowercase to improve readability.
47877       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47878       # Now convert it back to Unix-style (cygpath)
47879       input_path=`$CYGPATH -u "$shortmode_path"`
47880       new_path="$input_path"
47881     fi
47882   fi
47883 
47884   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47885   if test "x$test_cygdrive_prefix" = x; then
47886     # As a simple fix, exclude /usr/bin since it's not a real path.
47887     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47888       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47889       # a path prefixed by /cygdrive for fixpath to work.
47890       new_path="$CYGWIN_ROOT_PATH$input_path"
47891     fi
47892   fi
47893 
47894 
47895   if test "x$path" != "x$new_path"; then
47896     MSVC_DLL="$new_path"
47897     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47898 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47899   fi
47900 
47901     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47902 
47903   path="$MSVC_DLL"
47904   has_colon=`$ECHO $path | $GREP ^.:`
47905   new_path="$path"
47906   if test "x$has_colon" = x; then
47907     # Not in mixed or Windows style, start by that.
47908     new_path=`cmd //c echo $path`
47909   fi
47910 
47911 
47912   input_path="$new_path"
47913   # Check if we need to convert this using DOS-style short mode. If the path
47914   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47915   # take no chances and rewrite it.
47916   # Note: m4 eats our [], so we need to use [ and ] instead.
47917   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47918   if test "x$has_forbidden_chars" != x; then
47919     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47920     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47921   fi
47922 
47923 
47924   windows_path="$new_path"
47925   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47926     unix_path=`$CYGPATH -u "$windows_path"`
47927     new_path="$unix_path"
47928   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47929     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47930     new_path="$unix_path"
47931   fi
47932 
47933   if test "x$path" != "x$new_path"; then
47934     MSVC_DLL="$new_path"
47935     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47936 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47937   fi
47938 
47939   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47940   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47941 
47942     else
47943       # We're on a unix platform. Hooray! :)
47944       path="$MSVC_DLL"
47945       has_space=`$ECHO "$path" | $GREP " "`
47946       if test "x$has_space" != x; then
47947         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47948 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47949         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47950       fi
47951 
47952       # Use eval to expand a potential ~
47953       eval path="$path"
47954       if test ! -f "$path" && test ! -d "$path"; then
47955         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47956       fi
47957 
47958       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47959     fi
47960   fi
47961 
47962       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47963 $as_echo_n "checking for $DLL_NAME... " >&6; }
47964       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47965 $as_echo "$MSVC_DLL" >&6; }
47966     else
47967       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47968 $as_echo "incorrect, ignoring" >&6; }
47969       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47970 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47971     fi
47972   fi
47973 
47974     fi
47975   fi
47976 
47977   if test "x$MSVC_DLL" = x; then
47978     # Probe: Check in the Boot JDK directory.
47979     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
47980 
47981   DLL_NAME="$DLL_NAME"
47982   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47983   METHOD="well-known location in Boot JDK"
47984   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47985     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47986 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47987 
47988     # Need to check if the found msvcr is correct architecture
47989     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47990 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47991     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47992     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47993       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47994       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47995       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47996         CORRECT_MSVCR_ARCH="PE32 executable"
47997       else
47998         CORRECT_MSVCR_ARCH="PE32+ executable"
47999       fi
48000     else
48001       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48002         CORRECT_MSVCR_ARCH=386
48003       else
48004         CORRECT_MSVCR_ARCH=x86-64
48005       fi
48006     fi
48007     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48008       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48009 $as_echo "ok" >&6; }
48010       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48011 
48012   # Only process if variable expands to non-empty
48013 
48014   if test "x$MSVC_DLL" != x; then
48015     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48016 
48017   # Input might be given as Windows format, start by converting to
48018   # unix format.
48019   path="$MSVC_DLL"
48020   new_path=`$CYGPATH -u "$path"`
48021 
48022   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48023   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48024   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48025   # "foo.exe" is OK but "foo" is an error.
48026   #
48027   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48028   # It is also a way to make sure we got the proper file name for the real test later on.
48029   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48030   if test "x$test_shortpath" = x; then
48031     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48032 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48033     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48034   fi
48035 
48036   # Call helper function which possibly converts this using DOS-style short mode.
48037   # If so, the updated path is stored in $new_path.
48038 
48039   input_path="$new_path"
48040   # Check if we need to convert this using DOS-style short mode. If the path
48041   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48042   # take no chances and rewrite it.
48043   # Note: m4 eats our [], so we need to use [ and ] instead.
48044   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48045   if test "x$has_forbidden_chars" != x; then
48046     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48047     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48048     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48049     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48050       # Going to short mode and back again did indeed matter. Since short mode is
48051       # case insensitive, let's make it lowercase to improve readability.
48052       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48053       # Now convert it back to Unix-style (cygpath)
48054       input_path=`$CYGPATH -u "$shortmode_path"`
48055       new_path="$input_path"
48056     fi
48057   fi
48058 
48059   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48060   if test "x$test_cygdrive_prefix" = x; then
48061     # As a simple fix, exclude /usr/bin since it's not a real path.
48062     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48063       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48064       # a path prefixed by /cygdrive for fixpath to work.
48065       new_path="$CYGWIN_ROOT_PATH$input_path"
48066     fi
48067   fi
48068 
48069 
48070   if test "x$path" != "x$new_path"; then
48071     MSVC_DLL="$new_path"
48072     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48073 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48074   fi
48075 
48076     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48077 
48078   path="$MSVC_DLL"
48079   has_colon=`$ECHO $path | $GREP ^.:`
48080   new_path="$path"
48081   if test "x$has_colon" = x; then
48082     # Not in mixed or Windows style, start by that.
48083     new_path=`cmd //c echo $path`
48084   fi
48085 
48086 
48087   input_path="$new_path"
48088   # Check if we need to convert this using DOS-style short mode. If the path
48089   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48090   # take no chances and rewrite it.
48091   # Note: m4 eats our [], so we need to use [ and ] instead.
48092   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48093   if test "x$has_forbidden_chars" != x; then
48094     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48095     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48096   fi
48097 
48098 
48099   windows_path="$new_path"
48100   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48101     unix_path=`$CYGPATH -u "$windows_path"`
48102     new_path="$unix_path"
48103   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48104     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48105     new_path="$unix_path"
48106   fi
48107 
48108   if test "x$path" != "x$new_path"; then
48109     MSVC_DLL="$new_path"
48110     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48111 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48112   fi
48113 
48114   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48115   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48116 
48117     else
48118       # We're on a unix platform. Hooray! :)
48119       path="$MSVC_DLL"
48120       has_space=`$ECHO "$path" | $GREP " "`
48121       if test "x$has_space" != x; then
48122         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48123 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48124         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48125       fi
48126 
48127       # Use eval to expand a potential ~
48128       eval path="$path"
48129       if test ! -f "$path" && test ! -d "$path"; then
48130         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48131       fi
48132 
48133       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48134     fi
48135   fi
48136 
48137       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48138 $as_echo_n "checking for $DLL_NAME... " >&6; }
48139       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48140 $as_echo "$MSVC_DLL" >&6; }
48141     else
48142       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48143 $as_echo "incorrect, ignoring" >&6; }
48144       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48145 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48146     fi
48147   fi
48148 
48149   fi
48150 
48151   if test "x$MSVC_DLL" = x; then
48152     # Probe: Look in the Windows system32 directory
48153     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48154 
48155   windows_path="$CYGWIN_SYSTEMROOT"
48156   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48157     unix_path=`$CYGPATH -u "$windows_path"`
48158     CYGWIN_SYSTEMROOT="$unix_path"
48159   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48160     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48161     CYGWIN_SYSTEMROOT="$unix_path"
48162   fi
48163 
48164     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48165 
48166   DLL_NAME="$DLL_NAME"
48167   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48168   METHOD="well-known location in SYSTEMROOT"
48169   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48170     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48171 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48172 
48173     # Need to check if the found msvcr is correct architecture
48174     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48175 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48176     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48177     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48178       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48179       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48180       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48181         CORRECT_MSVCR_ARCH="PE32 executable"
48182       else
48183         CORRECT_MSVCR_ARCH="PE32+ executable"
48184       fi
48185     else
48186       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48187         CORRECT_MSVCR_ARCH=386
48188       else
48189         CORRECT_MSVCR_ARCH=x86-64
48190       fi
48191     fi
48192     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48193       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48194 $as_echo "ok" >&6; }
48195       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48196 
48197   # Only process if variable expands to non-empty
48198 
48199   if test "x$MSVC_DLL" != x; then
48200     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48201 
48202   # Input might be given as Windows format, start by converting to
48203   # unix format.
48204   path="$MSVC_DLL"
48205   new_path=`$CYGPATH -u "$path"`
48206 
48207   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48208   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48209   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48210   # "foo.exe" is OK but "foo" is an error.
48211   #
48212   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48213   # It is also a way to make sure we got the proper file name for the real test later on.
48214   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48215   if test "x$test_shortpath" = x; then
48216     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48217 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48218     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48219   fi
48220 
48221   # Call helper function which possibly converts this using DOS-style short mode.
48222   # If so, the updated path is stored in $new_path.
48223 
48224   input_path="$new_path"
48225   # Check if we need to convert this using DOS-style short mode. If the path
48226   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48227   # take no chances and rewrite it.
48228   # Note: m4 eats our [], so we need to use [ and ] instead.
48229   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48230   if test "x$has_forbidden_chars" != x; then
48231     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48232     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48233     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48234     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48235       # Going to short mode and back again did indeed matter. Since short mode is
48236       # case insensitive, let's make it lowercase to improve readability.
48237       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48238       # Now convert it back to Unix-style (cygpath)
48239       input_path=`$CYGPATH -u "$shortmode_path"`
48240       new_path="$input_path"
48241     fi
48242   fi
48243 
48244   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48245   if test "x$test_cygdrive_prefix" = x; then
48246     # As a simple fix, exclude /usr/bin since it's not a real path.
48247     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48248       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48249       # a path prefixed by /cygdrive for fixpath to work.
48250       new_path="$CYGWIN_ROOT_PATH$input_path"
48251     fi
48252   fi
48253 
48254 
48255   if test "x$path" != "x$new_path"; then
48256     MSVC_DLL="$new_path"
48257     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48258 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48259   fi
48260 
48261     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48262 
48263   path="$MSVC_DLL"
48264   has_colon=`$ECHO $path | $GREP ^.:`
48265   new_path="$path"
48266   if test "x$has_colon" = x; then
48267     # Not in mixed or Windows style, start by that.
48268     new_path=`cmd //c echo $path`
48269   fi
48270 
48271 
48272   input_path="$new_path"
48273   # Check if we need to convert this using DOS-style short mode. If the path
48274   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48275   # take no chances and rewrite it.
48276   # Note: m4 eats our [], so we need to use [ and ] instead.
48277   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48278   if test "x$has_forbidden_chars" != x; then
48279     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48280     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48281   fi
48282 
48283 
48284   windows_path="$new_path"
48285   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48286     unix_path=`$CYGPATH -u "$windows_path"`
48287     new_path="$unix_path"
48288   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48289     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48290     new_path="$unix_path"
48291   fi
48292 
48293   if test "x$path" != "x$new_path"; then
48294     MSVC_DLL="$new_path"
48295     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48296 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48297   fi
48298 
48299   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48300   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48301 
48302     else
48303       # We're on a unix platform. Hooray! :)
48304       path="$MSVC_DLL"
48305       has_space=`$ECHO "$path" | $GREP " "`
48306       if test "x$has_space" != x; then
48307         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48308 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48309         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48310       fi
48311 
48312       # Use eval to expand a potential ~
48313       eval path="$path"
48314       if test ! -f "$path" && test ! -d "$path"; then
48315         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48316       fi
48317 
48318       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48319     fi
48320   fi
48321 
48322       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48323 $as_echo_n "checking for $DLL_NAME... " >&6; }
48324       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48325 $as_echo "$MSVC_DLL" >&6; }
48326     else
48327       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48328 $as_echo "incorrect, ignoring" >&6; }
48329       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48330 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48331     fi
48332   fi
48333 
48334   fi
48335 
48336   if test "x$MSVC_DLL" = x; then
48337     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48338     if test "x$VS100COMNTOOLS" != x; then
48339       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48340 
48341   windows_path="$CYGWIN_VS_TOOLS_DIR"
48342   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48343     unix_path=`$CYGPATH -u "$windows_path"`
48344     CYGWIN_VS_TOOLS_DIR="$unix_path"
48345   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48346     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48347     CYGWIN_VS_TOOLS_DIR="$unix_path"
48348   fi
48349 
48350       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48351         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48352             | $GREP -i /x64/ | $HEAD --lines 1`
48353       else
48354         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48355             | $GREP -i /x86/ | $HEAD --lines 1`
48356       fi
48357 
48358   DLL_NAME="$DLL_NAME"
48359   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48360   METHOD="search of VS100COMNTOOLS"
48361   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48362     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48363 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48364 
48365     # Need to check if the found msvcr is correct architecture
48366     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48367 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48368     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48369     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48370       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48371       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48372       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48373         CORRECT_MSVCR_ARCH="PE32 executable"
48374       else
48375         CORRECT_MSVCR_ARCH="PE32+ executable"
48376       fi
48377     else
48378       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48379         CORRECT_MSVCR_ARCH=386
48380       else
48381         CORRECT_MSVCR_ARCH=x86-64
48382       fi
48383     fi
48384     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48385       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48386 $as_echo "ok" >&6; }
48387       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48388 
48389   # Only process if variable expands to non-empty
48390 
48391   if test "x$MSVC_DLL" != x; then
48392     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48393 
48394   # Input might be given as Windows format, start by converting to
48395   # unix format.
48396   path="$MSVC_DLL"
48397   new_path=`$CYGPATH -u "$path"`
48398 
48399   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48400   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48401   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48402   # "foo.exe" is OK but "foo" is an error.
48403   #
48404   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48405   # It is also a way to make sure we got the proper file name for the real test later on.
48406   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48407   if test "x$test_shortpath" = x; then
48408     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48409 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48410     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48411   fi
48412 
48413   # Call helper function which possibly converts this using DOS-style short mode.
48414   # If so, the updated path is stored in $new_path.
48415 
48416   input_path="$new_path"
48417   # Check if we need to convert this using DOS-style short mode. If the path
48418   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48419   # take no chances and rewrite it.
48420   # Note: m4 eats our [], so we need to use [ and ] instead.
48421   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48422   if test "x$has_forbidden_chars" != x; then
48423     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48424     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48425     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48426     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48427       # Going to short mode and back again did indeed matter. Since short mode is
48428       # case insensitive, let's make it lowercase to improve readability.
48429       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48430       # Now convert it back to Unix-style (cygpath)
48431       input_path=`$CYGPATH -u "$shortmode_path"`
48432       new_path="$input_path"
48433     fi
48434   fi
48435 
48436   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48437   if test "x$test_cygdrive_prefix" = x; then
48438     # As a simple fix, exclude /usr/bin since it's not a real path.
48439     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48440       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48441       # a path prefixed by /cygdrive for fixpath to work.
48442       new_path="$CYGWIN_ROOT_PATH$input_path"
48443     fi
48444   fi
48445 
48446 
48447   if test "x$path" != "x$new_path"; then
48448     MSVC_DLL="$new_path"
48449     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48450 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48451   fi
48452 
48453     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48454 
48455   path="$MSVC_DLL"
48456   has_colon=`$ECHO $path | $GREP ^.:`
48457   new_path="$path"
48458   if test "x$has_colon" = x; then
48459     # Not in mixed or Windows style, start by that.
48460     new_path=`cmd //c echo $path`
48461   fi
48462 
48463 
48464   input_path="$new_path"
48465   # Check if we need to convert this using DOS-style short mode. If the path
48466   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48467   # take no chances and rewrite it.
48468   # Note: m4 eats our [], so we need to use [ and ] instead.
48469   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48470   if test "x$has_forbidden_chars" != x; then
48471     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48472     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48473   fi
48474 
48475 
48476   windows_path="$new_path"
48477   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48478     unix_path=`$CYGPATH -u "$windows_path"`
48479     new_path="$unix_path"
48480   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48481     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48482     new_path="$unix_path"
48483   fi
48484 
48485   if test "x$path" != "x$new_path"; then
48486     MSVC_DLL="$new_path"
48487     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48488 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48489   fi
48490 
48491   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48492   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48493 
48494     else
48495       # We're on a unix platform. Hooray! :)
48496       path="$MSVC_DLL"
48497       has_space=`$ECHO "$path" | $GREP " "`
48498       if test "x$has_space" != x; then
48499         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48500 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48501         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48502       fi
48503 
48504       # Use eval to expand a potential ~
48505       eval path="$path"
48506       if test ! -f "$path" && test ! -d "$path"; then
48507         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48508       fi
48509 
48510       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48511     fi
48512   fi
48513 
48514       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48515 $as_echo_n "checking for $DLL_NAME... " >&6; }
48516       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48517 $as_echo "$MSVC_DLL" >&6; }
48518     else
48519       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48520 $as_echo "incorrect, ignoring" >&6; }
48521       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48522 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48523     fi
48524   fi
48525 
48526     fi
48527   fi
48528 
48529   if test "x$MSVC_DLL" = x; then
48530     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48531     # (This was the original behaviour; kept since it might turn something up)
48532     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48533       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48534         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48535             | $GREP x64 | $HEAD --lines 1`
48536       else
48537         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48538             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48539         if test "x$POSSIBLE_MSVC_DLL" = x; then
48540           # We're grasping at straws now...
48541           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48542               | $HEAD --lines 1`
48543         fi
48544       fi
48545 
48546 
48547   DLL_NAME="$DLL_NAME"
48548   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48549   METHOD="search of VCINSTALLDIR"
48550   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48551     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48552 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48553 
48554     # Need to check if the found msvcr is correct architecture
48555     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48556 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48557     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48558     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48559       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48560       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48561       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48562         CORRECT_MSVCR_ARCH="PE32 executable"
48563       else
48564         CORRECT_MSVCR_ARCH="PE32+ executable"
48565       fi
48566     else
48567       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48568         CORRECT_MSVCR_ARCH=386
48569       else
48570         CORRECT_MSVCR_ARCH=x86-64
48571       fi
48572     fi
48573     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48574       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48575 $as_echo "ok" >&6; }
48576       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48577 
48578   # Only process if variable expands to non-empty
48579 
48580   if test "x$MSVC_DLL" != x; then
48581     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48582 
48583   # Input might be given as Windows format, start by converting to
48584   # unix format.
48585   path="$MSVC_DLL"
48586   new_path=`$CYGPATH -u "$path"`
48587 
48588   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48589   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48590   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48591   # "foo.exe" is OK but "foo" is an error.
48592   #
48593   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48594   # It is also a way to make sure we got the proper file name for the real test later on.
48595   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48596   if test "x$test_shortpath" = x; then
48597     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48598 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48599     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48600   fi
48601 
48602   # Call helper function which possibly converts this using DOS-style short mode.
48603   # If so, the updated path is stored in $new_path.
48604 
48605   input_path="$new_path"
48606   # Check if we need to convert this using DOS-style short mode. If the path
48607   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48608   # take no chances and rewrite it.
48609   # Note: m4 eats our [], so we need to use [ and ] instead.
48610   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48611   if test "x$has_forbidden_chars" != x; then
48612     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48613     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48614     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48615     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48616       # Going to short mode and back again did indeed matter. Since short mode is
48617       # case insensitive, let's make it lowercase to improve readability.
48618       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48619       # Now convert it back to Unix-style (cygpath)
48620       input_path=`$CYGPATH -u "$shortmode_path"`
48621       new_path="$input_path"
48622     fi
48623   fi
48624 
48625   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48626   if test "x$test_cygdrive_prefix" = x; then
48627     # As a simple fix, exclude /usr/bin since it's not a real path.
48628     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48629       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48630       # a path prefixed by /cygdrive for fixpath to work.
48631       new_path="$CYGWIN_ROOT_PATH$input_path"
48632     fi
48633   fi
48634 
48635 
48636   if test "x$path" != "x$new_path"; then
48637     MSVC_DLL="$new_path"
48638     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48639 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48640   fi
48641 
48642     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48643 
48644   path="$MSVC_DLL"
48645   has_colon=`$ECHO $path | $GREP ^.:`
48646   new_path="$path"
48647   if test "x$has_colon" = x; then
48648     # Not in mixed or Windows style, start by that.
48649     new_path=`cmd //c echo $path`
48650   fi
48651 
48652 
48653   input_path="$new_path"
48654   # Check if we need to convert this using DOS-style short mode. If the path
48655   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48656   # take no chances and rewrite it.
48657   # Note: m4 eats our [], so we need to use [ and ] instead.
48658   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48659   if test "x$has_forbidden_chars" != x; then
48660     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48661     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48662   fi
48663 
48664 
48665   windows_path="$new_path"
48666   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48667     unix_path=`$CYGPATH -u "$windows_path"`
48668     new_path="$unix_path"
48669   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48670     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48671     new_path="$unix_path"
48672   fi
48673 
48674   if test "x$path" != "x$new_path"; then
48675     MSVC_DLL="$new_path"
48676     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48677 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48678   fi
48679 
48680   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48681   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48682 
48683     else
48684       # We're on a unix platform. Hooray! :)
48685       path="$MSVC_DLL"
48686       has_space=`$ECHO "$path" | $GREP " "`
48687       if test "x$has_space" != x; then
48688         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48689 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48690         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48691       fi
48692 
48693       # Use eval to expand a potential ~
48694       eval path="$path"
48695       if test ! -f "$path" && test ! -d "$path"; then
48696         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48697       fi
48698 
48699       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48700     fi
48701   fi
48702 
48703       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48704 $as_echo_n "checking for $DLL_NAME... " >&6; }
48705       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48706 $as_echo "$MSVC_DLL" >&6; }
48707     else
48708       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48709 $as_echo "incorrect, ignoring" >&6; }
48710       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48711 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48712     fi
48713   fi
48714 
48715     fi
48716   fi
48717 
48718   if test "x$MSVC_DLL" = x; then
48719     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48720 $as_echo_n "checking for $DLL_NAME... " >&6; }
48721     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48722 $as_echo "no" >&6; }
48723     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
48724   fi
48725 
48726     MSVCR_DLL="$MSVC_DLL"
48727   fi
48728 
48729 
48730 
48731 # Check whether --with-msvcp-dll was given.
48732 if test "${with_msvcp_dll+set}" = set; then :
48733   withval=$with_msvcp_dll;
48734 fi
48735 
48736 
48737   if test "x$MSVCP_NAME" != "x"; then
48738     if test "x$with_msvcp_dll" != x; then
48739       # If given explicitely by user, do not probe. If not present, fail directly.
48740 
48741   DLL_NAME="$MSVCP_NAME"
48742   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
48743   METHOD="--with-msvcp-dll"
48744   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48745     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48746 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48747 
48748     # Need to check if the found msvcr is correct architecture
48749     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48750 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48751     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48752     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48753       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48754       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48755       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48756         CORRECT_MSVCR_ARCH="PE32 executable"
48757       else
48758         CORRECT_MSVCR_ARCH="PE32+ executable"
48759       fi
48760     else
48761       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48762         CORRECT_MSVCR_ARCH=386
48763       else
48764         CORRECT_MSVCR_ARCH=x86-64
48765       fi
48766     fi
48767     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48768       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48769 $as_echo "ok" >&6; }
48770       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48771 
48772   # Only process if variable expands to non-empty
48773 
48774   if test "x$MSVC_DLL" != x; then
48775     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48776 
48777   # Input might be given as Windows format, start by converting to
48778   # unix format.
48779   path="$MSVC_DLL"
48780   new_path=`$CYGPATH -u "$path"`
48781 
48782   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48783   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48784   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48785   # "foo.exe" is OK but "foo" is an error.
48786   #
48787   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48788   # It is also a way to make sure we got the proper file name for the real test later on.
48789   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48790   if test "x$test_shortpath" = x; then
48791     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48792 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48793     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48794   fi
48795 
48796   # Call helper function which possibly converts this using DOS-style short mode.
48797   # If so, the updated path is stored in $new_path.
48798 
48799   input_path="$new_path"
48800   # Check if we need to convert this using DOS-style short mode. If the path
48801   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48802   # take no chances and rewrite it.
48803   # Note: m4 eats our [], so we need to use [ and ] instead.
48804   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48805   if test "x$has_forbidden_chars" != x; then
48806     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48807     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48808     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48809     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48810       # Going to short mode and back again did indeed matter. Since short mode is
48811       # case insensitive, let's make it lowercase to improve readability.
48812       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48813       # Now convert it back to Unix-style (cygpath)
48814       input_path=`$CYGPATH -u "$shortmode_path"`
48815       new_path="$input_path"
48816     fi
48817   fi
48818 
48819   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48820   if test "x$test_cygdrive_prefix" = x; then
48821     # As a simple fix, exclude /usr/bin since it's not a real path.
48822     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48823       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48824       # a path prefixed by /cygdrive for fixpath to work.
48825       new_path="$CYGWIN_ROOT_PATH$input_path"
48826     fi
48827   fi
48828 
48829 
48830   if test "x$path" != "x$new_path"; then
48831     MSVC_DLL="$new_path"
48832     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48833 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48834   fi
48835 
48836     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48837 
48838   path="$MSVC_DLL"
48839   has_colon=`$ECHO $path | $GREP ^.:`
48840   new_path="$path"
48841   if test "x$has_colon" = x; then
48842     # Not in mixed or Windows style, start by that.
48843     new_path=`cmd //c echo $path`
48844   fi
48845 
48846 
48847   input_path="$new_path"
48848   # Check if we need to convert this using DOS-style short mode. If the path
48849   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48850   # take no chances and rewrite it.
48851   # Note: m4 eats our [], so we need to use [ and ] instead.
48852   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48853   if test "x$has_forbidden_chars" != x; then
48854     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48855     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48856   fi
48857 
48858 
48859   windows_path="$new_path"
48860   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48861     unix_path=`$CYGPATH -u "$windows_path"`
48862     new_path="$unix_path"
48863   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48864     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48865     new_path="$unix_path"
48866   fi
48867 
48868   if test "x$path" != "x$new_path"; then
48869     MSVC_DLL="$new_path"
48870     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48871 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48872   fi
48873 
48874   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48875   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48876 
48877     else
48878       # We're on a unix platform. Hooray! :)
48879       path="$MSVC_DLL"
48880       has_space=`$ECHO "$path" | $GREP " "`
48881       if test "x$has_space" != x; then
48882         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48883 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48884         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48885       fi
48886 
48887       # Use eval to expand a potential ~
48888       eval path="$path"
48889       if test ! -f "$path" && test ! -d "$path"; then
48890         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48891       fi
48892 
48893       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48894     fi
48895   fi
48896 
48897       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48898 $as_echo_n "checking for $DLL_NAME... " >&6; }
48899       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48900 $as_echo "$MSVC_DLL" >&6; }
48901     else
48902       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48903 $as_echo "incorrect, ignoring" >&6; }
48904       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48905 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48906     fi
48907   fi
48908 
48909       if test "x$MSVC_DLL" = x; then
48910         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
48911       fi
48912       MSVCP_DLL="$MSVC_DLL"
48913     elif test "x$DEVKIT_MSVCP_DLL" != x; then
48914 
48915   DLL_NAME="$MSVCP_NAME"
48916   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
48917   METHOD="devkit"
48918   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48919     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48920 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48921 
48922     # Need to check if the found msvcr is correct architecture
48923     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48924 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48925     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48926     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48927       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48928       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48929       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48930         CORRECT_MSVCR_ARCH="PE32 executable"
48931       else
48932         CORRECT_MSVCR_ARCH="PE32+ executable"
48933       fi
48934     else
48935       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48936         CORRECT_MSVCR_ARCH=386
48937       else
48938         CORRECT_MSVCR_ARCH=x86-64
48939       fi
48940     fi
48941     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48942       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48943 $as_echo "ok" >&6; }
48944       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48945 
48946   # Only process if variable expands to non-empty
48947 
48948   if test "x$MSVC_DLL" != x; then
48949     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48950 
48951   # Input might be given as Windows format, start by converting to
48952   # unix format.
48953   path="$MSVC_DLL"
48954   new_path=`$CYGPATH -u "$path"`
48955 
48956   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48957   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48958   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48959   # "foo.exe" is OK but "foo" is an error.
48960   #
48961   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48962   # It is also a way to make sure we got the proper file name for the real test later on.
48963   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48964   if test "x$test_shortpath" = x; then
48965     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48966 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48967     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48968   fi
48969 
48970   # Call helper function which possibly converts this using DOS-style short mode.
48971   # If so, the updated path is stored in $new_path.
48972 
48973   input_path="$new_path"
48974   # Check if we need to convert this using DOS-style short mode. If the path
48975   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48976   # take no chances and rewrite it.
48977   # Note: m4 eats our [], so we need to use [ and ] instead.
48978   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48979   if test "x$has_forbidden_chars" != x; then
48980     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48981     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48982     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48983     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48984       # Going to short mode and back again did indeed matter. Since short mode is
48985       # case insensitive, let's make it lowercase to improve readability.
48986       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48987       # Now convert it back to Unix-style (cygpath)
48988       input_path=`$CYGPATH -u "$shortmode_path"`
48989       new_path="$input_path"
48990     fi
48991   fi
48992 
48993   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48994   if test "x$test_cygdrive_prefix" = x; then
48995     # As a simple fix, exclude /usr/bin since it's not a real path.
48996     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48997       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48998       # a path prefixed by /cygdrive for fixpath to work.
48999       new_path="$CYGWIN_ROOT_PATH$input_path"
49000     fi
49001   fi
49002 
49003 
49004   if test "x$path" != "x$new_path"; then
49005     MSVC_DLL="$new_path"
49006     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49007 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49008   fi
49009 
49010     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49011 
49012   path="$MSVC_DLL"
49013   has_colon=`$ECHO $path | $GREP ^.:`
49014   new_path="$path"
49015   if test "x$has_colon" = x; then
49016     # Not in mixed or Windows style, start by that.
49017     new_path=`cmd //c echo $path`
49018   fi
49019 
49020 
49021   input_path="$new_path"
49022   # Check if we need to convert this using DOS-style short mode. If the path
49023   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49024   # take no chances and rewrite it.
49025   # Note: m4 eats our [], so we need to use [ and ] instead.
49026   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49027   if test "x$has_forbidden_chars" != x; then
49028     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49029     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49030   fi
49031 
49032 
49033   windows_path="$new_path"
49034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49035     unix_path=`$CYGPATH -u "$windows_path"`
49036     new_path="$unix_path"
49037   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49038     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49039     new_path="$unix_path"
49040   fi
49041 
49042   if test "x$path" != "x$new_path"; then
49043     MSVC_DLL="$new_path"
49044     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49045 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49046   fi
49047 
49048   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49049   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49050 
49051     else
49052       # We're on a unix platform. Hooray! :)
49053       path="$MSVC_DLL"
49054       has_space=`$ECHO "$path" | $GREP " "`
49055       if test "x$has_space" != x; then
49056         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49057 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49058         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49059       fi
49060 
49061       # Use eval to expand a potential ~
49062       eval path="$path"
49063       if test ! -f "$path" && test ! -d "$path"; then
49064         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49065       fi
49066 
49067       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49068     fi
49069   fi
49070 
49071       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49072 $as_echo_n "checking for $DLL_NAME... " >&6; }
49073       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49074 $as_echo "$MSVC_DLL" >&6; }
49075     else
49076       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49077 $as_echo "incorrect, ignoring" >&6; }
49078       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49079 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49080     fi
49081   fi
49082 
49083       if test "x$MSVC_DLL" = x; then
49084         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
49085       fi
49086       MSVCP_DLL="$MSVC_DLL"
49087     else
49088 
49089   DLL_NAME="${MSVCP_NAME}"
49090   MSVC_DLL=
49091 
49092   if test "x$MSVC_DLL" = x; then
49093     # Probe: Using well-known location from Visual Studio 10.0
49094     if test "x$VCINSTALLDIR" != x; then
49095       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49096 
49097   windows_path="$CYGWIN_VC_INSTALL_DIR"
49098   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49099     unix_path=`$CYGPATH -u "$windows_path"`
49100     CYGWIN_VC_INSTALL_DIR="$unix_path"
49101   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49102     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49103     CYGWIN_VC_INSTALL_DIR="$unix_path"
49104   fi
49105 
49106       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49107         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49108       else
49109         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49110       fi
49111       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49112 
49113   DLL_NAME="$DLL_NAME"
49114   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49115   METHOD="well-known location in VCINSTALLDIR"
49116   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49117     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49118 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49119 
49120     # Need to check if the found msvcr is correct architecture
49121     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49122 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49123     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49124     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49125       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49126       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49127       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49128         CORRECT_MSVCR_ARCH="PE32 executable"
49129       else
49130         CORRECT_MSVCR_ARCH="PE32+ executable"
49131       fi
49132     else
49133       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49134         CORRECT_MSVCR_ARCH=386
49135       else
49136         CORRECT_MSVCR_ARCH=x86-64
49137       fi
49138     fi
49139     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49140       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49141 $as_echo "ok" >&6; }
49142       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49143 
49144   # Only process if variable expands to non-empty
49145 
49146   if test "x$MSVC_DLL" != x; then
49147     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49148 
49149   # Input might be given as Windows format, start by converting to
49150   # unix format.
49151   path="$MSVC_DLL"
49152   new_path=`$CYGPATH -u "$path"`
49153 
49154   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49155   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49156   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49157   # "foo.exe" is OK but "foo" is an error.
49158   #
49159   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49160   # It is also a way to make sure we got the proper file name for the real test later on.
49161   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49162   if test "x$test_shortpath" = x; then
49163     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49164 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49165     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49166   fi
49167 
49168   # Call helper function which possibly converts this using DOS-style short mode.
49169   # If so, the updated path is stored in $new_path.
49170 
49171   input_path="$new_path"
49172   # Check if we need to convert this using DOS-style short mode. If the path
49173   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49174   # take no chances and rewrite it.
49175   # Note: m4 eats our [], so we need to use [ and ] instead.
49176   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49177   if test "x$has_forbidden_chars" != x; then
49178     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49179     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49180     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49181     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49182       # Going to short mode and back again did indeed matter. Since short mode is
49183       # case insensitive, let's make it lowercase to improve readability.
49184       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49185       # Now convert it back to Unix-style (cygpath)
49186       input_path=`$CYGPATH -u "$shortmode_path"`
49187       new_path="$input_path"
49188     fi
49189   fi
49190 
49191   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49192   if test "x$test_cygdrive_prefix" = x; then
49193     # As a simple fix, exclude /usr/bin since it's not a real path.
49194     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49195       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49196       # a path prefixed by /cygdrive for fixpath to work.
49197       new_path="$CYGWIN_ROOT_PATH$input_path"
49198     fi
49199   fi
49200 
49201 
49202   if test "x$path" != "x$new_path"; then
49203     MSVC_DLL="$new_path"
49204     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49205 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49206   fi
49207 
49208     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49209 
49210   path="$MSVC_DLL"
49211   has_colon=`$ECHO $path | $GREP ^.:`
49212   new_path="$path"
49213   if test "x$has_colon" = x; then
49214     # Not in mixed or Windows style, start by that.
49215     new_path=`cmd //c echo $path`
49216   fi
49217 
49218 
49219   input_path="$new_path"
49220   # Check if we need to convert this using DOS-style short mode. If the path
49221   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49222   # take no chances and rewrite it.
49223   # Note: m4 eats our [], so we need to use [ and ] instead.
49224   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49225   if test "x$has_forbidden_chars" != x; then
49226     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49227     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49228   fi
49229 
49230 
49231   windows_path="$new_path"
49232   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49233     unix_path=`$CYGPATH -u "$windows_path"`
49234     new_path="$unix_path"
49235   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49236     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49237     new_path="$unix_path"
49238   fi
49239 
49240   if test "x$path" != "x$new_path"; then
49241     MSVC_DLL="$new_path"
49242     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49243 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49244   fi
49245 
49246   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49247   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49248 
49249     else
49250       # We're on a unix platform. Hooray! :)
49251       path="$MSVC_DLL"
49252       has_space=`$ECHO "$path" | $GREP " "`
49253       if test "x$has_space" != x; then
49254         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49255 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49256         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49257       fi
49258 
49259       # Use eval to expand a potential ~
49260       eval path="$path"
49261       if test ! -f "$path" && test ! -d "$path"; then
49262         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49263       fi
49264 
49265       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49266     fi
49267   fi
49268 
49269       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49270 $as_echo_n "checking for $DLL_NAME... " >&6; }
49271       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49272 $as_echo "$MSVC_DLL" >&6; }
49273     else
49274       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49275 $as_echo "incorrect, ignoring" >&6; }
49276       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49277 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49278     fi
49279   fi
49280 
49281     fi
49282   fi
49283 
49284   if test "x$MSVC_DLL" = x; then
49285     # Probe: Check in the Boot JDK directory.
49286     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49287 
49288   DLL_NAME="$DLL_NAME"
49289   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49290   METHOD="well-known location in Boot JDK"
49291   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49292     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49293 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49294 
49295     # Need to check if the found msvcr is correct architecture
49296     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49297 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49298     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49299     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49300       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49301       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49302       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49303         CORRECT_MSVCR_ARCH="PE32 executable"
49304       else
49305         CORRECT_MSVCR_ARCH="PE32+ executable"
49306       fi
49307     else
49308       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49309         CORRECT_MSVCR_ARCH=386
49310       else
49311         CORRECT_MSVCR_ARCH=x86-64
49312       fi
49313     fi
49314     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49315       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49316 $as_echo "ok" >&6; }
49317       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49318 
49319   # Only process if variable expands to non-empty
49320 
49321   if test "x$MSVC_DLL" != x; then
49322     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49323 
49324   # Input might be given as Windows format, start by converting to
49325   # unix format.
49326   path="$MSVC_DLL"
49327   new_path=`$CYGPATH -u "$path"`
49328 
49329   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49330   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49331   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49332   # "foo.exe" is OK but "foo" is an error.
49333   #
49334   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49335   # It is also a way to make sure we got the proper file name for the real test later on.
49336   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49337   if test "x$test_shortpath" = x; then
49338     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49339 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49340     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49341   fi
49342 
49343   # Call helper function which possibly converts this using DOS-style short mode.
49344   # If so, the updated path is stored in $new_path.
49345 
49346   input_path="$new_path"
49347   # Check if we need to convert this using DOS-style short mode. If the path
49348   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49349   # take no chances and rewrite it.
49350   # Note: m4 eats our [], so we need to use [ and ] instead.
49351   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49352   if test "x$has_forbidden_chars" != x; then
49353     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49354     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49355     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49356     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49357       # Going to short mode and back again did indeed matter. Since short mode is
49358       # case insensitive, let's make it lowercase to improve readability.
49359       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49360       # Now convert it back to Unix-style (cygpath)
49361       input_path=`$CYGPATH -u "$shortmode_path"`
49362       new_path="$input_path"
49363     fi
49364   fi
49365 
49366   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49367   if test "x$test_cygdrive_prefix" = x; then
49368     # As a simple fix, exclude /usr/bin since it's not a real path.
49369     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49370       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49371       # a path prefixed by /cygdrive for fixpath to work.
49372       new_path="$CYGWIN_ROOT_PATH$input_path"
49373     fi
49374   fi
49375 
49376 
49377   if test "x$path" != "x$new_path"; then
49378     MSVC_DLL="$new_path"
49379     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49380 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49381   fi
49382 
49383     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49384 
49385   path="$MSVC_DLL"
49386   has_colon=`$ECHO $path | $GREP ^.:`
49387   new_path="$path"
49388   if test "x$has_colon" = x; then
49389     # Not in mixed or Windows style, start by that.
49390     new_path=`cmd //c echo $path`
49391   fi
49392 
49393 
49394   input_path="$new_path"
49395   # Check if we need to convert this using DOS-style short mode. If the path
49396   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49397   # take no chances and rewrite it.
49398   # Note: m4 eats our [], so we need to use [ and ] instead.
49399   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49400   if test "x$has_forbidden_chars" != x; then
49401     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49402     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49403   fi
49404 
49405 
49406   windows_path="$new_path"
49407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49408     unix_path=`$CYGPATH -u "$windows_path"`
49409     new_path="$unix_path"
49410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49411     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49412     new_path="$unix_path"
49413   fi
49414 
49415   if test "x$path" != "x$new_path"; then
49416     MSVC_DLL="$new_path"
49417     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49418 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49419   fi
49420 
49421   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49422   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49423 
49424     else
49425       # We're on a unix platform. Hooray! :)
49426       path="$MSVC_DLL"
49427       has_space=`$ECHO "$path" | $GREP " "`
49428       if test "x$has_space" != x; then
49429         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49430 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49431         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49432       fi
49433 
49434       # Use eval to expand a potential ~
49435       eval path="$path"
49436       if test ! -f "$path" && test ! -d "$path"; then
49437         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49438       fi
49439 
49440       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49441     fi
49442   fi
49443 
49444       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49445 $as_echo_n "checking for $DLL_NAME... " >&6; }
49446       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49447 $as_echo "$MSVC_DLL" >&6; }
49448     else
49449       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49450 $as_echo "incorrect, ignoring" >&6; }
49451       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49452 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49453     fi
49454   fi
49455 
49456   fi
49457 
49458   if test "x$MSVC_DLL" = x; then
49459     # Probe: Look in the Windows system32 directory
49460     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49461 
49462   windows_path="$CYGWIN_SYSTEMROOT"
49463   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49464     unix_path=`$CYGPATH -u "$windows_path"`
49465     CYGWIN_SYSTEMROOT="$unix_path"
49466   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49467     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49468     CYGWIN_SYSTEMROOT="$unix_path"
49469   fi
49470 
49471     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
49472 
49473   DLL_NAME="$DLL_NAME"
49474   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49475   METHOD="well-known location in SYSTEMROOT"
49476   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49477     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49478 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49479 
49480     # Need to check if the found msvcr is correct architecture
49481     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49482 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49483     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49484     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49485       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49486       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49487       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49488         CORRECT_MSVCR_ARCH="PE32 executable"
49489       else
49490         CORRECT_MSVCR_ARCH="PE32+ executable"
49491       fi
49492     else
49493       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49494         CORRECT_MSVCR_ARCH=386
49495       else
49496         CORRECT_MSVCR_ARCH=x86-64
49497       fi
49498     fi
49499     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49500       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49501 $as_echo "ok" >&6; }
49502       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49503 
49504   # Only process if variable expands to non-empty
49505 
49506   if test "x$MSVC_DLL" != x; then
49507     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49508 
49509   # Input might be given as Windows format, start by converting to
49510   # unix format.
49511   path="$MSVC_DLL"
49512   new_path=`$CYGPATH -u "$path"`
49513 
49514   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49515   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49516   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49517   # "foo.exe" is OK but "foo" is an error.
49518   #
49519   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49520   # It is also a way to make sure we got the proper file name for the real test later on.
49521   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49522   if test "x$test_shortpath" = x; then
49523     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49524 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49525     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49526   fi
49527 
49528   # Call helper function which possibly converts this using DOS-style short mode.
49529   # If so, the updated path is stored in $new_path.
49530 
49531   input_path="$new_path"
49532   # Check if we need to convert this using DOS-style short mode. If the path
49533   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49534   # take no chances and rewrite it.
49535   # Note: m4 eats our [], so we need to use [ and ] instead.
49536   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49537   if test "x$has_forbidden_chars" != x; then
49538     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49539     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49540     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49541     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49542       # Going to short mode and back again did indeed matter. Since short mode is
49543       # case insensitive, let's make it lowercase to improve readability.
49544       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49545       # Now convert it back to Unix-style (cygpath)
49546       input_path=`$CYGPATH -u "$shortmode_path"`
49547       new_path="$input_path"
49548     fi
49549   fi
49550 
49551   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49552   if test "x$test_cygdrive_prefix" = x; then
49553     # As a simple fix, exclude /usr/bin since it's not a real path.
49554     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49555       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49556       # a path prefixed by /cygdrive for fixpath to work.
49557       new_path="$CYGWIN_ROOT_PATH$input_path"
49558     fi
49559   fi
49560 
49561 
49562   if test "x$path" != "x$new_path"; then
49563     MSVC_DLL="$new_path"
49564     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49565 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49566   fi
49567 
49568     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49569 
49570   path="$MSVC_DLL"
49571   has_colon=`$ECHO $path | $GREP ^.:`
49572   new_path="$path"
49573   if test "x$has_colon" = x; then
49574     # Not in mixed or Windows style, start by that.
49575     new_path=`cmd //c echo $path`
49576   fi
49577 
49578 
49579   input_path="$new_path"
49580   # Check if we need to convert this using DOS-style short mode. If the path
49581   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49582   # take no chances and rewrite it.
49583   # Note: m4 eats our [], so we need to use [ and ] instead.
49584   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49585   if test "x$has_forbidden_chars" != x; then
49586     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49587     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49588   fi
49589 
49590 
49591   windows_path="$new_path"
49592   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49593     unix_path=`$CYGPATH -u "$windows_path"`
49594     new_path="$unix_path"
49595   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49596     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49597     new_path="$unix_path"
49598   fi
49599 
49600   if test "x$path" != "x$new_path"; then
49601     MSVC_DLL="$new_path"
49602     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49603 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49604   fi
49605 
49606   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49607   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49608 
49609     else
49610       # We're on a unix platform. Hooray! :)
49611       path="$MSVC_DLL"
49612       has_space=`$ECHO "$path" | $GREP " "`
49613       if test "x$has_space" != x; then
49614         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49615 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49616         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49617       fi
49618 
49619       # Use eval to expand a potential ~
49620       eval path="$path"
49621       if test ! -f "$path" && test ! -d "$path"; then
49622         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49623       fi
49624 
49625       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49626     fi
49627   fi
49628 
49629       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49630 $as_echo_n "checking for $DLL_NAME... " >&6; }
49631       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49632 $as_echo "$MSVC_DLL" >&6; }
49633     else
49634       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49635 $as_echo "incorrect, ignoring" >&6; }
49636       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49637 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49638     fi
49639   fi
49640 
49641   fi
49642 
49643   if test "x$MSVC_DLL" = x; then
49644     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49645     if test "x$VS100COMNTOOLS" != x; then
49646       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49647 
49648   windows_path="$CYGWIN_VS_TOOLS_DIR"
49649   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49650     unix_path=`$CYGPATH -u "$windows_path"`
49651     CYGWIN_VS_TOOLS_DIR="$unix_path"
49652   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49653     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49654     CYGWIN_VS_TOOLS_DIR="$unix_path"
49655   fi
49656 
49657       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49658         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49659             | $GREP -i /x64/ | $HEAD --lines 1`
49660       else
49661         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49662             | $GREP -i /x86/ | $HEAD --lines 1`
49663       fi
49664 
49665   DLL_NAME="$DLL_NAME"
49666   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49667   METHOD="search of VS100COMNTOOLS"
49668   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49669     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49670 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49671 
49672     # Need to check if the found msvcr is correct architecture
49673     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49674 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49675     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49676     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49677       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49678       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49679       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49680         CORRECT_MSVCR_ARCH="PE32 executable"
49681       else
49682         CORRECT_MSVCR_ARCH="PE32+ executable"
49683       fi
49684     else
49685       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49686         CORRECT_MSVCR_ARCH=386
49687       else
49688         CORRECT_MSVCR_ARCH=x86-64
49689       fi
49690     fi
49691     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49692       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49693 $as_echo "ok" >&6; }
49694       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49695 
49696   # Only process if variable expands to non-empty
49697 
49698   if test "x$MSVC_DLL" != x; then
49699     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49700 
49701   # Input might be given as Windows format, start by converting to
49702   # unix format.
49703   path="$MSVC_DLL"
49704   new_path=`$CYGPATH -u "$path"`
49705 
49706   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49707   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49708   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49709   # "foo.exe" is OK but "foo" is an error.
49710   #
49711   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49712   # It is also a way to make sure we got the proper file name for the real test later on.
49713   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49714   if test "x$test_shortpath" = x; then
49715     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49716 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49717     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49718   fi
49719 
49720   # Call helper function which possibly converts this using DOS-style short mode.
49721   # If so, the updated path is stored in $new_path.
49722 
49723   input_path="$new_path"
49724   # Check if we need to convert this using DOS-style short mode. If the path
49725   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49726   # take no chances and rewrite it.
49727   # Note: m4 eats our [], so we need to use [ and ] instead.
49728   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49729   if test "x$has_forbidden_chars" != x; then
49730     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49731     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49732     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49733     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49734       # Going to short mode and back again did indeed matter. Since short mode is
49735       # case insensitive, let's make it lowercase to improve readability.
49736       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49737       # Now convert it back to Unix-style (cygpath)
49738       input_path=`$CYGPATH -u "$shortmode_path"`
49739       new_path="$input_path"
49740     fi
49741   fi
49742 
49743   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49744   if test "x$test_cygdrive_prefix" = x; then
49745     # As a simple fix, exclude /usr/bin since it's not a real path.
49746     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49747       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49748       # a path prefixed by /cygdrive for fixpath to work.
49749       new_path="$CYGWIN_ROOT_PATH$input_path"
49750     fi
49751   fi
49752 
49753 
49754   if test "x$path" != "x$new_path"; then
49755     MSVC_DLL="$new_path"
49756     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49757 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49758   fi
49759 
49760     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49761 
49762   path="$MSVC_DLL"
49763   has_colon=`$ECHO $path | $GREP ^.:`
49764   new_path="$path"
49765   if test "x$has_colon" = x; then
49766     # Not in mixed or Windows style, start by that.
49767     new_path=`cmd //c echo $path`
49768   fi
49769 
49770 
49771   input_path="$new_path"
49772   # Check if we need to convert this using DOS-style short mode. If the path
49773   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49774   # take no chances and rewrite it.
49775   # Note: m4 eats our [], so we need to use [ and ] instead.
49776   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49777   if test "x$has_forbidden_chars" != x; then
49778     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49779     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49780   fi
49781 
49782 
49783   windows_path="$new_path"
49784   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49785     unix_path=`$CYGPATH -u "$windows_path"`
49786     new_path="$unix_path"
49787   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49788     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49789     new_path="$unix_path"
49790   fi
49791 
49792   if test "x$path" != "x$new_path"; then
49793     MSVC_DLL="$new_path"
49794     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49795 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49796   fi
49797 
49798   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49799   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49800 
49801     else
49802       # We're on a unix platform. Hooray! :)
49803       path="$MSVC_DLL"
49804       has_space=`$ECHO "$path" | $GREP " "`
49805       if test "x$has_space" != x; then
49806         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49807 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49808         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49809       fi
49810 
49811       # Use eval to expand a potential ~
49812       eval path="$path"
49813       if test ! -f "$path" && test ! -d "$path"; then
49814         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49815       fi
49816 
49817       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49818     fi
49819   fi
49820 
49821       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49822 $as_echo_n "checking for $DLL_NAME... " >&6; }
49823       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49824 $as_echo "$MSVC_DLL" >&6; }
49825     else
49826       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49827 $as_echo "incorrect, ignoring" >&6; }
49828       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49829 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49830     fi
49831   fi
49832 
49833     fi
49834   fi
49835 
49836   if test "x$MSVC_DLL" = x; then
49837     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49838     # (This was the original behaviour; kept since it might turn something up)
49839     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49840       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49841         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49842             | $GREP x64 | $HEAD --lines 1`
49843       else
49844         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49845             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49846         if test "x$POSSIBLE_MSVC_DLL" = x; then
49847           # We're grasping at straws now...
49848           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49849               | $HEAD --lines 1`
49850         fi
49851       fi
49852 
49853 
49854   DLL_NAME="$DLL_NAME"
49855   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49856   METHOD="search of VCINSTALLDIR"
49857   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49858     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49859 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49860 
49861     # Need to check if the found msvcr is correct architecture
49862     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49863 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49864     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49865     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49866       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49867       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49868       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49869         CORRECT_MSVCR_ARCH="PE32 executable"
49870       else
49871         CORRECT_MSVCR_ARCH="PE32+ executable"
49872       fi
49873     else
49874       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49875         CORRECT_MSVCR_ARCH=386
49876       else
49877         CORRECT_MSVCR_ARCH=x86-64
49878       fi
49879     fi
49880     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49881       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49882 $as_echo "ok" >&6; }
49883       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49884 
49885   # Only process if variable expands to non-empty
49886 
49887   if test "x$MSVC_DLL" != x; then
49888     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49889 
49890   # Input might be given as Windows format, start by converting to
49891   # unix format.
49892   path="$MSVC_DLL"
49893   new_path=`$CYGPATH -u "$path"`
49894 
49895   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49896   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49897   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49898   # "foo.exe" is OK but "foo" is an error.
49899   #
49900   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49901   # It is also a way to make sure we got the proper file name for the real test later on.
49902   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49903   if test "x$test_shortpath" = x; then
49904     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49905 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49906     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49907   fi
49908 
49909   # Call helper function which possibly converts this using DOS-style short mode.
49910   # If so, the updated path is stored in $new_path.
49911 
49912   input_path="$new_path"
49913   # Check if we need to convert this using DOS-style short mode. If the path
49914   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49915   # take no chances and rewrite it.
49916   # Note: m4 eats our [], so we need to use [ and ] instead.
49917   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49918   if test "x$has_forbidden_chars" != x; then
49919     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49920     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49921     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49922     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49923       # Going to short mode and back again did indeed matter. Since short mode is
49924       # case insensitive, let's make it lowercase to improve readability.
49925       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49926       # Now convert it back to Unix-style (cygpath)
49927       input_path=`$CYGPATH -u "$shortmode_path"`
49928       new_path="$input_path"
49929     fi
49930   fi
49931 
49932   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49933   if test "x$test_cygdrive_prefix" = x; then
49934     # As a simple fix, exclude /usr/bin since it's not a real path.
49935     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49936       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49937       # a path prefixed by /cygdrive for fixpath to work.
49938       new_path="$CYGWIN_ROOT_PATH$input_path"
49939     fi
49940   fi
49941 
49942 
49943   if test "x$path" != "x$new_path"; then
49944     MSVC_DLL="$new_path"
49945     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49946 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49947   fi
49948 
49949     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49950 
49951   path="$MSVC_DLL"
49952   has_colon=`$ECHO $path | $GREP ^.:`
49953   new_path="$path"
49954   if test "x$has_colon" = x; then
49955     # Not in mixed or Windows style, start by that.
49956     new_path=`cmd //c echo $path`
49957   fi
49958 
49959 
49960   input_path="$new_path"
49961   # Check if we need to convert this using DOS-style short mode. If the path
49962   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49963   # take no chances and rewrite it.
49964   # Note: m4 eats our [], so we need to use [ and ] instead.
49965   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49966   if test "x$has_forbidden_chars" != x; then
49967     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49968     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49969   fi
49970 
49971 
49972   windows_path="$new_path"
49973   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49974     unix_path=`$CYGPATH -u "$windows_path"`
49975     new_path="$unix_path"
49976   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49977     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49978     new_path="$unix_path"
49979   fi
49980 
49981   if test "x$path" != "x$new_path"; then
49982     MSVC_DLL="$new_path"
49983     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49984 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49985   fi
49986 
49987   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49988   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49989 
49990     else
49991       # We're on a unix platform. Hooray! :)
49992       path="$MSVC_DLL"
49993       has_space=`$ECHO "$path" | $GREP " "`
49994       if test "x$has_space" != x; then
49995         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49996 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49997         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49998       fi
49999 
50000       # Use eval to expand a potential ~
50001       eval path="$path"
50002       if test ! -f "$path" && test ! -d "$path"; then
50003         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50004       fi
50005 
50006       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50007     fi
50008   fi
50009 
50010       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50011 $as_echo_n "checking for $DLL_NAME... " >&6; }
50012       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50013 $as_echo "$MSVC_DLL" >&6; }
50014     else
50015       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50016 $as_echo "incorrect, ignoring" >&6; }
50017       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50018 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50019     fi
50020   fi
50021 
50022     fi
50023   fi
50024 
50025   if test "x$MSVC_DLL" = x; then
50026     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50027 $as_echo_n "checking for $DLL_NAME... " >&6; }
50028     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50029 $as_echo "no" >&6; }
50030     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50031   fi
50032 
50033       MSVCP_DLL="$MSVC_DLL"
50034     fi
50035 
50036   fi
50037 
50038   fi
50039 
50040 
50041   if test "x$NEEDS_LIB_X11" = xfalse; then
50042     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
50043       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
50044 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
50045     fi
50046     X_CFLAGS=
50047     X_LIBS=
50048   else
50049 
50050     if test "x${with_x}" = xno; then
50051       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
50052     fi
50053 
50054     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
50055       # The user has specified a X11 base directory. Use it for includes and
50056       # libraries, unless explicitely overridden.
50057       if test "x$x_includes" = xNONE; then
50058         x_includes="${with_x}/include"
50059       fi
50060       if test "x$x_libraries" = xNONE; then
50061         x_libraries="${with_x}/lib"
50062       fi
50063     else
50064       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
50065       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
50066       # --x-libraries for the sysroot, if that seems to be correct.
50067       if test "x$SYSROOT" != "x"; then
50068         if test "x$x_includes" = xNONE; then
50069           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
50070             x_includes="$SYSROOT/usr/X11R6/include"
50071           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
50072             x_includes="$SYSROOT/usr/include"
50073           fi
50074         fi
50075         if test "x$x_libraries" = xNONE; then
50076           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
50077             x_libraries="$SYSROOT/usr/X11R6/lib"
50078           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50079             x_libraries="$SYSROOT/usr/lib64"
50080           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
50081             x_libraries="$SYSROOT/usr/lib"
50082           fi
50083         fi
50084       fi
50085     fi
50086 
50087     # Now let autoconf do it's magic
50088     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
50089 $as_echo_n "checking for X... " >&6; }
50090 
50091 
50092 # Check whether --with-x was given.
50093 if test "${with_x+set}" = set; then :
50094   withval=$with_x;
50095 fi
50096 
50097 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
50098 if test "x$with_x" = xno; then
50099   # The user explicitly disabled X.
50100   have_x=disabled
50101 else
50102   case $x_includes,$x_libraries in #(
50103     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
50104     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
50105   $as_echo_n "(cached) " >&6
50106 else
50107   # One or both of the vars are not set, and there is no cached value.
50108 ac_x_includes=no ac_x_libraries=no
50109 rm -f -r conftest.dir
50110 if mkdir conftest.dir; then
50111   cd conftest.dir
50112   cat >Imakefile <<'_ACEOF'
50113 incroot:
50114         @echo incroot='${INCROOT}'
50115 usrlibdir:
50116         @echo usrlibdir='${USRLIBDIR}'
50117 libdir:
50118         @echo libdir='${LIBDIR}'
50119 _ACEOF
50120   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
50121     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
50122     for ac_var in incroot usrlibdir libdir; do
50123       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
50124     done
50125     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
50126     for ac_extension in a so sl dylib la dll; do
50127       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
50128          test -f "$ac_im_libdir/libX11.$ac_extension"; then
50129         ac_im_usrlibdir=$ac_im_libdir; break
50130       fi
50131     done
50132     # Screen out bogus values from the imake configuration.  They are
50133     # bogus both because they are the default anyway, and because
50134     # using them would break gcc on systems where it needs fixed includes.
50135     case $ac_im_incroot in
50136         /usr/include) ac_x_includes= ;;
50137         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
50138     esac
50139     case $ac_im_usrlibdir in
50140         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
50141         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
50142     esac
50143   fi
50144   cd ..
50145   rm -f -r conftest.dir
50146 fi
50147 
50148 # Standard set of common directories for X headers.
50149 # Check X11 before X11Rn because it is often a symlink to the current release.
50150 ac_x_header_dirs='
50151 /usr/X11/include
50152 /usr/X11R7/include
50153 /usr/X11R6/include
50154 /usr/X11R5/include
50155 /usr/X11R4/include
50156 
50157 /usr/include/X11
50158 /usr/include/X11R7
50159 /usr/include/X11R6
50160 /usr/include/X11R5
50161 /usr/include/X11R4
50162 
50163 /usr/local/X11/include
50164 /usr/local/X11R7/include
50165 /usr/local/X11R6/include
50166 /usr/local/X11R5/include
50167 /usr/local/X11R4/include
50168 
50169 /usr/local/include/X11
50170 /usr/local/include/X11R7
50171 /usr/local/include/X11R6
50172 /usr/local/include/X11R5
50173 /usr/local/include/X11R4
50174 
50175 /usr/X386/include
50176 /usr/x386/include
50177 /usr/XFree86/include/X11
50178 
50179 /usr/include
50180 /usr/local/include
50181 /usr/unsupported/include
50182 /usr/athena/include
50183 /usr/local/x11r5/include
50184 /usr/lpp/Xamples/include
50185 
50186 /usr/openwin/include
50187 /usr/openwin/share/include'
50188 
50189 if test "$ac_x_includes" = no; then
50190   # Guess where to find include files, by looking for Xlib.h.
50191   # First, try using that file with no special directory specified.
50192   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50193 /* end confdefs.h.  */
50194 #include <X11/Xlib.h>
50195 _ACEOF
50196 if ac_fn_cxx_try_cpp "$LINENO"; then :
50197   # We can compile using X headers with no special include directory.
50198 ac_x_includes=
50199 else
50200   for ac_dir in $ac_x_header_dirs; do
50201   if test -r "$ac_dir/X11/Xlib.h"; then
50202     ac_x_includes=$ac_dir
50203     break
50204   fi
50205 done
50206 fi
50207 rm -f conftest.err conftest.i conftest.$ac_ext
50208 fi # $ac_x_includes = no
50209 
50210 if test "$ac_x_libraries" = no; then
50211   # Check for the libraries.
50212   # See if we find them without any special options.
50213   # Don't add to $LIBS permanently.
50214   ac_save_LIBS=$LIBS
50215   LIBS="-lX11 $LIBS"
50216   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50217 /* end confdefs.h.  */
50218 #include <X11/Xlib.h>
50219 int
50220 main ()
50221 {
50222 XrmInitialize ()
50223   ;
50224   return 0;
50225 }
50226 _ACEOF
50227 if ac_fn_cxx_try_link "$LINENO"; then :
50228   LIBS=$ac_save_LIBS
50229 # We can link X programs with no special library path.
50230 ac_x_libraries=
50231 else
50232   LIBS=$ac_save_LIBS
50233 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
50234 do
50235   # Don't even attempt the hair of trying to link an X program!
50236   for ac_extension in a so sl dylib la dll; do
50237     if test -r "$ac_dir/libX11.$ac_extension"; then
50238       ac_x_libraries=$ac_dir
50239       break 2
50240     fi
50241   done
50242 done
50243 fi
50244 rm -f core conftest.err conftest.$ac_objext \
50245     conftest$ac_exeext conftest.$ac_ext
50246 fi # $ac_x_libraries = no
50247 
50248 case $ac_x_includes,$ac_x_libraries in #(
50249   no,* | *,no | *\'*)
50250     # Didn't find X, or a directory has "'" in its name.
50251     ac_cv_have_x="have_x=no";; #(
50252   *)
50253     # Record where we found X for the cache.
50254     ac_cv_have_x="have_x=yes\
50255         ac_x_includes='$ac_x_includes'\
50256         ac_x_libraries='$ac_x_libraries'"
50257 esac
50258 fi
50259 ;; #(
50260     *) have_x=yes;;
50261   esac
50262   eval "$ac_cv_have_x"
50263 fi # $with_x != no
50264 
50265 if test "$have_x" != yes; then
50266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
50267 $as_echo "$have_x" >&6; }
50268   no_x=yes
50269 else
50270   # If each of the values was on the command line, it overrides each guess.
50271   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
50272   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
50273   # Update the cache value to reflect the command line values.
50274   ac_cv_have_x="have_x=yes\
50275         ac_x_includes='$x_includes'\
50276         ac_x_libraries='$x_libraries'"
50277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
50278 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
50279 fi
50280 
50281     if test "$no_x" = yes; then
50282   # Not all programs may use this symbol, but it does not hurt to define it.
50283 
50284 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
50285 
50286   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
50287 else
50288   if test -n "$x_includes"; then
50289     X_CFLAGS="$X_CFLAGS -I$x_includes"
50290   fi
50291 
50292   # It would also be nice to do this for all -L options, not just this one.
50293   if test -n "$x_libraries"; then
50294     X_LIBS="$X_LIBS -L$x_libraries"
50295     # For Solaris; some versions of Sun CC require a space after -R and
50296     # others require no space.  Words are not sufficient . . . .
50297     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
50298 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
50299     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
50300     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
50301     ac_cxx_werror_flag=yes
50302     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50303 /* end confdefs.h.  */
50304 
50305 int
50306 main ()
50307 {
50308 
50309   ;
50310   return 0;
50311 }
50312 _ACEOF
50313 if ac_fn_cxx_try_link "$LINENO"; then :
50314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50315 $as_echo "no" >&6; }
50316        X_LIBS="$X_LIBS -R$x_libraries"
50317 else
50318   LIBS="$ac_xsave_LIBS -R $x_libraries"
50319        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50320 /* end confdefs.h.  */
50321 
50322 int
50323 main ()
50324 {
50325 
50326   ;
50327   return 0;
50328 }
50329 _ACEOF
50330 if ac_fn_cxx_try_link "$LINENO"; then :
50331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50332 $as_echo "yes" >&6; }
50333           X_LIBS="$X_LIBS -R $x_libraries"
50334 else
50335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
50336 $as_echo "neither works" >&6; }
50337 fi
50338 rm -f core conftest.err conftest.$ac_objext \
50339     conftest$ac_exeext conftest.$ac_ext
50340 fi
50341 rm -f core conftest.err conftest.$ac_objext \
50342     conftest$ac_exeext conftest.$ac_ext
50343     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
50344     LIBS=$ac_xsave_LIBS
50345   fi
50346 
50347   # Check for system-dependent libraries X programs must link with.
50348   # Do this before checking for the system-independent R6 libraries
50349   # (-lICE), since we may need -lsocket or whatever for X linking.
50350 
50351   if test "$ISC" = yes; then
50352     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
50353   else
50354     # Martyn Johnson says this is needed for Ultrix, if the X
50355     # libraries were built with DECnet support.  And Karl Berry says
50356     # the Alpha needs dnet_stub (dnet does not exist).
50357     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
50358     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50359 /* end confdefs.h.  */
50360 
50361 /* Override any GCC internal prototype to avoid an error.
50362    Use char because int might match the return type of a GCC
50363    builtin and then its argument prototype would still apply.  */
50364 #ifdef __cplusplus
50365 extern "C"
50366 #endif
50367 char XOpenDisplay ();
50368 int
50369 main ()
50370 {
50371 return XOpenDisplay ();
50372   ;
50373   return 0;
50374 }
50375 _ACEOF
50376 if ac_fn_cxx_try_link "$LINENO"; then :
50377 
50378 else
50379   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
50380 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
50381 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
50382   $as_echo_n "(cached) " >&6
50383 else
50384   ac_check_lib_save_LIBS=$LIBS
50385 LIBS="-ldnet  $LIBS"
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 dnet_ntoa ();
50396 int
50397 main ()
50398 {
50399 return dnet_ntoa ();
50400   ;
50401   return 0;
50402 }
50403 _ACEOF
50404 if ac_fn_cxx_try_link "$LINENO"; then :
50405   ac_cv_lib_dnet_dnet_ntoa=yes
50406 else
50407   ac_cv_lib_dnet_dnet_ntoa=no
50408 fi
50409 rm -f core conftest.err conftest.$ac_objext \
50410     conftest$ac_exeext conftest.$ac_ext
50411 LIBS=$ac_check_lib_save_LIBS
50412 fi
50413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
50414 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
50415 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
50416   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
50417 fi
50418 
50419     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
50420       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
50421 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
50422 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
50423   $as_echo_n "(cached) " >&6
50424 else
50425   ac_check_lib_save_LIBS=$LIBS
50426 LIBS="-ldnet_stub  $LIBS"
50427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50428 /* end confdefs.h.  */
50429 
50430 /* Override any GCC internal prototype to avoid an error.
50431    Use char because int might match the return type of a GCC
50432    builtin and then its argument prototype would still apply.  */
50433 #ifdef __cplusplus
50434 extern "C"
50435 #endif
50436 char dnet_ntoa ();
50437 int
50438 main ()
50439 {
50440 return dnet_ntoa ();
50441   ;
50442   return 0;
50443 }
50444 _ACEOF
50445 if ac_fn_cxx_try_link "$LINENO"; then :
50446   ac_cv_lib_dnet_stub_dnet_ntoa=yes
50447 else
50448   ac_cv_lib_dnet_stub_dnet_ntoa=no
50449 fi
50450 rm -f core conftest.err conftest.$ac_objext \
50451     conftest$ac_exeext conftest.$ac_ext
50452 LIBS=$ac_check_lib_save_LIBS
50453 fi
50454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
50455 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
50456 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
50457   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
50458 fi
50459 
50460     fi
50461 fi
50462 rm -f core conftest.err conftest.$ac_objext \
50463     conftest$ac_exeext conftest.$ac_ext
50464     LIBS="$ac_xsave_LIBS"
50465 
50466     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
50467     # to get the SysV transport functions.
50468     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
50469     # needs -lnsl.
50470     # The nsl library prevents programs from opening the X display
50471     # on Irix 5.2, according to T.E. Dickey.
50472     # The functions gethostbyname, getservbyname, and inet_addr are
50473     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
50474     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
50475 if test "x$ac_cv_func_gethostbyname" = xyes; then :
50476 
50477 fi
50478 
50479     if test $ac_cv_func_gethostbyname = no; then
50480       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
50481 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
50482 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
50483   $as_echo_n "(cached) " >&6
50484 else
50485   ac_check_lib_save_LIBS=$LIBS
50486 LIBS="-lnsl  $LIBS"
50487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50488 /* end confdefs.h.  */
50489 
50490 /* Override any GCC internal prototype to avoid an error.
50491    Use char because int might match the return type of a GCC
50492    builtin and then its argument prototype would still apply.  */
50493 #ifdef __cplusplus
50494 extern "C"
50495 #endif
50496 char gethostbyname ();
50497 int
50498 main ()
50499 {
50500 return gethostbyname ();
50501   ;
50502   return 0;
50503 }
50504 _ACEOF
50505 if ac_fn_cxx_try_link "$LINENO"; then :
50506   ac_cv_lib_nsl_gethostbyname=yes
50507 else
50508   ac_cv_lib_nsl_gethostbyname=no
50509 fi
50510 rm -f core conftest.err conftest.$ac_objext \
50511     conftest$ac_exeext conftest.$ac_ext
50512 LIBS=$ac_check_lib_save_LIBS
50513 fi
50514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
50515 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
50516 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
50517   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
50518 fi
50519 
50520       if test $ac_cv_lib_nsl_gethostbyname = no; then
50521         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
50522 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
50523 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
50524   $as_echo_n "(cached) " >&6
50525 else
50526   ac_check_lib_save_LIBS=$LIBS
50527 LIBS="-lbsd  $LIBS"
50528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50529 /* end confdefs.h.  */
50530 
50531 /* Override any GCC internal prototype to avoid an error.
50532    Use char because int might match the return type of a GCC
50533    builtin and then its argument prototype would still apply.  */
50534 #ifdef __cplusplus
50535 extern "C"
50536 #endif
50537 char gethostbyname ();
50538 int
50539 main ()
50540 {
50541 return gethostbyname ();
50542   ;
50543   return 0;
50544 }
50545 _ACEOF
50546 if ac_fn_cxx_try_link "$LINENO"; then :
50547   ac_cv_lib_bsd_gethostbyname=yes
50548 else
50549   ac_cv_lib_bsd_gethostbyname=no
50550 fi
50551 rm -f core conftest.err conftest.$ac_objext \
50552     conftest$ac_exeext conftest.$ac_ext
50553 LIBS=$ac_check_lib_save_LIBS
50554 fi
50555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
50556 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
50557 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
50558   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
50559 fi
50560 
50561       fi
50562     fi
50563 
50564     # lieder@skyler.mavd.honeywell.com says without -lsocket,
50565     # socket/setsockopt and other routines are undefined under SCO ODT
50566     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
50567     # on later versions), says Simon Leinen: it contains gethostby*
50568     # variants that don't use the name server (or something).  -lsocket
50569     # must be given before -lnsl if both are needed.  We assume that
50570     # if connect needs -lnsl, so does gethostbyname.
50571     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
50572 if test "x$ac_cv_func_connect" = xyes; then :
50573 
50574 fi
50575 
50576     if test $ac_cv_func_connect = no; then
50577       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
50578 $as_echo_n "checking for connect in -lsocket... " >&6; }
50579 if ${ac_cv_lib_socket_connect+:} false; then :
50580   $as_echo_n "(cached) " >&6
50581 else
50582   ac_check_lib_save_LIBS=$LIBS
50583 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
50584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50585 /* end confdefs.h.  */
50586 
50587 /* Override any GCC internal prototype to avoid an error.
50588    Use char because int might match the return type of a GCC
50589    builtin and then its argument prototype would still apply.  */
50590 #ifdef __cplusplus
50591 extern "C"
50592 #endif
50593 char connect ();
50594 int
50595 main ()
50596 {
50597 return connect ();
50598   ;
50599   return 0;
50600 }
50601 _ACEOF
50602 if ac_fn_cxx_try_link "$LINENO"; then :
50603   ac_cv_lib_socket_connect=yes
50604 else
50605   ac_cv_lib_socket_connect=no
50606 fi
50607 rm -f core conftest.err conftest.$ac_objext \
50608     conftest$ac_exeext conftest.$ac_ext
50609 LIBS=$ac_check_lib_save_LIBS
50610 fi
50611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
50612 $as_echo "$ac_cv_lib_socket_connect" >&6; }
50613 if test "x$ac_cv_lib_socket_connect" = xyes; then :
50614   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
50615 fi
50616 
50617     fi
50618 
50619     # Guillermo Gomez says -lposix is necessary on A/UX.
50620     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
50621 if test "x$ac_cv_func_remove" = xyes; then :
50622 
50623 fi
50624 
50625     if test $ac_cv_func_remove = no; then
50626       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
50627 $as_echo_n "checking for remove in -lposix... " >&6; }
50628 if ${ac_cv_lib_posix_remove+:} false; then :
50629   $as_echo_n "(cached) " >&6
50630 else
50631   ac_check_lib_save_LIBS=$LIBS
50632 LIBS="-lposix  $LIBS"
50633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50634 /* end confdefs.h.  */
50635 
50636 /* Override any GCC internal prototype to avoid an error.
50637    Use char because int might match the return type of a GCC
50638    builtin and then its argument prototype would still apply.  */
50639 #ifdef __cplusplus
50640 extern "C"
50641 #endif
50642 char remove ();
50643 int
50644 main ()
50645 {
50646 return remove ();
50647   ;
50648   return 0;
50649 }
50650 _ACEOF
50651 if ac_fn_cxx_try_link "$LINENO"; then :
50652   ac_cv_lib_posix_remove=yes
50653 else
50654   ac_cv_lib_posix_remove=no
50655 fi
50656 rm -f core conftest.err conftest.$ac_objext \
50657     conftest$ac_exeext conftest.$ac_ext
50658 LIBS=$ac_check_lib_save_LIBS
50659 fi
50660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
50661 $as_echo "$ac_cv_lib_posix_remove" >&6; }
50662 if test "x$ac_cv_lib_posix_remove" = xyes; then :
50663   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
50664 fi
50665 
50666     fi
50667 
50668     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
50669     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
50670 if test "x$ac_cv_func_shmat" = xyes; then :
50671 
50672 fi
50673 
50674     if test $ac_cv_func_shmat = no; then
50675       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
50676 $as_echo_n "checking for shmat in -lipc... " >&6; }
50677 if ${ac_cv_lib_ipc_shmat+:} false; then :
50678   $as_echo_n "(cached) " >&6
50679 else
50680   ac_check_lib_save_LIBS=$LIBS
50681 LIBS="-lipc  $LIBS"
50682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50683 /* end confdefs.h.  */
50684 
50685 /* Override any GCC internal prototype to avoid an error.
50686    Use char because int might match the return type of a GCC
50687    builtin and then its argument prototype would still apply.  */
50688 #ifdef __cplusplus
50689 extern "C"
50690 #endif
50691 char shmat ();
50692 int
50693 main ()
50694 {
50695 return shmat ();
50696   ;
50697   return 0;
50698 }
50699 _ACEOF
50700 if ac_fn_cxx_try_link "$LINENO"; then :
50701   ac_cv_lib_ipc_shmat=yes
50702 else
50703   ac_cv_lib_ipc_shmat=no
50704 fi
50705 rm -f core conftest.err conftest.$ac_objext \
50706     conftest$ac_exeext conftest.$ac_ext
50707 LIBS=$ac_check_lib_save_LIBS
50708 fi
50709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
50710 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
50711 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
50712   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
50713 fi
50714 
50715     fi
50716   fi
50717 
50718   # Check for libraries that X11R6 Xt/Xaw programs need.
50719   ac_save_LDFLAGS=$LDFLAGS
50720   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
50721   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
50722   # check for ICE first), but we must link in the order -lSM -lICE or
50723   # we get undefined symbols.  So assume we have SM if we have ICE.
50724   # These have to be linked with before -lX11, unlike the other
50725   # libraries we check for below, so use a different variable.
50726   # John Interrante, Karl Berry
50727   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
50728 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
50729 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
50730   $as_echo_n "(cached) " >&6
50731 else
50732   ac_check_lib_save_LIBS=$LIBS
50733 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
50734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50735 /* end confdefs.h.  */
50736 
50737 /* Override any GCC internal prototype to avoid an error.
50738    Use char because int might match the return type of a GCC
50739    builtin and then its argument prototype would still apply.  */
50740 #ifdef __cplusplus
50741 extern "C"
50742 #endif
50743 char IceConnectionNumber ();
50744 int
50745 main ()
50746 {
50747 return IceConnectionNumber ();
50748   ;
50749   return 0;
50750 }
50751 _ACEOF
50752 if ac_fn_cxx_try_link "$LINENO"; then :
50753   ac_cv_lib_ICE_IceConnectionNumber=yes
50754 else
50755   ac_cv_lib_ICE_IceConnectionNumber=no
50756 fi
50757 rm -f core conftest.err conftest.$ac_objext \
50758     conftest$ac_exeext conftest.$ac_ext
50759 LIBS=$ac_check_lib_save_LIBS
50760 fi
50761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
50762 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
50763 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
50764   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
50765 fi
50766 
50767   LDFLAGS=$ac_save_LDFLAGS
50768 
50769 fi
50770 
50771 
50772     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
50773     # this doesn't make sense so we remove it.
50774     if test "x$COMPILE_TYPE" = xcross; then
50775       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
50776     fi
50777 
50778     if test "x$no_x" = xyes; then
50779 
50780   # Print a helpful message on how to acquire the necessary build dependency.
50781   # x11 is the help tag: freetype, cups, alsa etc
50782   MISSING_DEPENDENCY=x11
50783 
50784   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50785     cygwin_help $MISSING_DEPENDENCY
50786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50787     msys_help $MISSING_DEPENDENCY
50788   else
50789     PKGHANDLER_COMMAND=
50790 
50791     case $PKGHANDLER in
50792       apt-get)
50793         apt_help     $MISSING_DEPENDENCY ;;
50794       yum)
50795         yum_help     $MISSING_DEPENDENCY ;;
50796       port)
50797         port_help    $MISSING_DEPENDENCY ;;
50798       pkgutil)
50799         pkgutil_help $MISSING_DEPENDENCY ;;
50800       pkgadd)
50801         pkgadd_help  $MISSING_DEPENDENCY ;;
50802     esac
50803 
50804     if test "x$PKGHANDLER_COMMAND" != x; then
50805       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50806     fi
50807   fi
50808 
50809       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
50810     fi
50811 
50812     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50813       OPENWIN_HOME="/usr/openwin"
50814       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
50815       X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
50816           -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
50817           -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
50818           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
50819     fi
50820 
50821     ac_ext=c
50822 ac_cpp='$CPP $CPPFLAGS'
50823 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50824 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50825 ac_compiler_gnu=$ac_cv_c_compiler_gnu
50826 
50827     OLD_CFLAGS="$CFLAGS"
50828     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
50829 
50830     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
50831     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
50832 do :
50833   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
50834 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
50835           # include <X11/Xlib.h>
50836           # include <X11/Xutil.h>
50837 
50838 
50839 "
50840 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
50841   cat >>confdefs.h <<_ACEOF
50842 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
50843 _ACEOF
50844  X11_HEADERS_OK=yes
50845 else
50846   X11_HEADERS_OK=no; break
50847 fi
50848 
50849 done
50850 
50851 
50852     if test "x$X11_HEADERS_OK" = xno; then
50853 
50854   # Print a helpful message on how to acquire the necessary build dependency.
50855   # x11 is the help tag: freetype, cups, alsa etc
50856   MISSING_DEPENDENCY=x11
50857 
50858   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50859     cygwin_help $MISSING_DEPENDENCY
50860   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50861     msys_help $MISSING_DEPENDENCY
50862   else
50863     PKGHANDLER_COMMAND=
50864 
50865     case $PKGHANDLER in
50866       apt-get)
50867         apt_help     $MISSING_DEPENDENCY ;;
50868       yum)
50869         yum_help     $MISSING_DEPENDENCY ;;
50870       port)
50871         port_help    $MISSING_DEPENDENCY ;;
50872       pkgutil)
50873         pkgutil_help $MISSING_DEPENDENCY ;;
50874       pkgadd)
50875         pkgadd_help  $MISSING_DEPENDENCY ;;
50876     esac
50877 
50878     if test "x$PKGHANDLER_COMMAND" != x; then
50879       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50880     fi
50881   fi
50882 
50883       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
50884     fi
50885 
50886     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
50887     # defined in libawt_xawt.
50888     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
50889 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
50890     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50891 /* end confdefs.h.  */
50892 #include <X11/extensions/Xrender.h>
50893 int
50894 main ()
50895 {
50896 XLinearGradient x;
50897   ;
50898   return 0;
50899 }
50900 _ACEOF
50901 if ac_fn_c_try_compile "$LINENO"; then :
50902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50903 $as_echo "yes" >&6; }
50904 else
50905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50906 $as_echo "no" >&6; }
50907          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
50908 fi
50909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50910 
50911     CFLAGS="$OLD_CFLAGS"
50912     ac_ext=cpp
50913 ac_cpp='$CXXCPP $CPPFLAGS'
50914 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50915 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50916 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50917 
50918   fi # NEEDS_LIB_X11
50919 
50920 
50921 
50922 
50923 
50924 
50925 # Check whether --with-cups was given.
50926 if test "${with_cups+set}" = set; then :
50927   withval=$with_cups;
50928 fi
50929 
50930 
50931 # Check whether --with-cups-include was given.
50932 if test "${with_cups_include+set}" = set; then :
50933   withval=$with_cups_include;
50934 fi
50935 
50936 
50937   if test "x$NEEDS_LIB_CUPS" = xfalse; then
50938     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
50939         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
50940       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
50941 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
50942     fi
50943     CUPS_CFLAGS=
50944   else
50945     CUPS_FOUND=no
50946 
50947     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
50948       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
50949     fi
50950 
50951     if test "x${with_cups}" != x; then
50952       CUPS_CFLAGS="-I${with_cups}/include"
50953       CUPS_FOUND=yes
50954     fi
50955     if test "x${with_cups_include}" != x; then
50956       CUPS_CFLAGS="-I${with_cups_include}"
50957       CUPS_FOUND=yes
50958     fi
50959     if test "x$CUPS_FOUND" = xno; then
50960       # Are the cups headers installed in the default /usr/include location?
50961       for ac_header in cups/cups.h cups/ppd.h
50962 do :
50963   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
50964 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
50965 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
50966   cat >>confdefs.h <<_ACEOF
50967 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
50968 _ACEOF
50969 
50970           CUPS_FOUND=yes
50971           CUPS_CFLAGS=
50972           DEFAULT_CUPS=yes
50973 
50974 fi
50975 
50976 done
50977 
50978     fi
50979     if test "x$CUPS_FOUND" = xno; then
50980       # Getting nervous now? Lets poke around for standard Solaris third-party
50981       # package installation locations.
50982       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
50983 $as_echo_n "checking for cups headers... " >&6; }
50984       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
50985         # An SFW package seems to be installed!
50986         CUPS_FOUND=yes
50987         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
50988       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
50989         # A CSW package seems to be installed!
50990         CUPS_FOUND=yes
50991         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
50992       fi
50993       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
50994 $as_echo "$CUPS_FOUND" >&6; }
50995     fi
50996     if test "x$CUPS_FOUND" = xno; then
50997 
50998   # Print a helpful message on how to acquire the necessary build dependency.
50999   # cups is the help tag: freetype, cups, alsa etc
51000   MISSING_DEPENDENCY=cups
51001 
51002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51003     cygwin_help $MISSING_DEPENDENCY
51004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51005     msys_help $MISSING_DEPENDENCY
51006   else
51007     PKGHANDLER_COMMAND=
51008 
51009     case $PKGHANDLER in
51010       apt-get)
51011         apt_help     $MISSING_DEPENDENCY ;;
51012       yum)
51013         yum_help     $MISSING_DEPENDENCY ;;
51014       port)
51015         port_help    $MISSING_DEPENDENCY ;;
51016       pkgutil)
51017         pkgutil_help $MISSING_DEPENDENCY ;;
51018       pkgadd)
51019         pkgadd_help  $MISSING_DEPENDENCY ;;
51020     esac
51021 
51022     if test "x$PKGHANDLER_COMMAND" != x; then
51023       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51024     fi
51025   fi
51026 
51027       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
51028     fi
51029   fi
51030 
51031 
51032 
51033 
51034 
51035 # Check whether --with-freetype was given.
51036 if test "${with_freetype+set}" = set; then :
51037   withval=$with_freetype;
51038 fi
51039 
51040 
51041 # Check whether --with-freetype-include was given.
51042 if test "${with_freetype_include+set}" = set; then :
51043   withval=$with_freetype_include;
51044 fi
51045 
51046 
51047 # Check whether --with-freetype-lib was given.
51048 if test "${with_freetype_lib+set}" = set; then :
51049   withval=$with_freetype_lib;
51050 fi
51051 
51052 
51053 # Check whether --with-freetype-src was given.
51054 if test "${with_freetype_src+set}" = set; then :
51055   withval=$with_freetype_src;
51056 fi
51057 
51058   # Check whether --enable-freetype-bundling was given.
51059 if test "${enable_freetype_bundling+set}" = set; then :
51060   enableval=$enable_freetype_bundling;
51061 fi
51062 
51063 
51064   # Need to specify explicitly since it needs to be overridden on some versions of macosx
51065   FREETYPE_BASE_NAME=freetype
51066   FREETYPE_CFLAGS=
51067   FREETYPE_LIBS=
51068   FREETYPE_BUNDLE_LIB_PATH=
51069 
51070   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
51071     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
51072         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
51073         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
51074         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
51075       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
51076 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
51077     fi
51078     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
51079       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
51080 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
51081     fi
51082   else
51083     # freetype is needed to build; go get it!
51084 
51085     BUNDLE_FREETYPE="$enable_freetype_bundling"
51086 
51087     if  test "x$with_freetype_src" != x; then
51088       if test "x$OPENJDK_TARGET_OS" = xwindows; then
51089         # Try to build freetype if --with-freetype-src was given on Windows
51090 
51091   FREETYPE_SRC_PATH="$with_freetype_src"
51092   BUILD_FREETYPE=yes
51093 
51094   # Check if the freetype sources are acessible..
51095   if ! test -d $FREETYPE_SRC_PATH; then
51096     { $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
51097 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
51098     BUILD_FREETYPE=no
51099   fi
51100   # ..and contain a vc2010 project file
51101   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
51102   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
51103     { $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
51104 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
51105     BUILD_FREETYPE=no
51106   fi
51107   # Now check if configure found a version of 'msbuild.exe'
51108   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
51109     { $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
51110 $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;}
51111     BUILD_FREETYPE=no
51112   fi
51113 
51114   # Ready to go..
51115   if test "x$BUILD_FREETYPE" = xyes; then
51116     # msbuild requires trailing slashes for output directories
51117     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
51118     freetype_lib_path_unix="$freetype_lib_path"
51119     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
51120 
51121   unix_path="$vcxproj_path"
51122   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51123     windows_path=`$CYGPATH -m "$unix_path"`
51124     vcxproj_path="$windows_path"
51125   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51126     windows_path=`cmd //c echo $unix_path`
51127     vcxproj_path="$windows_path"
51128   fi
51129 
51130 
51131   unix_path="$freetype_lib_path"
51132   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51133     windows_path=`$CYGPATH -m "$unix_path"`
51134     freetype_lib_path="$windows_path"
51135   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51136     windows_path=`cmd //c echo $unix_path`
51137     freetype_lib_path="$windows_path"
51138   fi
51139 
51140 
51141   unix_path="$freetype_obj_path"
51142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51143     windows_path=`$CYGPATH -m "$unix_path"`
51144     freetype_obj_path="$windows_path"
51145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51146     windows_path=`cmd //c echo $unix_path`
51147     freetype_obj_path="$windows_path"
51148   fi
51149 
51150     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51151       freetype_platform=x64
51152     else
51153       freetype_platform=win32
51154     fi
51155 
51156     # The original freetype project file is for VS 2010 (i.e. 'v100'),
51157     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
51158     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
51159     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
51160     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
51161 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
51162 
51163     # First we try to build the freetype.dll
51164     $ECHO -e "@echo off\n"\
51165         "$MSBUILD $vcxproj_path "\
51166         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51167         "/p:Configuration=\"Release Multithreaded\" "\
51168         "/p:Platform=$freetype_platform "\
51169         "/p:ConfigurationType=DynamicLibrary "\
51170         "/p:TargetName=freetype "\
51171         "/p:OutDir=\"$freetype_lib_path\" "\
51172         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
51173     cmd /c freetype.bat
51174 
51175     if test -s "$freetype_lib_path_unix/freetype.dll"; then
51176       # If that succeeds we also build freetype.lib
51177       $ECHO -e "@echo off\n"\
51178           "$MSBUILD $vcxproj_path "\
51179           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51180           "/p:Configuration=\"Release Multithreaded\" "\
51181           "/p:Platform=$freetype_platform "\
51182           "/p:ConfigurationType=StaticLibrary "\
51183           "/p:TargetName=freetype "\
51184           "/p:OutDir=\"$freetype_lib_path\" "\
51185           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
51186       cmd /c freetype.bat
51187 
51188       if test -s "$freetype_lib_path_unix/freetype.lib"; then
51189         # Once we build both, lib and dll, set freetype lib and include path appropriately
51190         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
51191         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
51192         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
51193 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
51194       else
51195         BUILD_FREETYPE=no
51196       fi
51197     else
51198       BUILD_FREETYPE=no
51199     fi
51200   fi
51201 
51202         if test "x$BUILD_FREETYPE" = xyes; then
51203           # Okay, we built it. Check that it works.
51204 
51205   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51206   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51207   METHOD="--with-freetype-src"
51208 
51209   # Let's start with an optimistic view of the world :-)
51210   FOUND_FREETYPE=yes
51211 
51212   # First look for the canonical freetype main include file ft2build.h.
51213   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51214     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51215     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51216     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51217       # Fail.
51218       FOUND_FREETYPE=no
51219     fi
51220   fi
51221 
51222   if test "x$FOUND_FREETYPE" = xyes; then
51223     # Include file found, let's continue the sanity check.
51224     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51225 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51226 
51227     # Reset to default value
51228     FREETYPE_BASE_NAME=freetype
51229     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51230     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51231       if test "x$OPENJDK_TARGET_OS" = xmacosx \
51232           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51233         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51234         # for the .6 version explicitly.
51235         FREETYPE_BASE_NAME=freetype.6
51236         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51237         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51238 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51239       else
51240         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51241 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51242         FOUND_FREETYPE=no
51243       fi
51244     else
51245       if test "x$OPENJDK_TARGET_OS" = xwindows; then
51246         # On Windows, we will need both .lib and .dll file.
51247         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51248           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51249 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51250           FOUND_FREETYPE=no
51251         fi
51252       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51253           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51254         # Found lib in isa dir, use that instead.
51255         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51256         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51257 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51258       fi
51259     fi
51260   fi
51261 
51262   if test "x$FOUND_FREETYPE" = xyes; then
51263 
51264   # Only process if variable expands to non-empty
51265 
51266   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51267     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51268 
51269   # Input might be given as Windows format, start by converting to
51270   # unix format.
51271   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51272   new_path=`$CYGPATH -u "$path"`
51273 
51274   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51275   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51276   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51277   # "foo.exe" is OK but "foo" is an error.
51278   #
51279   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51280   # It is also a way to make sure we got the proper file name for the real test later on.
51281   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51282   if test "x$test_shortpath" = x; then
51283     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51284 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51285     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51286   fi
51287 
51288   # Call helper function which possibly converts this using DOS-style short mode.
51289   # If so, the updated path is stored in $new_path.
51290 
51291   input_path="$new_path"
51292   # Check if we need to convert this using DOS-style short mode. If the path
51293   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51294   # take no chances and rewrite it.
51295   # Note: m4 eats our [], so we need to use [ and ] instead.
51296   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51297   if test "x$has_forbidden_chars" != x; then
51298     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51299     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51300     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51301     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51302       # Going to short mode and back again did indeed matter. Since short mode is
51303       # case insensitive, let's make it lowercase to improve readability.
51304       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51305       # Now convert it back to Unix-style (cygpath)
51306       input_path=`$CYGPATH -u "$shortmode_path"`
51307       new_path="$input_path"
51308     fi
51309   fi
51310 
51311   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51312   if test "x$test_cygdrive_prefix" = x; then
51313     # As a simple fix, exclude /usr/bin since it's not a real path.
51314     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51315       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51316       # a path prefixed by /cygdrive for fixpath to work.
51317       new_path="$CYGWIN_ROOT_PATH$input_path"
51318     fi
51319   fi
51320 
51321 
51322   if test "x$path" != "x$new_path"; then
51323     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51324     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51325 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51326   fi
51327 
51328     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51329 
51330   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51331   has_colon=`$ECHO $path | $GREP ^.:`
51332   new_path="$path"
51333   if test "x$has_colon" = x; then
51334     # Not in mixed or Windows style, start by that.
51335     new_path=`cmd //c echo $path`
51336   fi
51337 
51338 
51339   input_path="$new_path"
51340   # Check if we need to convert this using DOS-style short mode. If the path
51341   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51342   # take no chances and rewrite it.
51343   # Note: m4 eats our [], so we need to use [ and ] instead.
51344   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51345   if test "x$has_forbidden_chars" != x; then
51346     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51347     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51348   fi
51349 
51350 
51351   windows_path="$new_path"
51352   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51353     unix_path=`$CYGPATH -u "$windows_path"`
51354     new_path="$unix_path"
51355   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51356     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51357     new_path="$unix_path"
51358   fi
51359 
51360   if test "x$path" != "x$new_path"; then
51361     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51362     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51363 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51364   fi
51365 
51366   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51367   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51368 
51369     else
51370       # We're on a unix platform. Hooray! :)
51371       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51372       has_space=`$ECHO "$path" | $GREP " "`
51373       if test "x$has_space" != x; then
51374         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51375 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51376         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51377       fi
51378 
51379       # Use eval to expand a potential ~
51380       eval path="$path"
51381       if test ! -f "$path" && test ! -d "$path"; then
51382         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51383       fi
51384 
51385       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51386     fi
51387   fi
51388 
51389 
51390   # Only process if variable expands to non-empty
51391 
51392   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51393     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51394 
51395   # Input might be given as Windows format, start by converting to
51396   # unix format.
51397   path="$POTENTIAL_FREETYPE_LIB_PATH"
51398   new_path=`$CYGPATH -u "$path"`
51399 
51400   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51401   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51402   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51403   # "foo.exe" is OK but "foo" is an error.
51404   #
51405   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51406   # It is also a way to make sure we got the proper file name for the real test later on.
51407   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51408   if test "x$test_shortpath" = x; then
51409     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51410 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51411     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51412   fi
51413 
51414   # Call helper function which possibly converts this using DOS-style short mode.
51415   # If so, the updated path is stored in $new_path.
51416 
51417   input_path="$new_path"
51418   # Check if we need to convert this using DOS-style short mode. If the path
51419   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51420   # take no chances and rewrite it.
51421   # Note: m4 eats our [], so we need to use [ and ] instead.
51422   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51423   if test "x$has_forbidden_chars" != x; then
51424     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51425     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51426     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51427     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51428       # Going to short mode and back again did indeed matter. Since short mode is
51429       # case insensitive, let's make it lowercase to improve readability.
51430       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51431       # Now convert it back to Unix-style (cygpath)
51432       input_path=`$CYGPATH -u "$shortmode_path"`
51433       new_path="$input_path"
51434     fi
51435   fi
51436 
51437   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51438   if test "x$test_cygdrive_prefix" = x; then
51439     # As a simple fix, exclude /usr/bin since it's not a real path.
51440     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51441       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51442       # a path prefixed by /cygdrive for fixpath to work.
51443       new_path="$CYGWIN_ROOT_PATH$input_path"
51444     fi
51445   fi
51446 
51447 
51448   if test "x$path" != "x$new_path"; then
51449     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51450     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51451 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51452   fi
51453 
51454     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51455 
51456   path="$POTENTIAL_FREETYPE_LIB_PATH"
51457   has_colon=`$ECHO $path | $GREP ^.:`
51458   new_path="$path"
51459   if test "x$has_colon" = x; then
51460     # Not in mixed or Windows style, start by that.
51461     new_path=`cmd //c echo $path`
51462   fi
51463 
51464 
51465   input_path="$new_path"
51466   # Check if we need to convert this using DOS-style short mode. If the path
51467   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51468   # take no chances and rewrite it.
51469   # Note: m4 eats our [], so we need to use [ and ] instead.
51470   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51471   if test "x$has_forbidden_chars" != x; then
51472     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51473     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51474   fi
51475 
51476 
51477   windows_path="$new_path"
51478   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51479     unix_path=`$CYGPATH -u "$windows_path"`
51480     new_path="$unix_path"
51481   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51482     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51483     new_path="$unix_path"
51484   fi
51485 
51486   if test "x$path" != "x$new_path"; then
51487     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51488     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51489 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51490   fi
51491 
51492   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51493   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51494 
51495     else
51496       # We're on a unix platform. Hooray! :)
51497       path="$POTENTIAL_FREETYPE_LIB_PATH"
51498       has_space=`$ECHO "$path" | $GREP " "`
51499       if test "x$has_space" != x; then
51500         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51501 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51502         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51503       fi
51504 
51505       # Use eval to expand a potential ~
51506       eval path="$path"
51507       if test ! -f "$path" && test ! -d "$path"; then
51508         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51509       fi
51510 
51511       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51512     fi
51513   fi
51514 
51515 
51516     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51517     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51518 $as_echo_n "checking for freetype includes... " >&6; }
51519     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51520 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51521     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51522     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51523 $as_echo_n "checking for freetype libraries... " >&6; }
51524     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51525 $as_echo "$FREETYPE_LIB_PATH" >&6; }
51526   fi
51527 
51528           if test "x$FOUND_FREETYPE" != xyes; then
51529             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
51530           fi
51531         else
51532           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
51533 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
51534           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
51535         fi
51536       else
51537         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
51538 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
51539       fi
51540     fi
51541 
51542     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
51543       # User has specified settings
51544 
51545       if test "x$BUNDLE_FREETYPE" = x; then
51546         # If not specified, default is to bundle freetype
51547         BUNDLE_FREETYPE=yes
51548       fi
51549 
51550       if test "x$with_freetype" != x; then
51551         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
51552         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
51553       fi
51554 
51555       # Allow --with-freetype-lib and --with-freetype-include to override
51556       if test "x$with_freetype_include" != x; then
51557         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
51558       fi
51559       if test "x$with_freetype_lib" != x; then
51560         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
51561       fi
51562 
51563       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51564         # Okay, we got it. Check that it works.
51565 
51566   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51567   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51568   METHOD="--with-freetype"
51569 
51570   # Let's start with an optimistic view of the world :-)
51571   FOUND_FREETYPE=yes
51572 
51573   # First look for the canonical freetype main include file ft2build.h.
51574   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51575     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51576     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51577     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51578       # Fail.
51579       FOUND_FREETYPE=no
51580     fi
51581   fi
51582 
51583   if test "x$FOUND_FREETYPE" = xyes; then
51584     # Include file found, let's continue the sanity check.
51585     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51586 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51587 
51588     # Reset to default value
51589     FREETYPE_BASE_NAME=freetype
51590     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51591     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51592       if test "x$OPENJDK_TARGET_OS" = xmacosx \
51593           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51594         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51595         # for the .6 version explicitly.
51596         FREETYPE_BASE_NAME=freetype.6
51597         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51598         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51599 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51600       else
51601         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51602 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51603         FOUND_FREETYPE=no
51604       fi
51605     else
51606       if test "x$OPENJDK_TARGET_OS" = xwindows; then
51607         # On Windows, we will need both .lib and .dll file.
51608         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51609           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51610 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51611           FOUND_FREETYPE=no
51612         fi
51613       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51614           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51615         # Found lib in isa dir, use that instead.
51616         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51617         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51618 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51619       fi
51620     fi
51621   fi
51622 
51623   if test "x$FOUND_FREETYPE" = xyes; then
51624 
51625   # Only process if variable expands to non-empty
51626 
51627   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51628     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51629 
51630   # Input might be given as Windows format, start by converting to
51631   # unix format.
51632   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51633   new_path=`$CYGPATH -u "$path"`
51634 
51635   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51636   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51637   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51638   # "foo.exe" is OK but "foo" is an error.
51639   #
51640   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51641   # It is also a way to make sure we got the proper file name for the real test later on.
51642   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51643   if test "x$test_shortpath" = x; then
51644     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51645 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51646     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51647   fi
51648 
51649   # Call helper function which possibly converts this using DOS-style short mode.
51650   # If so, the updated path is stored in $new_path.
51651 
51652   input_path="$new_path"
51653   # Check if we need to convert this using DOS-style short mode. If the path
51654   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51655   # take no chances and rewrite it.
51656   # Note: m4 eats our [], so we need to use [ and ] instead.
51657   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51658   if test "x$has_forbidden_chars" != x; then
51659     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51660     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51661     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51662     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51663       # Going to short mode and back again did indeed matter. Since short mode is
51664       # case insensitive, let's make it lowercase to improve readability.
51665       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51666       # Now convert it back to Unix-style (cygpath)
51667       input_path=`$CYGPATH -u "$shortmode_path"`
51668       new_path="$input_path"
51669     fi
51670   fi
51671 
51672   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51673   if test "x$test_cygdrive_prefix" = x; then
51674     # As a simple fix, exclude /usr/bin since it's not a real path.
51675     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51676       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51677       # a path prefixed by /cygdrive for fixpath to work.
51678       new_path="$CYGWIN_ROOT_PATH$input_path"
51679     fi
51680   fi
51681 
51682 
51683   if test "x$path" != "x$new_path"; then
51684     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51685     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51686 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51687   fi
51688 
51689     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51690 
51691   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51692   has_colon=`$ECHO $path | $GREP ^.:`
51693   new_path="$path"
51694   if test "x$has_colon" = x; then
51695     # Not in mixed or Windows style, start by that.
51696     new_path=`cmd //c echo $path`
51697   fi
51698 
51699 
51700   input_path="$new_path"
51701   # Check if we need to convert this using DOS-style short mode. If the path
51702   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51703   # take no chances and rewrite it.
51704   # Note: m4 eats our [], so we need to use [ and ] instead.
51705   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51706   if test "x$has_forbidden_chars" != x; then
51707     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51708     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51709   fi
51710 
51711 
51712   windows_path="$new_path"
51713   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51714     unix_path=`$CYGPATH -u "$windows_path"`
51715     new_path="$unix_path"
51716   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51717     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51718     new_path="$unix_path"
51719   fi
51720 
51721   if test "x$path" != "x$new_path"; then
51722     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51723     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51724 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51725   fi
51726 
51727   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51728   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51729 
51730     else
51731       # We're on a unix platform. Hooray! :)
51732       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51733       has_space=`$ECHO "$path" | $GREP " "`
51734       if test "x$has_space" != x; then
51735         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51736 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51737         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51738       fi
51739 
51740       # Use eval to expand a potential ~
51741       eval path="$path"
51742       if test ! -f "$path" && test ! -d "$path"; then
51743         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51744       fi
51745 
51746       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51747     fi
51748   fi
51749 
51750 
51751   # Only process if variable expands to non-empty
51752 
51753   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51754     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51755 
51756   # Input might be given as Windows format, start by converting to
51757   # unix format.
51758   path="$POTENTIAL_FREETYPE_LIB_PATH"
51759   new_path=`$CYGPATH -u "$path"`
51760 
51761   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51762   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51763   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51764   # "foo.exe" is OK but "foo" is an error.
51765   #
51766   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51767   # It is also a way to make sure we got the proper file name for the real test later on.
51768   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51769   if test "x$test_shortpath" = x; then
51770     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51771 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51772     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51773   fi
51774 
51775   # Call helper function which possibly converts this using DOS-style short mode.
51776   # If so, the updated path is stored in $new_path.
51777 
51778   input_path="$new_path"
51779   # Check if we need to convert this using DOS-style short mode. If the path
51780   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51781   # take no chances and rewrite it.
51782   # Note: m4 eats our [], so we need to use [ and ] instead.
51783   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51784   if test "x$has_forbidden_chars" != x; then
51785     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51786     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51787     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51788     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51789       # Going to short mode and back again did indeed matter. Since short mode is
51790       # case insensitive, let's make it lowercase to improve readability.
51791       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51792       # Now convert it back to Unix-style (cygpath)
51793       input_path=`$CYGPATH -u "$shortmode_path"`
51794       new_path="$input_path"
51795     fi
51796   fi
51797 
51798   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51799   if test "x$test_cygdrive_prefix" = x; then
51800     # As a simple fix, exclude /usr/bin since it's not a real path.
51801     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51802       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51803       # a path prefixed by /cygdrive for fixpath to work.
51804       new_path="$CYGWIN_ROOT_PATH$input_path"
51805     fi
51806   fi
51807 
51808 
51809   if test "x$path" != "x$new_path"; then
51810     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51811     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51812 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51813   fi
51814 
51815     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51816 
51817   path="$POTENTIAL_FREETYPE_LIB_PATH"
51818   has_colon=`$ECHO $path | $GREP ^.:`
51819   new_path="$path"
51820   if test "x$has_colon" = x; then
51821     # Not in mixed or Windows style, start by that.
51822     new_path=`cmd //c echo $path`
51823   fi
51824 
51825 
51826   input_path="$new_path"
51827   # Check if we need to convert this using DOS-style short mode. If the path
51828   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51829   # take no chances and rewrite it.
51830   # Note: m4 eats our [], so we need to use [ and ] instead.
51831   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51832   if test "x$has_forbidden_chars" != x; then
51833     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51834     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51835   fi
51836 
51837 
51838   windows_path="$new_path"
51839   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51840     unix_path=`$CYGPATH -u "$windows_path"`
51841     new_path="$unix_path"
51842   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51843     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51844     new_path="$unix_path"
51845   fi
51846 
51847   if test "x$path" != "x$new_path"; then
51848     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51849     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51850 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51851   fi
51852 
51853   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51854   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51855 
51856     else
51857       # We're on a unix platform. Hooray! :)
51858       path="$POTENTIAL_FREETYPE_LIB_PATH"
51859       has_space=`$ECHO "$path" | $GREP " "`
51860       if test "x$has_space" != x; then
51861         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51862 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51863         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51864       fi
51865 
51866       # Use eval to expand a potential ~
51867       eval path="$path"
51868       if test ! -f "$path" && test ! -d "$path"; then
51869         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51870       fi
51871 
51872       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51873     fi
51874   fi
51875 
51876 
51877     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51878     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51879 $as_echo_n "checking for freetype includes... " >&6; }
51880     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51881 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51882     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51883     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51884 $as_echo_n "checking for freetype libraries... " >&6; }
51885     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51886 $as_echo "$FREETYPE_LIB_PATH" >&6; }
51887   fi
51888 
51889         if test "x$FOUND_FREETYPE" != xyes; then
51890           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
51891         fi
51892       else
51893         # User specified only one of lib or include. This is an error.
51894         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
51895           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
51896 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
51897           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
51898         else
51899           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
51900 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
51901           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
51902         fi
51903       fi
51904     else
51905       # User did not specify settings, but we need freetype. Try to locate it.
51906 
51907       if test "x$BUNDLE_FREETYPE" = x; then
51908         # If not specified, default is to bundle freetype only on windows
51909         if test "x$OPENJDK_TARGET_OS" = xwindows; then
51910           BUNDLE_FREETYPE=yes
51911         else
51912           BUNDLE_FREETYPE=no
51913         fi
51914       fi
51915 
51916       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
51917       if test "x$SYSROOT" = x; then
51918         if test "x$FOUND_FREETYPE" != xyes; then
51919           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
51920           if test "x$PKG_CONFIG" != x; then
51921 
51922 pkg_failed=no
51923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
51924 $as_echo_n "checking for FREETYPE... " >&6; }
51925 
51926 if test -n "$FREETYPE_CFLAGS"; then
51927     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
51928  elif test -n "$PKG_CONFIG"; then
51929     if test -n "$PKG_CONFIG" && \
51930     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
51931   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
51932   ac_status=$?
51933   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51934   test $ac_status = 0; }; then
51935   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
51936 else
51937   pkg_failed=yes
51938 fi
51939  else
51940     pkg_failed=untried
51941 fi
51942 if test -n "$FREETYPE_LIBS"; then
51943     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
51944  elif test -n "$PKG_CONFIG"; then
51945     if test -n "$PKG_CONFIG" && \
51946     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
51947   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
51948   ac_status=$?
51949   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51950   test $ac_status = 0; }; then
51951   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
51952 else
51953   pkg_failed=yes
51954 fi
51955  else
51956     pkg_failed=untried
51957 fi
51958 
51959 
51960 
51961 if test $pkg_failed = yes; then
51962 
51963 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
51964         _pkg_short_errors_supported=yes
51965 else
51966         _pkg_short_errors_supported=no
51967 fi
51968         if test $_pkg_short_errors_supported = yes; then
51969                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
51970         else
51971                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
51972         fi
51973         # Put the nasty error message in config.log where it belongs
51974         echo "$FREETYPE_PKG_ERRORS" >&5
51975 
51976         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51977 $as_echo "no" >&6; }
51978                 FOUND_FREETYPE=no
51979 elif test $pkg_failed = untried; then
51980         FOUND_FREETYPE=no
51981 else
51982         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
51983         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
51984         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51985 $as_echo "yes" >&6; }
51986         FOUND_FREETYPE=yes
51987 fi
51988             if test "x$FOUND_FREETYPE" = xyes; then
51989               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
51990               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
51991               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
51992               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51993                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
51994               fi
51995               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
51996               if test "x$BUNDLE_FREETYPE" = xyes; then
51997                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
51998 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
51999                 FOUND_FREETYPE=no
52000               else
52001                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
52002 $as_echo_n "checking for freetype... " >&6; }
52003                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
52004 $as_echo "yes (using pkg-config)" >&6; }
52005               fi
52006             fi
52007           fi
52008         fi
52009       fi
52010 
52011       if test "x$FOUND_FREETYPE" != xyes; then
52012         # Check in well-known locations
52013         if test "x$OPENJDK_TARGET_OS" = xwindows; then
52014           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
52015 
52016   windows_path="$FREETYPE_BASE_DIR"
52017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52018     unix_path=`$CYGPATH -u "$windows_path"`
52019     FREETYPE_BASE_DIR="$unix_path"
52020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52021     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52022     FREETYPE_BASE_DIR="$unix_path"
52023   fi
52024 
52025 
52026   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52027   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52028   METHOD="well-known location"
52029 
52030   # Let's start with an optimistic view of the world :-)
52031   FOUND_FREETYPE=yes
52032 
52033   # First look for the canonical freetype main include file ft2build.h.
52034   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52035     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52036     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52037     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52038       # Fail.
52039       FOUND_FREETYPE=no
52040     fi
52041   fi
52042 
52043   if test "x$FOUND_FREETYPE" = xyes; then
52044     # Include file found, let's continue the sanity check.
52045     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52046 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52047 
52048     # Reset to default value
52049     FREETYPE_BASE_NAME=freetype
52050     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52051     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52052       if test "x$OPENJDK_TARGET_OS" = xmacosx \
52053           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52054         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52055         # for the .6 version explicitly.
52056         FREETYPE_BASE_NAME=freetype.6
52057         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52058         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52059 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52060       else
52061         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52062 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52063         FOUND_FREETYPE=no
52064       fi
52065     else
52066       if test "x$OPENJDK_TARGET_OS" = xwindows; then
52067         # On Windows, we will need both .lib and .dll file.
52068         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52069           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52070 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52071           FOUND_FREETYPE=no
52072         fi
52073       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52074           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52075         # Found lib in isa dir, use that instead.
52076         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52077         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52078 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52079       fi
52080     fi
52081   fi
52082 
52083   if test "x$FOUND_FREETYPE" = xyes; then
52084 
52085   # Only process if variable expands to non-empty
52086 
52087   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52088     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52089 
52090   # Input might be given as Windows format, start by converting to
52091   # unix format.
52092   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52093   new_path=`$CYGPATH -u "$path"`
52094 
52095   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52096   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52097   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52098   # "foo.exe" is OK but "foo" is an error.
52099   #
52100   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52101   # It is also a way to make sure we got the proper file name for the real test later on.
52102   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52103   if test "x$test_shortpath" = x; then
52104     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52105 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52106     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52107   fi
52108 
52109   # Call helper function which possibly converts this using DOS-style short mode.
52110   # If so, the updated path is stored in $new_path.
52111 
52112   input_path="$new_path"
52113   # Check if we need to convert this using DOS-style short mode. If the path
52114   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52115   # take no chances and rewrite it.
52116   # Note: m4 eats our [], so we need to use [ and ] instead.
52117   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52118   if test "x$has_forbidden_chars" != x; then
52119     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52120     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52121     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52122     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52123       # Going to short mode and back again did indeed matter. Since short mode is
52124       # case insensitive, let's make it lowercase to improve readability.
52125       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52126       # Now convert it back to Unix-style (cygpath)
52127       input_path=`$CYGPATH -u "$shortmode_path"`
52128       new_path="$input_path"
52129     fi
52130   fi
52131 
52132   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52133   if test "x$test_cygdrive_prefix" = x; then
52134     # As a simple fix, exclude /usr/bin since it's not a real path.
52135     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52136       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52137       # a path prefixed by /cygdrive for fixpath to work.
52138       new_path="$CYGWIN_ROOT_PATH$input_path"
52139     fi
52140   fi
52141 
52142 
52143   if test "x$path" != "x$new_path"; then
52144     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52145     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52146 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52147   fi
52148 
52149     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52150 
52151   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52152   has_colon=`$ECHO $path | $GREP ^.:`
52153   new_path="$path"
52154   if test "x$has_colon" = x; then
52155     # Not in mixed or Windows style, start by that.
52156     new_path=`cmd //c echo $path`
52157   fi
52158 
52159 
52160   input_path="$new_path"
52161   # Check if we need to convert this using DOS-style short mode. If the path
52162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52163   # take no chances and rewrite it.
52164   # Note: m4 eats our [], so we need to use [ and ] instead.
52165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52166   if test "x$has_forbidden_chars" != x; then
52167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52168     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52169   fi
52170 
52171 
52172   windows_path="$new_path"
52173   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52174     unix_path=`$CYGPATH -u "$windows_path"`
52175     new_path="$unix_path"
52176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52177     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52178     new_path="$unix_path"
52179   fi
52180 
52181   if test "x$path" != "x$new_path"; then
52182     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52183     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52184 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52185   fi
52186 
52187   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52188   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52189 
52190     else
52191       # We're on a unix platform. Hooray! :)
52192       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52193       has_space=`$ECHO "$path" | $GREP " "`
52194       if test "x$has_space" != x; then
52195         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52196 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52197         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52198       fi
52199 
52200       # Use eval to expand a potential ~
52201       eval path="$path"
52202       if test ! -f "$path" && test ! -d "$path"; then
52203         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52204       fi
52205 
52206       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52207     fi
52208   fi
52209 
52210 
52211   # Only process if variable expands to non-empty
52212 
52213   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52214     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52215 
52216   # Input might be given as Windows format, start by converting to
52217   # unix format.
52218   path="$POTENTIAL_FREETYPE_LIB_PATH"
52219   new_path=`$CYGPATH -u "$path"`
52220 
52221   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52222   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52223   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52224   # "foo.exe" is OK but "foo" is an error.
52225   #
52226   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52227   # It is also a way to make sure we got the proper file name for the real test later on.
52228   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52229   if test "x$test_shortpath" = x; then
52230     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52231 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52232     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52233   fi
52234 
52235   # Call helper function which possibly converts this using DOS-style short mode.
52236   # If so, the updated path is stored in $new_path.
52237 
52238   input_path="$new_path"
52239   # Check if we need to convert this using DOS-style short mode. If the path
52240   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52241   # take no chances and rewrite it.
52242   # Note: m4 eats our [], so we need to use [ and ] instead.
52243   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52244   if test "x$has_forbidden_chars" != x; then
52245     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52246     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52247     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52248     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52249       # Going to short mode and back again did indeed matter. Since short mode is
52250       # case insensitive, let's make it lowercase to improve readability.
52251       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52252       # Now convert it back to Unix-style (cygpath)
52253       input_path=`$CYGPATH -u "$shortmode_path"`
52254       new_path="$input_path"
52255     fi
52256   fi
52257 
52258   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52259   if test "x$test_cygdrive_prefix" = x; then
52260     # As a simple fix, exclude /usr/bin since it's not a real path.
52261     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52262       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52263       # a path prefixed by /cygdrive for fixpath to work.
52264       new_path="$CYGWIN_ROOT_PATH$input_path"
52265     fi
52266   fi
52267 
52268 
52269   if test "x$path" != "x$new_path"; then
52270     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52271     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52272 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52273   fi
52274 
52275     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52276 
52277   path="$POTENTIAL_FREETYPE_LIB_PATH"
52278   has_colon=`$ECHO $path | $GREP ^.:`
52279   new_path="$path"
52280   if test "x$has_colon" = x; then
52281     # Not in mixed or Windows style, start by that.
52282     new_path=`cmd //c echo $path`
52283   fi
52284 
52285 
52286   input_path="$new_path"
52287   # Check if we need to convert this using DOS-style short mode. If the path
52288   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52289   # take no chances and rewrite it.
52290   # Note: m4 eats our [], so we need to use [ and ] instead.
52291   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52292   if test "x$has_forbidden_chars" != x; then
52293     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52294     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52295   fi
52296 
52297 
52298   windows_path="$new_path"
52299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52300     unix_path=`$CYGPATH -u "$windows_path"`
52301     new_path="$unix_path"
52302   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52303     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52304     new_path="$unix_path"
52305   fi
52306 
52307   if test "x$path" != "x$new_path"; then
52308     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52309     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52310 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52311   fi
52312 
52313   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52314   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52315 
52316     else
52317       # We're on a unix platform. Hooray! :)
52318       path="$POTENTIAL_FREETYPE_LIB_PATH"
52319       has_space=`$ECHO "$path" | $GREP " "`
52320       if test "x$has_space" != x; then
52321         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52322 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52323         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52324       fi
52325 
52326       # Use eval to expand a potential ~
52327       eval path="$path"
52328       if test ! -f "$path" && test ! -d "$path"; then
52329         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52330       fi
52331 
52332       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52333     fi
52334   fi
52335 
52336 
52337     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52338     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52339 $as_echo_n "checking for freetype includes... " >&6; }
52340     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52341 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52342     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52343     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52344 $as_echo_n "checking for freetype libraries... " >&6; }
52345     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52346 $as_echo "$FREETYPE_LIB_PATH" >&6; }
52347   fi
52348 
52349           if test "x$FOUND_FREETYPE" != xyes; then
52350             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
52351 
52352   windows_path="$FREETYPE_BASE_DIR"
52353   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52354     unix_path=`$CYGPATH -u "$windows_path"`
52355     FREETYPE_BASE_DIR="$unix_path"
52356   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52357     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52358     FREETYPE_BASE_DIR="$unix_path"
52359   fi
52360 
52361 
52362   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52363   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52364   METHOD="well-known location"
52365 
52366   # Let's start with an optimistic view of the world :-)
52367   FOUND_FREETYPE=yes
52368 
52369   # First look for the canonical freetype main include file ft2build.h.
52370   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52371     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52372     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52373     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52374       # Fail.
52375       FOUND_FREETYPE=no
52376     fi
52377   fi
52378 
52379   if test "x$FOUND_FREETYPE" = xyes; then
52380     # Include file found, let's continue the sanity check.
52381     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52382 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52383 
52384     # Reset to default value
52385     FREETYPE_BASE_NAME=freetype
52386     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52387     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52388       if test "x$OPENJDK_TARGET_OS" = xmacosx \
52389           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52390         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52391         # for the .6 version explicitly.
52392         FREETYPE_BASE_NAME=freetype.6
52393         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52394         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52395 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52396       else
52397         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52398 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52399         FOUND_FREETYPE=no
52400       fi
52401     else
52402       if test "x$OPENJDK_TARGET_OS" = xwindows; then
52403         # On Windows, we will need both .lib and .dll file.
52404         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52405           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52406 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52407           FOUND_FREETYPE=no
52408         fi
52409       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52410           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52411         # Found lib in isa dir, use that instead.
52412         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52413         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52414 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52415       fi
52416     fi
52417   fi
52418 
52419   if test "x$FOUND_FREETYPE" = xyes; then
52420 
52421   # Only process if variable expands to non-empty
52422 
52423   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52424     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52425 
52426   # Input might be given as Windows format, start by converting to
52427   # unix format.
52428   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52429   new_path=`$CYGPATH -u "$path"`
52430 
52431   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52432   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52433   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52434   # "foo.exe" is OK but "foo" is an error.
52435   #
52436   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52437   # It is also a way to make sure we got the proper file name for the real test later on.
52438   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52439   if test "x$test_shortpath" = x; then
52440     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52441 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52442     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52443   fi
52444 
52445   # Call helper function which possibly converts this using DOS-style short mode.
52446   # If so, the updated path is stored in $new_path.
52447 
52448   input_path="$new_path"
52449   # Check if we need to convert this using DOS-style short mode. If the path
52450   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52451   # take no chances and rewrite it.
52452   # Note: m4 eats our [], so we need to use [ and ] instead.
52453   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52454   if test "x$has_forbidden_chars" != x; then
52455     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52456     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52457     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52458     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52459       # Going to short mode and back again did indeed matter. Since short mode is
52460       # case insensitive, let's make it lowercase to improve readability.
52461       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52462       # Now convert it back to Unix-style (cygpath)
52463       input_path=`$CYGPATH -u "$shortmode_path"`
52464       new_path="$input_path"
52465     fi
52466   fi
52467 
52468   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52469   if test "x$test_cygdrive_prefix" = x; then
52470     # As a simple fix, exclude /usr/bin since it's not a real path.
52471     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52472       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52473       # a path prefixed by /cygdrive for fixpath to work.
52474       new_path="$CYGWIN_ROOT_PATH$input_path"
52475     fi
52476   fi
52477 
52478 
52479   if test "x$path" != "x$new_path"; then
52480     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52481     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52482 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52483   fi
52484 
52485     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52486 
52487   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52488   has_colon=`$ECHO $path | $GREP ^.:`
52489   new_path="$path"
52490   if test "x$has_colon" = x; then
52491     # Not in mixed or Windows style, start by that.
52492     new_path=`cmd //c echo $path`
52493   fi
52494 
52495 
52496   input_path="$new_path"
52497   # Check if we need to convert this using DOS-style short mode. If the path
52498   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52499   # take no chances and rewrite it.
52500   # Note: m4 eats our [], so we need to use [ and ] instead.
52501   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52502   if test "x$has_forbidden_chars" != x; then
52503     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52504     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52505   fi
52506 
52507 
52508   windows_path="$new_path"
52509   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52510     unix_path=`$CYGPATH -u "$windows_path"`
52511     new_path="$unix_path"
52512   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52513     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52514     new_path="$unix_path"
52515   fi
52516 
52517   if test "x$path" != "x$new_path"; then
52518     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52519     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52520 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52521   fi
52522 
52523   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52524   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52525 
52526     else
52527       # We're on a unix platform. Hooray! :)
52528       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52529       has_space=`$ECHO "$path" | $GREP " "`
52530       if test "x$has_space" != x; then
52531         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52532 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52533         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52534       fi
52535 
52536       # Use eval to expand a potential ~
52537       eval path="$path"
52538       if test ! -f "$path" && test ! -d "$path"; then
52539         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52540       fi
52541 
52542       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52543     fi
52544   fi
52545 
52546 
52547   # Only process if variable expands to non-empty
52548 
52549   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52550     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52551 
52552   # Input might be given as Windows format, start by converting to
52553   # unix format.
52554   path="$POTENTIAL_FREETYPE_LIB_PATH"
52555   new_path=`$CYGPATH -u "$path"`
52556 
52557   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52558   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52559   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52560   # "foo.exe" is OK but "foo" is an error.
52561   #
52562   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52563   # It is also a way to make sure we got the proper file name for the real test later on.
52564   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52565   if test "x$test_shortpath" = x; then
52566     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52567 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52568     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52569   fi
52570 
52571   # Call helper function which possibly converts this using DOS-style short mode.
52572   # If so, the updated path is stored in $new_path.
52573 
52574   input_path="$new_path"
52575   # Check if we need to convert this using DOS-style short mode. If the path
52576   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52577   # take no chances and rewrite it.
52578   # Note: m4 eats our [], so we need to use [ and ] instead.
52579   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52580   if test "x$has_forbidden_chars" != x; then
52581     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52582     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52583     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52584     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52585       # Going to short mode and back again did indeed matter. Since short mode is
52586       # case insensitive, let's make it lowercase to improve readability.
52587       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52588       # Now convert it back to Unix-style (cygpath)
52589       input_path=`$CYGPATH -u "$shortmode_path"`
52590       new_path="$input_path"
52591     fi
52592   fi
52593 
52594   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52595   if test "x$test_cygdrive_prefix" = x; then
52596     # As a simple fix, exclude /usr/bin since it's not a real path.
52597     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52598       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52599       # a path prefixed by /cygdrive for fixpath to work.
52600       new_path="$CYGWIN_ROOT_PATH$input_path"
52601     fi
52602   fi
52603 
52604 
52605   if test "x$path" != "x$new_path"; then
52606     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52607     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52608 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52609   fi
52610 
52611     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52612 
52613   path="$POTENTIAL_FREETYPE_LIB_PATH"
52614   has_colon=`$ECHO $path | $GREP ^.:`
52615   new_path="$path"
52616   if test "x$has_colon" = x; then
52617     # Not in mixed or Windows style, start by that.
52618     new_path=`cmd //c echo $path`
52619   fi
52620 
52621 
52622   input_path="$new_path"
52623   # Check if we need to convert this using DOS-style short mode. If the path
52624   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52625   # take no chances and rewrite it.
52626   # Note: m4 eats our [], so we need to use [ and ] instead.
52627   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52628   if test "x$has_forbidden_chars" != x; then
52629     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52630     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52631   fi
52632 
52633 
52634   windows_path="$new_path"
52635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52636     unix_path=`$CYGPATH -u "$windows_path"`
52637     new_path="$unix_path"
52638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52640     new_path="$unix_path"
52641   fi
52642 
52643   if test "x$path" != "x$new_path"; then
52644     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52645     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52646 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52647   fi
52648 
52649   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52650   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52651 
52652     else
52653       # We're on a unix platform. Hooray! :)
52654       path="$POTENTIAL_FREETYPE_LIB_PATH"
52655       has_space=`$ECHO "$path" | $GREP " "`
52656       if test "x$has_space" != x; then
52657         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52658 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52659         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52660       fi
52661 
52662       # Use eval to expand a potential ~
52663       eval path="$path"
52664       if test ! -f "$path" && test ! -d "$path"; then
52665         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52666       fi
52667 
52668       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52669     fi
52670   fi
52671 
52672 
52673     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52674     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52675 $as_echo_n "checking for freetype includes... " >&6; }
52676     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52677 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52678     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52679     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52680 $as_echo_n "checking for freetype libraries... " >&6; }
52681     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52682 $as_echo "$FREETYPE_LIB_PATH" >&6; }
52683   fi
52684 
52685           fi
52686         else
52687           FREETYPE_BASE_DIR="$SYSROOT/usr"
52688 
52689   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52690   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52691   METHOD="well-known location"
52692 
52693   # Let's start with an optimistic view of the world :-)
52694   FOUND_FREETYPE=yes
52695 
52696   # First look for the canonical freetype main include file ft2build.h.
52697   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52698     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52699     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52700     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52701       # Fail.
52702       FOUND_FREETYPE=no
52703     fi
52704   fi
52705 
52706   if test "x$FOUND_FREETYPE" = xyes; then
52707     # Include file found, let's continue the sanity check.
52708     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52709 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52710 
52711     # Reset to default value
52712     FREETYPE_BASE_NAME=freetype
52713     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52714     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52715       if test "x$OPENJDK_TARGET_OS" = xmacosx \
52716           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52717         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52718         # for the .6 version explicitly.
52719         FREETYPE_BASE_NAME=freetype.6
52720         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52721         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52722 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52723       else
52724         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52725 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52726         FOUND_FREETYPE=no
52727       fi
52728     else
52729       if test "x$OPENJDK_TARGET_OS" = xwindows; then
52730         # On Windows, we will need both .lib and .dll file.
52731         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52732           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52733 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52734           FOUND_FREETYPE=no
52735         fi
52736       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52737           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52738         # Found lib in isa dir, use that instead.
52739         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52740         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52741 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52742       fi
52743     fi
52744   fi
52745 
52746   if test "x$FOUND_FREETYPE" = xyes; then
52747 
52748   # Only process if variable expands to non-empty
52749 
52750   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52751     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52752 
52753   # Input might be given as Windows format, start by converting to
52754   # unix format.
52755   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52756   new_path=`$CYGPATH -u "$path"`
52757 
52758   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52759   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52760   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52761   # "foo.exe" is OK but "foo" is an error.
52762   #
52763   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52764   # It is also a way to make sure we got the proper file name for the real test later on.
52765   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52766   if test "x$test_shortpath" = x; then
52767     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52768 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52769     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52770   fi
52771 
52772   # Call helper function which possibly converts this using DOS-style short mode.
52773   # If so, the updated path is stored in $new_path.
52774 
52775   input_path="$new_path"
52776   # Check if we need to convert this using DOS-style short mode. If the path
52777   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52778   # take no chances and rewrite it.
52779   # Note: m4 eats our [], so we need to use [ and ] instead.
52780   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52781   if test "x$has_forbidden_chars" != x; then
52782     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52783     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52784     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52785     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52786       # Going to short mode and back again did indeed matter. Since short mode is
52787       # case insensitive, let's make it lowercase to improve readability.
52788       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52789       # Now convert it back to Unix-style (cygpath)
52790       input_path=`$CYGPATH -u "$shortmode_path"`
52791       new_path="$input_path"
52792     fi
52793   fi
52794 
52795   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52796   if test "x$test_cygdrive_prefix" = x; then
52797     # As a simple fix, exclude /usr/bin since it's not a real path.
52798     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52799       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52800       # a path prefixed by /cygdrive for fixpath to work.
52801       new_path="$CYGWIN_ROOT_PATH$input_path"
52802     fi
52803   fi
52804 
52805 
52806   if test "x$path" != "x$new_path"; then
52807     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52808     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52809 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52810   fi
52811 
52812     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52813 
52814   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52815   has_colon=`$ECHO $path | $GREP ^.:`
52816   new_path="$path"
52817   if test "x$has_colon" = x; then
52818     # Not in mixed or Windows style, start by that.
52819     new_path=`cmd //c echo $path`
52820   fi
52821 
52822 
52823   input_path="$new_path"
52824   # Check if we need to convert this using DOS-style short mode. If the path
52825   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52826   # take no chances and rewrite it.
52827   # Note: m4 eats our [], so we need to use [ and ] instead.
52828   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52829   if test "x$has_forbidden_chars" != x; then
52830     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52831     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52832   fi
52833 
52834 
52835   windows_path="$new_path"
52836   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52837     unix_path=`$CYGPATH -u "$windows_path"`
52838     new_path="$unix_path"
52839   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52840     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52841     new_path="$unix_path"
52842   fi
52843 
52844   if test "x$path" != "x$new_path"; then
52845     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52846     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52847 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52848   fi
52849 
52850   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52851   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52852 
52853     else
52854       # We're on a unix platform. Hooray! :)
52855       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52856       has_space=`$ECHO "$path" | $GREP " "`
52857       if test "x$has_space" != x; then
52858         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52859 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52860         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52861       fi
52862 
52863       # Use eval to expand a potential ~
52864       eval path="$path"
52865       if test ! -f "$path" && test ! -d "$path"; then
52866         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52867       fi
52868 
52869       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52870     fi
52871   fi
52872 
52873 
52874   # Only process if variable expands to non-empty
52875 
52876   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52877     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52878 
52879   # Input might be given as Windows format, start by converting to
52880   # unix format.
52881   path="$POTENTIAL_FREETYPE_LIB_PATH"
52882   new_path=`$CYGPATH -u "$path"`
52883 
52884   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52885   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52886   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52887   # "foo.exe" is OK but "foo" is an error.
52888   #
52889   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52890   # It is also a way to make sure we got the proper file name for the real test later on.
52891   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52892   if test "x$test_shortpath" = x; then
52893     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52894 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52895     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52896   fi
52897 
52898   # Call helper function which possibly converts this using DOS-style short mode.
52899   # If so, the updated path is stored in $new_path.
52900 
52901   input_path="$new_path"
52902   # Check if we need to convert this using DOS-style short mode. If the path
52903   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52904   # take no chances and rewrite it.
52905   # Note: m4 eats our [], so we need to use [ and ] instead.
52906   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52907   if test "x$has_forbidden_chars" != x; then
52908     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52909     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52910     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52911     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52912       # Going to short mode and back again did indeed matter. Since short mode is
52913       # case insensitive, let's make it lowercase to improve readability.
52914       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52915       # Now convert it back to Unix-style (cygpath)
52916       input_path=`$CYGPATH -u "$shortmode_path"`
52917       new_path="$input_path"
52918     fi
52919   fi
52920 
52921   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52922   if test "x$test_cygdrive_prefix" = x; then
52923     # As a simple fix, exclude /usr/bin since it's not a real path.
52924     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52925       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52926       # a path prefixed by /cygdrive for fixpath to work.
52927       new_path="$CYGWIN_ROOT_PATH$input_path"
52928     fi
52929   fi
52930 
52931 
52932   if test "x$path" != "x$new_path"; then
52933     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52934     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52935 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52936   fi
52937 
52938     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52939 
52940   path="$POTENTIAL_FREETYPE_LIB_PATH"
52941   has_colon=`$ECHO $path | $GREP ^.:`
52942   new_path="$path"
52943   if test "x$has_colon" = x; then
52944     # Not in mixed or Windows style, start by that.
52945     new_path=`cmd //c echo $path`
52946   fi
52947 
52948 
52949   input_path="$new_path"
52950   # Check if we need to convert this using DOS-style short mode. If the path
52951   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52952   # take no chances and rewrite it.
52953   # Note: m4 eats our [], so we need to use [ and ] instead.
52954   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52955   if test "x$has_forbidden_chars" != x; then
52956     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52957     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52958   fi
52959 
52960 
52961   windows_path="$new_path"
52962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52963     unix_path=`$CYGPATH -u "$windows_path"`
52964     new_path="$unix_path"
52965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52966     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52967     new_path="$unix_path"
52968   fi
52969 
52970   if test "x$path" != "x$new_path"; then
52971     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52972     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52973 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52974   fi
52975 
52976   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52977   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52978 
52979     else
52980       # We're on a unix platform. Hooray! :)
52981       path="$POTENTIAL_FREETYPE_LIB_PATH"
52982       has_space=`$ECHO "$path" | $GREP " "`
52983       if test "x$has_space" != x; then
52984         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52985 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52986         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52987       fi
52988 
52989       # Use eval to expand a potential ~
52990       eval path="$path"
52991       if test ! -f "$path" && test ! -d "$path"; then
52992         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52993       fi
52994 
52995       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52996     fi
52997   fi
52998 
52999 
53000     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53001     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53002 $as_echo_n "checking for freetype includes... " >&6; }
53003     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53004 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53005     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53006     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53007 $as_echo_n "checking for freetype libraries... " >&6; }
53008     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53009 $as_echo "$FREETYPE_LIB_PATH" >&6; }
53010   fi
53011 
53012 
53013           if test "x$FOUND_FREETYPE" != xyes; then
53014             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
53015 
53016   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53017   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53018   METHOD="well-known location"
53019 
53020   # Let's start with an optimistic view of the world :-)
53021   FOUND_FREETYPE=yes
53022 
53023   # First look for the canonical freetype main include file ft2build.h.
53024   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53025     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53026     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53027     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53028       # Fail.
53029       FOUND_FREETYPE=no
53030     fi
53031   fi
53032 
53033   if test "x$FOUND_FREETYPE" = xyes; then
53034     # Include file found, let's continue the sanity check.
53035     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53036 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53037 
53038     # Reset to default value
53039     FREETYPE_BASE_NAME=freetype
53040     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53041     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53042       if test "x$OPENJDK_TARGET_OS" = xmacosx \
53043           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53044         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53045         # for the .6 version explicitly.
53046         FREETYPE_BASE_NAME=freetype.6
53047         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53048         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53049 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53050       else
53051         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53052 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53053         FOUND_FREETYPE=no
53054       fi
53055     else
53056       if test "x$OPENJDK_TARGET_OS" = xwindows; then
53057         # On Windows, we will need both .lib and .dll file.
53058         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53059           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53060 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53061           FOUND_FREETYPE=no
53062         fi
53063       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53064           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53065         # Found lib in isa dir, use that instead.
53066         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53067         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53068 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53069       fi
53070     fi
53071   fi
53072 
53073   if test "x$FOUND_FREETYPE" = xyes; then
53074 
53075   # Only process if variable expands to non-empty
53076 
53077   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53078     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53079 
53080   # Input might be given as Windows format, start by converting to
53081   # unix format.
53082   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53083   new_path=`$CYGPATH -u "$path"`
53084 
53085   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53086   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53087   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53088   # "foo.exe" is OK but "foo" is an error.
53089   #
53090   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53091   # It is also a way to make sure we got the proper file name for the real test later on.
53092   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53093   if test "x$test_shortpath" = x; then
53094     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53095 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53096     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53097   fi
53098 
53099   # Call helper function which possibly converts this using DOS-style short mode.
53100   # If so, the updated path is stored in $new_path.
53101 
53102   input_path="$new_path"
53103   # Check if we need to convert this using DOS-style short mode. If the path
53104   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53105   # take no chances and rewrite it.
53106   # Note: m4 eats our [], so we need to use [ and ] instead.
53107   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53108   if test "x$has_forbidden_chars" != x; then
53109     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53110     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53111     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53112     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53113       # Going to short mode and back again did indeed matter. Since short mode is
53114       # case insensitive, let's make it lowercase to improve readability.
53115       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53116       # Now convert it back to Unix-style (cygpath)
53117       input_path=`$CYGPATH -u "$shortmode_path"`
53118       new_path="$input_path"
53119     fi
53120   fi
53121 
53122   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53123   if test "x$test_cygdrive_prefix" = x; then
53124     # As a simple fix, exclude /usr/bin since it's not a real path.
53125     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53126       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53127       # a path prefixed by /cygdrive for fixpath to work.
53128       new_path="$CYGWIN_ROOT_PATH$input_path"
53129     fi
53130   fi
53131 
53132 
53133   if test "x$path" != "x$new_path"; then
53134     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53135     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53136 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53137   fi
53138 
53139     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53140 
53141   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53142   has_colon=`$ECHO $path | $GREP ^.:`
53143   new_path="$path"
53144   if test "x$has_colon" = x; then
53145     # Not in mixed or Windows style, start by that.
53146     new_path=`cmd //c echo $path`
53147   fi
53148 
53149 
53150   input_path="$new_path"
53151   # Check if we need to convert this using DOS-style short mode. If the path
53152   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53153   # take no chances and rewrite it.
53154   # Note: m4 eats our [], so we need to use [ and ] instead.
53155   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53156   if test "x$has_forbidden_chars" != x; then
53157     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53158     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53159   fi
53160 
53161 
53162   windows_path="$new_path"
53163   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53164     unix_path=`$CYGPATH -u "$windows_path"`
53165     new_path="$unix_path"
53166   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53167     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53168     new_path="$unix_path"
53169   fi
53170 
53171   if test "x$path" != "x$new_path"; then
53172     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53173     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53174 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53175   fi
53176 
53177   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53178   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53179 
53180     else
53181       # We're on a unix platform. Hooray! :)
53182       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53183       has_space=`$ECHO "$path" | $GREP " "`
53184       if test "x$has_space" != x; then
53185         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53186 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53187         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53188       fi
53189 
53190       # Use eval to expand a potential ~
53191       eval path="$path"
53192       if test ! -f "$path" && test ! -d "$path"; then
53193         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53194       fi
53195 
53196       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53197     fi
53198   fi
53199 
53200 
53201   # Only process if variable expands to non-empty
53202 
53203   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53204     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53205 
53206   # Input might be given as Windows format, start by converting to
53207   # unix format.
53208   path="$POTENTIAL_FREETYPE_LIB_PATH"
53209   new_path=`$CYGPATH -u "$path"`
53210 
53211   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53212   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53213   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53214   # "foo.exe" is OK but "foo" is an error.
53215   #
53216   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53217   # It is also a way to make sure we got the proper file name for the real test later on.
53218   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53219   if test "x$test_shortpath" = x; then
53220     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53221 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53222     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53223   fi
53224 
53225   # Call helper function which possibly converts this using DOS-style short mode.
53226   # If so, the updated path is stored in $new_path.
53227 
53228   input_path="$new_path"
53229   # Check if we need to convert this using DOS-style short mode. If the path
53230   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53231   # take no chances and rewrite it.
53232   # Note: m4 eats our [], so we need to use [ and ] instead.
53233   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53234   if test "x$has_forbidden_chars" != x; then
53235     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53236     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53237     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53238     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53239       # Going to short mode and back again did indeed matter. Since short mode is
53240       # case insensitive, let's make it lowercase to improve readability.
53241       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53242       # Now convert it back to Unix-style (cygpath)
53243       input_path=`$CYGPATH -u "$shortmode_path"`
53244       new_path="$input_path"
53245     fi
53246   fi
53247 
53248   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53249   if test "x$test_cygdrive_prefix" = x; then
53250     # As a simple fix, exclude /usr/bin since it's not a real path.
53251     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53252       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53253       # a path prefixed by /cygdrive for fixpath to work.
53254       new_path="$CYGWIN_ROOT_PATH$input_path"
53255     fi
53256   fi
53257 
53258 
53259   if test "x$path" != "x$new_path"; then
53260     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53261     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53262 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53263   fi
53264 
53265     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53266 
53267   path="$POTENTIAL_FREETYPE_LIB_PATH"
53268   has_colon=`$ECHO $path | $GREP ^.:`
53269   new_path="$path"
53270   if test "x$has_colon" = x; then
53271     # Not in mixed or Windows style, start by that.
53272     new_path=`cmd //c echo $path`
53273   fi
53274 
53275 
53276   input_path="$new_path"
53277   # Check if we need to convert this using DOS-style short mode. If the path
53278   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53279   # take no chances and rewrite it.
53280   # Note: m4 eats our [], so we need to use [ and ] instead.
53281   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53282   if test "x$has_forbidden_chars" != x; then
53283     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53284     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53285   fi
53286 
53287 
53288   windows_path="$new_path"
53289   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53290     unix_path=`$CYGPATH -u "$windows_path"`
53291     new_path="$unix_path"
53292   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53293     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53294     new_path="$unix_path"
53295   fi
53296 
53297   if test "x$path" != "x$new_path"; then
53298     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53299     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53300 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53301   fi
53302 
53303   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53304   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53305 
53306     else
53307       # We're on a unix platform. Hooray! :)
53308       path="$POTENTIAL_FREETYPE_LIB_PATH"
53309       has_space=`$ECHO "$path" | $GREP " "`
53310       if test "x$has_space" != x; then
53311         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53312 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53313         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53314       fi
53315 
53316       # Use eval to expand a potential ~
53317       eval path="$path"
53318       if test ! -f "$path" && test ! -d "$path"; then
53319         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53320       fi
53321 
53322       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53323     fi
53324   fi
53325 
53326 
53327     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53328     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53329 $as_echo_n "checking for freetype includes... " >&6; }
53330     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53331 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53332     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53333     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53334 $as_echo_n "checking for freetype libraries... " >&6; }
53335     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53336 $as_echo "$FREETYPE_LIB_PATH" >&6; }
53337   fi
53338 
53339           fi
53340 
53341           if test "x$FOUND_FREETYPE" != xyes; then
53342             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
53343 
53344   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53345   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53346   METHOD="well-known location"
53347 
53348   # Let's start with an optimistic view of the world :-)
53349   FOUND_FREETYPE=yes
53350 
53351   # First look for the canonical freetype main include file ft2build.h.
53352   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53353     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53354     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53355     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53356       # Fail.
53357       FOUND_FREETYPE=no
53358     fi
53359   fi
53360 
53361   if test "x$FOUND_FREETYPE" = xyes; then
53362     # Include file found, let's continue the sanity check.
53363     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53364 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53365 
53366     # Reset to default value
53367     FREETYPE_BASE_NAME=freetype
53368     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53369     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53370       if test "x$OPENJDK_TARGET_OS" = xmacosx \
53371           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53372         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53373         # for the .6 version explicitly.
53374         FREETYPE_BASE_NAME=freetype.6
53375         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53376         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53377 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53378       else
53379         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53380 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53381         FOUND_FREETYPE=no
53382       fi
53383     else
53384       if test "x$OPENJDK_TARGET_OS" = xwindows; then
53385         # On Windows, we will need both .lib and .dll file.
53386         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53387           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53388 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53389           FOUND_FREETYPE=no
53390         fi
53391       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53392           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53393         # Found lib in isa dir, use that instead.
53394         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53395         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53396 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53397       fi
53398     fi
53399   fi
53400 
53401   if test "x$FOUND_FREETYPE" = xyes; then
53402 
53403   # Only process if variable expands to non-empty
53404 
53405   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53406     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53407 
53408   # Input might be given as Windows format, start by converting to
53409   # unix format.
53410   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53411   new_path=`$CYGPATH -u "$path"`
53412 
53413   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53414   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53415   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53416   # "foo.exe" is OK but "foo" is an error.
53417   #
53418   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53419   # It is also a way to make sure we got the proper file name for the real test later on.
53420   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53421   if test "x$test_shortpath" = x; then
53422     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53423 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53424     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53425   fi
53426 
53427   # Call helper function which possibly converts this using DOS-style short mode.
53428   # If so, the updated path is stored in $new_path.
53429 
53430   input_path="$new_path"
53431   # Check if we need to convert this using DOS-style short mode. If the path
53432   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53433   # take no chances and rewrite it.
53434   # Note: m4 eats our [], so we need to use [ and ] instead.
53435   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53436   if test "x$has_forbidden_chars" != x; then
53437     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53438     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53439     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53440     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53441       # Going to short mode and back again did indeed matter. Since short mode is
53442       # case insensitive, let's make it lowercase to improve readability.
53443       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53444       # Now convert it back to Unix-style (cygpath)
53445       input_path=`$CYGPATH -u "$shortmode_path"`
53446       new_path="$input_path"
53447     fi
53448   fi
53449 
53450   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53451   if test "x$test_cygdrive_prefix" = x; then
53452     # As a simple fix, exclude /usr/bin since it's not a real path.
53453     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53454       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53455       # a path prefixed by /cygdrive for fixpath to work.
53456       new_path="$CYGWIN_ROOT_PATH$input_path"
53457     fi
53458   fi
53459 
53460 
53461   if test "x$path" != "x$new_path"; then
53462     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53463     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53464 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53465   fi
53466 
53467     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53468 
53469   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53470   has_colon=`$ECHO $path | $GREP ^.:`
53471   new_path="$path"
53472   if test "x$has_colon" = x; then
53473     # Not in mixed or Windows style, start by that.
53474     new_path=`cmd //c echo $path`
53475   fi
53476 
53477 
53478   input_path="$new_path"
53479   # Check if we need to convert this using DOS-style short mode. If the path
53480   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53481   # take no chances and rewrite it.
53482   # Note: m4 eats our [], so we need to use [ and ] instead.
53483   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53484   if test "x$has_forbidden_chars" != x; then
53485     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53486     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53487   fi
53488 
53489 
53490   windows_path="$new_path"
53491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53492     unix_path=`$CYGPATH -u "$windows_path"`
53493     new_path="$unix_path"
53494   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53495     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53496     new_path="$unix_path"
53497   fi
53498 
53499   if test "x$path" != "x$new_path"; then
53500     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53501     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53502 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53503   fi
53504 
53505   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53506   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53507 
53508     else
53509       # We're on a unix platform. Hooray! :)
53510       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53511       has_space=`$ECHO "$path" | $GREP " "`
53512       if test "x$has_space" != x; then
53513         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53514 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53515         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53516       fi
53517 
53518       # Use eval to expand a potential ~
53519       eval path="$path"
53520       if test ! -f "$path" && test ! -d "$path"; then
53521         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53522       fi
53523 
53524       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53525     fi
53526   fi
53527 
53528 
53529   # Only process if variable expands to non-empty
53530 
53531   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53532     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53533 
53534   # Input might be given as Windows format, start by converting to
53535   # unix format.
53536   path="$POTENTIAL_FREETYPE_LIB_PATH"
53537   new_path=`$CYGPATH -u "$path"`
53538 
53539   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53540   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53541   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53542   # "foo.exe" is OK but "foo" is an error.
53543   #
53544   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53545   # It is also a way to make sure we got the proper file name for the real test later on.
53546   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53547   if test "x$test_shortpath" = x; then
53548     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53549 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53550     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53551   fi
53552 
53553   # Call helper function which possibly converts this using DOS-style short mode.
53554   # If so, the updated path is stored in $new_path.
53555 
53556   input_path="$new_path"
53557   # Check if we need to convert this using DOS-style short mode. If the path
53558   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53559   # take no chances and rewrite it.
53560   # Note: m4 eats our [], so we need to use [ and ] instead.
53561   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53562   if test "x$has_forbidden_chars" != x; then
53563     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53564     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53565     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53566     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53567       # Going to short mode and back again did indeed matter. Since short mode is
53568       # case insensitive, let's make it lowercase to improve readability.
53569       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53570       # Now convert it back to Unix-style (cygpath)
53571       input_path=`$CYGPATH -u "$shortmode_path"`
53572       new_path="$input_path"
53573     fi
53574   fi
53575 
53576   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53577   if test "x$test_cygdrive_prefix" = x; then
53578     # As a simple fix, exclude /usr/bin since it's not a real path.
53579     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53580       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53581       # a path prefixed by /cygdrive for fixpath to work.
53582       new_path="$CYGWIN_ROOT_PATH$input_path"
53583     fi
53584   fi
53585 
53586 
53587   if test "x$path" != "x$new_path"; then
53588     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53589     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53590 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53591   fi
53592 
53593     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53594 
53595   path="$POTENTIAL_FREETYPE_LIB_PATH"
53596   has_colon=`$ECHO $path | $GREP ^.:`
53597   new_path="$path"
53598   if test "x$has_colon" = x; then
53599     # Not in mixed or Windows style, start by that.
53600     new_path=`cmd //c echo $path`
53601   fi
53602 
53603 
53604   input_path="$new_path"
53605   # Check if we need to convert this using DOS-style short mode. If the path
53606   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53607   # take no chances and rewrite it.
53608   # Note: m4 eats our [], so we need to use [ and ] instead.
53609   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53610   if test "x$has_forbidden_chars" != x; then
53611     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53612     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53613   fi
53614 
53615 
53616   windows_path="$new_path"
53617   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53618     unix_path=`$CYGPATH -u "$windows_path"`
53619     new_path="$unix_path"
53620   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53621     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53622     new_path="$unix_path"
53623   fi
53624 
53625   if test "x$path" != "x$new_path"; then
53626     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53627     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53628 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53629   fi
53630 
53631   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53632   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53633 
53634     else
53635       # We're on a unix platform. Hooray! :)
53636       path="$POTENTIAL_FREETYPE_LIB_PATH"
53637       has_space=`$ECHO "$path" | $GREP " "`
53638       if test "x$has_space" != x; then
53639         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53640 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53641         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53642       fi
53643 
53644       # Use eval to expand a potential ~
53645       eval path="$path"
53646       if test ! -f "$path" && test ! -d "$path"; then
53647         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53648       fi
53649 
53650       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53651     fi
53652   fi
53653 
53654 
53655     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53656     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53657 $as_echo_n "checking for freetype includes... " >&6; }
53658     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53659 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53660     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53661     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53662 $as_echo_n "checking for freetype libraries... " >&6; }
53663     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53664 $as_echo "$FREETYPE_LIB_PATH" >&6; }
53665   fi
53666 
53667           fi
53668 
53669           if test "x$FOUND_FREETYPE" != xyes; then
53670             FREETYPE_BASE_DIR="$SYSROOT/usr"
53671             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53672 
53673   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53674   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
53675   METHOD="well-known location"
53676 
53677   # Let's start with an optimistic view of the world :-)
53678   FOUND_FREETYPE=yes
53679 
53680   # First look for the canonical freetype main include file ft2build.h.
53681   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53682     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53683     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53684     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53685       # Fail.
53686       FOUND_FREETYPE=no
53687     fi
53688   fi
53689 
53690   if test "x$FOUND_FREETYPE" = xyes; then
53691     # Include file found, let's continue the sanity check.
53692     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53693 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53694 
53695     # Reset to default value
53696     FREETYPE_BASE_NAME=freetype
53697     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53698     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53699       if test "x$OPENJDK_TARGET_OS" = xmacosx \
53700           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53701         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53702         # for the .6 version explicitly.
53703         FREETYPE_BASE_NAME=freetype.6
53704         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53705         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53706 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53707       else
53708         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53709 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53710         FOUND_FREETYPE=no
53711       fi
53712     else
53713       if test "x$OPENJDK_TARGET_OS" = xwindows; then
53714         # On Windows, we will need both .lib and .dll file.
53715         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53716           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53717 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53718           FOUND_FREETYPE=no
53719         fi
53720       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53721           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53722         # Found lib in isa dir, use that instead.
53723         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53724         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53725 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53726       fi
53727     fi
53728   fi
53729 
53730   if test "x$FOUND_FREETYPE" = xyes; then
53731 
53732   # Only process if variable expands to non-empty
53733 
53734   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53735     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53736 
53737   # Input might be given as Windows format, start by converting to
53738   # unix format.
53739   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53740   new_path=`$CYGPATH -u "$path"`
53741 
53742   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53743   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53744   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53745   # "foo.exe" is OK but "foo" is an error.
53746   #
53747   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53748   # It is also a way to make sure we got the proper file name for the real test later on.
53749   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53750   if test "x$test_shortpath" = x; then
53751     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53752 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53753     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53754   fi
53755 
53756   # Call helper function which possibly converts this using DOS-style short mode.
53757   # If so, the updated path is stored in $new_path.
53758 
53759   input_path="$new_path"
53760   # Check if we need to convert this using DOS-style short mode. If the path
53761   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53762   # take no chances and rewrite it.
53763   # Note: m4 eats our [], so we need to use [ and ] instead.
53764   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53765   if test "x$has_forbidden_chars" != x; then
53766     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53767     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53768     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53769     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53770       # Going to short mode and back again did indeed matter. Since short mode is
53771       # case insensitive, let's make it lowercase to improve readability.
53772       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53773       # Now convert it back to Unix-style (cygpath)
53774       input_path=`$CYGPATH -u "$shortmode_path"`
53775       new_path="$input_path"
53776     fi
53777   fi
53778 
53779   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53780   if test "x$test_cygdrive_prefix" = x; then
53781     # As a simple fix, exclude /usr/bin since it's not a real path.
53782     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53783       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53784       # a path prefixed by /cygdrive for fixpath to work.
53785       new_path="$CYGWIN_ROOT_PATH$input_path"
53786     fi
53787   fi
53788 
53789 
53790   if test "x$path" != "x$new_path"; then
53791     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53792     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53793 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53794   fi
53795 
53796     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53797 
53798   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53799   has_colon=`$ECHO $path | $GREP ^.:`
53800   new_path="$path"
53801   if test "x$has_colon" = x; then
53802     # Not in mixed or Windows style, start by that.
53803     new_path=`cmd //c echo $path`
53804   fi
53805 
53806 
53807   input_path="$new_path"
53808   # Check if we need to convert this using DOS-style short mode. If the path
53809   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53810   # take no chances and rewrite it.
53811   # Note: m4 eats our [], so we need to use [ and ] instead.
53812   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53813   if test "x$has_forbidden_chars" != x; then
53814     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53815     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53816   fi
53817 
53818 
53819   windows_path="$new_path"
53820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53821     unix_path=`$CYGPATH -u "$windows_path"`
53822     new_path="$unix_path"
53823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53825     new_path="$unix_path"
53826   fi
53827 
53828   if test "x$path" != "x$new_path"; then
53829     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53830     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53831 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53832   fi
53833 
53834   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53835   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53836 
53837     else
53838       # We're on a unix platform. Hooray! :)
53839       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53840       has_space=`$ECHO "$path" | $GREP " "`
53841       if test "x$has_space" != x; then
53842         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53843 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53844         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53845       fi
53846 
53847       # Use eval to expand a potential ~
53848       eval path="$path"
53849       if test ! -f "$path" && test ! -d "$path"; then
53850         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53851       fi
53852 
53853       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53854     fi
53855   fi
53856 
53857 
53858   # Only process if variable expands to non-empty
53859 
53860   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53861     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53862 
53863   # Input might be given as Windows format, start by converting to
53864   # unix format.
53865   path="$POTENTIAL_FREETYPE_LIB_PATH"
53866   new_path=`$CYGPATH -u "$path"`
53867 
53868   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53869   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53870   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53871   # "foo.exe" is OK but "foo" is an error.
53872   #
53873   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53874   # It is also a way to make sure we got the proper file name for the real test later on.
53875   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53876   if test "x$test_shortpath" = x; then
53877     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53878 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53879     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53880   fi
53881 
53882   # Call helper function which possibly converts this using DOS-style short mode.
53883   # If so, the updated path is stored in $new_path.
53884 
53885   input_path="$new_path"
53886   # Check if we need to convert this using DOS-style short mode. If the path
53887   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53888   # take no chances and rewrite it.
53889   # Note: m4 eats our [], so we need to use [ and ] instead.
53890   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53891   if test "x$has_forbidden_chars" != x; then
53892     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53893     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53894     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53895     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53896       # Going to short mode and back again did indeed matter. Since short mode is
53897       # case insensitive, let's make it lowercase to improve readability.
53898       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53899       # Now convert it back to Unix-style (cygpath)
53900       input_path=`$CYGPATH -u "$shortmode_path"`
53901       new_path="$input_path"
53902     fi
53903   fi
53904 
53905   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53906   if test "x$test_cygdrive_prefix" = x; then
53907     # As a simple fix, exclude /usr/bin since it's not a real path.
53908     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53909       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53910       # a path prefixed by /cygdrive for fixpath to work.
53911       new_path="$CYGWIN_ROOT_PATH$input_path"
53912     fi
53913   fi
53914 
53915 
53916   if test "x$path" != "x$new_path"; then
53917     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53918     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53919 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53920   fi
53921 
53922     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53923 
53924   path="$POTENTIAL_FREETYPE_LIB_PATH"
53925   has_colon=`$ECHO $path | $GREP ^.:`
53926   new_path="$path"
53927   if test "x$has_colon" = x; then
53928     # Not in mixed or Windows style, start by that.
53929     new_path=`cmd //c echo $path`
53930   fi
53931 
53932 
53933   input_path="$new_path"
53934   # Check if we need to convert this using DOS-style short mode. If the path
53935   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53936   # take no chances and rewrite it.
53937   # Note: m4 eats our [], so we need to use [ and ] instead.
53938   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53939   if test "x$has_forbidden_chars" != x; then
53940     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53941     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53942   fi
53943 
53944 
53945   windows_path="$new_path"
53946   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53947     unix_path=`$CYGPATH -u "$windows_path"`
53948     new_path="$unix_path"
53949   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53950     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53951     new_path="$unix_path"
53952   fi
53953 
53954   if test "x$path" != "x$new_path"; then
53955     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53956     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53957 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53958   fi
53959 
53960   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53961   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53962 
53963     else
53964       # We're on a unix platform. Hooray! :)
53965       path="$POTENTIAL_FREETYPE_LIB_PATH"
53966       has_space=`$ECHO "$path" | $GREP " "`
53967       if test "x$has_space" != x; then
53968         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53969 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53970         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53971       fi
53972 
53973       # Use eval to expand a potential ~
53974       eval path="$path"
53975       if test ! -f "$path" && test ! -d "$path"; then
53976         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53977       fi
53978 
53979       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53980     fi
53981   fi
53982 
53983 
53984     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53985     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53986 $as_echo_n "checking for freetype includes... " >&6; }
53987     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53988 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53989     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53990     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53991 $as_echo_n "checking for freetype libraries... " >&6; }
53992     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53993 $as_echo "$FREETYPE_LIB_PATH" >&6; }
53994   fi
53995 
53996             else
53997 
53998   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53999   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
54000   METHOD="well-known location"
54001 
54002   # Let's start with an optimistic view of the world :-)
54003   FOUND_FREETYPE=yes
54004 
54005   # First look for the canonical freetype main include file ft2build.h.
54006   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54007     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54008     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54009     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54010       # Fail.
54011       FOUND_FREETYPE=no
54012     fi
54013   fi
54014 
54015   if test "x$FOUND_FREETYPE" = xyes; then
54016     # Include file found, let's continue the sanity check.
54017     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54018 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54019 
54020     # Reset to default value
54021     FREETYPE_BASE_NAME=freetype
54022     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54023     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54024       if test "x$OPENJDK_TARGET_OS" = xmacosx \
54025           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54026         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54027         # for the .6 version explicitly.
54028         FREETYPE_BASE_NAME=freetype.6
54029         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54030         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54031 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54032       else
54033         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54034 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54035         FOUND_FREETYPE=no
54036       fi
54037     else
54038       if test "x$OPENJDK_TARGET_OS" = xwindows; then
54039         # On Windows, we will need both .lib and .dll file.
54040         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54041           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54042 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54043           FOUND_FREETYPE=no
54044         fi
54045       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54046           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54047         # Found lib in isa dir, use that instead.
54048         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54049         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54050 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54051       fi
54052     fi
54053   fi
54054 
54055   if test "x$FOUND_FREETYPE" = xyes; then
54056 
54057   # Only process if variable expands to non-empty
54058 
54059   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54060     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54061 
54062   # Input might be given as Windows format, start by converting to
54063   # unix format.
54064   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54065   new_path=`$CYGPATH -u "$path"`
54066 
54067   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54068   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54069   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54070   # "foo.exe" is OK but "foo" is an error.
54071   #
54072   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54073   # It is also a way to make sure we got the proper file name for the real test later on.
54074   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54075   if test "x$test_shortpath" = x; then
54076     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54077 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54078     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54079   fi
54080 
54081   # Call helper function which possibly converts this using DOS-style short mode.
54082   # If so, the updated path is stored in $new_path.
54083 
54084   input_path="$new_path"
54085   # Check if we need to convert this using DOS-style short mode. If the path
54086   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54087   # take no chances and rewrite it.
54088   # Note: m4 eats our [], so we need to use [ and ] instead.
54089   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54090   if test "x$has_forbidden_chars" != x; then
54091     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54092     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54093     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54094     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54095       # Going to short mode and back again did indeed matter. Since short mode is
54096       # case insensitive, let's make it lowercase to improve readability.
54097       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54098       # Now convert it back to Unix-style (cygpath)
54099       input_path=`$CYGPATH -u "$shortmode_path"`
54100       new_path="$input_path"
54101     fi
54102   fi
54103 
54104   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54105   if test "x$test_cygdrive_prefix" = x; then
54106     # As a simple fix, exclude /usr/bin since it's not a real path.
54107     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54108       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54109       # a path prefixed by /cygdrive for fixpath to work.
54110       new_path="$CYGWIN_ROOT_PATH$input_path"
54111     fi
54112   fi
54113 
54114 
54115   if test "x$path" != "x$new_path"; then
54116     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54117     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54118 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54119   fi
54120 
54121     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54122 
54123   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54124   has_colon=`$ECHO $path | $GREP ^.:`
54125   new_path="$path"
54126   if test "x$has_colon" = x; then
54127     # Not in mixed or Windows style, start by that.
54128     new_path=`cmd //c echo $path`
54129   fi
54130 
54131 
54132   input_path="$new_path"
54133   # Check if we need to convert this using DOS-style short mode. If the path
54134   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54135   # take no chances and rewrite it.
54136   # Note: m4 eats our [], so we need to use [ and ] instead.
54137   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54138   if test "x$has_forbidden_chars" != x; then
54139     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54140     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54141   fi
54142 
54143 
54144   windows_path="$new_path"
54145   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54146     unix_path=`$CYGPATH -u "$windows_path"`
54147     new_path="$unix_path"
54148   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54149     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54150     new_path="$unix_path"
54151   fi
54152 
54153   if test "x$path" != "x$new_path"; then
54154     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54155     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54156 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54157   fi
54158 
54159   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54160   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54161 
54162     else
54163       # We're on a unix platform. Hooray! :)
54164       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54165       has_space=`$ECHO "$path" | $GREP " "`
54166       if test "x$has_space" != x; then
54167         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54168 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54169         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54170       fi
54171 
54172       # Use eval to expand a potential ~
54173       eval path="$path"
54174       if test ! -f "$path" && test ! -d "$path"; then
54175         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54176       fi
54177 
54178       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54179     fi
54180   fi
54181 
54182 
54183   # Only process if variable expands to non-empty
54184 
54185   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54186     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54187 
54188   # Input might be given as Windows format, start by converting to
54189   # unix format.
54190   path="$POTENTIAL_FREETYPE_LIB_PATH"
54191   new_path=`$CYGPATH -u "$path"`
54192 
54193   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54194   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54195   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54196   # "foo.exe" is OK but "foo" is an error.
54197   #
54198   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54199   # It is also a way to make sure we got the proper file name for the real test later on.
54200   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54201   if test "x$test_shortpath" = x; then
54202     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54203 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54204     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54205   fi
54206 
54207   # Call helper function which possibly converts this using DOS-style short mode.
54208   # If so, the updated path is stored in $new_path.
54209 
54210   input_path="$new_path"
54211   # Check if we need to convert this using DOS-style short mode. If the path
54212   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54213   # take no chances and rewrite it.
54214   # Note: m4 eats our [], so we need to use [ and ] instead.
54215   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54216   if test "x$has_forbidden_chars" != x; then
54217     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54218     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54219     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54220     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54221       # Going to short mode and back again did indeed matter. Since short mode is
54222       # case insensitive, let's make it lowercase to improve readability.
54223       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54224       # Now convert it back to Unix-style (cygpath)
54225       input_path=`$CYGPATH -u "$shortmode_path"`
54226       new_path="$input_path"
54227     fi
54228   fi
54229 
54230   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54231   if test "x$test_cygdrive_prefix" = x; then
54232     # As a simple fix, exclude /usr/bin since it's not a real path.
54233     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54234       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54235       # a path prefixed by /cygdrive for fixpath to work.
54236       new_path="$CYGWIN_ROOT_PATH$input_path"
54237     fi
54238   fi
54239 
54240 
54241   if test "x$path" != "x$new_path"; then
54242     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54243     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54244 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54245   fi
54246 
54247     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54248 
54249   path="$POTENTIAL_FREETYPE_LIB_PATH"
54250   has_colon=`$ECHO $path | $GREP ^.:`
54251   new_path="$path"
54252   if test "x$has_colon" = x; then
54253     # Not in mixed or Windows style, start by that.
54254     new_path=`cmd //c echo $path`
54255   fi
54256 
54257 
54258   input_path="$new_path"
54259   # Check if we need to convert this using DOS-style short mode. If the path
54260   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54261   # take no chances and rewrite it.
54262   # Note: m4 eats our [], so we need to use [ and ] instead.
54263   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54264   if test "x$has_forbidden_chars" != x; then
54265     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54266     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54267   fi
54268 
54269 
54270   windows_path="$new_path"
54271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54272     unix_path=`$CYGPATH -u "$windows_path"`
54273     new_path="$unix_path"
54274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54275     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54276     new_path="$unix_path"
54277   fi
54278 
54279   if test "x$path" != "x$new_path"; then
54280     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54281     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54282 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54283   fi
54284 
54285   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54286   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54287 
54288     else
54289       # We're on a unix platform. Hooray! :)
54290       path="$POTENTIAL_FREETYPE_LIB_PATH"
54291       has_space=`$ECHO "$path" | $GREP " "`
54292       if test "x$has_space" != x; then
54293         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54294 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54295         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54296       fi
54297 
54298       # Use eval to expand a potential ~
54299       eval path="$path"
54300       if test ! -f "$path" && test ! -d "$path"; then
54301         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54302       fi
54303 
54304       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54305     fi
54306   fi
54307 
54308 
54309     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54310     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54311 $as_echo_n "checking for freetype includes... " >&6; }
54312     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54313 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54314     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54315     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54316 $as_echo_n "checking for freetype libraries... " >&6; }
54317     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54318 $as_echo "$FREETYPE_LIB_PATH" >&6; }
54319   fi
54320 
54321               if test "x$FOUND_FREETYPE" != xyes; then
54322 
54323   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54324   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
54325   METHOD="well-known location"
54326 
54327   # Let's start with an optimistic view of the world :-)
54328   FOUND_FREETYPE=yes
54329 
54330   # First look for the canonical freetype main include file ft2build.h.
54331   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54332     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54333     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54334     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54335       # Fail.
54336       FOUND_FREETYPE=no
54337     fi
54338   fi
54339 
54340   if test "x$FOUND_FREETYPE" = xyes; then
54341     # Include file found, let's continue the sanity check.
54342     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54343 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54344 
54345     # Reset to default value
54346     FREETYPE_BASE_NAME=freetype
54347     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54348     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54349       if test "x$OPENJDK_TARGET_OS" = xmacosx \
54350           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54351         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54352         # for the .6 version explicitly.
54353         FREETYPE_BASE_NAME=freetype.6
54354         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54355         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54356 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54357       else
54358         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54359 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54360         FOUND_FREETYPE=no
54361       fi
54362     else
54363       if test "x$OPENJDK_TARGET_OS" = xwindows; then
54364         # On Windows, we will need both .lib and .dll file.
54365         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54366           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54367 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54368           FOUND_FREETYPE=no
54369         fi
54370       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54371           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54372         # Found lib in isa dir, use that instead.
54373         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54374         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54375 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54376       fi
54377     fi
54378   fi
54379 
54380   if test "x$FOUND_FREETYPE" = xyes; then
54381 
54382   # Only process if variable expands to non-empty
54383 
54384   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54385     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54386 
54387   # Input might be given as Windows format, start by converting to
54388   # unix format.
54389   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54390   new_path=`$CYGPATH -u "$path"`
54391 
54392   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54393   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54394   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54395   # "foo.exe" is OK but "foo" is an error.
54396   #
54397   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54398   # It is also a way to make sure we got the proper file name for the real test later on.
54399   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54400   if test "x$test_shortpath" = x; then
54401     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54402 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54403     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54404   fi
54405 
54406   # Call helper function which possibly converts this using DOS-style short mode.
54407   # If so, the updated path is stored in $new_path.
54408 
54409   input_path="$new_path"
54410   # Check if we need to convert this using DOS-style short mode. If the path
54411   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54412   # take no chances and rewrite it.
54413   # Note: m4 eats our [], so we need to use [ and ] instead.
54414   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54415   if test "x$has_forbidden_chars" != x; then
54416     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54417     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54418     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54419     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54420       # Going to short mode and back again did indeed matter. Since short mode is
54421       # case insensitive, let's make it lowercase to improve readability.
54422       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54423       # Now convert it back to Unix-style (cygpath)
54424       input_path=`$CYGPATH -u "$shortmode_path"`
54425       new_path="$input_path"
54426     fi
54427   fi
54428 
54429   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54430   if test "x$test_cygdrive_prefix" = x; then
54431     # As a simple fix, exclude /usr/bin since it's not a real path.
54432     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54433       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54434       # a path prefixed by /cygdrive for fixpath to work.
54435       new_path="$CYGWIN_ROOT_PATH$input_path"
54436     fi
54437   fi
54438 
54439 
54440   if test "x$path" != "x$new_path"; then
54441     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54442     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54443 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54444   fi
54445 
54446     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54447 
54448   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54449   has_colon=`$ECHO $path | $GREP ^.:`
54450   new_path="$path"
54451   if test "x$has_colon" = x; then
54452     # Not in mixed or Windows style, start by that.
54453     new_path=`cmd //c echo $path`
54454   fi
54455 
54456 
54457   input_path="$new_path"
54458   # Check if we need to convert this using DOS-style short mode. If the path
54459   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54460   # take no chances and rewrite it.
54461   # Note: m4 eats our [], so we need to use [ and ] instead.
54462   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54463   if test "x$has_forbidden_chars" != x; then
54464     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54465     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54466   fi
54467 
54468 
54469   windows_path="$new_path"
54470   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54471     unix_path=`$CYGPATH -u "$windows_path"`
54472     new_path="$unix_path"
54473   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54474     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54475     new_path="$unix_path"
54476   fi
54477 
54478   if test "x$path" != "x$new_path"; then
54479     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54480     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54481 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54482   fi
54483 
54484   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54485   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54486 
54487     else
54488       # We're on a unix platform. Hooray! :)
54489       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54490       has_space=`$ECHO "$path" | $GREP " "`
54491       if test "x$has_space" != x; then
54492         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54493 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54494         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54495       fi
54496 
54497       # Use eval to expand a potential ~
54498       eval path="$path"
54499       if test ! -f "$path" && test ! -d "$path"; then
54500         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54501       fi
54502 
54503       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54504     fi
54505   fi
54506 
54507 
54508   # Only process if variable expands to non-empty
54509 
54510   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54511     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54512 
54513   # Input might be given as Windows format, start by converting to
54514   # unix format.
54515   path="$POTENTIAL_FREETYPE_LIB_PATH"
54516   new_path=`$CYGPATH -u "$path"`
54517 
54518   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54519   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54520   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54521   # "foo.exe" is OK but "foo" is an error.
54522   #
54523   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54524   # It is also a way to make sure we got the proper file name for the real test later on.
54525   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54526   if test "x$test_shortpath" = x; then
54527     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54528 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54529     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54530   fi
54531 
54532   # Call helper function which possibly converts this using DOS-style short mode.
54533   # If so, the updated path is stored in $new_path.
54534 
54535   input_path="$new_path"
54536   # Check if we need to convert this using DOS-style short mode. If the path
54537   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54538   # take no chances and rewrite it.
54539   # Note: m4 eats our [], so we need to use [ and ] instead.
54540   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54541   if test "x$has_forbidden_chars" != x; then
54542     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54543     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54544     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54545     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54546       # Going to short mode and back again did indeed matter. Since short mode is
54547       # case insensitive, let's make it lowercase to improve readability.
54548       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54549       # Now convert it back to Unix-style (cygpath)
54550       input_path=`$CYGPATH -u "$shortmode_path"`
54551       new_path="$input_path"
54552     fi
54553   fi
54554 
54555   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54556   if test "x$test_cygdrive_prefix" = x; then
54557     # As a simple fix, exclude /usr/bin since it's not a real path.
54558     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54559       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54560       # a path prefixed by /cygdrive for fixpath to work.
54561       new_path="$CYGWIN_ROOT_PATH$input_path"
54562     fi
54563   fi
54564 
54565 
54566   if test "x$path" != "x$new_path"; then
54567     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54568     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54569 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54570   fi
54571 
54572     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54573 
54574   path="$POTENTIAL_FREETYPE_LIB_PATH"
54575   has_colon=`$ECHO $path | $GREP ^.:`
54576   new_path="$path"
54577   if test "x$has_colon" = x; then
54578     # Not in mixed or Windows style, start by that.
54579     new_path=`cmd //c echo $path`
54580   fi
54581 
54582 
54583   input_path="$new_path"
54584   # Check if we need to convert this using DOS-style short mode. If the path
54585   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54586   # take no chances and rewrite it.
54587   # Note: m4 eats our [], so we need to use [ and ] instead.
54588   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54589   if test "x$has_forbidden_chars" != x; then
54590     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54591     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54592   fi
54593 
54594 
54595   windows_path="$new_path"
54596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54597     unix_path=`$CYGPATH -u "$windows_path"`
54598     new_path="$unix_path"
54599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54600     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54601     new_path="$unix_path"
54602   fi
54603 
54604   if test "x$path" != "x$new_path"; then
54605     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54606     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54607 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54608   fi
54609 
54610   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54611   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54612 
54613     else
54614       # We're on a unix platform. Hooray! :)
54615       path="$POTENTIAL_FREETYPE_LIB_PATH"
54616       has_space=`$ECHO "$path" | $GREP " "`
54617       if test "x$has_space" != x; then
54618         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54619 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54620         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54621       fi
54622 
54623       # Use eval to expand a potential ~
54624       eval path="$path"
54625       if test ! -f "$path" && test ! -d "$path"; then
54626         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54627       fi
54628 
54629       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54630     fi
54631   fi
54632 
54633 
54634     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54635     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54636 $as_echo_n "checking for freetype includes... " >&6; }
54637     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54638 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54639     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54640     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54641 $as_echo_n "checking for freetype libraries... " >&6; }
54642     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54643 $as_echo "$FREETYPE_LIB_PATH" >&6; }
54644   fi
54645 
54646               fi
54647             fi
54648           fi
54649         fi
54650       fi # end check in well-known locations
54651 
54652       if test "x$FOUND_FREETYPE" != xyes; then
54653 
54654   # Print a helpful message on how to acquire the necessary build dependency.
54655   # freetype is the help tag: freetype, cups, alsa etc
54656   MISSING_DEPENDENCY=freetype
54657 
54658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54659     cygwin_help $MISSING_DEPENDENCY
54660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54661     msys_help $MISSING_DEPENDENCY
54662   else
54663     PKGHANDLER_COMMAND=
54664 
54665     case $PKGHANDLER in
54666       apt-get)
54667         apt_help     $MISSING_DEPENDENCY ;;
54668       yum)
54669         yum_help     $MISSING_DEPENDENCY ;;
54670       port)
54671         port_help    $MISSING_DEPENDENCY ;;
54672       pkgutil)
54673         pkgutil_help $MISSING_DEPENDENCY ;;
54674       pkgadd)
54675         pkgadd_help  $MISSING_DEPENDENCY ;;
54676     esac
54677 
54678     if test "x$PKGHANDLER_COMMAND" != x; then
54679       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54680     fi
54681   fi
54682 
54683         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
54684       fi
54685     fi # end user specified settings
54686 
54687     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
54688     if test "x$FREETYPE_CFLAGS" = x; then
54689 
54690   # Only process if variable expands to non-empty
54691 
54692   if test "x$FREETYPE_INCLUDE_PATH" != x; then
54693     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54694 
54695   # Input might be given as Windows format, start by converting to
54696   # unix format.
54697   path="$FREETYPE_INCLUDE_PATH"
54698   new_path=`$CYGPATH -u "$path"`
54699 
54700   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54701   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54702   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54703   # "foo.exe" is OK but "foo" is an error.
54704   #
54705   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54706   # It is also a way to make sure we got the proper file name for the real test later on.
54707   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54708   if test "x$test_shortpath" = x; then
54709     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54710 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54711     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
54712   fi
54713 
54714   # Call helper function which possibly converts this using DOS-style short mode.
54715   # If so, the updated path is stored in $new_path.
54716 
54717   input_path="$new_path"
54718   # Check if we need to convert this using DOS-style short mode. If the path
54719   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54720   # take no chances and rewrite it.
54721   # Note: m4 eats our [], so we need to use [ and ] instead.
54722   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54723   if test "x$has_forbidden_chars" != x; then
54724     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54725     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54726     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54727     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54728       # Going to short mode and back again did indeed matter. Since short mode is
54729       # case insensitive, let's make it lowercase to improve readability.
54730       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54731       # Now convert it back to Unix-style (cygpath)
54732       input_path=`$CYGPATH -u "$shortmode_path"`
54733       new_path="$input_path"
54734     fi
54735   fi
54736 
54737   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54738   if test "x$test_cygdrive_prefix" = x; then
54739     # As a simple fix, exclude /usr/bin since it's not a real path.
54740     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54741       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54742       # a path prefixed by /cygdrive for fixpath to work.
54743       new_path="$CYGWIN_ROOT_PATH$input_path"
54744     fi
54745   fi
54746 
54747 
54748   if test "x$path" != "x$new_path"; then
54749     FREETYPE_INCLUDE_PATH="$new_path"
54750     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54751 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54752   fi
54753 
54754     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54755 
54756   path="$FREETYPE_INCLUDE_PATH"
54757   has_colon=`$ECHO $path | $GREP ^.:`
54758   new_path="$path"
54759   if test "x$has_colon" = x; then
54760     # Not in mixed or Windows style, start by that.
54761     new_path=`cmd //c echo $path`
54762   fi
54763 
54764 
54765   input_path="$new_path"
54766   # Check if we need to convert this using DOS-style short mode. If the path
54767   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54768   # take no chances and rewrite it.
54769   # Note: m4 eats our [], so we need to use [ and ] instead.
54770   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54771   if test "x$has_forbidden_chars" != x; then
54772     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54773     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54774   fi
54775 
54776 
54777   windows_path="$new_path"
54778   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54779     unix_path=`$CYGPATH -u "$windows_path"`
54780     new_path="$unix_path"
54781   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54782     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54783     new_path="$unix_path"
54784   fi
54785 
54786   if test "x$path" != "x$new_path"; then
54787     FREETYPE_INCLUDE_PATH="$new_path"
54788     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54789 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54790   fi
54791 
54792   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54793   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54794 
54795     else
54796       # We're on a unix platform. Hooray! :)
54797       path="$FREETYPE_INCLUDE_PATH"
54798       has_space=`$ECHO "$path" | $GREP " "`
54799       if test "x$has_space" != x; then
54800         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54801 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54802         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54803       fi
54804 
54805       # Use eval to expand a potential ~
54806       eval path="$path"
54807       if test ! -f "$path" && test ! -d "$path"; then
54808         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54809       fi
54810 
54811       FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54812     fi
54813   fi
54814 
54815       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
54816         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
54817       else
54818         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
54819       fi
54820     fi
54821 
54822     if test "x$FREETYPE_LIBS" = x; then
54823 
54824   # Only process if variable expands to non-empty
54825 
54826   if test "x$FREETYPE_LIB_PATH" != x; then
54827     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54828 
54829   # Input might be given as Windows format, start by converting to
54830   # unix format.
54831   path="$FREETYPE_LIB_PATH"
54832   new_path=`$CYGPATH -u "$path"`
54833 
54834   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54835   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54836   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54837   # "foo.exe" is OK but "foo" is an error.
54838   #
54839   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54840   # It is also a way to make sure we got the proper file name for the real test later on.
54841   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54842   if test "x$test_shortpath" = x; then
54843     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54844 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54845     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
54846   fi
54847 
54848   # Call helper function which possibly converts this using DOS-style short mode.
54849   # If so, the updated path is stored in $new_path.
54850 
54851   input_path="$new_path"
54852   # Check if we need to convert this using DOS-style short mode. If the path
54853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54854   # take no chances and rewrite it.
54855   # Note: m4 eats our [], so we need to use [ and ] instead.
54856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54857   if test "x$has_forbidden_chars" != x; then
54858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54859     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54860     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54861     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54862       # Going to short mode and back again did indeed matter. Since short mode is
54863       # case insensitive, let's make it lowercase to improve readability.
54864       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54865       # Now convert it back to Unix-style (cygpath)
54866       input_path=`$CYGPATH -u "$shortmode_path"`
54867       new_path="$input_path"
54868     fi
54869   fi
54870 
54871   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54872   if test "x$test_cygdrive_prefix" = x; then
54873     # As a simple fix, exclude /usr/bin since it's not a real path.
54874     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54875       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54876       # a path prefixed by /cygdrive for fixpath to work.
54877       new_path="$CYGWIN_ROOT_PATH$input_path"
54878     fi
54879   fi
54880 
54881 
54882   if test "x$path" != "x$new_path"; then
54883     FREETYPE_LIB_PATH="$new_path"
54884     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
54885 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54886   fi
54887 
54888     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54889 
54890   path="$FREETYPE_LIB_PATH"
54891   has_colon=`$ECHO $path | $GREP ^.:`
54892   new_path="$path"
54893   if test "x$has_colon" = x; then
54894     # Not in mixed or Windows style, start by that.
54895     new_path=`cmd //c echo $path`
54896   fi
54897 
54898 
54899   input_path="$new_path"
54900   # Check if we need to convert this using DOS-style short mode. If the path
54901   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54902   # take no chances and rewrite it.
54903   # Note: m4 eats our [], so we need to use [ and ] instead.
54904   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54905   if test "x$has_forbidden_chars" != x; then
54906     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54907     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54908   fi
54909 
54910 
54911   windows_path="$new_path"
54912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54913     unix_path=`$CYGPATH -u "$windows_path"`
54914     new_path="$unix_path"
54915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54917     new_path="$unix_path"
54918   fi
54919 
54920   if test "x$path" != "x$new_path"; then
54921     FREETYPE_LIB_PATH="$new_path"
54922     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
54923 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54924   fi
54925 
54926   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54927   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54928 
54929     else
54930       # We're on a unix platform. Hooray! :)
54931       path="$FREETYPE_LIB_PATH"
54932       has_space=`$ECHO "$path" | $GREP " "`
54933       if test "x$has_space" != x; then
54934         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54935 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54936         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54937       fi
54938 
54939       # Use eval to expand a potential ~
54940       eval path="$path"
54941       if test ! -f "$path" && test ! -d "$path"; then
54942         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54943       fi
54944 
54945       FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54946     fi
54947   fi
54948 
54949       if test "x$OPENJDK_TARGET_OS" = xwindows; then
54950         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
54951       else
54952         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
54953       fi
54954     fi
54955 
54956     # Try to compile it
54957     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
54958 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
54959     ac_ext=cpp
54960 ac_cpp='$CXXCPP $CPPFLAGS'
54961 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54962 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54963 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54964 
54965     PREV_CXXCFLAGS="$CXXFLAGS"
54966     PREV_LIBS="$LIBS"
54967     PREV_CXX="$CXX"
54968     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
54969     LIBS="$LIBS $FREETYPE_LIBS"
54970     CXX="$FIXPATH $CXX"
54971     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54972 /* end confdefs.h.  */
54973 
54974           #include<ft2build.h>
54975           #include FT_FREETYPE_H
54976           int main () {
54977             FT_Init_FreeType(NULL);
54978             return 0;
54979           }
54980 
54981 _ACEOF
54982 if ac_fn_cxx_try_link "$LINENO"; then :
54983 
54984           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54985 $as_echo "yes" >&6; }
54986 
54987 else
54988 
54989           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54990 $as_echo "no" >&6; }
54991           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
54992 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
54993           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
54994 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
54995 
54996 
54997   # Print a helpful message on how to acquire the necessary build dependency.
54998   # freetype is the help tag: freetype, cups, alsa etc
54999   MISSING_DEPENDENCY=freetype
55000 
55001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55002     cygwin_help $MISSING_DEPENDENCY
55003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55004     msys_help $MISSING_DEPENDENCY
55005   else
55006     PKGHANDLER_COMMAND=
55007 
55008     case $PKGHANDLER in
55009       apt-get)
55010         apt_help     $MISSING_DEPENDENCY ;;
55011       yum)
55012         yum_help     $MISSING_DEPENDENCY ;;
55013       port)
55014         port_help    $MISSING_DEPENDENCY ;;
55015       pkgutil)
55016         pkgutil_help $MISSING_DEPENDENCY ;;
55017       pkgadd)
55018         pkgadd_help  $MISSING_DEPENDENCY ;;
55019     esac
55020 
55021     if test "x$PKGHANDLER_COMMAND" != x; then
55022       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55023     fi
55024   fi
55025 
55026 
55027           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
55028 
55029 
55030 fi
55031 rm -f core conftest.err conftest.$ac_objext \
55032     conftest$ac_exeext conftest.$ac_ext
55033     CXXCFLAGS="$PREV_CXXFLAGS"
55034     LIBS="$PREV_LIBS"
55035     CXX="$PREV_CXX"
55036     ac_ext=cpp
55037 ac_cpp='$CXXCPP $CPPFLAGS'
55038 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55039 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55040 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55041 
55042 
55043     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
55044 $as_echo_n "checking if we should bundle freetype... " >&6; }
55045     if test "x$BUNDLE_FREETYPE" = xyes; then
55046       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
55047     fi
55048     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
55049 $as_echo "$BUNDLE_FREETYPE" >&6; }
55050 
55051   fi # end freetype needed
55052 
55053 
55054 
55055 
55056 
55057 
55058 
55059 # Check whether --with-alsa was given.
55060 if test "${with_alsa+set}" = set; then :
55061   withval=$with_alsa;
55062 fi
55063 
55064 
55065 # Check whether --with-alsa-include was given.
55066 if test "${with_alsa_include+set}" = set; then :
55067   withval=$with_alsa_include;
55068 fi
55069 
55070 
55071 # Check whether --with-alsa-lib was given.
55072 if test "${with_alsa_lib+set}" = set; then :
55073   withval=$with_alsa_lib;
55074 fi
55075 
55076 
55077   if test "x$NEEDS_LIB_ALSA" = xfalse; then
55078     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
55079         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
55080         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
55081       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
55082 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
55083     fi
55084     ALSA_CFLAGS=
55085     ALSA_LIBS=
55086   else
55087     ALSA_FOUND=no
55088 
55089     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
55090       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
55091     fi
55092 
55093     if test "x${with_alsa}" != x; then
55094       ALSA_LIBS="-L${with_alsa}/lib -lasound"
55095       ALSA_CFLAGS="-I${with_alsa}/include"
55096       ALSA_FOUND=yes
55097     fi
55098     if test "x${with_alsa_include}" != x; then
55099       ALSA_CFLAGS="-I${with_alsa_include}"
55100       ALSA_FOUND=yes
55101     fi
55102     if test "x${with_alsa_lib}" != x; then
55103       ALSA_LIBS="-L${with_alsa_lib} -lasound"
55104       ALSA_FOUND=yes
55105     fi
55106     # Do not try pkg-config if we have a sysroot set.
55107     if test "x$SYSROOT" = x; then
55108       if test "x$ALSA_FOUND" = xno; then
55109 
55110 pkg_failed=no
55111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
55112 $as_echo_n "checking for ALSA... " >&6; }
55113 
55114 if test -n "$ALSA_CFLAGS"; then
55115     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
55116  elif test -n "$PKG_CONFIG"; then
55117     if test -n "$PKG_CONFIG" && \
55118     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
55119   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
55120   ac_status=$?
55121   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55122   test $ac_status = 0; }; then
55123   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
55124 else
55125   pkg_failed=yes
55126 fi
55127  else
55128     pkg_failed=untried
55129 fi
55130 if test -n "$ALSA_LIBS"; then
55131     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
55132  elif test -n "$PKG_CONFIG"; then
55133     if test -n "$PKG_CONFIG" && \
55134     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
55135   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
55136   ac_status=$?
55137   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55138   test $ac_status = 0; }; then
55139   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
55140 else
55141   pkg_failed=yes
55142 fi
55143  else
55144     pkg_failed=untried
55145 fi
55146 
55147 
55148 
55149 if test $pkg_failed = yes; then
55150 
55151 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55152         _pkg_short_errors_supported=yes
55153 else
55154         _pkg_short_errors_supported=no
55155 fi
55156         if test $_pkg_short_errors_supported = yes; then
55157                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
55158         else
55159                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
55160         fi
55161         # Put the nasty error message in config.log where it belongs
55162         echo "$ALSA_PKG_ERRORS" >&5
55163 
55164         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55165 $as_echo "no" >&6; }
55166                 ALSA_FOUND=no
55167 elif test $pkg_failed = untried; then
55168         ALSA_FOUND=no
55169 else
55170         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
55171         ALSA_LIBS=$pkg_cv_ALSA_LIBS
55172         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55173 $as_echo "yes" >&6; }
55174         ALSA_FOUND=yes
55175 fi
55176       fi
55177     fi
55178     if test "x$ALSA_FOUND" = xno; then
55179       for ac_header in alsa/asoundlib.h
55180 do :
55181   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
55182 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
55183   cat >>confdefs.h <<_ACEOF
55184 #define HAVE_ALSA_ASOUNDLIB_H 1
55185 _ACEOF
55186 
55187             ALSA_FOUND=yes
55188             ALSA_CFLAGS=-Iignoreme
55189             ALSA_LIBS=-lasound
55190             DEFAULT_ALSA=yes
55191 
55192 else
55193   ALSA_FOUND=no
55194 
55195 fi
55196 
55197 done
55198 
55199     fi
55200     if test "x$ALSA_FOUND" = xno; then
55201 
55202   # Print a helpful message on how to acquire the necessary build dependency.
55203   # alsa is the help tag: freetype, cups, alsa etc
55204   MISSING_DEPENDENCY=alsa
55205 
55206   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55207     cygwin_help $MISSING_DEPENDENCY
55208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55209     msys_help $MISSING_DEPENDENCY
55210   else
55211     PKGHANDLER_COMMAND=
55212 
55213     case $PKGHANDLER in
55214       apt-get)
55215         apt_help     $MISSING_DEPENDENCY ;;
55216       yum)
55217         yum_help     $MISSING_DEPENDENCY ;;
55218       port)
55219         port_help    $MISSING_DEPENDENCY ;;
55220       pkgutil)
55221         pkgutil_help $MISSING_DEPENDENCY ;;
55222       pkgadd)
55223         pkgadd_help  $MISSING_DEPENDENCY ;;
55224     esac
55225 
55226     if test "x$PKGHANDLER_COMMAND" != x; then
55227       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55228     fi
55229   fi
55230 
55231       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
55232     fi
55233   fi
55234 
55235 
55236 
55237 
55238 
55239 
55240 # Check whether --with-libffi was given.
55241 if test "${with_libffi+set}" = set; then :
55242   withval=$with_libffi;
55243 fi
55244 
55245 
55246 # Check whether --with-libffi-include was given.
55247 if test "${with_libffi_include+set}" = set; then :
55248   withval=$with_libffi_include;
55249 fi
55250 
55251 
55252 # Check whether --with-libffi-lib was given.
55253 if test "${with_libffi_lib+set}" = set; then :
55254   withval=$with_libffi_lib;
55255 fi
55256 
55257 
55258   if test "x$NEEDS_LIB_FFI" = xfalse; then
55259     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
55260         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
55261         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
55262       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
55263 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
55264     fi
55265     LIBFFI_CFLAGS=
55266     LIBFFI_LIBS=
55267   else
55268     LIBFFI_FOUND=no
55269 
55270     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
55271       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
55272     fi
55273 
55274     if test "x${with_libffi}" != x; then
55275       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
55276       LIBFFI_CFLAGS="-I${with_libffi}/include"
55277       LIBFFI_FOUND=yes
55278     fi
55279     if test "x${with_libffi_include}" != x; then
55280       LIBFFI_CFLAGS="-I${with_libffi_include}"
55281       LIBFFI_FOUND=yes
55282     fi
55283     if test "x${with_libffi_lib}" != x; then
55284       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
55285       LIBFFI_FOUND=yes
55286     fi
55287     # Do not try pkg-config if we have a sysroot set.
55288     if test "x$SYSROOT" = x; then
55289       if test "x$LIBFFI_FOUND" = xno; then
55290         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
55291 
55292 pkg_failed=no
55293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
55294 $as_echo_n "checking for LIBFFI... " >&6; }
55295 
55296 if test -n "$LIBFFI_CFLAGS"; then
55297     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
55298  elif test -n "$PKG_CONFIG"; then
55299     if test -n "$PKG_CONFIG" && \
55300     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
55301   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
55302   ac_status=$?
55303   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55304   test $ac_status = 0; }; then
55305   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
55306 else
55307   pkg_failed=yes
55308 fi
55309  else
55310     pkg_failed=untried
55311 fi
55312 if test -n "$LIBFFI_LIBS"; then
55313     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
55314  elif test -n "$PKG_CONFIG"; then
55315     if test -n "$PKG_CONFIG" && \
55316     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
55317   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
55318   ac_status=$?
55319   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55320   test $ac_status = 0; }; then
55321   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
55322 else
55323   pkg_failed=yes
55324 fi
55325  else
55326     pkg_failed=untried
55327 fi
55328 
55329 
55330 
55331 if test $pkg_failed = yes; then
55332 
55333 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55334         _pkg_short_errors_supported=yes
55335 else
55336         _pkg_short_errors_supported=no
55337 fi
55338         if test $_pkg_short_errors_supported = yes; then
55339                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
55340         else
55341                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
55342         fi
55343         # Put the nasty error message in config.log where it belongs
55344         echo "$LIBFFI_PKG_ERRORS" >&5
55345 
55346         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55347 $as_echo "no" >&6; }
55348                 LIBFFI_FOUND=no
55349 elif test $pkg_failed = untried; then
55350         LIBFFI_FOUND=no
55351 else
55352         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
55353         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
55354         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55355 $as_echo "yes" >&6; }
55356         LIBFFI_FOUND=yes
55357 fi
55358       fi
55359     fi
55360     if test "x$LIBFFI_FOUND" = xno; then
55361       for ac_header in ffi.h
55362 do :
55363   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
55364 if test "x$ac_cv_header_ffi_h" = xyes; then :
55365   cat >>confdefs.h <<_ACEOF
55366 #define HAVE_FFI_H 1
55367 _ACEOF
55368 
55369             LIBFFI_FOUND=yes
55370             LIBFFI_CFLAGS=
55371             LIBFFI_LIBS=-lffi
55372 
55373 else
55374   LIBFFI_FOUND=no
55375 
55376 fi
55377 
55378 done
55379 
55380     fi
55381     if test "x$LIBFFI_FOUND" = xno; then
55382 
55383   # Print a helpful message on how to acquire the necessary build dependency.
55384   # ffi is the help tag: freetype, cups, alsa etc
55385   MISSING_DEPENDENCY=ffi
55386 
55387   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55388     cygwin_help $MISSING_DEPENDENCY
55389   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55390     msys_help $MISSING_DEPENDENCY
55391   else
55392     PKGHANDLER_COMMAND=
55393 
55394     case $PKGHANDLER in
55395       apt-get)
55396         apt_help     $MISSING_DEPENDENCY ;;
55397       yum)
55398         yum_help     $MISSING_DEPENDENCY ;;
55399       port)
55400         port_help    $MISSING_DEPENDENCY ;;
55401       pkgutil)
55402         pkgutil_help $MISSING_DEPENDENCY ;;
55403       pkgadd)
55404         pkgadd_help  $MISSING_DEPENDENCY ;;
55405     esac
55406 
55407     if test "x$PKGHANDLER_COMMAND" != x; then
55408       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55409     fi
55410   fi
55411 
55412       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
55413     fi
55414 
55415     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
55416 $as_echo_n "checking if libffi works... " >&6; }
55417     ac_ext=c
55418 ac_cpp='$CPP $CPPFLAGS'
55419 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55420 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55421 ac_compiler_gnu=$ac_cv_c_compiler_gnu
55422 
55423     OLD_CFLAGS="$CFLAGS"
55424     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
55425     OLD_LIBS="$LIBS"
55426     LIBS="$LIBS $LIBFFI_LIBS"
55427     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55428 /* end confdefs.h.  */
55429 #include <ffi.h>
55430 int
55431 main ()
55432 {
55433 
55434           ffi_call(NULL, NULL, NULL, NULL);
55435           return 0;
55436 
55437   ;
55438   return 0;
55439 }
55440 _ACEOF
55441 if ac_fn_c_try_link "$LINENO"; then :
55442   LIBFFI_WORKS=yes
55443 else
55444   LIBFFI_WORKS=no
55445 
55446 fi
55447 rm -f core conftest.err conftest.$ac_objext \
55448     conftest$ac_exeext conftest.$ac_ext
55449     CFLAGS="$OLD_CFLAGS"
55450     LIBS="$OLD_LIBS"
55451     ac_ext=cpp
55452 ac_cpp='$CXXCPP $CPPFLAGS'
55453 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55454 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55455 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55456 
55457     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
55458 $as_echo "$LIBFFI_WORKS" >&6; }
55459 
55460     if test "x$LIBFFI_WORKS" = xno; then
55461 
55462   # Print a helpful message on how to acquire the necessary build dependency.
55463   # ffi is the help tag: freetype, cups, alsa etc
55464   MISSING_DEPENDENCY=ffi
55465 
55466   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55467     cygwin_help $MISSING_DEPENDENCY
55468   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55469     msys_help $MISSING_DEPENDENCY
55470   else
55471     PKGHANDLER_COMMAND=
55472 
55473     case $PKGHANDLER in
55474       apt-get)
55475         apt_help     $MISSING_DEPENDENCY ;;
55476       yum)
55477         yum_help     $MISSING_DEPENDENCY ;;
55478       port)
55479         port_help    $MISSING_DEPENDENCY ;;
55480       pkgutil)
55481         pkgutil_help $MISSING_DEPENDENCY ;;
55482       pkgadd)
55483         pkgadd_help  $MISSING_DEPENDENCY ;;
55484     esac
55485 
55486     if test "x$PKGHANDLER_COMMAND" != x; then
55487       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55488     fi
55489   fi
55490 
55491       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
55492     fi
55493   fi
55494 
55495 
55496 
55497 
55498 
55499   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
55500     # Extract the first word of "llvm-config", so it can be a program name with args.
55501 set dummy llvm-config; ac_word=$2
55502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55503 $as_echo_n "checking for $ac_word... " >&6; }
55504 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
55505   $as_echo_n "(cached) " >&6
55506 else
55507   if test -n "$LLVM_CONFIG"; then
55508   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
55509 else
55510 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55511 for as_dir in $PATH
55512 do
55513   IFS=$as_save_IFS
55514   test -z "$as_dir" && as_dir=.
55515     for ac_exec_ext in '' $ac_executable_extensions; do
55516   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55517     ac_cv_prog_LLVM_CONFIG="llvm-config"
55518     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55519     break 2
55520   fi
55521 done
55522   done
55523 IFS=$as_save_IFS
55524 
55525 fi
55526 fi
55527 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
55528 if test -n "$LLVM_CONFIG"; then
55529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
55530 $as_echo "$LLVM_CONFIG" >&6; }
55531 else
55532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55533 $as_echo "no" >&6; }
55534 fi
55535 
55536 
55537 
55538     if test "x$LLVM_CONFIG" != xllvm-config; then
55539       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
55540     fi
55541 
55542     llvm_components="jit mcjit engine nativecodegen native"
55543     unset LLVM_CFLAGS
55544     for flag in $("$LLVM_CONFIG" --cxxflags); do
55545       if echo "${flag}" | grep -q '^-[ID]'; then
55546         if test "${flag}" != "-D_DEBUG" ; then
55547           if test "${LLVM_CFLAGS}" != "" ; then
55548             LLVM_CFLAGS="${LLVM_CFLAGS} "
55549           fi
55550           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
55551         fi
55552       fi
55553     done
55554     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
55555     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
55556 
55557     unset LLVM_LDFLAGS
55558     for flag in $("${LLVM_CONFIG}" --ldflags); do
55559       if echo "${flag}" | grep -q '^-L'; then
55560         if test "${LLVM_LDFLAGS}" != ""; then
55561           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
55562         fi
55563         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
55564       fi
55565     done
55566 
55567     unset LLVM_LIBS
55568     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
55569       if echo "${flag}" | grep -q '^-l'; then
55570         if test "${LLVM_LIBS}" != ""; then
55571           LLVM_LIBS="${LLVM_LIBS} "
55572         fi
55573         LLVM_LIBS="${LLVM_LIBS}${flag}"
55574       fi
55575     done
55576 
55577 
55578 
55579 
55580   fi
55581 
55582 
55583 
55584 # Check whether --with-libjpeg was given.
55585 if test "${with_libjpeg+set}" = set; then :
55586   withval=$with_libjpeg;
55587 fi
55588 
55589 
55590   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
55591 $as_echo_n "checking for which libjpeg to use... " >&6; }
55592   # default is bundled
55593   DEFAULT_LIBJPEG=bundled
55594   # if user didn't specify, use DEFAULT_LIBJPEG
55595   if test "x${with_libjpeg}" = "x"; then
55596     with_libjpeg=${DEFAULT_LIBJPEG}
55597   fi
55598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
55599 $as_echo "${with_libjpeg}" >&6; }
55600 
55601   if test "x${with_libjpeg}" = "xbundled"; then
55602     USE_EXTERNAL_LIBJPEG=false
55603   elif test "x${with_libjpeg}" = "xsystem"; then
55604     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
55605 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
55606 
55607 else
55608    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
55609 fi
55610 
55611 
55612     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
55613 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
55614 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
55615   $as_echo_n "(cached) " >&6
55616 else
55617   ac_check_lib_save_LIBS=$LIBS
55618 LIBS="-ljpeg  $LIBS"
55619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55620 /* end confdefs.h.  */
55621 
55622 /* Override any GCC internal prototype to avoid an error.
55623    Use char because int might match the return type of a GCC
55624    builtin and then its argument prototype would still apply.  */
55625 #ifdef __cplusplus
55626 extern "C"
55627 #endif
55628 char jpeg_CreateDecompress ();
55629 int
55630 main ()
55631 {
55632 return jpeg_CreateDecompress ();
55633   ;
55634   return 0;
55635 }
55636 _ACEOF
55637 if ac_fn_cxx_try_link "$LINENO"; then :
55638   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
55639 else
55640   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
55641 fi
55642 rm -f core conftest.err conftest.$ac_objext \
55643     conftest$ac_exeext conftest.$ac_ext
55644 LIBS=$ac_check_lib_save_LIBS
55645 fi
55646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
55647 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
55648 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
55649   cat >>confdefs.h <<_ACEOF
55650 #define HAVE_LIBJPEG 1
55651 _ACEOF
55652 
55653   LIBS="-ljpeg $LIBS"
55654 
55655 else
55656    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
55657 fi
55658 
55659 
55660     USE_EXTERNAL_LIBJPEG=true
55661   else
55662     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
55663   fi
55664 
55665 
55666 
55667 
55668 
55669 # Check whether --with-giflib was given.
55670 if test "${with_giflib+set}" = set; then :
55671   withval=$with_giflib;
55672 fi
55673 
55674 
55675   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
55676 $as_echo_n "checking for which giflib to use... " >&6; }
55677   # default is bundled
55678   DEFAULT_GIFLIB=bundled
55679   # if user didn't specify, use DEFAULT_GIFLIB
55680   if test "x${with_giflib}" = "x"; then
55681     with_giflib=${DEFAULT_GIFLIB}
55682   fi
55683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
55684 $as_echo "${with_giflib}" >&6; }
55685 
55686   if test "x${with_giflib}" = "xbundled"; then
55687     USE_EXTERNAL_LIBGIF=false
55688   elif test "x${with_giflib}" = "xsystem"; then
55689     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
55690 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
55691 
55692 else
55693    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
55694 fi
55695 
55696 
55697     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
55698 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
55699 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
55700   $as_echo_n "(cached) " >&6
55701 else
55702   ac_check_lib_save_LIBS=$LIBS
55703 LIBS="-lgif  $LIBS"
55704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55705 /* end confdefs.h.  */
55706 
55707 /* Override any GCC internal prototype to avoid an error.
55708    Use char because int might match the return type of a GCC
55709    builtin and then its argument prototype would still apply.  */
55710 #ifdef __cplusplus
55711 extern "C"
55712 #endif
55713 char DGifGetCode ();
55714 int
55715 main ()
55716 {
55717 return DGifGetCode ();
55718   ;
55719   return 0;
55720 }
55721 _ACEOF
55722 if ac_fn_cxx_try_link "$LINENO"; then :
55723   ac_cv_lib_gif_DGifGetCode=yes
55724 else
55725   ac_cv_lib_gif_DGifGetCode=no
55726 fi
55727 rm -f core conftest.err conftest.$ac_objext \
55728     conftest$ac_exeext conftest.$ac_ext
55729 LIBS=$ac_check_lib_save_LIBS
55730 fi
55731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
55732 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
55733 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
55734   cat >>confdefs.h <<_ACEOF
55735 #define HAVE_LIBGIF 1
55736 _ACEOF
55737 
55738   LIBS="-lgif $LIBS"
55739 
55740 else
55741    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
55742 fi
55743 
55744 
55745     USE_EXTERNAL_LIBGIF=true
55746   else
55747     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
55748   fi
55749 
55750 
55751 
55752 
55753 
55754 # Check whether --with-libpng was given.
55755 if test "${with_libpng+set}" = set; then :
55756   withval=$with_libpng;
55757 fi
55758 
55759 
55760   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
55761 $as_echo_n "checking for which libpng to use... " >&6; }
55762 
55763   # default is bundled
55764   DEFAULT_LIBPNG=bundled
55765   # if user didn't specify, use DEFAULT_LIBPNG
55766   if test "x${with_libpng}" = "x"; then
55767       with_libpng=${DEFAULT_LIBPNG}
55768   fi
55769 
55770   if test "x${with_libpng}" = "xbundled"; then
55771       USE_EXTERNAL_LIBPNG=false
55772       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
55773 $as_echo "bundled" >&6; }
55774   elif test "x${with_libpng}" = "xsystem"; then
55775 
55776 pkg_failed=no
55777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
55778 $as_echo_n "checking for PNG... " >&6; }
55779 
55780 if test -n "$PNG_CFLAGS"; then
55781     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
55782  elif test -n "$PKG_CONFIG"; then
55783     if test -n "$PKG_CONFIG" && \
55784     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
55785   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
55786   ac_status=$?
55787   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55788   test $ac_status = 0; }; then
55789   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
55790 else
55791   pkg_failed=yes
55792 fi
55793  else
55794     pkg_failed=untried
55795 fi
55796 if test -n "$PNG_LIBS"; then
55797     pkg_cv_PNG_LIBS="$PNG_LIBS"
55798  elif test -n "$PKG_CONFIG"; then
55799     if test -n "$PKG_CONFIG" && \
55800     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
55801   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
55802   ac_status=$?
55803   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55804   test $ac_status = 0; }; then
55805   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
55806 else
55807   pkg_failed=yes
55808 fi
55809  else
55810     pkg_failed=untried
55811 fi
55812 
55813 
55814 
55815 if test $pkg_failed = yes; then
55816 
55817 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55818         _pkg_short_errors_supported=yes
55819 else
55820         _pkg_short_errors_supported=no
55821 fi
55822         if test $_pkg_short_errors_supported = yes; then
55823                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
55824         else
55825                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
55826         fi
55827         # Put the nasty error message in config.log where it belongs
55828         echo "$PNG_PKG_ERRORS" >&5
55829 
55830         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55831 $as_echo "no" >&6; }
55832                  LIBPNG_FOUND=no
55833 elif test $pkg_failed = untried; then
55834          LIBPNG_FOUND=no
55835 else
55836         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
55837         PNG_LIBS=$pkg_cv_PNG_LIBS
55838         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55839 $as_echo "yes" >&6; }
55840          LIBPNG_FOUND=yes
55841 fi
55842       if test "x${LIBPNG_FOUND}" = "xyes"; then
55843           USE_EXTERNAL_LIBPNG=true
55844           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
55845 $as_echo "system" >&6; }
55846       else
55847           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
55848 $as_echo "system not found" >&6; }
55849           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
55850       fi
55851   else
55852       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
55853   fi
55854 
55855 
55856 
55857 
55858 
55859 # Check whether --with-zlib was given.
55860 if test "${with_zlib+set}" = set; then :
55861   withval=$with_zlib;
55862 fi
55863 
55864 
55865   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
55866 $as_echo_n "checking for compress in -lz... " >&6; }
55867 if ${ac_cv_lib_z_compress+:} false; then :
55868   $as_echo_n "(cached) " >&6
55869 else
55870   ac_check_lib_save_LIBS=$LIBS
55871 LIBS="-lz  $LIBS"
55872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55873 /* end confdefs.h.  */
55874 
55875 /* Override any GCC internal prototype to avoid an error.
55876    Use char because int might match the return type of a GCC
55877    builtin and then its argument prototype would still apply.  */
55878 #ifdef __cplusplus
55879 extern "C"
55880 #endif
55881 char compress ();
55882 int
55883 main ()
55884 {
55885 return compress ();
55886   ;
55887   return 0;
55888 }
55889 _ACEOF
55890 if ac_fn_cxx_try_link "$LINENO"; then :
55891   ac_cv_lib_z_compress=yes
55892 else
55893   ac_cv_lib_z_compress=no
55894 fi
55895 rm -f core conftest.err conftest.$ac_objext \
55896     conftest$ac_exeext conftest.$ac_ext
55897 LIBS=$ac_check_lib_save_LIBS
55898 fi
55899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
55900 $as_echo "$ac_cv_lib_z_compress" >&6; }
55901 if test "x$ac_cv_lib_z_compress" = xyes; then :
55902    ZLIB_FOUND=yes
55903 else
55904    ZLIB_FOUND=no
55905 fi
55906 
55907 
55908   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
55909 $as_echo_n "checking for which zlib to use... " >&6; }
55910 
55911   DEFAULT_ZLIB=bundled
55912   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
55913     # On macosx default is system...on others default is bundled
55914     DEFAULT_ZLIB=system
55915   fi
55916 
55917   if test "x${ZLIB_FOUND}" != "xyes"; then
55918     # If we don't find any system...set default to bundled
55919     DEFAULT_ZLIB=bundled
55920   fi
55921 
55922   # If user didn't specify, use DEFAULT_ZLIB
55923   if test "x${with_zlib}" = "x"; then
55924     with_zlib=${DEFAULT_ZLIB}
55925   fi
55926 
55927   if test "x${with_zlib}" = "xbundled"; then
55928     USE_EXTERNAL_LIBZ=false
55929     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
55930 $as_echo "bundled" >&6; }
55931   elif test "x${with_zlib}" = "xsystem"; then
55932     if test "x${ZLIB_FOUND}" = "xyes"; then
55933       USE_EXTERNAL_LIBZ=true
55934       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
55935 $as_echo "system" >&6; }
55936     else
55937       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
55938 $as_echo "system not found" >&6; }
55939       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
55940     fi
55941   else
55942     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
55943   fi
55944 
55945 
55946 
55947 
55948 
55949 # Check whether --with-lcms was given.
55950 if test "${with_lcms+set}" = set; then :
55951   withval=$with_lcms;
55952 fi
55953 
55954 
55955   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
55956 $as_echo_n "checking for which lcms to use... " >&6; }
55957 
55958   DEFAULT_LCMS=bundled
55959   # If user didn't specify, use DEFAULT_LCMS
55960   if test "x${with_lcms}" = "x"; then
55961       with_lcms=${DEFAULT_LCMS}
55962   fi
55963 
55964   if test "x${with_lcms}" = "xbundled"; then
55965     USE_EXTERNAL_LCMS=false
55966     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
55967 $as_echo "bundled" >&6; }
55968   elif test "x${with_lcms}" = "xsystem"; then
55969     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
55970 $as_echo "system" >&6; }
55971 
55972 pkg_failed=no
55973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
55974 $as_echo_n "checking for LCMS... " >&6; }
55975 
55976 if test -n "$LCMS_CFLAGS"; then
55977     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
55978  elif test -n "$PKG_CONFIG"; then
55979     if test -n "$PKG_CONFIG" && \
55980     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
55981   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
55982   ac_status=$?
55983   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55984   test $ac_status = 0; }; then
55985   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
55986 else
55987   pkg_failed=yes
55988 fi
55989  else
55990     pkg_failed=untried
55991 fi
55992 if test -n "$LCMS_LIBS"; then
55993     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
55994  elif test -n "$PKG_CONFIG"; then
55995     if test -n "$PKG_CONFIG" && \
55996     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
55997   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
55998   ac_status=$?
55999   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56000   test $ac_status = 0; }; then
56001   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
56002 else
56003   pkg_failed=yes
56004 fi
56005  else
56006     pkg_failed=untried
56007 fi
56008 
56009 
56010 
56011 if test $pkg_failed = yes; then
56012 
56013 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
56014         _pkg_short_errors_supported=yes
56015 else
56016         _pkg_short_errors_supported=no
56017 fi
56018         if test $_pkg_short_errors_supported = yes; then
56019                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
56020         else
56021                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
56022         fi
56023         # Put the nasty error message in config.log where it belongs
56024         echo "$LCMS_PKG_ERRORS" >&5
56025 
56026         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56027 $as_echo "no" >&6; }
56028                 LCMS_FOUND=no
56029 elif test $pkg_failed = untried; then
56030         LCMS_FOUND=no
56031 else
56032         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
56033         LCMS_LIBS=$pkg_cv_LCMS_LIBS
56034         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56035 $as_echo "yes" >&6; }
56036         LCMS_FOUND=yes
56037 fi
56038     if test "x${LCMS_FOUND}" = "xyes"; then
56039       USE_EXTERNAL_LCMS=true
56040     else
56041       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
56042     fi
56043   else
56044     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
56045   fi
56046 
56047 
56048 
56049 
56050 
56051 
56052 
56053 
56054 
56055 
56056 
56057   # Setup libm (the maths library)
56058   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
56059 $as_echo_n "checking for cos in -lm... " >&6; }
56060 if ${ac_cv_lib_m_cos+:} false; then :
56061   $as_echo_n "(cached) " >&6
56062 else
56063   ac_check_lib_save_LIBS=$LIBS
56064 LIBS="-lm  $LIBS"
56065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56066 /* end confdefs.h.  */
56067 
56068 /* Override any GCC internal prototype to avoid an error.
56069    Use char because int might match the return type of a GCC
56070    builtin and then its argument prototype would still apply.  */
56071 #ifdef __cplusplus
56072 extern "C"
56073 #endif
56074 char cos ();
56075 int
56076 main ()
56077 {
56078 return cos ();
56079   ;
56080   return 0;
56081 }
56082 _ACEOF
56083 if ac_fn_cxx_try_link "$LINENO"; then :
56084   ac_cv_lib_m_cos=yes
56085 else
56086   ac_cv_lib_m_cos=no
56087 fi
56088 rm -f core conftest.err conftest.$ac_objext \
56089     conftest$ac_exeext conftest.$ac_ext
56090 LIBS=$ac_check_lib_save_LIBS
56091 fi
56092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
56093 $as_echo "$ac_cv_lib_m_cos" >&6; }
56094 if test "x$ac_cv_lib_m_cos" = xyes; then :
56095   cat >>confdefs.h <<_ACEOF
56096 #define HAVE_LIBM 1
56097 _ACEOF
56098 
56099   LIBS="-lm $LIBS"
56100 
56101 else
56102 
56103       { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
56104 $as_echo "$as_me: Maths library was not found" >&6;}
56105 
56106 fi
56107 
56108   LIBM=-lm
56109 
56110 
56111   # Setup libdl (for dynamic library loading)
56112   save_LIBS="$LIBS"
56113   LIBS=""
56114   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
56115 $as_echo_n "checking for dlopen in -ldl... " >&6; }
56116 if ${ac_cv_lib_dl_dlopen+:} false; then :
56117   $as_echo_n "(cached) " >&6
56118 else
56119   ac_check_lib_save_LIBS=$LIBS
56120 LIBS="-ldl  $LIBS"
56121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56122 /* end confdefs.h.  */
56123 
56124 /* Override any GCC internal prototype to avoid an error.
56125    Use char because int might match the return type of a GCC
56126    builtin and then its argument prototype would still apply.  */
56127 #ifdef __cplusplus
56128 extern "C"
56129 #endif
56130 char dlopen ();
56131 int
56132 main ()
56133 {
56134 return dlopen ();
56135   ;
56136   return 0;
56137 }
56138 _ACEOF
56139 if ac_fn_cxx_try_link "$LINENO"; then :
56140   ac_cv_lib_dl_dlopen=yes
56141 else
56142   ac_cv_lib_dl_dlopen=no
56143 fi
56144 rm -f core conftest.err conftest.$ac_objext \
56145     conftest$ac_exeext conftest.$ac_ext
56146 LIBS=$ac_check_lib_save_LIBS
56147 fi
56148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
56149 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
56150 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
56151   cat >>confdefs.h <<_ACEOF
56152 #define HAVE_LIBDL 1
56153 _ACEOF
56154 
56155   LIBS="-ldl $LIBS"
56156 
56157 fi
56158 
56159   LIBDL="$LIBS"
56160 
56161   LIBS="$save_LIBS"
56162 
56163   # Deprecated libraries, keep the flags for backwards compatibility
56164   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
56165 
56166 
56167 # Check whether --with-dxsdk was given.
56168 if test "${with_dxsdk+set}" = set; then :
56169   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
56170 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
56171 fi
56172 
56173 
56174 
56175 
56176 # Check whether --with-dxsdk-lib was given.
56177 if test "${with_dxsdk_lib+set}" = set; then :
56178   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
56179 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
56180 fi
56181 
56182 
56183 
56184 
56185 # Check whether --with-dxsdk-include was given.
56186 if test "${with_dxsdk_include+set}" = set; then :
56187   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
56188 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
56189 fi
56190 
56191 
56192   fi
56193 
56194   # Control if libzip can use mmap. Available for purposes of overriding.
56195   LIBZIP_CAN_USE_MMAP=true
56196 
56197 
56198 
56199 
56200 
56201 
56202 
56203 
56204 
56205 
56206 
56207 
56208 
56209 
56210 ###############################################################################
56211 #
56212 # We need to do some final tweaking, when everything else is done.
56213 #
56214 ###############################################################################
56215 
56216 
56217   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
56218 
56219 
56220   # The name of the Service Agent jar.
56221   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
56222   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
56223     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
56224   fi
56225 
56226 
56227 
56228     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
56229 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
56230 
56231     if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
56232       ENABLE_INTREE_EC=yes
56233       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56234 $as_echo "yes" >&6; }
56235     else
56236       ENABLE_INTREE_EC=no
56237       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56238 $as_echo "no" >&6; }
56239     fi
56240 
56241 
56242 
56243 
56244 ###############################################################################
56245 #
56246 # Configure parts of the build that only affect the build performance,
56247 # not the result.
56248 #
56249 ###############################################################################
56250 
56251 
56252   # How many cores do we have on this build system?
56253 
56254 # Check whether --with-num-cores was given.
56255 if test "${with_num_cores+set}" = set; then :
56256   withval=$with_num_cores;
56257 fi
56258 
56259   if test "x$with_num_cores" = x; then
56260     # The number of cores were not specified, try to probe them.
56261 
56262   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
56263 $as_echo_n "checking for number of cores... " >&6; }
56264   NUM_CORES=1
56265   FOUND_CORES=no
56266 
56267   if test -f /proc/cpuinfo; then
56268     # Looks like a Linux (or cygwin) system
56269     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
56270     FOUND_CORES=yes
56271   elif test -x /usr/sbin/psrinfo; then
56272     # Looks like a Solaris system
56273     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
56274     FOUND_CORES=yes
56275   elif test -x /usr/sbin/system_profiler; then
56276     # Looks like a MacOSX system
56277     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
56278     FOUND_CORES=yes
56279   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
56280     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
56281     FOUND_CORES=yes
56282   elif test -n "$NUMBER_OF_PROCESSORS"; then
56283     # On windows, look in the env
56284     NUM_CORES=$NUMBER_OF_PROCESSORS
56285     FOUND_CORES=yes
56286   fi
56287 
56288   if test "x$FOUND_CORES" = xyes; then
56289     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
56290 $as_echo "$NUM_CORES" >&6; }
56291   else
56292     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
56293 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
56294     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
56295 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
56296   fi
56297 
56298   else
56299     NUM_CORES=$with_num_cores
56300   fi
56301 
56302 
56303 
56304   # How much memory do we have on this build system?
56305 
56306 # Check whether --with-memory-size was given.
56307 if test "${with_memory_size+set}" = set; then :
56308   withval=$with_memory_size;
56309 fi
56310 
56311   if test "x$with_memory_size" = x; then
56312     # The memory size was not specified, try to probe it.
56313 
56314   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
56315 $as_echo_n "checking for memory size... " >&6; }
56316   # Default to 1024 MB
56317   MEMORY_SIZE=1024
56318   FOUND_MEM=no
56319 
56320   if test -f /proc/meminfo; then
56321     # Looks like a Linux (or cygwin) system
56322     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
56323     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
56324     FOUND_MEM=yes
56325   elif test -x /usr/sbin/prtconf; then
56326     # Looks like a Solaris or AIX system
56327     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
56328     FOUND_MEM=yes
56329   elif test -x /usr/sbin/system_profiler; then
56330     # Looks like a MacOSX system
56331     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
56332     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
56333     FOUND_MEM=yes
56334   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
56335     # Windows, but without cygwin
56336     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
56337     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
56338     FOUND_MEM=yes
56339   fi
56340 
56341   if test "x$FOUND_MEM" = xyes; then
56342     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
56343 $as_echo "$MEMORY_SIZE MB" >&6; }
56344   else
56345     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
56346 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
56347     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
56348 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
56349   fi
56350 
56351   else
56352     MEMORY_SIZE=$with_memory_size
56353   fi
56354 
56355 
56356 
56357   # Provide a decent default number of parallel jobs for make depending on
56358   # number of cores, amount of memory and machine architecture.
56359 
56360 # Check whether --with-jobs was given.
56361 if test "${with_jobs+set}" = set; then :
56362   withval=$with_jobs;
56363 fi
56364 
56365   if test "x$with_jobs" = x; then
56366     # Number of jobs was not specified, calculate.
56367     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
56368 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
56369     # Approximate memory in GB.
56370     memory_gb=`expr $MEMORY_SIZE / 1024`
56371     # Pick the lowest of memory in gb and number of cores.
56372     if test "$memory_gb" -lt "$NUM_CORES"; then
56373       JOBS="$memory_gb"
56374     else
56375       JOBS="$NUM_CORES"
56376       # On bigger machines, leave some room for other processes to run
56377       if test "$JOBS" -gt "4"; then
56378         JOBS=`expr $JOBS '*' 90 / 100`
56379       fi
56380     fi
56381     # Cap number of jobs to 16
56382     if test "$JOBS" -gt "16"; then
56383       JOBS=16
56384     fi
56385     if test "$JOBS" -eq "0"; then
56386       JOBS=1
56387     fi
56388     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
56389 $as_echo "$JOBS" >&6; }
56390   else
56391     JOBS=$with_jobs
56392   fi
56393 
56394 
56395 
56396 # Setup arguments for the boot jdk (after cores and memory have been setup)
56397 
56398   ##############################################################################
56399   #
56400   # Specify jvm options for anything that is run with the Boot JDK.
56401   # Not all JVM:s accept the same arguments on the command line.
56402   #
56403 
56404 # Check whether --with-boot-jdk-jvmargs was given.
56405 if test "${with_boot_jdk_jvmargs+set}" = set; then :
56406   withval=$with_boot_jdk_jvmargs;
56407 fi
56408 
56409 
56410   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
56411 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
56412 
56413   # Disable special log output when a debug build is used as Boot JDK...
56414 
56415   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
56416   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
56417   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
56418   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56419   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56420   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56421     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
56422     JVM_ARG_OK=true
56423   else
56424     $ECHO "Arg failed:" >&5
56425     $ECHO "$OUTPUT" >&5
56426     JVM_ARG_OK=false
56427   fi
56428 
56429 
56430   # Apply user provided options.
56431 
56432   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
56433   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
56434   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
56435   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56436   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56437   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56438     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
56439     JVM_ARG_OK=true
56440   else
56441     $ECHO "Arg failed:" >&5
56442     $ECHO "$OUTPUT" >&5
56443     JVM_ARG_OK=false
56444   fi
56445 
56446 
56447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
56448 $as_echo "$boot_jdk_jvmargs" >&6; }
56449 
56450   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
56451   JAVA_FLAGS=$boot_jdk_jvmargs
56452 
56453 
56454 
56455   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
56456 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
56457 
56458   # Starting amount of heap memory.
56459 
56460   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
56461   $ECHO "Command: $JAVA -Xms64M -version" >&5
56462   OUTPUT=`$JAVA -Xms64M -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_big="$boot_jdk_jvmargs_big -Xms64M"
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   # Maximum amount of heap memory.
56476   # Maximum stack size.
56477   JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
56478   if test "x$BOOT_JDK_BITS" = "x32"; then
56479     if test "$JVM_MAX_HEAP" -gt "1100"; then
56480       JVM_MAX_HEAP=1100
56481     elif test "$JVM_MAX_HEAP" -lt "512"; then
56482       JVM_MAX_HEAP=512
56483     fi
56484     STACK_SIZE=768
56485   else
56486     # Running a 64 bit JVM allows for and requires a bigger heap
56487     if test "$JVM_MAX_HEAP" -gt "1600"; then
56488       JVM_MAX_HEAP=1600
56489     elif test "$JVM_MAX_HEAP" -lt "512"; then
56490       JVM_MAX_HEAP=512
56491     fi
56492     STACK_SIZE=1536
56493   fi
56494 
56495   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
56496   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
56497   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
56498   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56499   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56500   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56501     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
56502     JVM_ARG_OK=true
56503   else
56504     $ECHO "Arg failed:" >&5
56505     $ECHO "$OUTPUT" >&5
56506     JVM_ARG_OK=false
56507   fi
56508 
56509 
56510   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
56511   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
56512   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
56513   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56514   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56515   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56516     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
56517     JVM_ARG_OK=true
56518   else
56519     $ECHO "Arg failed:" >&5
56520     $ECHO "$OUTPUT" >&5
56521     JVM_ARG_OK=false
56522   fi
56523 
56524 
56525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
56526 $as_echo "$boot_jdk_jvmargs_big" >&6; }
56527 
56528   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
56529 
56530 
56531   # By default, the main javac compilations use big
56532   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
56533 
56534 
56535   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
56536 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
56537 
56538   # Use serial gc for small short lived tools if possible
56539 
56540   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
56541   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
56542   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
56543   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56544   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56545   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56546     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
56547     JVM_ARG_OK=true
56548   else
56549     $ECHO "Arg failed:" >&5
56550     $ECHO "$OUTPUT" >&5
56551     JVM_ARG_OK=false
56552   fi
56553 
56554 
56555   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
56556   $ECHO "Command: $JAVA -Xms32M -version" >&5
56557   OUTPUT=`$JAVA -Xms32M -version 2>&1`
56558   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56559   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56560   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56561     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
56562     JVM_ARG_OK=true
56563   else
56564     $ECHO "Arg failed:" >&5
56565     $ECHO "$OUTPUT" >&5
56566     JVM_ARG_OK=false
56567   fi
56568 
56569 
56570   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
56571   $ECHO "Command: $JAVA -Xmx512M -version" >&5
56572   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
56573   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56574   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56575   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56576     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
56577     JVM_ARG_OK=true
56578   else
56579     $ECHO "Arg failed:" >&5
56580     $ECHO "$OUTPUT" >&5
56581     JVM_ARG_OK=false
56582   fi
56583 
56584 
56585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
56586 $as_echo "$boot_jdk_jvmargs_small" >&6; }
56587 
56588   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
56589 
56590 
56591   JAVA_TOOL_FLAGS_SMALL=""
56592   for f in $JAVA_FLAGS_SMALL; do
56593     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
56594   done
56595 
56596 
56597 
56598 # Setup smart javac (after cores and memory have been setup)
56599 
56600 
56601 # Check whether --with-sjavac-server-java was given.
56602 if test "${with_sjavac_server_java+set}" = set; then :
56603   withval=$with_sjavac_server_java;
56604 fi
56605 
56606 
56607   if test "x$with_sjavac_server_java" != x; then
56608     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
56609     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
56610     if test "x$FOUND_VERSION" = x; then
56611       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
56612     fi
56613   else
56614     SJAVAC_SERVER_JAVA="$JAVA"
56615   fi
56616 
56617 
56618   if test "$MEMORY_SIZE" -gt "3000"; then
56619 
56620   $ECHO "Check if jvm arg is ok: -d64" >&5
56621   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
56622   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
56623   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56624   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56625   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56626     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
56627     JVM_ARG_OK=true
56628   else
56629     $ECHO "Arg failed:" >&5
56630     $ECHO "$OUTPUT" >&5
56631     JVM_ARG_OK=false
56632   fi
56633 
56634     if test "$JVM_ARG_OK" = true; then
56635       JVM_64BIT=true
56636       JVM_ARG_OK=false
56637     fi
56638   fi
56639 
56640   MX_VALUE=`expr $MEMORY_SIZE / 2`
56641   if test "$JVM_64BIT" = true; then
56642     # Set ms lower than mx since more than one instance of the server might
56643     # get launched at the same time before they figure out which instance won.
56644     MS_VALUE=512
56645     if test "$MX_VALUE" -gt "2048"; then
56646       MX_VALUE=2048
56647     fi
56648   else
56649     MS_VALUE=256
56650     if test "$MX_VALUE" -gt "1500"; then
56651       MX_VALUE=1500
56652     fi
56653   fi
56654   if test "$MX_VALUE" -lt "512"; then
56655     MX_VALUE=512
56656   fi
56657 
56658   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
56659   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
56660   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
56661   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56662   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56663   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56664     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
56665     JVM_ARG_OK=true
56666   else
56667     $ECHO "Arg failed:" >&5
56668     $ECHO "$OUTPUT" >&5
56669     JVM_ARG_OK=false
56670   fi
56671 
56672 
56673 
56674   # Check whether --enable-sjavac was given.
56675 if test "${enable_sjavac+set}" = set; then :
56676   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
56677 else
56678   ENABLE_SJAVAC="no"
56679 fi
56680 
56681   if test "x$JVM_ARG_OK" = "xfalse"; then
56682     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
56683 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
56684     ENABLE_SJAVAC="no"
56685   fi
56686   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
56687 $as_echo_n "checking whether to use sjavac... " >&6; }
56688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
56689 $as_echo "$ENABLE_SJAVAC" >&6; }
56690 
56691 
56692   # Check whether --enable-javac-server was given.
56693 if test "${enable_javac_server+set}" = set; then :
56694   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
56695 else
56696   ENABLE_JAVAC_SERVER="yes"
56697 fi
56698 
56699   if test "x$JVM_ARG_OK" = "xfalse"; then
56700     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
56701 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
56702     ENABLE_JAVAC_SERVER="no"
56703   fi
56704   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
56705 $as_echo_n "checking whether to use javac server... " >&6; }
56706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
56707 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
56708 
56709 
56710   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
56711     # When using a server javac, the small client instances do not need much
56712     # resources.
56713     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
56714   fi
56715 
56716 
56717 # Setup use of icecc if requested
56718 
56719   # Check whether --enable-icecc was given.
56720 if test "${enable_icecc+set}" = set; then :
56721   enableval=$enable_icecc;
56722 fi
56723 
56724 
56725   if test "x${enable_icecc}" = "xyes"; then
56726 
56727 
56728 
56729   # Publish this variable in the help.
56730 
56731 
56732   if [ -z "${ICECC_CMD+x}" ]; then
56733     # The variable is not set by user, try to locate tool using the code snippet
56734     for ac_prog in icecc
56735 do
56736   # Extract the first word of "$ac_prog", so it can be a program name with args.
56737 set dummy $ac_prog; ac_word=$2
56738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56739 $as_echo_n "checking for $ac_word... " >&6; }
56740 if ${ac_cv_path_ICECC_CMD+:} false; then :
56741   $as_echo_n "(cached) " >&6
56742 else
56743   case $ICECC_CMD in
56744   [\\/]* | ?:[\\/]*)
56745   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
56746   ;;
56747   *)
56748   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56749 for as_dir in $PATH
56750 do
56751   IFS=$as_save_IFS
56752   test -z "$as_dir" && as_dir=.
56753     for ac_exec_ext in '' $ac_executable_extensions; do
56754   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56755     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
56756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56757     break 2
56758   fi
56759 done
56760   done
56761 IFS=$as_save_IFS
56762 
56763   ;;
56764 esac
56765 fi
56766 ICECC_CMD=$ac_cv_path_ICECC_CMD
56767 if test -n "$ICECC_CMD"; then
56768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
56769 $as_echo "$ICECC_CMD" >&6; }
56770 else
56771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56772 $as_echo "no" >&6; }
56773 fi
56774 
56775 
56776   test -n "$ICECC_CMD" && break
56777 done
56778 
56779   else
56780     # The variable is set, but is it from the command line or the environment?
56781 
56782     # Try to remove the string !ICECC_CMD! from our list.
56783     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
56784     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
56785       # If it failed, the variable was not from the command line. Ignore it,
56786       # but warn the user (except for BASH, which is always set by the calling BASH).
56787       if test "xICECC_CMD" != xBASH; then
56788         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
56789 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
56790       fi
56791       # Try to locate tool using the code snippet
56792       for ac_prog in icecc
56793 do
56794   # Extract the first word of "$ac_prog", so it can be a program name with args.
56795 set dummy $ac_prog; ac_word=$2
56796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56797 $as_echo_n "checking for $ac_word... " >&6; }
56798 if ${ac_cv_path_ICECC_CMD+:} false; then :
56799   $as_echo_n "(cached) " >&6
56800 else
56801   case $ICECC_CMD in
56802   [\\/]* | ?:[\\/]*)
56803   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
56804   ;;
56805   *)
56806   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56807 for as_dir in $PATH
56808 do
56809   IFS=$as_save_IFS
56810   test -z "$as_dir" && as_dir=.
56811     for ac_exec_ext in '' $ac_executable_extensions; do
56812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56813     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
56814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56815     break 2
56816   fi
56817 done
56818   done
56819 IFS=$as_save_IFS
56820 
56821   ;;
56822 esac
56823 fi
56824 ICECC_CMD=$ac_cv_path_ICECC_CMD
56825 if test -n "$ICECC_CMD"; then
56826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
56827 $as_echo "$ICECC_CMD" >&6; }
56828 else
56829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56830 $as_echo "no" >&6; }
56831 fi
56832 
56833 
56834   test -n "$ICECC_CMD" && break
56835 done
56836 
56837     else
56838       # If it succeeded, then it was overridden by the user. We will use it
56839       # for the tool.
56840 
56841       # First remove it from the list of overridden variables, so we can test
56842       # for unknown variables in the end.
56843       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
56844 
56845       # Check if we try to supply an empty value
56846       if test "x$ICECC_CMD" = x; then
56847         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
56848 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
56849         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
56850 $as_echo_n "checking for ICECC_CMD... " >&6; }
56851         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
56852 $as_echo "disabled" >&6; }
56853       else
56854         # Check if the provided tool contains a complete path.
56855         tool_specified="$ICECC_CMD"
56856         tool_basename="${tool_specified##*/}"
56857         if test "x$tool_basename" = "x$tool_specified"; then
56858           # A command without a complete path is provided, search $PATH.
56859           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
56860 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
56861           # Extract the first word of "$tool_basename", so it can be a program name with args.
56862 set dummy $tool_basename; ac_word=$2
56863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56864 $as_echo_n "checking for $ac_word... " >&6; }
56865 if ${ac_cv_path_ICECC_CMD+:} false; then :
56866   $as_echo_n "(cached) " >&6
56867 else
56868   case $ICECC_CMD in
56869   [\\/]* | ?:[\\/]*)
56870   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
56871   ;;
56872   *)
56873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56874 for as_dir in $PATH
56875 do
56876   IFS=$as_save_IFS
56877   test -z "$as_dir" && as_dir=.
56878     for ac_exec_ext in '' $ac_executable_extensions; do
56879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56880     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
56881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56882     break 2
56883   fi
56884 done
56885   done
56886 IFS=$as_save_IFS
56887 
56888   ;;
56889 esac
56890 fi
56891 ICECC_CMD=$ac_cv_path_ICECC_CMD
56892 if test -n "$ICECC_CMD"; then
56893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
56894 $as_echo "$ICECC_CMD" >&6; }
56895 else
56896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56897 $as_echo "no" >&6; }
56898 fi
56899 
56900 
56901           if test "x$ICECC_CMD" = x; then
56902             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
56903           fi
56904         else
56905           # Otherwise we believe it is a complete path. Use it as it is.
56906           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
56907 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
56908           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
56909 $as_echo_n "checking for ICECC_CMD... " >&6; }
56910           if test ! -x "$tool_specified"; then
56911             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
56912 $as_echo "not found" >&6; }
56913             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
56914           fi
56915           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
56916 $as_echo "$tool_specified" >&6; }
56917         fi
56918       fi
56919     fi
56920 
56921   fi
56922 
56923 
56924 
56925   if test "x$ICECC_CMD" = x; then
56926     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
56927   fi
56928 
56929 
56930     old_path="$PATH"
56931 
56932     # Look for icecc-create-env in some known places
56933     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
56934 
56935 
56936 
56937   # Publish this variable in the help.
56938 
56939 
56940   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
56941     # The variable is not set by user, try to locate tool using the code snippet
56942     for ac_prog in icecc-create-env
56943 do
56944   # Extract the first word of "$ac_prog", so it can be a program name with args.
56945 set dummy $ac_prog; ac_word=$2
56946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56947 $as_echo_n "checking for $ac_word... " >&6; }
56948 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
56949   $as_echo_n "(cached) " >&6
56950 else
56951   case $ICECC_CREATE_ENV in
56952   [\\/]* | ?:[\\/]*)
56953   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
56954   ;;
56955   *)
56956   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56957 for as_dir in $PATH
56958 do
56959   IFS=$as_save_IFS
56960   test -z "$as_dir" && as_dir=.
56961     for ac_exec_ext in '' $ac_executable_extensions; do
56962   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56963     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
56964     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56965     break 2
56966   fi
56967 done
56968   done
56969 IFS=$as_save_IFS
56970 
56971   ;;
56972 esac
56973 fi
56974 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
56975 if test -n "$ICECC_CREATE_ENV"; then
56976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
56977 $as_echo "$ICECC_CREATE_ENV" >&6; }
56978 else
56979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56980 $as_echo "no" >&6; }
56981 fi
56982 
56983 
56984   test -n "$ICECC_CREATE_ENV" && break
56985 done
56986 
56987   else
56988     # The variable is set, but is it from the command line or the environment?
56989 
56990     # Try to remove the string !ICECC_CREATE_ENV! from our list.
56991     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
56992     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
56993       # If it failed, the variable was not from the command line. Ignore it,
56994       # but warn the user (except for BASH, which is always set by the calling BASH).
56995       if test "xICECC_CREATE_ENV" != xBASH; then
56996         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
56997 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
56998       fi
56999       # Try to locate tool using the code snippet
57000       for ac_prog in icecc-create-env
57001 do
57002   # Extract the first word of "$ac_prog", so it can be a program name with args.
57003 set dummy $ac_prog; ac_word=$2
57004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57005 $as_echo_n "checking for $ac_word... " >&6; }
57006 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57007   $as_echo_n "(cached) " >&6
57008 else
57009   case $ICECC_CREATE_ENV in
57010   [\\/]* | ?:[\\/]*)
57011   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57012   ;;
57013   *)
57014   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57015 for as_dir in $PATH
57016 do
57017   IFS=$as_save_IFS
57018   test -z "$as_dir" && as_dir=.
57019     for ac_exec_ext in '' $ac_executable_extensions; do
57020   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57021     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57022     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57023     break 2
57024   fi
57025 done
57026   done
57027 IFS=$as_save_IFS
57028 
57029   ;;
57030 esac
57031 fi
57032 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57033 if test -n "$ICECC_CREATE_ENV"; then
57034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57035 $as_echo "$ICECC_CREATE_ENV" >&6; }
57036 else
57037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57038 $as_echo "no" >&6; }
57039 fi
57040 
57041 
57042   test -n "$ICECC_CREATE_ENV" && break
57043 done
57044 
57045     else
57046       # If it succeeded, then it was overridden by the user. We will use it
57047       # for the tool.
57048 
57049       # First remove it from the list of overridden variables, so we can test
57050       # for unknown variables in the end.
57051       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57052 
57053       # Check if we try to supply an empty value
57054       if test "x$ICECC_CREATE_ENV" = x; then
57055         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
57056 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
57057         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
57058 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
57059         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57060 $as_echo "disabled" >&6; }
57061       else
57062         # Check if the provided tool contains a complete path.
57063         tool_specified="$ICECC_CREATE_ENV"
57064         tool_basename="${tool_specified##*/}"
57065         if test "x$tool_basename" = "x$tool_specified"; then
57066           # A command without a complete path is provided, search $PATH.
57067           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
57068 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
57069           # Extract the first word of "$tool_basename", so it can be a program name with args.
57070 set dummy $tool_basename; ac_word=$2
57071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57072 $as_echo_n "checking for $ac_word... " >&6; }
57073 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57074   $as_echo_n "(cached) " >&6
57075 else
57076   case $ICECC_CREATE_ENV in
57077   [\\/]* | ?:[\\/]*)
57078   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57079   ;;
57080   *)
57081   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57082 for as_dir in $PATH
57083 do
57084   IFS=$as_save_IFS
57085   test -z "$as_dir" && as_dir=.
57086     for ac_exec_ext in '' $ac_executable_extensions; do
57087   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57088     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57089     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57090     break 2
57091   fi
57092 done
57093   done
57094 IFS=$as_save_IFS
57095 
57096   ;;
57097 esac
57098 fi
57099 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57100 if test -n "$ICECC_CREATE_ENV"; then
57101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57102 $as_echo "$ICECC_CREATE_ENV" >&6; }
57103 else
57104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57105 $as_echo "no" >&6; }
57106 fi
57107 
57108 
57109           if test "x$ICECC_CREATE_ENV" = x; then
57110             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57111           fi
57112         else
57113           # Otherwise we believe it is a complete path. Use it as it is.
57114           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
57115 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
57116           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
57117 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
57118           if test ! -x "$tool_specified"; then
57119             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57120 $as_echo "not found" >&6; }
57121             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
57122           fi
57123           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57124 $as_echo "$tool_specified" >&6; }
57125         fi
57126       fi
57127     fi
57128 
57129   fi
57130 
57131 
57132 
57133   if test "x$ICECC_CREATE_ENV" = x; then
57134     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
57135   fi
57136 
57137 
57138     # Use icecc-create-env to create a minimal compilation environment that can
57139     # be sent to the other hosts in the icecream cluster.
57140     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
57141     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
57142     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
57143 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
57144     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
57145       cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57146           && ${ICECC_CREATE_ENV} --gcc ${CC} ${CXX} > ${icecc_create_env_log}
57147     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
57148       # For clang, the icecc compilerwrapper is needed. It usually resides next
57149       # to icecc-create-env.
57150 
57151 
57152 
57153   # Publish this variable in the help.
57154 
57155 
57156   if [ -z "${ICECC_WRAPPER+x}" ]; then
57157     # The variable is not set by user, try to locate tool using the code snippet
57158     for ac_prog in compilerwrapper
57159 do
57160   # Extract the first word of "$ac_prog", so it can be a program name with args.
57161 set dummy $ac_prog; ac_word=$2
57162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57163 $as_echo_n "checking for $ac_word... " >&6; }
57164 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57165   $as_echo_n "(cached) " >&6
57166 else
57167   case $ICECC_WRAPPER in
57168   [\\/]* | ?:[\\/]*)
57169   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57170   ;;
57171   *)
57172   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57173 for as_dir in $PATH
57174 do
57175   IFS=$as_save_IFS
57176   test -z "$as_dir" && as_dir=.
57177     for ac_exec_ext in '' $ac_executable_extensions; do
57178   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57179     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57180     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57181     break 2
57182   fi
57183 done
57184   done
57185 IFS=$as_save_IFS
57186 
57187   ;;
57188 esac
57189 fi
57190 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57191 if test -n "$ICECC_WRAPPER"; then
57192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57193 $as_echo "$ICECC_WRAPPER" >&6; }
57194 else
57195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57196 $as_echo "no" >&6; }
57197 fi
57198 
57199 
57200   test -n "$ICECC_WRAPPER" && break
57201 done
57202 
57203   else
57204     # The variable is set, but is it from the command line or the environment?
57205 
57206     # Try to remove the string !ICECC_WRAPPER! from our list.
57207     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
57208     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57209       # If it failed, the variable was not from the command line. Ignore it,
57210       # but warn the user (except for BASH, which is always set by the calling BASH).
57211       if test "xICECC_WRAPPER" != xBASH; then
57212         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
57213 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
57214       fi
57215       # Try to locate tool using the code snippet
57216       for ac_prog in compilerwrapper
57217 do
57218   # Extract the first word of "$ac_prog", so it can be a program name with args.
57219 set dummy $ac_prog; ac_word=$2
57220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57221 $as_echo_n "checking for $ac_word... " >&6; }
57222 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57223   $as_echo_n "(cached) " >&6
57224 else
57225   case $ICECC_WRAPPER in
57226   [\\/]* | ?:[\\/]*)
57227   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57228   ;;
57229   *)
57230   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57231 for as_dir in $PATH
57232 do
57233   IFS=$as_save_IFS
57234   test -z "$as_dir" && as_dir=.
57235     for ac_exec_ext in '' $ac_executable_extensions; do
57236   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57237     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57238     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57239     break 2
57240   fi
57241 done
57242   done
57243 IFS=$as_save_IFS
57244 
57245   ;;
57246 esac
57247 fi
57248 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57249 if test -n "$ICECC_WRAPPER"; then
57250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57251 $as_echo "$ICECC_WRAPPER" >&6; }
57252 else
57253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57254 $as_echo "no" >&6; }
57255 fi
57256 
57257 
57258   test -n "$ICECC_WRAPPER" && break
57259 done
57260 
57261     else
57262       # If it succeeded, then it was overridden by the user. We will use it
57263       # for the tool.
57264 
57265       # First remove it from the list of overridden variables, so we can test
57266       # for unknown variables in the end.
57267       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57268 
57269       # Check if we try to supply an empty value
57270       if test "x$ICECC_WRAPPER" = x; then
57271         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
57272 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
57273         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
57274 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
57275         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57276 $as_echo "disabled" >&6; }
57277       else
57278         # Check if the provided tool contains a complete path.
57279         tool_specified="$ICECC_WRAPPER"
57280         tool_basename="${tool_specified##*/}"
57281         if test "x$tool_basename" = "x$tool_specified"; then
57282           # A command without a complete path is provided, search $PATH.
57283           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
57284 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
57285           # Extract the first word of "$tool_basename", so it can be a program name with args.
57286 set dummy $tool_basename; ac_word=$2
57287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57288 $as_echo_n "checking for $ac_word... " >&6; }
57289 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57290   $as_echo_n "(cached) " >&6
57291 else
57292   case $ICECC_WRAPPER in
57293   [\\/]* | ?:[\\/]*)
57294   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57295   ;;
57296   *)
57297   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57298 for as_dir in $PATH
57299 do
57300   IFS=$as_save_IFS
57301   test -z "$as_dir" && as_dir=.
57302     for ac_exec_ext in '' $ac_executable_extensions; do
57303   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57304     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57305     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57306     break 2
57307   fi
57308 done
57309   done
57310 IFS=$as_save_IFS
57311 
57312   ;;
57313 esac
57314 fi
57315 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57316 if test -n "$ICECC_WRAPPER"; then
57317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57318 $as_echo "$ICECC_WRAPPER" >&6; }
57319 else
57320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57321 $as_echo "no" >&6; }
57322 fi
57323 
57324 
57325           if test "x$ICECC_WRAPPER" = x; then
57326             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57327           fi
57328         else
57329           # Otherwise we believe it is a complete path. Use it as it is.
57330           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
57331 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
57332           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
57333 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
57334           if test ! -x "$tool_specified"; then
57335             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57336 $as_echo "not found" >&6; }
57337             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
57338           fi
57339           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57340 $as_echo "$tool_specified" >&6; }
57341         fi
57342       fi
57343     fi
57344 
57345   fi
57346 
57347 
57348 
57349   if test "x$ICECC_WRAPPER" = x; then
57350     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
57351   fi
57352 
57353 
57354       cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57355           && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
57356     else
57357       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
57358     fi
57359     PATH="$old_path"
57360     # The bundle with the compiler gets a name based on checksums. Parse log file
57361     # to find it.
57362     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
57363     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
57364     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
57365 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
57366     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
57367 
57368     if test "x${COMPILE_TYPE}" = "xcross"; then
57369       # If cross compiling, create a separate env package for the build compiler
57370       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
57371 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
57372       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
57373       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
57374         cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57375             && ${ICECC_CREATE_ENV} --gcc ${BUILD_CC} ${BUILD_CXX} > ${icecc_create_env_log}
57376       elif test "x${BUILD_CC##*/}" = "xclang"; then
57377         cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57378             && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
57379       else
57380         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
57381       fi
57382       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
57383       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
57384       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
57385 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
57386       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
57387           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
57388     else
57389       BUILD_ICECC="${ICECC}"
57390     fi
57391 
57392 
57393   fi
57394 
57395 
57396 # Can the C/C++ compiler use precompiled headers?
57397 
57398 
57399   ###############################################################################
57400   #
57401   # Can the C/C++ compiler use precompiled headers?
57402   #
57403   # Check whether --enable-precompiled-headers was given.
57404 if test "${enable_precompiled_headers+set}" = set; then :
57405   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
57406 else
57407   ENABLE_PRECOMPH=yes
57408 fi
57409 
57410 
57411   USE_PRECOMPILED_HEADER=1
57412   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
57413 $as_echo_n "checking If precompiled header is enabled... " >&6; }
57414   if test "x$ENABLE_PRECOMPH" = xno; then
57415     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
57416 $as_echo "no, forced" >&6; }
57417     USE_PRECOMPILED_HEADER=0
57418   elif test "x$ICECC" != "x"; then
57419     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
57420 $as_echo "no, does not work effectively with icecc" >&6; }
57421     USE_PRECOMPILED_HEADER=0
57422   else
57423     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57424 $as_echo "yes" >&6; }
57425   fi
57426 
57427   if test "x$ENABLE_PRECOMPH" = xyes; then
57428     # Check that the compiler actually supports precomp headers.
57429     if test "x$TOOLCHAIN_TYPE" = xgcc; then
57430       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
57431 $as_echo_n "checking that precompiled headers work... " >&6; }
57432       echo "int alfa();" > conftest.h
57433       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
57434       if test ! -f conftest.hpp.gch; then
57435         USE_PRECOMPILED_HEADER=0
57436         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57437 $as_echo "no" >&6; }
57438       else
57439         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57440 $as_echo "yes" >&6; }
57441       fi
57442       rm -f conftest.h conftest.hpp.gch
57443     fi
57444   fi
57445 
57446 
57447 
57448 
57449 # Setup use of ccache, if available
57450 
57451   # Check whether --enable-ccache was given.
57452 if test "${enable_ccache+set}" = set; then :
57453   enableval=$enable_ccache;
57454 fi
57455 
57456 
57457   CCACHE=
57458   CCACHE_STATUS=
57459   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
57460 $as_echo_n "checking is ccache enabled... " >&6; }
57461   if test "x$enable_ccache" = xyes; then
57462     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
57463       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57464 $as_echo "yes" >&6; }
57465       OLD_PATH="$PATH"
57466       if test "x$TOOLCHAIN_PATH" != x; then
57467         PATH=$TOOLCHAIN_PATH:$PATH
57468       fi
57469 
57470 
57471 
57472   # Publish this variable in the help.
57473 
57474 
57475   if [ -z "${CCACHE+x}" ]; then
57476     # The variable is not set by user, try to locate tool using the code snippet
57477     for ac_prog in ccache
57478 do
57479   # Extract the first word of "$ac_prog", so it can be a program name with args.
57480 set dummy $ac_prog; ac_word=$2
57481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57482 $as_echo_n "checking for $ac_word... " >&6; }
57483 if ${ac_cv_path_CCACHE+:} false; then :
57484   $as_echo_n "(cached) " >&6
57485 else
57486   case $CCACHE in
57487   [\\/]* | ?:[\\/]*)
57488   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
57489   ;;
57490   *)
57491   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57492 for as_dir in $PATH
57493 do
57494   IFS=$as_save_IFS
57495   test -z "$as_dir" && as_dir=.
57496     for ac_exec_ext in '' $ac_executable_extensions; do
57497   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57498     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
57499     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57500     break 2
57501   fi
57502 done
57503   done
57504 IFS=$as_save_IFS
57505 
57506   ;;
57507 esac
57508 fi
57509 CCACHE=$ac_cv_path_CCACHE
57510 if test -n "$CCACHE"; then
57511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
57512 $as_echo "$CCACHE" >&6; }
57513 else
57514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57515 $as_echo "no" >&6; }
57516 fi
57517 
57518 
57519   test -n "$CCACHE" && break
57520 done
57521 
57522   else
57523     # The variable is set, but is it from the command line or the environment?
57524 
57525     # Try to remove the string !CCACHE! from our list.
57526     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
57527     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57528       # If it failed, the variable was not from the command line. Ignore it,
57529       # but warn the user (except for BASH, which is always set by the calling BASH).
57530       if test "xCCACHE" != xBASH; then
57531         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
57532 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
57533       fi
57534       # Try to locate tool using the code snippet
57535       for ac_prog in ccache
57536 do
57537   # Extract the first word of "$ac_prog", so it can be a program name with args.
57538 set dummy $ac_prog; ac_word=$2
57539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57540 $as_echo_n "checking for $ac_word... " >&6; }
57541 if ${ac_cv_path_CCACHE+:} false; then :
57542   $as_echo_n "(cached) " >&6
57543 else
57544   case $CCACHE in
57545   [\\/]* | ?:[\\/]*)
57546   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
57547   ;;
57548   *)
57549   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57550 for as_dir in $PATH
57551 do
57552   IFS=$as_save_IFS
57553   test -z "$as_dir" && as_dir=.
57554     for ac_exec_ext in '' $ac_executable_extensions; do
57555   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57556     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
57557     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57558     break 2
57559   fi
57560 done
57561   done
57562 IFS=$as_save_IFS
57563 
57564   ;;
57565 esac
57566 fi
57567 CCACHE=$ac_cv_path_CCACHE
57568 if test -n "$CCACHE"; then
57569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
57570 $as_echo "$CCACHE" >&6; }
57571 else
57572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57573 $as_echo "no" >&6; }
57574 fi
57575 
57576 
57577   test -n "$CCACHE" && break
57578 done
57579 
57580     else
57581       # If it succeeded, then it was overridden by the user. We will use it
57582       # for the tool.
57583 
57584       # First remove it from the list of overridden variables, so we can test
57585       # for unknown variables in the end.
57586       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57587 
57588       # Check if we try to supply an empty value
57589       if test "x$CCACHE" = x; then
57590         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
57591 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
57592         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
57593 $as_echo_n "checking for CCACHE... " >&6; }
57594         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57595 $as_echo "disabled" >&6; }
57596       else
57597         # Check if the provided tool contains a complete path.
57598         tool_specified="$CCACHE"
57599         tool_basename="${tool_specified##*/}"
57600         if test "x$tool_basename" = "x$tool_specified"; then
57601           # A command without a complete path is provided, search $PATH.
57602           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
57603 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
57604           # Extract the first word of "$tool_basename", so it can be a program name with args.
57605 set dummy $tool_basename; ac_word=$2
57606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57607 $as_echo_n "checking for $ac_word... " >&6; }
57608 if ${ac_cv_path_CCACHE+:} false; then :
57609   $as_echo_n "(cached) " >&6
57610 else
57611   case $CCACHE in
57612   [\\/]* | ?:[\\/]*)
57613   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
57614   ;;
57615   *)
57616   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57617 for as_dir in $PATH
57618 do
57619   IFS=$as_save_IFS
57620   test -z "$as_dir" && as_dir=.
57621     for ac_exec_ext in '' $ac_executable_extensions; do
57622   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57623     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
57624     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57625     break 2
57626   fi
57627 done
57628   done
57629 IFS=$as_save_IFS
57630 
57631   ;;
57632 esac
57633 fi
57634 CCACHE=$ac_cv_path_CCACHE
57635 if test -n "$CCACHE"; then
57636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
57637 $as_echo "$CCACHE" >&6; }
57638 else
57639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57640 $as_echo "no" >&6; }
57641 fi
57642 
57643 
57644           if test "x$CCACHE" = x; then
57645             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57646           fi
57647         else
57648           # Otherwise we believe it is a complete path. Use it as it is.
57649           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
57650 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
57651           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
57652 $as_echo_n "checking for CCACHE... " >&6; }
57653           if test ! -x "$tool_specified"; then
57654             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57655 $as_echo "not found" >&6; }
57656             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
57657           fi
57658           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57659 $as_echo "$tool_specified" >&6; }
57660         fi
57661       fi
57662     fi
57663 
57664   fi
57665 
57666 
57667 
57668   if test "x$CCACHE" = x; then
57669     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
57670   fi
57671 
57672 
57673       PATH="$OLD_PATH"
57674       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
57675       CCACHE_STATUS="Active ($CCACHE_VERSION)"
57676     else
57677       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57678 $as_echo "no" >&6; }
57679       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
57680 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
57681     fi
57682   elif test "x$enable_ccache" = xno; then
57683     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
57684 $as_echo "no, explicitly disabled" >&6; }
57685     CCACHE_STATUS="Disabled"
57686   elif test "x$enable_ccache" = x; then
57687     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57688 $as_echo "no" >&6; }
57689   else
57690     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
57691 $as_echo "unknown" >&6; }
57692     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
57693   fi
57694 
57695 
57696 
57697 # Check whether --with-ccache-dir was given.
57698 if test "${with_ccache_dir+set}" = set; then :
57699   withval=$with_ccache_dir;
57700 fi
57701 
57702 
57703   if test "x$with_ccache_dir" != x; then
57704     # When using a non home ccache directory, assume the use is to share ccache files
57705     # with other users. Thus change the umask.
57706     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
57707     if test "x$CCACHE" = x; then
57708       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
57709 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
57710     fi
57711   fi
57712 
57713   if test "x$CCACHE" != x; then
57714 
57715   if test "x$CCACHE" != x; then
57716     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
57717       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
57718           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
57719       if test "x$HAS_BAD_CCACHE" != "x"; then
57720         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
57721       fi
57722       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
57723 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
57724       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
57725       PUSHED_FLAGS="$CXXFLAGS"
57726       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
57727       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57728 /* end confdefs.h.  */
57729 
57730 int
57731 main ()
57732 {
57733 
57734   ;
57735   return 0;
57736 }
57737 _ACEOF
57738 if ac_fn_cxx_try_compile "$LINENO"; then :
57739   CC_KNOWS_CCACHE_TRICK=yes
57740 else
57741   CC_KNOWS_CCACHE_TRICK=no
57742 fi
57743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57744       CXXFLAGS="$PUSHED_FLAGS"
57745       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
57746         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57747 $as_echo "yes" >&6; }
57748         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
57749 
57750         CCACHE_SLOPPINESS=pch_defines,time_macros
57751       else
57752         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57753 $as_echo "no" >&6; }
57754         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
57755       fi
57756     fi
57757 
57758     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
57759         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
57760 
57761     if test "x$SET_CCACHE_DIR" != x; then
57762       mkdir -p $CCACHE_DIR > /dev/null 2>&1
57763       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
57764     fi
57765   fi
57766 
57767   fi
57768 
57769 
57770 ###############################################################################
57771 #
57772 # And now the finish...
57773 #
57774 ###############################################################################
57775 
57776 # Check for some common pitfalls
57777 
57778   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57779     file_to_test="$SRC_ROOT/LICENSE"
57780     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
57781       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
57782     fi
57783   fi
57784 
57785 
57786   # Did user specify any unknown variables?
57787 
57788   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
57789     # Replace the separating ! with spaces before presenting for end user.
57790     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
57791     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
57792 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
57793   fi
57794 
57795 
57796   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
57797 $as_echo_n "checking if build directory is on local disk... " >&6; }
57798 
57799   # df -l lists only local disks; if the given directory is not found then
57800   # a non-zero exit code is given
57801   if test "x$DF" = x; then
57802     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57803       # msys does not have df; use Windows "net use" instead.
57804       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
57805       if test "x$IS_NETWORK_DISK" = x; then
57806         OUTPUT_DIR_IS_LOCAL="yes"
57807       else
57808         OUTPUT_DIR_IS_LOCAL="no"
57809       fi
57810     else
57811       # No df here, say it's local
57812       OUTPUT_DIR_IS_LOCAL="yes"
57813     fi
57814   else
57815     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
57816       OUTPUT_DIR_IS_LOCAL="yes"
57817     else
57818       OUTPUT_DIR_IS_LOCAL="no"
57819     fi
57820   fi
57821 
57822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
57823 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
57824 
57825 
57826 
57827   # Check if the user has any old-style ALT_ variables set.
57828   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
57829 
57830   # Before generating output files, test if they exist. If they do, this is a reconfigure.
57831   # Since we can't properly handle the dependencies for this, warn the user about the situation
57832   if test -e $OUTPUT_ROOT/spec.gmk; then
57833     IS_RECONFIGURE=yes
57834   else
57835     IS_RECONFIGURE=no
57836   fi
57837 
57838 
57839 # At the end, call the custom hook. (Dummy macro if no custom sources available)
57840 
57841 
57842 # We're messing a bit with internal autoconf variables to put the config.status
57843 # in the output directory instead of the current directory.
57844 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
57845 
57846 # Create the actual output files. Now the main work of configure is done.
57847 cat >confcache <<\_ACEOF
57848 # This file is a shell script that caches the results of configure
57849 # tests run on this system so they can be shared between configure
57850 # scripts and configure runs, see configure's option --config-cache.
57851 # It is not useful on other systems.  If it contains results you don't
57852 # want to keep, you may remove or edit it.
57853 #
57854 # config.status only pays attention to the cache file if you give it
57855 # the --recheck option to rerun configure.
57856 #
57857 # `ac_cv_env_foo' variables (set or unset) will be overridden when
57858 # loading this file, other *unset* `ac_cv_foo' will be assigned the
57859 # following values.
57860 
57861 _ACEOF
57862 
57863 # The following way of writing the cache mishandles newlines in values,
57864 # but we know of no workaround that is simple, portable, and efficient.
57865 # So, we kill variables containing newlines.
57866 # Ultrix sh set writes to stderr and can't be redirected directly,
57867 # and sets the high bit in the cache file unless we assign to the vars.
57868 (
57869   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
57870     eval ac_val=\$$ac_var
57871     case $ac_val in #(
57872     *${as_nl}*)
57873       case $ac_var in #(
57874       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
57875 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
57876       esac
57877       case $ac_var in #(
57878       _ | IFS | as_nl) ;; #(
57879       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
57880       *) { eval $ac_var=; unset $ac_var;} ;;
57881       esac ;;
57882     esac
57883   done
57884 
57885   (set) 2>&1 |
57886     case $as_nl`(ac_space=' '; set) 2>&1` in #(
57887     *${as_nl}ac_space=\ *)
57888       # `set' does not quote correctly, so add quotes: double-quote
57889       # substitution turns \\\\ into \\, and sed turns \\ into \.
57890       sed -n \
57891         "s/'/'\\\\''/g;
57892           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
57893       ;; #(
57894     *)
57895       # `set' quotes correctly as required by POSIX, so do not add quotes.
57896       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
57897       ;;
57898     esac |
57899     sort
57900 ) |
57901   sed '
57902      /^ac_cv_env_/b end
57903      t clear
57904      :clear
57905      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
57906      t end
57907      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
57908      :end' >>confcache
57909 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
57910   if test -w "$cache_file"; then
57911     if test "x$cache_file" != "x/dev/null"; then
57912       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
57913 $as_echo "$as_me: updating cache $cache_file" >&6;}
57914       if test ! -f "$cache_file" || test -h "$cache_file"; then
57915         cat confcache >"$cache_file"
57916       else
57917         case $cache_file in #(
57918         */* | ?:*)
57919           mv -f confcache "$cache_file"$$ &&
57920           mv -f "$cache_file"$$ "$cache_file" ;; #(
57921         *)
57922           mv -f confcache "$cache_file" ;;
57923         esac
57924       fi
57925     fi
57926   else
57927     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
57928 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
57929   fi
57930 fi
57931 rm -f confcache
57932 
57933 test "x$prefix" = xNONE && prefix=$ac_default_prefix
57934 # Let make expand exec_prefix.
57935 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
57936 
57937 # Transform confdefs.h into DEFS.
57938 # Protect against shell expansion while executing Makefile rules.
57939 # Protect against Makefile macro expansion.
57940 #
57941 # If the first sed substitution is executed (which looks for macros that
57942 # take arguments), then branch to the quote section.  Otherwise,
57943 # look for a macro that doesn't take arguments.
57944 ac_script='
57945 :mline
57946 /\\$/{
57947  N
57948  s,\\\n,,
57949  b mline
57950 }
57951 t clear
57952 :clear
57953 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
57954 t quote
57955 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
57956 t quote
57957 b any
57958 :quote
57959 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
57960 s/\[/\\&/g
57961 s/\]/\\&/g
57962 s/\$/$$/g
57963 H
57964 :any
57965 ${
57966         g
57967         s/^\n//
57968         s/\n/ /g
57969         p
57970 }
57971 '
57972 DEFS=`sed -n "$ac_script" confdefs.h`
57973 
57974 
57975 ac_libobjs=
57976 ac_ltlibobjs=
57977 U=
57978 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
57979   # 1. Remove the extension, and $U if already installed.
57980   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
57981   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
57982   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
57983   #    will be set to the directory where LIBOBJS objects are built.
57984   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
57985   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
57986 done
57987 LIBOBJS=$ac_libobjs
57988 
57989 LTLIBOBJS=$ac_ltlibobjs
57990 
57991 
57992 
57993 : "${CONFIG_STATUS=./config.status}"
57994 ac_write_fail=0
57995 ac_clean_files_save=$ac_clean_files
57996 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
57997 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
57998 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
57999 as_write_fail=0
58000 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
58001 #! $SHELL
58002 # Generated by $as_me.
58003 # Run this file to recreate the current configuration.
58004 # Compiler output produced by configure, useful for debugging
58005 # configure, is in config.log if it exists.
58006 
58007 debug=false
58008 ac_cs_recheck=false
58009 ac_cs_silent=false
58010 
58011 SHELL=\${CONFIG_SHELL-$SHELL}
58012 export SHELL
58013 _ASEOF
58014 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
58015 ## -------------------- ##
58016 ## M4sh Initialization. ##
58017 ## -------------------- ##
58018 
58019 # Be more Bourne compatible
58020 DUALCASE=1; export DUALCASE # for MKS sh
58021 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
58022   emulate sh
58023   NULLCMD=:
58024   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
58025   # is contrary to our usage.  Disable this feature.
58026   alias -g '${1+"$@"}'='"$@"'
58027   setopt NO_GLOB_SUBST
58028 else
58029   case `(set -o) 2>/dev/null` in #(
58030   *posix*) :
58031     set -o posix ;; #(
58032   *) :
58033      ;;
58034 esac
58035 fi
58036 
58037 
58038 as_nl='
58039 '
58040 export as_nl
58041 # Printing a long string crashes Solaris 7 /usr/bin/printf.
58042 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
58043 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
58044 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
58045 # Prefer a ksh shell builtin over an external printf program on Solaris,
58046 # but without wasting forks for bash or zsh.
58047 if test -z "$BASH_VERSION$ZSH_VERSION" \
58048     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
58049   as_echo='print -r --'
58050   as_echo_n='print -rn --'
58051 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
58052   as_echo='printf %s\n'
58053   as_echo_n='printf %s'
58054 else
58055   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
58056     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58057     as_echo_n='/usr/ucb/echo -n'
58058   else
58059     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58060     as_echo_n_body='eval
58061       arg=$1;
58062       case $arg in #(
58063       *"$as_nl"*)
58064         expr "X$arg" : "X\\(.*\\)$as_nl";
58065         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
58066       esac;
58067       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
58068     '
58069     export as_echo_n_body
58070     as_echo_n='sh -c $as_echo_n_body as_echo'
58071   fi
58072   export as_echo_body
58073   as_echo='sh -c $as_echo_body as_echo'
58074 fi
58075 
58076 # The user is always right.
58077 if test "${PATH_SEPARATOR+set}" != set; then
58078   PATH_SEPARATOR=:
58079   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
58080     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
58081       PATH_SEPARATOR=';'
58082   }
58083 fi
58084 
58085 
58086 # IFS
58087 # We need space, tab and new line, in precisely that order.  Quoting is
58088 # there to prevent editors from complaining about space-tab.
58089 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
58090 # splitting by setting IFS to empty value.)
58091 IFS=" ""        $as_nl"
58092 
58093 # Find who we are.  Look in the path if we contain no directory separator.
58094 as_myself=
58095 case $0 in #((
58096   *[\\/]* ) as_myself=$0 ;;
58097   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58098 for as_dir in $PATH
58099 do
58100   IFS=$as_save_IFS
58101   test -z "$as_dir" && as_dir=.
58102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
58103   done
58104 IFS=$as_save_IFS
58105 
58106      ;;
58107 esac
58108 # We did not find ourselves, most probably we were run as `sh COMMAND'
58109 # in which case we are not to be found in the path.
58110 if test "x$as_myself" = x; then
58111   as_myself=$0
58112 fi
58113 if test ! -f "$as_myself"; then
58114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
58115   exit 1
58116 fi
58117 
58118 # Unset variables that we do not need and which cause bugs (e.g. in
58119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
58120 # suppresses any "Segmentation fault" message there.  '((' could
58121 # trigger a bug in pdksh 5.2.14.
58122 for as_var in BASH_ENV ENV MAIL MAILPATH
58123 do eval test x\${$as_var+set} = xset \
58124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
58125 done
58126 PS1='$ '
58127 PS2='> '
58128 PS4='+ '
58129 
58130 # NLS nuisances.
58131 LC_ALL=C
58132 export LC_ALL
58133 LANGUAGE=C
58134 export LANGUAGE
58135 
58136 # CDPATH.
58137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
58138 
58139 
58140 # as_fn_error STATUS ERROR [LINENO LOG_FD]
58141 # ----------------------------------------
58142 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
58143 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
58144 # script with STATUS, using 1 if that was 0.
58145 as_fn_error ()
58146 {
58147   as_status=$1; test $as_status -eq 0 && as_status=1
58148   if test "$4"; then
58149     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
58150     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
58151   fi
58152   $as_echo "$as_me: error: $2" >&2
58153   as_fn_exit $as_status
58154 } # as_fn_error
58155 
58156 
58157 # as_fn_set_status STATUS
58158 # -----------------------
58159 # Set $? to STATUS, without forking.
58160 as_fn_set_status ()
58161 {
58162   return $1
58163 } # as_fn_set_status
58164 
58165 # as_fn_exit STATUS
58166 # -----------------
58167 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
58168 as_fn_exit ()
58169 {
58170   set +e
58171   as_fn_set_status $1
58172   exit $1
58173 } # as_fn_exit
58174 
58175 # as_fn_unset VAR
58176 # ---------------
58177 # Portably unset VAR.
58178 as_fn_unset ()
58179 {
58180   { eval $1=; unset $1;}
58181 }
58182 as_unset=as_fn_unset
58183 # as_fn_append VAR VALUE
58184 # ----------------------
58185 # Append the text in VALUE to the end of the definition contained in VAR. Take
58186 # advantage of any shell optimizations that allow amortized linear growth over
58187 # repeated appends, instead of the typical quadratic growth present in naive
58188 # implementations.
58189 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
58190   eval 'as_fn_append ()
58191   {
58192     eval $1+=\$2
58193   }'
58194 else
58195   as_fn_append ()
58196   {
58197     eval $1=\$$1\$2
58198   }
58199 fi # as_fn_append
58200 
58201 # as_fn_arith ARG...
58202 # ------------------
58203 # Perform arithmetic evaluation on the ARGs, and store the result in the
58204 # global $as_val. Take advantage of shells that can avoid forks. The arguments
58205 # must be portable across $(()) and expr.
58206 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
58207   eval 'as_fn_arith ()
58208   {
58209     as_val=$(( $* ))
58210   }'
58211 else
58212   as_fn_arith ()
58213   {
58214     as_val=`expr "$@" || test $? -eq 1`
58215   }
58216 fi # as_fn_arith
58217 
58218 
58219 if expr a : '\(a\)' >/dev/null 2>&1 &&
58220    test "X`expr 00001 : '.*\(...\)'`" = X001; then
58221   as_expr=expr
58222 else
58223   as_expr=false
58224 fi
58225 
58226 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
58227   as_basename=basename
58228 else
58229   as_basename=false
58230 fi
58231 
58232 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
58233   as_dirname=dirname
58234 else
58235   as_dirname=false
58236 fi
58237 
58238 as_me=`$as_basename -- "$0" ||
58239 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
58240          X"$0" : 'X\(//\)$' \| \
58241          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
58242 $as_echo X/"$0" |
58243     sed '/^.*\/\([^/][^/]*\)\/*$/{
58244             s//\1/
58245             q
58246           }
58247           /^X\/\(\/\/\)$/{
58248             s//\1/
58249             q
58250           }
58251           /^X\/\(\/\).*/{
58252             s//\1/
58253             q
58254           }
58255           s/.*/./; q'`
58256 
58257 # Avoid depending upon Character Ranges.
58258 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
58259 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
58260 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
58261 as_cr_digits='0123456789'
58262 as_cr_alnum=$as_cr_Letters$as_cr_digits
58263 
58264 ECHO_C= ECHO_N= ECHO_T=
58265 case `echo -n x` in #(((((
58266 -n*)
58267   case `echo 'xy\c'` in
58268   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
58269   xy)  ECHO_C='\c';;
58270   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
58271        ECHO_T=' ';;
58272   esac;;
58273 *)
58274   ECHO_N='-n';;
58275 esac
58276 
58277 rm -f conf$$ conf$$.exe conf$$.file
58278 if test -d conf$$.dir; then
58279   rm -f conf$$.dir/conf$$.file
58280 else
58281   rm -f conf$$.dir
58282   mkdir conf$$.dir 2>/dev/null
58283 fi
58284 if (echo >conf$$.file) 2>/dev/null; then
58285   if ln -s conf$$.file conf$$ 2>/dev/null; then
58286     as_ln_s='ln -s'
58287     # ... but there are two gotchas:
58288     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
58289     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
58290     # In both cases, we have to default to `cp -pR'.
58291     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
58292       as_ln_s='cp -pR'
58293   elif ln conf$$.file conf$$ 2>/dev/null; then
58294     as_ln_s=ln
58295   else
58296     as_ln_s='cp -pR'
58297   fi
58298 else
58299   as_ln_s='cp -pR'
58300 fi
58301 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
58302 rmdir conf$$.dir 2>/dev/null
58303 
58304 
58305 # as_fn_mkdir_p
58306 # -------------
58307 # Create "$as_dir" as a directory, including parents if necessary.
58308 as_fn_mkdir_p ()
58309 {
58310 
58311   case $as_dir in #(
58312   -*) as_dir=./$as_dir;;
58313   esac
58314   test -d "$as_dir" || eval $as_mkdir_p || {
58315     as_dirs=
58316     while :; do
58317       case $as_dir in #(
58318       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
58319       *) as_qdir=$as_dir;;
58320       esac
58321       as_dirs="'$as_qdir' $as_dirs"
58322       as_dir=`$as_dirname -- "$as_dir" ||
58323 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58324          X"$as_dir" : 'X\(//\)[^/]' \| \
58325          X"$as_dir" : 'X\(//\)$' \| \
58326          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
58327 $as_echo X"$as_dir" |
58328     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
58329             s//\1/
58330             q
58331           }
58332           /^X\(\/\/\)[^/].*/{
58333             s//\1/
58334             q
58335           }
58336           /^X\(\/\/\)$/{
58337             s//\1/
58338             q
58339           }
58340           /^X\(\/\).*/{
58341             s//\1/
58342             q
58343           }
58344           s/.*/./; q'`
58345       test -d "$as_dir" && break
58346     done
58347     test -z "$as_dirs" || eval "mkdir $as_dirs"
58348   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
58349 
58350 
58351 } # as_fn_mkdir_p
58352 if mkdir -p . 2>/dev/null; then
58353   as_mkdir_p='mkdir -p "$as_dir"'
58354 else
58355   test -d ./-p && rmdir ./-p
58356   as_mkdir_p=false
58357 fi
58358 
58359 
58360 # as_fn_executable_p FILE
58361 # -----------------------
58362 # Test if FILE is an executable regular file.
58363 as_fn_executable_p ()
58364 {
58365   test -f "$1" && test -x "$1"
58366 } # as_fn_executable_p
58367 as_test_x='test -x'
58368 as_executable_p=as_fn_executable_p
58369 
58370 # Sed expression to map a string onto a valid CPP name.
58371 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
58372 
58373 # Sed expression to map a string onto a valid variable name.
58374 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
58375 
58376 
58377 exec 6>&1
58378 ## ----------------------------------- ##
58379 ## Main body of $CONFIG_STATUS script. ##
58380 ## ----------------------------------- ##
58381 _ASEOF
58382 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
58383 
58384 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58385 # Save the log message, to keep $0 and so on meaningful, and to
58386 # report actual input values of CONFIG_FILES etc. instead of their
58387 # values after options handling.
58388 ac_log="
58389 This file was extended by OpenJDK $as_me jdk9, which was
58390 generated by GNU Autoconf 2.69.  Invocation command line was
58391 
58392   CONFIG_FILES    = $CONFIG_FILES
58393   CONFIG_HEADERS  = $CONFIG_HEADERS
58394   CONFIG_LINKS    = $CONFIG_LINKS
58395   CONFIG_COMMANDS = $CONFIG_COMMANDS
58396   $ $0 $@
58397 
58398 on `(hostname || uname -n) 2>/dev/null | sed 1q`
58399 "
58400 
58401 _ACEOF
58402 
58403 case $ac_config_files in *"
58404 "*) set x $ac_config_files; shift; ac_config_files=$*;;
58405 esac
58406 
58407 
58408 
58409 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58410 # Files that config.status was made for.
58411 config_files="$ac_config_files"
58412 
58413 _ACEOF
58414 
58415 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58416 ac_cs_usage="\
58417 \`$as_me' instantiates files and other configuration actions
58418 from templates according to the current configuration.  Unless the files
58419 and actions are specified as TAGs, all are instantiated by default.
58420 
58421 Usage: $0 [OPTION]... [TAG]...
58422 
58423   -h, --help       print this help, then exit
58424   -V, --version    print version number and configuration settings, then exit
58425       --config     print configuration, then exit
58426   -q, --quiet, --silent
58427                    do not print progress messages
58428   -d, --debug      don't remove temporary files
58429       --recheck    update $as_me by reconfiguring in the same conditions
58430       --file=FILE[:TEMPLATE]
58431                    instantiate the configuration file FILE
58432 
58433 Configuration files:
58434 $config_files
58435 
58436 Report bugs to <build-dev@openjdk.java.net>.
58437 OpenJDK home page: <http://openjdk.java.net>."
58438 
58439 _ACEOF
58440 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58441 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
58442 ac_cs_version="\\
58443 OpenJDK config.status jdk9
58444 configured by $0, generated by GNU Autoconf 2.69,
58445   with options \\"\$ac_cs_config\\"
58446 
58447 Copyright (C) 2012 Free Software Foundation, Inc.
58448 This config.status script is free software; the Free Software Foundation
58449 gives unlimited permission to copy, distribute and modify it."
58450 
58451 ac_pwd='$ac_pwd'
58452 srcdir='$srcdir'
58453 AWK='$AWK'
58454 test -n "\$AWK" || AWK=awk
58455 _ACEOF
58456 
58457 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58458 # The default lists apply if the user does not specify any file.
58459 ac_need_defaults=:
58460 while test $# != 0
58461 do
58462   case $1 in
58463   --*=?*)
58464     ac_option=`expr "X$1" : 'X\([^=]*\)='`
58465     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
58466     ac_shift=:
58467     ;;
58468   --*=)
58469     ac_option=`expr "X$1" : 'X\([^=]*\)='`
58470     ac_optarg=
58471     ac_shift=:
58472     ;;
58473   *)
58474     ac_option=$1
58475     ac_optarg=$2
58476     ac_shift=shift
58477     ;;
58478   esac
58479 
58480   case $ac_option in
58481   # Handling of the options.
58482   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
58483     ac_cs_recheck=: ;;
58484   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
58485     $as_echo "$ac_cs_version"; exit ;;
58486   --config | --confi | --conf | --con | --co | --c )
58487     $as_echo "$ac_cs_config"; exit ;;
58488   --debug | --debu | --deb | --de | --d | -d )
58489     debug=: ;;
58490   --file | --fil | --fi | --f )
58491     $ac_shift
58492     case $ac_optarg in
58493     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
58494     '') as_fn_error $? "missing file argument" ;;
58495     esac
58496     as_fn_append CONFIG_FILES " '$ac_optarg'"
58497     ac_need_defaults=false;;
58498   --he | --h |  --help | --hel | -h )
58499     $as_echo "$ac_cs_usage"; exit ;;
58500   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
58501   | -silent | --silent | --silen | --sile | --sil | --si | --s)
58502     ac_cs_silent=: ;;
58503 
58504   # This is an error.
58505   -*) as_fn_error $? "unrecognized option: \`$1'
58506 Try \`$0 --help' for more information." ;;
58507 
58508   *) as_fn_append ac_config_targets " $1"
58509      ac_need_defaults=false ;;
58510 
58511   esac
58512   shift
58513 done
58514 
58515 ac_configure_extra_args=
58516 
58517 if $ac_cs_silent; then
58518   exec 6>/dev/null
58519   ac_configure_extra_args="$ac_configure_extra_args --silent"
58520 fi
58521 
58522 _ACEOF
58523 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58524 if \$ac_cs_recheck; then
58525   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
58526   shift
58527   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
58528   CONFIG_SHELL='$SHELL'
58529   export CONFIG_SHELL
58530   exec "\$@"
58531 fi
58532 
58533 _ACEOF
58534 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58535 exec 5>>config.log
58536 {
58537   echo
58538   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
58539 ## Running $as_me. ##
58540 _ASBOX
58541   $as_echo "$ac_log"
58542 } >&5
58543 
58544 _ACEOF
58545 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58546 _ACEOF
58547 
58548 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58549 
58550 # Handling of arguments.
58551 for ac_config_target in $ac_config_targets
58552 do
58553   case $ac_config_target in
58554     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
58555     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
58556     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
58557     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
58558     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
58559 
58560   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
58561   esac
58562 done
58563 
58564 
58565 # If the user did not use the arguments to specify the items to instantiate,
58566 # then the envvar interface is used.  Set only those that are not.
58567 # We use the long form for the default assignment because of an extremely
58568 # bizarre bug on SunOS 4.1.3.
58569 if $ac_need_defaults; then
58570   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
58571 fi
58572 
58573 # Have a temporary directory for convenience.  Make it in the build tree
58574 # simply because there is no reason against having it here, and in addition,
58575 # creating and moving files from /tmp can sometimes cause problems.
58576 # Hook for its removal unless debugging.
58577 # Note that there is a small window in which the directory will not be cleaned:
58578 # after its creation but before its name has been assigned to `$tmp'.
58579 $debug ||
58580 {
58581   tmp= ac_tmp=
58582   trap 'exit_status=$?
58583   : "${ac_tmp:=$tmp}"
58584   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
58585 ' 0
58586   trap 'as_fn_exit 1' 1 2 13 15
58587 }
58588 # Create a (secure) tmp directory for tmp files.
58589 
58590 {
58591   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
58592   test -d "$tmp"
58593 }  ||
58594 {
58595   tmp=./conf$$-$RANDOM
58596   (umask 077 && mkdir "$tmp")
58597 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
58598 ac_tmp=$tmp
58599 
58600 # Set up the scripts for CONFIG_FILES section.
58601 # No need to generate them if there are no CONFIG_FILES.
58602 # This happens for instance with `./config.status config.h'.
58603 if test -n "$CONFIG_FILES"; then
58604 
58605 
58606 ac_cr=`echo X | tr X '\015'`
58607 # On cygwin, bash can eat \r inside `` if the user requested igncr.
58608 # But we know of no other shell where ac_cr would be empty at this
58609 # point, so we can use a bashism as a fallback.
58610 if test "x$ac_cr" = x; then
58611   eval ac_cr=\$\'\\r\'
58612 fi
58613 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
58614 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
58615   ac_cs_awk_cr='\\r'
58616 else
58617   ac_cs_awk_cr=$ac_cr
58618 fi
58619 
58620 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
58621 _ACEOF
58622 
58623 
58624 {
58625   echo "cat >conf$$subs.awk <<_ACEOF" &&
58626   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
58627   echo "_ACEOF"
58628 } >conf$$subs.sh ||
58629   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
58630 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
58631 ac_delim='%!_!# '
58632 for ac_last_try in false false false false false :; do
58633   . ./conf$$subs.sh ||
58634     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
58635 
58636   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
58637   if test $ac_delim_n = $ac_delim_num; then
58638     break
58639   elif $ac_last_try; then
58640     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
58641   else
58642     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
58643   fi
58644 done
58645 rm -f conf$$subs.sh
58646 
58647 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58648 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
58649 _ACEOF
58650 sed -n '
58651 h
58652 s/^/S["/; s/!.*/"]=/
58653 p
58654 g
58655 s/^[^!]*!//
58656 :repl
58657 t repl
58658 s/'"$ac_delim"'$//
58659 t delim
58660 :nl
58661 h
58662 s/\(.\{148\}\)..*/\1/
58663 t more1
58664 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
58665 p
58666 n
58667 b repl
58668 :more1
58669 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
58670 p
58671 g
58672 s/.\{148\}//
58673 t nl
58674 :delim
58675 h
58676 s/\(.\{148\}\)..*/\1/
58677 t more2
58678 s/["\\]/\\&/g; s/^/"/; s/$/"/
58679 p
58680 b
58681 :more2
58682 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
58683 p
58684 g
58685 s/.\{148\}//
58686 t delim
58687 ' <conf$$subs.awk | sed '
58688 /^[^""]/{
58689   N
58690   s/\n//
58691 }
58692 ' >>$CONFIG_STATUS || ac_write_fail=1
58693 rm -f conf$$subs.awk
58694 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58695 _ACAWK
58696 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
58697   for (key in S) S_is_set[key] = 1
58698   FS = ""
58699 
58700 }
58701 {
58702   line = $ 0
58703   nfields = split(line, field, "@")
58704   substed = 0
58705   len = length(field[1])
58706   for (i = 2; i < nfields; i++) {
58707     key = field[i]
58708     keylen = length(key)
58709     if (S_is_set[key]) {
58710       value = S[key]
58711       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
58712       len += length(value) + length(field[++i])
58713       substed = 1
58714     } else
58715       len += 1 + keylen
58716   }
58717 
58718   print line
58719 }
58720 
58721 _ACAWK
58722 _ACEOF
58723 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58724 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
58725   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
58726 else
58727   cat
58728 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
58729   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
58730 _ACEOF
58731 
58732 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
58733 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
58734 # trailing colons and then remove the whole line if VPATH becomes empty
58735 # (actually we leave an empty line to preserve line numbers).
58736 if test "x$srcdir" = x.; then
58737   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
58738 h
58739 s///
58740 s/^/:/
58741 s/[      ]*$/:/
58742 s/:\$(srcdir):/:/g
58743 s/:\${srcdir}:/:/g
58744 s/:@srcdir@:/:/g
58745 s/^:*//
58746 s/:*$//
58747 x
58748 s/\(=[   ]*\).*/\1/
58749 G
58750 s/\n//
58751 s/^[^=]*=[       ]*$//
58752 }'
58753 fi
58754 
58755 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58756 fi # test -n "$CONFIG_FILES"
58757 
58758 
58759 eval set X "  :F $CONFIG_FILES      "
58760 shift
58761 for ac_tag
58762 do
58763   case $ac_tag in
58764   :[FHLC]) ac_mode=$ac_tag; continue;;
58765   esac
58766   case $ac_mode$ac_tag in
58767   :[FHL]*:*);;
58768   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
58769   :[FH]-) ac_tag=-:-;;
58770   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
58771   esac
58772   ac_save_IFS=$IFS
58773   IFS=:
58774   set x $ac_tag
58775   IFS=$ac_save_IFS
58776   shift
58777   ac_file=$1
58778   shift
58779 
58780   case $ac_mode in
58781   :L) ac_source=$1;;
58782   :[FH])
58783     ac_file_inputs=
58784     for ac_f
58785     do
58786       case $ac_f in
58787       -) ac_f="$ac_tmp/stdin";;
58788       *) # Look for the file first in the build tree, then in the source tree
58789          # (if the path is not absolute).  The absolute path cannot be DOS-style,
58790          # because $ac_f cannot contain `:'.
58791          test -f "$ac_f" ||
58792            case $ac_f in
58793            [\\/$]*) false;;
58794            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
58795            esac ||
58796            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
58797       esac
58798       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
58799       as_fn_append ac_file_inputs " '$ac_f'"
58800     done
58801 
58802     # Let's still pretend it is `configure' which instantiates (i.e., don't
58803     # use $as_me), people would be surprised to read:
58804     #    /* config.h.  Generated by config.status.  */
58805     configure_input='Generated from '`
58806           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
58807         `' by configure.'
58808     if test x"$ac_file" != x-; then
58809       configure_input="$ac_file.  $configure_input"
58810       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
58811 $as_echo "$as_me: creating $ac_file" >&6;}
58812     fi
58813     # Neutralize special characters interpreted by sed in replacement strings.
58814     case $configure_input in #(
58815     *\&* | *\|* | *\\* )
58816        ac_sed_conf_input=`$as_echo "$configure_input" |
58817        sed 's/[\\\\&|]/\\\\&/g'`;; #(
58818     *) ac_sed_conf_input=$configure_input;;
58819     esac
58820 
58821     case $ac_tag in
58822     *:-:* | *:-) cat >"$ac_tmp/stdin" \
58823       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
58824     esac
58825     ;;
58826   esac
58827 
58828   ac_dir=`$as_dirname -- "$ac_file" ||
58829 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58830          X"$ac_file" : 'X\(//\)[^/]' \| \
58831          X"$ac_file" : 'X\(//\)$' \| \
58832          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
58833 $as_echo X"$ac_file" |
58834     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
58835             s//\1/
58836             q
58837           }
58838           /^X\(\/\/\)[^/].*/{
58839             s//\1/
58840             q
58841           }
58842           /^X\(\/\/\)$/{
58843             s//\1/
58844             q
58845           }
58846           /^X\(\/\).*/{
58847             s//\1/
58848             q
58849           }
58850           s/.*/./; q'`
58851   as_dir="$ac_dir"; as_fn_mkdir_p
58852   ac_builddir=.
58853 
58854 case "$ac_dir" in
58855 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
58856 *)
58857   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
58858   # A ".." for each directory in $ac_dir_suffix.
58859   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
58860   case $ac_top_builddir_sub in
58861   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
58862   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
58863   esac ;;
58864 esac
58865 ac_abs_top_builddir=$ac_pwd
58866 ac_abs_builddir=$ac_pwd$ac_dir_suffix
58867 # for backward compatibility:
58868 ac_top_builddir=$ac_top_build_prefix
58869 
58870 case $srcdir in
58871   .)  # We are building in place.
58872     ac_srcdir=.
58873     ac_top_srcdir=$ac_top_builddir_sub
58874     ac_abs_top_srcdir=$ac_pwd ;;
58875   [\\/]* | ?:[\\/]* )  # Absolute name.
58876     ac_srcdir=$srcdir$ac_dir_suffix;
58877     ac_top_srcdir=$srcdir
58878     ac_abs_top_srcdir=$srcdir ;;
58879   *) # Relative name.
58880     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
58881     ac_top_srcdir=$ac_top_build_prefix$srcdir
58882     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
58883 esac
58884 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
58885 
58886 
58887   case $ac_mode in
58888   :F)
58889   #
58890   # CONFIG_FILE
58891   #
58892 
58893 _ACEOF
58894 
58895 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58896 # If the template does not know about datarootdir, expand it.
58897 # FIXME: This hack should be removed a few years after 2.60.
58898 ac_datarootdir_hack=; ac_datarootdir_seen=
58899 ac_sed_dataroot='
58900 /datarootdir/ {
58901   p
58902   q
58903 }
58904 /@datadir@/p
58905 /@docdir@/p
58906 /@infodir@/p
58907 /@localedir@/p
58908 /@mandir@/p'
58909 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
58910 *datarootdir*) ac_datarootdir_seen=yes;;
58911 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
58912   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
58913 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
58914 _ACEOF
58915 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58916   ac_datarootdir_hack='
58917   s&@datadir@&$datadir&g
58918   s&@docdir@&$docdir&g
58919   s&@infodir@&$infodir&g
58920   s&@localedir@&$localedir&g
58921   s&@mandir@&$mandir&g
58922   s&\\\${datarootdir}&$datarootdir&g' ;;
58923 esac
58924 _ACEOF
58925 
58926 # Neutralize VPATH when `$srcdir' = `.'.
58927 # Shell code in configure.ac might set extrasub.
58928 # FIXME: do we really want to maintain this feature?
58929 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58930 ac_sed_extra="$ac_vpsub
58931 $extrasub
58932 _ACEOF
58933 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58934 :t
58935 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
58936 s|@configure_input@|$ac_sed_conf_input|;t t
58937 s&@top_builddir@&$ac_top_builddir_sub&;t t
58938 s&@top_build_prefix@&$ac_top_build_prefix&;t t
58939 s&@srcdir@&$ac_srcdir&;t t
58940 s&@abs_srcdir@&$ac_abs_srcdir&;t t
58941 s&@top_srcdir@&$ac_top_srcdir&;t t
58942 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
58943 s&@builddir@&$ac_builddir&;t t
58944 s&@abs_builddir@&$ac_abs_builddir&;t t
58945 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
58946 $ac_datarootdir_hack
58947 "
58948 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
58949   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
58950 
58951 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
58952   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
58953   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
58954       "$ac_tmp/out"`; test -z "$ac_out"; } &&
58955   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
58956 which seems to be undefined.  Please make sure it is defined" >&5
58957 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
58958 which seems to be undefined.  Please make sure it is defined" >&2;}
58959 
58960   rm -f "$ac_tmp/stdin"
58961   case $ac_file in
58962   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
58963   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
58964   esac \
58965   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
58966  ;;
58967 
58968 
58969 
58970   esac
58971 
58972 done # for ac_tag
58973 
58974 
58975 as_fn_exit 0
58976 _ACEOF
58977 ac_clean_files=$ac_clean_files_save
58978 
58979 test $ac_write_fail = 0 ||
58980   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
58981 
58982 
58983 # configure is writing to config.log, and then calls config.status.
58984 # config.status does its own redirection, appending to config.log.
58985 # Unfortunately, on DOS this fails, as config.log is still kept open
58986 # by configure, so config.status won't be able to write to it; its
58987 # output is simply discarded.  So we exec the FD to /dev/null,
58988 # effectively closing config.log, so it can be properly (re)opened and
58989 # appended to by config.status.  When coming back to configure, we
58990 # need to make the FD available again.
58991 if test "$no_create" != yes; then
58992   ac_cs_success=:
58993   ac_config_status_args=
58994   test "$silent" = yes &&
58995     ac_config_status_args="$ac_config_status_args --quiet"
58996   exec 5>/dev/null
58997   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
58998   exec 5>>config.log
58999   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
59000   # would make configure fail if this is the last instruction.
59001   $ac_cs_success || as_fn_exit 1
59002 fi
59003 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
59004   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
59005 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
59006 fi
59007 
59008 
59009 # After AC_OUTPUT, we need to do final work
59010 
59011 
59012   # Try to move config.log (generated by autoconf) to the configure-support directory.
59013   if test -e ./config.log; then
59014     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
59015   fi
59016 
59017   # Rotate our log file (configure.log)
59018   if test -e "$OUTPUT_ROOT/configure.log.old"; then
59019     $RM -f "$OUTPUT_ROOT/configure.log.old"
59020   fi
59021   if test -e "$OUTPUT_ROOT/configure.log"; then
59022     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
59023   fi
59024 
59025   # Move configure.log from current directory to the build output root
59026   if test -e ./configure.log; then
59027     echo found it
59028     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
59029   fi
59030 
59031   # Make the compare script executable
59032   $CHMOD +x $OUTPUT_ROOT/compare.sh
59033 
59034 
59035 # Finally output some useful information to the user
59036 
59037   # Finally output some useful information to the user
59038 
59039   printf "\n"
59040   printf "====================================================\n"
59041   if test "x$no_create" != "xyes"; then
59042     if test "x$IS_RECONFIGURE" != "xyes"; then
59043       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
59044     else
59045       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
59046     fi
59047   else
59048     if test "x$IS_RECONFIGURE" != "xyes"; then
59049       printf "A configuration has been successfully checked but not created\n"
59050     else
59051       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
59052     fi
59053   fi
59054   if test "x$CONFIGURE_COMMAND_LINE" != x; then
59055     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
59056   else
59057     printf "using default settings.\n"
59058   fi
59059 
59060   printf "\n"
59061   printf "Configuration summary:\n"
59062   printf "* Debug level:    $DEBUG_LEVEL\n"
59063   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
59064   printf "* JDK variant:    $JDK_VARIANT\n"
59065   printf "* JVM variants:   $with_jvm_variants\n"
59066   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
59067 
59068   printf "\n"
59069   printf "Tools summary:\n"
59070   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
59071     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
59072   fi
59073   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
59074   if test "x$TOOLCHAIN_VERSION" != "x"; then
59075     print_version=" $TOOLCHAIN_VERSION"
59076   fi
59077   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
59078   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
59079   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
59080 
59081   printf "\n"
59082   printf "Build performance summary:\n"
59083   printf "* Cores to use:   $JOBS\n"
59084   printf "* Memory limit:   $MEMORY_SIZE MB\n"
59085   if test "x$CCACHE_STATUS" != "x"; then
59086     printf "* ccache status:  $CCACHE_STATUS\n"
59087   fi
59088   printf "\n"
59089 
59090   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
59091     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
59092     printf "will result in longer build times.\n"
59093     printf "\n"
59094   fi
59095 
59096   if test "x$FOUND_ALT_VARIABLES" != "x"; then
59097     printf "WARNING: You have old-style ALT_ environment variables set.\n"
59098     printf "These are not respected, and will be ignored. It is recommended\n"
59099     printf "that you clean your environment. The following variables are set:\n"
59100     printf "$FOUND_ALT_VARIABLES\n"
59101     printf "\n"
59102   fi
59103 
59104   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
59105     printf "WARNING: Your build output directory is not on a local disk.\n"
59106     printf "This will severely degrade build performance!\n"
59107     printf "It is recommended that you create an output directory on a local disk,\n"
59108     printf "and run the configure script again from that directory.\n"
59109     printf "\n"
59110   fi
59111 
59112   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
59113     printf "WARNING: The result of this configuration has overridden an older\n"
59114     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
59115     printf "proper build. Failure to do so might result in strange build problems.\n"
59116     printf "\n"
59117   fi
59118 
59119   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
59120     printf "WARNING: The result of this configuration was not saved.\n"
59121     printf "You should run without '--no-create | -n' to create the configuration.\n"
59122     printf "\n"
59123   fi
59124 
59125 
59126 
59127   # Locate config.log.
59128   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
59129     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
59130   elif test -e "./config.log"; then
59131     CONFIG_LOG_PATH="."
59132   fi
59133 
59134   if test -e "$CONFIG_LOG_PATH/config.log"; then
59135     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
59136     if test $? -eq 0; then
59137       printf "The following warnings were produced. Repeated here for convenience:\n"
59138       # We must quote sed expression (using []) to stop m4 from eating the [].
59139       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
59140       printf "\n"
59141     fi
59142   fi
59143