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 BOOTCYCLE_JVM_ARGS_BIG
 648 JAVA_FLAGS_BIG
 649 JAVA_FLAGS
 650 TEST_JOBS
 651 JOBS
 652 MEMORY_SIZE
 653 NUM_CORES
 654 ENABLE_GENERATE_CLASSLIST
 655 BUILD_FAILURE_HANDLER
 656 ENABLE_INTREE_EC
 657 VALID_JVM_FEATURES
 658 JVM_FEATURES_custom
 659 JVM_FEATURES_zeroshark
 660 JVM_FEATURES_zero
 661 JVM_FEATURES_minimal
 662 JVM_FEATURES_core
 663 JVM_FEATURES_client
 664 JVM_FEATURES_server
 665 INCLUDE_GRAAL
 666 ELF_LIBS
 667 ELF_CFLAGS
 668 STLPORT_LIB
 669 LIBZIP_CAN_USE_MMAP
 670 LIBDL
 671 LIBM
 672 USE_EXTERNAL_LCMS
 673 LCMS_LIBS
 674 LCMS_CFLAGS
 675 USE_EXTERNAL_LIBZ
 676 USE_EXTERNAL_LIBPNG
 677 PNG_LIBS
 678 PNG_CFLAGS
 679 USE_EXTERNAL_LIBGIF
 680 USE_EXTERNAL_LIBJPEG
 681 LLVM_LIBS
 682 LLVM_LDFLAGS
 683 LLVM_CFLAGS
 684 LLVM_CONFIG
 685 LIBFFI_LIB_FILE
 686 ENABLE_LIBFFI_BUNDLING
 687 LIBFFI_LIBS
 688 LIBFFI_CFLAGS
 689 ALSA_LIBS
 690 ALSA_CFLAGS
 691 FREETYPE_BUNDLE_LIB_PATH
 692 FREETYPE_LIBS
 693 FREETYPE_CFLAGS
 694 CUPS_CFLAGS
 695 X_EXTRA_LIBS
 696 X_LIBS
 697 X_PRE_LIBS
 698 X_CFLAGS
 699 XMKMF
 700 MSVCP_DLL
 701 MSVCR_DLL
 702 LIBCXX
 703 FIXPATH_DETACH_FLAG
 704 FIXPATH
 705 BUILD_GTEST
 706 ENABLE_AOT
 707 INCLUDE_DTRACE
 708 GCOV_ENABLED
 709 ZIP_EXTERNAL_DEBUG_SYMBOLS
 710 COPY_DEBUG_SYMBOLS
 711 COMPILE_WITH_DEBUG_SYMBOLS
 712 CFLAGS_WARNINGS_ARE_ERRORS
 713 BUILD_CC_DISABLE_WARNING_PREFIX
 714 DISABLE_WARNING_PREFIX
 715 HOTSPOT_SET_WARNINGS_AS_ERRORS
 716 WARNINGS_AS_ERRORS
 717 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 718 ZERO_ARCHFLAG
 719 LDFLAGS_TESTEXE
 720 LDFLAGS_TESTLIB
 721 CXXFLAGS_TESTEXE
 722 CXXFLAGS_TESTLIB
 723 CFLAGS_TESTEXE
 724 CFLAGS_TESTLIB
 725 OPENJDK_BUILD_JVM_LIBS
 726 OPENJDK_BUILD_JVM_ASFLAGS
 727 OPENJDK_BUILD_JVM_LDFLAGS
 728 OPENJDK_BUILD_JVM_CFLAGS
 729 OPENJDK_BUILD_LDFLAGS_HASH_STYLE
 730 OPENJDK_BUILD_LDFLAGS_CXX_JDK
 731 OPENJDK_BUILD_JDKEXE_LIBS
 732 OPENJDK_BUILD_JDKLIB_LIBS
 733 OPENJDK_BUILD_LDFLAGS_JDKEXE
 734 OPENJDK_BUILD_LDFLAGS_JDKLIB
 735 OPENJDK_BUILD_CXXFLAGS_JDKEXE
 736 OPENJDK_BUILD_CXXFLAGS_JDKLIB
 737 OPENJDK_BUILD_CFLAGS_JDKEXE
 738 OPENJDK_BUILD_CFLAGS_JDKLIB
 739 OPENJDK_BUILD_CXXSTD_CXXFLAG
 740 JVM_LIBS
 741 JVM_ASFLAGS
 742 JVM_LDFLAGS
 743 JVM_CFLAGS
 744 LDFLAGS_HASH_STYLE
 745 LDFLAGS_CXX_JDK
 746 JDKEXE_LIBS
 747 JDKLIB_LIBS
 748 LDFLAGS_JDKEXE
 749 LDFLAGS_JDKLIB
 750 CXXFLAGS_JDKEXE
 751 CXXFLAGS_JDKLIB
 752 CFLAGS_JDKEXE
 753 CFLAGS_JDKLIB
 754 MACOSX_VERSION_MIN
 755 CXXSTD_CXXFLAG
 756 CXX_O_FLAG_SIZE
 757 CXX_O_FLAG_NONE
 758 CXX_O_FLAG_DEBUG
 759 CXX_O_FLAG_NORM
 760 CXX_O_FLAG_HI
 761 CXX_O_FLAG_HIGHEST
 762 CXX_O_FLAG_HIGHEST_JVM
 763 C_O_FLAG_SIZE
 764 C_O_FLAG_NONE
 765 C_O_FLAG_DEBUG
 766 C_O_FLAG_NORM
 767 C_O_FLAG_HI
 768 C_O_FLAG_HIGHEST
 769 C_O_FLAG_HIGHEST_JVM
 770 JVM_CFLAGS_SYMBOLS
 771 CXXFLAGS_DEBUG_SYMBOLS
 772 CFLAGS_DEBUG_SYMBOLS
 773 CXX_FLAG_DEPS
 774 C_FLAG_DEPS
 775 SHARED_LIBRARY_FLAGS
 776 SET_SHARED_LIBRARY_MAPFILE
 777 SET_SHARED_LIBRARY_NAME
 778 SET_SHARED_LIBRARY_ORIGIN
 779 SET_EXECUTABLE_ORIGIN
 780 CXX_FLAG_REORDER
 781 C_FLAG_REORDER
 782 JVM_RCFLAGS
 783 RC_FLAGS
 784 AR_OUT_OPTION
 785 LD_OUT_OPTION
 786 EXE_OUT_OPTION
 787 CC_OUT_OPTION
 788 STRIPFLAGS
 789 ARFLAGS
 790 COMPILER_BINDCMD_FILE_FLAG
 791 COMPILER_COMMAND_FILE_FLAG
 792 COMPILER_TARGET_BITS_FLAG
 793 JT_HOME
 794 JTREGEXE
 795 HOTSPOT_TOOLCHAIN_TYPE
 796 USING_BROKEN_SUSE_LD
 797 PACKAGE_PATH
 798 BUILD_AS
 799 BUILD_LDCXX
 800 BUILD_LD
 801 BUILD_STRIP
 802 BUILD_OBJCOPY
 803 BUILD_AR
 804 BUILD_NM
 805 BUILD_CXX
 806 BUILD_CC
 807 BUILD_SYSROOT_LDFLAGS
 808 BUILD_SYSROOT_CFLAGS
 809 ac_ct_OBJDUMP
 810 OBJDUMP
 811 ac_ct_OBJCOPY
 812 OBJCOPY
 813 ac_ct_NM
 814 ac_ct_STRIP
 815 GNM
 816 NM
 817 STRIP
 818 MSBUILD
 819 DUMPBIN
 820 RC
 821 MT
 822 LIPO
 823 ac_ct_AR
 824 AR
 825 AS
 826 LDCXX
 827 LD
 828 CXXCPP
 829 CPP
 830 CXX_VERSION_NUMBER
 831 CC_VERSION_NUMBER
 832 ac_ct_CXX
 833 CXXFLAGS
 834 CXX
 835 TOOLCHAIN_PATH_CXX
 836 POTENTIAL_CXX
 837 OBJEXT
 838 EXEEXT
 839 ac_ct_CC
 840 CPPFLAGS
 841 LDFLAGS
 842 CFLAGS
 843 CC
 844 TOOLCHAIN_PATH_CC
 845 POTENTIAL_CC
 846 TOOLCHAIN_VERSION
 847 VS_LIB
 848 VS_INCLUDE
 849 VS_PATH
 850 CYGWIN_LINK
 851 SYSROOT_LDFLAGS
 852 SYSROOT_CFLAGS
 853 EXTRA_LDFLAGS
 854 EXTRA_CXXFLAGS
 855 EXTRA_CFLAGS
 856 LEGACY_EXTRA_LDFLAGS
 857 LEGACY_EXTRA_CXXFLAGS
 858 LEGACY_EXTRA_CFLAGS
 859 EXE_SUFFIX
 860 OBJ_SUFFIX
 861 STATIC_LIBRARY
 862 SHARED_LIBRARY
 863 STATIC_LIBRARY_SUFFIX
 864 SHARED_LIBRARY_SUFFIX
 865 LIBRARY_PREFIX
 866 TOOLCHAIN_TYPE
 867 STATIC_BUILD
 868 IMPORT_MODULES_MAKE
 869 IMPORT_MODULES_SRC
 870 IMPORT_MODULES_CONF
 871 IMPORT_MODULES_LIBS
 872 IMPORT_MODULES_CMDS
 873 IMPORT_MODULES_CLASSES
 874 BUILD_OUTPUT
 875 JDK_TOPDIR
 876 NASHORN_TOPDIR
 877 HOTSPOT_TOPDIR
 878 JAXWS_TOPDIR
 879 JAXP_TOPDIR
 880 CORBA_TOPDIR
 881 LANGTOOLS_TOPDIR
 882 EXTERNAL_BUILDJDK
 883 BUILD_JDK
 884 CREATE_BUILDJDK
 885 JLINK
 886 JMOD
 887 BOOT_JDK_BITS
 888 JAVAC_FLAGS
 889 BOOT_JDK_MODULAR
 890 BOOT_JDK_SOURCETARGET
 891 JARSIGNER
 892 JAR
 893 JAVAH
 894 JAVAC
 895 JAVA
 896 BOOT_JDK
 897 JAVA_CHECK
 898 JAVAC_CHECK
 899 VERSION_IS_GA
 900 VERSION_SHORT
 901 VERSION_STRING
 902 VERSION_NUMBER_FOUR_POSITIONS
 903 VERSION_NUMBER
 904 VERSION_OPT
 905 VERSION_BUILD
 906 VERSION_PRE
 907 VERSION_PATCH
 908 VERSION_SECURITY
 909 VERSION_MINOR
 910 VERSION_MAJOR
 911 MACOSX_BUNDLE_ID_BASE
 912 MACOSX_BUNDLE_NAME_BASE
 913 HOTSPOT_VM_DISTRO
 914 COMPANY_NAME
 915 JDK_RC_PLATFORM_NAME
 916 PRODUCT_SUFFIX
 917 PRODUCT_NAME
 918 LAUNCHER_NAME
 919 JLINK_KEEP_PACKAGED_MODULES
 920 COPYRIGHT_YEAR
 921 COMPRESS_JARS
 922 INCLUDE_SA
 923 UNLIMITED_CRYPTO
 924 CACERTS_FILE
 925 ENABLE_HEADLESS_ONLY
 926 DEFAULT_MAKE_TARGET
 927 OS_VERSION_MICRO
 928 OS_VERSION_MINOR
 929 OS_VERSION_MAJOR
 930 PKG_CONFIG
 931 BASH_ARGS
 932 SETFILE
 933 CODESIGN
 934 XATTR
 935 DSYMUTIL
 936 IS_GNU_TIME
 937 PATCH
 938 DTRACE
 939 TIME
 940 STAT
 941 HG
 942 READELF
 943 OTOOL
 944 LDD
 945 ZIPEXE
 946 UNZIP
 947 TAR_SUPPORTS_TRANSFORM
 948 TAR_INCLUDE_PARAM
 949 TAR_CREATE_EXTRA_PARAM
 950 TAR_TYPE
 951 FIND_DELETE
 952 OUTPUT_SYNC
 953 OUTPUT_SYNC_SUPPORTED
 954 CHECK_TOOLSDIR_MAKE
 955 CHECK_TOOLSDIR_GMAKE
 956 CHECK_MAKE
 957 CHECK_GMAKE
 958 MAKE
 959 PKGHANDLER
 960 CONFIGURESUPPORT_OUTPUTDIR
 961 OUTPUT_ROOT
 962 CONF_NAME
 963 SPEC
 964 SDKROOT
 965 XCODEBUILD
 966 JVM_VARIANT_MAIN
 967 VALID_JVM_VARIANTS
 968 JVM_VARIANTS
 969 DEBUG_LEVEL
 970 HOTSPOT_DEBUG_LEVEL
 971 JDK_VARIANT
 972 USERNAME
 973 CANONICAL_TOPDIR
 974 ORIGINAL_TOPDIR
 975 TOPDIR
 976 PATH_SEP
 977 ZERO_ARCHDEF
 978 HOTSPOT_BUILD_CPU_DEFINE
 979 HOTSPOT_BUILD_CPU_ARCH
 980 HOTSPOT_BUILD_CPU
 981 HOTSPOT_BUILD_OS_TYPE
 982 HOTSPOT_BUILD_OS
 983 OPENJDK_BUILD_BUNDLE_PLATFORM
 984 OPENJDK_BUILD_CPU_BUNDLE
 985 OPENJDK_BUILD_OS_BUNDLE
 986 OPENJDK_BUILD_OS_EXPORT_DIR
 987 OPENJDK_BUILD_CPU_OSARCH
 988 OPENJDK_BUILD_CPU_ISADIR
 989 OPENJDK_BUILD_CPU_LEGACY_LIB
 990 OPENJDK_BUILD_CPU_LEGACY
 991 HOTSPOT_TARGET_CPU_DEFINE
 992 HOTSPOT_TARGET_CPU_ARCH
 993 HOTSPOT_TARGET_CPU
 994 HOTSPOT_TARGET_OS_TYPE
 995 HOTSPOT_TARGET_OS
 996 DEFINE_CROSS_COMPILE_ARCH
 997 LP64
 998 OPENJDK_TARGET_BUNDLE_PLATFORM
 999 OPENJDK_TARGET_CPU_BUNDLE
1000 OPENJDK_TARGET_OS_BUNDLE
1001 OPENJDK_TARGET_OS_EXPORT_DIR
1002 OPENJDK_TARGET_CPU_OSARCH
1003 OPENJDK_TARGET_CPU_ISADIR
1004 OPENJDK_TARGET_CPU_LEGACY_LIB
1005 OPENJDK_TARGET_CPU_LEGACY
1006 REQUIRED_OS_VERSION
1007 REQUIRED_OS_NAME
1008 COMPILE_TYPE
1009 OPENJDK_TARGET_CPU_ENDIAN
1010 OPENJDK_TARGET_CPU_BITS
1011 OPENJDK_TARGET_CPU_ARCH
1012 OPENJDK_TARGET_CPU
1013 OPENJDK_TARGET_OS_ENV
1014 OPENJDK_TARGET_OS_TYPE
1015 OPENJDK_TARGET_OS
1016 OPENJDK_BUILD_CPU_ENDIAN
1017 OPENJDK_BUILD_CPU_BITS
1018 OPENJDK_BUILD_CPU_ARCH
1019 OPENJDK_BUILD_CPU
1020 OPENJDK_BUILD_OS_ENV
1021 OPENJDK_BUILD_OS_TYPE
1022 OPENJDK_BUILD_OS
1023 OPENJDK_BUILD_AUTOCONF_NAME
1024 OPENJDK_TARGET_AUTOCONF_NAME
1025 target_os
1026 target_vendor
1027 target_cpu
1028 target
1029 host_os
1030 host_vendor
1031 host_cpu
1032 host
1033 build_os
1034 build_vendor
1035 build_cpu
1036 build
1037 NICE
1038 CPIO
1039 DF
1040 READLINK
1041 CYGPATH
1042 SED
1043 FGREP
1044 EGREP
1045 GREP
1046 AWK
1047 XARGS
1048 WHICH
1049 WC
1050 UNIQ
1051 UNAME
1052 TR
1053 TOUCH
1054 TEE
1055 TAR
1056 TAIL
1057 SORT
1058 SH
1059 RMDIR
1060 RM
1061 PRINTF
1062 NAWK
1063 MV
1064 MKTEMP
1065 MKDIR
1066 LS
1067 LN
1068 GZIP
1069 GUNZIP
1070 HEAD
1071 FIND
1072 FILE
1073 EXPR
1074 ECHO
1075 DIRNAME
1076 DIFF
1077 DATE
1078 CUT
1079 CP
1080 COMM
1081 CMP
1082 CHMOD
1083 CAT
1084 BASH
1085 BASENAME
1086 DATE_WHEN_CONFIGURED
1087 ORIGINAL_PATH
1088 CONFIGURE_COMMAND_LINE
1089 target_alias
1090 host_alias
1091 build_alias
1092 LIBS
1093 ECHO_T
1094 ECHO_N
1095 ECHO_C
1096 DEFS
1097 mandir
1098 localedir
1099 libdir
1100 psdir
1101 pdfdir
1102 dvidir
1103 htmldir
1104 infodir
1105 docdir
1106 oldincludedir
1107 includedir
1108 localstatedir
1109 sharedstatedir
1110 sysconfdir
1111 datadir
1112 datarootdir
1113 libexecdir
1114 sbindir
1115 bindir
1116 program_transform_name
1117 prefix
1118 exec_prefix
1119 PACKAGE_URL
1120 PACKAGE_BUGREPORT
1121 PACKAGE_STRING
1122 PACKAGE_VERSION
1123 PACKAGE_TARNAME
1124 PACKAGE_NAME
1125 PATH_SEPARATOR
1126 SHELL'
1127 ac_subst_files=''
1128 ac_user_opts='
1129 enable_option_checking
1130 with_target_bits
1131 enable_openjdk_only
1132 with_custom_make_dir
1133 with_jdk_variant
1134 enable_debug
1135 with_debug_level
1136 with_jvm_variants
1137 with_devkit
1138 with_sys_root
1139 with_sysroot
1140 with_tools_dir
1141 with_toolchain_path
1142 with_extra_path
1143 with_sdk_name
1144 with_conf_name
1145 with_output_sync
1146 with_default_make_target
1147 enable_headless_only
1148 with_cacerts_file
1149 enable_unlimited_crypto
1150 with_copyright_year
1151 enable_keep_packaged_modules
1152 with_milestone
1153 with_update_version
1154 with_user_release_suffix
1155 with_build_number
1156 with_version_string
1157 with_version_pre
1158 with_version_opt
1159 with_version_build
1160 with_version_major
1161 with_version_minor
1162 with_version_security
1163 with_version_patch
1164 with_boot_jdk
1165 with_build_jdk
1166 with_add_source_root
1167 with_override_source_root
1168 with_adds_and_overrides
1169 with_override_langtools
1170 with_override_corba
1171 with_override_jaxp
1172 with_override_jaxws
1173 with_override_hotspot
1174 with_override_nashorn
1175 with_override_jdk
1176 with_import_hotspot
1177 with_import_modules
1178 enable_static_build
1179 with_toolchain_type
1180 with_extra_cflags
1181 with_extra_cxxflags
1182 with_extra_ldflags
1183 with_toolchain_version
1184 with_build_devkit
1185 with_jtreg
1186 enable_warnings_as_errors
1187 with_native_debug_symbols
1188 enable_debug_symbols
1189 enable_zip_debug_info
1190 enable_native_coverage
1191 enable_dtrace
1192 enable_aot
1193 enable_hotspot_gtest
1194 with_stdc__lib
1195 with_msvcr_dll
1196 with_msvcp_dll
1197 with_x
1198 with_cups
1199 with_cups_include
1200 with_freetype
1201 with_freetype_include
1202 with_freetype_lib
1203 with_freetype_src
1204 enable_freetype_bundling
1205 with_alsa
1206 with_alsa_include
1207 with_alsa_lib
1208 with_libffi
1209 with_libffi_include
1210 with_libffi_lib
1211 enable_libffi_bundling
1212 with_libjpeg
1213 with_giflib
1214 with_libpng
1215 with_zlib
1216 with_lcms
1217 with_dxsdk
1218 with_dxsdk_lib
1219 with_dxsdk_include
1220 with_libelf
1221 with_libelf_include
1222 with_libelf_lib
1223 with_jvm_features
1224 with_jvm_interpreter
1225 enable_jtreg_failure_handler
1226 enable_generate_classlist
1227 with_num_cores
1228 with_memory_size
1229 with_jobs
1230 with_test_jobs
1231 with_boot_jdk_jvmargs
1232 with_sjavac_server_java
1233 enable_sjavac
1234 enable_javac_server
1235 enable_icecc
1236 enable_precompiled_headers
1237 enable_ccache
1238 with_ccache_dir
1239 '
1240       ac_precious_vars='build_alias
1241 host_alias
1242 target_alias
1243 BASENAME
1244 BASH
1245 CAT
1246 CHMOD
1247 CMP
1248 COMM
1249 CP
1250 CUT
1251 DATE
1252 DIFF
1253 DIRNAME
1254 ECHO
1255 EXPR
1256 FILE
1257 FIND
1258 HEAD
1259 GUNZIP
1260 GZIP
1261 LN
1262 LS
1263 MKDIR
1264 MKTEMP
1265 MV
1266 NAWK
1267 PRINTF
1268 RM
1269 RMDIR
1270 SH
1271 SORT
1272 TAIL
1273 TAR
1274 TEE
1275 TOUCH
1276 TR
1277 UNAME
1278 UNIQ
1279 WC
1280 WHICH
1281 XARGS
1282 AWK
1283 GREP
1284 EGREP
1285 FGREP
1286 SED
1287 CYGPATH
1288 READLINK
1289 DF
1290 CPIO
1291 NICE
1292 MAKE
1293 UNZIP
1294 ZIPEXE
1295 LDD
1296 OTOOL
1297 READELF
1298 HG
1299 STAT
1300 TIME
1301 DTRACE
1302 PATCH
1303 DSYMUTIL
1304 XATTR
1305 CODESIGN
1306 SETFILE
1307 PKG_CONFIG
1308 JAVA
1309 JAVAC
1310 JAVAH
1311 JAR
1312 JARSIGNER
1313 CC
1314 CFLAGS
1315 LDFLAGS
1316 LIBS
1317 CPPFLAGS
1318 CXX
1319 CXXFLAGS
1320 CCC
1321 CPP
1322 CXXCPP
1323 AS
1324 AR
1325 LIPO
1326 STRIP
1327 NM
1328 GNM
1329 OBJCOPY
1330 OBJDUMP
1331 BUILD_CC
1332 BUILD_CXX
1333 BUILD_NM
1334 BUILD_AR
1335 BUILD_OBJCOPY
1336 BUILD_STRIP
1337 JTREGEXE
1338 XMKMF
1339 FREETYPE_CFLAGS
1340 FREETYPE_LIBS
1341 ALSA_CFLAGS
1342 ALSA_LIBS
1343 LIBFFI_CFLAGS
1344 LIBFFI_LIBS
1345 PNG_CFLAGS
1346 PNG_LIBS
1347 LCMS_CFLAGS
1348 LCMS_LIBS
1349 ELF_CFLAGS
1350 ELF_LIBS
1351 ICECC_CMD
1352 ICECC_CREATE_ENV
1353 ICECC_WRAPPER
1354 CCACHE'
1355 
1356 
1357 # Initialize some variables set by options.
1358 ac_init_help=
1359 ac_init_version=false
1360 ac_unrecognized_opts=
1361 ac_unrecognized_sep=
1362 # The variables have the same names as the options, with
1363 # dashes changed to underlines.
1364 cache_file=/dev/null
1365 exec_prefix=NONE
1366 no_create=
1367 no_recursion=
1368 prefix=NONE
1369 program_prefix=NONE
1370 program_suffix=NONE
1371 program_transform_name=s,x,x,
1372 silent=
1373 site=
1374 srcdir=
1375 verbose=
1376 x_includes=NONE
1377 x_libraries=NONE
1378 
1379 # Installation directory options.
1380 # These are left unexpanded so users can "make install exec_prefix=/foo"
1381 # and all the variables that are supposed to be based on exec_prefix
1382 # by default will actually change.
1383 # Use braces instead of parens because sh, perl, etc. also accept them.
1384 # (The list follows the same order as the GNU Coding Standards.)
1385 bindir='${exec_prefix}/bin'
1386 sbindir='${exec_prefix}/sbin'
1387 libexecdir='${exec_prefix}/libexec'
1388 datarootdir='${prefix}/share'
1389 datadir='${datarootdir}'
1390 sysconfdir='${prefix}/etc'
1391 sharedstatedir='${prefix}/com'
1392 localstatedir='${prefix}/var'
1393 includedir='${prefix}/include'
1394 oldincludedir='/usr/include'
1395 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1396 infodir='${datarootdir}/info'
1397 htmldir='${docdir}'
1398 dvidir='${docdir}'
1399 pdfdir='${docdir}'
1400 psdir='${docdir}'
1401 libdir='${exec_prefix}/lib'
1402 localedir='${datarootdir}/locale'
1403 mandir='${datarootdir}/man'
1404 
1405 ac_prev=
1406 ac_dashdash=
1407 for ac_option
1408 do
1409   # If the previous option needs an argument, assign it.
1410   if test -n "$ac_prev"; then
1411     eval $ac_prev=\$ac_option
1412     ac_prev=
1413     continue
1414   fi
1415 
1416   case $ac_option in
1417   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1418   *=)   ac_optarg= ;;
1419   *)    ac_optarg=yes ;;
1420   esac
1421 
1422   # Accept the important Cygnus configure options, so we can diagnose typos.
1423 
1424   case $ac_dashdash$ac_option in
1425   --)
1426     ac_dashdash=yes ;;
1427 
1428   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1429     ac_prev=bindir ;;
1430   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1431     bindir=$ac_optarg ;;
1432 
1433   -build | --build | --buil | --bui | --bu)
1434     ac_prev=build_alias ;;
1435   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1436     build_alias=$ac_optarg ;;
1437 
1438   -cache-file | --cache-file | --cache-fil | --cache-fi \
1439   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1440     ac_prev=cache_file ;;
1441   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1442   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1443     cache_file=$ac_optarg ;;
1444 
1445   --config-cache | -C)
1446     cache_file=config.cache ;;
1447 
1448   -datadir | --datadir | --datadi | --datad)
1449     ac_prev=datadir ;;
1450   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1451     datadir=$ac_optarg ;;
1452 
1453   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1454   | --dataroo | --dataro | --datar)
1455     ac_prev=datarootdir ;;
1456   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1457   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1458     datarootdir=$ac_optarg ;;
1459 
1460   -disable-* | --disable-*)
1461     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1462     # Reject names that are not valid shell variable names.
1463     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1464       as_fn_error $? "invalid feature name: $ac_useropt"
1465     ac_useropt_orig=$ac_useropt
1466     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1467     case $ac_user_opts in
1468       *"
1469 "enable_$ac_useropt"
1470 "*) ;;
1471       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1472          ac_unrecognized_sep=', ';;
1473     esac
1474     eval enable_$ac_useropt=no ;;
1475 
1476   -docdir | --docdir | --docdi | --doc | --do)
1477     ac_prev=docdir ;;
1478   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1479     docdir=$ac_optarg ;;
1480 
1481   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1482     ac_prev=dvidir ;;
1483   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1484     dvidir=$ac_optarg ;;
1485 
1486   -enable-* | --enable-*)
1487     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1488     # Reject names that are not valid shell variable names.
1489     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1490       as_fn_error $? "invalid feature name: $ac_useropt"
1491     ac_useropt_orig=$ac_useropt
1492     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1493     case $ac_user_opts in
1494       *"
1495 "enable_$ac_useropt"
1496 "*) ;;
1497       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1498          ac_unrecognized_sep=', ';;
1499     esac
1500     eval enable_$ac_useropt=\$ac_optarg ;;
1501 
1502   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1503   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1504   | --exec | --exe | --ex)
1505     ac_prev=exec_prefix ;;
1506   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1507   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1508   | --exec=* | --exe=* | --ex=*)
1509     exec_prefix=$ac_optarg ;;
1510 
1511   -gas | --gas | --ga | --g)
1512     # Obsolete; use --with-gas.
1513     with_gas=yes ;;
1514 
1515   -help | --help | --hel | --he | -h)
1516     ac_init_help=long ;;
1517   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1518     ac_init_help=recursive ;;
1519   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1520     ac_init_help=short ;;
1521 
1522   -host | --host | --hos | --ho)
1523     ac_prev=host_alias ;;
1524   -host=* | --host=* | --hos=* | --ho=*)
1525     host_alias=$ac_optarg ;;
1526 
1527   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1528     ac_prev=htmldir ;;
1529   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1530   | --ht=*)
1531     htmldir=$ac_optarg ;;
1532 
1533   -includedir | --includedir | --includedi | --included | --include \
1534   | --includ | --inclu | --incl | --inc)
1535     ac_prev=includedir ;;
1536   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1537   | --includ=* | --inclu=* | --incl=* | --inc=*)
1538     includedir=$ac_optarg ;;
1539 
1540   -infodir | --infodir | --infodi | --infod | --info | --inf)
1541     ac_prev=infodir ;;
1542   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1543     infodir=$ac_optarg ;;
1544 
1545   -libdir | --libdir | --libdi | --libd)
1546     ac_prev=libdir ;;
1547   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1548     libdir=$ac_optarg ;;
1549 
1550   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1551   | --libexe | --libex | --libe)
1552     ac_prev=libexecdir ;;
1553   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1554   | --libexe=* | --libex=* | --libe=*)
1555     libexecdir=$ac_optarg ;;
1556 
1557   -localedir | --localedir | --localedi | --localed | --locale)
1558     ac_prev=localedir ;;
1559   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1560     localedir=$ac_optarg ;;
1561 
1562   -localstatedir | --localstatedir | --localstatedi | --localstated \
1563   | --localstate | --localstat | --localsta | --localst | --locals)
1564     ac_prev=localstatedir ;;
1565   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1566   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1567     localstatedir=$ac_optarg ;;
1568 
1569   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1570     ac_prev=mandir ;;
1571   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1572     mandir=$ac_optarg ;;
1573 
1574   -nfp | --nfp | --nf)
1575     # Obsolete; use --without-fp.
1576     with_fp=no ;;
1577 
1578   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1579   | --no-cr | --no-c | -n)
1580     no_create=yes ;;
1581 
1582   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1583   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1584     no_recursion=yes ;;
1585 
1586   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1587   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1588   | --oldin | --oldi | --old | --ol | --o)
1589     ac_prev=oldincludedir ;;
1590   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1591   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1592   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1593     oldincludedir=$ac_optarg ;;
1594 
1595   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1596     ac_prev=prefix ;;
1597   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1598     prefix=$ac_optarg ;;
1599 
1600   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1601   | --program-pre | --program-pr | --program-p)
1602     ac_prev=program_prefix ;;
1603   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1604   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1605     program_prefix=$ac_optarg ;;
1606 
1607   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1608   | --program-suf | --program-su | --program-s)
1609     ac_prev=program_suffix ;;
1610   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1611   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1612     program_suffix=$ac_optarg ;;
1613 
1614   -program-transform-name | --program-transform-name \
1615   | --program-transform-nam | --program-transform-na \
1616   | --program-transform-n | --program-transform- \
1617   | --program-transform | --program-transfor \
1618   | --program-transfo | --program-transf \
1619   | --program-trans | --program-tran \
1620   | --progr-tra | --program-tr | --program-t)
1621     ac_prev=program_transform_name ;;
1622   -program-transform-name=* | --program-transform-name=* \
1623   | --program-transform-nam=* | --program-transform-na=* \
1624   | --program-transform-n=* | --program-transform-=* \
1625   | --program-transform=* | --program-transfor=* \
1626   | --program-transfo=* | --program-transf=* \
1627   | --program-trans=* | --program-tran=* \
1628   | --progr-tra=* | --program-tr=* | --program-t=*)
1629     program_transform_name=$ac_optarg ;;
1630 
1631   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1632     ac_prev=pdfdir ;;
1633   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1634     pdfdir=$ac_optarg ;;
1635 
1636   -psdir | --psdir | --psdi | --psd | --ps)
1637     ac_prev=psdir ;;
1638   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1639     psdir=$ac_optarg ;;
1640 
1641   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1642   | -silent | --silent | --silen | --sile | --sil)
1643     silent=yes ;;
1644 
1645   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1646     ac_prev=sbindir ;;
1647   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1648   | --sbi=* | --sb=*)
1649     sbindir=$ac_optarg ;;
1650 
1651   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1652   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1653   | --sharedst | --shareds | --shared | --share | --shar \
1654   | --sha | --sh)
1655     ac_prev=sharedstatedir ;;
1656   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1657   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1658   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1659   | --sha=* | --sh=*)
1660     sharedstatedir=$ac_optarg ;;
1661 
1662   -site | --site | --sit)
1663     ac_prev=site ;;
1664   -site=* | --site=* | --sit=*)
1665     site=$ac_optarg ;;
1666 
1667   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1668     ac_prev=srcdir ;;
1669   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1670     srcdir=$ac_optarg ;;
1671 
1672   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1673   | --syscon | --sysco | --sysc | --sys | --sy)
1674     ac_prev=sysconfdir ;;
1675   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1676   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1677     sysconfdir=$ac_optarg ;;
1678 
1679   -target | --target | --targe | --targ | --tar | --ta | --t)
1680     ac_prev=target_alias ;;
1681   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1682     target_alias=$ac_optarg ;;
1683 
1684   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1685     verbose=yes ;;
1686 
1687   -version | --version | --versio | --versi | --vers | -V)
1688     ac_init_version=: ;;
1689 
1690   -with-* | --with-*)
1691     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1692     # Reject names that are not valid shell variable names.
1693     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1694       as_fn_error $? "invalid package name: $ac_useropt"
1695     ac_useropt_orig=$ac_useropt
1696     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1697     case $ac_user_opts in
1698       *"
1699 "with_$ac_useropt"
1700 "*) ;;
1701       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1702          ac_unrecognized_sep=', ';;
1703     esac
1704     eval with_$ac_useropt=\$ac_optarg ;;
1705 
1706   -without-* | --without-*)
1707     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1708     # Reject names that are not valid shell variable names.
1709     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1710       as_fn_error $? "invalid package name: $ac_useropt"
1711     ac_useropt_orig=$ac_useropt
1712     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1713     case $ac_user_opts in
1714       *"
1715 "with_$ac_useropt"
1716 "*) ;;
1717       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1718          ac_unrecognized_sep=', ';;
1719     esac
1720     eval with_$ac_useropt=no ;;
1721 
1722   --x)
1723     # Obsolete; use --with-x.
1724     with_x=yes ;;
1725 
1726   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1727   | --x-incl | --x-inc | --x-in | --x-i)
1728     ac_prev=x_includes ;;
1729   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1730   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1731     x_includes=$ac_optarg ;;
1732 
1733   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1734   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1735     ac_prev=x_libraries ;;
1736   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1737   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1738     x_libraries=$ac_optarg ;;
1739 
1740   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1741 Try \`$0 --help' for more information"
1742     ;;
1743 
1744   *=*)
1745     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1746     # Reject names that are not valid shell variable names.
1747     case $ac_envvar in #(
1748       '' | [0-9]* | *[!_$as_cr_alnum]* )
1749       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1750     esac
1751     eval $ac_envvar=\$ac_optarg
1752     export $ac_envvar ;;
1753 
1754   *)
1755     # FIXME: should be removed in autoconf 3.0.
1756     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1757     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1758       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1759     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1760     ;;
1761 
1762   esac
1763 done
1764 
1765 if test -n "$ac_prev"; then
1766   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1767   as_fn_error $? "missing argument to $ac_option"
1768 fi
1769 
1770 if test -n "$ac_unrecognized_opts"; then
1771   case $enable_option_checking in
1772     no) ;;
1773     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1774     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1775   esac
1776 fi
1777 
1778 # Check all directory arguments for consistency.
1779 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1780                 datadir sysconfdir sharedstatedir localstatedir includedir \
1781                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1782                 libdir localedir mandir
1783 do
1784   eval ac_val=\$$ac_var
1785   # Remove trailing slashes.
1786   case $ac_val in
1787     */ )
1788       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1789       eval $ac_var=\$ac_val;;
1790   esac
1791   # Be sure to have absolute directory names.
1792   case $ac_val in
1793     [\\/$]* | ?:[\\/]* )  continue;;
1794     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1795   esac
1796   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1797 done
1798 
1799 # There might be people who depend on the old broken behavior: `$host'
1800 # used to hold the argument of --host etc.
1801 # FIXME: To remove some day.
1802 build=$build_alias
1803 host=$host_alias
1804 target=$target_alias
1805 
1806 # FIXME: To remove some day.
1807 if test "x$host_alias" != x; then
1808   if test "x$build_alias" = x; then
1809     cross_compiling=maybe
1810   elif test "x$build_alias" != "x$host_alias"; then
1811     cross_compiling=yes
1812   fi
1813 fi
1814 
1815 ac_tool_prefix=
1816 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1817 
1818 test "$silent" = yes && exec 6>/dev/null
1819 
1820 
1821 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1822 ac_ls_di=`ls -di .` &&
1823 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1824   as_fn_error $? "working directory cannot be determined"
1825 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1826   as_fn_error $? "pwd does not report name of working directory"
1827 
1828 
1829 # Find the source files, if location was not specified.
1830 if test -z "$srcdir"; then
1831   ac_srcdir_defaulted=yes
1832   # Try the directory containing this script, then the parent directory.
1833   ac_confdir=`$as_dirname -- "$as_myself" ||
1834 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1835          X"$as_myself" : 'X\(//\)[^/]' \| \
1836          X"$as_myself" : 'X\(//\)$' \| \
1837          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1838 $as_echo X"$as_myself" |
1839     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1840             s//\1/
1841             q
1842           }
1843           /^X\(\/\/\)[^/].*/{
1844             s//\1/
1845             q
1846           }
1847           /^X\(\/\/\)$/{
1848             s//\1/
1849             q
1850           }
1851           /^X\(\/\).*/{
1852             s//\1/
1853             q
1854           }
1855           s/.*/./; q'`
1856   srcdir=$ac_confdir
1857   if test ! -r "$srcdir/$ac_unique_file"; then
1858     srcdir=..
1859   fi
1860 else
1861   ac_srcdir_defaulted=no
1862 fi
1863 if test ! -r "$srcdir/$ac_unique_file"; then
1864   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1865   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1866 fi
1867 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1868 ac_abs_confdir=`(
1869         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1870         pwd)`
1871 # When building in place, set srcdir=.
1872 if test "$ac_abs_confdir" = "$ac_pwd"; then
1873   srcdir=.
1874 fi
1875 # Remove unnecessary trailing slashes from srcdir.
1876 # Double slashes in file names in object file debugging info
1877 # mess up M-x gdb in Emacs.
1878 case $srcdir in
1879 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1880 esac
1881 for ac_var in $ac_precious_vars; do
1882   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1883   eval ac_env_${ac_var}_value=\$${ac_var}
1884   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1885   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1886 done
1887 
1888 #
1889 # Report the --help message.
1890 #
1891 if test "$ac_init_help" = "long"; then
1892   # Omit some internal or obsolete options to make the list less imposing.
1893   # This message is too long to be a string in the A/UX 3.1 sh.
1894   cat <<_ACEOF
1895 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1896 
1897 Usage: $0 [OPTION]... [VAR=VALUE]...
1898 
1899 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1900 VAR=VALUE.  See below for descriptions of some of the useful variables.
1901 
1902 Defaults for the options are specified in brackets.
1903 
1904 Configuration:
1905   -h, --help              display this help and exit
1906       --help=short        display options specific to this package
1907       --help=recursive    display the short help of all the included packages
1908   -V, --version           display version information and exit
1909   -q, --quiet, --silent   do not print \`checking ...' messages
1910       --cache-file=FILE   cache test results in FILE [disabled]
1911   -C, --config-cache      alias for \`--cache-file=config.cache'
1912   -n, --no-create         do not create output files
1913       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1914 
1915 Installation directories:
1916   --prefix=PREFIX         install architecture-independent files in PREFIX
1917                           [$ac_default_prefix]
1918   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1919                           [PREFIX]
1920 
1921 By default, \`make install' will install all the files in
1922 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1923 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1924 for instance \`--prefix=\$HOME'.
1925 
1926 For better control, use the options below.
1927 
1928 Fine tuning of the installation directories:
1929   --bindir=DIR            user executables [EPREFIX/bin]
1930   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1931   --libexecdir=DIR        program executables [EPREFIX/libexec]
1932   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1933   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1934   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1935   --libdir=DIR            object code libraries [EPREFIX/lib]
1936   --includedir=DIR        C header files [PREFIX/include]
1937   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1938   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1939   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1940   --infodir=DIR           info documentation [DATAROOTDIR/info]
1941   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1942   --mandir=DIR            man documentation [DATAROOTDIR/man]
1943   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1944   --htmldir=DIR           html documentation [DOCDIR]
1945   --dvidir=DIR            dvi documentation [DOCDIR]
1946   --pdfdir=DIR            pdf documentation [DOCDIR]
1947   --psdir=DIR             ps documentation [DOCDIR]
1948 _ACEOF
1949 
1950   cat <<\_ACEOF
1951 
1952 X features:
1953   --x-includes=DIR    X include files are in DIR
1954   --x-libraries=DIR   X library files are in DIR
1955 
1956 System types:
1957   --build=BUILD     configure for building on BUILD [guessed]
1958   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1959   --target=TARGET   configure for building compilers for TARGET [HOST]
1960 _ACEOF
1961 fi
1962 
1963 if test -n "$ac_init_help"; then
1964   case $ac_init_help in
1965      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1966    esac
1967   cat <<\_ACEOF
1968 
1969 Optional Features:
1970   --disable-option-checking  ignore unrecognized --enable/--with options
1971   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1972   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1973   --enable-openjdk-only   suppress building custom source even if present
1974                           [disabled]
1975   --enable-debug          set the debug level to fastdebug (shorthand for
1976                           --with-debug-level=fastdebug) [disabled]
1977   --enable-headless-only  only build headless (no GUI) support [disabled]
1978   --disable-unlimited-crypto
1979                           Disable unlimited crypto policy [enabled]
1980   --disable-keep-packaged-modules
1981                           Do not keep packaged modules in jdk image [enable]
1982   --enable-static-build   enable static library build [disabled]
1983   --disable-warnings-as-errors
1984                           do not consider native warnings to be an error
1985                           [enabled]
1986   --enable-debug-symbols  Deprecated. Option is kept for backwards
1987                           compatibility and is ignored
1988   --enable-zip-debug-info Deprecated. Option is kept for backwards
1989                           compatibility and is ignored
1990   --enable-native-coverage
1991                           enable native compilation with code coverage
1992                           data[disabled]
1993   --enable-dtrace[=yes/no/auto]
1994                           enable dtrace. Default is auto, where dtrace is
1995                           enabled if all dependencies are present.
1996   --enable-aot[=yes/no/auto]
1997                           enable ahead of time compilation feature. Default is
1998                           auto, where aot is enabled if all dependencies are
1999                           present.
2000   --disable-hotspot-gtest Disables building of the Hotspot unit tests
2001   --disable-freetype-bundling
2002                           disable bundling of the freetype library with the
2003                           build result [enabled on Windows or when using
2004                           --with-freetype, disabled otherwise]
2005   --enable-libffi-bundling
2006                           enable bundling of libffi.so to make the built JDK
2007                           runnable on more systems
2008   --enable-jtreg-failure-handler
2009                           forces build of the jtreg failure handler to be
2010                           enabled, missing dependencies become fatal errors.
2011                           Default is auto, where the failure handler is built
2012                           if all dependencies are present and otherwise just
2013                           disabled.
2014   --disable-generate-classlist
2015                           forces enabling or disabling of the generation of a
2016                           CDS classlist at build time. Default is to generate
2017                           it when either the server or client JVMs are built.
2018   --enable-sjavac         use sjavac to do fast incremental compiles
2019                           [disabled]
2020   --disable-javac-server  disable javac server [enabled]
2021   --enable-icecc          enable distribted compilation of native code using
2022                           icecc/icecream [disabled]
2023   --disable-precompiled-headers
2024                           disable using precompiled headers when compiling C++
2025                           [enabled]
2026   --enable-ccache         enable using ccache to speed up recompilations
2027                           [disabled]
2028 
2029 Optional Packages:
2030   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2031   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2032   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2033                           support it), e.g. --with-target-bits=32 [guessed]
2034   --with-custom-make-dir  Deprecated. Option is kept for backwards
2035                           compatibility and is ignored
2036   --with-jdk-variant      JDK variant to build (normal) [normal]
2037   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2038                           optimized) [release]
2039   --with-jvm-variants     JVM variants (separated by commas) to build
2040                           (server,client,minimal,core,zero,zeroshark,custom)
2041                           [server]
2042   --with-devkit           use this devkit for compilers, tools and resources
2043   --with-sys-root         alias for --with-sysroot for backwards compatability
2044   --with-sysroot          use this directory as sysroot
2045   --with-tools-dir        alias for --with-toolchain-path for backwards
2046                           compatibility
2047   --with-toolchain-path   prepend these directories when searching for
2048                           toolchain binaries (compilers etc)
2049   --with-extra-path       prepend these directories to the default path
2050   --with-sdk-name         use the platform SDK of the given name. [macosx]
2051   --with-conf-name        use this as the name of the configuration [generated
2052                           from important configuration options]
2053   --with-output-sync      set make output sync type if supported by make.
2054                           [recurse]
2055   --with-default-make-target
2056                           set the default make target [exploded-image]
2057   --with-cacerts-file     specify alternative cacerts file
2058   --with-copyright-year   Set copyright year value for build [current year]
2059   --with-milestone        Deprecated. Option is kept for backwards
2060                           compatibility and is ignored
2061   --with-update-version   Deprecated. Option is kept for backwards
2062                           compatibility and is ignored
2063   --with-user-release-suffix
2064                           Deprecated. Option is kept for backwards
2065                           compatibility and is ignored
2066   --with-build-number     Deprecated. Option is kept for backwards
2067                           compatibility and is ignored
2068   --with-version-string   Set version string [calculated]
2069   --with-version-pre      Set the base part of the version 'PRE' field
2070                           (pre-release identifier) ['internal']
2071   --with-version-opt      Set version 'OPT' field (build metadata)
2072                           [<timestamp>.<user>.<dirname>]
2073   --with-version-build    Set version 'BUILD' field (build number) [not
2074                           specified]
2075   --with-version-major    Set version 'MAJOR' field (first number) [current
2076                           source value]
2077   --with-version-minor    Set version 'MINOR' field (second number) [current
2078                           source value]
2079   --with-version-security Set version 'SECURITY' field (third number) [current
2080                           source value]
2081   --with-version-patch    Set version 'PATCH' field (fourth number) [not
2082                           specified]
2083   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2084   --with-build-jdk        path to JDK of same version as is being built[the
2085                           newly built JDK]
2086   --with-add-source-root  Deprecated. Option is kept for backwards
2087                           compatibility and is ignored
2088   --with-override-source-root
2089                           Deprecated. Option is kept for backwards
2090                           compatibility and is ignored
2091   --with-adds-and-overrides
2092                           Deprecated. Option is kept for backwards
2093                           compatibility and is ignored
2094   --with-override-langtools
2095                           Deprecated. Option is kept for backwards
2096                           compatibility and is ignored
2097   --with-override-corba   Deprecated. Option is kept for backwards
2098                           compatibility and is ignored
2099   --with-override-jaxp    Deprecated. Option is kept for backwards
2100                           compatibility and is ignored
2101   --with-override-jaxws   Deprecated. Option is kept for backwards
2102                           compatibility and is ignored
2103   --with-override-hotspot Deprecated. Option is kept for backwards
2104                           compatibility and is ignored
2105   --with-override-nashorn Deprecated. Option is kept for backwards
2106                           compatibility and is ignored
2107   --with-override-jdk     Deprecated. Option is kept for backwards
2108                           compatibility and is ignored
2109   --with-import_hotspot   Deprecated. Option is kept for backwards
2110                           compatibility and is ignored
2111   --with-import-modules   import a set of prebuilt modules either as a zip
2112                           file or an exploded directory
2113   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2114                           to show possible values [platform dependent]
2115   --with-extra-cflags     extra flags to be used when compiling jdk c-files
2116   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2117   --with-extra-ldflags    extra flags to be used when linking jdk
2118   --with-toolchain-version
2119                           the version of the toolchain to look for, use
2120                           '--help' to show possible values [platform
2121                           dependent]
2122   --with-build-devkit     Devkit to use for the build platform toolchain
2123   --with-jtreg            Regression Test Harness [probed]
2124   --with-native-debug-symbols
2125                           set the native debug symbol configuration (none,
2126                           internal, external, zipped) [varying]
2127   --with-stdc++lib=<static>,<dynamic>,<default>
2128                           force linking of the C++ runtime on Linux to either
2129                           static or dynamic, default is static with dynamic as
2130                           fallback
2131   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2132                           (Windows only) [probed]
2133   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2134                           (Windows only) [probed]
2135   --with-x                use the X Window System
2136   --with-cups             specify prefix directory for the cups package
2137                           (expecting the headers under PATH/include)
2138   --with-cups-include     specify directory for the cups include files
2139   --with-freetype         specify prefix directory for the freetype package
2140                           (expecting the libraries under PATH/lib and the
2141                           headers under PATH/include)
2142   --with-freetype-include specify directory for the freetype include files
2143   --with-freetype-lib     specify directory for the freetype library
2144   --with-freetype-src     specify directory with freetype sources to
2145                           automatically build the library (experimental,
2146                           Windows-only)
2147   --with-alsa             specify prefix directory for the alsa package
2148                           (expecting the libraries under PATH/lib and the
2149                           headers under PATH/include)
2150   --with-alsa-include     specify directory for the alsa include files
2151   --with-alsa-lib         specify directory for the alsa library
2152   --with-libffi           specify prefix directory for the libffi package
2153                           (expecting the libraries under PATH/lib and the
2154                           headers under PATH/include)
2155   --with-libffi-include   specify directory for the libffi include files
2156   --with-libffi-lib       specify directory for the libffi library
2157   --with-libjpeg          use libjpeg from build system or OpenJDK source
2158                           (system, bundled) [bundled]
2159   --with-giflib           use giflib from build system or OpenJDK source
2160                           (system, bundled) [bundled]
2161   --with-libpng           use libpng from build system or OpenJDK source
2162                           (system, bundled) [bundled]
2163   --with-zlib             use zlib from build system or OpenJDK source
2164                           (system, bundled) [bundled]
2165   --with-lcms             use lcms2 from build system or OpenJDK source
2166                           (system, bundled) [bundled]
2167   --with-dxsdk            Deprecated. Option is kept for backwards
2168                           compatibility and is ignored
2169   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2170                           compatibility and is ignored
2171   --with-dxsdk-include    Deprecated. Option is kept for backwards
2172                           compatibility and is ignored
2173   --with-libelf           specify prefix directory for the libelf package
2174                           (expecting the libraries under PATH/lib and the
2175                           headers under PATH/include)
2176   --with-libelf-include   specify directory for the libelf include files
2177   --with-libelf-lib       specify directory for the libelf library
2178   --with-jvm-features     additional JVM features to enable (separated by
2179                           comma), use '--help' to show possible values [none]
2180   --with-jvm-interpreter  Deprecated. Option is kept for backwards
2181                           compatibility and is ignored
2182   --with-num-cores        number of cores in the build system, e.g.
2183                           --with-num-cores=8 [probed]
2184   --with-memory-size      memory (in MB) available in the build system, e.g.
2185                           --with-memory-size=1024 [probed]
2186   --with-jobs             number of parallel jobs to let make run [calculated
2187                           based on cores and memory]
2188   --with-test-jobs        number of parallel tests jobs to run [based on build
2189                           jobs]
2190   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2191                           invocations of boot JDK, overriding the default
2192                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2193                           -enableassertions"
2194   --with-sjavac-server-java
2195                           use this java binary for running the sjavac
2196                           background server [Boot JDK java]
2197   --with-ccache-dir       where to store ccache files [~/.ccache]
2198 
2199 Some influential environment variables:
2200   BASENAME    Override default value for BASENAME
2201   BASH        Override default value for BASH
2202   CAT         Override default value for CAT
2203   CHMOD       Override default value for CHMOD
2204   CMP         Override default value for CMP
2205   COMM        Override default value for COMM
2206   CP          Override default value for CP
2207   CUT         Override default value for CUT
2208   DATE        Override default value for DATE
2209   DIFF        Override default value for DIFF
2210   DIRNAME     Override default value for DIRNAME
2211   ECHO        Override default value for ECHO
2212   EXPR        Override default value for EXPR
2213   FILE        Override default value for FILE
2214   FIND        Override default value for FIND
2215   HEAD        Override default value for HEAD
2216   GUNZIP      Override default value for GUNZIP
2217   GZIP        Override default value for GZIP
2218   LN          Override default value for LN
2219   LS          Override default value for LS
2220   MKDIR       Override default value for MKDIR
2221   MKTEMP      Override default value for MKTEMP
2222   MV          Override default value for MV
2223   NAWK        Override default value for NAWK
2224   PRINTF      Override default value for PRINTF
2225   RM          Override default value for RM
2226   RMDIR       Override default value for RMDIR
2227   SH          Override default value for SH
2228   SORT        Override default value for SORT
2229   TAIL        Override default value for TAIL
2230   TAR         Override default value for TAR
2231   TEE         Override default value for TEE
2232   TOUCH       Override default value for TOUCH
2233   TR          Override default value for TR
2234   UNAME       Override default value for UNAME
2235   UNIQ        Override default value for UNIQ
2236   WC          Override default value for WC
2237   WHICH       Override default value for WHICH
2238   XARGS       Override default value for XARGS
2239   AWK         Override default value for AWK
2240   GREP        Override default value for GREP
2241   EGREP       Override default value for EGREP
2242   FGREP       Override default value for FGREP
2243   SED         Override default value for SED
2244   CYGPATH     Override default value for CYGPATH
2245   READLINK    Override default value for READLINK
2246   DF          Override default value for DF
2247   CPIO        Override default value for CPIO
2248   NICE        Override default value for NICE
2249   MAKE        Override default value for MAKE
2250   UNZIP       Override default value for UNZIP
2251   ZIPEXE      Override default value for ZIPEXE
2252   LDD         Override default value for LDD
2253   OTOOL       Override default value for OTOOL
2254   READELF     Override default value for READELF
2255   HG          Override default value for HG
2256   STAT        Override default value for STAT
2257   TIME        Override default value for TIME
2258   DTRACE      Override default value for DTRACE
2259   PATCH       Override default value for PATCH
2260   DSYMUTIL    Override default value for DSYMUTIL
2261   XATTR       Override default value for XATTR
2262   CODESIGN    Override default value for CODESIGN
2263   SETFILE     Override default value for SETFILE
2264   PKG_CONFIG  path to pkg-config utility
2265   JAVA        Override default value for JAVA
2266   JAVAC       Override default value for JAVAC
2267   JAVAH       Override default value for JAVAH
2268   JAR         Override default value for JAR
2269   JARSIGNER   Override default value for JARSIGNER
2270   CC          C compiler command
2271   CFLAGS      C compiler flags
2272   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2273               nonstandard directory <lib dir>
2274   LIBS        libraries to pass to the linker, e.g. -l<library>
2275   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2276               you have headers in a nonstandard directory <include dir>
2277   CXX         C++ compiler command
2278   CXXFLAGS    C++ compiler flags
2279   CPP         C preprocessor
2280   CXXCPP      C++ preprocessor
2281   AS          Override default value for AS
2282   AR          Override default value for AR
2283   LIPO        Override default value for LIPO
2284   STRIP       Override default value for STRIP
2285   NM          Override default value for NM
2286   GNM         Override default value for GNM
2287   OBJCOPY     Override default value for OBJCOPY
2288   OBJDUMP     Override default value for OBJDUMP
2289   BUILD_CC    Override default value for BUILD_CC
2290   BUILD_CXX   Override default value for BUILD_CXX
2291   BUILD_NM    Override default value for BUILD_NM
2292   BUILD_AR    Override default value for BUILD_AR
2293   BUILD_OBJCOPY
2294               Override default value for BUILD_OBJCOPY
2295   BUILD_STRIP Override default value for BUILD_STRIP
2296   JTREGEXE    Override default value for JTREGEXE
2297   XMKMF       Path to xmkmf, Makefile generator for X Window System
2298   FREETYPE_CFLAGS
2299               C compiler flags for FREETYPE, overriding pkg-config
2300   FREETYPE_LIBS
2301               linker flags for FREETYPE, overriding pkg-config
2302   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2303   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2304   LIBFFI_CFLAGS
2305               C compiler flags for LIBFFI, overriding pkg-config
2306   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2307   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2308   PNG_LIBS    linker flags for PNG, overriding pkg-config
2309   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2310   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2311   ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2312   ELF_LIBS    linker flags for ELF, overriding pkg-config
2313   ICECC_CMD   Override default value for ICECC_CMD
2314   ICECC_CREATE_ENV
2315               Override default value for ICECC_CREATE_ENV
2316   ICECC_WRAPPER
2317               Override default value for ICECC_WRAPPER
2318   CCACHE      Override default value for CCACHE
2319 
2320 Use these variables to override the choices made by `configure' or to help
2321 it to find libraries and programs with nonstandard names/locations.
2322 
2323 Report bugs to <build-dev@openjdk.java.net>.
2324 OpenJDK home page: <http://openjdk.java.net>.
2325 _ACEOF
2326 ac_status=$?
2327 fi
2328 
2329 if test "$ac_init_help" = "recursive"; then
2330   # If there are subdirs, report their specific --help.
2331   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2332     test -d "$ac_dir" ||
2333       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2334       continue
2335     ac_builddir=.
2336 
2337 case "$ac_dir" in
2338 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2339 *)
2340   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2341   # A ".." for each directory in $ac_dir_suffix.
2342   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2343   case $ac_top_builddir_sub in
2344   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2345   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2346   esac ;;
2347 esac
2348 ac_abs_top_builddir=$ac_pwd
2349 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2350 # for backward compatibility:
2351 ac_top_builddir=$ac_top_build_prefix
2352 
2353 case $srcdir in
2354   .)  # We are building in place.
2355     ac_srcdir=.
2356     ac_top_srcdir=$ac_top_builddir_sub
2357     ac_abs_top_srcdir=$ac_pwd ;;
2358   [\\/]* | ?:[\\/]* )  # Absolute name.
2359     ac_srcdir=$srcdir$ac_dir_suffix;
2360     ac_top_srcdir=$srcdir
2361     ac_abs_top_srcdir=$srcdir ;;
2362   *) # Relative name.
2363     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2364     ac_top_srcdir=$ac_top_build_prefix$srcdir
2365     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2366 esac
2367 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2368 
2369     cd "$ac_dir" || { ac_status=$?; continue; }
2370     # Check for guested configure.
2371     if test -f "$ac_srcdir/configure.gnu"; then
2372       echo &&
2373       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2374     elif test -f "$ac_srcdir/configure"; then
2375       echo &&
2376       $SHELL "$ac_srcdir/configure" --help=recursive
2377     else
2378       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2379     fi || ac_status=$?
2380     cd "$ac_pwd" || { ac_status=$?; break; }
2381   done
2382 fi
2383 
2384 test -n "$ac_init_help" && exit $ac_status
2385 if $ac_init_version; then
2386   cat <<\_ACEOF
2387 OpenJDK configure jdk9
2388 generated by GNU Autoconf 2.69
2389 
2390 Copyright (C) 2012 Free Software Foundation, Inc.
2391 This configure script is free software; the Free Software Foundation
2392 gives unlimited permission to copy, distribute and modify it.
2393 _ACEOF
2394   exit
2395 fi
2396 
2397 ## ------------------------ ##
2398 ## Autoconf initialization. ##
2399 ## ------------------------ ##
2400 
2401 # ac_fn_c_try_compile LINENO
2402 # --------------------------
2403 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2404 ac_fn_c_try_compile ()
2405 {
2406   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2407   rm -f conftest.$ac_objext
2408   if { { ac_try="$ac_compile"
2409 case "(($ac_try" in
2410   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2411   *) ac_try_echo=$ac_try;;
2412 esac
2413 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2414 $as_echo "$ac_try_echo"; } >&5
2415   (eval "$ac_compile") 2>conftest.err
2416   ac_status=$?
2417   if test -s conftest.err; then
2418     grep -v '^ *+' conftest.err >conftest.er1
2419     cat conftest.er1 >&5
2420     mv -f conftest.er1 conftest.err
2421   fi
2422   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2423   test $ac_status = 0; } && {
2424          test -z "$ac_c_werror_flag" ||
2425          test ! -s conftest.err
2426        } && test -s conftest.$ac_objext; then :
2427   ac_retval=0
2428 else
2429   $as_echo "$as_me: failed program was:" >&5
2430 sed 's/^/| /' conftest.$ac_ext >&5
2431 
2432         ac_retval=1
2433 fi
2434   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2435   as_fn_set_status $ac_retval
2436 
2437 } # ac_fn_c_try_compile
2438 
2439 # ac_fn_cxx_try_compile LINENO
2440 # ----------------------------
2441 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2442 ac_fn_cxx_try_compile ()
2443 {
2444   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2445   rm -f conftest.$ac_objext
2446   if { { ac_try="$ac_compile"
2447 case "(($ac_try" in
2448   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2449   *) ac_try_echo=$ac_try;;
2450 esac
2451 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2452 $as_echo "$ac_try_echo"; } >&5
2453   (eval "$ac_compile") 2>conftest.err
2454   ac_status=$?
2455   if test -s conftest.err; then
2456     grep -v '^ *+' conftest.err >conftest.er1
2457     cat conftest.er1 >&5
2458     mv -f conftest.er1 conftest.err
2459   fi
2460   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2461   test $ac_status = 0; } && {
2462          test -z "$ac_cxx_werror_flag" ||
2463          test ! -s conftest.err
2464        } && test -s conftest.$ac_objext; then :
2465   ac_retval=0
2466 else
2467   $as_echo "$as_me: failed program was:" >&5
2468 sed 's/^/| /' conftest.$ac_ext >&5
2469 
2470         ac_retval=1
2471 fi
2472   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2473   as_fn_set_status $ac_retval
2474 
2475 } # ac_fn_cxx_try_compile
2476 
2477 # ac_fn_c_try_cpp LINENO
2478 # ----------------------
2479 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2480 ac_fn_c_try_cpp ()
2481 {
2482   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2483   if { { ac_try="$ac_cpp conftest.$ac_ext"
2484 case "(($ac_try" in
2485   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2486   *) ac_try_echo=$ac_try;;
2487 esac
2488 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2489 $as_echo "$ac_try_echo"; } >&5
2490   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2491   ac_status=$?
2492   if test -s conftest.err; then
2493     grep -v '^ *+' conftest.err >conftest.er1
2494     cat conftest.er1 >&5
2495     mv -f conftest.er1 conftest.err
2496   fi
2497   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2498   test $ac_status = 0; } > conftest.i && {
2499          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2500          test ! -s conftest.err
2501        }; then :
2502   ac_retval=0
2503 else
2504   $as_echo "$as_me: failed program was:" >&5
2505 sed 's/^/| /' conftest.$ac_ext >&5
2506 
2507     ac_retval=1
2508 fi
2509   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2510   as_fn_set_status $ac_retval
2511 
2512 } # ac_fn_c_try_cpp
2513 
2514 # ac_fn_cxx_try_cpp LINENO
2515 # ------------------------
2516 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2517 ac_fn_cxx_try_cpp ()
2518 {
2519   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2520   if { { ac_try="$ac_cpp conftest.$ac_ext"
2521 case "(($ac_try" in
2522   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2523   *) ac_try_echo=$ac_try;;
2524 esac
2525 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2526 $as_echo "$ac_try_echo"; } >&5
2527   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2528   ac_status=$?
2529   if test -s conftest.err; then
2530     grep -v '^ *+' conftest.err >conftest.er1
2531     cat conftest.er1 >&5
2532     mv -f conftest.er1 conftest.err
2533   fi
2534   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2535   test $ac_status = 0; } > conftest.i && {
2536          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2537          test ! -s conftest.err
2538        }; then :
2539   ac_retval=0
2540 else
2541   $as_echo "$as_me: failed program was:" >&5
2542 sed 's/^/| /' conftest.$ac_ext >&5
2543 
2544     ac_retval=1
2545 fi
2546   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2547   as_fn_set_status $ac_retval
2548 
2549 } # ac_fn_cxx_try_cpp
2550 
2551 # ac_fn_c_try_link LINENO
2552 # -----------------------
2553 # Try to link conftest.$ac_ext, and return whether this succeeded.
2554 ac_fn_c_try_link ()
2555 {
2556   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2557   rm -f conftest.$ac_objext conftest$ac_exeext
2558   if { { ac_try="$ac_link"
2559 case "(($ac_try" in
2560   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2561   *) ac_try_echo=$ac_try;;
2562 esac
2563 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2564 $as_echo "$ac_try_echo"; } >&5
2565   (eval "$ac_link") 2>conftest.err
2566   ac_status=$?
2567   if test -s conftest.err; then
2568     grep -v '^ *+' conftest.err >conftest.er1
2569     cat conftest.er1 >&5
2570     mv -f conftest.er1 conftest.err
2571   fi
2572   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2573   test $ac_status = 0; } && {
2574          test -z "$ac_c_werror_flag" ||
2575          test ! -s conftest.err
2576        } && test -s conftest$ac_exeext && {
2577          test "$cross_compiling" = yes ||
2578          test -x conftest$ac_exeext
2579        }; then :
2580   ac_retval=0
2581 else
2582   $as_echo "$as_me: failed program was:" >&5
2583 sed 's/^/| /' conftest.$ac_ext >&5
2584 
2585         ac_retval=1
2586 fi
2587   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2588   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2589   # interfere with the next link command; also delete a directory that is
2590   # left behind by Apple's compiler.  We do this before executing the actions.
2591   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2592   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2593   as_fn_set_status $ac_retval
2594 
2595 } # ac_fn_c_try_link
2596 
2597 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2598 # ---------------------------------------------------------
2599 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2600 # the include files in INCLUDES and setting the cache variable VAR
2601 # accordingly.
2602 ac_fn_cxx_check_header_mongrel ()
2603 {
2604   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2605   if eval \${$3+:} false; then :
2606   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2607 $as_echo_n "checking for $2... " >&6; }
2608 if eval \${$3+:} false; then :
2609   $as_echo_n "(cached) " >&6
2610 fi
2611 eval ac_res=\$$3
2612                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2613 $as_echo "$ac_res" >&6; }
2614 else
2615   # Is the header compilable?
2616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2617 $as_echo_n "checking $2 usability... " >&6; }
2618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2619 /* end confdefs.h.  */
2620 $4
2621 #include <$2>
2622 _ACEOF
2623 if ac_fn_cxx_try_compile "$LINENO"; then :
2624   ac_header_compiler=yes
2625 else
2626   ac_header_compiler=no
2627 fi
2628 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2630 $as_echo "$ac_header_compiler" >&6; }
2631 
2632 # Is the header present?
2633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2634 $as_echo_n "checking $2 presence... " >&6; }
2635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2636 /* end confdefs.h.  */
2637 #include <$2>
2638 _ACEOF
2639 if ac_fn_cxx_try_cpp "$LINENO"; then :
2640   ac_header_preproc=yes
2641 else
2642   ac_header_preproc=no
2643 fi
2644 rm -f conftest.err conftest.i conftest.$ac_ext
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2646 $as_echo "$ac_header_preproc" >&6; }
2647 
2648 # So?  What about this header?
2649 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2650   yes:no: )
2651     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2652 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2653     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2654 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2655     ;;
2656   no:yes:* )
2657     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2658 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2659     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2660 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2661     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2662 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2663     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2664 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2665     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2666 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2667 ( $as_echo "## ----------------------------------------- ##
2668 ## Report this to build-dev@openjdk.java.net ##
2669 ## ----------------------------------------- ##"
2670      ) | sed "s/^/$as_me: WARNING:     /" >&2
2671     ;;
2672 esac
2673   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2674 $as_echo_n "checking for $2... " >&6; }
2675 if eval \${$3+:} false; then :
2676   $as_echo_n "(cached) " >&6
2677 else
2678   eval "$3=\$ac_header_compiler"
2679 fi
2680 eval ac_res=\$$3
2681                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2682 $as_echo "$ac_res" >&6; }
2683 fi
2684   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2685 
2686 } # ac_fn_cxx_check_header_mongrel
2687 
2688 # ac_fn_cxx_try_run LINENO
2689 # ------------------------
2690 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2691 # that executables *can* be run.
2692 ac_fn_cxx_try_run ()
2693 {
2694   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2695   if { { ac_try="$ac_link"
2696 case "(($ac_try" in
2697   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2698   *) ac_try_echo=$ac_try;;
2699 esac
2700 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2701 $as_echo "$ac_try_echo"; } >&5
2702   (eval "$ac_link") 2>&5
2703   ac_status=$?
2704   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2705   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2706   { { case "(($ac_try" in
2707   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2708   *) ac_try_echo=$ac_try;;
2709 esac
2710 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2711 $as_echo "$ac_try_echo"; } >&5
2712   (eval "$ac_try") 2>&5
2713   ac_status=$?
2714   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2715   test $ac_status = 0; }; }; then :
2716   ac_retval=0
2717 else
2718   $as_echo "$as_me: program exited with status $ac_status" >&5
2719        $as_echo "$as_me: failed program was:" >&5
2720 sed 's/^/| /' conftest.$ac_ext >&5
2721 
2722        ac_retval=$ac_status
2723 fi
2724   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2725   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2726   as_fn_set_status $ac_retval
2727 
2728 } # ac_fn_cxx_try_run
2729 
2730 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2731 # ---------------------------------------------------------
2732 # Tests whether HEADER exists and can be compiled using the include files in
2733 # INCLUDES, setting the cache variable VAR accordingly.
2734 ac_fn_cxx_check_header_compile ()
2735 {
2736   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2737   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2738 $as_echo_n "checking for $2... " >&6; }
2739 if eval \${$3+:} false; then :
2740   $as_echo_n "(cached) " >&6
2741 else
2742   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2743 /* end confdefs.h.  */
2744 $4
2745 #include <$2>
2746 _ACEOF
2747 if ac_fn_cxx_try_compile "$LINENO"; then :
2748   eval "$3=yes"
2749 else
2750   eval "$3=no"
2751 fi
2752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2753 fi
2754 eval ac_res=\$$3
2755                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2756 $as_echo "$ac_res" >&6; }
2757   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2758 
2759 } # ac_fn_cxx_check_header_compile
2760 
2761 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2762 # ----------------------------------------------
2763 # Tries to find the compile-time value of EXPR in a program that includes
2764 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2765 # computed
2766 ac_fn_cxx_compute_int ()
2767 {
2768   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2769   if test "$cross_compiling" = yes; then
2770     # Depending upon the size, compute the lo and hi bounds.
2771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2772 /* end confdefs.h.  */
2773 $4
2774 int
2775 main ()
2776 {
2777 static int test_array [1 - 2 * !(($2) >= 0)];
2778 test_array [0] = 0;
2779 return test_array [0];
2780 
2781   ;
2782   return 0;
2783 }
2784 _ACEOF
2785 if ac_fn_cxx_try_compile "$LINENO"; then :
2786   ac_lo=0 ac_mid=0
2787   while :; do
2788     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2789 /* end confdefs.h.  */
2790 $4
2791 int
2792 main ()
2793 {
2794 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2795 test_array [0] = 0;
2796 return test_array [0];
2797 
2798   ;
2799   return 0;
2800 }
2801 _ACEOF
2802 if ac_fn_cxx_try_compile "$LINENO"; then :
2803   ac_hi=$ac_mid; break
2804 else
2805   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2806                         if test $ac_lo -le $ac_mid; then
2807                           ac_lo= ac_hi=
2808                           break
2809                         fi
2810                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2811 fi
2812 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2813   done
2814 else
2815   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2816 /* end confdefs.h.  */
2817 $4
2818 int
2819 main ()
2820 {
2821 static int test_array [1 - 2 * !(($2) < 0)];
2822 test_array [0] = 0;
2823 return test_array [0];
2824 
2825   ;
2826   return 0;
2827 }
2828 _ACEOF
2829 if ac_fn_cxx_try_compile "$LINENO"; then :
2830   ac_hi=-1 ac_mid=-1
2831   while :; do
2832     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2833 /* end confdefs.h.  */
2834 $4
2835 int
2836 main ()
2837 {
2838 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2839 test_array [0] = 0;
2840 return test_array [0];
2841 
2842   ;
2843   return 0;
2844 }
2845 _ACEOF
2846 if ac_fn_cxx_try_compile "$LINENO"; then :
2847   ac_lo=$ac_mid; break
2848 else
2849   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2850                         if test $ac_mid -le $ac_hi; then
2851                           ac_lo= ac_hi=
2852                           break
2853                         fi
2854                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2855 fi
2856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2857   done
2858 else
2859   ac_lo= ac_hi=
2860 fi
2861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2862 fi
2863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2864 # Binary search between lo and hi bounds.
2865 while test "x$ac_lo" != "x$ac_hi"; do
2866   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2867   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2868 /* end confdefs.h.  */
2869 $4
2870 int
2871 main ()
2872 {
2873 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2874 test_array [0] = 0;
2875 return test_array [0];
2876 
2877   ;
2878   return 0;
2879 }
2880 _ACEOF
2881 if ac_fn_cxx_try_compile "$LINENO"; then :
2882   ac_hi=$ac_mid
2883 else
2884   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2885 fi
2886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2887 done
2888 case $ac_lo in #((
2889 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2890 '') ac_retval=1 ;;
2891 esac
2892   else
2893     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2894 /* end confdefs.h.  */
2895 $4
2896 static long int longval () { return $2; }
2897 static unsigned long int ulongval () { return $2; }
2898 #include <stdio.h>
2899 #include <stdlib.h>
2900 int
2901 main ()
2902 {
2903 
2904   FILE *f = fopen ("conftest.val", "w");
2905   if (! f)
2906     return 1;
2907   if (($2) < 0)
2908     {
2909       long int i = longval ();
2910       if (i != ($2))
2911         return 1;
2912       fprintf (f, "%ld", i);
2913     }
2914   else
2915     {
2916       unsigned long int i = ulongval ();
2917       if (i != ($2))
2918         return 1;
2919       fprintf (f, "%lu", i);
2920     }
2921   /* Do not output a trailing newline, as this causes \r\n confusion
2922      on some platforms.  */
2923   return ferror (f) || fclose (f) != 0;
2924 
2925   ;
2926   return 0;
2927 }
2928 _ACEOF
2929 if ac_fn_cxx_try_run "$LINENO"; then :
2930   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2931 else
2932   ac_retval=1
2933 fi
2934 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2935   conftest.$ac_objext conftest.beam conftest.$ac_ext
2936 rm -f conftest.val
2937 
2938   fi
2939   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2940   as_fn_set_status $ac_retval
2941 
2942 } # ac_fn_cxx_compute_int
2943 
2944 # ac_fn_cxx_try_link LINENO
2945 # -------------------------
2946 # Try to link conftest.$ac_ext, and return whether this succeeded.
2947 ac_fn_cxx_try_link ()
2948 {
2949   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2950   rm -f conftest.$ac_objext conftest$ac_exeext
2951   if { { ac_try="$ac_link"
2952 case "(($ac_try" in
2953   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2954   *) ac_try_echo=$ac_try;;
2955 esac
2956 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2957 $as_echo "$ac_try_echo"; } >&5
2958   (eval "$ac_link") 2>conftest.err
2959   ac_status=$?
2960   if test -s conftest.err; then
2961     grep -v '^ *+' conftest.err >conftest.er1
2962     cat conftest.er1 >&5
2963     mv -f conftest.er1 conftest.err
2964   fi
2965   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2966   test $ac_status = 0; } && {
2967          test -z "$ac_cxx_werror_flag" ||
2968          test ! -s conftest.err
2969        } && test -s conftest$ac_exeext && {
2970          test "$cross_compiling" = yes ||
2971          test -x conftest$ac_exeext
2972        }; then :
2973   ac_retval=0
2974 else
2975   $as_echo "$as_me: failed program was:" >&5
2976 sed 's/^/| /' conftest.$ac_ext >&5
2977 
2978         ac_retval=1
2979 fi
2980   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2981   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2982   # interfere with the next link command; also delete a directory that is
2983   # left behind by Apple's compiler.  We do this before executing the actions.
2984   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2985   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2986   as_fn_set_status $ac_retval
2987 
2988 } # ac_fn_cxx_try_link
2989 
2990 # ac_fn_cxx_check_func LINENO FUNC VAR
2991 # ------------------------------------
2992 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2993 ac_fn_cxx_check_func ()
2994 {
2995   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2996   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2997 $as_echo_n "checking for $2... " >&6; }
2998 if eval \${$3+:} false; then :
2999   $as_echo_n "(cached) " >&6
3000 else
3001   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3002 /* end confdefs.h.  */
3003 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3004    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3005 #define $2 innocuous_$2
3006 
3007 /* System header to define __stub macros and hopefully few prototypes,
3008     which can conflict with char $2 (); below.
3009     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3010     <limits.h> exists even on freestanding compilers.  */
3011 
3012 #ifdef __STDC__
3013 # include <limits.h>
3014 #else
3015 # include <assert.h>
3016 #endif
3017 
3018 #undef $2
3019 
3020 /* Override any GCC internal prototype to avoid an error.
3021    Use char because int might match the return type of a GCC
3022    builtin and then its argument prototype would still apply.  */
3023 #ifdef __cplusplus
3024 extern "C"
3025 #endif
3026 char $2 ();
3027 /* The GNU C library defines this for functions which it implements
3028     to always fail with ENOSYS.  Some functions are actually named
3029     something starting with __ and the normal name is an alias.  */
3030 #if defined __stub_$2 || defined __stub___$2
3031 choke me
3032 #endif
3033 
3034 int
3035 main ()
3036 {
3037 return $2 ();
3038   ;
3039   return 0;
3040 }
3041 _ACEOF
3042 if ac_fn_cxx_try_link "$LINENO"; then :
3043   eval "$3=yes"
3044 else
3045   eval "$3=no"
3046 fi
3047 rm -f core conftest.err conftest.$ac_objext \
3048     conftest$ac_exeext conftest.$ac_ext
3049 fi
3050 eval ac_res=\$$3
3051                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3052 $as_echo "$ac_res" >&6; }
3053   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3054 
3055 } # ac_fn_cxx_check_func
3056 
3057 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3058 # -------------------------------------------------------
3059 # Tests whether HEADER exists and can be compiled using the include files in
3060 # INCLUDES, setting the cache variable VAR accordingly.
3061 ac_fn_c_check_header_compile ()
3062 {
3063   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3064   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3065 $as_echo_n "checking for $2... " >&6; }
3066 if eval \${$3+:} false; then :
3067   $as_echo_n "(cached) " >&6
3068 else
3069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3070 /* end confdefs.h.  */
3071 $4
3072 #include <$2>
3073 _ACEOF
3074 if ac_fn_c_try_compile "$LINENO"; then :
3075   eval "$3=yes"
3076 else
3077   eval "$3=no"
3078 fi
3079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3080 fi
3081 eval ac_res=\$$3
3082                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3083 $as_echo "$ac_res" >&6; }
3084   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3085 
3086 } # ac_fn_c_check_header_compile
3087 cat >config.log <<_ACEOF
3088 This file contains any messages produced by compilers while
3089 running configure, to aid debugging if configure makes a mistake.
3090 
3091 It was created by OpenJDK $as_me jdk9, which was
3092 generated by GNU Autoconf 2.69.  Invocation command line was
3093 
3094   $ $0 $@
3095 
3096 _ACEOF
3097 exec 5>>config.log
3098 {
3099 cat <<_ASUNAME
3100 ## --------- ##
3101 ## Platform. ##
3102 ## --------- ##
3103 
3104 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3105 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3106 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3107 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3108 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3109 
3110 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3111 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3112 
3113 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3114 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3115 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3116 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3117 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3118 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3119 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3120 
3121 _ASUNAME
3122 
3123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3124 for as_dir in $PATH
3125 do
3126   IFS=$as_save_IFS
3127   test -z "$as_dir" && as_dir=.
3128     $as_echo "PATH: $as_dir"
3129   done
3130 IFS=$as_save_IFS
3131 
3132 } >&5
3133 
3134 cat >&5 <<_ACEOF
3135 
3136 
3137 ## ----------- ##
3138 ## Core tests. ##
3139 ## ----------- ##
3140 
3141 _ACEOF
3142 
3143 
3144 # Keep a trace of the command line.
3145 # Strip out --no-create and --no-recursion so they do not pile up.
3146 # Strip out --silent because we don't want to record it for future runs.
3147 # Also quote any args containing shell meta-characters.
3148 # Make two passes to allow for proper duplicate-argument suppression.
3149 ac_configure_args=
3150 ac_configure_args0=
3151 ac_configure_args1=
3152 ac_must_keep_next=false
3153 for ac_pass in 1 2
3154 do
3155   for ac_arg
3156   do
3157     case $ac_arg in
3158     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3159     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3160     | -silent | --silent | --silen | --sile | --sil)
3161       continue ;;
3162     *\'*)
3163       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3164     esac
3165     case $ac_pass in
3166     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3167     2)
3168       as_fn_append ac_configure_args1 " '$ac_arg'"
3169       if test $ac_must_keep_next = true; then
3170         ac_must_keep_next=false # Got value, back to normal.
3171       else
3172         case $ac_arg in
3173           *=* | --config-cache | -C | -disable-* | --disable-* \
3174           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3175           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3176           | -with-* | --with-* | -without-* | --without-* | --x)
3177             case "$ac_configure_args0 " in
3178               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3179             esac
3180             ;;
3181           -* ) ac_must_keep_next=true ;;
3182         esac
3183       fi
3184       as_fn_append ac_configure_args " '$ac_arg'"
3185       ;;
3186     esac
3187   done
3188 done
3189 { ac_configure_args0=; unset ac_configure_args0;}
3190 { ac_configure_args1=; unset ac_configure_args1;}
3191 
3192 # When interrupted or exit'd, cleanup temporary files, and complete
3193 # config.log.  We remove comments because anyway the quotes in there
3194 # would cause problems or look ugly.
3195 # WARNING: Use '\'' to represent an apostrophe within the trap.
3196 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3197 trap 'exit_status=$?
3198   # Save into config.log some information that might help in debugging.
3199   {
3200     echo
3201 
3202     $as_echo "## ---------------- ##
3203 ## Cache variables. ##
3204 ## ---------------- ##"
3205     echo
3206     # The following way of writing the cache mishandles newlines in values,
3207 (
3208   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3209     eval ac_val=\$$ac_var
3210     case $ac_val in #(
3211     *${as_nl}*)
3212       case $ac_var in #(
3213       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3214 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3215       esac
3216       case $ac_var in #(
3217       _ | IFS | as_nl) ;; #(
3218       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3219       *) { eval $ac_var=; unset $ac_var;} ;;
3220       esac ;;
3221     esac
3222   done
3223   (set) 2>&1 |
3224     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3225     *${as_nl}ac_space=\ *)
3226       sed -n \
3227         "s/'\''/'\''\\\\'\'''\''/g;
3228           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3229       ;; #(
3230     *)
3231       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3232       ;;
3233     esac |
3234     sort
3235 )
3236     echo
3237 
3238     $as_echo "## ----------------- ##
3239 ## Output variables. ##
3240 ## ----------------- ##"
3241     echo
3242     for ac_var in $ac_subst_vars
3243     do
3244       eval ac_val=\$$ac_var
3245       case $ac_val in
3246       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3247       esac
3248       $as_echo "$ac_var='\''$ac_val'\''"
3249     done | sort
3250     echo
3251 
3252     if test -n "$ac_subst_files"; then
3253       $as_echo "## ------------------- ##
3254 ## File substitutions. ##
3255 ## ------------------- ##"
3256       echo
3257       for ac_var in $ac_subst_files
3258       do
3259         eval ac_val=\$$ac_var
3260         case $ac_val in
3261         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3262         esac
3263         $as_echo "$ac_var='\''$ac_val'\''"
3264       done | sort
3265       echo
3266     fi
3267 
3268     if test -s confdefs.h; then
3269       $as_echo "## ----------- ##
3270 ## confdefs.h. ##
3271 ## ----------- ##"
3272       echo
3273       cat confdefs.h
3274       echo
3275     fi
3276     test "$ac_signal" != 0 &&
3277       $as_echo "$as_me: caught signal $ac_signal"
3278     $as_echo "$as_me: exit $exit_status"
3279   } >&5
3280   rm -f core *.core core.conftest.* &&
3281     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3282     exit $exit_status
3283 ' 0
3284 for ac_signal in 1 2 13 15; do
3285   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3286 done
3287 ac_signal=0
3288 
3289 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3290 rm -f -r conftest* confdefs.h
3291 
3292 $as_echo "/* confdefs.h */" > confdefs.h
3293 
3294 # Predefined preprocessor variables.
3295 
3296 cat >>confdefs.h <<_ACEOF
3297 #define PACKAGE_NAME "$PACKAGE_NAME"
3298 _ACEOF
3299 
3300 cat >>confdefs.h <<_ACEOF
3301 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3302 _ACEOF
3303 
3304 cat >>confdefs.h <<_ACEOF
3305 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3306 _ACEOF
3307 
3308 cat >>confdefs.h <<_ACEOF
3309 #define PACKAGE_STRING "$PACKAGE_STRING"
3310 _ACEOF
3311 
3312 cat >>confdefs.h <<_ACEOF
3313 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3314 _ACEOF
3315 
3316 cat >>confdefs.h <<_ACEOF
3317 #define PACKAGE_URL "$PACKAGE_URL"
3318 _ACEOF
3319 
3320 
3321 # Let the site file select an alternate cache file if it wants to.
3322 # Prefer an explicitly selected file to automatically selected ones.
3323 ac_site_file1=NONE
3324 ac_site_file2=NONE
3325 if test -n "$CONFIG_SITE"; then
3326   # We do not want a PATH search for config.site.
3327   case $CONFIG_SITE in #((
3328     -*)  ac_site_file1=./$CONFIG_SITE;;
3329     */*) ac_site_file1=$CONFIG_SITE;;
3330     *)   ac_site_file1=./$CONFIG_SITE;;
3331   esac
3332 elif test "x$prefix" != xNONE; then
3333   ac_site_file1=$prefix/share/config.site
3334   ac_site_file2=$prefix/etc/config.site
3335 else
3336   ac_site_file1=$ac_default_prefix/share/config.site
3337   ac_site_file2=$ac_default_prefix/etc/config.site
3338 fi
3339 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3340 do
3341   test "x$ac_site_file" = xNONE && continue
3342   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3343     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3344 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3345     sed 's/^/| /' "$ac_site_file" >&5
3346     . "$ac_site_file" \
3347       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3348 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3349 as_fn_error $? "failed to load site script $ac_site_file
3350 See \`config.log' for more details" "$LINENO" 5; }
3351   fi
3352 done
3353 
3354 if test -r "$cache_file"; then
3355   # Some versions of bash will fail to source /dev/null (special files
3356   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3357   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3358     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3359 $as_echo "$as_me: loading cache $cache_file" >&6;}
3360     case $cache_file in
3361       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3362       *)                      . "./$cache_file";;
3363     esac
3364   fi
3365 else
3366   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3367 $as_echo "$as_me: creating cache $cache_file" >&6;}
3368   >$cache_file
3369 fi
3370 
3371 # Check that the precious variables saved in the cache have kept the same
3372 # value.
3373 ac_cache_corrupted=false
3374 for ac_var in $ac_precious_vars; do
3375   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3376   eval ac_new_set=\$ac_env_${ac_var}_set
3377   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3378   eval ac_new_val=\$ac_env_${ac_var}_value
3379   case $ac_old_set,$ac_new_set in
3380     set,)
3381       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3382 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3383       ac_cache_corrupted=: ;;
3384     ,set)
3385       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3386 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3387       ac_cache_corrupted=: ;;
3388     ,);;
3389     *)
3390       if test "x$ac_old_val" != "x$ac_new_val"; then
3391         # differences in whitespace do not lead to failure.
3392         ac_old_val_w=`echo x $ac_old_val`
3393         ac_new_val_w=`echo x $ac_new_val`
3394         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3395           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3396 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3397           ac_cache_corrupted=:
3398         else
3399           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3400 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3401           eval $ac_var=\$ac_old_val
3402         fi
3403         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3404 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3405         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3406 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3407       fi;;
3408   esac
3409   # Pass precious variables to config.status.
3410   if test "$ac_new_set" = set; then
3411     case $ac_new_val in
3412     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3413     *) ac_arg=$ac_var=$ac_new_val ;;
3414     esac
3415     case " $ac_configure_args " in
3416       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3417       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3418     esac
3419   fi
3420 done
3421 if $ac_cache_corrupted; then
3422   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3423 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3424   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3425 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3426   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3427 fi
3428 ## -------------------- ##
3429 ## Main body of script. ##
3430 ## -------------------- ##
3431 
3432 ac_ext=c
3433 ac_cpp='$CPP $CPPFLAGS'
3434 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3435 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3436 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3437 
3438 
3439 
3440 ac_aux_dir=
3441 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3442   if test -f "$ac_dir/install-sh"; then
3443     ac_aux_dir=$ac_dir
3444     ac_install_sh="$ac_aux_dir/install-sh -c"
3445     break
3446   elif test -f "$ac_dir/install.sh"; then
3447     ac_aux_dir=$ac_dir
3448     ac_install_sh="$ac_aux_dir/install.sh -c"
3449     break
3450   elif test -f "$ac_dir/shtool"; then
3451     ac_aux_dir=$ac_dir
3452     ac_install_sh="$ac_aux_dir/shtool install -c"
3453     break
3454   fi
3455 done
3456 if test -z "$ac_aux_dir"; then
3457   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
3458 fi
3459 
3460 # These three variables are undocumented and unsupported,
3461 # and are intended to be withdrawn in a future Autoconf release.
3462 # They can cause serious problems if a builder's source tree is in a directory
3463 # whose full name contains unusual characters.
3464 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3465 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3466 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3467 
3468 
3469 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3470 
3471 #
3472 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3473 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3474 #
3475 # This code is free software; you can redistribute it and/or modify it
3476 # under the terms of the GNU General Public License version 2 only, as
3477 # published by the Free Software Foundation.  Oracle designates this
3478 # particular file as subject to the "Classpath" exception as provided
3479 # by Oracle in the LICENSE file that accompanied this code.
3480 #
3481 # This code is distributed in the hope that it will be useful, but WITHOUT
3482 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3483 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3484 # version 2 for more details (a copy is included in the LICENSE file that
3485 # accompanied this code).
3486 #
3487 # You should have received a copy of the GNU General Public License version
3488 # 2 along with this work; if not, write to the Free Software Foundation,
3489 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3490 #
3491 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3492 # or visit www.oracle.com if you need additional information or have any
3493 # questions.
3494 #
3495 
3496 #
3497 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3498 #
3499 # This program is free software; you can redistribute it and/or modify
3500 # it under the terms of the GNU General Public License as published by
3501 # the Free Software Foundation; either version 2 of the License, or
3502 # (at your option) any later version.
3503 #
3504 # This program is distributed in the hope that it will be useful, but
3505 # WITHOUT ANY WARRANTY; without even the implied warranty of
3506 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3507 # General Public License for more details.
3508 #
3509 # You should have received a copy of the GNU General Public License
3510 # along with this program; if not, write to the Free Software
3511 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3512 #
3513 # As a special exception to the GNU General Public License, if you
3514 # distribute this file as part of a program that contains a
3515 # configuration script generated by Autoconf, you may include it under
3516 # the same distribution terms that you use for the rest of that program.
3517 
3518 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3519 # ----------------------------------
3520 # PKG_PROG_PKG_CONFIG
3521 
3522 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3523 #
3524 # Check to see whether a particular set of modules exists.  Similar
3525 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3526 #
3527 #
3528 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3529 # this or PKG_CHECK_MODULES is called, or make sure to call
3530 # PKG_CHECK_EXISTS manually
3531 # --------------------------------------------------------------
3532 
3533 
3534 
3535 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3536 # ---------------------------------------------
3537 # _PKG_CONFIG
3538 
3539 # _PKG_SHORT_ERRORS_SUPPORTED
3540 # -----------------------------
3541 # _PKG_SHORT_ERRORS_SUPPORTED
3542 
3543 
3544 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3545 # [ACTION-IF-NOT-FOUND])
3546 #
3547 #
3548 # Note that if there is a possibility the first call to
3549 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3550 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3551 #
3552 #
3553 # --------------------------------------------------------------
3554 # PKG_CHECK_MODULES
3555 
3556 
3557 # Include these first...
3558 #
3559 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3560 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3561 #
3562 # This code is free software; you can redistribute it and/or modify it
3563 # under the terms of the GNU General Public License version 2 only, as
3564 # published by the Free Software Foundation.  Oracle designates this
3565 # particular file as subject to the "Classpath" exception as provided
3566 # by Oracle in the LICENSE file that accompanied this code.
3567 #
3568 # This code is distributed in the hope that it will be useful, but WITHOUT
3569 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3570 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3571 # version 2 for more details (a copy is included in the LICENSE file that
3572 # accompanied this code).
3573 #
3574 # You should have received a copy of the GNU General Public License version
3575 # 2 along with this work; if not, write to the Free Software Foundation,
3576 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3577 #
3578 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3579 # or visit www.oracle.com if you need additional information or have any
3580 # questions.
3581 #
3582 
3583 # Create a function/macro that takes a series of named arguments. The call is
3584 # similar to AC_DEFUN, but the setup of the function looks like this:
3585 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3586 # ... do something
3587 #   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3588 # ])
3589 # A star (*) in front of a named argument means that it is required and it's
3590 # presence will be verified. To pass e.g. the first value as a normal indexed
3591 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3592 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3593 # "ARG_FOO".
3594 #
3595 # The generated function can be called like this:
3596 # MYFUNC(FOO: [foo-val],
3597 #     BAR: [
3598 #         $ECHO hello world
3599 #     ])
3600 # Note that the argument value must start on the same line as the argument name.
3601 #
3602 # Argument 1: Name of the function to define
3603 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3604 # Argument 3: Argument array to treat as named, typically $@
3605 # Argument 4: The main function body
3606 
3607 
3608 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3609 # If so, then append $1 to $2 \
3610 # Also set JVM_ARG_OK to true/false depending on outcome.
3611 
3612 
3613 # Appends a string to a path variable, only adding the : when needed.
3614 
3615 
3616 # Prepends a string to a path variable, only adding the : when needed.
3617 
3618 
3619 # This will make sure the given variable points to a full and proper
3620 # path. This means:
3621 # 1) There will be no spaces in the path. On unix platforms,
3622 #    spaces in the path will result in an error. On Windows,
3623 #    the path will be rewritten using short-style to be space-free.
3624 # 2) The path will be absolute, and it will be in unix-style (on
3625 #     cygwin).
3626 # $1: The name of the variable to fix
3627 
3628 
3629 # This will make sure the given variable points to a executable
3630 # with a full and proper path. This means:
3631 # 1) There will be no spaces in the path. On unix platforms,
3632 #    spaces in the path will result in an error. On Windows,
3633 #    the path will be rewritten using short-style to be space-free.
3634 # 2) The path will be absolute, and it will be in unix-style (on
3635 #     cygwin).
3636 # Any arguments given to the executable is preserved.
3637 # If the input variable does not have a directory specification, then
3638 # it need to be in the PATH.
3639 # $1: The name of the variable to fix
3640 
3641 
3642 
3643 
3644 # Register a --with argument but mark it as deprecated
3645 # $1: The name of the with argument to deprecate, not including --with-
3646 
3647 
3648 # Register a --enable argument but mark it as deprecated
3649 # $1: The name of the with argument to deprecate, not including --enable-
3650 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3651 # $3: Messages to user.
3652 
3653 
3654 
3655 
3656 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3657 # $1: variable to check
3658 
3659 
3660 # Check that there are no unprocessed overridden variables left.
3661 # If so, they are an incorrect argument and we will exit with an error.
3662 
3663 
3664 # Setup a tool for the given variable. If correctly specified by the user,
3665 # use that value, otherwise search for the tool using the supplied code snippet.
3666 # $1: variable to set
3667 # $2: code snippet to call to look for the tool
3668 # $3: code snippet to call if variable was used to find tool
3669 
3670 
3671 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3672 # $1: variable to set
3673 # $2: executable name (or list of names) to look for
3674 # $3: [path]
3675 
3676 
3677 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3678 # $1: variable to set
3679 # $2: executable name (or list of names) to look for
3680 
3681 
3682 # Like BASIC_PATH_PROGS but fails if no tool was found.
3683 # $1: variable to set
3684 # $2: executable name (or list of names) to look for
3685 # $3: [path]
3686 
3687 
3688 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3689 # $1: variable to set
3690 # $2: autoconf macro to call to look for the special tool
3691 
3692 
3693 # Setup the most fundamental tools that relies on not much else to set up,
3694 # but is used by much of the early bootstrap code.
3695 
3696 
3697 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3698 
3699 
3700 # Evaluates platform specific overrides for devkit variables.
3701 # $1: Name of variable
3702 
3703 
3704 
3705 
3706 
3707 
3708 #%%% Simple tools %%%
3709 
3710 # Check if we have found a usable version of make
3711 # $1: the path to a potential make binary (or empty)
3712 # $2: the description on how we found this
3713 
3714 
3715 
3716 
3717 # Goes looking for a usable version of GNU make.
3718 
3719 
3720 
3721 
3722 
3723 
3724 
3725 
3726 # Check if build directory is on local disk. If not possible to determine,
3727 # we prefer to claim it's local.
3728 # Argument 1: directory to test
3729 # Argument 2: what to do if it is on local disk
3730 # Argument 3: what to do otherwise (remote disk or failure)
3731 
3732 
3733 # Check that source files have basic read permissions set. This might
3734 # not be the case in cygwin in certain conditions.
3735 
3736 
3737 
3738 
3739 # Check for support for specific options in bash
3740 
3741 
3742 ################################################################################
3743 #
3744 # Default make target
3745 #
3746 
3747 
3748 # Code to run after AC_OUTPUT
3749 
3750 
3751 #
3752 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3753 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3754 #
3755 # This code is free software; you can redistribute it and/or modify it
3756 # under the terms of the GNU General Public License version 2 only, as
3757 # published by the Free Software Foundation.  Oracle designates this
3758 # particular file as subject to the "Classpath" exception as provided
3759 # by Oracle in the LICENSE file that accompanied this code.
3760 #
3761 # This code is distributed in the hope that it will be useful, but WITHOUT
3762 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3763 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3764 # version 2 for more details (a copy is included in the LICENSE file that
3765 # accompanied this code).
3766 #
3767 # You should have received a copy of the GNU General Public License version
3768 # 2 along with this work; if not, write to the Free Software Foundation,
3769 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3770 #
3771 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3772 # or visit www.oracle.com if you need additional information or have any
3773 # questions.
3774 #
3775 
3776 
3777 
3778 
3779 
3780 # Helper function which possibly converts a path using DOS-style short mode.
3781 # If so, the updated path is stored in $new_path.
3782 # $1: The path to check
3783 
3784 
3785 # Helper function which possibly converts a path using DOS-style short mode.
3786 # If so, the updated path is stored in $new_path.
3787 # $1: The path to check
3788 
3789 
3790 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3791 # and could probably be heavily simplified. However, all changes in this
3792 # area tend to need lot of testing in different scenarios, and in lack of
3793 # proper unit testing, cleaning this up has not been deemed worth the effort
3794 # at the moment.
3795 
3796 
3797 
3798 
3799 
3800 
3801 
3802 
3803 
3804 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3805 
3806 
3807 
3808 
3809 # ... then the rest
3810 #
3811 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3812 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3813 #
3814 # This code is free software; you can redistribute it and/or modify it
3815 # under the terms of the GNU General Public License version 2 only, as
3816 # published by the Free Software Foundation.  Oracle designates this
3817 # particular file as subject to the "Classpath" exception as provided
3818 # by Oracle in the LICENSE file that accompanied this code.
3819 #
3820 # This code is distributed in the hope that it will be useful, but WITHOUT
3821 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3822 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3823 # version 2 for more details (a copy is included in the LICENSE file that
3824 # accompanied this code).
3825 #
3826 # You should have received a copy of the GNU General Public License version
3827 # 2 along with this work; if not, write to the Free Software Foundation,
3828 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3829 #
3830 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3831 # or visit www.oracle.com if you need additional information or have any
3832 # questions.
3833 #
3834 
3835 ########################################################################
3836 # This file handles detection of the Boot JDK. The Boot JDK detection
3837 # process has been developed as a response to solve a complex real-world
3838 # problem. Initially, it was simple, but it has grown as platform after
3839 # platform, idiosyncracy after idiosyncracy has been supported.
3840 #
3841 # The basic idea is this:
3842 # 1) You need an acceptable *) JDK to use as a Boot JDK
3843 # 2) There are several ways to locate a JDK, that are mostly platform
3844 #    dependent **)
3845 # 3) You can have multiple JDKs installed
3846 # 4) If possible, configure should try to dig out an acceptable JDK
3847 #    automatically, without having to resort to command-line options
3848 #
3849 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3850 #     javac) and not a JRE, etc.
3851 #
3852 # **) On Windows we typically use a well-known path.
3853 #     On MacOSX we typically use the tool java_home.
3854 #     On Linux we typically find javac in the $PATH, and then follow a
3855 #     chain of symlinks that often ends up in a real JDK.
3856 #
3857 # This leads to the code where we check in different ways to locate a
3858 # JDK, and if one is found, check if it is acceptable. If not, we print
3859 # our reasons for rejecting it (useful when debugging non-working
3860 # configure situations) and continue checking the next one.
3861 ########################################################################
3862 
3863 # Execute the check given as argument, and verify the result
3864 # If the Boot JDK was previously found, do nothing
3865 # $1 A command line (typically autoconf macro) to execute
3866 
3867 
3868 # Test: Is bootjdk explicitly set by command line arguments?
3869 
3870 
3871 # Test: Is $JAVA_HOME set?
3872 
3873 
3874 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3875 
3876 
3877 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3878 # $1: Argument to the java_home binary (optional)
3879 
3880 
3881 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3882 
3883 
3884 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3885 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3886 # $1 = Path to directory containing jdk installations.
3887 # $2 = String to append to the found JDK directory to get the proper JDK home
3888 
3889 
3890 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3891 # environmental variable as base for where to look.
3892 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3893 
3894 
3895 # Test: Is there a JDK installed in default, well-known locations?
3896 
3897 
3898 # Check that a command-line tool in the Boot JDK is correct
3899 # $1 = name of variable to assign
3900 # $2 = name of binary
3901 
3902 
3903 ###############################################################################
3904 #
3905 # We need a Boot JDK to bootstrap the build.
3906 #
3907 
3908 
3909 
3910 
3911 
3912 # BUILD_JDK: the location of the latest JDK that can run
3913 #   on the host system and supports the target class file version
3914 #   generated in this JDK build.  This variable should only be
3915 #   used after the launchers are built.
3916 #
3917 
3918 # Execute the check given as argument, and verify the result.
3919 # If the JDK was previously found, do nothing.
3920 # $1 A command line (typically autoconf macro) to execute
3921 
3922 
3923 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3924 # is different than the host system doing the build (e.g. cross-compilation),
3925 # a special BUILD_JDK is built as part of the build process.  An external
3926 # prebuilt BUILD_JDK can also be supplied.
3927 
3928 
3929 #
3930 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3931 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3932 #
3933 # This code is free software; you can redistribute it and/or modify it
3934 # under the terms of the GNU General Public License version 2 only, as
3935 # published by the Free Software Foundation.  Oracle designates this
3936 # particular file as subject to the "Classpath" exception as provided
3937 # by Oracle in the LICENSE file that accompanied this code.
3938 #
3939 # This code is distributed in the hope that it will be useful, but WITHOUT
3940 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3941 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3942 # version 2 for more details (a copy is included in the LICENSE file that
3943 # accompanied this code).
3944 #
3945 # You should have received a copy of the GNU General Public License version
3946 # 2 along with this work; if not, write to the Free Software Foundation,
3947 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3948 #
3949 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3950 # or visit www.oracle.com if you need additional information or have any
3951 # questions.
3952 #
3953 
3954 
3955 
3956 
3957 
3958 
3959 
3960 
3961 
3962 
3963 
3964 
3965 
3966 
3967 
3968 
3969 
3970 ################################################################################
3971 #
3972 # Runs icecc-create-env once and prints the error if it fails
3973 #
3974 # $1: arguments to icecc-create-env
3975 # $2: log file
3976 #
3977 
3978 
3979 ################################################################################
3980 #
3981 # Optionally enable distributed compilation of native code using icecc/icecream
3982 #
3983 
3984 
3985 
3986 
3987 
3988 
3989 
3990 #
3991 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3992 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3993 #
3994 # This code is free software; you can redistribute it and/or modify it
3995 # under the terms of the GNU General Public License version 2 only, as
3996 # published by the Free Software Foundation.  Oracle designates this
3997 # particular file as subject to the "Classpath" exception as provided
3998 # by Oracle in the LICENSE file that accompanied this code.
3999 #
4000 # This code is distributed in the hope that it will be useful, but WITHOUT
4001 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4002 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4003 # version 2 for more details (a copy is included in the LICENSE file that
4004 # accompanied this code).
4005 #
4006 # You should have received a copy of the GNU General Public License version
4007 # 2 along with this work; if not, write to the Free Software Foundation,
4008 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4009 #
4010 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4011 # or visit www.oracle.com if you need additional information or have any
4012 # questions.
4013 #
4014 
4015 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4016 # corresponding configure arguments instead
4017 
4018 
4019 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4020 # that configure can use them while detecting compilers.
4021 # TOOLCHAIN_TYPE is available here.
4022 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
4023 
4024 
4025 
4026 
4027 
4028 
4029 # Documentation on common flags used for solstudio in HIGHEST.
4030 #
4031 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4032 #          done with care, there are some assumptions below that need to
4033 #          be understood about the use of pointers, and IEEE behavior.
4034 #
4035 # -fns: Use non-standard floating point mode (not IEEE 754)
4036 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4037 # -fsingle: Use single precision floating point with 'float'
4038 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
4039 #   (Source with excessing pointer casting and data access with mixed
4040 #    pointer types are not recommended)
4041 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4042 #   (If you expect perfect errno behavior, do not use this)
4043 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4044 # -xrestrict: Pointer parameters to functions do not overlap
4045 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4046 #    If you pass in multiple pointers to the same data, do not use this)
4047 # -xlibmil: Inline some library routines
4048 #   (If you expect perfect errno behavior, do not use this)
4049 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4050 #   (If you expect perfect errno behavior, do not use this)
4051 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4052 
4053     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4054     # Bug?
4055     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4056     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4057     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4058     #fi
4059 
4060 
4061 
4062 
4063 
4064 
4065 ################################################################################
4066 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4067 #      conditionals against.
4068 # $2 - Optional prefix for each variable defined.
4069 
4070 
4071 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4072 #                                  IF_FALSE: [RUN-IF-FALSE])
4073 # ------------------------------------------------------------
4074 # Check that the C compiler supports an argument
4075 
4076 
4077 
4078 
4079 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4080 #                                    IF_FALSE: [RUN-IF-FALSE])
4081 # ------------------------------------------------------------
4082 # Check that the C++ compiler supports an argument
4083 
4084 
4085 
4086 
4087 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4088 #                                IF_FALSE: [RUN-IF-FALSE])
4089 # ------------------------------------------------------------
4090 # Check that the C and C++ compilers support an argument
4091 
4092 
4093 
4094 
4095 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4096 #                                   IF_FALSE: [RUN-IF-FALSE])
4097 # ------------------------------------------------------------
4098 # Check that the linker support an argument
4099 
4100 
4101 
4102 
4103 
4104 
4105 # FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4106 # Arguments:
4107 # $1 - Optional prefix for each variable defined.
4108 
4109 
4110 #
4111 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4112 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4113 #
4114 # This code is free software; you can redistribute it and/or modify it
4115 # under the terms of the GNU General Public License version 2 only, as
4116 # published by the Free Software Foundation.  Oracle designates this
4117 # particular file as subject to the "Classpath" exception as provided
4118 # by Oracle in the LICENSE file that accompanied this code.
4119 #
4120 # This code is distributed in the hope that it will be useful, but WITHOUT
4121 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4122 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4123 # version 2 for more details (a copy is included in the LICENSE file that
4124 # accompanied this code).
4125 #
4126 # You should have received a copy of the GNU General Public License version
4127 # 2 along with this work; if not, write to the Free Software Foundation,
4128 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4129 #
4130 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4131 # or visit www.oracle.com if you need additional information or have any
4132 # questions.
4133 #
4134 
4135 
4136 
4137 
4138 
4139 cygwin_help() {
4140   case $1 in
4141     unzip)
4142       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4143       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4144       ;;
4145     zip)
4146       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4147       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4148       ;;
4149     make)
4150       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4151       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4152       ;;
4153     freetype)
4154       HELP_MSG="
4155 The freetype library can now be build during the configure process.
4156 Download the freetype sources and unpack them into an arbitrary directory:
4157 
4158 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4159 tar -xzf freetype-2.5.3.tar.gz
4160 
4161 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4162 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4163 builds or into '<freetype_src>/lib32' for 32-bit builds.
4164 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4165 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4166 
4167 Alternatively you can unpack the sources like this to use the default directory:
4168 
4169 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4170       ;;
4171   esac
4172 }
4173 
4174 msys_help() {
4175   PKGHANDLER_COMMAND=""
4176 }
4177 
4178 apt_help() {
4179   case $1 in
4180     reduced)
4181       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4182     devkit)
4183       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4184     openjdk)
4185       PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4186     alsa)
4187       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4188     cups)
4189       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4190     freetype)
4191       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4192     ffi)
4193       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4194     x11)
4195       PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4196     ccache)
4197       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4198     dtrace)
4199       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4200     elf)
4201       PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4202   esac
4203 }
4204 
4205 yum_help() {
4206   case $1 in
4207     devkit)
4208       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4209     openjdk)
4210       PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4211     alsa)
4212       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4213     cups)
4214       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4215     freetype)
4216       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4217     x11)
4218       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4219     ccache)
4220       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4221     elf)
4222       PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4223   esac
4224 }
4225 
4226 port_help() {
4227   PKGHANDLER_COMMAND=""
4228 }
4229 
4230 pkgutil_help() {
4231   PKGHANDLER_COMMAND=""
4232 }
4233 
4234 pkgadd_help() {
4235   PKGHANDLER_COMMAND=""
4236 }
4237 
4238 # This function will check if we're called from the "configure" wrapper while
4239 # printing --help. If so, we will print out additional information that can
4240 # only be extracted within the autoconf script, and then exit. This must be
4241 # called at the very beginning in configure.ac.
4242 
4243 
4244 
4245 
4246 
4247 
4248 #
4249 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4250 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4251 #
4252 # This code is free software; you can redistribute it and/or modify it
4253 # under the terms of the GNU General Public License version 2 only, as
4254 # published by the Free Software Foundation.  Oracle designates this
4255 # particular file as subject to the "Classpath" exception as provided
4256 # by Oracle in the LICENSE file that accompanied this code.
4257 #
4258 # This code is distributed in the hope that it will be useful, but WITHOUT
4259 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4260 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4261 # version 2 for more details (a copy is included in the LICENSE file that
4262 # accompanied this code).
4263 #
4264 # You should have received a copy of the GNU General Public License version
4265 # 2 along with this work; if not, write to the Free Software Foundation,
4266 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4267 #
4268 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4269 # or visit www.oracle.com if you need additional information or have any
4270 # questions.
4271 #
4272 
4273 # All valid JVM features, regardless of platform
4274 VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4275     graal fprof vm-structs jni-check services management all-gcs nmt cds static-build aot"
4276 
4277 # All valid JVM variants
4278 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4279 
4280 ###############################################################################
4281 # Check if the specified JVM variant should be built. To be used in shell if
4282 # constructs, like this:
4283 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4284 #
4285 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4286 
4287 # Definition kept in one line to allow inlining in if statements.
4288 # Additional [] needed to keep m4 from mangling shell constructs.
4289 
4290 
4291 ###############################################################################
4292 # Check if the specified JVM features are explicitly enabled. To be used in
4293 # shell if constructs, like this:
4294 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4295 #
4296 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4297 
4298 # Definition kept in one line to allow inlining in if statements.
4299 # Additional [] needed to keep m4 from mangling shell constructs.
4300 
4301 
4302 ###############################################################################
4303 # Check which variants of the JVM that we want to build. Available variants are:
4304 #   server: normal interpreter, and a tiered C1/C2 compiler
4305 #   client: normal interpreter, and C1 (no C2 compiler)
4306 #   minimal: reduced form of client with optional features stripped out
4307 #   core: normal interpreter only, no compiler
4308 #   zero: C++ based interpreter only, no compiler
4309 #   zeroshark: C++ based interpreter, and a llvm-based compiler
4310 #   custom: baseline JVM with no default features
4311 #
4312 
4313 
4314 ###############################################################################
4315 # Check if dtrace should be enabled and has all prerequisites present.
4316 #
4317 
4318 
4319 ################################################################################
4320 # Check if AOT should be enabled
4321 #
4322 
4323 
4324 ###############################################################################
4325 # Set up all JVM features for each JVM variant.
4326 #
4327 
4328 
4329 ###############################################################################
4330 # Validate JVM features once all setup is complete, including custom setup.
4331 #
4332 
4333 
4334 ################################################################################
4335 # Check if gtest should be built
4336 #
4337 
4338 
4339 #
4340 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4341 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4342 #
4343 # This code is free software; you can redistribute it and/or modify it
4344 # under the terms of the GNU General Public License version 2 only, as
4345 # published by the Free Software Foundation.  Oracle designates this
4346 # particular file as subject to the "Classpath" exception as provided
4347 # by Oracle in the LICENSE file that accompanied this code.
4348 #
4349 # This code is distributed in the hope that it will be useful, but WITHOUT
4350 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4351 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4352 # version 2 for more details (a copy is included in the LICENSE file that
4353 # accompanied this code).
4354 #
4355 # You should have received a copy of the GNU General Public License version
4356 # 2 along with this work; if not, write to the Free Software Foundation,
4357 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4358 #
4359 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4360 # or visit www.oracle.com if you need additional information or have any
4361 # questions.
4362 #
4363 
4364 ###############################################################################
4365 # Check which variant of the JDK that we want to build.
4366 # Currently we have:
4367 #    normal:   standard edition
4368 # but the custom make system may add other variants
4369 #
4370 # Effectively the JDK variant gives a name to a specific set of
4371 # modules to compile into the JDK.
4372 
4373 
4374 ###############################################################################
4375 # Set the debug level
4376 #    release: no debug information, all optimizations, no asserts.
4377 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4378 #    fastdebug: debug information (-g), all optimizations, all asserts
4379 #    slowdebug: debug information (-g), no optimizations, all asserts
4380 
4381 
4382 ###############################################################################
4383 #
4384 # Should we build only OpenJDK even if closed sources are present?
4385 #
4386 
4387 
4388 
4389 
4390 ###############################################################################
4391 #
4392 # Enable or disable the elliptic curve crypto implementation
4393 #
4394 
4395 
4396 
4397 
4398 ################################################################################
4399 #
4400 # Gcov coverage data for hotspot
4401 #
4402 
4403 
4404 ################################################################################
4405 #
4406 # Static build support.  When enabled will generate static
4407 # libraries instead of shared libraries for all JDK libs.
4408 #
4409 
4410 
4411 ################################################################################
4412 #
4413 # jlink options.
4414 # We always keep packaged modules in JDK image.
4415 #
4416 
4417 
4418 ################################################################################
4419 #
4420 # Check if building of the jtreg failure handler should be enabled.
4421 #
4422 
4423 
4424 ################################################################################
4425 #
4426 # Enable or disable generation of the classlist at build time
4427 #
4428 
4429 
4430 #
4431 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4432 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4433 #
4434 # This code is free software; you can redistribute it and/or modify it
4435 # under the terms of the GNU General Public License version 2 only, as
4436 # published by the Free Software Foundation.  Oracle designates this
4437 # particular file as subject to the "Classpath" exception as provided
4438 # by Oracle in the LICENSE file that accompanied this code.
4439 #
4440 # This code is distributed in the hope that it will be useful, but WITHOUT
4441 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4442 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4443 # version 2 for more details (a copy is included in the LICENSE file that
4444 # accompanied this code).
4445 #
4446 # You should have received a copy of the GNU General Public License version
4447 # 2 along with this work; if not, write to the Free Software Foundation,
4448 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4449 #
4450 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4451 # or visit www.oracle.com if you need additional information or have any
4452 # questions.
4453 #
4454 
4455 ###############################################################################
4456 #
4457 # Setup version numbers
4458 #
4459 
4460 # Verify that a given string represents a valid version number, and assign it
4461 # to a variable.
4462 
4463 # Argument 1: the variable to assign to
4464 # Argument 2: the value given by the user
4465 
4466 
4467 
4468 
4469 #
4470 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4471 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4472 #
4473 # This code is free software; you can redistribute it and/or modify it
4474 # under the terms of the GNU General Public License version 2 only, as
4475 # published by the Free Software Foundation.  Oracle designates this
4476 # particular file as subject to the "Classpath" exception as provided
4477 # by Oracle in the LICENSE file that accompanied this code.
4478 #
4479 # This code is distributed in the hope that it will be useful, but WITHOUT
4480 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4481 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4482 # version 2 for more details (a copy is included in the LICENSE file that
4483 # accompanied this code).
4484 #
4485 # You should have received a copy of the GNU General Public License version
4486 # 2 along with this work; if not, write to the Free Software Foundation,
4487 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4488 #
4489 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4490 # or visit www.oracle.com if you need additional information or have any
4491 # questions.
4492 #
4493 
4494 # Major library component reside in separate files.
4495 #
4496 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4497 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4498 #
4499 # This code is free software; you can redistribute it and/or modify it
4500 # under the terms of the GNU General Public License version 2 only, as
4501 # published by the Free Software Foundation.  Oracle designates this
4502 # particular file as subject to the "Classpath" exception as provided
4503 # by Oracle in the LICENSE file that accompanied this code.
4504 #
4505 # This code is distributed in the hope that it will be useful, but WITHOUT
4506 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4507 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4508 # version 2 for more details (a copy is included in the LICENSE file that
4509 # accompanied this code).
4510 #
4511 # You should have received a copy of the GNU General Public License version
4512 # 2 along with this work; if not, write to the Free Software Foundation,
4513 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4514 #
4515 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4516 # or visit www.oracle.com if you need additional information or have any
4517 # questions.
4518 #
4519 
4520 ################################################################################
4521 # Setup alsa (Advanced Linux Sound Architecture)
4522 ################################################################################
4523 
4524 
4525 #
4526 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4527 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4528 #
4529 # This code is free software; you can redistribute it and/or modify it
4530 # under the terms of the GNU General Public License version 2 only, as
4531 # published by the Free Software Foundation.  Oracle designates this
4532 # particular file as subject to the "Classpath" exception as provided
4533 # by Oracle in the LICENSE file that accompanied this code.
4534 #
4535 # This code is distributed in the hope that it will be useful, but WITHOUT
4536 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4537 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4538 # version 2 for more details (a copy is included in the LICENSE file that
4539 # accompanied this code).
4540 #
4541 # You should have received a copy of the GNU General Public License version
4542 # 2 along with this work; if not, write to the Free Software Foundation,
4543 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4544 #
4545 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4546 # or visit www.oracle.com if you need additional information or have any
4547 # questions.
4548 #
4549 
4550 ################################################################################
4551 # Setup bundled libraries.
4552 #
4553 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4554 # OpenJDK repository. Default is to use these libraries as bundled, but they
4555 # might be replaced by en external version by the user.
4556 ################################################################################
4557 
4558 
4559 ################################################################################
4560 # Setup libjpeg
4561 ################################################################################
4562 
4563 
4564 ################################################################################
4565 # Setup giflib
4566 ################################################################################
4567 
4568 
4569 ################################################################################
4570 # Setup libpng
4571 ################################################################################
4572 
4573 
4574 ################################################################################
4575 # Setup zlib
4576 ################################################################################
4577 
4578 
4579 ################################################################################
4580 # Setup lcms (Little CMS)
4581 ################################################################################
4582 
4583 
4584 #
4585 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4586 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4587 #
4588 # This code is free software; you can redistribute it and/or modify it
4589 # under the terms of the GNU General Public License version 2 only, as
4590 # published by the Free Software Foundation.  Oracle designates this
4591 # particular file as subject to the "Classpath" exception as provided
4592 # by Oracle in the LICENSE file that accompanied this code.
4593 #
4594 # This code is distributed in the hope that it will be useful, but WITHOUT
4595 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4596 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4597 # version 2 for more details (a copy is included in the LICENSE file that
4598 # accompanied this code).
4599 #
4600 # You should have received a copy of the GNU General Public License version
4601 # 2 along with this work; if not, write to the Free Software Foundation,
4602 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4603 #
4604 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4605 # or visit www.oracle.com if you need additional information or have any
4606 # questions.
4607 #
4608 
4609 ################################################################################
4610 # Setup cups (Common Unix Printing System)
4611 ################################################################################
4612 
4613 
4614 #
4615 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4616 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4617 #
4618 # This code is free software; you can redistribute it and/or modify it
4619 # under the terms of the GNU General Public License version 2 only, as
4620 # published by the Free Software Foundation.  Oracle designates this
4621 # particular file as subject to the "Classpath" exception as provided
4622 # by Oracle in the LICENSE file that accompanied this code.
4623 #
4624 # This code is distributed in the hope that it will be useful, but WITHOUT
4625 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4626 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4627 # version 2 for more details (a copy is included in the LICENSE file that
4628 # accompanied this code).
4629 #
4630 # You should have received a copy of the GNU General Public License version
4631 # 2 along with this work; if not, write to the Free Software Foundation,
4632 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4633 #
4634 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4635 # or visit www.oracle.com if you need additional information or have any
4636 # questions.
4637 #
4638 
4639 ################################################################################
4640 # Setup libffi (Foreign Function Interface)
4641 ################################################################################
4642 
4643 
4644 #
4645 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4646 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4647 #
4648 # This code is free software; you can redistribute it and/or modify it
4649 # under the terms of the GNU General Public License version 2 only, as
4650 # published by the Free Software Foundation.  Oracle designates this
4651 # particular file as subject to the "Classpath" exception as provided
4652 # by Oracle in the LICENSE file that accompanied this code.
4653 #
4654 # This code is distributed in the hope that it will be useful, but WITHOUT
4655 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4656 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4657 # version 2 for more details (a copy is included in the LICENSE file that
4658 # accompanied this code).
4659 #
4660 # You should have received a copy of the GNU General Public License version
4661 # 2 along with this work; if not, write to the Free Software Foundation,
4662 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4663 #
4664 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4665 # or visit www.oracle.com if you need additional information or have any
4666 # questions.
4667 #
4668 
4669 ################################################################################
4670 # Build the freetype lib from source
4671 ################################################################################
4672 
4673 
4674 ################################################################################
4675 # Check if a potential freeype library match is correct and usable
4676 ################################################################################
4677 
4678 
4679 ################################################################################
4680 # Setup freetype (The FreeType2 font rendering library)
4681 ################################################################################
4682 
4683 
4684 #
4685 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4686 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4687 #
4688 # This code is free software; you can redistribute it and/or modify it
4689 # under the terms of the GNU General Public License version 2 only, as
4690 # published by the Free Software Foundation.  Oracle designates this
4691 # particular file as subject to the "Classpath" exception as provided
4692 # by Oracle in the LICENSE file that accompanied this code.
4693 #
4694 # This code is distributed in the hope that it will be useful, but WITHOUT
4695 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4696 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4697 # version 2 for more details (a copy is included in the LICENSE file that
4698 # accompanied this code).
4699 #
4700 # You should have received a copy of the GNU General Public License version
4701 # 2 along with this work; if not, write to the Free Software Foundation,
4702 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4703 #
4704 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4705 # or visit www.oracle.com if you need additional information or have any
4706 # questions.
4707 #
4708 
4709 ################################################################################
4710 # Setup the standard C/C++ runtime libraries.
4711 #
4712 # Most importantly, determine if stdc++ should be linked statically or
4713 # dynamically.
4714 ################################################################################
4715 
4716 
4717 #
4718 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4719 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4720 #
4721 # This code is free software; you can redistribute it and/or modify it
4722 # under the terms of the GNU General Public License version 2 only, as
4723 # published by the Free Software Foundation.  Oracle designates this
4724 # particular file as subject to the "Classpath" exception as provided
4725 # by Oracle in the LICENSE file that accompanied this code.
4726 #
4727 # This code is distributed in the hope that it will be useful, but WITHOUT
4728 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4729 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4730 # version 2 for more details (a copy is included in the LICENSE file that
4731 # accompanied this code).
4732 #
4733 # You should have received a copy of the GNU General Public License version
4734 # 2 along with this work; if not, write to the Free Software Foundation,
4735 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4736 #
4737 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4738 # or visit www.oracle.com if you need additional information or have any
4739 # questions.
4740 #
4741 
4742 ################################################################################
4743 # Setup X11 Windows system
4744 ################################################################################
4745 
4746 
4747 #
4748 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4749 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4750 #
4751 # This code is free software; you can redistribute it and/or modify it
4752 # under the terms of the GNU General Public License version 2 only, as
4753 # published by the Free Software Foundation.  Oracle designates this
4754 # particular file as subject to the "Classpath" exception as provided
4755 # by Oracle in the LICENSE file that accompanied this code.
4756 #
4757 # This code is distributed in the hope that it will be useful, but WITHOUT
4758 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4759 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4760 # version 2 for more details (a copy is included in the LICENSE file that
4761 # accompanied this code).
4762 #
4763 # You should have received a copy of the GNU General Public License version
4764 # 2 along with this work; if not, write to the Free Software Foundation,
4765 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4766 #
4767 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4768 # or visit www.oracle.com if you need additional information or have any
4769 # questions.
4770 #
4771 
4772 ################################################################################
4773 # Setup libelf (ELF library)
4774 ################################################################################
4775 
4776 
4777 
4778 ################################################################################
4779 # Determine which libraries are needed for this configuration
4780 ################################################################################
4781 
4782 
4783 ################################################################################
4784 # Parse library options, and setup needed libraries
4785 ################################################################################
4786 
4787 
4788 ################################################################################
4789 # Setup llvm (Low-Level VM)
4790 ################################################################################
4791 
4792 
4793 ################################################################################
4794 # Setup various libraries, typically small system libraries
4795 ################################################################################
4796 
4797 
4798 ################################################################################
4799 # libstlport.so.1 is needed for running gtest on Solaris. Find it to
4800 # redistribute it in the test image.
4801 ################################################################################
4802 
4803 
4804 
4805 #
4806 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4807 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4808 #
4809 # This code is free software; you can redistribute it and/or modify it
4810 # under the terms of the GNU General Public License version 2 only, as
4811 # published by the Free Software Foundation.  Oracle designates this
4812 # particular file as subject to the "Classpath" exception as provided
4813 # by Oracle in the LICENSE file that accompanied this code.
4814 #
4815 # This code is distributed in the hope that it will be useful, but WITHOUT
4816 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4817 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4818 # version 2 for more details (a copy is included in the LICENSE file that
4819 # accompanied this code).
4820 #
4821 # You should have received a copy of the GNU General Public License version
4822 # 2 along with this work; if not, write to the Free Software Foundation,
4823 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4824 #
4825 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4826 # or visit www.oracle.com if you need additional information or have any
4827 # questions.
4828 #
4829 
4830 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4831 # Converts autoconf style CPU name to OpenJDK style, into
4832 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4833 
4834 
4835 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4836 # Converts autoconf style OS name to OpenJDK style, into
4837 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4838 
4839 
4840 # Expects $host_os $host_cpu $build_os and $build_cpu
4841 # and $with_target_bits to have been setup!
4842 #
4843 # Translate the standard triplet(quadruplet) definition
4844 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4845 # OPENJDK_BUILD_OS, etc.
4846 
4847 
4848 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4849 # accordingly. Must be done after setting up build and target system, but before
4850 # doing anything else with these values.
4851 
4852 
4853 # Setup the legacy variables, for controlling the old makefiles.
4854 #
4855 
4856 
4857 # $1 - Either TARGET or BUILD to setup the variables for.
4858 
4859 
4860 
4861 
4862 #%%% Build and target systems %%%
4863 
4864 
4865 
4866 
4867 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4868 # Add -mX to various FLAGS variables.
4869 
4870 
4871 
4872 
4873 
4874 
4875 #
4876 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4877 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4878 #
4879 # This code is free software; you can redistribute it and/or modify it
4880 # under the terms of the GNU General Public License version 2 only, as
4881 # published by the Free Software Foundation.  Oracle designates this
4882 # particular file as subject to the "Classpath" exception as provided
4883 # by Oracle in the LICENSE file that accompanied this code.
4884 #
4885 # This code is distributed in the hope that it will be useful, but WITHOUT
4886 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4887 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4888 # version 2 for more details (a copy is included in the LICENSE file that
4889 # accompanied this code).
4890 #
4891 # You should have received a copy of the GNU General Public License version
4892 # 2 along with this work; if not, write to the Free Software Foundation,
4893 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4894 #
4895 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4896 # or visit www.oracle.com if you need additional information or have any
4897 # questions.
4898 #
4899 
4900 
4901 
4902 
4903 
4904 
4905 
4906 ################################################################################
4907 # Define a mechanism for importing extra prebuilt modules
4908 #
4909 
4910 
4911 
4912 #
4913 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4914 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4915 #
4916 # This code is free software; you can redistribute it and/or modify it
4917 # under the terms of the GNU General Public License version 2 only, as
4918 # published by the Free Software Foundation.  Oracle designates this
4919 # particular file as subject to the "Classpath" exception as provided
4920 # by Oracle in the LICENSE file that accompanied this code.
4921 #
4922 # This code is distributed in the hope that it will be useful, but WITHOUT
4923 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4924 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4925 # version 2 for more details (a copy is included in the LICENSE file that
4926 # accompanied this code).
4927 #
4928 # You should have received a copy of the GNU General Public License version
4929 # 2 along with this work; if not, write to the Free Software Foundation,
4930 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4931 #
4932 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4933 # or visit www.oracle.com if you need additional information or have any
4934 # questions.
4935 #
4936 
4937 ########################################################################
4938 # This file is responsible for detecting, verifying and setting up the
4939 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4940 # proper paths to the binaries, but it will not setup any flags.
4941 #
4942 # The binaries used is determined by the toolchain type, which is the family of
4943 # compilers and related tools that are used.
4944 ########################################################################
4945 
4946 
4947 # All valid toolchains, regardless of platform (used by help.m4)
4948 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4949 
4950 # These toolchains are valid on different platforms
4951 VALID_TOOLCHAINS_linux="gcc clang"
4952 VALID_TOOLCHAINS_solaris="solstudio"
4953 VALID_TOOLCHAINS_macosx="gcc clang"
4954 VALID_TOOLCHAINS_aix="xlc"
4955 VALID_TOOLCHAINS_windows="microsoft"
4956 
4957 # Toolchain descriptions
4958 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4959 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4960 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4961 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4962 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4963 
4964 # Minimum supported versions, empty means unspecified
4965 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4966 TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4967 TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4968 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4969 TOOLCHAIN_MINIMUM_VERSION_xlc=""
4970 
4971 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4972 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4973 # $1 - optional variable prefix for compiler and version variables (BUILD_)
4974 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4975 
4976 
4977 # Check if the configured compiler (C and C++) is of a specific version or
4978 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4979 #
4980 # Arguments:
4981 #   VERSION:   The version string to check against the found version
4982 #   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4983 #   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4984 #   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4985 
4986 
4987 
4988 
4989 # Setup a number of variables describing how native output files are
4990 # named on this platform/toolchain.
4991 
4992 
4993 # Determine which toolchain type to use, and make sure it is valid for this
4994 # platform. Setup various information about the selected toolchain.
4995 
4996 
4997 # Before we start detecting the toolchain executables, we might need some
4998 # special setup, e.g. additional paths etc.
4999 
5000 
5001 # Restore path, etc
5002 
5003 
5004 # Check if a compiler is of the toolchain type we expect, and save the version
5005 # information from it. If the compiler does not match the expected type,
5006 # this function will abort using AC_MSG_ERROR. If it matches, the version will
5007 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5008 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5009 #
5010 # $1 = compiler to test (CC or CXX)
5011 # $2 = human readable name of compiler (C or C++)
5012 
5013 
5014 # Try to locate the given C or C++ compiler in the path, or otherwise.
5015 #
5016 # $1 = compiler to test (CC or CXX)
5017 # $2 = human readable name of compiler (C or C++)
5018 # $3 = list of compiler names to search for
5019 
5020 
5021 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5022 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5023 # archiver (AR). Verify that the compilers are correct according to the
5024 # toolchain type.
5025 
5026 
5027 # Setup additional tools that is considered a part of the toolchain, but not the
5028 # core part. Many of these are highly platform-specific and do not exist,
5029 # and/or are not needed on all platforms.
5030 
5031 
5032 # Setup the build tools (i.e, the compiler and linker used to build programs
5033 # that should be run on the build platform, not the target platform, as a build
5034 # helper). Since the non-cross-compile case uses the normal, target compilers
5035 # for this, we can only do this after these have been setup.
5036 
5037 
5038 # Do some additional checks on the detected tools.
5039 
5040 
5041 # Setup the JTReg Regression Test Harness.
5042 
5043 
5044 #
5045 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5046 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5047 #
5048 # This code is free software; you can redistribute it and/or modify it
5049 # under the terms of the GNU General Public License version 2 only, as
5050 # published by the Free Software Foundation.  Oracle designates this
5051 # particular file as subject to the "Classpath" exception as provided
5052 # by Oracle in the LICENSE file that accompanied this code.
5053 #
5054 # This code is distributed in the hope that it will be useful, but WITHOUT
5055 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5056 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5057 # version 2 for more details (a copy is included in the LICENSE file that
5058 # accompanied this code).
5059 #
5060 # You should have received a copy of the GNU General Public License version
5061 # 2 along with this work; if not, write to the Free Software Foundation,
5062 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5063 #
5064 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5065 # or visit www.oracle.com if you need additional information or have any
5066 # questions.
5067 #
5068 
5069 ################################################################################
5070 # The order of these defines the priority by which we try to find them.
5071 VALID_VS_VERSIONS="2013 2012 2010"
5072 
5073 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5074 VS_VERSION_INTERNAL_2010=100
5075 VS_MSVCR_2010=msvcr100.dll
5076 # We don't use msvcp on Visual Studio 2010
5077 #VS_MSVCP_2010=msvcp100.dll
5078 VS_ENVVAR_2010="VS100COMNTOOLS"
5079 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5080 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5081 VS_VS_PLATFORM_NAME_2010="v100"
5082 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5083 
5084 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5085 VS_VERSION_INTERNAL_2012=110
5086 VS_MSVCR_2012=msvcr110.dll
5087 VS_MSVCP_2012=msvcp110.dll
5088 VS_ENVVAR_2012="VS110COMNTOOLS"
5089 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5090 VS_SDK_INSTALLDIR_2012=
5091 VS_VS_PLATFORM_NAME_2012="v110"
5092 VS_SDK_PLATFORM_NAME_2012=
5093 
5094 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5095 VS_VERSION_INTERNAL_2013=120
5096 VS_MSVCR_2013=msvcr120.dll
5097 VS_MSVCP_2013=msvcp120.dll
5098 VS_ENVVAR_2013="VS120COMNTOOLS"
5099 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5100 VS_SDK_INSTALLDIR_2013=
5101 VS_VS_PLATFORM_NAME_2013="v120"
5102 VS_SDK_PLATFORM_NAME_2013=
5103 
5104 ################################################################################
5105 
5106 
5107 
5108 ################################################################################
5109 
5110 
5111 
5112 ################################################################################
5113 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5114 # build environment and assigns it to VS_ENV_CMD
5115 
5116 
5117 ################################################################################
5118 
5119 
5120 
5121 ################################################################################
5122 # Check if the VS env variables were setup prior to running configure.
5123 # If not, then find vcvarsall.bat and run it automatically, and integrate
5124 # the set env variables into the spec file.
5125 
5126 
5127 
5128 
5129 
5130 
5131 
5132 
5133 
5134 
5135 
5136 
5137 
5138 
5139 # This line needs to be here, verbatim, after all includes and the dummy hook
5140 # definitions. It is replaced with custom functionality when building
5141 # custom sources.
5142 #CUSTOM_AUTOCONF_INCLUDE
5143 
5144 # Do not change or remove the following line, it is needed for consistency checks:
5145 DATE_WHEN_GENERATED=1481496095
5146 
5147 ###############################################################################
5148 #
5149 # Initialization / Boot-strapping
5150 #
5151 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5152 # thus it jumps back and forth, each time gaining something needed later on.
5153 #
5154 ###############################################################################
5155 
5156 # If we are requested to print additional help, do that and then exit.
5157 # This must be the very first call.
5158 
5159   if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5160 
5161     # Print available toolchains
5162     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5163     $PRINTF "Which are valid to use depends on the build platform.\n"
5164     for toolchain in $VALID_TOOLCHAINS_all; do
5165       # Use indirect variable referencing
5166       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5167       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5168       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5169     done
5170     $PRINTF "\n"
5171 
5172     # Print available jvm features
5173     $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5174     $PRINTF "Which are valid to use depends on the target platform.\n  "
5175     $PRINTF "%s " $VALID_JVM_FEATURES
5176     $PRINTF "\n"
5177 
5178     # And now exit directly
5179     exit 0
5180   fi
5181 
5182 
5183 # Basic initialization that must happen first of all in the normal process.
5184 
5185   # Save the original command line. This is passed to us by the wrapper configure script.
5186 
5187   # Save the path variable before it gets changed
5188   ORIGINAL_PATH="$PATH"
5189 
5190   DATE_WHEN_CONFIGURED=`LANG=C date`
5191 
5192   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5193 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5194   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5195 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5196 
5197 
5198   # Start with tools that do not need have cross compilation support
5199   # and can be expected to be found in the default PATH. These tools are
5200   # used by configure.
5201 
5202   # First are all the simple required tools.
5203 
5204 
5205 
5206   # Publish this variable in the help.
5207 
5208 
5209   if [ -z "${BASENAME+x}" ]; then
5210     # The variable is not set by user, try to locate tool using the code snippet
5211     for ac_prog in basename
5212 do
5213   # Extract the first word of "$ac_prog", so it can be a program name with args.
5214 set dummy $ac_prog; ac_word=$2
5215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5216 $as_echo_n "checking for $ac_word... " >&6; }
5217 if ${ac_cv_path_BASENAME+:} false; then :
5218   $as_echo_n "(cached) " >&6
5219 else
5220   case $BASENAME in
5221   [\\/]* | ?:[\\/]*)
5222   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5223   ;;
5224   *)
5225   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5226 for as_dir in $PATH
5227 do
5228   IFS=$as_save_IFS
5229   test -z "$as_dir" && as_dir=.
5230     for ac_exec_ext in '' $ac_executable_extensions; do
5231   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5232     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5233     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5234     break 2
5235   fi
5236 done
5237   done
5238 IFS=$as_save_IFS
5239 
5240   ;;
5241 esac
5242 fi
5243 BASENAME=$ac_cv_path_BASENAME
5244 if test -n "$BASENAME"; then
5245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5246 $as_echo "$BASENAME" >&6; }
5247 else
5248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5249 $as_echo "no" >&6; }
5250 fi
5251 
5252 
5253   test -n "$BASENAME" && break
5254 done
5255 
5256   else
5257     # The variable is set, but is it from the command line or the environment?
5258 
5259     # Try to remove the string !BASENAME! from our list.
5260     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5261     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5262       # If it failed, the variable was not from the command line. Ignore it,
5263       # but warn the user (except for BASH, which is always set by the calling BASH).
5264       if test "xBASENAME" != xBASH; then
5265         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5266 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5267       fi
5268       # Try to locate tool using the code snippet
5269       for ac_prog in basename
5270 do
5271   # Extract the first word of "$ac_prog", so it can be a program name with args.
5272 set dummy $ac_prog; ac_word=$2
5273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5274 $as_echo_n "checking for $ac_word... " >&6; }
5275 if ${ac_cv_path_BASENAME+:} false; then :
5276   $as_echo_n "(cached) " >&6
5277 else
5278   case $BASENAME in
5279   [\\/]* | ?:[\\/]*)
5280   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5281   ;;
5282   *)
5283   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5284 for as_dir in $PATH
5285 do
5286   IFS=$as_save_IFS
5287   test -z "$as_dir" && as_dir=.
5288     for ac_exec_ext in '' $ac_executable_extensions; do
5289   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5290     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5291     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5292     break 2
5293   fi
5294 done
5295   done
5296 IFS=$as_save_IFS
5297 
5298   ;;
5299 esac
5300 fi
5301 BASENAME=$ac_cv_path_BASENAME
5302 if test -n "$BASENAME"; then
5303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5304 $as_echo "$BASENAME" >&6; }
5305 else
5306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5307 $as_echo "no" >&6; }
5308 fi
5309 
5310 
5311   test -n "$BASENAME" && break
5312 done
5313 
5314     else
5315       # If it succeeded, then it was overridden by the user. We will use it
5316       # for the tool.
5317 
5318       # First remove it from the list of overridden variables, so we can test
5319       # for unknown variables in the end.
5320       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5321 
5322       # Check if we try to supply an empty value
5323       if test "x$BASENAME" = x; then
5324         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5325 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5326         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5327 $as_echo_n "checking for BASENAME... " >&6; }
5328         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5329 $as_echo "disabled" >&6; }
5330       else
5331         # Check if the provided tool contains a complete path.
5332         tool_specified="$BASENAME"
5333         tool_basename="${tool_specified##*/}"
5334         if test "x$tool_basename" = "x$tool_specified"; then
5335           # A command without a complete path is provided, search $PATH.
5336           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5337 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5338           # Extract the first word of "$tool_basename", so it can be a program name with args.
5339 set dummy $tool_basename; ac_word=$2
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5341 $as_echo_n "checking for $ac_word... " >&6; }
5342 if ${ac_cv_path_BASENAME+:} false; then :
5343   $as_echo_n "(cached) " >&6
5344 else
5345   case $BASENAME in
5346   [\\/]* | ?:[\\/]*)
5347   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5348   ;;
5349   *)
5350   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5351 for as_dir in $PATH
5352 do
5353   IFS=$as_save_IFS
5354   test -z "$as_dir" && as_dir=.
5355     for ac_exec_ext in '' $ac_executable_extensions; do
5356   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5357     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5358     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5359     break 2
5360   fi
5361 done
5362   done
5363 IFS=$as_save_IFS
5364 
5365   ;;
5366 esac
5367 fi
5368 BASENAME=$ac_cv_path_BASENAME
5369 if test -n "$BASENAME"; then
5370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5371 $as_echo "$BASENAME" >&6; }
5372 else
5373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5374 $as_echo "no" >&6; }
5375 fi
5376 
5377 
5378           if test "x$BASENAME" = x; then
5379             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5380           fi
5381         else
5382           # Otherwise we believe it is a complete path. Use it as it is.
5383           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5384 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5385           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5386 $as_echo_n "checking for BASENAME... " >&6; }
5387           if test ! -x "$tool_specified"; then
5388             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5389 $as_echo "not found" >&6; }
5390             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5391           fi
5392           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5393 $as_echo "$tool_specified" >&6; }
5394         fi
5395       fi
5396     fi
5397 
5398   fi
5399 
5400 
5401 
5402   if test "x$BASENAME" = x; then
5403     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5404   fi
5405 
5406 
5407 
5408 
5409 
5410   # Publish this variable in the help.
5411 
5412 
5413   if [ -z "${BASH+x}" ]; then
5414     # The variable is not set by user, try to locate tool using the code snippet
5415     for ac_prog in bash
5416 do
5417   # Extract the first word of "$ac_prog", so it can be a program name with args.
5418 set dummy $ac_prog; ac_word=$2
5419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5420 $as_echo_n "checking for $ac_word... " >&6; }
5421 if ${ac_cv_path_BASH+:} false; then :
5422   $as_echo_n "(cached) " >&6
5423 else
5424   case $BASH in
5425   [\\/]* | ?:[\\/]*)
5426   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5427   ;;
5428   *)
5429   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5430 for as_dir in $PATH
5431 do
5432   IFS=$as_save_IFS
5433   test -z "$as_dir" && as_dir=.
5434     for ac_exec_ext in '' $ac_executable_extensions; do
5435   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5436     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5437     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5438     break 2
5439   fi
5440 done
5441   done
5442 IFS=$as_save_IFS
5443 
5444   ;;
5445 esac
5446 fi
5447 BASH=$ac_cv_path_BASH
5448 if test -n "$BASH"; then
5449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5450 $as_echo "$BASH" >&6; }
5451 else
5452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5453 $as_echo "no" >&6; }
5454 fi
5455 
5456 
5457   test -n "$BASH" && break
5458 done
5459 
5460   else
5461     # The variable is set, but is it from the command line or the environment?
5462 
5463     # Try to remove the string !BASH! from our list.
5464     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5465     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5466       # If it failed, the variable was not from the command line. Ignore it,
5467       # but warn the user (except for BASH, which is always set by the calling BASH).
5468       if test "xBASH" != xBASH; then
5469         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5470 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5471       fi
5472       # Try to locate tool using the code snippet
5473       for ac_prog in bash
5474 do
5475   # Extract the first word of "$ac_prog", so it can be a program name with args.
5476 set dummy $ac_prog; ac_word=$2
5477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5478 $as_echo_n "checking for $ac_word... " >&6; }
5479 if ${ac_cv_path_BASH+:} false; then :
5480   $as_echo_n "(cached) " >&6
5481 else
5482   case $BASH in
5483   [\\/]* | ?:[\\/]*)
5484   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5485   ;;
5486   *)
5487   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5488 for as_dir in $PATH
5489 do
5490   IFS=$as_save_IFS
5491   test -z "$as_dir" && as_dir=.
5492     for ac_exec_ext in '' $ac_executable_extensions; do
5493   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5494     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5495     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5496     break 2
5497   fi
5498 done
5499   done
5500 IFS=$as_save_IFS
5501 
5502   ;;
5503 esac
5504 fi
5505 BASH=$ac_cv_path_BASH
5506 if test -n "$BASH"; then
5507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5508 $as_echo "$BASH" >&6; }
5509 else
5510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5511 $as_echo "no" >&6; }
5512 fi
5513 
5514 
5515   test -n "$BASH" && break
5516 done
5517 
5518     else
5519       # If it succeeded, then it was overridden by the user. We will use it
5520       # for the tool.
5521 
5522       # First remove it from the list of overridden variables, so we can test
5523       # for unknown variables in the end.
5524       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5525 
5526       # Check if we try to supply an empty value
5527       if test "x$BASH" = x; then
5528         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5529 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5530         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5531 $as_echo_n "checking for BASH... " >&6; }
5532         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5533 $as_echo "disabled" >&6; }
5534       else
5535         # Check if the provided tool contains a complete path.
5536         tool_specified="$BASH"
5537         tool_basename="${tool_specified##*/}"
5538         if test "x$tool_basename" = "x$tool_specified"; then
5539           # A command without a complete path is provided, search $PATH.
5540           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5541 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5542           # Extract the first word of "$tool_basename", so it can be a program name with args.
5543 set dummy $tool_basename; ac_word=$2
5544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5545 $as_echo_n "checking for $ac_word... " >&6; }
5546 if ${ac_cv_path_BASH+:} false; then :
5547   $as_echo_n "(cached) " >&6
5548 else
5549   case $BASH in
5550   [\\/]* | ?:[\\/]*)
5551   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5552   ;;
5553   *)
5554   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5555 for as_dir in $PATH
5556 do
5557   IFS=$as_save_IFS
5558   test -z "$as_dir" && as_dir=.
5559     for ac_exec_ext in '' $ac_executable_extensions; do
5560   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5561     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5562     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5563     break 2
5564   fi
5565 done
5566   done
5567 IFS=$as_save_IFS
5568 
5569   ;;
5570 esac
5571 fi
5572 BASH=$ac_cv_path_BASH
5573 if test -n "$BASH"; then
5574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5575 $as_echo "$BASH" >&6; }
5576 else
5577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5578 $as_echo "no" >&6; }
5579 fi
5580 
5581 
5582           if test "x$BASH" = x; then
5583             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5584           fi
5585         else
5586           # Otherwise we believe it is a complete path. Use it as it is.
5587           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5588 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5589           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5590 $as_echo_n "checking for BASH... " >&6; }
5591           if test ! -x "$tool_specified"; then
5592             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5593 $as_echo "not found" >&6; }
5594             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5595           fi
5596           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5597 $as_echo "$tool_specified" >&6; }
5598         fi
5599       fi
5600     fi
5601 
5602   fi
5603 
5604 
5605 
5606   if test "x$BASH" = x; then
5607     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5608   fi
5609 
5610 
5611 
5612 
5613 
5614   # Publish this variable in the help.
5615 
5616 
5617   if [ -z "${CAT+x}" ]; then
5618     # The variable is not set by user, try to locate tool using the code snippet
5619     for ac_prog in cat
5620 do
5621   # Extract the first word of "$ac_prog", so it can be a program name with args.
5622 set dummy $ac_prog; ac_word=$2
5623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5624 $as_echo_n "checking for $ac_word... " >&6; }
5625 if ${ac_cv_path_CAT+:} false; then :
5626   $as_echo_n "(cached) " >&6
5627 else
5628   case $CAT in
5629   [\\/]* | ?:[\\/]*)
5630   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5631   ;;
5632   *)
5633   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5634 for as_dir in $PATH
5635 do
5636   IFS=$as_save_IFS
5637   test -z "$as_dir" && as_dir=.
5638     for ac_exec_ext in '' $ac_executable_extensions; do
5639   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5640     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5641     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5642     break 2
5643   fi
5644 done
5645   done
5646 IFS=$as_save_IFS
5647 
5648   ;;
5649 esac
5650 fi
5651 CAT=$ac_cv_path_CAT
5652 if test -n "$CAT"; then
5653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5654 $as_echo "$CAT" >&6; }
5655 else
5656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5657 $as_echo "no" >&6; }
5658 fi
5659 
5660 
5661   test -n "$CAT" && break
5662 done
5663 
5664   else
5665     # The variable is set, but is it from the command line or the environment?
5666 
5667     # Try to remove the string !CAT! from our list.
5668     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5669     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5670       # If it failed, the variable was not from the command line. Ignore it,
5671       # but warn the user (except for BASH, which is always set by the calling BASH).
5672       if test "xCAT" != xBASH; then
5673         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5674 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5675       fi
5676       # Try to locate tool using the code snippet
5677       for ac_prog in cat
5678 do
5679   # Extract the first word of "$ac_prog", so it can be a program name with args.
5680 set dummy $ac_prog; ac_word=$2
5681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5682 $as_echo_n "checking for $ac_word... " >&6; }
5683 if ${ac_cv_path_CAT+:} false; then :
5684   $as_echo_n "(cached) " >&6
5685 else
5686   case $CAT in
5687   [\\/]* | ?:[\\/]*)
5688   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5689   ;;
5690   *)
5691   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5692 for as_dir in $PATH
5693 do
5694   IFS=$as_save_IFS
5695   test -z "$as_dir" && as_dir=.
5696     for ac_exec_ext in '' $ac_executable_extensions; do
5697   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5698     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5699     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5700     break 2
5701   fi
5702 done
5703   done
5704 IFS=$as_save_IFS
5705 
5706   ;;
5707 esac
5708 fi
5709 CAT=$ac_cv_path_CAT
5710 if test -n "$CAT"; then
5711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5712 $as_echo "$CAT" >&6; }
5713 else
5714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5715 $as_echo "no" >&6; }
5716 fi
5717 
5718 
5719   test -n "$CAT" && break
5720 done
5721 
5722     else
5723       # If it succeeded, then it was overridden by the user. We will use it
5724       # for the tool.
5725 
5726       # First remove it from the list of overridden variables, so we can test
5727       # for unknown variables in the end.
5728       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5729 
5730       # Check if we try to supply an empty value
5731       if test "x$CAT" = x; then
5732         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5733 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5734         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5735 $as_echo_n "checking for CAT... " >&6; }
5736         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5737 $as_echo "disabled" >&6; }
5738       else
5739         # Check if the provided tool contains a complete path.
5740         tool_specified="$CAT"
5741         tool_basename="${tool_specified##*/}"
5742         if test "x$tool_basename" = "x$tool_specified"; then
5743           # A command without a complete path is provided, search $PATH.
5744           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5745 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5746           # Extract the first word of "$tool_basename", so it can be a program name with args.
5747 set dummy $tool_basename; ac_word=$2
5748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5749 $as_echo_n "checking for $ac_word... " >&6; }
5750 if ${ac_cv_path_CAT+:} false; then :
5751   $as_echo_n "(cached) " >&6
5752 else
5753   case $CAT in
5754   [\\/]* | ?:[\\/]*)
5755   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5756   ;;
5757   *)
5758   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5759 for as_dir in $PATH
5760 do
5761   IFS=$as_save_IFS
5762   test -z "$as_dir" && as_dir=.
5763     for ac_exec_ext in '' $ac_executable_extensions; do
5764   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5765     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5766     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5767     break 2
5768   fi
5769 done
5770   done
5771 IFS=$as_save_IFS
5772 
5773   ;;
5774 esac
5775 fi
5776 CAT=$ac_cv_path_CAT
5777 if test -n "$CAT"; then
5778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5779 $as_echo "$CAT" >&6; }
5780 else
5781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5782 $as_echo "no" >&6; }
5783 fi
5784 
5785 
5786           if test "x$CAT" = x; then
5787             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5788           fi
5789         else
5790           # Otherwise we believe it is a complete path. Use it as it is.
5791           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5792 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5793           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5794 $as_echo_n "checking for CAT... " >&6; }
5795           if test ! -x "$tool_specified"; then
5796             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5797 $as_echo "not found" >&6; }
5798             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5799           fi
5800           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5801 $as_echo "$tool_specified" >&6; }
5802         fi
5803       fi
5804     fi
5805 
5806   fi
5807 
5808 
5809 
5810   if test "x$CAT" = x; then
5811     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5812   fi
5813 
5814 
5815 
5816 
5817 
5818   # Publish this variable in the help.
5819 
5820 
5821   if [ -z "${CHMOD+x}" ]; then
5822     # The variable is not set by user, try to locate tool using the code snippet
5823     for ac_prog in chmod
5824 do
5825   # Extract the first word of "$ac_prog", so it can be a program name with args.
5826 set dummy $ac_prog; ac_word=$2
5827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5828 $as_echo_n "checking for $ac_word... " >&6; }
5829 if ${ac_cv_path_CHMOD+:} false; then :
5830   $as_echo_n "(cached) " >&6
5831 else
5832   case $CHMOD in
5833   [\\/]* | ?:[\\/]*)
5834   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5835   ;;
5836   *)
5837   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5838 for as_dir in $PATH
5839 do
5840   IFS=$as_save_IFS
5841   test -z "$as_dir" && as_dir=.
5842     for ac_exec_ext in '' $ac_executable_extensions; do
5843   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5844     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5845     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5846     break 2
5847   fi
5848 done
5849   done
5850 IFS=$as_save_IFS
5851 
5852   ;;
5853 esac
5854 fi
5855 CHMOD=$ac_cv_path_CHMOD
5856 if test -n "$CHMOD"; then
5857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5858 $as_echo "$CHMOD" >&6; }
5859 else
5860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5861 $as_echo "no" >&6; }
5862 fi
5863 
5864 
5865   test -n "$CHMOD" && break
5866 done
5867 
5868   else
5869     # The variable is set, but is it from the command line or the environment?
5870 
5871     # Try to remove the string !CHMOD! from our list.
5872     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5873     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5874       # If it failed, the variable was not from the command line. Ignore it,
5875       # but warn the user (except for BASH, which is always set by the calling BASH).
5876       if test "xCHMOD" != xBASH; then
5877         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5878 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5879       fi
5880       # Try to locate tool using the code snippet
5881       for ac_prog in chmod
5882 do
5883   # Extract the first word of "$ac_prog", so it can be a program name with args.
5884 set dummy $ac_prog; ac_word=$2
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5886 $as_echo_n "checking for $ac_word... " >&6; }
5887 if ${ac_cv_path_CHMOD+:} false; then :
5888   $as_echo_n "(cached) " >&6
5889 else
5890   case $CHMOD in
5891   [\\/]* | ?:[\\/]*)
5892   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5893   ;;
5894   *)
5895   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5896 for as_dir in $PATH
5897 do
5898   IFS=$as_save_IFS
5899   test -z "$as_dir" && as_dir=.
5900     for ac_exec_ext in '' $ac_executable_extensions; do
5901   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5902     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5903     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5904     break 2
5905   fi
5906 done
5907   done
5908 IFS=$as_save_IFS
5909 
5910   ;;
5911 esac
5912 fi
5913 CHMOD=$ac_cv_path_CHMOD
5914 if test -n "$CHMOD"; then
5915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5916 $as_echo "$CHMOD" >&6; }
5917 else
5918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5919 $as_echo "no" >&6; }
5920 fi
5921 
5922 
5923   test -n "$CHMOD" && break
5924 done
5925 
5926     else
5927       # If it succeeded, then it was overridden by the user. We will use it
5928       # for the tool.
5929 
5930       # First remove it from the list of overridden variables, so we can test
5931       # for unknown variables in the end.
5932       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5933 
5934       # Check if we try to supply an empty value
5935       if test "x$CHMOD" = x; then
5936         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5937 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5938         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5939 $as_echo_n "checking for CHMOD... " >&6; }
5940         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5941 $as_echo "disabled" >&6; }
5942       else
5943         # Check if the provided tool contains a complete path.
5944         tool_specified="$CHMOD"
5945         tool_basename="${tool_specified##*/}"
5946         if test "x$tool_basename" = "x$tool_specified"; then
5947           # A command without a complete path is provided, search $PATH.
5948           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5949 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5950           # Extract the first word of "$tool_basename", so it can be a program name with args.
5951 set dummy $tool_basename; ac_word=$2
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5953 $as_echo_n "checking for $ac_word... " >&6; }
5954 if ${ac_cv_path_CHMOD+:} false; then :
5955   $as_echo_n "(cached) " >&6
5956 else
5957   case $CHMOD in
5958   [\\/]* | ?:[\\/]*)
5959   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5960   ;;
5961   *)
5962   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5963 for as_dir in $PATH
5964 do
5965   IFS=$as_save_IFS
5966   test -z "$as_dir" && as_dir=.
5967     for ac_exec_ext in '' $ac_executable_extensions; do
5968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5969     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5971     break 2
5972   fi
5973 done
5974   done
5975 IFS=$as_save_IFS
5976 
5977   ;;
5978 esac
5979 fi
5980 CHMOD=$ac_cv_path_CHMOD
5981 if test -n "$CHMOD"; then
5982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5983 $as_echo "$CHMOD" >&6; }
5984 else
5985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5986 $as_echo "no" >&6; }
5987 fi
5988 
5989 
5990           if test "x$CHMOD" = x; then
5991             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5992           fi
5993         else
5994           # Otherwise we believe it is a complete path. Use it as it is.
5995           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5996 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5997           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5998 $as_echo_n "checking for CHMOD... " >&6; }
5999           if test ! -x "$tool_specified"; then
6000             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6001 $as_echo "not found" >&6; }
6002             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6003           fi
6004           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6005 $as_echo "$tool_specified" >&6; }
6006         fi
6007       fi
6008     fi
6009 
6010   fi
6011 
6012 
6013 
6014   if test "x$CHMOD" = x; then
6015     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6016   fi
6017 
6018 
6019 
6020 
6021 
6022   # Publish this variable in the help.
6023 
6024 
6025   if [ -z "${CMP+x}" ]; then
6026     # The variable is not set by user, try to locate tool using the code snippet
6027     for ac_prog in cmp
6028 do
6029   # Extract the first word of "$ac_prog", so it can be a program name with args.
6030 set dummy $ac_prog; ac_word=$2
6031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6032 $as_echo_n "checking for $ac_word... " >&6; }
6033 if ${ac_cv_path_CMP+:} false; then :
6034   $as_echo_n "(cached) " >&6
6035 else
6036   case $CMP in
6037   [\\/]* | ?:[\\/]*)
6038   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6039   ;;
6040   *)
6041   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6042 for as_dir in $PATH
6043 do
6044   IFS=$as_save_IFS
6045   test -z "$as_dir" && as_dir=.
6046     for ac_exec_ext in '' $ac_executable_extensions; do
6047   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6048     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6049     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6050     break 2
6051   fi
6052 done
6053   done
6054 IFS=$as_save_IFS
6055 
6056   ;;
6057 esac
6058 fi
6059 CMP=$ac_cv_path_CMP
6060 if test -n "$CMP"; then
6061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6062 $as_echo "$CMP" >&6; }
6063 else
6064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6065 $as_echo "no" >&6; }
6066 fi
6067 
6068 
6069   test -n "$CMP" && break
6070 done
6071 
6072   else
6073     # The variable is set, but is it from the command line or the environment?
6074 
6075     # Try to remove the string !CMP! from our list.
6076     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6077     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6078       # If it failed, the variable was not from the command line. Ignore it,
6079       # but warn the user (except for BASH, which is always set by the calling BASH).
6080       if test "xCMP" != xBASH; then
6081         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6082 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6083       fi
6084       # Try to locate tool using the code snippet
6085       for ac_prog in cmp
6086 do
6087   # Extract the first word of "$ac_prog", so it can be a program name with args.
6088 set dummy $ac_prog; ac_word=$2
6089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6090 $as_echo_n "checking for $ac_word... " >&6; }
6091 if ${ac_cv_path_CMP+:} false; then :
6092   $as_echo_n "(cached) " >&6
6093 else
6094   case $CMP in
6095   [\\/]* | ?:[\\/]*)
6096   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6097   ;;
6098   *)
6099   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6100 for as_dir in $PATH
6101 do
6102   IFS=$as_save_IFS
6103   test -z "$as_dir" && as_dir=.
6104     for ac_exec_ext in '' $ac_executable_extensions; do
6105   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6106     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6107     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6108     break 2
6109   fi
6110 done
6111   done
6112 IFS=$as_save_IFS
6113 
6114   ;;
6115 esac
6116 fi
6117 CMP=$ac_cv_path_CMP
6118 if test -n "$CMP"; then
6119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6120 $as_echo "$CMP" >&6; }
6121 else
6122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6123 $as_echo "no" >&6; }
6124 fi
6125 
6126 
6127   test -n "$CMP" && break
6128 done
6129 
6130     else
6131       # If it succeeded, then it was overridden by the user. We will use it
6132       # for the tool.
6133 
6134       # First remove it from the list of overridden variables, so we can test
6135       # for unknown variables in the end.
6136       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6137 
6138       # Check if we try to supply an empty value
6139       if test "x$CMP" = x; then
6140         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6141 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6142         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6143 $as_echo_n "checking for CMP... " >&6; }
6144         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6145 $as_echo "disabled" >&6; }
6146       else
6147         # Check if the provided tool contains a complete path.
6148         tool_specified="$CMP"
6149         tool_basename="${tool_specified##*/}"
6150         if test "x$tool_basename" = "x$tool_specified"; then
6151           # A command without a complete path is provided, search $PATH.
6152           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6153 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6154           # Extract the first word of "$tool_basename", so it can be a program name with args.
6155 set dummy $tool_basename; ac_word=$2
6156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6157 $as_echo_n "checking for $ac_word... " >&6; }
6158 if ${ac_cv_path_CMP+:} false; then :
6159   $as_echo_n "(cached) " >&6
6160 else
6161   case $CMP in
6162   [\\/]* | ?:[\\/]*)
6163   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6164   ;;
6165   *)
6166   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6167 for as_dir in $PATH
6168 do
6169   IFS=$as_save_IFS
6170   test -z "$as_dir" && as_dir=.
6171     for ac_exec_ext in '' $ac_executable_extensions; do
6172   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6173     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6174     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6175     break 2
6176   fi
6177 done
6178   done
6179 IFS=$as_save_IFS
6180 
6181   ;;
6182 esac
6183 fi
6184 CMP=$ac_cv_path_CMP
6185 if test -n "$CMP"; then
6186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6187 $as_echo "$CMP" >&6; }
6188 else
6189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6190 $as_echo "no" >&6; }
6191 fi
6192 
6193 
6194           if test "x$CMP" = x; then
6195             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6196           fi
6197         else
6198           # Otherwise we believe it is a complete path. Use it as it is.
6199           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6200 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6201           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6202 $as_echo_n "checking for CMP... " >&6; }
6203           if test ! -x "$tool_specified"; then
6204             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6205 $as_echo "not found" >&6; }
6206             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6207           fi
6208           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6209 $as_echo "$tool_specified" >&6; }
6210         fi
6211       fi
6212     fi
6213 
6214   fi
6215 
6216 
6217 
6218   if test "x$CMP" = x; then
6219     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6220   fi
6221 
6222 
6223 
6224 
6225 
6226   # Publish this variable in the help.
6227 
6228 
6229   if [ -z "${COMM+x}" ]; then
6230     # The variable is not set by user, try to locate tool using the code snippet
6231     for ac_prog in comm
6232 do
6233   # Extract the first word of "$ac_prog", so it can be a program name with args.
6234 set dummy $ac_prog; ac_word=$2
6235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6236 $as_echo_n "checking for $ac_word... " >&6; }
6237 if ${ac_cv_path_COMM+:} false; then :
6238   $as_echo_n "(cached) " >&6
6239 else
6240   case $COMM in
6241   [\\/]* | ?:[\\/]*)
6242   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6243   ;;
6244   *)
6245   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6246 for as_dir in $PATH
6247 do
6248   IFS=$as_save_IFS
6249   test -z "$as_dir" && as_dir=.
6250     for ac_exec_ext in '' $ac_executable_extensions; do
6251   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6252     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6253     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6254     break 2
6255   fi
6256 done
6257   done
6258 IFS=$as_save_IFS
6259 
6260   ;;
6261 esac
6262 fi
6263 COMM=$ac_cv_path_COMM
6264 if test -n "$COMM"; then
6265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6266 $as_echo "$COMM" >&6; }
6267 else
6268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6269 $as_echo "no" >&6; }
6270 fi
6271 
6272 
6273   test -n "$COMM" && break
6274 done
6275 
6276   else
6277     # The variable is set, but is it from the command line or the environment?
6278 
6279     # Try to remove the string !COMM! from our list.
6280     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6281     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6282       # If it failed, the variable was not from the command line. Ignore it,
6283       # but warn the user (except for BASH, which is always set by the calling BASH).
6284       if test "xCOMM" != xBASH; then
6285         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6286 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6287       fi
6288       # Try to locate tool using the code snippet
6289       for ac_prog in comm
6290 do
6291   # Extract the first word of "$ac_prog", so it can be a program name with args.
6292 set dummy $ac_prog; ac_word=$2
6293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6294 $as_echo_n "checking for $ac_word... " >&6; }
6295 if ${ac_cv_path_COMM+:} false; then :
6296   $as_echo_n "(cached) " >&6
6297 else
6298   case $COMM in
6299   [\\/]* | ?:[\\/]*)
6300   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6301   ;;
6302   *)
6303   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6304 for as_dir in $PATH
6305 do
6306   IFS=$as_save_IFS
6307   test -z "$as_dir" && as_dir=.
6308     for ac_exec_ext in '' $ac_executable_extensions; do
6309   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6310     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6311     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6312     break 2
6313   fi
6314 done
6315   done
6316 IFS=$as_save_IFS
6317 
6318   ;;
6319 esac
6320 fi
6321 COMM=$ac_cv_path_COMM
6322 if test -n "$COMM"; then
6323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6324 $as_echo "$COMM" >&6; }
6325 else
6326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6327 $as_echo "no" >&6; }
6328 fi
6329 
6330 
6331   test -n "$COMM" && break
6332 done
6333 
6334     else
6335       # If it succeeded, then it was overridden by the user. We will use it
6336       # for the tool.
6337 
6338       # First remove it from the list of overridden variables, so we can test
6339       # for unknown variables in the end.
6340       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6341 
6342       # Check if we try to supply an empty value
6343       if test "x$COMM" = x; then
6344         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6345 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6346         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6347 $as_echo_n "checking for COMM... " >&6; }
6348         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6349 $as_echo "disabled" >&6; }
6350       else
6351         # Check if the provided tool contains a complete path.
6352         tool_specified="$COMM"
6353         tool_basename="${tool_specified##*/}"
6354         if test "x$tool_basename" = "x$tool_specified"; then
6355           # A command without a complete path is provided, search $PATH.
6356           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6357 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6358           # Extract the first word of "$tool_basename", so it can be a program name with args.
6359 set dummy $tool_basename; ac_word=$2
6360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6361 $as_echo_n "checking for $ac_word... " >&6; }
6362 if ${ac_cv_path_COMM+:} false; then :
6363   $as_echo_n "(cached) " >&6
6364 else
6365   case $COMM in
6366   [\\/]* | ?:[\\/]*)
6367   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6368   ;;
6369   *)
6370   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6371 for as_dir in $PATH
6372 do
6373   IFS=$as_save_IFS
6374   test -z "$as_dir" && as_dir=.
6375     for ac_exec_ext in '' $ac_executable_extensions; do
6376   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6377     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6378     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6379     break 2
6380   fi
6381 done
6382   done
6383 IFS=$as_save_IFS
6384 
6385   ;;
6386 esac
6387 fi
6388 COMM=$ac_cv_path_COMM
6389 if test -n "$COMM"; then
6390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6391 $as_echo "$COMM" >&6; }
6392 else
6393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6394 $as_echo "no" >&6; }
6395 fi
6396 
6397 
6398           if test "x$COMM" = x; then
6399             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6400           fi
6401         else
6402           # Otherwise we believe it is a complete path. Use it as it is.
6403           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6404 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6405           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6406 $as_echo_n "checking for COMM... " >&6; }
6407           if test ! -x "$tool_specified"; then
6408             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6409 $as_echo "not found" >&6; }
6410             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6411           fi
6412           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6413 $as_echo "$tool_specified" >&6; }
6414         fi
6415       fi
6416     fi
6417 
6418   fi
6419 
6420 
6421 
6422   if test "x$COMM" = x; then
6423     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6424   fi
6425 
6426 
6427 
6428 
6429 
6430   # Publish this variable in the help.
6431 
6432 
6433   if [ -z "${CP+x}" ]; then
6434     # The variable is not set by user, try to locate tool using the code snippet
6435     for ac_prog in cp
6436 do
6437   # Extract the first word of "$ac_prog", so it can be a program name with args.
6438 set dummy $ac_prog; ac_word=$2
6439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6440 $as_echo_n "checking for $ac_word... " >&6; }
6441 if ${ac_cv_path_CP+:} false; then :
6442   $as_echo_n "(cached) " >&6
6443 else
6444   case $CP in
6445   [\\/]* | ?:[\\/]*)
6446   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6447   ;;
6448   *)
6449   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6450 for as_dir in $PATH
6451 do
6452   IFS=$as_save_IFS
6453   test -z "$as_dir" && as_dir=.
6454     for ac_exec_ext in '' $ac_executable_extensions; do
6455   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6456     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6457     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6458     break 2
6459   fi
6460 done
6461   done
6462 IFS=$as_save_IFS
6463 
6464   ;;
6465 esac
6466 fi
6467 CP=$ac_cv_path_CP
6468 if test -n "$CP"; then
6469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6470 $as_echo "$CP" >&6; }
6471 else
6472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6473 $as_echo "no" >&6; }
6474 fi
6475 
6476 
6477   test -n "$CP" && break
6478 done
6479 
6480   else
6481     # The variable is set, but is it from the command line or the environment?
6482 
6483     # Try to remove the string !CP! from our list.
6484     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6485     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6486       # If it failed, the variable was not from the command line. Ignore it,
6487       # but warn the user (except for BASH, which is always set by the calling BASH).
6488       if test "xCP" != xBASH; then
6489         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6490 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6491       fi
6492       # Try to locate tool using the code snippet
6493       for ac_prog in cp
6494 do
6495   # Extract the first word of "$ac_prog", so it can be a program name with args.
6496 set dummy $ac_prog; ac_word=$2
6497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6498 $as_echo_n "checking for $ac_word... " >&6; }
6499 if ${ac_cv_path_CP+:} false; then :
6500   $as_echo_n "(cached) " >&6
6501 else
6502   case $CP in
6503   [\\/]* | ?:[\\/]*)
6504   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6505   ;;
6506   *)
6507   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6508 for as_dir in $PATH
6509 do
6510   IFS=$as_save_IFS
6511   test -z "$as_dir" && as_dir=.
6512     for ac_exec_ext in '' $ac_executable_extensions; do
6513   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6514     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6515     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6516     break 2
6517   fi
6518 done
6519   done
6520 IFS=$as_save_IFS
6521 
6522   ;;
6523 esac
6524 fi
6525 CP=$ac_cv_path_CP
6526 if test -n "$CP"; then
6527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6528 $as_echo "$CP" >&6; }
6529 else
6530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531 $as_echo "no" >&6; }
6532 fi
6533 
6534 
6535   test -n "$CP" && break
6536 done
6537 
6538     else
6539       # If it succeeded, then it was overridden by the user. We will use it
6540       # for the tool.
6541 
6542       # First remove it from the list of overridden variables, so we can test
6543       # for unknown variables in the end.
6544       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6545 
6546       # Check if we try to supply an empty value
6547       if test "x$CP" = x; then
6548         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6549 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6550         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6551 $as_echo_n "checking for CP... " >&6; }
6552         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6553 $as_echo "disabled" >&6; }
6554       else
6555         # Check if the provided tool contains a complete path.
6556         tool_specified="$CP"
6557         tool_basename="${tool_specified##*/}"
6558         if test "x$tool_basename" = "x$tool_specified"; then
6559           # A command without a complete path is provided, search $PATH.
6560           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6561 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6562           # Extract the first word of "$tool_basename", so it can be a program name with args.
6563 set dummy $tool_basename; ac_word=$2
6564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6565 $as_echo_n "checking for $ac_word... " >&6; }
6566 if ${ac_cv_path_CP+:} false; then :
6567   $as_echo_n "(cached) " >&6
6568 else
6569   case $CP in
6570   [\\/]* | ?:[\\/]*)
6571   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6572   ;;
6573   *)
6574   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6575 for as_dir in $PATH
6576 do
6577   IFS=$as_save_IFS
6578   test -z "$as_dir" && as_dir=.
6579     for ac_exec_ext in '' $ac_executable_extensions; do
6580   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6581     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6582     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6583     break 2
6584   fi
6585 done
6586   done
6587 IFS=$as_save_IFS
6588 
6589   ;;
6590 esac
6591 fi
6592 CP=$ac_cv_path_CP
6593 if test -n "$CP"; then
6594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6595 $as_echo "$CP" >&6; }
6596 else
6597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6598 $as_echo "no" >&6; }
6599 fi
6600 
6601 
6602           if test "x$CP" = x; then
6603             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6604           fi
6605         else
6606           # Otherwise we believe it is a complete path. Use it as it is.
6607           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6608 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6609           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6610 $as_echo_n "checking for CP... " >&6; }
6611           if test ! -x "$tool_specified"; then
6612             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6613 $as_echo "not found" >&6; }
6614             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6615           fi
6616           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6617 $as_echo "$tool_specified" >&6; }
6618         fi
6619       fi
6620     fi
6621 
6622   fi
6623 
6624 
6625 
6626   if test "x$CP" = x; then
6627     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6628   fi
6629 
6630 
6631 
6632 
6633 
6634   # Publish this variable in the help.
6635 
6636 
6637   if [ -z "${CUT+x}" ]; then
6638     # The variable is not set by user, try to locate tool using the code snippet
6639     for ac_prog in cut
6640 do
6641   # Extract the first word of "$ac_prog", so it can be a program name with args.
6642 set dummy $ac_prog; ac_word=$2
6643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6644 $as_echo_n "checking for $ac_word... " >&6; }
6645 if ${ac_cv_path_CUT+:} false; then :
6646   $as_echo_n "(cached) " >&6
6647 else
6648   case $CUT in
6649   [\\/]* | ?:[\\/]*)
6650   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6651   ;;
6652   *)
6653   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6654 for as_dir in $PATH
6655 do
6656   IFS=$as_save_IFS
6657   test -z "$as_dir" && as_dir=.
6658     for ac_exec_ext in '' $ac_executable_extensions; do
6659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6660     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6662     break 2
6663   fi
6664 done
6665   done
6666 IFS=$as_save_IFS
6667 
6668   ;;
6669 esac
6670 fi
6671 CUT=$ac_cv_path_CUT
6672 if test -n "$CUT"; then
6673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6674 $as_echo "$CUT" >&6; }
6675 else
6676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6677 $as_echo "no" >&6; }
6678 fi
6679 
6680 
6681   test -n "$CUT" && break
6682 done
6683 
6684   else
6685     # The variable is set, but is it from the command line or the environment?
6686 
6687     # Try to remove the string !CUT! from our list.
6688     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6689     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6690       # If it failed, the variable was not from the command line. Ignore it,
6691       # but warn the user (except for BASH, which is always set by the calling BASH).
6692       if test "xCUT" != xBASH; then
6693         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6694 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6695       fi
6696       # Try to locate tool using the code snippet
6697       for ac_prog in cut
6698 do
6699   # Extract the first word of "$ac_prog", so it can be a program name with args.
6700 set dummy $ac_prog; ac_word=$2
6701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6702 $as_echo_n "checking for $ac_word... " >&6; }
6703 if ${ac_cv_path_CUT+:} false; then :
6704   $as_echo_n "(cached) " >&6
6705 else
6706   case $CUT in
6707   [\\/]* | ?:[\\/]*)
6708   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6709   ;;
6710   *)
6711   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6712 for as_dir in $PATH
6713 do
6714   IFS=$as_save_IFS
6715   test -z "$as_dir" && as_dir=.
6716     for ac_exec_ext in '' $ac_executable_extensions; do
6717   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6718     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6719     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6720     break 2
6721   fi
6722 done
6723   done
6724 IFS=$as_save_IFS
6725 
6726   ;;
6727 esac
6728 fi
6729 CUT=$ac_cv_path_CUT
6730 if test -n "$CUT"; then
6731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6732 $as_echo "$CUT" >&6; }
6733 else
6734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6735 $as_echo "no" >&6; }
6736 fi
6737 
6738 
6739   test -n "$CUT" && break
6740 done
6741 
6742     else
6743       # If it succeeded, then it was overridden by the user. We will use it
6744       # for the tool.
6745 
6746       # First remove it from the list of overridden variables, so we can test
6747       # for unknown variables in the end.
6748       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6749 
6750       # Check if we try to supply an empty value
6751       if test "x$CUT" = x; then
6752         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6753 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6754         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6755 $as_echo_n "checking for CUT... " >&6; }
6756         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6757 $as_echo "disabled" >&6; }
6758       else
6759         # Check if the provided tool contains a complete path.
6760         tool_specified="$CUT"
6761         tool_basename="${tool_specified##*/}"
6762         if test "x$tool_basename" = "x$tool_specified"; then
6763           # A command without a complete path is provided, search $PATH.
6764           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6765 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6766           # Extract the first word of "$tool_basename", so it can be a program name with args.
6767 set dummy $tool_basename; ac_word=$2
6768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6769 $as_echo_n "checking for $ac_word... " >&6; }
6770 if ${ac_cv_path_CUT+:} false; then :
6771   $as_echo_n "(cached) " >&6
6772 else
6773   case $CUT in
6774   [\\/]* | ?:[\\/]*)
6775   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6776   ;;
6777   *)
6778   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6779 for as_dir in $PATH
6780 do
6781   IFS=$as_save_IFS
6782   test -z "$as_dir" && as_dir=.
6783     for ac_exec_ext in '' $ac_executable_extensions; do
6784   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6785     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6787     break 2
6788   fi
6789 done
6790   done
6791 IFS=$as_save_IFS
6792 
6793   ;;
6794 esac
6795 fi
6796 CUT=$ac_cv_path_CUT
6797 if test -n "$CUT"; then
6798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6799 $as_echo "$CUT" >&6; }
6800 else
6801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6802 $as_echo "no" >&6; }
6803 fi
6804 
6805 
6806           if test "x$CUT" = x; then
6807             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6808           fi
6809         else
6810           # Otherwise we believe it is a complete path. Use it as it is.
6811           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6812 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6813           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6814 $as_echo_n "checking for CUT... " >&6; }
6815           if test ! -x "$tool_specified"; then
6816             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6817 $as_echo "not found" >&6; }
6818             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6819           fi
6820           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6821 $as_echo "$tool_specified" >&6; }
6822         fi
6823       fi
6824     fi
6825 
6826   fi
6827 
6828 
6829 
6830   if test "x$CUT" = x; then
6831     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6832   fi
6833 
6834 
6835 
6836 
6837 
6838   # Publish this variable in the help.
6839 
6840 
6841   if [ -z "${DATE+x}" ]; then
6842     # The variable is not set by user, try to locate tool using the code snippet
6843     for ac_prog in date
6844 do
6845   # Extract the first word of "$ac_prog", so it can be a program name with args.
6846 set dummy $ac_prog; ac_word=$2
6847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6848 $as_echo_n "checking for $ac_word... " >&6; }
6849 if ${ac_cv_path_DATE+:} false; then :
6850   $as_echo_n "(cached) " >&6
6851 else
6852   case $DATE in
6853   [\\/]* | ?:[\\/]*)
6854   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6855   ;;
6856   *)
6857   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6858 for as_dir in $PATH
6859 do
6860   IFS=$as_save_IFS
6861   test -z "$as_dir" && as_dir=.
6862     for ac_exec_ext in '' $ac_executable_extensions; do
6863   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6864     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6865     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6866     break 2
6867   fi
6868 done
6869   done
6870 IFS=$as_save_IFS
6871 
6872   ;;
6873 esac
6874 fi
6875 DATE=$ac_cv_path_DATE
6876 if test -n "$DATE"; then
6877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6878 $as_echo "$DATE" >&6; }
6879 else
6880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6881 $as_echo "no" >&6; }
6882 fi
6883 
6884 
6885   test -n "$DATE" && break
6886 done
6887 
6888   else
6889     # The variable is set, but is it from the command line or the environment?
6890 
6891     # Try to remove the string !DATE! from our list.
6892     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6893     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6894       # If it failed, the variable was not from the command line. Ignore it,
6895       # but warn the user (except for BASH, which is always set by the calling BASH).
6896       if test "xDATE" != xBASH; then
6897         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6898 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6899       fi
6900       # Try to locate tool using the code snippet
6901       for ac_prog in date
6902 do
6903   # Extract the first word of "$ac_prog", so it can be a program name with args.
6904 set dummy $ac_prog; ac_word=$2
6905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6906 $as_echo_n "checking for $ac_word... " >&6; }
6907 if ${ac_cv_path_DATE+:} false; then :
6908   $as_echo_n "(cached) " >&6
6909 else
6910   case $DATE in
6911   [\\/]* | ?:[\\/]*)
6912   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6913   ;;
6914   *)
6915   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6916 for as_dir in $PATH
6917 do
6918   IFS=$as_save_IFS
6919   test -z "$as_dir" && as_dir=.
6920     for ac_exec_ext in '' $ac_executable_extensions; do
6921   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6922     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6923     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6924     break 2
6925   fi
6926 done
6927   done
6928 IFS=$as_save_IFS
6929 
6930   ;;
6931 esac
6932 fi
6933 DATE=$ac_cv_path_DATE
6934 if test -n "$DATE"; then
6935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6936 $as_echo "$DATE" >&6; }
6937 else
6938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6939 $as_echo "no" >&6; }
6940 fi
6941 
6942 
6943   test -n "$DATE" && break
6944 done
6945 
6946     else
6947       # If it succeeded, then it was overridden by the user. We will use it
6948       # for the tool.
6949 
6950       # First remove it from the list of overridden variables, so we can test
6951       # for unknown variables in the end.
6952       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6953 
6954       # Check if we try to supply an empty value
6955       if test "x$DATE" = x; then
6956         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6957 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6958         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6959 $as_echo_n "checking for DATE... " >&6; }
6960         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6961 $as_echo "disabled" >&6; }
6962       else
6963         # Check if the provided tool contains a complete path.
6964         tool_specified="$DATE"
6965         tool_basename="${tool_specified##*/}"
6966         if test "x$tool_basename" = "x$tool_specified"; then
6967           # A command without a complete path is provided, search $PATH.
6968           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6969 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6970           # Extract the first word of "$tool_basename", so it can be a program name with args.
6971 set dummy $tool_basename; ac_word=$2
6972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6973 $as_echo_n "checking for $ac_word... " >&6; }
6974 if ${ac_cv_path_DATE+:} false; then :
6975   $as_echo_n "(cached) " >&6
6976 else
6977   case $DATE in
6978   [\\/]* | ?:[\\/]*)
6979   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6980   ;;
6981   *)
6982   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6983 for as_dir in $PATH
6984 do
6985   IFS=$as_save_IFS
6986   test -z "$as_dir" && as_dir=.
6987     for ac_exec_ext in '' $ac_executable_extensions; do
6988   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6989     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6991     break 2
6992   fi
6993 done
6994   done
6995 IFS=$as_save_IFS
6996 
6997   ;;
6998 esac
6999 fi
7000 DATE=$ac_cv_path_DATE
7001 if test -n "$DATE"; then
7002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7003 $as_echo "$DATE" >&6; }
7004 else
7005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7006 $as_echo "no" >&6; }
7007 fi
7008 
7009 
7010           if test "x$DATE" = x; then
7011             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7012           fi
7013         else
7014           # Otherwise we believe it is a complete path. Use it as it is.
7015           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7016 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7017           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7018 $as_echo_n "checking for DATE... " >&6; }
7019           if test ! -x "$tool_specified"; then
7020             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7021 $as_echo "not found" >&6; }
7022             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7023           fi
7024           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7025 $as_echo "$tool_specified" >&6; }
7026         fi
7027       fi
7028     fi
7029 
7030   fi
7031 
7032 
7033 
7034   if test "x$DATE" = x; then
7035     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7036   fi
7037 
7038 
7039 
7040 
7041 
7042   # Publish this variable in the help.
7043 
7044 
7045   if [ -z "${DIFF+x}" ]; then
7046     # The variable is not set by user, try to locate tool using the code snippet
7047     for ac_prog in gdiff diff
7048 do
7049   # Extract the first word of "$ac_prog", so it can be a program name with args.
7050 set dummy $ac_prog; ac_word=$2
7051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7052 $as_echo_n "checking for $ac_word... " >&6; }
7053 if ${ac_cv_path_DIFF+:} false; then :
7054   $as_echo_n "(cached) " >&6
7055 else
7056   case $DIFF in
7057   [\\/]* | ?:[\\/]*)
7058   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7059   ;;
7060   *)
7061   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7062 for as_dir in $PATH
7063 do
7064   IFS=$as_save_IFS
7065   test -z "$as_dir" && as_dir=.
7066     for ac_exec_ext in '' $ac_executable_extensions; do
7067   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7068     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7069     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7070     break 2
7071   fi
7072 done
7073   done
7074 IFS=$as_save_IFS
7075 
7076   ;;
7077 esac
7078 fi
7079 DIFF=$ac_cv_path_DIFF
7080 if test -n "$DIFF"; then
7081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7082 $as_echo "$DIFF" >&6; }
7083 else
7084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7085 $as_echo "no" >&6; }
7086 fi
7087 
7088 
7089   test -n "$DIFF" && break
7090 done
7091 
7092   else
7093     # The variable is set, but is it from the command line or the environment?
7094 
7095     # Try to remove the string !DIFF! from our list.
7096     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7097     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7098       # If it failed, the variable was not from the command line. Ignore it,
7099       # but warn the user (except for BASH, which is always set by the calling BASH).
7100       if test "xDIFF" != xBASH; then
7101         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7102 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7103       fi
7104       # Try to locate tool using the code snippet
7105       for ac_prog in gdiff diff
7106 do
7107   # Extract the first word of "$ac_prog", so it can be a program name with args.
7108 set dummy $ac_prog; ac_word=$2
7109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7110 $as_echo_n "checking for $ac_word... " >&6; }
7111 if ${ac_cv_path_DIFF+:} false; then :
7112   $as_echo_n "(cached) " >&6
7113 else
7114   case $DIFF in
7115   [\\/]* | ?:[\\/]*)
7116   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7117   ;;
7118   *)
7119   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7120 for as_dir in $PATH
7121 do
7122   IFS=$as_save_IFS
7123   test -z "$as_dir" && as_dir=.
7124     for ac_exec_ext in '' $ac_executable_extensions; do
7125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7126     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7128     break 2
7129   fi
7130 done
7131   done
7132 IFS=$as_save_IFS
7133 
7134   ;;
7135 esac
7136 fi
7137 DIFF=$ac_cv_path_DIFF
7138 if test -n "$DIFF"; then
7139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7140 $as_echo "$DIFF" >&6; }
7141 else
7142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7143 $as_echo "no" >&6; }
7144 fi
7145 
7146 
7147   test -n "$DIFF" && break
7148 done
7149 
7150     else
7151       # If it succeeded, then it was overridden by the user. We will use it
7152       # for the tool.
7153 
7154       # First remove it from the list of overridden variables, so we can test
7155       # for unknown variables in the end.
7156       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7157 
7158       # Check if we try to supply an empty value
7159       if test "x$DIFF" = x; then
7160         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7161 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7162         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7163 $as_echo_n "checking for DIFF... " >&6; }
7164         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7165 $as_echo "disabled" >&6; }
7166       else
7167         # Check if the provided tool contains a complete path.
7168         tool_specified="$DIFF"
7169         tool_basename="${tool_specified##*/}"
7170         if test "x$tool_basename" = "x$tool_specified"; then
7171           # A command without a complete path is provided, search $PATH.
7172           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7173 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7174           # Extract the first word of "$tool_basename", so it can be a program name with args.
7175 set dummy $tool_basename; ac_word=$2
7176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7177 $as_echo_n "checking for $ac_word... " >&6; }
7178 if ${ac_cv_path_DIFF+:} false; then :
7179   $as_echo_n "(cached) " >&6
7180 else
7181   case $DIFF in
7182   [\\/]* | ?:[\\/]*)
7183   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7184   ;;
7185   *)
7186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7187 for as_dir in $PATH
7188 do
7189   IFS=$as_save_IFS
7190   test -z "$as_dir" && as_dir=.
7191     for ac_exec_ext in '' $ac_executable_extensions; do
7192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7193     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7195     break 2
7196   fi
7197 done
7198   done
7199 IFS=$as_save_IFS
7200 
7201   ;;
7202 esac
7203 fi
7204 DIFF=$ac_cv_path_DIFF
7205 if test -n "$DIFF"; then
7206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7207 $as_echo "$DIFF" >&6; }
7208 else
7209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7210 $as_echo "no" >&6; }
7211 fi
7212 
7213 
7214           if test "x$DIFF" = x; then
7215             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7216           fi
7217         else
7218           # Otherwise we believe it is a complete path. Use it as it is.
7219           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7220 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7221           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7222 $as_echo_n "checking for DIFF... " >&6; }
7223           if test ! -x "$tool_specified"; then
7224             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7225 $as_echo "not found" >&6; }
7226             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7227           fi
7228           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7229 $as_echo "$tool_specified" >&6; }
7230         fi
7231       fi
7232     fi
7233 
7234   fi
7235 
7236 
7237 
7238   if test "x$DIFF" = x; then
7239     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7240   fi
7241 
7242 
7243 
7244 
7245 
7246   # Publish this variable in the help.
7247 
7248 
7249   if [ -z "${DIRNAME+x}" ]; then
7250     # The variable is not set by user, try to locate tool using the code snippet
7251     for ac_prog in dirname
7252 do
7253   # Extract the first word of "$ac_prog", so it can be a program name with args.
7254 set dummy $ac_prog; ac_word=$2
7255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7256 $as_echo_n "checking for $ac_word... " >&6; }
7257 if ${ac_cv_path_DIRNAME+:} false; then :
7258   $as_echo_n "(cached) " >&6
7259 else
7260   case $DIRNAME in
7261   [\\/]* | ?:[\\/]*)
7262   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7263   ;;
7264   *)
7265   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7266 for as_dir in $PATH
7267 do
7268   IFS=$as_save_IFS
7269   test -z "$as_dir" && as_dir=.
7270     for ac_exec_ext in '' $ac_executable_extensions; do
7271   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7272     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7273     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7274     break 2
7275   fi
7276 done
7277   done
7278 IFS=$as_save_IFS
7279 
7280   ;;
7281 esac
7282 fi
7283 DIRNAME=$ac_cv_path_DIRNAME
7284 if test -n "$DIRNAME"; then
7285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7286 $as_echo "$DIRNAME" >&6; }
7287 else
7288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7289 $as_echo "no" >&6; }
7290 fi
7291 
7292 
7293   test -n "$DIRNAME" && break
7294 done
7295 
7296   else
7297     # The variable is set, but is it from the command line or the environment?
7298 
7299     # Try to remove the string !DIRNAME! from our list.
7300     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7301     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7302       # If it failed, the variable was not from the command line. Ignore it,
7303       # but warn the user (except for BASH, which is always set by the calling BASH).
7304       if test "xDIRNAME" != xBASH; then
7305         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7306 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7307       fi
7308       # Try to locate tool using the code snippet
7309       for ac_prog in dirname
7310 do
7311   # Extract the first word of "$ac_prog", so it can be a program name with args.
7312 set dummy $ac_prog; ac_word=$2
7313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7314 $as_echo_n "checking for $ac_word... " >&6; }
7315 if ${ac_cv_path_DIRNAME+:} false; then :
7316   $as_echo_n "(cached) " >&6
7317 else
7318   case $DIRNAME in
7319   [\\/]* | ?:[\\/]*)
7320   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7321   ;;
7322   *)
7323   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7324 for as_dir in $PATH
7325 do
7326   IFS=$as_save_IFS
7327   test -z "$as_dir" && as_dir=.
7328     for ac_exec_ext in '' $ac_executable_extensions; do
7329   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7330     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7331     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7332     break 2
7333   fi
7334 done
7335   done
7336 IFS=$as_save_IFS
7337 
7338   ;;
7339 esac
7340 fi
7341 DIRNAME=$ac_cv_path_DIRNAME
7342 if test -n "$DIRNAME"; then
7343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7344 $as_echo "$DIRNAME" >&6; }
7345 else
7346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7347 $as_echo "no" >&6; }
7348 fi
7349 
7350 
7351   test -n "$DIRNAME" && break
7352 done
7353 
7354     else
7355       # If it succeeded, then it was overridden by the user. We will use it
7356       # for the tool.
7357 
7358       # First remove it from the list of overridden variables, so we can test
7359       # for unknown variables in the end.
7360       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7361 
7362       # Check if we try to supply an empty value
7363       if test "x$DIRNAME" = x; then
7364         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7365 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7366         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7367 $as_echo_n "checking for DIRNAME... " >&6; }
7368         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7369 $as_echo "disabled" >&6; }
7370       else
7371         # Check if the provided tool contains a complete path.
7372         tool_specified="$DIRNAME"
7373         tool_basename="${tool_specified##*/}"
7374         if test "x$tool_basename" = "x$tool_specified"; then
7375           # A command without a complete path is provided, search $PATH.
7376           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7377 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7378           # Extract the first word of "$tool_basename", so it can be a program name with args.
7379 set dummy $tool_basename; ac_word=$2
7380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7381 $as_echo_n "checking for $ac_word... " >&6; }
7382 if ${ac_cv_path_DIRNAME+:} false; then :
7383   $as_echo_n "(cached) " >&6
7384 else
7385   case $DIRNAME in
7386   [\\/]* | ?:[\\/]*)
7387   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7388   ;;
7389   *)
7390   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7391 for as_dir in $PATH
7392 do
7393   IFS=$as_save_IFS
7394   test -z "$as_dir" && as_dir=.
7395     for ac_exec_ext in '' $ac_executable_extensions; do
7396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7397     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7399     break 2
7400   fi
7401 done
7402   done
7403 IFS=$as_save_IFS
7404 
7405   ;;
7406 esac
7407 fi
7408 DIRNAME=$ac_cv_path_DIRNAME
7409 if test -n "$DIRNAME"; then
7410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7411 $as_echo "$DIRNAME" >&6; }
7412 else
7413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7414 $as_echo "no" >&6; }
7415 fi
7416 
7417 
7418           if test "x$DIRNAME" = x; then
7419             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7420           fi
7421         else
7422           # Otherwise we believe it is a complete path. Use it as it is.
7423           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7424 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7425           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7426 $as_echo_n "checking for DIRNAME... " >&6; }
7427           if test ! -x "$tool_specified"; then
7428             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7429 $as_echo "not found" >&6; }
7430             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7431           fi
7432           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7433 $as_echo "$tool_specified" >&6; }
7434         fi
7435       fi
7436     fi
7437 
7438   fi
7439 
7440 
7441 
7442   if test "x$DIRNAME" = x; then
7443     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7444   fi
7445 
7446 
7447 
7448 
7449 
7450   # Publish this variable in the help.
7451 
7452 
7453   if [ -z "${ECHO+x}" ]; then
7454     # The variable is not set by user, try to locate tool using the code snippet
7455     for ac_prog in echo
7456 do
7457   # Extract the first word of "$ac_prog", so it can be a program name with args.
7458 set dummy $ac_prog; ac_word=$2
7459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7460 $as_echo_n "checking for $ac_word... " >&6; }
7461 if ${ac_cv_path_ECHO+:} false; then :
7462   $as_echo_n "(cached) " >&6
7463 else
7464   case $ECHO in
7465   [\\/]* | ?:[\\/]*)
7466   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7467   ;;
7468   *)
7469   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7470 for as_dir in $PATH
7471 do
7472   IFS=$as_save_IFS
7473   test -z "$as_dir" && as_dir=.
7474     for ac_exec_ext in '' $ac_executable_extensions; do
7475   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7476     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7478     break 2
7479   fi
7480 done
7481   done
7482 IFS=$as_save_IFS
7483 
7484   ;;
7485 esac
7486 fi
7487 ECHO=$ac_cv_path_ECHO
7488 if test -n "$ECHO"; then
7489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7490 $as_echo "$ECHO" >&6; }
7491 else
7492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7493 $as_echo "no" >&6; }
7494 fi
7495 
7496 
7497   test -n "$ECHO" && break
7498 done
7499 
7500   else
7501     # The variable is set, but is it from the command line or the environment?
7502 
7503     # Try to remove the string !ECHO! from our list.
7504     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7505     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7506       # If it failed, the variable was not from the command line. Ignore it,
7507       # but warn the user (except for BASH, which is always set by the calling BASH).
7508       if test "xECHO" != xBASH; then
7509         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7510 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7511       fi
7512       # Try to locate tool using the code snippet
7513       for ac_prog in echo
7514 do
7515   # Extract the first word of "$ac_prog", so it can be a program name with args.
7516 set dummy $ac_prog; ac_word=$2
7517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7518 $as_echo_n "checking for $ac_word... " >&6; }
7519 if ${ac_cv_path_ECHO+:} false; then :
7520   $as_echo_n "(cached) " >&6
7521 else
7522   case $ECHO in
7523   [\\/]* | ?:[\\/]*)
7524   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7525   ;;
7526   *)
7527   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7528 for as_dir in $PATH
7529 do
7530   IFS=$as_save_IFS
7531   test -z "$as_dir" && as_dir=.
7532     for ac_exec_ext in '' $ac_executable_extensions; do
7533   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7534     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7535     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7536     break 2
7537   fi
7538 done
7539   done
7540 IFS=$as_save_IFS
7541 
7542   ;;
7543 esac
7544 fi
7545 ECHO=$ac_cv_path_ECHO
7546 if test -n "$ECHO"; then
7547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7548 $as_echo "$ECHO" >&6; }
7549 else
7550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7551 $as_echo "no" >&6; }
7552 fi
7553 
7554 
7555   test -n "$ECHO" && break
7556 done
7557 
7558     else
7559       # If it succeeded, then it was overridden by the user. We will use it
7560       # for the tool.
7561 
7562       # First remove it from the list of overridden variables, so we can test
7563       # for unknown variables in the end.
7564       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7565 
7566       # Check if we try to supply an empty value
7567       if test "x$ECHO" = x; then
7568         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7569 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7570         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7571 $as_echo_n "checking for ECHO... " >&6; }
7572         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7573 $as_echo "disabled" >&6; }
7574       else
7575         # Check if the provided tool contains a complete path.
7576         tool_specified="$ECHO"
7577         tool_basename="${tool_specified##*/}"
7578         if test "x$tool_basename" = "x$tool_specified"; then
7579           # A command without a complete path is provided, search $PATH.
7580           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7581 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7582           # Extract the first word of "$tool_basename", so it can be a program name with args.
7583 set dummy $tool_basename; ac_word=$2
7584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7585 $as_echo_n "checking for $ac_word... " >&6; }
7586 if ${ac_cv_path_ECHO+:} false; then :
7587   $as_echo_n "(cached) " >&6
7588 else
7589   case $ECHO in
7590   [\\/]* | ?:[\\/]*)
7591   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7592   ;;
7593   *)
7594   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7595 for as_dir in $PATH
7596 do
7597   IFS=$as_save_IFS
7598   test -z "$as_dir" && as_dir=.
7599     for ac_exec_ext in '' $ac_executable_extensions; do
7600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7601     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7603     break 2
7604   fi
7605 done
7606   done
7607 IFS=$as_save_IFS
7608 
7609   ;;
7610 esac
7611 fi
7612 ECHO=$ac_cv_path_ECHO
7613 if test -n "$ECHO"; then
7614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7615 $as_echo "$ECHO" >&6; }
7616 else
7617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7618 $as_echo "no" >&6; }
7619 fi
7620 
7621 
7622           if test "x$ECHO" = x; then
7623             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7624           fi
7625         else
7626           # Otherwise we believe it is a complete path. Use it as it is.
7627           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7628 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7629           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7630 $as_echo_n "checking for ECHO... " >&6; }
7631           if test ! -x "$tool_specified"; then
7632             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7633 $as_echo "not found" >&6; }
7634             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7635           fi
7636           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7637 $as_echo "$tool_specified" >&6; }
7638         fi
7639       fi
7640     fi
7641 
7642   fi
7643 
7644 
7645 
7646   if test "x$ECHO" = x; then
7647     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7648   fi
7649 
7650 
7651 
7652 
7653 
7654   # Publish this variable in the help.
7655 
7656 
7657   if [ -z "${EXPR+x}" ]; then
7658     # The variable is not set by user, try to locate tool using the code snippet
7659     for ac_prog in expr
7660 do
7661   # Extract the first word of "$ac_prog", so it can be a program name with args.
7662 set dummy $ac_prog; ac_word=$2
7663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7664 $as_echo_n "checking for $ac_word... " >&6; }
7665 if ${ac_cv_path_EXPR+:} false; then :
7666   $as_echo_n "(cached) " >&6
7667 else
7668   case $EXPR in
7669   [\\/]* | ?:[\\/]*)
7670   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7671   ;;
7672   *)
7673   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7674 for as_dir in $PATH
7675 do
7676   IFS=$as_save_IFS
7677   test -z "$as_dir" && as_dir=.
7678     for ac_exec_ext in '' $ac_executable_extensions; do
7679   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7680     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7681     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7682     break 2
7683   fi
7684 done
7685   done
7686 IFS=$as_save_IFS
7687 
7688   ;;
7689 esac
7690 fi
7691 EXPR=$ac_cv_path_EXPR
7692 if test -n "$EXPR"; then
7693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7694 $as_echo "$EXPR" >&6; }
7695 else
7696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7697 $as_echo "no" >&6; }
7698 fi
7699 
7700 
7701   test -n "$EXPR" && break
7702 done
7703 
7704   else
7705     # The variable is set, but is it from the command line or the environment?
7706 
7707     # Try to remove the string !EXPR! from our list.
7708     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7709     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7710       # If it failed, the variable was not from the command line. Ignore it,
7711       # but warn the user (except for BASH, which is always set by the calling BASH).
7712       if test "xEXPR" != xBASH; then
7713         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7714 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7715       fi
7716       # Try to locate tool using the code snippet
7717       for ac_prog in expr
7718 do
7719   # Extract the first word of "$ac_prog", so it can be a program name with args.
7720 set dummy $ac_prog; ac_word=$2
7721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7722 $as_echo_n "checking for $ac_word... " >&6; }
7723 if ${ac_cv_path_EXPR+:} false; then :
7724   $as_echo_n "(cached) " >&6
7725 else
7726   case $EXPR in
7727   [\\/]* | ?:[\\/]*)
7728   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7729   ;;
7730   *)
7731   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7732 for as_dir in $PATH
7733 do
7734   IFS=$as_save_IFS
7735   test -z "$as_dir" && as_dir=.
7736     for ac_exec_ext in '' $ac_executable_extensions; do
7737   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7738     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7739     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7740     break 2
7741   fi
7742 done
7743   done
7744 IFS=$as_save_IFS
7745 
7746   ;;
7747 esac
7748 fi
7749 EXPR=$ac_cv_path_EXPR
7750 if test -n "$EXPR"; then
7751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7752 $as_echo "$EXPR" >&6; }
7753 else
7754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7755 $as_echo "no" >&6; }
7756 fi
7757 
7758 
7759   test -n "$EXPR" && break
7760 done
7761 
7762     else
7763       # If it succeeded, then it was overridden by the user. We will use it
7764       # for the tool.
7765 
7766       # First remove it from the list of overridden variables, so we can test
7767       # for unknown variables in the end.
7768       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7769 
7770       # Check if we try to supply an empty value
7771       if test "x$EXPR" = x; then
7772         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7773 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7774         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7775 $as_echo_n "checking for EXPR... " >&6; }
7776         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7777 $as_echo "disabled" >&6; }
7778       else
7779         # Check if the provided tool contains a complete path.
7780         tool_specified="$EXPR"
7781         tool_basename="${tool_specified##*/}"
7782         if test "x$tool_basename" = "x$tool_specified"; then
7783           # A command without a complete path is provided, search $PATH.
7784           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7785 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7786           # Extract the first word of "$tool_basename", so it can be a program name with args.
7787 set dummy $tool_basename; ac_word=$2
7788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7789 $as_echo_n "checking for $ac_word... " >&6; }
7790 if ${ac_cv_path_EXPR+:} false; then :
7791   $as_echo_n "(cached) " >&6
7792 else
7793   case $EXPR in
7794   [\\/]* | ?:[\\/]*)
7795   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7796   ;;
7797   *)
7798   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7799 for as_dir in $PATH
7800 do
7801   IFS=$as_save_IFS
7802   test -z "$as_dir" && as_dir=.
7803     for ac_exec_ext in '' $ac_executable_extensions; do
7804   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7805     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7806     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7807     break 2
7808   fi
7809 done
7810   done
7811 IFS=$as_save_IFS
7812 
7813   ;;
7814 esac
7815 fi
7816 EXPR=$ac_cv_path_EXPR
7817 if test -n "$EXPR"; then
7818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7819 $as_echo "$EXPR" >&6; }
7820 else
7821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7822 $as_echo "no" >&6; }
7823 fi
7824 
7825 
7826           if test "x$EXPR" = x; then
7827             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7828           fi
7829         else
7830           # Otherwise we believe it is a complete path. Use it as it is.
7831           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7832 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7833           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7834 $as_echo_n "checking for EXPR... " >&6; }
7835           if test ! -x "$tool_specified"; then
7836             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7837 $as_echo "not found" >&6; }
7838             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7839           fi
7840           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7841 $as_echo "$tool_specified" >&6; }
7842         fi
7843       fi
7844     fi
7845 
7846   fi
7847 
7848 
7849 
7850   if test "x$EXPR" = x; then
7851     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7852   fi
7853 
7854 
7855 
7856 
7857 
7858   # Publish this variable in the help.
7859 
7860 
7861   if [ -z "${FILE+x}" ]; then
7862     # The variable is not set by user, try to locate tool using the code snippet
7863     for ac_prog in file
7864 do
7865   # Extract the first word of "$ac_prog", so it can be a program name with args.
7866 set dummy $ac_prog; ac_word=$2
7867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7868 $as_echo_n "checking for $ac_word... " >&6; }
7869 if ${ac_cv_path_FILE+:} false; then :
7870   $as_echo_n "(cached) " >&6
7871 else
7872   case $FILE in
7873   [\\/]* | ?:[\\/]*)
7874   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7875   ;;
7876   *)
7877   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7878 for as_dir in $PATH
7879 do
7880   IFS=$as_save_IFS
7881   test -z "$as_dir" && as_dir=.
7882     for ac_exec_ext in '' $ac_executable_extensions; do
7883   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7884     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7885     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7886     break 2
7887   fi
7888 done
7889   done
7890 IFS=$as_save_IFS
7891 
7892   ;;
7893 esac
7894 fi
7895 FILE=$ac_cv_path_FILE
7896 if test -n "$FILE"; then
7897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7898 $as_echo "$FILE" >&6; }
7899 else
7900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7901 $as_echo "no" >&6; }
7902 fi
7903 
7904 
7905   test -n "$FILE" && break
7906 done
7907 
7908   else
7909     # The variable is set, but is it from the command line or the environment?
7910 
7911     # Try to remove the string !FILE! from our list.
7912     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7913     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7914       # If it failed, the variable was not from the command line. Ignore it,
7915       # but warn the user (except for BASH, which is always set by the calling BASH).
7916       if test "xFILE" != xBASH; then
7917         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7918 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7919       fi
7920       # Try to locate tool using the code snippet
7921       for ac_prog in file
7922 do
7923   # Extract the first word of "$ac_prog", so it can be a program name with args.
7924 set dummy $ac_prog; ac_word=$2
7925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7926 $as_echo_n "checking for $ac_word... " >&6; }
7927 if ${ac_cv_path_FILE+:} false; then :
7928   $as_echo_n "(cached) " >&6
7929 else
7930   case $FILE in
7931   [\\/]* | ?:[\\/]*)
7932   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7933   ;;
7934   *)
7935   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7936 for as_dir in $PATH
7937 do
7938   IFS=$as_save_IFS
7939   test -z "$as_dir" && as_dir=.
7940     for ac_exec_ext in '' $ac_executable_extensions; do
7941   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7942     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7943     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7944     break 2
7945   fi
7946 done
7947   done
7948 IFS=$as_save_IFS
7949 
7950   ;;
7951 esac
7952 fi
7953 FILE=$ac_cv_path_FILE
7954 if test -n "$FILE"; then
7955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7956 $as_echo "$FILE" >&6; }
7957 else
7958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7959 $as_echo "no" >&6; }
7960 fi
7961 
7962 
7963   test -n "$FILE" && break
7964 done
7965 
7966     else
7967       # If it succeeded, then it was overridden by the user. We will use it
7968       # for the tool.
7969 
7970       # First remove it from the list of overridden variables, so we can test
7971       # for unknown variables in the end.
7972       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7973 
7974       # Check if we try to supply an empty value
7975       if test "x$FILE" = x; then
7976         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7977 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7978         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7979 $as_echo_n "checking for FILE... " >&6; }
7980         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7981 $as_echo "disabled" >&6; }
7982       else
7983         # Check if the provided tool contains a complete path.
7984         tool_specified="$FILE"
7985         tool_basename="${tool_specified##*/}"
7986         if test "x$tool_basename" = "x$tool_specified"; then
7987           # A command without a complete path is provided, search $PATH.
7988           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7989 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7990           # Extract the first word of "$tool_basename", so it can be a program name with args.
7991 set dummy $tool_basename; ac_word=$2
7992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7993 $as_echo_n "checking for $ac_word... " >&6; }
7994 if ${ac_cv_path_FILE+:} false; then :
7995   $as_echo_n "(cached) " >&6
7996 else
7997   case $FILE in
7998   [\\/]* | ?:[\\/]*)
7999   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8000   ;;
8001   *)
8002   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8003 for as_dir in $PATH
8004 do
8005   IFS=$as_save_IFS
8006   test -z "$as_dir" && as_dir=.
8007     for ac_exec_ext in '' $ac_executable_extensions; do
8008   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8009     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8010     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8011     break 2
8012   fi
8013 done
8014   done
8015 IFS=$as_save_IFS
8016 
8017   ;;
8018 esac
8019 fi
8020 FILE=$ac_cv_path_FILE
8021 if test -n "$FILE"; then
8022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8023 $as_echo "$FILE" >&6; }
8024 else
8025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8026 $as_echo "no" >&6; }
8027 fi
8028 
8029 
8030           if test "x$FILE" = x; then
8031             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8032           fi
8033         else
8034           # Otherwise we believe it is a complete path. Use it as it is.
8035           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8036 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8037           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8038 $as_echo_n "checking for FILE... " >&6; }
8039           if test ! -x "$tool_specified"; then
8040             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8041 $as_echo "not found" >&6; }
8042             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8043           fi
8044           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8045 $as_echo "$tool_specified" >&6; }
8046         fi
8047       fi
8048     fi
8049 
8050   fi
8051 
8052 
8053 
8054   if test "x$FILE" = x; then
8055     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8056   fi
8057 
8058 
8059 
8060 
8061 
8062   # Publish this variable in the help.
8063 
8064 
8065   if [ -z "${FIND+x}" ]; then
8066     # The variable is not set by user, try to locate tool using the code snippet
8067     for ac_prog in find
8068 do
8069   # Extract the first word of "$ac_prog", so it can be a program name with args.
8070 set dummy $ac_prog; ac_word=$2
8071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8072 $as_echo_n "checking for $ac_word... " >&6; }
8073 if ${ac_cv_path_FIND+:} false; then :
8074   $as_echo_n "(cached) " >&6
8075 else
8076   case $FIND in
8077   [\\/]* | ?:[\\/]*)
8078   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8079   ;;
8080   *)
8081   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8082 for as_dir in $PATH
8083 do
8084   IFS=$as_save_IFS
8085   test -z "$as_dir" && as_dir=.
8086     for ac_exec_ext in '' $ac_executable_extensions; do
8087   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8088     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8089     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8090     break 2
8091   fi
8092 done
8093   done
8094 IFS=$as_save_IFS
8095 
8096   ;;
8097 esac
8098 fi
8099 FIND=$ac_cv_path_FIND
8100 if test -n "$FIND"; then
8101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8102 $as_echo "$FIND" >&6; }
8103 else
8104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8105 $as_echo "no" >&6; }
8106 fi
8107 
8108 
8109   test -n "$FIND" && break
8110 done
8111 
8112   else
8113     # The variable is set, but is it from the command line or the environment?
8114 
8115     # Try to remove the string !FIND! from our list.
8116     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8117     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8118       # If it failed, the variable was not from the command line. Ignore it,
8119       # but warn the user (except for BASH, which is always set by the calling BASH).
8120       if test "xFIND" != xBASH; then
8121         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8122 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8123       fi
8124       # Try to locate tool using the code snippet
8125       for ac_prog in find
8126 do
8127   # Extract the first word of "$ac_prog", so it can be a program name with args.
8128 set dummy $ac_prog; ac_word=$2
8129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8130 $as_echo_n "checking for $ac_word... " >&6; }
8131 if ${ac_cv_path_FIND+:} false; then :
8132   $as_echo_n "(cached) " >&6
8133 else
8134   case $FIND in
8135   [\\/]* | ?:[\\/]*)
8136   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8137   ;;
8138   *)
8139   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8140 for as_dir in $PATH
8141 do
8142   IFS=$as_save_IFS
8143   test -z "$as_dir" && as_dir=.
8144     for ac_exec_ext in '' $ac_executable_extensions; do
8145   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8146     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8147     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8148     break 2
8149   fi
8150 done
8151   done
8152 IFS=$as_save_IFS
8153 
8154   ;;
8155 esac
8156 fi
8157 FIND=$ac_cv_path_FIND
8158 if test -n "$FIND"; then
8159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8160 $as_echo "$FIND" >&6; }
8161 else
8162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8163 $as_echo "no" >&6; }
8164 fi
8165 
8166 
8167   test -n "$FIND" && break
8168 done
8169 
8170     else
8171       # If it succeeded, then it was overridden by the user. We will use it
8172       # for the tool.
8173 
8174       # First remove it from the list of overridden variables, so we can test
8175       # for unknown variables in the end.
8176       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8177 
8178       # Check if we try to supply an empty value
8179       if test "x$FIND" = x; then
8180         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8181 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8182         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8183 $as_echo_n "checking for FIND... " >&6; }
8184         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8185 $as_echo "disabled" >&6; }
8186       else
8187         # Check if the provided tool contains a complete path.
8188         tool_specified="$FIND"
8189         tool_basename="${tool_specified##*/}"
8190         if test "x$tool_basename" = "x$tool_specified"; then
8191           # A command without a complete path is provided, search $PATH.
8192           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8193 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8194           # Extract the first word of "$tool_basename", so it can be a program name with args.
8195 set dummy $tool_basename; ac_word=$2
8196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8197 $as_echo_n "checking for $ac_word... " >&6; }
8198 if ${ac_cv_path_FIND+:} false; then :
8199   $as_echo_n "(cached) " >&6
8200 else
8201   case $FIND in
8202   [\\/]* | ?:[\\/]*)
8203   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8204   ;;
8205   *)
8206   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8207 for as_dir in $PATH
8208 do
8209   IFS=$as_save_IFS
8210   test -z "$as_dir" && as_dir=.
8211     for ac_exec_ext in '' $ac_executable_extensions; do
8212   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8213     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8215     break 2
8216   fi
8217 done
8218   done
8219 IFS=$as_save_IFS
8220 
8221   ;;
8222 esac
8223 fi
8224 FIND=$ac_cv_path_FIND
8225 if test -n "$FIND"; then
8226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8227 $as_echo "$FIND" >&6; }
8228 else
8229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8230 $as_echo "no" >&6; }
8231 fi
8232 
8233 
8234           if test "x$FIND" = x; then
8235             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8236           fi
8237         else
8238           # Otherwise we believe it is a complete path. Use it as it is.
8239           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8240 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8241           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8242 $as_echo_n "checking for FIND... " >&6; }
8243           if test ! -x "$tool_specified"; then
8244             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8245 $as_echo "not found" >&6; }
8246             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8247           fi
8248           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8249 $as_echo "$tool_specified" >&6; }
8250         fi
8251       fi
8252     fi
8253 
8254   fi
8255 
8256 
8257 
8258   if test "x$FIND" = x; then
8259     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8260   fi
8261 
8262 
8263 
8264 
8265 
8266   # Publish this variable in the help.
8267 
8268 
8269   if [ -z "${HEAD+x}" ]; then
8270     # The variable is not set by user, try to locate tool using the code snippet
8271     for ac_prog in head
8272 do
8273   # Extract the first word of "$ac_prog", so it can be a program name with args.
8274 set dummy $ac_prog; ac_word=$2
8275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8276 $as_echo_n "checking for $ac_word... " >&6; }
8277 if ${ac_cv_path_HEAD+:} false; then :
8278   $as_echo_n "(cached) " >&6
8279 else
8280   case $HEAD in
8281   [\\/]* | ?:[\\/]*)
8282   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8283   ;;
8284   *)
8285   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8286 for as_dir in $PATH
8287 do
8288   IFS=$as_save_IFS
8289   test -z "$as_dir" && as_dir=.
8290     for ac_exec_ext in '' $ac_executable_extensions; do
8291   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8292     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8293     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8294     break 2
8295   fi
8296 done
8297   done
8298 IFS=$as_save_IFS
8299 
8300   ;;
8301 esac
8302 fi
8303 HEAD=$ac_cv_path_HEAD
8304 if test -n "$HEAD"; then
8305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8306 $as_echo "$HEAD" >&6; }
8307 else
8308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8309 $as_echo "no" >&6; }
8310 fi
8311 
8312 
8313   test -n "$HEAD" && break
8314 done
8315 
8316   else
8317     # The variable is set, but is it from the command line or the environment?
8318 
8319     # Try to remove the string !HEAD! from our list.
8320     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8321     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8322       # If it failed, the variable was not from the command line. Ignore it,
8323       # but warn the user (except for BASH, which is always set by the calling BASH).
8324       if test "xHEAD" != xBASH; then
8325         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8326 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8327       fi
8328       # Try to locate tool using the code snippet
8329       for ac_prog in head
8330 do
8331   # Extract the first word of "$ac_prog", so it can be a program name with args.
8332 set dummy $ac_prog; ac_word=$2
8333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8334 $as_echo_n "checking for $ac_word... " >&6; }
8335 if ${ac_cv_path_HEAD+:} false; then :
8336   $as_echo_n "(cached) " >&6
8337 else
8338   case $HEAD in
8339   [\\/]* | ?:[\\/]*)
8340   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8341   ;;
8342   *)
8343   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8344 for as_dir in $PATH
8345 do
8346   IFS=$as_save_IFS
8347   test -z "$as_dir" && as_dir=.
8348     for ac_exec_ext in '' $ac_executable_extensions; do
8349   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8350     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8351     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8352     break 2
8353   fi
8354 done
8355   done
8356 IFS=$as_save_IFS
8357 
8358   ;;
8359 esac
8360 fi
8361 HEAD=$ac_cv_path_HEAD
8362 if test -n "$HEAD"; then
8363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8364 $as_echo "$HEAD" >&6; }
8365 else
8366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8367 $as_echo "no" >&6; }
8368 fi
8369 
8370 
8371   test -n "$HEAD" && break
8372 done
8373 
8374     else
8375       # If it succeeded, then it was overridden by the user. We will use it
8376       # for the tool.
8377 
8378       # First remove it from the list of overridden variables, so we can test
8379       # for unknown variables in the end.
8380       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8381 
8382       # Check if we try to supply an empty value
8383       if test "x$HEAD" = x; then
8384         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8385 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8386         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8387 $as_echo_n "checking for HEAD... " >&6; }
8388         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8389 $as_echo "disabled" >&6; }
8390       else
8391         # Check if the provided tool contains a complete path.
8392         tool_specified="$HEAD"
8393         tool_basename="${tool_specified##*/}"
8394         if test "x$tool_basename" = "x$tool_specified"; then
8395           # A command without a complete path is provided, search $PATH.
8396           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8397 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8398           # Extract the first word of "$tool_basename", so it can be a program name with args.
8399 set dummy $tool_basename; ac_word=$2
8400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8401 $as_echo_n "checking for $ac_word... " >&6; }
8402 if ${ac_cv_path_HEAD+:} false; then :
8403   $as_echo_n "(cached) " >&6
8404 else
8405   case $HEAD in
8406   [\\/]* | ?:[\\/]*)
8407   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8408   ;;
8409   *)
8410   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8411 for as_dir in $PATH
8412 do
8413   IFS=$as_save_IFS
8414   test -z "$as_dir" && as_dir=.
8415     for ac_exec_ext in '' $ac_executable_extensions; do
8416   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8417     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8419     break 2
8420   fi
8421 done
8422   done
8423 IFS=$as_save_IFS
8424 
8425   ;;
8426 esac
8427 fi
8428 HEAD=$ac_cv_path_HEAD
8429 if test -n "$HEAD"; then
8430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8431 $as_echo "$HEAD" >&6; }
8432 else
8433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8434 $as_echo "no" >&6; }
8435 fi
8436 
8437 
8438           if test "x$HEAD" = x; then
8439             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8440           fi
8441         else
8442           # Otherwise we believe it is a complete path. Use it as it is.
8443           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8444 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8445           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8446 $as_echo_n "checking for HEAD... " >&6; }
8447           if test ! -x "$tool_specified"; then
8448             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8449 $as_echo "not found" >&6; }
8450             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8451           fi
8452           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8453 $as_echo "$tool_specified" >&6; }
8454         fi
8455       fi
8456     fi
8457 
8458   fi
8459 
8460 
8461 
8462   if test "x$HEAD" = x; then
8463     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8464   fi
8465 
8466 
8467 
8468 
8469 
8470   # Publish this variable in the help.
8471 
8472 
8473   if [ -z "${GUNZIP+x}" ]; then
8474     # The variable is not set by user, try to locate tool using the code snippet
8475     for ac_prog in gunzip
8476 do
8477   # Extract the first word of "$ac_prog", so it can be a program name with args.
8478 set dummy $ac_prog; ac_word=$2
8479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8480 $as_echo_n "checking for $ac_word... " >&6; }
8481 if ${ac_cv_path_GUNZIP+:} false; then :
8482   $as_echo_n "(cached) " >&6
8483 else
8484   case $GUNZIP in
8485   [\\/]* | ?:[\\/]*)
8486   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8487   ;;
8488   *)
8489   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8490 for as_dir in $PATH
8491 do
8492   IFS=$as_save_IFS
8493   test -z "$as_dir" && as_dir=.
8494     for ac_exec_ext in '' $ac_executable_extensions; do
8495   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8496     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8497     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8498     break 2
8499   fi
8500 done
8501   done
8502 IFS=$as_save_IFS
8503 
8504   ;;
8505 esac
8506 fi
8507 GUNZIP=$ac_cv_path_GUNZIP
8508 if test -n "$GUNZIP"; then
8509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8510 $as_echo "$GUNZIP" >&6; }
8511 else
8512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8513 $as_echo "no" >&6; }
8514 fi
8515 
8516 
8517   test -n "$GUNZIP" && break
8518 done
8519 
8520   else
8521     # The variable is set, but is it from the command line or the environment?
8522 
8523     # Try to remove the string !GUNZIP! from our list.
8524     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8525     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8526       # If it failed, the variable was not from the command line. Ignore it,
8527       # but warn the user (except for BASH, which is always set by the calling BASH).
8528       if test "xGUNZIP" != xBASH; then
8529         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8530 $as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8531       fi
8532       # Try to locate tool using the code snippet
8533       for ac_prog in gunzip
8534 do
8535   # Extract the first word of "$ac_prog", so it can be a program name with args.
8536 set dummy $ac_prog; ac_word=$2
8537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8538 $as_echo_n "checking for $ac_word... " >&6; }
8539 if ${ac_cv_path_GUNZIP+:} false; then :
8540   $as_echo_n "(cached) " >&6
8541 else
8542   case $GUNZIP in
8543   [\\/]* | ?:[\\/]*)
8544   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8545   ;;
8546   *)
8547   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8548 for as_dir in $PATH
8549 do
8550   IFS=$as_save_IFS
8551   test -z "$as_dir" && as_dir=.
8552     for ac_exec_ext in '' $ac_executable_extensions; do
8553   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8554     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8555     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8556     break 2
8557   fi
8558 done
8559   done
8560 IFS=$as_save_IFS
8561 
8562   ;;
8563 esac
8564 fi
8565 GUNZIP=$ac_cv_path_GUNZIP
8566 if test -n "$GUNZIP"; then
8567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8568 $as_echo "$GUNZIP" >&6; }
8569 else
8570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8571 $as_echo "no" >&6; }
8572 fi
8573 
8574 
8575   test -n "$GUNZIP" && break
8576 done
8577 
8578     else
8579       # If it succeeded, then it was overridden by the user. We will use it
8580       # for the tool.
8581 
8582       # First remove it from the list of overridden variables, so we can test
8583       # for unknown variables in the end.
8584       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8585 
8586       # Check if we try to supply an empty value
8587       if test "x$GUNZIP" = x; then
8588         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8589 $as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8590         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8591 $as_echo_n "checking for GUNZIP... " >&6; }
8592         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8593 $as_echo "disabled" >&6; }
8594       else
8595         # Check if the provided tool contains a complete path.
8596         tool_specified="$GUNZIP"
8597         tool_basename="${tool_specified##*/}"
8598         if test "x$tool_basename" = "x$tool_specified"; then
8599           # A command without a complete path is provided, search $PATH.
8600           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8601 $as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8602           # Extract the first word of "$tool_basename", so it can be a program name with args.
8603 set dummy $tool_basename; ac_word=$2
8604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8605 $as_echo_n "checking for $ac_word... " >&6; }
8606 if ${ac_cv_path_GUNZIP+:} false; then :
8607   $as_echo_n "(cached) " >&6
8608 else
8609   case $GUNZIP in
8610   [\\/]* | ?:[\\/]*)
8611   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8612   ;;
8613   *)
8614   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8615 for as_dir in $PATH
8616 do
8617   IFS=$as_save_IFS
8618   test -z "$as_dir" && as_dir=.
8619     for ac_exec_ext in '' $ac_executable_extensions; do
8620   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8621     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8622     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8623     break 2
8624   fi
8625 done
8626   done
8627 IFS=$as_save_IFS
8628 
8629   ;;
8630 esac
8631 fi
8632 GUNZIP=$ac_cv_path_GUNZIP
8633 if test -n "$GUNZIP"; then
8634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8635 $as_echo "$GUNZIP" >&6; }
8636 else
8637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8638 $as_echo "no" >&6; }
8639 fi
8640 
8641 
8642           if test "x$GUNZIP" = x; then
8643             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8644           fi
8645         else
8646           # Otherwise we believe it is a complete path. Use it as it is.
8647           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8648 $as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8649           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8650 $as_echo_n "checking for GUNZIP... " >&6; }
8651           if test ! -x "$tool_specified"; then
8652             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8653 $as_echo "not found" >&6; }
8654             as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8655           fi
8656           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8657 $as_echo "$tool_specified" >&6; }
8658         fi
8659       fi
8660     fi
8661 
8662   fi
8663 
8664 
8665 
8666   if test "x$GUNZIP" = x; then
8667     as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8668   fi
8669 
8670 
8671 
8672 
8673 
8674   # Publish this variable in the help.
8675 
8676 
8677   if [ -z "${GZIP+x}" ]; then
8678     # The variable is not set by user, try to locate tool using the code snippet
8679     for ac_prog in pigz gzip
8680 do
8681   # Extract the first word of "$ac_prog", so it can be a program name with args.
8682 set dummy $ac_prog; ac_word=$2
8683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8684 $as_echo_n "checking for $ac_word... " >&6; }
8685 if ${ac_cv_path_GZIP+:} false; then :
8686   $as_echo_n "(cached) " >&6
8687 else
8688   case $GZIP in
8689   [\\/]* | ?:[\\/]*)
8690   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8691   ;;
8692   *)
8693   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8694 for as_dir in $PATH
8695 do
8696   IFS=$as_save_IFS
8697   test -z "$as_dir" && as_dir=.
8698     for ac_exec_ext in '' $ac_executable_extensions; do
8699   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8700     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8701     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8702     break 2
8703   fi
8704 done
8705   done
8706 IFS=$as_save_IFS
8707 
8708   ;;
8709 esac
8710 fi
8711 GZIP=$ac_cv_path_GZIP
8712 if test -n "$GZIP"; then
8713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8714 $as_echo "$GZIP" >&6; }
8715 else
8716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8717 $as_echo "no" >&6; }
8718 fi
8719 
8720 
8721   test -n "$GZIP" && break
8722 done
8723 
8724   else
8725     # The variable is set, but is it from the command line or the environment?
8726 
8727     # Try to remove the string !GZIP! from our list.
8728     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8729     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8730       # If it failed, the variable was not from the command line. Ignore it,
8731       # but warn the user (except for BASH, which is always set by the calling BASH).
8732       if test "xGZIP" != xBASH; then
8733         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8734 $as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8735       fi
8736       # Try to locate tool using the code snippet
8737       for ac_prog in pigz gzip
8738 do
8739   # Extract the first word of "$ac_prog", so it can be a program name with args.
8740 set dummy $ac_prog; ac_word=$2
8741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8742 $as_echo_n "checking for $ac_word... " >&6; }
8743 if ${ac_cv_path_GZIP+:} false; then :
8744   $as_echo_n "(cached) " >&6
8745 else
8746   case $GZIP in
8747   [\\/]* | ?:[\\/]*)
8748   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8749   ;;
8750   *)
8751   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8752 for as_dir in $PATH
8753 do
8754   IFS=$as_save_IFS
8755   test -z "$as_dir" && as_dir=.
8756     for ac_exec_ext in '' $ac_executable_extensions; do
8757   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8758     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8759     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8760     break 2
8761   fi
8762 done
8763   done
8764 IFS=$as_save_IFS
8765 
8766   ;;
8767 esac
8768 fi
8769 GZIP=$ac_cv_path_GZIP
8770 if test -n "$GZIP"; then
8771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8772 $as_echo "$GZIP" >&6; }
8773 else
8774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8775 $as_echo "no" >&6; }
8776 fi
8777 
8778 
8779   test -n "$GZIP" && break
8780 done
8781 
8782     else
8783       # If it succeeded, then it was overridden by the user. We will use it
8784       # for the tool.
8785 
8786       # First remove it from the list of overridden variables, so we can test
8787       # for unknown variables in the end.
8788       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8789 
8790       # Check if we try to supply an empty value
8791       if test "x$GZIP" = x; then
8792         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8793 $as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8794         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8795 $as_echo_n "checking for GZIP... " >&6; }
8796         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8797 $as_echo "disabled" >&6; }
8798       else
8799         # Check if the provided tool contains a complete path.
8800         tool_specified="$GZIP"
8801         tool_basename="${tool_specified##*/}"
8802         if test "x$tool_basename" = "x$tool_specified"; then
8803           # A command without a complete path is provided, search $PATH.
8804           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8805 $as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8806           # Extract the first word of "$tool_basename", so it can be a program name with args.
8807 set dummy $tool_basename; ac_word=$2
8808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8809 $as_echo_n "checking for $ac_word... " >&6; }
8810 if ${ac_cv_path_GZIP+:} false; then :
8811   $as_echo_n "(cached) " >&6
8812 else
8813   case $GZIP in
8814   [\\/]* | ?:[\\/]*)
8815   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8816   ;;
8817   *)
8818   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8819 for as_dir in $PATH
8820 do
8821   IFS=$as_save_IFS
8822   test -z "$as_dir" && as_dir=.
8823     for ac_exec_ext in '' $ac_executable_extensions; do
8824   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8825     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8826     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8827     break 2
8828   fi
8829 done
8830   done
8831 IFS=$as_save_IFS
8832 
8833   ;;
8834 esac
8835 fi
8836 GZIP=$ac_cv_path_GZIP
8837 if test -n "$GZIP"; then
8838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8839 $as_echo "$GZIP" >&6; }
8840 else
8841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8842 $as_echo "no" >&6; }
8843 fi
8844 
8845 
8846           if test "x$GZIP" = x; then
8847             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8848           fi
8849         else
8850           # Otherwise we believe it is a complete path. Use it as it is.
8851           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8852 $as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8853           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8854 $as_echo_n "checking for GZIP... " >&6; }
8855           if test ! -x "$tool_specified"; then
8856             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8857 $as_echo "not found" >&6; }
8858             as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8859           fi
8860           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8861 $as_echo "$tool_specified" >&6; }
8862         fi
8863       fi
8864     fi
8865 
8866   fi
8867 
8868 
8869 
8870   if test "x$GZIP" = x; then
8871     as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8872   fi
8873 
8874 
8875 
8876 
8877 
8878   # Publish this variable in the help.
8879 
8880 
8881   if [ -z "${LN+x}" ]; then
8882     # The variable is not set by user, try to locate tool using the code snippet
8883     for ac_prog in ln
8884 do
8885   # Extract the first word of "$ac_prog", so it can be a program name with args.
8886 set dummy $ac_prog; ac_word=$2
8887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8888 $as_echo_n "checking for $ac_word... " >&6; }
8889 if ${ac_cv_path_LN+:} false; then :
8890   $as_echo_n "(cached) " >&6
8891 else
8892   case $LN in
8893   [\\/]* | ?:[\\/]*)
8894   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8895   ;;
8896   *)
8897   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8898 for as_dir in $PATH
8899 do
8900   IFS=$as_save_IFS
8901   test -z "$as_dir" && as_dir=.
8902     for ac_exec_ext in '' $ac_executable_extensions; do
8903   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8904     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8905     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8906     break 2
8907   fi
8908 done
8909   done
8910 IFS=$as_save_IFS
8911 
8912   ;;
8913 esac
8914 fi
8915 LN=$ac_cv_path_LN
8916 if test -n "$LN"; then
8917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8918 $as_echo "$LN" >&6; }
8919 else
8920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8921 $as_echo "no" >&6; }
8922 fi
8923 
8924 
8925   test -n "$LN" && break
8926 done
8927 
8928   else
8929     # The variable is set, but is it from the command line or the environment?
8930 
8931     # Try to remove the string !LN! from our list.
8932     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8933     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8934       # If it failed, the variable was not from the command line. Ignore it,
8935       # but warn the user (except for BASH, which is always set by the calling BASH).
8936       if test "xLN" != xBASH; then
8937         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8938 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8939       fi
8940       # Try to locate tool using the code snippet
8941       for ac_prog in ln
8942 do
8943   # Extract the first word of "$ac_prog", so it can be a program name with args.
8944 set dummy $ac_prog; ac_word=$2
8945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8946 $as_echo_n "checking for $ac_word... " >&6; }
8947 if ${ac_cv_path_LN+:} false; then :
8948   $as_echo_n "(cached) " >&6
8949 else
8950   case $LN in
8951   [\\/]* | ?:[\\/]*)
8952   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8953   ;;
8954   *)
8955   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8956 for as_dir in $PATH
8957 do
8958   IFS=$as_save_IFS
8959   test -z "$as_dir" && as_dir=.
8960     for ac_exec_ext in '' $ac_executable_extensions; do
8961   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8962     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8963     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8964     break 2
8965   fi
8966 done
8967   done
8968 IFS=$as_save_IFS
8969 
8970   ;;
8971 esac
8972 fi
8973 LN=$ac_cv_path_LN
8974 if test -n "$LN"; then
8975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8976 $as_echo "$LN" >&6; }
8977 else
8978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8979 $as_echo "no" >&6; }
8980 fi
8981 
8982 
8983   test -n "$LN" && break
8984 done
8985 
8986     else
8987       # If it succeeded, then it was overridden by the user. We will use it
8988       # for the tool.
8989 
8990       # First remove it from the list of overridden variables, so we can test
8991       # for unknown variables in the end.
8992       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8993 
8994       # Check if we try to supply an empty value
8995       if test "x$LN" = x; then
8996         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8997 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8998         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8999 $as_echo_n "checking for LN... " >&6; }
9000         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9001 $as_echo "disabled" >&6; }
9002       else
9003         # Check if the provided tool contains a complete path.
9004         tool_specified="$LN"
9005         tool_basename="${tool_specified##*/}"
9006         if test "x$tool_basename" = "x$tool_specified"; then
9007           # A command without a complete path is provided, search $PATH.
9008           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9009 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9010           # Extract the first word of "$tool_basename", so it can be a program name with args.
9011 set dummy $tool_basename; ac_word=$2
9012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9013 $as_echo_n "checking for $ac_word... " >&6; }
9014 if ${ac_cv_path_LN+:} false; then :
9015   $as_echo_n "(cached) " >&6
9016 else
9017   case $LN in
9018   [\\/]* | ?:[\\/]*)
9019   ac_cv_path_LN="$LN" # Let the user override the test with a path.
9020   ;;
9021   *)
9022   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9023 for as_dir in $PATH
9024 do
9025   IFS=$as_save_IFS
9026   test -z "$as_dir" && as_dir=.
9027     for ac_exec_ext in '' $ac_executable_extensions; do
9028   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9029     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9030     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9031     break 2
9032   fi
9033 done
9034   done
9035 IFS=$as_save_IFS
9036 
9037   ;;
9038 esac
9039 fi
9040 LN=$ac_cv_path_LN
9041 if test -n "$LN"; then
9042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9043 $as_echo "$LN" >&6; }
9044 else
9045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9046 $as_echo "no" >&6; }
9047 fi
9048 
9049 
9050           if test "x$LN" = x; then
9051             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9052           fi
9053         else
9054           # Otherwise we believe it is a complete path. Use it as it is.
9055           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9056 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9057           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9058 $as_echo_n "checking for LN... " >&6; }
9059           if test ! -x "$tool_specified"; then
9060             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9061 $as_echo "not found" >&6; }
9062             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9063           fi
9064           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9065 $as_echo "$tool_specified" >&6; }
9066         fi
9067       fi
9068     fi
9069 
9070   fi
9071 
9072 
9073 
9074   if test "x$LN" = x; then
9075     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9076   fi
9077 
9078 
9079 
9080 
9081 
9082   # Publish this variable in the help.
9083 
9084 
9085   if [ -z "${LS+x}" ]; then
9086     # The variable is not set by user, try to locate tool using the code snippet
9087     for ac_prog in ls
9088 do
9089   # Extract the first word of "$ac_prog", so it can be a program name with args.
9090 set dummy $ac_prog; ac_word=$2
9091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9092 $as_echo_n "checking for $ac_word... " >&6; }
9093 if ${ac_cv_path_LS+:} false; then :
9094   $as_echo_n "(cached) " >&6
9095 else
9096   case $LS in
9097   [\\/]* | ?:[\\/]*)
9098   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9099   ;;
9100   *)
9101   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9102 for as_dir in $PATH
9103 do
9104   IFS=$as_save_IFS
9105   test -z "$as_dir" && as_dir=.
9106     for ac_exec_ext in '' $ac_executable_extensions; do
9107   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9108     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9109     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9110     break 2
9111   fi
9112 done
9113   done
9114 IFS=$as_save_IFS
9115 
9116   ;;
9117 esac
9118 fi
9119 LS=$ac_cv_path_LS
9120 if test -n "$LS"; then
9121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9122 $as_echo "$LS" >&6; }
9123 else
9124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9125 $as_echo "no" >&6; }
9126 fi
9127 
9128 
9129   test -n "$LS" && break
9130 done
9131 
9132   else
9133     # The variable is set, but is it from the command line or the environment?
9134 
9135     # Try to remove the string !LS! from our list.
9136     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9137     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9138       # If it failed, the variable was not from the command line. Ignore it,
9139       # but warn the user (except for BASH, which is always set by the calling BASH).
9140       if test "xLS" != xBASH; then
9141         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9142 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9143       fi
9144       # Try to locate tool using the code snippet
9145       for ac_prog in ls
9146 do
9147   # Extract the first word of "$ac_prog", so it can be a program name with args.
9148 set dummy $ac_prog; ac_word=$2
9149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9150 $as_echo_n "checking for $ac_word... " >&6; }
9151 if ${ac_cv_path_LS+:} false; then :
9152   $as_echo_n "(cached) " >&6
9153 else
9154   case $LS in
9155   [\\/]* | ?:[\\/]*)
9156   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9157   ;;
9158   *)
9159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9160 for as_dir in $PATH
9161 do
9162   IFS=$as_save_IFS
9163   test -z "$as_dir" && as_dir=.
9164     for ac_exec_ext in '' $ac_executable_extensions; do
9165   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9166     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9168     break 2
9169   fi
9170 done
9171   done
9172 IFS=$as_save_IFS
9173 
9174   ;;
9175 esac
9176 fi
9177 LS=$ac_cv_path_LS
9178 if test -n "$LS"; then
9179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9180 $as_echo "$LS" >&6; }
9181 else
9182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9183 $as_echo "no" >&6; }
9184 fi
9185 
9186 
9187   test -n "$LS" && break
9188 done
9189 
9190     else
9191       # If it succeeded, then it was overridden by the user. We will use it
9192       # for the tool.
9193 
9194       # First remove it from the list of overridden variables, so we can test
9195       # for unknown variables in the end.
9196       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9197 
9198       # Check if we try to supply an empty value
9199       if test "x$LS" = x; then
9200         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9201 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9202         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9203 $as_echo_n "checking for LS... " >&6; }
9204         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9205 $as_echo "disabled" >&6; }
9206       else
9207         # Check if the provided tool contains a complete path.
9208         tool_specified="$LS"
9209         tool_basename="${tool_specified##*/}"
9210         if test "x$tool_basename" = "x$tool_specified"; then
9211           # A command without a complete path is provided, search $PATH.
9212           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9213 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9214           # Extract the first word of "$tool_basename", so it can be a program name with args.
9215 set dummy $tool_basename; ac_word=$2
9216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9217 $as_echo_n "checking for $ac_word... " >&6; }
9218 if ${ac_cv_path_LS+:} false; then :
9219   $as_echo_n "(cached) " >&6
9220 else
9221   case $LS in
9222   [\\/]* | ?:[\\/]*)
9223   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9224   ;;
9225   *)
9226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9227 for as_dir in $PATH
9228 do
9229   IFS=$as_save_IFS
9230   test -z "$as_dir" && as_dir=.
9231     for ac_exec_ext in '' $ac_executable_extensions; do
9232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9233     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9235     break 2
9236   fi
9237 done
9238   done
9239 IFS=$as_save_IFS
9240 
9241   ;;
9242 esac
9243 fi
9244 LS=$ac_cv_path_LS
9245 if test -n "$LS"; then
9246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9247 $as_echo "$LS" >&6; }
9248 else
9249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9250 $as_echo "no" >&6; }
9251 fi
9252 
9253 
9254           if test "x$LS" = x; then
9255             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9256           fi
9257         else
9258           # Otherwise we believe it is a complete path. Use it as it is.
9259           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9260 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9261           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9262 $as_echo_n "checking for LS... " >&6; }
9263           if test ! -x "$tool_specified"; then
9264             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9265 $as_echo "not found" >&6; }
9266             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9267           fi
9268           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9269 $as_echo "$tool_specified" >&6; }
9270         fi
9271       fi
9272     fi
9273 
9274   fi
9275 
9276 
9277 
9278   if test "x$LS" = x; then
9279     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9280   fi
9281 
9282 
9283 
9284 
9285 
9286   # Publish this variable in the help.
9287 
9288 
9289   if [ -z "${MKDIR+x}" ]; then
9290     # The variable is not set by user, try to locate tool using the code snippet
9291     for ac_prog in mkdir
9292 do
9293   # Extract the first word of "$ac_prog", so it can be a program name with args.
9294 set dummy $ac_prog; ac_word=$2
9295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9296 $as_echo_n "checking for $ac_word... " >&6; }
9297 if ${ac_cv_path_MKDIR+:} false; then :
9298   $as_echo_n "(cached) " >&6
9299 else
9300   case $MKDIR in
9301   [\\/]* | ?:[\\/]*)
9302   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9303   ;;
9304   *)
9305   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9306 for as_dir in $PATH
9307 do
9308   IFS=$as_save_IFS
9309   test -z "$as_dir" && as_dir=.
9310     for ac_exec_ext in '' $ac_executable_extensions; do
9311   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9312     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9313     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9314     break 2
9315   fi
9316 done
9317   done
9318 IFS=$as_save_IFS
9319 
9320   ;;
9321 esac
9322 fi
9323 MKDIR=$ac_cv_path_MKDIR
9324 if test -n "$MKDIR"; then
9325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9326 $as_echo "$MKDIR" >&6; }
9327 else
9328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9329 $as_echo "no" >&6; }
9330 fi
9331 
9332 
9333   test -n "$MKDIR" && break
9334 done
9335 
9336   else
9337     # The variable is set, but is it from the command line or the environment?
9338 
9339     # Try to remove the string !MKDIR! from our list.
9340     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9341     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9342       # If it failed, the variable was not from the command line. Ignore it,
9343       # but warn the user (except for BASH, which is always set by the calling BASH).
9344       if test "xMKDIR" != xBASH; then
9345         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9346 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9347       fi
9348       # Try to locate tool using the code snippet
9349       for ac_prog in mkdir
9350 do
9351   # Extract the first word of "$ac_prog", so it can be a program name with args.
9352 set dummy $ac_prog; ac_word=$2
9353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9354 $as_echo_n "checking for $ac_word... " >&6; }
9355 if ${ac_cv_path_MKDIR+:} false; then :
9356   $as_echo_n "(cached) " >&6
9357 else
9358   case $MKDIR in
9359   [\\/]* | ?:[\\/]*)
9360   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9361   ;;
9362   *)
9363   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9364 for as_dir in $PATH
9365 do
9366   IFS=$as_save_IFS
9367   test -z "$as_dir" && as_dir=.
9368     for ac_exec_ext in '' $ac_executable_extensions; do
9369   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9370     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9371     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9372     break 2
9373   fi
9374 done
9375   done
9376 IFS=$as_save_IFS
9377 
9378   ;;
9379 esac
9380 fi
9381 MKDIR=$ac_cv_path_MKDIR
9382 if test -n "$MKDIR"; then
9383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9384 $as_echo "$MKDIR" >&6; }
9385 else
9386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9387 $as_echo "no" >&6; }
9388 fi
9389 
9390 
9391   test -n "$MKDIR" && break
9392 done
9393 
9394     else
9395       # If it succeeded, then it was overridden by the user. We will use it
9396       # for the tool.
9397 
9398       # First remove it from the list of overridden variables, so we can test
9399       # for unknown variables in the end.
9400       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9401 
9402       # Check if we try to supply an empty value
9403       if test "x$MKDIR" = x; then
9404         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9405 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9406         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9407 $as_echo_n "checking for MKDIR... " >&6; }
9408         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9409 $as_echo "disabled" >&6; }
9410       else
9411         # Check if the provided tool contains a complete path.
9412         tool_specified="$MKDIR"
9413         tool_basename="${tool_specified##*/}"
9414         if test "x$tool_basename" = "x$tool_specified"; then
9415           # A command without a complete path is provided, search $PATH.
9416           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9417 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9418           # Extract the first word of "$tool_basename", so it can be a program name with args.
9419 set dummy $tool_basename; ac_word=$2
9420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9421 $as_echo_n "checking for $ac_word... " >&6; }
9422 if ${ac_cv_path_MKDIR+:} false; then :
9423   $as_echo_n "(cached) " >&6
9424 else
9425   case $MKDIR in
9426   [\\/]* | ?:[\\/]*)
9427   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9428   ;;
9429   *)
9430   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9431 for as_dir in $PATH
9432 do
9433   IFS=$as_save_IFS
9434   test -z "$as_dir" && as_dir=.
9435     for ac_exec_ext in '' $ac_executable_extensions; do
9436   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9437     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9438     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9439     break 2
9440   fi
9441 done
9442   done
9443 IFS=$as_save_IFS
9444 
9445   ;;
9446 esac
9447 fi
9448 MKDIR=$ac_cv_path_MKDIR
9449 if test -n "$MKDIR"; then
9450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9451 $as_echo "$MKDIR" >&6; }
9452 else
9453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9454 $as_echo "no" >&6; }
9455 fi
9456 
9457 
9458           if test "x$MKDIR" = x; then
9459             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9460           fi
9461         else
9462           # Otherwise we believe it is a complete path. Use it as it is.
9463           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9464 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9465           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9466 $as_echo_n "checking for MKDIR... " >&6; }
9467           if test ! -x "$tool_specified"; then
9468             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9469 $as_echo "not found" >&6; }
9470             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9471           fi
9472           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9473 $as_echo "$tool_specified" >&6; }
9474         fi
9475       fi
9476     fi
9477 
9478   fi
9479 
9480 
9481 
9482   if test "x$MKDIR" = x; then
9483     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9484   fi
9485 
9486 
9487 
9488 
9489 
9490   # Publish this variable in the help.
9491 
9492 
9493   if [ -z "${MKTEMP+x}" ]; then
9494     # The variable is not set by user, try to locate tool using the code snippet
9495     for ac_prog in mktemp
9496 do
9497   # Extract the first word of "$ac_prog", so it can be a program name with args.
9498 set dummy $ac_prog; ac_word=$2
9499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9500 $as_echo_n "checking for $ac_word... " >&6; }
9501 if ${ac_cv_path_MKTEMP+:} false; then :
9502   $as_echo_n "(cached) " >&6
9503 else
9504   case $MKTEMP in
9505   [\\/]* | ?:[\\/]*)
9506   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9507   ;;
9508   *)
9509   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9510 for as_dir in $PATH
9511 do
9512   IFS=$as_save_IFS
9513   test -z "$as_dir" && as_dir=.
9514     for ac_exec_ext in '' $ac_executable_extensions; do
9515   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9516     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9517     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9518     break 2
9519   fi
9520 done
9521   done
9522 IFS=$as_save_IFS
9523 
9524   ;;
9525 esac
9526 fi
9527 MKTEMP=$ac_cv_path_MKTEMP
9528 if test -n "$MKTEMP"; then
9529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9530 $as_echo "$MKTEMP" >&6; }
9531 else
9532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9533 $as_echo "no" >&6; }
9534 fi
9535 
9536 
9537   test -n "$MKTEMP" && break
9538 done
9539 
9540   else
9541     # The variable is set, but is it from the command line or the environment?
9542 
9543     # Try to remove the string !MKTEMP! from our list.
9544     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9545     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9546       # If it failed, the variable was not from the command line. Ignore it,
9547       # but warn the user (except for BASH, which is always set by the calling BASH).
9548       if test "xMKTEMP" != xBASH; then
9549         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9550 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9551       fi
9552       # Try to locate tool using the code snippet
9553       for ac_prog in mktemp
9554 do
9555   # Extract the first word of "$ac_prog", so it can be a program name with args.
9556 set dummy $ac_prog; ac_word=$2
9557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9558 $as_echo_n "checking for $ac_word... " >&6; }
9559 if ${ac_cv_path_MKTEMP+:} false; then :
9560   $as_echo_n "(cached) " >&6
9561 else
9562   case $MKTEMP in
9563   [\\/]* | ?:[\\/]*)
9564   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9565   ;;
9566   *)
9567   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9568 for as_dir in $PATH
9569 do
9570   IFS=$as_save_IFS
9571   test -z "$as_dir" && as_dir=.
9572     for ac_exec_ext in '' $ac_executable_extensions; do
9573   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9574     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9576     break 2
9577   fi
9578 done
9579   done
9580 IFS=$as_save_IFS
9581 
9582   ;;
9583 esac
9584 fi
9585 MKTEMP=$ac_cv_path_MKTEMP
9586 if test -n "$MKTEMP"; then
9587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9588 $as_echo "$MKTEMP" >&6; }
9589 else
9590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9591 $as_echo "no" >&6; }
9592 fi
9593 
9594 
9595   test -n "$MKTEMP" && break
9596 done
9597 
9598     else
9599       # If it succeeded, then it was overridden by the user. We will use it
9600       # for the tool.
9601 
9602       # First remove it from the list of overridden variables, so we can test
9603       # for unknown variables in the end.
9604       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9605 
9606       # Check if we try to supply an empty value
9607       if test "x$MKTEMP" = x; then
9608         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9609 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9610         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9611 $as_echo_n "checking for MKTEMP... " >&6; }
9612         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9613 $as_echo "disabled" >&6; }
9614       else
9615         # Check if the provided tool contains a complete path.
9616         tool_specified="$MKTEMP"
9617         tool_basename="${tool_specified##*/}"
9618         if test "x$tool_basename" = "x$tool_specified"; then
9619           # A command without a complete path is provided, search $PATH.
9620           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9621 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9622           # Extract the first word of "$tool_basename", so it can be a program name with args.
9623 set dummy $tool_basename; ac_word=$2
9624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9625 $as_echo_n "checking for $ac_word... " >&6; }
9626 if ${ac_cv_path_MKTEMP+:} false; then :
9627   $as_echo_n "(cached) " >&6
9628 else
9629   case $MKTEMP in
9630   [\\/]* | ?:[\\/]*)
9631   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9632   ;;
9633   *)
9634   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9635 for as_dir in $PATH
9636 do
9637   IFS=$as_save_IFS
9638   test -z "$as_dir" && as_dir=.
9639     for ac_exec_ext in '' $ac_executable_extensions; do
9640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9641     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9643     break 2
9644   fi
9645 done
9646   done
9647 IFS=$as_save_IFS
9648 
9649   ;;
9650 esac
9651 fi
9652 MKTEMP=$ac_cv_path_MKTEMP
9653 if test -n "$MKTEMP"; then
9654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9655 $as_echo "$MKTEMP" >&6; }
9656 else
9657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9658 $as_echo "no" >&6; }
9659 fi
9660 
9661 
9662           if test "x$MKTEMP" = x; then
9663             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9664           fi
9665         else
9666           # Otherwise we believe it is a complete path. Use it as it is.
9667           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9668 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9669           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9670 $as_echo_n "checking for MKTEMP... " >&6; }
9671           if test ! -x "$tool_specified"; then
9672             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9673 $as_echo "not found" >&6; }
9674             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9675           fi
9676           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9677 $as_echo "$tool_specified" >&6; }
9678         fi
9679       fi
9680     fi
9681 
9682   fi
9683 
9684 
9685 
9686   if test "x$MKTEMP" = x; then
9687     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9688   fi
9689 
9690 
9691 
9692 
9693 
9694   # Publish this variable in the help.
9695 
9696 
9697   if [ -z "${MV+x}" ]; then
9698     # The variable is not set by user, try to locate tool using the code snippet
9699     for ac_prog in mv
9700 do
9701   # Extract the first word of "$ac_prog", so it can be a program name with args.
9702 set dummy $ac_prog; ac_word=$2
9703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9704 $as_echo_n "checking for $ac_word... " >&6; }
9705 if ${ac_cv_path_MV+:} false; then :
9706   $as_echo_n "(cached) " >&6
9707 else
9708   case $MV in
9709   [\\/]* | ?:[\\/]*)
9710   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9711   ;;
9712   *)
9713   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9714 for as_dir in $PATH
9715 do
9716   IFS=$as_save_IFS
9717   test -z "$as_dir" && as_dir=.
9718     for ac_exec_ext in '' $ac_executable_extensions; do
9719   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9720     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9721     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9722     break 2
9723   fi
9724 done
9725   done
9726 IFS=$as_save_IFS
9727 
9728   ;;
9729 esac
9730 fi
9731 MV=$ac_cv_path_MV
9732 if test -n "$MV"; then
9733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9734 $as_echo "$MV" >&6; }
9735 else
9736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9737 $as_echo "no" >&6; }
9738 fi
9739 
9740 
9741   test -n "$MV" && break
9742 done
9743 
9744   else
9745     # The variable is set, but is it from the command line or the environment?
9746 
9747     # Try to remove the string !MV! from our list.
9748     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9749     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9750       # If it failed, the variable was not from the command line. Ignore it,
9751       # but warn the user (except for BASH, which is always set by the calling BASH).
9752       if test "xMV" != xBASH; then
9753         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9754 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9755       fi
9756       # Try to locate tool using the code snippet
9757       for ac_prog in mv
9758 do
9759   # Extract the first word of "$ac_prog", so it can be a program name with args.
9760 set dummy $ac_prog; ac_word=$2
9761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9762 $as_echo_n "checking for $ac_word... " >&6; }
9763 if ${ac_cv_path_MV+:} false; then :
9764   $as_echo_n "(cached) " >&6
9765 else
9766   case $MV in
9767   [\\/]* | ?:[\\/]*)
9768   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9769   ;;
9770   *)
9771   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9772 for as_dir in $PATH
9773 do
9774   IFS=$as_save_IFS
9775   test -z "$as_dir" && as_dir=.
9776     for ac_exec_ext in '' $ac_executable_extensions; do
9777   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9778     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9779     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9780     break 2
9781   fi
9782 done
9783   done
9784 IFS=$as_save_IFS
9785 
9786   ;;
9787 esac
9788 fi
9789 MV=$ac_cv_path_MV
9790 if test -n "$MV"; then
9791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9792 $as_echo "$MV" >&6; }
9793 else
9794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9795 $as_echo "no" >&6; }
9796 fi
9797 
9798 
9799   test -n "$MV" && break
9800 done
9801 
9802     else
9803       # If it succeeded, then it was overridden by the user. We will use it
9804       # for the tool.
9805 
9806       # First remove it from the list of overridden variables, so we can test
9807       # for unknown variables in the end.
9808       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9809 
9810       # Check if we try to supply an empty value
9811       if test "x$MV" = x; then
9812         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9813 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9814         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9815 $as_echo_n "checking for MV... " >&6; }
9816         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9817 $as_echo "disabled" >&6; }
9818       else
9819         # Check if the provided tool contains a complete path.
9820         tool_specified="$MV"
9821         tool_basename="${tool_specified##*/}"
9822         if test "x$tool_basename" = "x$tool_specified"; then
9823           # A command without a complete path is provided, search $PATH.
9824           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9825 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9826           # Extract the first word of "$tool_basename", so it can be a program name with args.
9827 set dummy $tool_basename; ac_word=$2
9828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9829 $as_echo_n "checking for $ac_word... " >&6; }
9830 if ${ac_cv_path_MV+:} false; then :
9831   $as_echo_n "(cached) " >&6
9832 else
9833   case $MV in
9834   [\\/]* | ?:[\\/]*)
9835   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9836   ;;
9837   *)
9838   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9839 for as_dir in $PATH
9840 do
9841   IFS=$as_save_IFS
9842   test -z "$as_dir" && as_dir=.
9843     for ac_exec_ext in '' $ac_executable_extensions; do
9844   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9845     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9846     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9847     break 2
9848   fi
9849 done
9850   done
9851 IFS=$as_save_IFS
9852 
9853   ;;
9854 esac
9855 fi
9856 MV=$ac_cv_path_MV
9857 if test -n "$MV"; then
9858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9859 $as_echo "$MV" >&6; }
9860 else
9861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9862 $as_echo "no" >&6; }
9863 fi
9864 
9865 
9866           if test "x$MV" = x; then
9867             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9868           fi
9869         else
9870           # Otherwise we believe it is a complete path. Use it as it is.
9871           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9872 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9873           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9874 $as_echo_n "checking for MV... " >&6; }
9875           if test ! -x "$tool_specified"; then
9876             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9877 $as_echo "not found" >&6; }
9878             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9879           fi
9880           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9881 $as_echo "$tool_specified" >&6; }
9882         fi
9883       fi
9884     fi
9885 
9886   fi
9887 
9888 
9889 
9890   if test "x$MV" = x; then
9891     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9892   fi
9893 
9894 
9895 
9896 
9897 
9898   # Publish this variable in the help.
9899 
9900 
9901   if [ -z "${NAWK+x}" ]; then
9902     # The variable is not set by user, try to locate tool using the code snippet
9903     for ac_prog in nawk gawk awk
9904 do
9905   # Extract the first word of "$ac_prog", so it can be a program name with args.
9906 set dummy $ac_prog; ac_word=$2
9907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9908 $as_echo_n "checking for $ac_word... " >&6; }
9909 if ${ac_cv_path_NAWK+:} false; then :
9910   $as_echo_n "(cached) " >&6
9911 else
9912   case $NAWK in
9913   [\\/]* | ?:[\\/]*)
9914   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9915   ;;
9916   *)
9917   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9918 for as_dir in $PATH
9919 do
9920   IFS=$as_save_IFS
9921   test -z "$as_dir" && as_dir=.
9922     for ac_exec_ext in '' $ac_executable_extensions; do
9923   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9924     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9925     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9926     break 2
9927   fi
9928 done
9929   done
9930 IFS=$as_save_IFS
9931 
9932   ;;
9933 esac
9934 fi
9935 NAWK=$ac_cv_path_NAWK
9936 if test -n "$NAWK"; then
9937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9938 $as_echo "$NAWK" >&6; }
9939 else
9940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9941 $as_echo "no" >&6; }
9942 fi
9943 
9944 
9945   test -n "$NAWK" && break
9946 done
9947 
9948   else
9949     # The variable is set, but is it from the command line or the environment?
9950 
9951     # Try to remove the string !NAWK! from our list.
9952     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9953     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9954       # If it failed, the variable was not from the command line. Ignore it,
9955       # but warn the user (except for BASH, which is always set by the calling BASH).
9956       if test "xNAWK" != xBASH; then
9957         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9958 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9959       fi
9960       # Try to locate tool using the code snippet
9961       for ac_prog in nawk gawk awk
9962 do
9963   # Extract the first word of "$ac_prog", so it can be a program name with args.
9964 set dummy $ac_prog; ac_word=$2
9965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9966 $as_echo_n "checking for $ac_word... " >&6; }
9967 if ${ac_cv_path_NAWK+:} false; then :
9968   $as_echo_n "(cached) " >&6
9969 else
9970   case $NAWK in
9971   [\\/]* | ?:[\\/]*)
9972   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9973   ;;
9974   *)
9975   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9976 for as_dir in $PATH
9977 do
9978   IFS=$as_save_IFS
9979   test -z "$as_dir" && as_dir=.
9980     for ac_exec_ext in '' $ac_executable_extensions; do
9981   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9982     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9983     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9984     break 2
9985   fi
9986 done
9987   done
9988 IFS=$as_save_IFS
9989 
9990   ;;
9991 esac
9992 fi
9993 NAWK=$ac_cv_path_NAWK
9994 if test -n "$NAWK"; then
9995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9996 $as_echo "$NAWK" >&6; }
9997 else
9998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9999 $as_echo "no" >&6; }
10000 fi
10001 
10002 
10003   test -n "$NAWK" && break
10004 done
10005 
10006     else
10007       # If it succeeded, then it was overridden by the user. We will use it
10008       # for the tool.
10009 
10010       # First remove it from the list of overridden variables, so we can test
10011       # for unknown variables in the end.
10012       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10013 
10014       # Check if we try to supply an empty value
10015       if test "x$NAWK" = x; then
10016         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10017 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10018         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10019 $as_echo_n "checking for NAWK... " >&6; }
10020         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10021 $as_echo "disabled" >&6; }
10022       else
10023         # Check if the provided tool contains a complete path.
10024         tool_specified="$NAWK"
10025         tool_basename="${tool_specified##*/}"
10026         if test "x$tool_basename" = "x$tool_specified"; then
10027           # A command without a complete path is provided, search $PATH.
10028           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10029 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10030           # Extract the first word of "$tool_basename", so it can be a program name with args.
10031 set dummy $tool_basename; ac_word=$2
10032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10033 $as_echo_n "checking for $ac_word... " >&6; }
10034 if ${ac_cv_path_NAWK+:} false; then :
10035   $as_echo_n "(cached) " >&6
10036 else
10037   case $NAWK in
10038   [\\/]* | ?:[\\/]*)
10039   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10040   ;;
10041   *)
10042   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10043 for as_dir in $PATH
10044 do
10045   IFS=$as_save_IFS
10046   test -z "$as_dir" && as_dir=.
10047     for ac_exec_ext in '' $ac_executable_extensions; do
10048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10049     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10050     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10051     break 2
10052   fi
10053 done
10054   done
10055 IFS=$as_save_IFS
10056 
10057   ;;
10058 esac
10059 fi
10060 NAWK=$ac_cv_path_NAWK
10061 if test -n "$NAWK"; then
10062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10063 $as_echo "$NAWK" >&6; }
10064 else
10065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10066 $as_echo "no" >&6; }
10067 fi
10068 
10069 
10070           if test "x$NAWK" = x; then
10071             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10072           fi
10073         else
10074           # Otherwise we believe it is a complete path. Use it as it is.
10075           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10076 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10077           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10078 $as_echo_n "checking for NAWK... " >&6; }
10079           if test ! -x "$tool_specified"; then
10080             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10081 $as_echo "not found" >&6; }
10082             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10083           fi
10084           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10085 $as_echo "$tool_specified" >&6; }
10086         fi
10087       fi
10088     fi
10089 
10090   fi
10091 
10092 
10093 
10094   if test "x$NAWK" = x; then
10095     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10096   fi
10097 
10098 
10099 
10100 
10101 
10102   # Publish this variable in the help.
10103 
10104 
10105   if [ -z "${PRINTF+x}" ]; then
10106     # The variable is not set by user, try to locate tool using the code snippet
10107     for ac_prog in printf
10108 do
10109   # Extract the first word of "$ac_prog", so it can be a program name with args.
10110 set dummy $ac_prog; ac_word=$2
10111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10112 $as_echo_n "checking for $ac_word... " >&6; }
10113 if ${ac_cv_path_PRINTF+:} false; then :
10114   $as_echo_n "(cached) " >&6
10115 else
10116   case $PRINTF in
10117   [\\/]* | ?:[\\/]*)
10118   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10119   ;;
10120   *)
10121   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10122 for as_dir in $PATH
10123 do
10124   IFS=$as_save_IFS
10125   test -z "$as_dir" && as_dir=.
10126     for ac_exec_ext in '' $ac_executable_extensions; do
10127   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10128     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10129     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10130     break 2
10131   fi
10132 done
10133   done
10134 IFS=$as_save_IFS
10135 
10136   ;;
10137 esac
10138 fi
10139 PRINTF=$ac_cv_path_PRINTF
10140 if test -n "$PRINTF"; then
10141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10142 $as_echo "$PRINTF" >&6; }
10143 else
10144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10145 $as_echo "no" >&6; }
10146 fi
10147 
10148 
10149   test -n "$PRINTF" && break
10150 done
10151 
10152   else
10153     # The variable is set, but is it from the command line or the environment?
10154 
10155     # Try to remove the string !PRINTF! from our list.
10156     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10157     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10158       # If it failed, the variable was not from the command line. Ignore it,
10159       # but warn the user (except for BASH, which is always set by the calling BASH).
10160       if test "xPRINTF" != xBASH; then
10161         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10162 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10163       fi
10164       # Try to locate tool using the code snippet
10165       for ac_prog in printf
10166 do
10167   # Extract the first word of "$ac_prog", so it can be a program name with args.
10168 set dummy $ac_prog; ac_word=$2
10169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10170 $as_echo_n "checking for $ac_word... " >&6; }
10171 if ${ac_cv_path_PRINTF+:} false; then :
10172   $as_echo_n "(cached) " >&6
10173 else
10174   case $PRINTF in
10175   [\\/]* | ?:[\\/]*)
10176   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10177   ;;
10178   *)
10179   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10180 for as_dir in $PATH
10181 do
10182   IFS=$as_save_IFS
10183   test -z "$as_dir" && as_dir=.
10184     for ac_exec_ext in '' $ac_executable_extensions; do
10185   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10186     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10187     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10188     break 2
10189   fi
10190 done
10191   done
10192 IFS=$as_save_IFS
10193 
10194   ;;
10195 esac
10196 fi
10197 PRINTF=$ac_cv_path_PRINTF
10198 if test -n "$PRINTF"; then
10199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10200 $as_echo "$PRINTF" >&6; }
10201 else
10202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10203 $as_echo "no" >&6; }
10204 fi
10205 
10206 
10207   test -n "$PRINTF" && break
10208 done
10209 
10210     else
10211       # If it succeeded, then it was overridden by the user. We will use it
10212       # for the tool.
10213 
10214       # First remove it from the list of overridden variables, so we can test
10215       # for unknown variables in the end.
10216       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10217 
10218       # Check if we try to supply an empty value
10219       if test "x$PRINTF" = x; then
10220         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10221 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10222         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10223 $as_echo_n "checking for PRINTF... " >&6; }
10224         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10225 $as_echo "disabled" >&6; }
10226       else
10227         # Check if the provided tool contains a complete path.
10228         tool_specified="$PRINTF"
10229         tool_basename="${tool_specified##*/}"
10230         if test "x$tool_basename" = "x$tool_specified"; then
10231           # A command without a complete path is provided, search $PATH.
10232           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10233 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10234           # Extract the first word of "$tool_basename", so it can be a program name with args.
10235 set dummy $tool_basename; ac_word=$2
10236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10237 $as_echo_n "checking for $ac_word... " >&6; }
10238 if ${ac_cv_path_PRINTF+:} false; then :
10239   $as_echo_n "(cached) " >&6
10240 else
10241   case $PRINTF in
10242   [\\/]* | ?:[\\/]*)
10243   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10244   ;;
10245   *)
10246   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10247 for as_dir in $PATH
10248 do
10249   IFS=$as_save_IFS
10250   test -z "$as_dir" && as_dir=.
10251     for ac_exec_ext in '' $ac_executable_extensions; do
10252   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10253     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10255     break 2
10256   fi
10257 done
10258   done
10259 IFS=$as_save_IFS
10260 
10261   ;;
10262 esac
10263 fi
10264 PRINTF=$ac_cv_path_PRINTF
10265 if test -n "$PRINTF"; then
10266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10267 $as_echo "$PRINTF" >&6; }
10268 else
10269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10270 $as_echo "no" >&6; }
10271 fi
10272 
10273 
10274           if test "x$PRINTF" = x; then
10275             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10276           fi
10277         else
10278           # Otherwise we believe it is a complete path. Use it as it is.
10279           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10280 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10281           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10282 $as_echo_n "checking for PRINTF... " >&6; }
10283           if test ! -x "$tool_specified"; then
10284             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10285 $as_echo "not found" >&6; }
10286             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10287           fi
10288           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10289 $as_echo "$tool_specified" >&6; }
10290         fi
10291       fi
10292     fi
10293 
10294   fi
10295 
10296 
10297 
10298   if test "x$PRINTF" = x; then
10299     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10300   fi
10301 
10302 
10303 
10304 
10305 
10306   # Publish this variable in the help.
10307 
10308 
10309   if [ -z "${RM+x}" ]; then
10310     # The variable is not set by user, try to locate tool using the code snippet
10311     for ac_prog in rm
10312 do
10313   # Extract the first word of "$ac_prog", so it can be a program name with args.
10314 set dummy $ac_prog; ac_word=$2
10315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10316 $as_echo_n "checking for $ac_word... " >&6; }
10317 if ${ac_cv_path_RM+:} false; then :
10318   $as_echo_n "(cached) " >&6
10319 else
10320   case $RM in
10321   [\\/]* | ?:[\\/]*)
10322   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10323   ;;
10324   *)
10325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10326 for as_dir in $PATH
10327 do
10328   IFS=$as_save_IFS
10329   test -z "$as_dir" && as_dir=.
10330     for ac_exec_ext in '' $ac_executable_extensions; do
10331   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10332     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10334     break 2
10335   fi
10336 done
10337   done
10338 IFS=$as_save_IFS
10339 
10340   ;;
10341 esac
10342 fi
10343 RM=$ac_cv_path_RM
10344 if test -n "$RM"; then
10345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10346 $as_echo "$RM" >&6; }
10347 else
10348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10349 $as_echo "no" >&6; }
10350 fi
10351 
10352 
10353   test -n "$RM" && break
10354 done
10355 
10356   else
10357     # The variable is set, but is it from the command line or the environment?
10358 
10359     # Try to remove the string !RM! from our list.
10360     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10361     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10362       # If it failed, the variable was not from the command line. Ignore it,
10363       # but warn the user (except for BASH, which is always set by the calling BASH).
10364       if test "xRM" != xBASH; then
10365         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10366 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10367       fi
10368       # Try to locate tool using the code snippet
10369       for ac_prog in rm
10370 do
10371   # Extract the first word of "$ac_prog", so it can be a program name with args.
10372 set dummy $ac_prog; ac_word=$2
10373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10374 $as_echo_n "checking for $ac_word... " >&6; }
10375 if ${ac_cv_path_RM+:} false; then :
10376   $as_echo_n "(cached) " >&6
10377 else
10378   case $RM in
10379   [\\/]* | ?:[\\/]*)
10380   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10381   ;;
10382   *)
10383   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10384 for as_dir in $PATH
10385 do
10386   IFS=$as_save_IFS
10387   test -z "$as_dir" && as_dir=.
10388     for ac_exec_ext in '' $ac_executable_extensions; do
10389   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10390     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10391     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10392     break 2
10393   fi
10394 done
10395   done
10396 IFS=$as_save_IFS
10397 
10398   ;;
10399 esac
10400 fi
10401 RM=$ac_cv_path_RM
10402 if test -n "$RM"; then
10403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10404 $as_echo "$RM" >&6; }
10405 else
10406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10407 $as_echo "no" >&6; }
10408 fi
10409 
10410 
10411   test -n "$RM" && break
10412 done
10413 
10414     else
10415       # If it succeeded, then it was overridden by the user. We will use it
10416       # for the tool.
10417 
10418       # First remove it from the list of overridden variables, so we can test
10419       # for unknown variables in the end.
10420       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10421 
10422       # Check if we try to supply an empty value
10423       if test "x$RM" = x; then
10424         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10425 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10426         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10427 $as_echo_n "checking for RM... " >&6; }
10428         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10429 $as_echo "disabled" >&6; }
10430       else
10431         # Check if the provided tool contains a complete path.
10432         tool_specified="$RM"
10433         tool_basename="${tool_specified##*/}"
10434         if test "x$tool_basename" = "x$tool_specified"; then
10435           # A command without a complete path is provided, search $PATH.
10436           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10437 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10438           # Extract the first word of "$tool_basename", so it can be a program name with args.
10439 set dummy $tool_basename; ac_word=$2
10440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10441 $as_echo_n "checking for $ac_word... " >&6; }
10442 if ${ac_cv_path_RM+:} false; then :
10443   $as_echo_n "(cached) " >&6
10444 else
10445   case $RM in
10446   [\\/]* | ?:[\\/]*)
10447   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10448   ;;
10449   *)
10450   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10451 for as_dir in $PATH
10452 do
10453   IFS=$as_save_IFS
10454   test -z "$as_dir" && as_dir=.
10455     for ac_exec_ext in '' $ac_executable_extensions; do
10456   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10457     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10459     break 2
10460   fi
10461 done
10462   done
10463 IFS=$as_save_IFS
10464 
10465   ;;
10466 esac
10467 fi
10468 RM=$ac_cv_path_RM
10469 if test -n "$RM"; then
10470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10471 $as_echo "$RM" >&6; }
10472 else
10473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10474 $as_echo "no" >&6; }
10475 fi
10476 
10477 
10478           if test "x$RM" = x; then
10479             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10480           fi
10481         else
10482           # Otherwise we believe it is a complete path. Use it as it is.
10483           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10484 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10485           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10486 $as_echo_n "checking for RM... " >&6; }
10487           if test ! -x "$tool_specified"; then
10488             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10489 $as_echo "not found" >&6; }
10490             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10491           fi
10492           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10493 $as_echo "$tool_specified" >&6; }
10494         fi
10495       fi
10496     fi
10497 
10498   fi
10499 
10500 
10501 
10502   if test "x$RM" = x; then
10503     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10504   fi
10505 
10506 
10507 
10508 
10509 
10510   # Publish this variable in the help.
10511 
10512 
10513   if [ -z "${RMDIR+x}" ]; then
10514     # The variable is not set by user, try to locate tool using the code snippet
10515     for ac_prog in rmdir
10516 do
10517   # Extract the first word of "$ac_prog", so it can be a program name with args.
10518 set dummy $ac_prog; ac_word=$2
10519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10520 $as_echo_n "checking for $ac_word... " >&6; }
10521 if ${ac_cv_path_RMDIR+:} false; then :
10522   $as_echo_n "(cached) " >&6
10523 else
10524   case $RMDIR in
10525   [\\/]* | ?:[\\/]*)
10526   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10527   ;;
10528   *)
10529   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10530 for as_dir in $PATH
10531 do
10532   IFS=$as_save_IFS
10533   test -z "$as_dir" && as_dir=.
10534     for ac_exec_ext in '' $ac_executable_extensions; do
10535   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10536     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10537     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10538     break 2
10539   fi
10540 done
10541   done
10542 IFS=$as_save_IFS
10543 
10544   ;;
10545 esac
10546 fi
10547 RMDIR=$ac_cv_path_RMDIR
10548 if test -n "$RMDIR"; then
10549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10550 $as_echo "$RMDIR" >&6; }
10551 else
10552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10553 $as_echo "no" >&6; }
10554 fi
10555 
10556 
10557   test -n "$RMDIR" && break
10558 done
10559 
10560   else
10561     # The variable is set, but is it from the command line or the environment?
10562 
10563     # Try to remove the string !RMDIR! from our list.
10564     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10565     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10566       # If it failed, the variable was not from the command line. Ignore it,
10567       # but warn the user (except for BASH, which is always set by the calling BASH).
10568       if test "xRMDIR" != xBASH; then
10569         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10570 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10571       fi
10572       # Try to locate tool using the code snippet
10573       for ac_prog in rmdir
10574 do
10575   # Extract the first word of "$ac_prog", so it can be a program name with args.
10576 set dummy $ac_prog; ac_word=$2
10577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10578 $as_echo_n "checking for $ac_word... " >&6; }
10579 if ${ac_cv_path_RMDIR+:} false; then :
10580   $as_echo_n "(cached) " >&6
10581 else
10582   case $RMDIR in
10583   [\\/]* | ?:[\\/]*)
10584   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10585   ;;
10586   *)
10587   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10588 for as_dir in $PATH
10589 do
10590   IFS=$as_save_IFS
10591   test -z "$as_dir" && as_dir=.
10592     for ac_exec_ext in '' $ac_executable_extensions; do
10593   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10594     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10595     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10596     break 2
10597   fi
10598 done
10599   done
10600 IFS=$as_save_IFS
10601 
10602   ;;
10603 esac
10604 fi
10605 RMDIR=$ac_cv_path_RMDIR
10606 if test -n "$RMDIR"; then
10607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10608 $as_echo "$RMDIR" >&6; }
10609 else
10610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10611 $as_echo "no" >&6; }
10612 fi
10613 
10614 
10615   test -n "$RMDIR" && break
10616 done
10617 
10618     else
10619       # If it succeeded, then it was overridden by the user. We will use it
10620       # for the tool.
10621 
10622       # First remove it from the list of overridden variables, so we can test
10623       # for unknown variables in the end.
10624       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10625 
10626       # Check if we try to supply an empty value
10627       if test "x$RMDIR" = x; then
10628         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10629 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10630         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10631 $as_echo_n "checking for RMDIR... " >&6; }
10632         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10633 $as_echo "disabled" >&6; }
10634       else
10635         # Check if the provided tool contains a complete path.
10636         tool_specified="$RMDIR"
10637         tool_basename="${tool_specified##*/}"
10638         if test "x$tool_basename" = "x$tool_specified"; then
10639           # A command without a complete path is provided, search $PATH.
10640           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10641 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10642           # Extract the first word of "$tool_basename", so it can be a program name with args.
10643 set dummy $tool_basename; ac_word=$2
10644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10645 $as_echo_n "checking for $ac_word... " >&6; }
10646 if ${ac_cv_path_RMDIR+:} false; then :
10647   $as_echo_n "(cached) " >&6
10648 else
10649   case $RMDIR in
10650   [\\/]* | ?:[\\/]*)
10651   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10652   ;;
10653   *)
10654   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10655 for as_dir in $PATH
10656 do
10657   IFS=$as_save_IFS
10658   test -z "$as_dir" && as_dir=.
10659     for ac_exec_ext in '' $ac_executable_extensions; do
10660   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10661     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10662     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10663     break 2
10664   fi
10665 done
10666   done
10667 IFS=$as_save_IFS
10668 
10669   ;;
10670 esac
10671 fi
10672 RMDIR=$ac_cv_path_RMDIR
10673 if test -n "$RMDIR"; then
10674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10675 $as_echo "$RMDIR" >&6; }
10676 else
10677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10678 $as_echo "no" >&6; }
10679 fi
10680 
10681 
10682           if test "x$RMDIR" = x; then
10683             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10684           fi
10685         else
10686           # Otherwise we believe it is a complete path. Use it as it is.
10687           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10688 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10689           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10690 $as_echo_n "checking for RMDIR... " >&6; }
10691           if test ! -x "$tool_specified"; then
10692             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10693 $as_echo "not found" >&6; }
10694             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10695           fi
10696           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10697 $as_echo "$tool_specified" >&6; }
10698         fi
10699       fi
10700     fi
10701 
10702   fi
10703 
10704 
10705 
10706   if test "x$RMDIR" = x; then
10707     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10708   fi
10709 
10710 
10711 
10712 
10713 
10714   # Publish this variable in the help.
10715 
10716 
10717   if [ -z "${SH+x}" ]; then
10718     # The variable is not set by user, try to locate tool using the code snippet
10719     for ac_prog in sh
10720 do
10721   # Extract the first word of "$ac_prog", so it can be a program name with args.
10722 set dummy $ac_prog; ac_word=$2
10723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10724 $as_echo_n "checking for $ac_word... " >&6; }
10725 if ${ac_cv_path_SH+:} false; then :
10726   $as_echo_n "(cached) " >&6
10727 else
10728   case $SH in
10729   [\\/]* | ?:[\\/]*)
10730   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10731   ;;
10732   *)
10733   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10734 for as_dir in $PATH
10735 do
10736   IFS=$as_save_IFS
10737   test -z "$as_dir" && as_dir=.
10738     for ac_exec_ext in '' $ac_executable_extensions; do
10739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10740     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10742     break 2
10743   fi
10744 done
10745   done
10746 IFS=$as_save_IFS
10747 
10748   ;;
10749 esac
10750 fi
10751 SH=$ac_cv_path_SH
10752 if test -n "$SH"; then
10753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10754 $as_echo "$SH" >&6; }
10755 else
10756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10757 $as_echo "no" >&6; }
10758 fi
10759 
10760 
10761   test -n "$SH" && break
10762 done
10763 
10764   else
10765     # The variable is set, but is it from the command line or the environment?
10766 
10767     # Try to remove the string !SH! from our list.
10768     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10769     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10770       # If it failed, the variable was not from the command line. Ignore it,
10771       # but warn the user (except for BASH, which is always set by the calling BASH).
10772       if test "xSH" != xBASH; then
10773         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10774 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10775       fi
10776       # Try to locate tool using the code snippet
10777       for ac_prog in sh
10778 do
10779   # Extract the first word of "$ac_prog", so it can be a program name with args.
10780 set dummy $ac_prog; ac_word=$2
10781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10782 $as_echo_n "checking for $ac_word... " >&6; }
10783 if ${ac_cv_path_SH+:} false; then :
10784   $as_echo_n "(cached) " >&6
10785 else
10786   case $SH in
10787   [\\/]* | ?:[\\/]*)
10788   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10789   ;;
10790   *)
10791   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10792 for as_dir in $PATH
10793 do
10794   IFS=$as_save_IFS
10795   test -z "$as_dir" && as_dir=.
10796     for ac_exec_ext in '' $ac_executable_extensions; do
10797   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10798     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10800     break 2
10801   fi
10802 done
10803   done
10804 IFS=$as_save_IFS
10805 
10806   ;;
10807 esac
10808 fi
10809 SH=$ac_cv_path_SH
10810 if test -n "$SH"; then
10811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10812 $as_echo "$SH" >&6; }
10813 else
10814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10815 $as_echo "no" >&6; }
10816 fi
10817 
10818 
10819   test -n "$SH" && break
10820 done
10821 
10822     else
10823       # If it succeeded, then it was overridden by the user. We will use it
10824       # for the tool.
10825 
10826       # First remove it from the list of overridden variables, so we can test
10827       # for unknown variables in the end.
10828       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10829 
10830       # Check if we try to supply an empty value
10831       if test "x$SH" = x; then
10832         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10833 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10834         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10835 $as_echo_n "checking for SH... " >&6; }
10836         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10837 $as_echo "disabled" >&6; }
10838       else
10839         # Check if the provided tool contains a complete path.
10840         tool_specified="$SH"
10841         tool_basename="${tool_specified##*/}"
10842         if test "x$tool_basename" = "x$tool_specified"; then
10843           # A command without a complete path is provided, search $PATH.
10844           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10845 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10846           # Extract the first word of "$tool_basename", so it can be a program name with args.
10847 set dummy $tool_basename; ac_word=$2
10848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10849 $as_echo_n "checking for $ac_word... " >&6; }
10850 if ${ac_cv_path_SH+:} false; then :
10851   $as_echo_n "(cached) " >&6
10852 else
10853   case $SH in
10854   [\\/]* | ?:[\\/]*)
10855   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10856   ;;
10857   *)
10858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10859 for as_dir in $PATH
10860 do
10861   IFS=$as_save_IFS
10862   test -z "$as_dir" && as_dir=.
10863     for ac_exec_ext in '' $ac_executable_extensions; do
10864   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10865     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10866     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10867     break 2
10868   fi
10869 done
10870   done
10871 IFS=$as_save_IFS
10872 
10873   ;;
10874 esac
10875 fi
10876 SH=$ac_cv_path_SH
10877 if test -n "$SH"; then
10878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10879 $as_echo "$SH" >&6; }
10880 else
10881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10882 $as_echo "no" >&6; }
10883 fi
10884 
10885 
10886           if test "x$SH" = x; then
10887             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10888           fi
10889         else
10890           # Otherwise we believe it is a complete path. Use it as it is.
10891           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10892 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10893           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10894 $as_echo_n "checking for SH... " >&6; }
10895           if test ! -x "$tool_specified"; then
10896             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10897 $as_echo "not found" >&6; }
10898             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10899           fi
10900           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10901 $as_echo "$tool_specified" >&6; }
10902         fi
10903       fi
10904     fi
10905 
10906   fi
10907 
10908 
10909 
10910   if test "x$SH" = x; then
10911     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10912   fi
10913 
10914 
10915 
10916 
10917 
10918   # Publish this variable in the help.
10919 
10920 
10921   if [ -z "${SORT+x}" ]; then
10922     # The variable is not set by user, try to locate tool using the code snippet
10923     for ac_prog in sort
10924 do
10925   # Extract the first word of "$ac_prog", so it can be a program name with args.
10926 set dummy $ac_prog; ac_word=$2
10927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10928 $as_echo_n "checking for $ac_word... " >&6; }
10929 if ${ac_cv_path_SORT+:} false; then :
10930   $as_echo_n "(cached) " >&6
10931 else
10932   case $SORT in
10933   [\\/]* | ?:[\\/]*)
10934   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10935   ;;
10936   *)
10937   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10938 for as_dir in $PATH
10939 do
10940   IFS=$as_save_IFS
10941   test -z "$as_dir" && as_dir=.
10942     for ac_exec_ext in '' $ac_executable_extensions; do
10943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10944     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10946     break 2
10947   fi
10948 done
10949   done
10950 IFS=$as_save_IFS
10951 
10952   ;;
10953 esac
10954 fi
10955 SORT=$ac_cv_path_SORT
10956 if test -n "$SORT"; then
10957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10958 $as_echo "$SORT" >&6; }
10959 else
10960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10961 $as_echo "no" >&6; }
10962 fi
10963 
10964 
10965   test -n "$SORT" && break
10966 done
10967 
10968   else
10969     # The variable is set, but is it from the command line or the environment?
10970 
10971     # Try to remove the string !SORT! from our list.
10972     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10973     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10974       # If it failed, the variable was not from the command line. Ignore it,
10975       # but warn the user (except for BASH, which is always set by the calling BASH).
10976       if test "xSORT" != xBASH; then
10977         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10978 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10979       fi
10980       # Try to locate tool using the code snippet
10981       for ac_prog in sort
10982 do
10983   # Extract the first word of "$ac_prog", so it can be a program name with args.
10984 set dummy $ac_prog; ac_word=$2
10985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10986 $as_echo_n "checking for $ac_word... " >&6; }
10987 if ${ac_cv_path_SORT+:} false; then :
10988   $as_echo_n "(cached) " >&6
10989 else
10990   case $SORT in
10991   [\\/]* | ?:[\\/]*)
10992   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10993   ;;
10994   *)
10995   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10996 for as_dir in $PATH
10997 do
10998   IFS=$as_save_IFS
10999   test -z "$as_dir" && as_dir=.
11000     for ac_exec_ext in '' $ac_executable_extensions; do
11001   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11002     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11003     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11004     break 2
11005   fi
11006 done
11007   done
11008 IFS=$as_save_IFS
11009 
11010   ;;
11011 esac
11012 fi
11013 SORT=$ac_cv_path_SORT
11014 if test -n "$SORT"; then
11015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11016 $as_echo "$SORT" >&6; }
11017 else
11018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11019 $as_echo "no" >&6; }
11020 fi
11021 
11022 
11023   test -n "$SORT" && break
11024 done
11025 
11026     else
11027       # If it succeeded, then it was overridden by the user. We will use it
11028       # for the tool.
11029 
11030       # First remove it from the list of overridden variables, so we can test
11031       # for unknown variables in the end.
11032       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11033 
11034       # Check if we try to supply an empty value
11035       if test "x$SORT" = x; then
11036         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11037 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11038         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11039 $as_echo_n "checking for SORT... " >&6; }
11040         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11041 $as_echo "disabled" >&6; }
11042       else
11043         # Check if the provided tool contains a complete path.
11044         tool_specified="$SORT"
11045         tool_basename="${tool_specified##*/}"
11046         if test "x$tool_basename" = "x$tool_specified"; then
11047           # A command without a complete path is provided, search $PATH.
11048           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11049 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11050           # Extract the first word of "$tool_basename", so it can be a program name with args.
11051 set dummy $tool_basename; ac_word=$2
11052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11053 $as_echo_n "checking for $ac_word... " >&6; }
11054 if ${ac_cv_path_SORT+:} false; then :
11055   $as_echo_n "(cached) " >&6
11056 else
11057   case $SORT in
11058   [\\/]* | ?:[\\/]*)
11059   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11060   ;;
11061   *)
11062   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11063 for as_dir in $PATH
11064 do
11065   IFS=$as_save_IFS
11066   test -z "$as_dir" && as_dir=.
11067     for ac_exec_ext in '' $ac_executable_extensions; do
11068   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11069     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11070     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11071     break 2
11072   fi
11073 done
11074   done
11075 IFS=$as_save_IFS
11076 
11077   ;;
11078 esac
11079 fi
11080 SORT=$ac_cv_path_SORT
11081 if test -n "$SORT"; then
11082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11083 $as_echo "$SORT" >&6; }
11084 else
11085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11086 $as_echo "no" >&6; }
11087 fi
11088 
11089 
11090           if test "x$SORT" = x; then
11091             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11092           fi
11093         else
11094           # Otherwise we believe it is a complete path. Use it as it is.
11095           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11096 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11097           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11098 $as_echo_n "checking for SORT... " >&6; }
11099           if test ! -x "$tool_specified"; then
11100             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11101 $as_echo "not found" >&6; }
11102             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11103           fi
11104           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11105 $as_echo "$tool_specified" >&6; }
11106         fi
11107       fi
11108     fi
11109 
11110   fi
11111 
11112 
11113 
11114   if test "x$SORT" = x; then
11115     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11116   fi
11117 
11118 
11119 
11120 
11121 
11122   # Publish this variable in the help.
11123 
11124 
11125   if [ -z "${TAIL+x}" ]; then
11126     # The variable is not set by user, try to locate tool using the code snippet
11127     for ac_prog in tail
11128 do
11129   # Extract the first word of "$ac_prog", so it can be a program name with args.
11130 set dummy $ac_prog; ac_word=$2
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11132 $as_echo_n "checking for $ac_word... " >&6; }
11133 if ${ac_cv_path_TAIL+:} false; then :
11134   $as_echo_n "(cached) " >&6
11135 else
11136   case $TAIL in
11137   [\\/]* | ?:[\\/]*)
11138   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11139   ;;
11140   *)
11141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11142 for as_dir in $PATH
11143 do
11144   IFS=$as_save_IFS
11145   test -z "$as_dir" && as_dir=.
11146     for ac_exec_ext in '' $ac_executable_extensions; do
11147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11148     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11150     break 2
11151   fi
11152 done
11153   done
11154 IFS=$as_save_IFS
11155 
11156   ;;
11157 esac
11158 fi
11159 TAIL=$ac_cv_path_TAIL
11160 if test -n "$TAIL"; then
11161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11162 $as_echo "$TAIL" >&6; }
11163 else
11164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11165 $as_echo "no" >&6; }
11166 fi
11167 
11168 
11169   test -n "$TAIL" && break
11170 done
11171 
11172   else
11173     # The variable is set, but is it from the command line or the environment?
11174 
11175     # Try to remove the string !TAIL! from our list.
11176     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11177     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11178       # If it failed, the variable was not from the command line. Ignore it,
11179       # but warn the user (except for BASH, which is always set by the calling BASH).
11180       if test "xTAIL" != xBASH; then
11181         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11182 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11183       fi
11184       # Try to locate tool using the code snippet
11185       for ac_prog in tail
11186 do
11187   # Extract the first word of "$ac_prog", so it can be a program name with args.
11188 set dummy $ac_prog; ac_word=$2
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11190 $as_echo_n "checking for $ac_word... " >&6; }
11191 if ${ac_cv_path_TAIL+:} false; then :
11192   $as_echo_n "(cached) " >&6
11193 else
11194   case $TAIL in
11195   [\\/]* | ?:[\\/]*)
11196   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11197   ;;
11198   *)
11199   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11200 for as_dir in $PATH
11201 do
11202   IFS=$as_save_IFS
11203   test -z "$as_dir" && as_dir=.
11204     for ac_exec_ext in '' $ac_executable_extensions; do
11205   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11206     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11207     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11208     break 2
11209   fi
11210 done
11211   done
11212 IFS=$as_save_IFS
11213 
11214   ;;
11215 esac
11216 fi
11217 TAIL=$ac_cv_path_TAIL
11218 if test -n "$TAIL"; then
11219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11220 $as_echo "$TAIL" >&6; }
11221 else
11222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11223 $as_echo "no" >&6; }
11224 fi
11225 
11226 
11227   test -n "$TAIL" && break
11228 done
11229 
11230     else
11231       # If it succeeded, then it was overridden by the user. We will use it
11232       # for the tool.
11233 
11234       # First remove it from the list of overridden variables, so we can test
11235       # for unknown variables in the end.
11236       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11237 
11238       # Check if we try to supply an empty value
11239       if test "x$TAIL" = x; then
11240         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11241 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11242         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11243 $as_echo_n "checking for TAIL... " >&6; }
11244         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11245 $as_echo "disabled" >&6; }
11246       else
11247         # Check if the provided tool contains a complete path.
11248         tool_specified="$TAIL"
11249         tool_basename="${tool_specified##*/}"
11250         if test "x$tool_basename" = "x$tool_specified"; then
11251           # A command without a complete path is provided, search $PATH.
11252           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11253 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11254           # Extract the first word of "$tool_basename", so it can be a program name with args.
11255 set dummy $tool_basename; ac_word=$2
11256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11257 $as_echo_n "checking for $ac_word... " >&6; }
11258 if ${ac_cv_path_TAIL+:} false; then :
11259   $as_echo_n "(cached) " >&6
11260 else
11261   case $TAIL in
11262   [\\/]* | ?:[\\/]*)
11263   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11264   ;;
11265   *)
11266   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11267 for as_dir in $PATH
11268 do
11269   IFS=$as_save_IFS
11270   test -z "$as_dir" && as_dir=.
11271     for ac_exec_ext in '' $ac_executable_extensions; do
11272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11273     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11275     break 2
11276   fi
11277 done
11278   done
11279 IFS=$as_save_IFS
11280 
11281   ;;
11282 esac
11283 fi
11284 TAIL=$ac_cv_path_TAIL
11285 if test -n "$TAIL"; then
11286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11287 $as_echo "$TAIL" >&6; }
11288 else
11289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11290 $as_echo "no" >&6; }
11291 fi
11292 
11293 
11294           if test "x$TAIL" = x; then
11295             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11296           fi
11297         else
11298           # Otherwise we believe it is a complete path. Use it as it is.
11299           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11300 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11301           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11302 $as_echo_n "checking for TAIL... " >&6; }
11303           if test ! -x "$tool_specified"; then
11304             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11305 $as_echo "not found" >&6; }
11306             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11307           fi
11308           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11309 $as_echo "$tool_specified" >&6; }
11310         fi
11311       fi
11312     fi
11313 
11314   fi
11315 
11316 
11317 
11318   if test "x$TAIL" = x; then
11319     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11320   fi
11321 
11322 
11323 
11324 
11325 
11326   # Publish this variable in the help.
11327 
11328 
11329   if [ -z "${TAR+x}" ]; then
11330     # The variable is not set by user, try to locate tool using the code snippet
11331     for ac_prog in gtar tar
11332 do
11333   # Extract the first word of "$ac_prog", so it can be a program name with args.
11334 set dummy $ac_prog; ac_word=$2
11335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11336 $as_echo_n "checking for $ac_word... " >&6; }
11337 if ${ac_cv_path_TAR+:} false; then :
11338   $as_echo_n "(cached) " >&6
11339 else
11340   case $TAR in
11341   [\\/]* | ?:[\\/]*)
11342   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11343   ;;
11344   *)
11345   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11346 for as_dir in $PATH
11347 do
11348   IFS=$as_save_IFS
11349   test -z "$as_dir" && as_dir=.
11350     for ac_exec_ext in '' $ac_executable_extensions; do
11351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11352     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11354     break 2
11355   fi
11356 done
11357   done
11358 IFS=$as_save_IFS
11359 
11360   ;;
11361 esac
11362 fi
11363 TAR=$ac_cv_path_TAR
11364 if test -n "$TAR"; then
11365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11366 $as_echo "$TAR" >&6; }
11367 else
11368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11369 $as_echo "no" >&6; }
11370 fi
11371 
11372 
11373   test -n "$TAR" && break
11374 done
11375 
11376   else
11377     # The variable is set, but is it from the command line or the environment?
11378 
11379     # Try to remove the string !TAR! from our list.
11380     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11381     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11382       # If it failed, the variable was not from the command line. Ignore it,
11383       # but warn the user (except for BASH, which is always set by the calling BASH).
11384       if test "xTAR" != xBASH; then
11385         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11386 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11387       fi
11388       # Try to locate tool using the code snippet
11389       for ac_prog in gtar tar
11390 do
11391   # Extract the first word of "$ac_prog", so it can be a program name with args.
11392 set dummy $ac_prog; ac_word=$2
11393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11394 $as_echo_n "checking for $ac_word... " >&6; }
11395 if ${ac_cv_path_TAR+:} false; then :
11396   $as_echo_n "(cached) " >&6
11397 else
11398   case $TAR in
11399   [\\/]* | ?:[\\/]*)
11400   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11401   ;;
11402   *)
11403   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11404 for as_dir in $PATH
11405 do
11406   IFS=$as_save_IFS
11407   test -z "$as_dir" && as_dir=.
11408     for ac_exec_ext in '' $ac_executable_extensions; do
11409   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11410     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11411     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11412     break 2
11413   fi
11414 done
11415   done
11416 IFS=$as_save_IFS
11417 
11418   ;;
11419 esac
11420 fi
11421 TAR=$ac_cv_path_TAR
11422 if test -n "$TAR"; then
11423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11424 $as_echo "$TAR" >&6; }
11425 else
11426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11427 $as_echo "no" >&6; }
11428 fi
11429 
11430 
11431   test -n "$TAR" && break
11432 done
11433 
11434     else
11435       # If it succeeded, then it was overridden by the user. We will use it
11436       # for the tool.
11437 
11438       # First remove it from the list of overridden variables, so we can test
11439       # for unknown variables in the end.
11440       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11441 
11442       # Check if we try to supply an empty value
11443       if test "x$TAR" = x; then
11444         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11445 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11446         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11447 $as_echo_n "checking for TAR... " >&6; }
11448         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11449 $as_echo "disabled" >&6; }
11450       else
11451         # Check if the provided tool contains a complete path.
11452         tool_specified="$TAR"
11453         tool_basename="${tool_specified##*/}"
11454         if test "x$tool_basename" = "x$tool_specified"; then
11455           # A command without a complete path is provided, search $PATH.
11456           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11457 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11458           # Extract the first word of "$tool_basename", so it can be a program name with args.
11459 set dummy $tool_basename; ac_word=$2
11460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11461 $as_echo_n "checking for $ac_word... " >&6; }
11462 if ${ac_cv_path_TAR+:} false; then :
11463   $as_echo_n "(cached) " >&6
11464 else
11465   case $TAR in
11466   [\\/]* | ?:[\\/]*)
11467   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11468   ;;
11469   *)
11470   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11471 for as_dir in $PATH
11472 do
11473   IFS=$as_save_IFS
11474   test -z "$as_dir" && as_dir=.
11475     for ac_exec_ext in '' $ac_executable_extensions; do
11476   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11477     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11478     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11479     break 2
11480   fi
11481 done
11482   done
11483 IFS=$as_save_IFS
11484 
11485   ;;
11486 esac
11487 fi
11488 TAR=$ac_cv_path_TAR
11489 if test -n "$TAR"; then
11490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11491 $as_echo "$TAR" >&6; }
11492 else
11493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11494 $as_echo "no" >&6; }
11495 fi
11496 
11497 
11498           if test "x$TAR" = x; then
11499             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11500           fi
11501         else
11502           # Otherwise we believe it is a complete path. Use it as it is.
11503           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11504 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11505           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11506 $as_echo_n "checking for TAR... " >&6; }
11507           if test ! -x "$tool_specified"; then
11508             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11509 $as_echo "not found" >&6; }
11510             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11511           fi
11512           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11513 $as_echo "$tool_specified" >&6; }
11514         fi
11515       fi
11516     fi
11517 
11518   fi
11519 
11520 
11521 
11522   if test "x$TAR" = x; then
11523     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11524   fi
11525 
11526 
11527 
11528 
11529 
11530   # Publish this variable in the help.
11531 
11532 
11533   if [ -z "${TEE+x}" ]; then
11534     # The variable is not set by user, try to locate tool using the code snippet
11535     for ac_prog in tee
11536 do
11537   # Extract the first word of "$ac_prog", so it can be a program name with args.
11538 set dummy $ac_prog; ac_word=$2
11539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11540 $as_echo_n "checking for $ac_word... " >&6; }
11541 if ${ac_cv_path_TEE+:} false; then :
11542   $as_echo_n "(cached) " >&6
11543 else
11544   case $TEE in
11545   [\\/]* | ?:[\\/]*)
11546   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11547   ;;
11548   *)
11549   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11550 for as_dir in $PATH
11551 do
11552   IFS=$as_save_IFS
11553   test -z "$as_dir" && as_dir=.
11554     for ac_exec_ext in '' $ac_executable_extensions; do
11555   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11556     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11557     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11558     break 2
11559   fi
11560 done
11561   done
11562 IFS=$as_save_IFS
11563 
11564   ;;
11565 esac
11566 fi
11567 TEE=$ac_cv_path_TEE
11568 if test -n "$TEE"; then
11569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11570 $as_echo "$TEE" >&6; }
11571 else
11572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11573 $as_echo "no" >&6; }
11574 fi
11575 
11576 
11577   test -n "$TEE" && break
11578 done
11579 
11580   else
11581     # The variable is set, but is it from the command line or the environment?
11582 
11583     # Try to remove the string !TEE! from our list.
11584     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11585     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11586       # If it failed, the variable was not from the command line. Ignore it,
11587       # but warn the user (except for BASH, which is always set by the calling BASH).
11588       if test "xTEE" != xBASH; then
11589         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11590 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11591       fi
11592       # Try to locate tool using the code snippet
11593       for ac_prog in tee
11594 do
11595   # Extract the first word of "$ac_prog", so it can be a program name with args.
11596 set dummy $ac_prog; ac_word=$2
11597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11598 $as_echo_n "checking for $ac_word... " >&6; }
11599 if ${ac_cv_path_TEE+:} false; then :
11600   $as_echo_n "(cached) " >&6
11601 else
11602   case $TEE in
11603   [\\/]* | ?:[\\/]*)
11604   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11605   ;;
11606   *)
11607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11608 for as_dir in $PATH
11609 do
11610   IFS=$as_save_IFS
11611   test -z "$as_dir" && as_dir=.
11612     for ac_exec_ext in '' $ac_executable_extensions; do
11613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11614     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11616     break 2
11617   fi
11618 done
11619   done
11620 IFS=$as_save_IFS
11621 
11622   ;;
11623 esac
11624 fi
11625 TEE=$ac_cv_path_TEE
11626 if test -n "$TEE"; then
11627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11628 $as_echo "$TEE" >&6; }
11629 else
11630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11631 $as_echo "no" >&6; }
11632 fi
11633 
11634 
11635   test -n "$TEE" && break
11636 done
11637 
11638     else
11639       # If it succeeded, then it was overridden by the user. We will use it
11640       # for the tool.
11641 
11642       # First remove it from the list of overridden variables, so we can test
11643       # for unknown variables in the end.
11644       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11645 
11646       # Check if we try to supply an empty value
11647       if test "x$TEE" = x; then
11648         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11649 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11650         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11651 $as_echo_n "checking for TEE... " >&6; }
11652         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11653 $as_echo "disabled" >&6; }
11654       else
11655         # Check if the provided tool contains a complete path.
11656         tool_specified="$TEE"
11657         tool_basename="${tool_specified##*/}"
11658         if test "x$tool_basename" = "x$tool_specified"; then
11659           # A command without a complete path is provided, search $PATH.
11660           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11661 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11662           # Extract the first word of "$tool_basename", so it can be a program name with args.
11663 set dummy $tool_basename; ac_word=$2
11664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11665 $as_echo_n "checking for $ac_word... " >&6; }
11666 if ${ac_cv_path_TEE+:} false; then :
11667   $as_echo_n "(cached) " >&6
11668 else
11669   case $TEE in
11670   [\\/]* | ?:[\\/]*)
11671   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11672   ;;
11673   *)
11674   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11675 for as_dir in $PATH
11676 do
11677   IFS=$as_save_IFS
11678   test -z "$as_dir" && as_dir=.
11679     for ac_exec_ext in '' $ac_executable_extensions; do
11680   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11681     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11682     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11683     break 2
11684   fi
11685 done
11686   done
11687 IFS=$as_save_IFS
11688 
11689   ;;
11690 esac
11691 fi
11692 TEE=$ac_cv_path_TEE
11693 if test -n "$TEE"; then
11694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11695 $as_echo "$TEE" >&6; }
11696 else
11697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11698 $as_echo "no" >&6; }
11699 fi
11700 
11701 
11702           if test "x$TEE" = x; then
11703             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11704           fi
11705         else
11706           # Otherwise we believe it is a complete path. Use it as it is.
11707           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11708 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11709           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11710 $as_echo_n "checking for TEE... " >&6; }
11711           if test ! -x "$tool_specified"; then
11712             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11713 $as_echo "not found" >&6; }
11714             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11715           fi
11716           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11717 $as_echo "$tool_specified" >&6; }
11718         fi
11719       fi
11720     fi
11721 
11722   fi
11723 
11724 
11725 
11726   if test "x$TEE" = x; then
11727     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11728   fi
11729 
11730 
11731 
11732 
11733 
11734   # Publish this variable in the help.
11735 
11736 
11737   if [ -z "${TOUCH+x}" ]; then
11738     # The variable is not set by user, try to locate tool using the code snippet
11739     for ac_prog in touch
11740 do
11741   # Extract the first word of "$ac_prog", so it can be a program name with args.
11742 set dummy $ac_prog; ac_word=$2
11743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11744 $as_echo_n "checking for $ac_word... " >&6; }
11745 if ${ac_cv_path_TOUCH+:} false; then :
11746   $as_echo_n "(cached) " >&6
11747 else
11748   case $TOUCH in
11749   [\\/]* | ?:[\\/]*)
11750   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11751   ;;
11752   *)
11753   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11754 for as_dir in $PATH
11755 do
11756   IFS=$as_save_IFS
11757   test -z "$as_dir" && as_dir=.
11758     for ac_exec_ext in '' $ac_executable_extensions; do
11759   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11760     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11762     break 2
11763   fi
11764 done
11765   done
11766 IFS=$as_save_IFS
11767 
11768   ;;
11769 esac
11770 fi
11771 TOUCH=$ac_cv_path_TOUCH
11772 if test -n "$TOUCH"; then
11773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11774 $as_echo "$TOUCH" >&6; }
11775 else
11776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11777 $as_echo "no" >&6; }
11778 fi
11779 
11780 
11781   test -n "$TOUCH" && break
11782 done
11783 
11784   else
11785     # The variable is set, but is it from the command line or the environment?
11786 
11787     # Try to remove the string !TOUCH! from our list.
11788     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11789     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11790       # If it failed, the variable was not from the command line. Ignore it,
11791       # but warn the user (except for BASH, which is always set by the calling BASH).
11792       if test "xTOUCH" != xBASH; then
11793         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11794 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11795       fi
11796       # Try to locate tool using the code snippet
11797       for ac_prog in touch
11798 do
11799   # Extract the first word of "$ac_prog", so it can be a program name with args.
11800 set dummy $ac_prog; ac_word=$2
11801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11802 $as_echo_n "checking for $ac_word... " >&6; }
11803 if ${ac_cv_path_TOUCH+:} false; then :
11804   $as_echo_n "(cached) " >&6
11805 else
11806   case $TOUCH in
11807   [\\/]* | ?:[\\/]*)
11808   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11809   ;;
11810   *)
11811   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11812 for as_dir in $PATH
11813 do
11814   IFS=$as_save_IFS
11815   test -z "$as_dir" && as_dir=.
11816     for ac_exec_ext in '' $ac_executable_extensions; do
11817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11818     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11820     break 2
11821   fi
11822 done
11823   done
11824 IFS=$as_save_IFS
11825 
11826   ;;
11827 esac
11828 fi
11829 TOUCH=$ac_cv_path_TOUCH
11830 if test -n "$TOUCH"; then
11831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11832 $as_echo "$TOUCH" >&6; }
11833 else
11834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11835 $as_echo "no" >&6; }
11836 fi
11837 
11838 
11839   test -n "$TOUCH" && break
11840 done
11841 
11842     else
11843       # If it succeeded, then it was overridden by the user. We will use it
11844       # for the tool.
11845 
11846       # First remove it from the list of overridden variables, so we can test
11847       # for unknown variables in the end.
11848       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11849 
11850       # Check if we try to supply an empty value
11851       if test "x$TOUCH" = x; then
11852         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11853 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11854         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11855 $as_echo_n "checking for TOUCH... " >&6; }
11856         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11857 $as_echo "disabled" >&6; }
11858       else
11859         # Check if the provided tool contains a complete path.
11860         tool_specified="$TOUCH"
11861         tool_basename="${tool_specified##*/}"
11862         if test "x$tool_basename" = "x$tool_specified"; then
11863           # A command without a complete path is provided, search $PATH.
11864           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11865 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11866           # Extract the first word of "$tool_basename", so it can be a program name with args.
11867 set dummy $tool_basename; ac_word=$2
11868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11869 $as_echo_n "checking for $ac_word... " >&6; }
11870 if ${ac_cv_path_TOUCH+:} false; then :
11871   $as_echo_n "(cached) " >&6
11872 else
11873   case $TOUCH in
11874   [\\/]* | ?:[\\/]*)
11875   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11876   ;;
11877   *)
11878   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11879 for as_dir in $PATH
11880 do
11881   IFS=$as_save_IFS
11882   test -z "$as_dir" && as_dir=.
11883     for ac_exec_ext in '' $ac_executable_extensions; do
11884   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11885     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11886     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11887     break 2
11888   fi
11889 done
11890   done
11891 IFS=$as_save_IFS
11892 
11893   ;;
11894 esac
11895 fi
11896 TOUCH=$ac_cv_path_TOUCH
11897 if test -n "$TOUCH"; then
11898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11899 $as_echo "$TOUCH" >&6; }
11900 else
11901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11902 $as_echo "no" >&6; }
11903 fi
11904 
11905 
11906           if test "x$TOUCH" = x; then
11907             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11908           fi
11909         else
11910           # Otherwise we believe it is a complete path. Use it as it is.
11911           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11912 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11913           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11914 $as_echo_n "checking for TOUCH... " >&6; }
11915           if test ! -x "$tool_specified"; then
11916             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11917 $as_echo "not found" >&6; }
11918             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11919           fi
11920           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11921 $as_echo "$tool_specified" >&6; }
11922         fi
11923       fi
11924     fi
11925 
11926   fi
11927 
11928 
11929 
11930   if test "x$TOUCH" = x; then
11931     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11932   fi
11933 
11934 
11935 
11936 
11937 
11938   # Publish this variable in the help.
11939 
11940 
11941   if [ -z "${TR+x}" ]; then
11942     # The variable is not set by user, try to locate tool using the code snippet
11943     for ac_prog in tr
11944 do
11945   # Extract the first word of "$ac_prog", so it can be a program name with args.
11946 set dummy $ac_prog; ac_word=$2
11947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11948 $as_echo_n "checking for $ac_word... " >&6; }
11949 if ${ac_cv_path_TR+:} false; then :
11950   $as_echo_n "(cached) " >&6
11951 else
11952   case $TR in
11953   [\\/]* | ?:[\\/]*)
11954   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11955   ;;
11956   *)
11957   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11958 for as_dir in $PATH
11959 do
11960   IFS=$as_save_IFS
11961   test -z "$as_dir" && as_dir=.
11962     for ac_exec_ext in '' $ac_executable_extensions; do
11963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11964     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11966     break 2
11967   fi
11968 done
11969   done
11970 IFS=$as_save_IFS
11971 
11972   ;;
11973 esac
11974 fi
11975 TR=$ac_cv_path_TR
11976 if test -n "$TR"; then
11977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11978 $as_echo "$TR" >&6; }
11979 else
11980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11981 $as_echo "no" >&6; }
11982 fi
11983 
11984 
11985   test -n "$TR" && break
11986 done
11987 
11988   else
11989     # The variable is set, but is it from the command line or the environment?
11990 
11991     # Try to remove the string !TR! from our list.
11992     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11993     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11994       # If it failed, the variable was not from the command line. Ignore it,
11995       # but warn the user (except for BASH, which is always set by the calling BASH).
11996       if test "xTR" != xBASH; then
11997         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11998 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11999       fi
12000       # Try to locate tool using the code snippet
12001       for ac_prog in tr
12002 do
12003   # Extract the first word of "$ac_prog", so it can be a program name with args.
12004 set dummy $ac_prog; ac_word=$2
12005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12006 $as_echo_n "checking for $ac_word... " >&6; }
12007 if ${ac_cv_path_TR+:} false; then :
12008   $as_echo_n "(cached) " >&6
12009 else
12010   case $TR in
12011   [\\/]* | ?:[\\/]*)
12012   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12013   ;;
12014   *)
12015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12016 for as_dir in $PATH
12017 do
12018   IFS=$as_save_IFS
12019   test -z "$as_dir" && as_dir=.
12020     for ac_exec_ext in '' $ac_executable_extensions; do
12021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12022     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12024     break 2
12025   fi
12026 done
12027   done
12028 IFS=$as_save_IFS
12029 
12030   ;;
12031 esac
12032 fi
12033 TR=$ac_cv_path_TR
12034 if test -n "$TR"; then
12035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12036 $as_echo "$TR" >&6; }
12037 else
12038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12039 $as_echo "no" >&6; }
12040 fi
12041 
12042 
12043   test -n "$TR" && break
12044 done
12045 
12046     else
12047       # If it succeeded, then it was overridden by the user. We will use it
12048       # for the tool.
12049 
12050       # First remove it from the list of overridden variables, so we can test
12051       # for unknown variables in the end.
12052       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12053 
12054       # Check if we try to supply an empty value
12055       if test "x$TR" = x; then
12056         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12057 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12058         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12059 $as_echo_n "checking for TR... " >&6; }
12060         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12061 $as_echo "disabled" >&6; }
12062       else
12063         # Check if the provided tool contains a complete path.
12064         tool_specified="$TR"
12065         tool_basename="${tool_specified##*/}"
12066         if test "x$tool_basename" = "x$tool_specified"; then
12067           # A command without a complete path is provided, search $PATH.
12068           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12069 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12070           # Extract the first word of "$tool_basename", so it can be a program name with args.
12071 set dummy $tool_basename; ac_word=$2
12072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12073 $as_echo_n "checking for $ac_word... " >&6; }
12074 if ${ac_cv_path_TR+:} false; then :
12075   $as_echo_n "(cached) " >&6
12076 else
12077   case $TR in
12078   [\\/]* | ?:[\\/]*)
12079   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12080   ;;
12081   *)
12082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12083 for as_dir in $PATH
12084 do
12085   IFS=$as_save_IFS
12086   test -z "$as_dir" && as_dir=.
12087     for ac_exec_ext in '' $ac_executable_extensions; do
12088   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12089     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12090     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12091     break 2
12092   fi
12093 done
12094   done
12095 IFS=$as_save_IFS
12096 
12097   ;;
12098 esac
12099 fi
12100 TR=$ac_cv_path_TR
12101 if test -n "$TR"; then
12102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12103 $as_echo "$TR" >&6; }
12104 else
12105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12106 $as_echo "no" >&6; }
12107 fi
12108 
12109 
12110           if test "x$TR" = x; then
12111             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12112           fi
12113         else
12114           # Otherwise we believe it is a complete path. Use it as it is.
12115           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12116 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12117           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12118 $as_echo_n "checking for TR... " >&6; }
12119           if test ! -x "$tool_specified"; then
12120             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12121 $as_echo "not found" >&6; }
12122             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12123           fi
12124           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12125 $as_echo "$tool_specified" >&6; }
12126         fi
12127       fi
12128     fi
12129 
12130   fi
12131 
12132 
12133 
12134   if test "x$TR" = x; then
12135     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12136   fi
12137 
12138 
12139 
12140 
12141 
12142   # Publish this variable in the help.
12143 
12144 
12145   if [ -z "${UNAME+x}" ]; then
12146     # The variable is not set by user, try to locate tool using the code snippet
12147     for ac_prog in uname
12148 do
12149   # Extract the first word of "$ac_prog", so it can be a program name with args.
12150 set dummy $ac_prog; ac_word=$2
12151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12152 $as_echo_n "checking for $ac_word... " >&6; }
12153 if ${ac_cv_path_UNAME+:} false; then :
12154   $as_echo_n "(cached) " >&6
12155 else
12156   case $UNAME in
12157   [\\/]* | ?:[\\/]*)
12158   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12159   ;;
12160   *)
12161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12162 for as_dir in $PATH
12163 do
12164   IFS=$as_save_IFS
12165   test -z "$as_dir" && as_dir=.
12166     for ac_exec_ext in '' $ac_executable_extensions; do
12167   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12168     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12170     break 2
12171   fi
12172 done
12173   done
12174 IFS=$as_save_IFS
12175 
12176   ;;
12177 esac
12178 fi
12179 UNAME=$ac_cv_path_UNAME
12180 if test -n "$UNAME"; then
12181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12182 $as_echo "$UNAME" >&6; }
12183 else
12184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12185 $as_echo "no" >&6; }
12186 fi
12187 
12188 
12189   test -n "$UNAME" && break
12190 done
12191 
12192   else
12193     # The variable is set, but is it from the command line or the environment?
12194 
12195     # Try to remove the string !UNAME! from our list.
12196     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12197     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12198       # If it failed, the variable was not from the command line. Ignore it,
12199       # but warn the user (except for BASH, which is always set by the calling BASH).
12200       if test "xUNAME" != xBASH; then
12201         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12202 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12203       fi
12204       # Try to locate tool using the code snippet
12205       for ac_prog in uname
12206 do
12207   # Extract the first word of "$ac_prog", so it can be a program name with args.
12208 set dummy $ac_prog; ac_word=$2
12209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12210 $as_echo_n "checking for $ac_word... " >&6; }
12211 if ${ac_cv_path_UNAME+:} false; then :
12212   $as_echo_n "(cached) " >&6
12213 else
12214   case $UNAME in
12215   [\\/]* | ?:[\\/]*)
12216   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12217   ;;
12218   *)
12219   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12220 for as_dir in $PATH
12221 do
12222   IFS=$as_save_IFS
12223   test -z "$as_dir" && as_dir=.
12224     for ac_exec_ext in '' $ac_executable_extensions; do
12225   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12226     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12227     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12228     break 2
12229   fi
12230 done
12231   done
12232 IFS=$as_save_IFS
12233 
12234   ;;
12235 esac
12236 fi
12237 UNAME=$ac_cv_path_UNAME
12238 if test -n "$UNAME"; then
12239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12240 $as_echo "$UNAME" >&6; }
12241 else
12242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12243 $as_echo "no" >&6; }
12244 fi
12245 
12246 
12247   test -n "$UNAME" && break
12248 done
12249 
12250     else
12251       # If it succeeded, then it was overridden by the user. We will use it
12252       # for the tool.
12253 
12254       # First remove it from the list of overridden variables, so we can test
12255       # for unknown variables in the end.
12256       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12257 
12258       # Check if we try to supply an empty value
12259       if test "x$UNAME" = x; then
12260         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12261 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12262         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12263 $as_echo_n "checking for UNAME... " >&6; }
12264         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12265 $as_echo "disabled" >&6; }
12266       else
12267         # Check if the provided tool contains a complete path.
12268         tool_specified="$UNAME"
12269         tool_basename="${tool_specified##*/}"
12270         if test "x$tool_basename" = "x$tool_specified"; then
12271           # A command without a complete path is provided, search $PATH.
12272           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12273 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12274           # Extract the first word of "$tool_basename", so it can be a program name with args.
12275 set dummy $tool_basename; ac_word=$2
12276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12277 $as_echo_n "checking for $ac_word... " >&6; }
12278 if ${ac_cv_path_UNAME+:} false; then :
12279   $as_echo_n "(cached) " >&6
12280 else
12281   case $UNAME in
12282   [\\/]* | ?:[\\/]*)
12283   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12284   ;;
12285   *)
12286   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12287 for as_dir in $PATH
12288 do
12289   IFS=$as_save_IFS
12290   test -z "$as_dir" && as_dir=.
12291     for ac_exec_ext in '' $ac_executable_extensions; do
12292   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12293     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12294     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12295     break 2
12296   fi
12297 done
12298   done
12299 IFS=$as_save_IFS
12300 
12301   ;;
12302 esac
12303 fi
12304 UNAME=$ac_cv_path_UNAME
12305 if test -n "$UNAME"; then
12306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12307 $as_echo "$UNAME" >&6; }
12308 else
12309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12310 $as_echo "no" >&6; }
12311 fi
12312 
12313 
12314           if test "x$UNAME" = x; then
12315             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12316           fi
12317         else
12318           # Otherwise we believe it is a complete path. Use it as it is.
12319           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12320 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12321           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12322 $as_echo_n "checking for UNAME... " >&6; }
12323           if test ! -x "$tool_specified"; then
12324             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12325 $as_echo "not found" >&6; }
12326             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12327           fi
12328           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12329 $as_echo "$tool_specified" >&6; }
12330         fi
12331       fi
12332     fi
12333 
12334   fi
12335 
12336 
12337 
12338   if test "x$UNAME" = x; then
12339     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12340   fi
12341 
12342 
12343 
12344 
12345 
12346   # Publish this variable in the help.
12347 
12348 
12349   if [ -z "${UNIQ+x}" ]; then
12350     # The variable is not set by user, try to locate tool using the code snippet
12351     for ac_prog in uniq
12352 do
12353   # Extract the first word of "$ac_prog", so it can be a program name with args.
12354 set dummy $ac_prog; ac_word=$2
12355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12356 $as_echo_n "checking for $ac_word... " >&6; }
12357 if ${ac_cv_path_UNIQ+:} false; then :
12358   $as_echo_n "(cached) " >&6
12359 else
12360   case $UNIQ in
12361   [\\/]* | ?:[\\/]*)
12362   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12363   ;;
12364   *)
12365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12366 for as_dir in $PATH
12367 do
12368   IFS=$as_save_IFS
12369   test -z "$as_dir" && as_dir=.
12370     for ac_exec_ext in '' $ac_executable_extensions; do
12371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12372     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12374     break 2
12375   fi
12376 done
12377   done
12378 IFS=$as_save_IFS
12379 
12380   ;;
12381 esac
12382 fi
12383 UNIQ=$ac_cv_path_UNIQ
12384 if test -n "$UNIQ"; then
12385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12386 $as_echo "$UNIQ" >&6; }
12387 else
12388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12389 $as_echo "no" >&6; }
12390 fi
12391 
12392 
12393   test -n "$UNIQ" && break
12394 done
12395 
12396   else
12397     # The variable is set, but is it from the command line or the environment?
12398 
12399     # Try to remove the string !UNIQ! from our list.
12400     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12401     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12402       # If it failed, the variable was not from the command line. Ignore it,
12403       # but warn the user (except for BASH, which is always set by the calling BASH).
12404       if test "xUNIQ" != xBASH; then
12405         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12406 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12407       fi
12408       # Try to locate tool using the code snippet
12409       for ac_prog in uniq
12410 do
12411   # Extract the first word of "$ac_prog", so it can be a program name with args.
12412 set dummy $ac_prog; ac_word=$2
12413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12414 $as_echo_n "checking for $ac_word... " >&6; }
12415 if ${ac_cv_path_UNIQ+:} false; then :
12416   $as_echo_n "(cached) " >&6
12417 else
12418   case $UNIQ in
12419   [\\/]* | ?:[\\/]*)
12420   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12421   ;;
12422   *)
12423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12424 for as_dir in $PATH
12425 do
12426   IFS=$as_save_IFS
12427   test -z "$as_dir" && as_dir=.
12428     for ac_exec_ext in '' $ac_executable_extensions; do
12429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12430     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12432     break 2
12433   fi
12434 done
12435   done
12436 IFS=$as_save_IFS
12437 
12438   ;;
12439 esac
12440 fi
12441 UNIQ=$ac_cv_path_UNIQ
12442 if test -n "$UNIQ"; then
12443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12444 $as_echo "$UNIQ" >&6; }
12445 else
12446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12447 $as_echo "no" >&6; }
12448 fi
12449 
12450 
12451   test -n "$UNIQ" && break
12452 done
12453 
12454     else
12455       # If it succeeded, then it was overridden by the user. We will use it
12456       # for the tool.
12457 
12458       # First remove it from the list of overridden variables, so we can test
12459       # for unknown variables in the end.
12460       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12461 
12462       # Check if we try to supply an empty value
12463       if test "x$UNIQ" = x; then
12464         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12465 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12466         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12467 $as_echo_n "checking for UNIQ... " >&6; }
12468         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12469 $as_echo "disabled" >&6; }
12470       else
12471         # Check if the provided tool contains a complete path.
12472         tool_specified="$UNIQ"
12473         tool_basename="${tool_specified##*/}"
12474         if test "x$tool_basename" = "x$tool_specified"; then
12475           # A command without a complete path is provided, search $PATH.
12476           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12477 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12478           # Extract the first word of "$tool_basename", so it can be a program name with args.
12479 set dummy $tool_basename; ac_word=$2
12480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12481 $as_echo_n "checking for $ac_word... " >&6; }
12482 if ${ac_cv_path_UNIQ+:} false; then :
12483   $as_echo_n "(cached) " >&6
12484 else
12485   case $UNIQ in
12486   [\\/]* | ?:[\\/]*)
12487   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12488   ;;
12489   *)
12490   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12491 for as_dir in $PATH
12492 do
12493   IFS=$as_save_IFS
12494   test -z "$as_dir" && as_dir=.
12495     for ac_exec_ext in '' $ac_executable_extensions; do
12496   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12497     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12498     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12499     break 2
12500   fi
12501 done
12502   done
12503 IFS=$as_save_IFS
12504 
12505   ;;
12506 esac
12507 fi
12508 UNIQ=$ac_cv_path_UNIQ
12509 if test -n "$UNIQ"; then
12510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12511 $as_echo "$UNIQ" >&6; }
12512 else
12513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12514 $as_echo "no" >&6; }
12515 fi
12516 
12517 
12518           if test "x$UNIQ" = x; then
12519             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12520           fi
12521         else
12522           # Otherwise we believe it is a complete path. Use it as it is.
12523           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12524 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12525           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12526 $as_echo_n "checking for UNIQ... " >&6; }
12527           if test ! -x "$tool_specified"; then
12528             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12529 $as_echo "not found" >&6; }
12530             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12531           fi
12532           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12533 $as_echo "$tool_specified" >&6; }
12534         fi
12535       fi
12536     fi
12537 
12538   fi
12539 
12540 
12541 
12542   if test "x$UNIQ" = x; then
12543     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12544   fi
12545 
12546 
12547 
12548 
12549 
12550   # Publish this variable in the help.
12551 
12552 
12553   if [ -z "${WC+x}" ]; then
12554     # The variable is not set by user, try to locate tool using the code snippet
12555     for ac_prog in wc
12556 do
12557   # Extract the first word of "$ac_prog", so it can be a program name with args.
12558 set dummy $ac_prog; ac_word=$2
12559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12560 $as_echo_n "checking for $ac_word... " >&6; }
12561 if ${ac_cv_path_WC+:} false; then :
12562   $as_echo_n "(cached) " >&6
12563 else
12564   case $WC in
12565   [\\/]* | ?:[\\/]*)
12566   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12567   ;;
12568   *)
12569   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12570 for as_dir in $PATH
12571 do
12572   IFS=$as_save_IFS
12573   test -z "$as_dir" && as_dir=.
12574     for ac_exec_ext in '' $ac_executable_extensions; do
12575   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12576     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12578     break 2
12579   fi
12580 done
12581   done
12582 IFS=$as_save_IFS
12583 
12584   ;;
12585 esac
12586 fi
12587 WC=$ac_cv_path_WC
12588 if test -n "$WC"; then
12589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12590 $as_echo "$WC" >&6; }
12591 else
12592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12593 $as_echo "no" >&6; }
12594 fi
12595 
12596 
12597   test -n "$WC" && break
12598 done
12599 
12600   else
12601     # The variable is set, but is it from the command line or the environment?
12602 
12603     # Try to remove the string !WC! from our list.
12604     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12605     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12606       # If it failed, the variable was not from the command line. Ignore it,
12607       # but warn the user (except for BASH, which is always set by the calling BASH).
12608       if test "xWC" != xBASH; then
12609         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12610 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12611       fi
12612       # Try to locate tool using the code snippet
12613       for ac_prog in wc
12614 do
12615   # Extract the first word of "$ac_prog", so it can be a program name with args.
12616 set dummy $ac_prog; ac_word=$2
12617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12618 $as_echo_n "checking for $ac_word... " >&6; }
12619 if ${ac_cv_path_WC+:} false; then :
12620   $as_echo_n "(cached) " >&6
12621 else
12622   case $WC in
12623   [\\/]* | ?:[\\/]*)
12624   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12625   ;;
12626   *)
12627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12628 for as_dir in $PATH
12629 do
12630   IFS=$as_save_IFS
12631   test -z "$as_dir" && as_dir=.
12632     for ac_exec_ext in '' $ac_executable_extensions; do
12633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12634     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12636     break 2
12637   fi
12638 done
12639   done
12640 IFS=$as_save_IFS
12641 
12642   ;;
12643 esac
12644 fi
12645 WC=$ac_cv_path_WC
12646 if test -n "$WC"; then
12647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12648 $as_echo "$WC" >&6; }
12649 else
12650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12651 $as_echo "no" >&6; }
12652 fi
12653 
12654 
12655   test -n "$WC" && break
12656 done
12657 
12658     else
12659       # If it succeeded, then it was overridden by the user. We will use it
12660       # for the tool.
12661 
12662       # First remove it from the list of overridden variables, so we can test
12663       # for unknown variables in the end.
12664       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12665 
12666       # Check if we try to supply an empty value
12667       if test "x$WC" = x; then
12668         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12669 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12670         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12671 $as_echo_n "checking for WC... " >&6; }
12672         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12673 $as_echo "disabled" >&6; }
12674       else
12675         # Check if the provided tool contains a complete path.
12676         tool_specified="$WC"
12677         tool_basename="${tool_specified##*/}"
12678         if test "x$tool_basename" = "x$tool_specified"; then
12679           # A command without a complete path is provided, search $PATH.
12680           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12681 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12682           # Extract the first word of "$tool_basename", so it can be a program name with args.
12683 set dummy $tool_basename; ac_word=$2
12684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12685 $as_echo_n "checking for $ac_word... " >&6; }
12686 if ${ac_cv_path_WC+:} false; then :
12687   $as_echo_n "(cached) " >&6
12688 else
12689   case $WC in
12690   [\\/]* | ?:[\\/]*)
12691   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12692   ;;
12693   *)
12694   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12695 for as_dir in $PATH
12696 do
12697   IFS=$as_save_IFS
12698   test -z "$as_dir" && as_dir=.
12699     for ac_exec_ext in '' $ac_executable_extensions; do
12700   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12701     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12702     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12703     break 2
12704   fi
12705 done
12706   done
12707 IFS=$as_save_IFS
12708 
12709   ;;
12710 esac
12711 fi
12712 WC=$ac_cv_path_WC
12713 if test -n "$WC"; then
12714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12715 $as_echo "$WC" >&6; }
12716 else
12717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12718 $as_echo "no" >&6; }
12719 fi
12720 
12721 
12722           if test "x$WC" = x; then
12723             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12724           fi
12725         else
12726           # Otherwise we believe it is a complete path. Use it as it is.
12727           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12728 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12729           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12730 $as_echo_n "checking for WC... " >&6; }
12731           if test ! -x "$tool_specified"; then
12732             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12733 $as_echo "not found" >&6; }
12734             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12735           fi
12736           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12737 $as_echo "$tool_specified" >&6; }
12738         fi
12739       fi
12740     fi
12741 
12742   fi
12743 
12744 
12745 
12746   if test "x$WC" = x; then
12747     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12748   fi
12749 
12750 
12751 
12752 
12753 
12754   # Publish this variable in the help.
12755 
12756 
12757   if [ -z "${WHICH+x}" ]; then
12758     # The variable is not set by user, try to locate tool using the code snippet
12759     for ac_prog in which
12760 do
12761   # Extract the first word of "$ac_prog", so it can be a program name with args.
12762 set dummy $ac_prog; ac_word=$2
12763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12764 $as_echo_n "checking for $ac_word... " >&6; }
12765 if ${ac_cv_path_WHICH+:} false; then :
12766   $as_echo_n "(cached) " >&6
12767 else
12768   case $WHICH in
12769   [\\/]* | ?:[\\/]*)
12770   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12771   ;;
12772   *)
12773   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12774 for as_dir in $PATH
12775 do
12776   IFS=$as_save_IFS
12777   test -z "$as_dir" && as_dir=.
12778     for ac_exec_ext in '' $ac_executable_extensions; do
12779   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12780     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12782     break 2
12783   fi
12784 done
12785   done
12786 IFS=$as_save_IFS
12787 
12788   ;;
12789 esac
12790 fi
12791 WHICH=$ac_cv_path_WHICH
12792 if test -n "$WHICH"; then
12793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12794 $as_echo "$WHICH" >&6; }
12795 else
12796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12797 $as_echo "no" >&6; }
12798 fi
12799 
12800 
12801   test -n "$WHICH" && break
12802 done
12803 
12804   else
12805     # The variable is set, but is it from the command line or the environment?
12806 
12807     # Try to remove the string !WHICH! from our list.
12808     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12809     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12810       # If it failed, the variable was not from the command line. Ignore it,
12811       # but warn the user (except for BASH, which is always set by the calling BASH).
12812       if test "xWHICH" != xBASH; then
12813         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12814 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12815       fi
12816       # Try to locate tool using the code snippet
12817       for ac_prog in which
12818 do
12819   # Extract the first word of "$ac_prog", so it can be a program name with args.
12820 set dummy $ac_prog; ac_word=$2
12821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12822 $as_echo_n "checking for $ac_word... " >&6; }
12823 if ${ac_cv_path_WHICH+:} false; then :
12824   $as_echo_n "(cached) " >&6
12825 else
12826   case $WHICH in
12827   [\\/]* | ?:[\\/]*)
12828   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12829   ;;
12830   *)
12831   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12832 for as_dir in $PATH
12833 do
12834   IFS=$as_save_IFS
12835   test -z "$as_dir" && as_dir=.
12836     for ac_exec_ext in '' $ac_executable_extensions; do
12837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12838     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12840     break 2
12841   fi
12842 done
12843   done
12844 IFS=$as_save_IFS
12845 
12846   ;;
12847 esac
12848 fi
12849 WHICH=$ac_cv_path_WHICH
12850 if test -n "$WHICH"; then
12851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12852 $as_echo "$WHICH" >&6; }
12853 else
12854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12855 $as_echo "no" >&6; }
12856 fi
12857 
12858 
12859   test -n "$WHICH" && break
12860 done
12861 
12862     else
12863       # If it succeeded, then it was overridden by the user. We will use it
12864       # for the tool.
12865 
12866       # First remove it from the list of overridden variables, so we can test
12867       # for unknown variables in the end.
12868       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12869 
12870       # Check if we try to supply an empty value
12871       if test "x$WHICH" = x; then
12872         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12873 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12874         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12875 $as_echo_n "checking for WHICH... " >&6; }
12876         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12877 $as_echo "disabled" >&6; }
12878       else
12879         # Check if the provided tool contains a complete path.
12880         tool_specified="$WHICH"
12881         tool_basename="${tool_specified##*/}"
12882         if test "x$tool_basename" = "x$tool_specified"; then
12883           # A command without a complete path is provided, search $PATH.
12884           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12885 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12886           # Extract the first word of "$tool_basename", so it can be a program name with args.
12887 set dummy $tool_basename; ac_word=$2
12888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12889 $as_echo_n "checking for $ac_word... " >&6; }
12890 if ${ac_cv_path_WHICH+:} false; then :
12891   $as_echo_n "(cached) " >&6
12892 else
12893   case $WHICH in
12894   [\\/]* | ?:[\\/]*)
12895   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12896   ;;
12897   *)
12898   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12899 for as_dir in $PATH
12900 do
12901   IFS=$as_save_IFS
12902   test -z "$as_dir" && as_dir=.
12903     for ac_exec_ext in '' $ac_executable_extensions; do
12904   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12905     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12906     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12907     break 2
12908   fi
12909 done
12910   done
12911 IFS=$as_save_IFS
12912 
12913   ;;
12914 esac
12915 fi
12916 WHICH=$ac_cv_path_WHICH
12917 if test -n "$WHICH"; then
12918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12919 $as_echo "$WHICH" >&6; }
12920 else
12921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12922 $as_echo "no" >&6; }
12923 fi
12924 
12925 
12926           if test "x$WHICH" = x; then
12927             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12928           fi
12929         else
12930           # Otherwise we believe it is a complete path. Use it as it is.
12931           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12932 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12933           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12934 $as_echo_n "checking for WHICH... " >&6; }
12935           if test ! -x "$tool_specified"; then
12936             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12937 $as_echo "not found" >&6; }
12938             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12939           fi
12940           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12941 $as_echo "$tool_specified" >&6; }
12942         fi
12943       fi
12944     fi
12945 
12946   fi
12947 
12948 
12949 
12950   if test "x$WHICH" = x; then
12951     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12952   fi
12953 
12954 
12955 
12956 
12957 
12958   # Publish this variable in the help.
12959 
12960 
12961   if [ -z "${XARGS+x}" ]; then
12962     # The variable is not set by user, try to locate tool using the code snippet
12963     for ac_prog in xargs
12964 do
12965   # Extract the first word of "$ac_prog", so it can be a program name with args.
12966 set dummy $ac_prog; ac_word=$2
12967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12968 $as_echo_n "checking for $ac_word... " >&6; }
12969 if ${ac_cv_path_XARGS+:} false; then :
12970   $as_echo_n "(cached) " >&6
12971 else
12972   case $XARGS in
12973   [\\/]* | ?:[\\/]*)
12974   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12975   ;;
12976   *)
12977   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12978 for as_dir in $PATH
12979 do
12980   IFS=$as_save_IFS
12981   test -z "$as_dir" && as_dir=.
12982     for ac_exec_ext in '' $ac_executable_extensions; do
12983   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12984     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12986     break 2
12987   fi
12988 done
12989   done
12990 IFS=$as_save_IFS
12991 
12992   ;;
12993 esac
12994 fi
12995 XARGS=$ac_cv_path_XARGS
12996 if test -n "$XARGS"; then
12997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12998 $as_echo "$XARGS" >&6; }
12999 else
13000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13001 $as_echo "no" >&6; }
13002 fi
13003 
13004 
13005   test -n "$XARGS" && break
13006 done
13007 
13008   else
13009     # The variable is set, but is it from the command line or the environment?
13010 
13011     # Try to remove the string !XARGS! from our list.
13012     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13013     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13014       # If it failed, the variable was not from the command line. Ignore it,
13015       # but warn the user (except for BASH, which is always set by the calling BASH).
13016       if test "xXARGS" != xBASH; then
13017         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13018 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13019       fi
13020       # Try to locate tool using the code snippet
13021       for ac_prog in xargs
13022 do
13023   # Extract the first word of "$ac_prog", so it can be a program name with args.
13024 set dummy $ac_prog; ac_word=$2
13025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13026 $as_echo_n "checking for $ac_word... " >&6; }
13027 if ${ac_cv_path_XARGS+:} false; then :
13028   $as_echo_n "(cached) " >&6
13029 else
13030   case $XARGS in
13031   [\\/]* | ?:[\\/]*)
13032   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13033   ;;
13034   *)
13035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13036 for as_dir in $PATH
13037 do
13038   IFS=$as_save_IFS
13039   test -z "$as_dir" && as_dir=.
13040     for ac_exec_ext in '' $ac_executable_extensions; do
13041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13042     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13044     break 2
13045   fi
13046 done
13047   done
13048 IFS=$as_save_IFS
13049 
13050   ;;
13051 esac
13052 fi
13053 XARGS=$ac_cv_path_XARGS
13054 if test -n "$XARGS"; then
13055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13056 $as_echo "$XARGS" >&6; }
13057 else
13058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13059 $as_echo "no" >&6; }
13060 fi
13061 
13062 
13063   test -n "$XARGS" && break
13064 done
13065 
13066     else
13067       # If it succeeded, then it was overridden by the user. We will use it
13068       # for the tool.
13069 
13070       # First remove it from the list of overridden variables, so we can test
13071       # for unknown variables in the end.
13072       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13073 
13074       # Check if we try to supply an empty value
13075       if test "x$XARGS" = x; then
13076         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13077 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13078         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13079 $as_echo_n "checking for XARGS... " >&6; }
13080         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13081 $as_echo "disabled" >&6; }
13082       else
13083         # Check if the provided tool contains a complete path.
13084         tool_specified="$XARGS"
13085         tool_basename="${tool_specified##*/}"
13086         if test "x$tool_basename" = "x$tool_specified"; then
13087           # A command without a complete path is provided, search $PATH.
13088           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13089 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13090           # Extract the first word of "$tool_basename", so it can be a program name with args.
13091 set dummy $tool_basename; ac_word=$2
13092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13093 $as_echo_n "checking for $ac_word... " >&6; }
13094 if ${ac_cv_path_XARGS+:} false; then :
13095   $as_echo_n "(cached) " >&6
13096 else
13097   case $XARGS in
13098   [\\/]* | ?:[\\/]*)
13099   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13100   ;;
13101   *)
13102   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13103 for as_dir in $PATH
13104 do
13105   IFS=$as_save_IFS
13106   test -z "$as_dir" && as_dir=.
13107     for ac_exec_ext in '' $ac_executable_extensions; do
13108   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13109     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13110     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13111     break 2
13112   fi
13113 done
13114   done
13115 IFS=$as_save_IFS
13116 
13117   ;;
13118 esac
13119 fi
13120 XARGS=$ac_cv_path_XARGS
13121 if test -n "$XARGS"; then
13122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13123 $as_echo "$XARGS" >&6; }
13124 else
13125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13126 $as_echo "no" >&6; }
13127 fi
13128 
13129 
13130           if test "x$XARGS" = x; then
13131             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13132           fi
13133         else
13134           # Otherwise we believe it is a complete path. Use it as it is.
13135           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13136 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13137           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13138 $as_echo_n "checking for XARGS... " >&6; }
13139           if test ! -x "$tool_specified"; then
13140             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13141 $as_echo "not found" >&6; }
13142             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13143           fi
13144           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13145 $as_echo "$tool_specified" >&6; }
13146         fi
13147       fi
13148     fi
13149 
13150   fi
13151 
13152 
13153 
13154   if test "x$XARGS" = x; then
13155     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13156   fi
13157 
13158 
13159 
13160   # Then required tools that require some special treatment.
13161 
13162 
13163   # Publish this variable in the help.
13164 
13165 
13166   if [ -z "${AWK+x}" ]; then
13167     # The variable is not set by user, try to locate tool using the code snippet
13168     for ac_prog in gawk mawk nawk awk
13169 do
13170   # Extract the first word of "$ac_prog", so it can be a program name with args.
13171 set dummy $ac_prog; ac_word=$2
13172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13173 $as_echo_n "checking for $ac_word... " >&6; }
13174 if ${ac_cv_prog_AWK+:} false; then :
13175   $as_echo_n "(cached) " >&6
13176 else
13177   if test -n "$AWK"; then
13178   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13179 else
13180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13181 for as_dir in $PATH
13182 do
13183   IFS=$as_save_IFS
13184   test -z "$as_dir" && as_dir=.
13185     for ac_exec_ext in '' $ac_executable_extensions; do
13186   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13187     ac_cv_prog_AWK="$ac_prog"
13188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13189     break 2
13190   fi
13191 done
13192   done
13193 IFS=$as_save_IFS
13194 
13195 fi
13196 fi
13197 AWK=$ac_cv_prog_AWK
13198 if test -n "$AWK"; then
13199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13200 $as_echo "$AWK" >&6; }
13201 else
13202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13203 $as_echo "no" >&6; }
13204 fi
13205 
13206 
13207   test -n "$AWK" && break
13208 done
13209 
13210   else
13211     # The variable is set, but is it from the command line or the environment?
13212 
13213     # Try to remove the string !AWK! from our list.
13214     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13215     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13216       # If it failed, the variable was not from the command line. Ignore it,
13217       # but warn the user (except for BASH, which is always set by the calling BASH).
13218       if test "xAWK" != xBASH; then
13219         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13220 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13221       fi
13222       # Try to locate tool using the code snippet
13223       for ac_prog in gawk mawk nawk awk
13224 do
13225   # Extract the first word of "$ac_prog", so it can be a program name with args.
13226 set dummy $ac_prog; ac_word=$2
13227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13228 $as_echo_n "checking for $ac_word... " >&6; }
13229 if ${ac_cv_prog_AWK+:} false; then :
13230   $as_echo_n "(cached) " >&6
13231 else
13232   if test -n "$AWK"; then
13233   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13234 else
13235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13236 for as_dir in $PATH
13237 do
13238   IFS=$as_save_IFS
13239   test -z "$as_dir" && as_dir=.
13240     for ac_exec_ext in '' $ac_executable_extensions; do
13241   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13242     ac_cv_prog_AWK="$ac_prog"
13243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13244     break 2
13245   fi
13246 done
13247   done
13248 IFS=$as_save_IFS
13249 
13250 fi
13251 fi
13252 AWK=$ac_cv_prog_AWK
13253 if test -n "$AWK"; then
13254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13255 $as_echo "$AWK" >&6; }
13256 else
13257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13258 $as_echo "no" >&6; }
13259 fi
13260 
13261 
13262   test -n "$AWK" && break
13263 done
13264 
13265     else
13266       # If it succeeded, then it was overridden by the user. We will use it
13267       # for the tool.
13268 
13269       # First remove it from the list of overridden variables, so we can test
13270       # for unknown variables in the end.
13271       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13272 
13273       # Check if we try to supply an empty value
13274       if test "x$AWK" = x; then
13275         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13276 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13277         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13278 $as_echo_n "checking for AWK... " >&6; }
13279         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13280 $as_echo "disabled" >&6; }
13281       else
13282         # Check if the provided tool contains a complete path.
13283         tool_specified="$AWK"
13284         tool_basename="${tool_specified##*/}"
13285         if test "x$tool_basename" = "x$tool_specified"; then
13286           # A command without a complete path is provided, search $PATH.
13287           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13288 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13289           # Extract the first word of "$tool_basename", so it can be a program name with args.
13290 set dummy $tool_basename; ac_word=$2
13291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13292 $as_echo_n "checking for $ac_word... " >&6; }
13293 if ${ac_cv_path_AWK+:} false; then :
13294   $as_echo_n "(cached) " >&6
13295 else
13296   case $AWK in
13297   [\\/]* | ?:[\\/]*)
13298   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13299   ;;
13300   *)
13301   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13302 for as_dir in $PATH
13303 do
13304   IFS=$as_save_IFS
13305   test -z "$as_dir" && as_dir=.
13306     for ac_exec_ext in '' $ac_executable_extensions; do
13307   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13308     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13309     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13310     break 2
13311   fi
13312 done
13313   done
13314 IFS=$as_save_IFS
13315 
13316   ;;
13317 esac
13318 fi
13319 AWK=$ac_cv_path_AWK
13320 if test -n "$AWK"; then
13321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13322 $as_echo "$AWK" >&6; }
13323 else
13324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13325 $as_echo "no" >&6; }
13326 fi
13327 
13328 
13329           if test "x$AWK" = x; then
13330             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13331           fi
13332         else
13333           # Otherwise we believe it is a complete path. Use it as it is.
13334           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13335 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13336           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13337 $as_echo_n "checking for AWK... " >&6; }
13338           if test ! -x "$tool_specified"; then
13339             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13340 $as_echo "not found" >&6; }
13341             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13342           fi
13343           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13344 $as_echo "$tool_specified" >&6; }
13345         fi
13346       fi
13347     fi
13348 
13349   fi
13350 
13351 
13352   if test "x$AWK" = x; then
13353     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13354   fi
13355 
13356 
13357 
13358 
13359   # Publish this variable in the help.
13360 
13361 
13362   if [ -z "${GREP+x}" ]; then
13363     # The variable is not set by user, try to locate tool using the code snippet
13364     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13365 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13366 if ${ac_cv_path_GREP+:} false; then :
13367   $as_echo_n "(cached) " >&6
13368 else
13369   if test -z "$GREP"; then
13370   ac_path_GREP_found=false
13371   # Loop through the user's path and test for each of PROGNAME-LIST
13372   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13373 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13374 do
13375   IFS=$as_save_IFS
13376   test -z "$as_dir" && as_dir=.
13377     for ac_prog in grep ggrep; do
13378     for ac_exec_ext in '' $ac_executable_extensions; do
13379       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13380       as_fn_executable_p "$ac_path_GREP" || continue
13381 # Check for GNU ac_path_GREP and select it if it is found.
13382   # Check for GNU $ac_path_GREP
13383 case `"$ac_path_GREP" --version 2>&1` in
13384 *GNU*)
13385   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13386 *)
13387   ac_count=0
13388   $as_echo_n 0123456789 >"conftest.in"
13389   while :
13390   do
13391     cat "conftest.in" "conftest.in" >"conftest.tmp"
13392     mv "conftest.tmp" "conftest.in"
13393     cp "conftest.in" "conftest.nl"
13394     $as_echo 'GREP' >> "conftest.nl"
13395     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13396     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13397     as_fn_arith $ac_count + 1 && ac_count=$as_val
13398     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13399       # Best one so far, save it but keep looking for a better one
13400       ac_cv_path_GREP="$ac_path_GREP"
13401       ac_path_GREP_max=$ac_count
13402     fi
13403     # 10*(2^10) chars as input seems more than enough
13404     test $ac_count -gt 10 && break
13405   done
13406   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13407 esac
13408 
13409       $ac_path_GREP_found && break 3
13410     done
13411   done
13412   done
13413 IFS=$as_save_IFS
13414   if test -z "$ac_cv_path_GREP"; then
13415     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13416   fi
13417 else
13418   ac_cv_path_GREP=$GREP
13419 fi
13420 
13421 fi
13422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13423 $as_echo "$ac_cv_path_GREP" >&6; }
13424  GREP="$ac_cv_path_GREP"
13425 
13426 
13427   else
13428     # The variable is set, but is it from the command line or the environment?
13429 
13430     # Try to remove the string !GREP! from our list.
13431     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13432     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13433       # If it failed, the variable was not from the command line. Ignore it,
13434       # but warn the user (except for BASH, which is always set by the calling BASH).
13435       if test "xGREP" != xBASH; then
13436         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13437 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13438       fi
13439       # Try to locate tool using the code snippet
13440       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13441 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13442 if ${ac_cv_path_GREP+:} false; then :
13443   $as_echo_n "(cached) " >&6
13444 else
13445   if test -z "$GREP"; then
13446   ac_path_GREP_found=false
13447   # Loop through the user's path and test for each of PROGNAME-LIST
13448   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13449 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13450 do
13451   IFS=$as_save_IFS
13452   test -z "$as_dir" && as_dir=.
13453     for ac_prog in grep ggrep; do
13454     for ac_exec_ext in '' $ac_executable_extensions; do
13455       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13456       as_fn_executable_p "$ac_path_GREP" || continue
13457 # Check for GNU ac_path_GREP and select it if it is found.
13458   # Check for GNU $ac_path_GREP
13459 case `"$ac_path_GREP" --version 2>&1` in
13460 *GNU*)
13461   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13462 *)
13463   ac_count=0
13464   $as_echo_n 0123456789 >"conftest.in"
13465   while :
13466   do
13467     cat "conftest.in" "conftest.in" >"conftest.tmp"
13468     mv "conftest.tmp" "conftest.in"
13469     cp "conftest.in" "conftest.nl"
13470     $as_echo 'GREP' >> "conftest.nl"
13471     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13472     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13473     as_fn_arith $ac_count + 1 && ac_count=$as_val
13474     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13475       # Best one so far, save it but keep looking for a better one
13476       ac_cv_path_GREP="$ac_path_GREP"
13477       ac_path_GREP_max=$ac_count
13478     fi
13479     # 10*(2^10) chars as input seems more than enough
13480     test $ac_count -gt 10 && break
13481   done
13482   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13483 esac
13484 
13485       $ac_path_GREP_found && break 3
13486     done
13487   done
13488   done
13489 IFS=$as_save_IFS
13490   if test -z "$ac_cv_path_GREP"; then
13491     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13492   fi
13493 else
13494   ac_cv_path_GREP=$GREP
13495 fi
13496 
13497 fi
13498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13499 $as_echo "$ac_cv_path_GREP" >&6; }
13500  GREP="$ac_cv_path_GREP"
13501 
13502 
13503     else
13504       # If it succeeded, then it was overridden by the user. We will use it
13505       # for the tool.
13506 
13507       # First remove it from the list of overridden variables, so we can test
13508       # for unknown variables in the end.
13509       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13510 
13511       # Check if we try to supply an empty value
13512       if test "x$GREP" = x; then
13513         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13514 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13515         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13516 $as_echo_n "checking for GREP... " >&6; }
13517         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13518 $as_echo "disabled" >&6; }
13519       else
13520         # Check if the provided tool contains a complete path.
13521         tool_specified="$GREP"
13522         tool_basename="${tool_specified##*/}"
13523         if test "x$tool_basename" = "x$tool_specified"; then
13524           # A command without a complete path is provided, search $PATH.
13525           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13526 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13527           # Extract the first word of "$tool_basename", so it can be a program name with args.
13528 set dummy $tool_basename; ac_word=$2
13529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13530 $as_echo_n "checking for $ac_word... " >&6; }
13531 if ${ac_cv_path_GREP+:} false; then :
13532   $as_echo_n "(cached) " >&6
13533 else
13534   case $GREP in
13535   [\\/]* | ?:[\\/]*)
13536   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13537   ;;
13538   *)
13539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13540 for as_dir in $PATH
13541 do
13542   IFS=$as_save_IFS
13543   test -z "$as_dir" && as_dir=.
13544     for ac_exec_ext in '' $ac_executable_extensions; do
13545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13546     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13548     break 2
13549   fi
13550 done
13551   done
13552 IFS=$as_save_IFS
13553 
13554   ;;
13555 esac
13556 fi
13557 GREP=$ac_cv_path_GREP
13558 if test -n "$GREP"; then
13559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13560 $as_echo "$GREP" >&6; }
13561 else
13562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13563 $as_echo "no" >&6; }
13564 fi
13565 
13566 
13567           if test "x$GREP" = x; then
13568             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13569           fi
13570         else
13571           # Otherwise we believe it is a complete path. Use it as it is.
13572           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13573 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13574           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13575 $as_echo_n "checking for GREP... " >&6; }
13576           if test ! -x "$tool_specified"; then
13577             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13578 $as_echo "not found" >&6; }
13579             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13580           fi
13581           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13582 $as_echo "$tool_specified" >&6; }
13583         fi
13584       fi
13585     fi
13586 
13587   fi
13588 
13589 
13590   if test "x$GREP" = x; then
13591     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13592   fi
13593 
13594 
13595 
13596 
13597   # Publish this variable in the help.
13598 
13599 
13600   if [ -z "${EGREP+x}" ]; then
13601     # The variable is not set by user, try to locate tool using the code snippet
13602     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13603 $as_echo_n "checking for egrep... " >&6; }
13604 if ${ac_cv_path_EGREP+:} false; then :
13605   $as_echo_n "(cached) " >&6
13606 else
13607   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13608    then ac_cv_path_EGREP="$GREP -E"
13609    else
13610      if test -z "$EGREP"; then
13611   ac_path_EGREP_found=false
13612   # Loop through the user's path and test for each of PROGNAME-LIST
13613   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13614 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13615 do
13616   IFS=$as_save_IFS
13617   test -z "$as_dir" && as_dir=.
13618     for ac_prog in egrep; do
13619     for ac_exec_ext in '' $ac_executable_extensions; do
13620       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13621       as_fn_executable_p "$ac_path_EGREP" || continue
13622 # Check for GNU ac_path_EGREP and select it if it is found.
13623   # Check for GNU $ac_path_EGREP
13624 case `"$ac_path_EGREP" --version 2>&1` in
13625 *GNU*)
13626   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13627 *)
13628   ac_count=0
13629   $as_echo_n 0123456789 >"conftest.in"
13630   while :
13631   do
13632     cat "conftest.in" "conftest.in" >"conftest.tmp"
13633     mv "conftest.tmp" "conftest.in"
13634     cp "conftest.in" "conftest.nl"
13635     $as_echo 'EGREP' >> "conftest.nl"
13636     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13637     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13638     as_fn_arith $ac_count + 1 && ac_count=$as_val
13639     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13640       # Best one so far, save it but keep looking for a better one
13641       ac_cv_path_EGREP="$ac_path_EGREP"
13642       ac_path_EGREP_max=$ac_count
13643     fi
13644     # 10*(2^10) chars as input seems more than enough
13645     test $ac_count -gt 10 && break
13646   done
13647   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13648 esac
13649 
13650       $ac_path_EGREP_found && break 3
13651     done
13652   done
13653   done
13654 IFS=$as_save_IFS
13655   if test -z "$ac_cv_path_EGREP"; then
13656     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13657   fi
13658 else
13659   ac_cv_path_EGREP=$EGREP
13660 fi
13661 
13662    fi
13663 fi
13664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13665 $as_echo "$ac_cv_path_EGREP" >&6; }
13666  EGREP="$ac_cv_path_EGREP"
13667 
13668 
13669   else
13670     # The variable is set, but is it from the command line or the environment?
13671 
13672     # Try to remove the string !EGREP! from our list.
13673     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13674     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13675       # If it failed, the variable was not from the command line. Ignore it,
13676       # but warn the user (except for BASH, which is always set by the calling BASH).
13677       if test "xEGREP" != xBASH; then
13678         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13679 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13680       fi
13681       # Try to locate tool using the code snippet
13682       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13683 $as_echo_n "checking for egrep... " >&6; }
13684 if ${ac_cv_path_EGREP+:} false; then :
13685   $as_echo_n "(cached) " >&6
13686 else
13687   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13688    then ac_cv_path_EGREP="$GREP -E"
13689    else
13690      if test -z "$EGREP"; then
13691   ac_path_EGREP_found=false
13692   # Loop through the user's path and test for each of PROGNAME-LIST
13693   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13694 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13695 do
13696   IFS=$as_save_IFS
13697   test -z "$as_dir" && as_dir=.
13698     for ac_prog in egrep; do
13699     for ac_exec_ext in '' $ac_executable_extensions; do
13700       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13701       as_fn_executable_p "$ac_path_EGREP" || continue
13702 # Check for GNU ac_path_EGREP and select it if it is found.
13703   # Check for GNU $ac_path_EGREP
13704 case `"$ac_path_EGREP" --version 2>&1` in
13705 *GNU*)
13706   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13707 *)
13708   ac_count=0
13709   $as_echo_n 0123456789 >"conftest.in"
13710   while :
13711   do
13712     cat "conftest.in" "conftest.in" >"conftest.tmp"
13713     mv "conftest.tmp" "conftest.in"
13714     cp "conftest.in" "conftest.nl"
13715     $as_echo 'EGREP' >> "conftest.nl"
13716     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13717     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13718     as_fn_arith $ac_count + 1 && ac_count=$as_val
13719     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13720       # Best one so far, save it but keep looking for a better one
13721       ac_cv_path_EGREP="$ac_path_EGREP"
13722       ac_path_EGREP_max=$ac_count
13723     fi
13724     # 10*(2^10) chars as input seems more than enough
13725     test $ac_count -gt 10 && break
13726   done
13727   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13728 esac
13729 
13730       $ac_path_EGREP_found && break 3
13731     done
13732   done
13733   done
13734 IFS=$as_save_IFS
13735   if test -z "$ac_cv_path_EGREP"; then
13736     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13737   fi
13738 else
13739   ac_cv_path_EGREP=$EGREP
13740 fi
13741 
13742    fi
13743 fi
13744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13745 $as_echo "$ac_cv_path_EGREP" >&6; }
13746  EGREP="$ac_cv_path_EGREP"
13747 
13748 
13749     else
13750       # If it succeeded, then it was overridden by the user. We will use it
13751       # for the tool.
13752 
13753       # First remove it from the list of overridden variables, so we can test
13754       # for unknown variables in the end.
13755       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13756 
13757       # Check if we try to supply an empty value
13758       if test "x$EGREP" = x; then
13759         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13760 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13761         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13762 $as_echo_n "checking for EGREP... " >&6; }
13763         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13764 $as_echo "disabled" >&6; }
13765       else
13766         # Check if the provided tool contains a complete path.
13767         tool_specified="$EGREP"
13768         tool_basename="${tool_specified##*/}"
13769         if test "x$tool_basename" = "x$tool_specified"; then
13770           # A command without a complete path is provided, search $PATH.
13771           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13772 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13773           # Extract the first word of "$tool_basename", so it can be a program name with args.
13774 set dummy $tool_basename; ac_word=$2
13775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13776 $as_echo_n "checking for $ac_word... " >&6; }
13777 if ${ac_cv_path_EGREP+:} false; then :
13778   $as_echo_n "(cached) " >&6
13779 else
13780   case $EGREP in
13781   [\\/]* | ?:[\\/]*)
13782   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13783   ;;
13784   *)
13785   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13786 for as_dir in $PATH
13787 do
13788   IFS=$as_save_IFS
13789   test -z "$as_dir" && as_dir=.
13790     for ac_exec_ext in '' $ac_executable_extensions; do
13791   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13792     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13793     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13794     break 2
13795   fi
13796 done
13797   done
13798 IFS=$as_save_IFS
13799 
13800   ;;
13801 esac
13802 fi
13803 EGREP=$ac_cv_path_EGREP
13804 if test -n "$EGREP"; then
13805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13806 $as_echo "$EGREP" >&6; }
13807 else
13808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13809 $as_echo "no" >&6; }
13810 fi
13811 
13812 
13813           if test "x$EGREP" = x; then
13814             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13815           fi
13816         else
13817           # Otherwise we believe it is a complete path. Use it as it is.
13818           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13819 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13820           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13821 $as_echo_n "checking for EGREP... " >&6; }
13822           if test ! -x "$tool_specified"; then
13823             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13824 $as_echo "not found" >&6; }
13825             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13826           fi
13827           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13828 $as_echo "$tool_specified" >&6; }
13829         fi
13830       fi
13831     fi
13832 
13833   fi
13834 
13835 
13836   if test "x$EGREP" = x; then
13837     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13838   fi
13839 
13840 
13841 
13842 
13843   # Publish this variable in the help.
13844 
13845 
13846   if [ -z "${FGREP+x}" ]; then
13847     # The variable is not set by user, try to locate tool using the code snippet
13848     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13849 $as_echo_n "checking for fgrep... " >&6; }
13850 if ${ac_cv_path_FGREP+:} false; then :
13851   $as_echo_n "(cached) " >&6
13852 else
13853   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13854    then ac_cv_path_FGREP="$GREP -F"
13855    else
13856      if test -z "$FGREP"; then
13857   ac_path_FGREP_found=false
13858   # Loop through the user's path and test for each of PROGNAME-LIST
13859   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13860 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13861 do
13862   IFS=$as_save_IFS
13863   test -z "$as_dir" && as_dir=.
13864     for ac_prog in fgrep; do
13865     for ac_exec_ext in '' $ac_executable_extensions; do
13866       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13867       as_fn_executable_p "$ac_path_FGREP" || continue
13868 # Check for GNU ac_path_FGREP and select it if it is found.
13869   # Check for GNU $ac_path_FGREP
13870 case `"$ac_path_FGREP" --version 2>&1` in
13871 *GNU*)
13872   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13873 *)
13874   ac_count=0
13875   $as_echo_n 0123456789 >"conftest.in"
13876   while :
13877   do
13878     cat "conftest.in" "conftest.in" >"conftest.tmp"
13879     mv "conftest.tmp" "conftest.in"
13880     cp "conftest.in" "conftest.nl"
13881     $as_echo 'FGREP' >> "conftest.nl"
13882     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13883     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13884     as_fn_arith $ac_count + 1 && ac_count=$as_val
13885     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13886       # Best one so far, save it but keep looking for a better one
13887       ac_cv_path_FGREP="$ac_path_FGREP"
13888       ac_path_FGREP_max=$ac_count
13889     fi
13890     # 10*(2^10) chars as input seems more than enough
13891     test $ac_count -gt 10 && break
13892   done
13893   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13894 esac
13895 
13896       $ac_path_FGREP_found && break 3
13897     done
13898   done
13899   done
13900 IFS=$as_save_IFS
13901   if test -z "$ac_cv_path_FGREP"; then
13902     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13903   fi
13904 else
13905   ac_cv_path_FGREP=$FGREP
13906 fi
13907 
13908    fi
13909 fi
13910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13911 $as_echo "$ac_cv_path_FGREP" >&6; }
13912  FGREP="$ac_cv_path_FGREP"
13913 
13914 
13915   else
13916     # The variable is set, but is it from the command line or the environment?
13917 
13918     # Try to remove the string !FGREP! from our list.
13919     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13920     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13921       # If it failed, the variable was not from the command line. Ignore it,
13922       # but warn the user (except for BASH, which is always set by the calling BASH).
13923       if test "xFGREP" != xBASH; then
13924         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13925 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13926       fi
13927       # Try to locate tool using the code snippet
13928       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13929 $as_echo_n "checking for fgrep... " >&6; }
13930 if ${ac_cv_path_FGREP+:} false; then :
13931   $as_echo_n "(cached) " >&6
13932 else
13933   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13934    then ac_cv_path_FGREP="$GREP -F"
13935    else
13936      if test -z "$FGREP"; then
13937   ac_path_FGREP_found=false
13938   # Loop through the user's path and test for each of PROGNAME-LIST
13939   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13940 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13941 do
13942   IFS=$as_save_IFS
13943   test -z "$as_dir" && as_dir=.
13944     for ac_prog in fgrep; do
13945     for ac_exec_ext in '' $ac_executable_extensions; do
13946       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13947       as_fn_executable_p "$ac_path_FGREP" || continue
13948 # Check for GNU ac_path_FGREP and select it if it is found.
13949   # Check for GNU $ac_path_FGREP
13950 case `"$ac_path_FGREP" --version 2>&1` in
13951 *GNU*)
13952   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13953 *)
13954   ac_count=0
13955   $as_echo_n 0123456789 >"conftest.in"
13956   while :
13957   do
13958     cat "conftest.in" "conftest.in" >"conftest.tmp"
13959     mv "conftest.tmp" "conftest.in"
13960     cp "conftest.in" "conftest.nl"
13961     $as_echo 'FGREP' >> "conftest.nl"
13962     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13963     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13964     as_fn_arith $ac_count + 1 && ac_count=$as_val
13965     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13966       # Best one so far, save it but keep looking for a better one
13967       ac_cv_path_FGREP="$ac_path_FGREP"
13968       ac_path_FGREP_max=$ac_count
13969     fi
13970     # 10*(2^10) chars as input seems more than enough
13971     test $ac_count -gt 10 && break
13972   done
13973   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13974 esac
13975 
13976       $ac_path_FGREP_found && break 3
13977     done
13978   done
13979   done
13980 IFS=$as_save_IFS
13981   if test -z "$ac_cv_path_FGREP"; then
13982     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13983   fi
13984 else
13985   ac_cv_path_FGREP=$FGREP
13986 fi
13987 
13988    fi
13989 fi
13990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13991 $as_echo "$ac_cv_path_FGREP" >&6; }
13992  FGREP="$ac_cv_path_FGREP"
13993 
13994 
13995     else
13996       # If it succeeded, then it was overridden by the user. We will use it
13997       # for the tool.
13998 
13999       # First remove it from the list of overridden variables, so we can test
14000       # for unknown variables in the end.
14001       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14002 
14003       # Check if we try to supply an empty value
14004       if test "x$FGREP" = x; then
14005         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14006 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14007         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14008 $as_echo_n "checking for FGREP... " >&6; }
14009         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14010 $as_echo "disabled" >&6; }
14011       else
14012         # Check if the provided tool contains a complete path.
14013         tool_specified="$FGREP"
14014         tool_basename="${tool_specified##*/}"
14015         if test "x$tool_basename" = "x$tool_specified"; then
14016           # A command without a complete path is provided, search $PATH.
14017           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14018 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14019           # Extract the first word of "$tool_basename", so it can be a program name with args.
14020 set dummy $tool_basename; ac_word=$2
14021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14022 $as_echo_n "checking for $ac_word... " >&6; }
14023 if ${ac_cv_path_FGREP+:} false; then :
14024   $as_echo_n "(cached) " >&6
14025 else
14026   case $FGREP in
14027   [\\/]* | ?:[\\/]*)
14028   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14029   ;;
14030   *)
14031   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14032 for as_dir in $PATH
14033 do
14034   IFS=$as_save_IFS
14035   test -z "$as_dir" && as_dir=.
14036     for ac_exec_ext in '' $ac_executable_extensions; do
14037   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14038     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14039     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14040     break 2
14041   fi
14042 done
14043   done
14044 IFS=$as_save_IFS
14045 
14046   ;;
14047 esac
14048 fi
14049 FGREP=$ac_cv_path_FGREP
14050 if test -n "$FGREP"; then
14051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14052 $as_echo "$FGREP" >&6; }
14053 else
14054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14055 $as_echo "no" >&6; }
14056 fi
14057 
14058 
14059           if test "x$FGREP" = x; then
14060             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14061           fi
14062         else
14063           # Otherwise we believe it is a complete path. Use it as it is.
14064           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14065 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14066           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14067 $as_echo_n "checking for FGREP... " >&6; }
14068           if test ! -x "$tool_specified"; then
14069             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14070 $as_echo "not found" >&6; }
14071             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14072           fi
14073           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14074 $as_echo "$tool_specified" >&6; }
14075         fi
14076       fi
14077     fi
14078 
14079   fi
14080 
14081 
14082   if test "x$FGREP" = x; then
14083     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14084   fi
14085 
14086 
14087 
14088 
14089   # Publish this variable in the help.
14090 
14091 
14092   if [ -z "${SED+x}" ]; then
14093     # The variable is not set by user, try to locate tool using the code snippet
14094     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14095 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14096 if ${ac_cv_path_SED+:} false; then :
14097   $as_echo_n "(cached) " >&6
14098 else
14099             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14100      for ac_i in 1 2 3 4 5 6 7; do
14101        ac_script="$ac_script$as_nl$ac_script"
14102      done
14103      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14104      { ac_script=; unset ac_script;}
14105      if test -z "$SED"; then
14106   ac_path_SED_found=false
14107   # Loop through the user's path and test for each of PROGNAME-LIST
14108   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14109 for as_dir in $PATH
14110 do
14111   IFS=$as_save_IFS
14112   test -z "$as_dir" && as_dir=.
14113     for ac_prog in sed gsed; do
14114     for ac_exec_ext in '' $ac_executable_extensions; do
14115       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14116       as_fn_executable_p "$ac_path_SED" || continue
14117 # Check for GNU ac_path_SED and select it if it is found.
14118   # Check for GNU $ac_path_SED
14119 case `"$ac_path_SED" --version 2>&1` in
14120 *GNU*)
14121   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14122 *)
14123   ac_count=0
14124   $as_echo_n 0123456789 >"conftest.in"
14125   while :
14126   do
14127     cat "conftest.in" "conftest.in" >"conftest.tmp"
14128     mv "conftest.tmp" "conftest.in"
14129     cp "conftest.in" "conftest.nl"
14130     $as_echo '' >> "conftest.nl"
14131     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14132     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14133     as_fn_arith $ac_count + 1 && ac_count=$as_val
14134     if test $ac_count -gt ${ac_path_SED_max-0}; then
14135       # Best one so far, save it but keep looking for a better one
14136       ac_cv_path_SED="$ac_path_SED"
14137       ac_path_SED_max=$ac_count
14138     fi
14139     # 10*(2^10) chars as input seems more than enough
14140     test $ac_count -gt 10 && break
14141   done
14142   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14143 esac
14144 
14145       $ac_path_SED_found && break 3
14146     done
14147   done
14148   done
14149 IFS=$as_save_IFS
14150   if test -z "$ac_cv_path_SED"; then
14151     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14152   fi
14153 else
14154   ac_cv_path_SED=$SED
14155 fi
14156 
14157 fi
14158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14159 $as_echo "$ac_cv_path_SED" >&6; }
14160  SED="$ac_cv_path_SED"
14161   rm -f conftest.sed
14162 
14163   else
14164     # The variable is set, but is it from the command line or the environment?
14165 
14166     # Try to remove the string !SED! from our list.
14167     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14168     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14169       # If it failed, the variable was not from the command line. Ignore it,
14170       # but warn the user (except for BASH, which is always set by the calling BASH).
14171       if test "xSED" != xBASH; then
14172         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14173 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14174       fi
14175       # Try to locate tool using the code snippet
14176       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14177 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14178 if ${ac_cv_path_SED+:} false; then :
14179   $as_echo_n "(cached) " >&6
14180 else
14181             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14182      for ac_i in 1 2 3 4 5 6 7; do
14183        ac_script="$ac_script$as_nl$ac_script"
14184      done
14185      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14186      { ac_script=; unset ac_script;}
14187      if test -z "$SED"; then
14188   ac_path_SED_found=false
14189   # Loop through the user's path and test for each of PROGNAME-LIST
14190   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14191 for as_dir in $PATH
14192 do
14193   IFS=$as_save_IFS
14194   test -z "$as_dir" && as_dir=.
14195     for ac_prog in sed gsed; do
14196     for ac_exec_ext in '' $ac_executable_extensions; do
14197       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14198       as_fn_executable_p "$ac_path_SED" || continue
14199 # Check for GNU ac_path_SED and select it if it is found.
14200   # Check for GNU $ac_path_SED
14201 case `"$ac_path_SED" --version 2>&1` in
14202 *GNU*)
14203   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14204 *)
14205   ac_count=0
14206   $as_echo_n 0123456789 >"conftest.in"
14207   while :
14208   do
14209     cat "conftest.in" "conftest.in" >"conftest.tmp"
14210     mv "conftest.tmp" "conftest.in"
14211     cp "conftest.in" "conftest.nl"
14212     $as_echo '' >> "conftest.nl"
14213     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14214     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14215     as_fn_arith $ac_count + 1 && ac_count=$as_val
14216     if test $ac_count -gt ${ac_path_SED_max-0}; then
14217       # Best one so far, save it but keep looking for a better one
14218       ac_cv_path_SED="$ac_path_SED"
14219       ac_path_SED_max=$ac_count
14220     fi
14221     # 10*(2^10) chars as input seems more than enough
14222     test $ac_count -gt 10 && break
14223   done
14224   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14225 esac
14226 
14227       $ac_path_SED_found && break 3
14228     done
14229   done
14230   done
14231 IFS=$as_save_IFS
14232   if test -z "$ac_cv_path_SED"; then
14233     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14234   fi
14235 else
14236   ac_cv_path_SED=$SED
14237 fi
14238 
14239 fi
14240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14241 $as_echo "$ac_cv_path_SED" >&6; }
14242  SED="$ac_cv_path_SED"
14243   rm -f conftest.sed
14244 
14245     else
14246       # If it succeeded, then it was overridden by the user. We will use it
14247       # for the tool.
14248 
14249       # First remove it from the list of overridden variables, so we can test
14250       # for unknown variables in the end.
14251       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14252 
14253       # Check if we try to supply an empty value
14254       if test "x$SED" = x; then
14255         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14256 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14257         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14258 $as_echo_n "checking for SED... " >&6; }
14259         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14260 $as_echo "disabled" >&6; }
14261       else
14262         # Check if the provided tool contains a complete path.
14263         tool_specified="$SED"
14264         tool_basename="${tool_specified##*/}"
14265         if test "x$tool_basename" = "x$tool_specified"; then
14266           # A command without a complete path is provided, search $PATH.
14267           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14268 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14269           # Extract the first word of "$tool_basename", so it can be a program name with args.
14270 set dummy $tool_basename; ac_word=$2
14271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14272 $as_echo_n "checking for $ac_word... " >&6; }
14273 if ${ac_cv_path_SED+:} false; then :
14274   $as_echo_n "(cached) " >&6
14275 else
14276   case $SED in
14277   [\\/]* | ?:[\\/]*)
14278   ac_cv_path_SED="$SED" # Let the user override the test with a path.
14279   ;;
14280   *)
14281   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14282 for as_dir in $PATH
14283 do
14284   IFS=$as_save_IFS
14285   test -z "$as_dir" && as_dir=.
14286     for ac_exec_ext in '' $ac_executable_extensions; do
14287   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14288     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14290     break 2
14291   fi
14292 done
14293   done
14294 IFS=$as_save_IFS
14295 
14296   ;;
14297 esac
14298 fi
14299 SED=$ac_cv_path_SED
14300 if test -n "$SED"; then
14301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14302 $as_echo "$SED" >&6; }
14303 else
14304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14305 $as_echo "no" >&6; }
14306 fi
14307 
14308 
14309           if test "x$SED" = x; then
14310             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14311           fi
14312         else
14313           # Otherwise we believe it is a complete path. Use it as it is.
14314           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14315 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14316           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14317 $as_echo_n "checking for SED... " >&6; }
14318           if test ! -x "$tool_specified"; then
14319             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14320 $as_echo "not found" >&6; }
14321             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14322           fi
14323           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14324 $as_echo "$tool_specified" >&6; }
14325         fi
14326       fi
14327     fi
14328 
14329   fi
14330 
14331 
14332   if test "x$SED" = x; then
14333     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14334   fi
14335 
14336 
14337 
14338   # Always force rm.
14339   RM="$RM -f"
14340 
14341   # pwd behaves differently on various platforms and some don't support the -L flag.
14342   # Always use the bash builtin pwd to get uniform behavior.
14343   THEPWDCMD=pwd
14344 
14345   # These are not required on all platforms
14346 
14347 
14348   # Publish this variable in the help.
14349 
14350 
14351   if [ -z "${CYGPATH+x}" ]; then
14352     # The variable is not set by user, try to locate tool using the code snippet
14353     for ac_prog in cygpath
14354 do
14355   # Extract the first word of "$ac_prog", so it can be a program name with args.
14356 set dummy $ac_prog; ac_word=$2
14357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14358 $as_echo_n "checking for $ac_word... " >&6; }
14359 if ${ac_cv_path_CYGPATH+:} false; then :
14360   $as_echo_n "(cached) " >&6
14361 else
14362   case $CYGPATH in
14363   [\\/]* | ?:[\\/]*)
14364   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14365   ;;
14366   *)
14367   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14368 for as_dir in $PATH
14369 do
14370   IFS=$as_save_IFS
14371   test -z "$as_dir" && as_dir=.
14372     for ac_exec_ext in '' $ac_executable_extensions; do
14373   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14374     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14375     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14376     break 2
14377   fi
14378 done
14379   done
14380 IFS=$as_save_IFS
14381 
14382   ;;
14383 esac
14384 fi
14385 CYGPATH=$ac_cv_path_CYGPATH
14386 if test -n "$CYGPATH"; then
14387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14388 $as_echo "$CYGPATH" >&6; }
14389 else
14390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14391 $as_echo "no" >&6; }
14392 fi
14393 
14394 
14395   test -n "$CYGPATH" && break
14396 done
14397 
14398   else
14399     # The variable is set, but is it from the command line or the environment?
14400 
14401     # Try to remove the string !CYGPATH! from our list.
14402     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14403     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14404       # If it failed, the variable was not from the command line. Ignore it,
14405       # but warn the user (except for BASH, which is always set by the calling BASH).
14406       if test "xCYGPATH" != xBASH; then
14407         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14408 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14409       fi
14410       # Try to locate tool using the code snippet
14411       for ac_prog in cygpath
14412 do
14413   # Extract the first word of "$ac_prog", so it can be a program name with args.
14414 set dummy $ac_prog; ac_word=$2
14415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14416 $as_echo_n "checking for $ac_word... " >&6; }
14417 if ${ac_cv_path_CYGPATH+:} false; then :
14418   $as_echo_n "(cached) " >&6
14419 else
14420   case $CYGPATH in
14421   [\\/]* | ?:[\\/]*)
14422   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14423   ;;
14424   *)
14425   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14426 for as_dir in $PATH
14427 do
14428   IFS=$as_save_IFS
14429   test -z "$as_dir" && as_dir=.
14430     for ac_exec_ext in '' $ac_executable_extensions; do
14431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14432     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14434     break 2
14435   fi
14436 done
14437   done
14438 IFS=$as_save_IFS
14439 
14440   ;;
14441 esac
14442 fi
14443 CYGPATH=$ac_cv_path_CYGPATH
14444 if test -n "$CYGPATH"; then
14445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14446 $as_echo "$CYGPATH" >&6; }
14447 else
14448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14449 $as_echo "no" >&6; }
14450 fi
14451 
14452 
14453   test -n "$CYGPATH" && break
14454 done
14455 
14456     else
14457       # If it succeeded, then it was overridden by the user. We will use it
14458       # for the tool.
14459 
14460       # First remove it from the list of overridden variables, so we can test
14461       # for unknown variables in the end.
14462       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14463 
14464       # Check if we try to supply an empty value
14465       if test "x$CYGPATH" = x; then
14466         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14467 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14468         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14469 $as_echo_n "checking for CYGPATH... " >&6; }
14470         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14471 $as_echo "disabled" >&6; }
14472       else
14473         # Check if the provided tool contains a complete path.
14474         tool_specified="$CYGPATH"
14475         tool_basename="${tool_specified##*/}"
14476         if test "x$tool_basename" = "x$tool_specified"; then
14477           # A command without a complete path is provided, search $PATH.
14478           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14479 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14480           # Extract the first word of "$tool_basename", so it can be a program name with args.
14481 set dummy $tool_basename; ac_word=$2
14482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14483 $as_echo_n "checking for $ac_word... " >&6; }
14484 if ${ac_cv_path_CYGPATH+:} false; then :
14485   $as_echo_n "(cached) " >&6
14486 else
14487   case $CYGPATH in
14488   [\\/]* | ?:[\\/]*)
14489   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14490   ;;
14491   *)
14492   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14493 for as_dir in $PATH
14494 do
14495   IFS=$as_save_IFS
14496   test -z "$as_dir" && as_dir=.
14497     for ac_exec_ext in '' $ac_executable_extensions; do
14498   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14499     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14500     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14501     break 2
14502   fi
14503 done
14504   done
14505 IFS=$as_save_IFS
14506 
14507   ;;
14508 esac
14509 fi
14510 CYGPATH=$ac_cv_path_CYGPATH
14511 if test -n "$CYGPATH"; then
14512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14513 $as_echo "$CYGPATH" >&6; }
14514 else
14515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14516 $as_echo "no" >&6; }
14517 fi
14518 
14519 
14520           if test "x$CYGPATH" = x; then
14521             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14522           fi
14523         else
14524           # Otherwise we believe it is a complete path. Use it as it is.
14525           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14526 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14527           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14528 $as_echo_n "checking for CYGPATH... " >&6; }
14529           if test ! -x "$tool_specified"; then
14530             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14531 $as_echo "not found" >&6; }
14532             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14533           fi
14534           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14535 $as_echo "$tool_specified" >&6; }
14536         fi
14537       fi
14538     fi
14539 
14540   fi
14541 
14542 
14543 
14544 
14545   # Publish this variable in the help.
14546 
14547 
14548   if [ -z "${READLINK+x}" ]; then
14549     # The variable is not set by user, try to locate tool using the code snippet
14550     for ac_prog in greadlink readlink
14551 do
14552   # Extract the first word of "$ac_prog", so it can be a program name with args.
14553 set dummy $ac_prog; ac_word=$2
14554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14555 $as_echo_n "checking for $ac_word... " >&6; }
14556 if ${ac_cv_path_READLINK+:} false; then :
14557   $as_echo_n "(cached) " >&6
14558 else
14559   case $READLINK in
14560   [\\/]* | ?:[\\/]*)
14561   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14562   ;;
14563   *)
14564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14565 for as_dir in $PATH
14566 do
14567   IFS=$as_save_IFS
14568   test -z "$as_dir" && as_dir=.
14569     for ac_exec_ext in '' $ac_executable_extensions; do
14570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14571     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14573     break 2
14574   fi
14575 done
14576   done
14577 IFS=$as_save_IFS
14578 
14579   ;;
14580 esac
14581 fi
14582 READLINK=$ac_cv_path_READLINK
14583 if test -n "$READLINK"; then
14584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14585 $as_echo "$READLINK" >&6; }
14586 else
14587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14588 $as_echo "no" >&6; }
14589 fi
14590 
14591 
14592   test -n "$READLINK" && break
14593 done
14594 
14595   else
14596     # The variable is set, but is it from the command line or the environment?
14597 
14598     # Try to remove the string !READLINK! from our list.
14599     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14600     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14601       # If it failed, the variable was not from the command line. Ignore it,
14602       # but warn the user (except for BASH, which is always set by the calling BASH).
14603       if test "xREADLINK" != xBASH; then
14604         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14605 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14606       fi
14607       # Try to locate tool using the code snippet
14608       for ac_prog in greadlink readlink
14609 do
14610   # Extract the first word of "$ac_prog", so it can be a program name with args.
14611 set dummy $ac_prog; ac_word=$2
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14613 $as_echo_n "checking for $ac_word... " >&6; }
14614 if ${ac_cv_path_READLINK+:} false; then :
14615   $as_echo_n "(cached) " >&6
14616 else
14617   case $READLINK in
14618   [\\/]* | ?:[\\/]*)
14619   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14620   ;;
14621   *)
14622   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14623 for as_dir in $PATH
14624 do
14625   IFS=$as_save_IFS
14626   test -z "$as_dir" && as_dir=.
14627     for ac_exec_ext in '' $ac_executable_extensions; do
14628   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14629     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14631     break 2
14632   fi
14633 done
14634   done
14635 IFS=$as_save_IFS
14636 
14637   ;;
14638 esac
14639 fi
14640 READLINK=$ac_cv_path_READLINK
14641 if test -n "$READLINK"; then
14642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14643 $as_echo "$READLINK" >&6; }
14644 else
14645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14646 $as_echo "no" >&6; }
14647 fi
14648 
14649 
14650   test -n "$READLINK" && break
14651 done
14652 
14653     else
14654       # If it succeeded, then it was overridden by the user. We will use it
14655       # for the tool.
14656 
14657       # First remove it from the list of overridden variables, so we can test
14658       # for unknown variables in the end.
14659       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14660 
14661       # Check if we try to supply an empty value
14662       if test "x$READLINK" = x; then
14663         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14664 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14665         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14666 $as_echo_n "checking for READLINK... " >&6; }
14667         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14668 $as_echo "disabled" >&6; }
14669       else
14670         # Check if the provided tool contains a complete path.
14671         tool_specified="$READLINK"
14672         tool_basename="${tool_specified##*/}"
14673         if test "x$tool_basename" = "x$tool_specified"; then
14674           # A command without a complete path is provided, search $PATH.
14675           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14676 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14677           # Extract the first word of "$tool_basename", so it can be a program name with args.
14678 set dummy $tool_basename; ac_word=$2
14679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14680 $as_echo_n "checking for $ac_word... " >&6; }
14681 if ${ac_cv_path_READLINK+:} false; then :
14682   $as_echo_n "(cached) " >&6
14683 else
14684   case $READLINK in
14685   [\\/]* | ?:[\\/]*)
14686   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14687   ;;
14688   *)
14689   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14690 for as_dir in $PATH
14691 do
14692   IFS=$as_save_IFS
14693   test -z "$as_dir" && as_dir=.
14694     for ac_exec_ext in '' $ac_executable_extensions; do
14695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14696     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14698     break 2
14699   fi
14700 done
14701   done
14702 IFS=$as_save_IFS
14703 
14704   ;;
14705 esac
14706 fi
14707 READLINK=$ac_cv_path_READLINK
14708 if test -n "$READLINK"; then
14709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14710 $as_echo "$READLINK" >&6; }
14711 else
14712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14713 $as_echo "no" >&6; }
14714 fi
14715 
14716 
14717           if test "x$READLINK" = x; then
14718             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14719           fi
14720         else
14721           # Otherwise we believe it is a complete path. Use it as it is.
14722           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14723 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14724           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14725 $as_echo_n "checking for READLINK... " >&6; }
14726           if test ! -x "$tool_specified"; then
14727             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14728 $as_echo "not found" >&6; }
14729             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14730           fi
14731           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14732 $as_echo "$tool_specified" >&6; }
14733         fi
14734       fi
14735     fi
14736 
14737   fi
14738 
14739 
14740 
14741 
14742   # Publish this variable in the help.
14743 
14744 
14745   if [ -z "${DF+x}" ]; then
14746     # The variable is not set by user, try to locate tool using the code snippet
14747     for ac_prog in df
14748 do
14749   # Extract the first word of "$ac_prog", so it can be a program name with args.
14750 set dummy $ac_prog; ac_word=$2
14751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14752 $as_echo_n "checking for $ac_word... " >&6; }
14753 if ${ac_cv_path_DF+:} false; then :
14754   $as_echo_n "(cached) " >&6
14755 else
14756   case $DF in
14757   [\\/]* | ?:[\\/]*)
14758   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14759   ;;
14760   *)
14761   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14762 for as_dir in $PATH
14763 do
14764   IFS=$as_save_IFS
14765   test -z "$as_dir" && as_dir=.
14766     for ac_exec_ext in '' $ac_executable_extensions; do
14767   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14768     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14769     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14770     break 2
14771   fi
14772 done
14773   done
14774 IFS=$as_save_IFS
14775 
14776   ;;
14777 esac
14778 fi
14779 DF=$ac_cv_path_DF
14780 if test -n "$DF"; then
14781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14782 $as_echo "$DF" >&6; }
14783 else
14784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14785 $as_echo "no" >&6; }
14786 fi
14787 
14788 
14789   test -n "$DF" && break
14790 done
14791 
14792   else
14793     # The variable is set, but is it from the command line or the environment?
14794 
14795     # Try to remove the string !DF! from our list.
14796     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14797     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14798       # If it failed, the variable was not from the command line. Ignore it,
14799       # but warn the user (except for BASH, which is always set by the calling BASH).
14800       if test "xDF" != xBASH; then
14801         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14802 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14803       fi
14804       # Try to locate tool using the code snippet
14805       for ac_prog in df
14806 do
14807   # Extract the first word of "$ac_prog", so it can be a program name with args.
14808 set dummy $ac_prog; ac_word=$2
14809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14810 $as_echo_n "checking for $ac_word... " >&6; }
14811 if ${ac_cv_path_DF+:} false; then :
14812   $as_echo_n "(cached) " >&6
14813 else
14814   case $DF in
14815   [\\/]* | ?:[\\/]*)
14816   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14817   ;;
14818   *)
14819   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14820 for as_dir in $PATH
14821 do
14822   IFS=$as_save_IFS
14823   test -z "$as_dir" && as_dir=.
14824     for ac_exec_ext in '' $ac_executable_extensions; do
14825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14826     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14828     break 2
14829   fi
14830 done
14831   done
14832 IFS=$as_save_IFS
14833 
14834   ;;
14835 esac
14836 fi
14837 DF=$ac_cv_path_DF
14838 if test -n "$DF"; then
14839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14840 $as_echo "$DF" >&6; }
14841 else
14842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14843 $as_echo "no" >&6; }
14844 fi
14845 
14846 
14847   test -n "$DF" && break
14848 done
14849 
14850     else
14851       # If it succeeded, then it was overridden by the user. We will use it
14852       # for the tool.
14853 
14854       # First remove it from the list of overridden variables, so we can test
14855       # for unknown variables in the end.
14856       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14857 
14858       # Check if we try to supply an empty value
14859       if test "x$DF" = x; then
14860         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14861 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14862         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14863 $as_echo_n "checking for DF... " >&6; }
14864         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14865 $as_echo "disabled" >&6; }
14866       else
14867         # Check if the provided tool contains a complete path.
14868         tool_specified="$DF"
14869         tool_basename="${tool_specified##*/}"
14870         if test "x$tool_basename" = "x$tool_specified"; then
14871           # A command without a complete path is provided, search $PATH.
14872           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14873 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14874           # Extract the first word of "$tool_basename", so it can be a program name with args.
14875 set dummy $tool_basename; ac_word=$2
14876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14877 $as_echo_n "checking for $ac_word... " >&6; }
14878 if ${ac_cv_path_DF+:} false; then :
14879   $as_echo_n "(cached) " >&6
14880 else
14881   case $DF in
14882   [\\/]* | ?:[\\/]*)
14883   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14884   ;;
14885   *)
14886   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14887 for as_dir in $PATH
14888 do
14889   IFS=$as_save_IFS
14890   test -z "$as_dir" && as_dir=.
14891     for ac_exec_ext in '' $ac_executable_extensions; do
14892   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14893     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14894     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14895     break 2
14896   fi
14897 done
14898   done
14899 IFS=$as_save_IFS
14900 
14901   ;;
14902 esac
14903 fi
14904 DF=$ac_cv_path_DF
14905 if test -n "$DF"; then
14906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14907 $as_echo "$DF" >&6; }
14908 else
14909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14910 $as_echo "no" >&6; }
14911 fi
14912 
14913 
14914           if test "x$DF" = x; then
14915             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14916           fi
14917         else
14918           # Otherwise we believe it is a complete path. Use it as it is.
14919           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14920 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14921           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14922 $as_echo_n "checking for DF... " >&6; }
14923           if test ! -x "$tool_specified"; then
14924             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14925 $as_echo "not found" >&6; }
14926             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14927           fi
14928           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14929 $as_echo "$tool_specified" >&6; }
14930         fi
14931       fi
14932     fi
14933 
14934   fi
14935 
14936 
14937 
14938 
14939   # Publish this variable in the help.
14940 
14941 
14942   if [ -z "${CPIO+x}" ]; then
14943     # The variable is not set by user, try to locate tool using the code snippet
14944     for ac_prog in cpio bsdcpio
14945 do
14946   # Extract the first word of "$ac_prog", so it can be a program name with args.
14947 set dummy $ac_prog; ac_word=$2
14948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14949 $as_echo_n "checking for $ac_word... " >&6; }
14950 if ${ac_cv_path_CPIO+:} false; then :
14951   $as_echo_n "(cached) " >&6
14952 else
14953   case $CPIO in
14954   [\\/]* | ?:[\\/]*)
14955   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14956   ;;
14957   *)
14958   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14959 for as_dir in $PATH
14960 do
14961   IFS=$as_save_IFS
14962   test -z "$as_dir" && as_dir=.
14963     for ac_exec_ext in '' $ac_executable_extensions; do
14964   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14965     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14966     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14967     break 2
14968   fi
14969 done
14970   done
14971 IFS=$as_save_IFS
14972 
14973   ;;
14974 esac
14975 fi
14976 CPIO=$ac_cv_path_CPIO
14977 if test -n "$CPIO"; then
14978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14979 $as_echo "$CPIO" >&6; }
14980 else
14981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14982 $as_echo "no" >&6; }
14983 fi
14984 
14985 
14986   test -n "$CPIO" && break
14987 done
14988 
14989   else
14990     # The variable is set, but is it from the command line or the environment?
14991 
14992     # Try to remove the string !CPIO! from our list.
14993     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14994     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14995       # If it failed, the variable was not from the command line. Ignore it,
14996       # but warn the user (except for BASH, which is always set by the calling BASH).
14997       if test "xCPIO" != xBASH; then
14998         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14999 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15000       fi
15001       # Try to locate tool using the code snippet
15002       for ac_prog in cpio bsdcpio
15003 do
15004   # Extract the first word of "$ac_prog", so it can be a program name with args.
15005 set dummy $ac_prog; ac_word=$2
15006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15007 $as_echo_n "checking for $ac_word... " >&6; }
15008 if ${ac_cv_path_CPIO+:} false; then :
15009   $as_echo_n "(cached) " >&6
15010 else
15011   case $CPIO in
15012   [\\/]* | ?:[\\/]*)
15013   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15014   ;;
15015   *)
15016   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15017 for as_dir in $PATH
15018 do
15019   IFS=$as_save_IFS
15020   test -z "$as_dir" && as_dir=.
15021     for ac_exec_ext in '' $ac_executable_extensions; do
15022   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15023     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15024     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15025     break 2
15026   fi
15027 done
15028   done
15029 IFS=$as_save_IFS
15030 
15031   ;;
15032 esac
15033 fi
15034 CPIO=$ac_cv_path_CPIO
15035 if test -n "$CPIO"; then
15036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15037 $as_echo "$CPIO" >&6; }
15038 else
15039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15040 $as_echo "no" >&6; }
15041 fi
15042 
15043 
15044   test -n "$CPIO" && break
15045 done
15046 
15047     else
15048       # If it succeeded, then it was overridden by the user. We will use it
15049       # for the tool.
15050 
15051       # First remove it from the list of overridden variables, so we can test
15052       # for unknown variables in the end.
15053       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15054 
15055       # Check if we try to supply an empty value
15056       if test "x$CPIO" = x; then
15057         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15058 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15059         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15060 $as_echo_n "checking for CPIO... " >&6; }
15061         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15062 $as_echo "disabled" >&6; }
15063       else
15064         # Check if the provided tool contains a complete path.
15065         tool_specified="$CPIO"
15066         tool_basename="${tool_specified##*/}"
15067         if test "x$tool_basename" = "x$tool_specified"; then
15068           # A command without a complete path is provided, search $PATH.
15069           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15070 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15071           # Extract the first word of "$tool_basename", so it can be a program name with args.
15072 set dummy $tool_basename; ac_word=$2
15073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15074 $as_echo_n "checking for $ac_word... " >&6; }
15075 if ${ac_cv_path_CPIO+:} false; then :
15076   $as_echo_n "(cached) " >&6
15077 else
15078   case $CPIO in
15079   [\\/]* | ?:[\\/]*)
15080   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15081   ;;
15082   *)
15083   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15084 for as_dir in $PATH
15085 do
15086   IFS=$as_save_IFS
15087   test -z "$as_dir" && as_dir=.
15088     for ac_exec_ext in '' $ac_executable_extensions; do
15089   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15090     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15091     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15092     break 2
15093   fi
15094 done
15095   done
15096 IFS=$as_save_IFS
15097 
15098   ;;
15099 esac
15100 fi
15101 CPIO=$ac_cv_path_CPIO
15102 if test -n "$CPIO"; then
15103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15104 $as_echo "$CPIO" >&6; }
15105 else
15106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15107 $as_echo "no" >&6; }
15108 fi
15109 
15110 
15111           if test "x$CPIO" = x; then
15112             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15113           fi
15114         else
15115           # Otherwise we believe it is a complete path. Use it as it is.
15116           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15117 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15118           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15119 $as_echo_n "checking for CPIO... " >&6; }
15120           if test ! -x "$tool_specified"; then
15121             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15122 $as_echo "not found" >&6; }
15123             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15124           fi
15125           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15126 $as_echo "$tool_specified" >&6; }
15127         fi
15128       fi
15129     fi
15130 
15131   fi
15132 
15133 
15134 
15135 
15136   # Publish this variable in the help.
15137 
15138 
15139   if [ -z "${NICE+x}" ]; then
15140     # The variable is not set by user, try to locate tool using the code snippet
15141     for ac_prog in nice
15142 do
15143   # Extract the first word of "$ac_prog", so it can be a program name with args.
15144 set dummy $ac_prog; ac_word=$2
15145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15146 $as_echo_n "checking for $ac_word... " >&6; }
15147 if ${ac_cv_path_NICE+:} false; then :
15148   $as_echo_n "(cached) " >&6
15149 else
15150   case $NICE in
15151   [\\/]* | ?:[\\/]*)
15152   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15153   ;;
15154   *)
15155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15156 for as_dir in $PATH
15157 do
15158   IFS=$as_save_IFS
15159   test -z "$as_dir" && as_dir=.
15160     for ac_exec_ext in '' $ac_executable_extensions; do
15161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15162     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15164     break 2
15165   fi
15166 done
15167   done
15168 IFS=$as_save_IFS
15169 
15170   ;;
15171 esac
15172 fi
15173 NICE=$ac_cv_path_NICE
15174 if test -n "$NICE"; then
15175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15176 $as_echo "$NICE" >&6; }
15177 else
15178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15179 $as_echo "no" >&6; }
15180 fi
15181 
15182 
15183   test -n "$NICE" && break
15184 done
15185 
15186   else
15187     # The variable is set, but is it from the command line or the environment?
15188 
15189     # Try to remove the string !NICE! from our list.
15190     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15191     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15192       # If it failed, the variable was not from the command line. Ignore it,
15193       # but warn the user (except for BASH, which is always set by the calling BASH).
15194       if test "xNICE" != xBASH; then
15195         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15196 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15197       fi
15198       # Try to locate tool using the code snippet
15199       for ac_prog in nice
15200 do
15201   # Extract the first word of "$ac_prog", so it can be a program name with args.
15202 set dummy $ac_prog; ac_word=$2
15203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15204 $as_echo_n "checking for $ac_word... " >&6; }
15205 if ${ac_cv_path_NICE+:} false; then :
15206   $as_echo_n "(cached) " >&6
15207 else
15208   case $NICE in
15209   [\\/]* | ?:[\\/]*)
15210   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15211   ;;
15212   *)
15213   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15214 for as_dir in $PATH
15215 do
15216   IFS=$as_save_IFS
15217   test -z "$as_dir" && as_dir=.
15218     for ac_exec_ext in '' $ac_executable_extensions; do
15219   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15220     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15222     break 2
15223   fi
15224 done
15225   done
15226 IFS=$as_save_IFS
15227 
15228   ;;
15229 esac
15230 fi
15231 NICE=$ac_cv_path_NICE
15232 if test -n "$NICE"; then
15233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15234 $as_echo "$NICE" >&6; }
15235 else
15236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15237 $as_echo "no" >&6; }
15238 fi
15239 
15240 
15241   test -n "$NICE" && break
15242 done
15243 
15244     else
15245       # If it succeeded, then it was overridden by the user. We will use it
15246       # for the tool.
15247 
15248       # First remove it from the list of overridden variables, so we can test
15249       # for unknown variables in the end.
15250       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15251 
15252       # Check if we try to supply an empty value
15253       if test "x$NICE" = x; then
15254         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15255 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15256         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15257 $as_echo_n "checking for NICE... " >&6; }
15258         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15259 $as_echo "disabled" >&6; }
15260       else
15261         # Check if the provided tool contains a complete path.
15262         tool_specified="$NICE"
15263         tool_basename="${tool_specified##*/}"
15264         if test "x$tool_basename" = "x$tool_specified"; then
15265           # A command without a complete path is provided, search $PATH.
15266           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15267 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15268           # Extract the first word of "$tool_basename", so it can be a program name with args.
15269 set dummy $tool_basename; ac_word=$2
15270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15271 $as_echo_n "checking for $ac_word... " >&6; }
15272 if ${ac_cv_path_NICE+:} false; then :
15273   $as_echo_n "(cached) " >&6
15274 else
15275   case $NICE in
15276   [\\/]* | ?:[\\/]*)
15277   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15278   ;;
15279   *)
15280   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15281 for as_dir in $PATH
15282 do
15283   IFS=$as_save_IFS
15284   test -z "$as_dir" && as_dir=.
15285     for ac_exec_ext in '' $ac_executable_extensions; do
15286   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15287     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15288     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15289     break 2
15290   fi
15291 done
15292   done
15293 IFS=$as_save_IFS
15294 
15295   ;;
15296 esac
15297 fi
15298 NICE=$ac_cv_path_NICE
15299 if test -n "$NICE"; then
15300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15301 $as_echo "$NICE" >&6; }
15302 else
15303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15304 $as_echo "no" >&6; }
15305 fi
15306 
15307 
15308           if test "x$NICE" = x; then
15309             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15310           fi
15311         else
15312           # Otherwise we believe it is a complete path. Use it as it is.
15313           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15314 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15315           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15316 $as_echo_n "checking for NICE... " >&6; }
15317           if test ! -x "$tool_specified"; then
15318             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15319 $as_echo "not found" >&6; }
15320             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15321           fi
15322           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15323 $as_echo "$tool_specified" >&6; }
15324         fi
15325       fi
15326     fi
15327 
15328   fi
15329 
15330 
15331 
15332 
15333 # Now we can determine OpenJDK build and target platforms. This is required to
15334 # have early on.
15335 # Make sure we can run config.sub.
15336 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15337   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15338 
15339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15340 $as_echo_n "checking build system type... " >&6; }
15341 if ${ac_cv_build+:} false; then :
15342   $as_echo_n "(cached) " >&6
15343 else
15344   ac_build_alias=$build_alias
15345 test "x$ac_build_alias" = x &&
15346   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15347 test "x$ac_build_alias" = x &&
15348   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15349 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15350   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15351 
15352 fi
15353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15354 $as_echo "$ac_cv_build" >&6; }
15355 case $ac_cv_build in
15356 *-*-*) ;;
15357 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15358 esac
15359 build=$ac_cv_build
15360 ac_save_IFS=$IFS; IFS='-'
15361 set x $ac_cv_build
15362 shift
15363 build_cpu=$1
15364 build_vendor=$2
15365 shift; shift
15366 # Remember, the first character of IFS is used to create $*,
15367 # except with old shells:
15368 build_os=$*
15369 IFS=$ac_save_IFS
15370 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15371 
15372 
15373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15374 $as_echo_n "checking host system type... " >&6; }
15375 if ${ac_cv_host+:} false; then :
15376   $as_echo_n "(cached) " >&6
15377 else
15378   if test "x$host_alias" = x; then
15379   ac_cv_host=$ac_cv_build
15380 else
15381   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15382     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15383 fi
15384 
15385 fi
15386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15387 $as_echo "$ac_cv_host" >&6; }
15388 case $ac_cv_host in
15389 *-*-*) ;;
15390 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15391 esac
15392 host=$ac_cv_host
15393 ac_save_IFS=$IFS; IFS='-'
15394 set x $ac_cv_host
15395 shift
15396 host_cpu=$1
15397 host_vendor=$2
15398 shift; shift
15399 # Remember, the first character of IFS is used to create $*,
15400 # except with old shells:
15401 host_os=$*
15402 IFS=$ac_save_IFS
15403 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15404 
15405 
15406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15407 $as_echo_n "checking target system type... " >&6; }
15408 if ${ac_cv_target+:} false; then :
15409   $as_echo_n "(cached) " >&6
15410 else
15411   if test "x$target_alias" = x; then
15412   ac_cv_target=$ac_cv_host
15413 else
15414   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15415     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15416 fi
15417 
15418 fi
15419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15420 $as_echo "$ac_cv_target" >&6; }
15421 case $ac_cv_target in
15422 *-*-*) ;;
15423 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15424 esac
15425 target=$ac_cv_target
15426 ac_save_IFS=$IFS; IFS='-'
15427 set x $ac_cv_target
15428 shift
15429 target_cpu=$1
15430 target_vendor=$2
15431 shift; shift
15432 # Remember, the first character of IFS is used to create $*,
15433 # except with old shells:
15434 target_os=$*
15435 IFS=$ac_save_IFS
15436 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15437 
15438 
15439 # The aliases save the names the user supplied, while $host etc.
15440 # will get canonicalized.
15441 test -n "$target_alias" &&
15442   test "$program_prefix$program_suffix$program_transform_name" = \
15443     NONENONEs,x,x, &&
15444   program_prefix=${target_alias}-
15445 
15446   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15447   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15448   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15449   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15450   # to use the configure naming style.
15451 
15452 
15453 
15454 
15455 
15456   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15457   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15458   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15459   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15460   OPENJDK_TARGET_AUTOCONF_NAME="$host"
15461   OPENJDK_BUILD_AUTOCONF_NAME="$build"
15462 
15463 
15464 
15465   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15466 
15467   case "$build_os" in
15468     *linux*)
15469       VAR_OS=linux
15470       VAR_OS_TYPE=unix
15471       ;;
15472     *solaris*)
15473       VAR_OS=solaris
15474       VAR_OS_TYPE=unix
15475       ;;
15476     *darwin*)
15477       VAR_OS=macosx
15478       VAR_OS_TYPE=unix
15479       ;;
15480     *bsd*)
15481       VAR_OS=bsd
15482       VAR_OS_TYPE=unix
15483       ;;
15484     *cygwin*)
15485       VAR_OS=windows
15486       VAR_OS_ENV=windows.cygwin
15487       ;;
15488     *mingw*)
15489       VAR_OS=windows
15490       VAR_OS_ENV=windows.msys
15491       ;;
15492     *aix*)
15493       VAR_OS=aix
15494       VAR_OS_TYPE=unix
15495       ;;
15496     *)
15497       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15498       ;;
15499   esac
15500 
15501 
15502   # First argument is the cpu name from the trip/quad
15503   case "$build_cpu" in
15504     x86_64)
15505       VAR_CPU=x86_64
15506       VAR_CPU_ARCH=x86
15507       VAR_CPU_BITS=64
15508       VAR_CPU_ENDIAN=little
15509       ;;
15510     i?86)
15511       VAR_CPU=x86
15512       VAR_CPU_ARCH=x86
15513       VAR_CPU_BITS=32
15514       VAR_CPU_ENDIAN=little
15515       ;;
15516     arm*)
15517       VAR_CPU=arm
15518       VAR_CPU_ARCH=arm
15519       VAR_CPU_BITS=32
15520       VAR_CPU_ENDIAN=little
15521       ;;
15522     aarch64)
15523       VAR_CPU=aarch64
15524       VAR_CPU_ARCH=aarch64
15525       VAR_CPU_BITS=64
15526       VAR_CPU_ENDIAN=little
15527       ;;
15528     powerpc)
15529       VAR_CPU=ppc
15530       VAR_CPU_ARCH=ppc
15531       VAR_CPU_BITS=32
15532       VAR_CPU_ENDIAN=big
15533       ;;
15534     powerpc64)
15535       VAR_CPU=ppc64
15536       VAR_CPU_ARCH=ppc
15537       VAR_CPU_BITS=64
15538       VAR_CPU_ENDIAN=big
15539       ;;
15540     powerpc64le)
15541       VAR_CPU=ppc64le
15542       VAR_CPU_ARCH=ppc
15543       VAR_CPU_BITS=64
15544       VAR_CPU_ENDIAN=little
15545       ;;
15546     s390)
15547       VAR_CPU=s390
15548       VAR_CPU_ARCH=s390
15549       VAR_CPU_BITS=32
15550       VAR_CPU_ENDIAN=big
15551       ;;
15552     s390x)
15553       VAR_CPU=s390x
15554       VAR_CPU_ARCH=s390
15555       VAR_CPU_BITS=64
15556       VAR_CPU_ENDIAN=big
15557       ;;
15558     sparc)
15559       VAR_CPU=sparc
15560       VAR_CPU_ARCH=sparc
15561       VAR_CPU_BITS=32
15562       VAR_CPU_ENDIAN=big
15563       ;;
15564     sparcv9|sparc64)
15565       VAR_CPU=sparcv9
15566       VAR_CPU_ARCH=sparc
15567       VAR_CPU_BITS=64
15568       VAR_CPU_ENDIAN=big
15569       ;;
15570     *)
15571       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15572       ;;
15573   esac
15574 
15575   # ..and setup our own variables. (Do this explicitly to facilitate searching)
15576   OPENJDK_BUILD_OS="$VAR_OS"
15577   if test "x$VAR_OS_TYPE" != x; then
15578     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15579   else
15580     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15581   fi
15582   if test "x$VAR_OS_ENV" != x; then
15583     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15584   else
15585     OPENJDK_BUILD_OS_ENV="$VAR_OS"
15586   fi
15587   OPENJDK_BUILD_CPU="$VAR_CPU"
15588   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15589   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15590   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15591 
15592 
15593 
15594 
15595 
15596 
15597 
15598 
15599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15600 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
15601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15602 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15603 
15604   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15605 
15606   case "$host_os" in
15607     *linux*)
15608       VAR_OS=linux
15609       VAR_OS_TYPE=unix
15610       ;;
15611     *solaris*)
15612       VAR_OS=solaris
15613       VAR_OS_TYPE=unix
15614       ;;
15615     *darwin*)
15616       VAR_OS=macosx
15617       VAR_OS_TYPE=unix
15618       ;;
15619     *bsd*)
15620       VAR_OS=bsd
15621       VAR_OS_TYPE=unix
15622       ;;
15623     *cygwin*)
15624       VAR_OS=windows
15625       VAR_OS_ENV=windows.cygwin
15626       ;;
15627     *mingw*)
15628       VAR_OS=windows
15629       VAR_OS_ENV=windows.msys
15630       ;;
15631     *aix*)
15632       VAR_OS=aix
15633       VAR_OS_TYPE=unix
15634       ;;
15635     *)
15636       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15637       ;;
15638   esac
15639 
15640 
15641   # First argument is the cpu name from the trip/quad
15642   case "$host_cpu" in
15643     x86_64)
15644       VAR_CPU=x86_64
15645       VAR_CPU_ARCH=x86
15646       VAR_CPU_BITS=64
15647       VAR_CPU_ENDIAN=little
15648       ;;
15649     i?86)
15650       VAR_CPU=x86
15651       VAR_CPU_ARCH=x86
15652       VAR_CPU_BITS=32
15653       VAR_CPU_ENDIAN=little
15654       ;;
15655     arm*)
15656       VAR_CPU=arm
15657       VAR_CPU_ARCH=arm
15658       VAR_CPU_BITS=32
15659       VAR_CPU_ENDIAN=little
15660       ;;
15661     aarch64)
15662       VAR_CPU=aarch64
15663       VAR_CPU_ARCH=aarch64
15664       VAR_CPU_BITS=64
15665       VAR_CPU_ENDIAN=little
15666       ;;
15667     powerpc)
15668       VAR_CPU=ppc
15669       VAR_CPU_ARCH=ppc
15670       VAR_CPU_BITS=32
15671       VAR_CPU_ENDIAN=big
15672       ;;
15673     powerpc64)
15674       VAR_CPU=ppc64
15675       VAR_CPU_ARCH=ppc
15676       VAR_CPU_BITS=64
15677       VAR_CPU_ENDIAN=big
15678       ;;
15679     powerpc64le)
15680       VAR_CPU=ppc64le
15681       VAR_CPU_ARCH=ppc
15682       VAR_CPU_BITS=64
15683       VAR_CPU_ENDIAN=little
15684       ;;
15685     s390)
15686       VAR_CPU=s390
15687       VAR_CPU_ARCH=s390
15688       VAR_CPU_BITS=32
15689       VAR_CPU_ENDIAN=big
15690       ;;
15691     s390x)
15692       VAR_CPU=s390x
15693       VAR_CPU_ARCH=s390
15694       VAR_CPU_BITS=64
15695       VAR_CPU_ENDIAN=big
15696       ;;
15697     sparc)
15698       VAR_CPU=sparc
15699       VAR_CPU_ARCH=sparc
15700       VAR_CPU_BITS=32
15701       VAR_CPU_ENDIAN=big
15702       ;;
15703     sparcv9|sparc64)
15704       VAR_CPU=sparcv9
15705       VAR_CPU_ARCH=sparc
15706       VAR_CPU_BITS=64
15707       VAR_CPU_ENDIAN=big
15708       ;;
15709     *)
15710       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15711       ;;
15712   esac
15713 
15714   # ... and setup our own variables. (Do this explicitly to facilitate searching)
15715   OPENJDK_TARGET_OS="$VAR_OS"
15716   if test "x$VAR_OS_TYPE" != x; then
15717     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15718   else
15719     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15720   fi
15721   if test "x$VAR_OS_ENV" != x; then
15722     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15723   else
15724     OPENJDK_TARGET_OS_ENV="$VAR_OS"
15725   fi
15726   OPENJDK_TARGET_CPU="$VAR_CPU"
15727   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15728   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15729   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15730 
15731 
15732 
15733 
15734 
15735 
15736 
15737 
15738   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15739 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
15740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15741 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15742 
15743 
15744 
15745 # Check whether --with-target-bits was given.
15746 if test "${with_target_bits+set}" = set; then :
15747   withval=$with_target_bits;
15748 fi
15749 
15750 
15751   # We have three types of compiles:
15752   # native  == normal compilation, target system == build system
15753   # cross   == traditional cross compilation, target system != build system; special toolchain needed
15754   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15755   #
15756   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15757     # We're doing a proper cross-compilation
15758     COMPILE_TYPE="cross"
15759   else
15760     COMPILE_TYPE="native"
15761   fi
15762 
15763   if test "x$with_target_bits" != x; then
15764     if test "x$COMPILE_TYPE" = "xcross"; then
15765       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15766     fi
15767 
15768     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15769       # A reduced build is requested
15770       COMPILE_TYPE="reduced"
15771       OPENJDK_TARGET_CPU_BITS=32
15772       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15773         OPENJDK_TARGET_CPU=x86
15774       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15775         OPENJDK_TARGET_CPU=sparc
15776       else
15777         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15778       fi
15779     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15780       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
15781     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15782       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15783 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15784     else
15785       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15786     fi
15787   fi
15788 
15789 
15790   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15791 $as_echo_n "checking compilation type... " >&6; }
15792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15793 $as_echo "$COMPILE_TYPE" >&6; }
15794 
15795 
15796   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15797     REQUIRED_OS_NAME=SunOS
15798     REQUIRED_OS_VERSION=5.10
15799   fi
15800   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15801     REQUIRED_OS_NAME=Linux
15802     REQUIRED_OS_VERSION=2.6
15803   fi
15804   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15805     REQUIRED_OS_NAME=Windows
15806     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15807       REQUIRED_OS_VERSION=5.2
15808     else
15809       REQUIRED_OS_VERSION=5.1
15810     fi
15811   fi
15812   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15813     REQUIRED_OS_NAME=Darwin
15814     REQUIRED_OS_VERSION=11.2
15815   fi
15816   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15817     REQUIRED_OS_NAME=AIX
15818     REQUIRED_OS_VERSION=7.1
15819   fi
15820 
15821 
15822 
15823 
15824 
15825 
15826   # Also store the legacy naming of the cpu.
15827   # Ie i586 and amd64 instead of x86 and x86_64
15828   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15829   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15830     OPENJDK_TARGET_CPU_LEGACY="i586"
15831   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15832     # On all platforms except MacOSX replace x86_64 with amd64.
15833     OPENJDK_TARGET_CPU_LEGACY="amd64"
15834   fi
15835 
15836 
15837   # And the second legacy naming of the cpu.
15838   # Ie i386 and amd64 instead of x86 and x86_64.
15839   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15840   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15841     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15842   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15843     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15844   fi
15845 
15846 
15847   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15848   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15849   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15850   OPENJDK_TARGET_CPU_ISADIR=""
15851   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15852     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15853       OPENJDK_TARGET_CPU_ISADIR="/amd64"
15854     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15855       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15856     fi
15857   fi
15858 
15859 
15860   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15861   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15862   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15863     # On linux only, we replace x86 with i386.
15864     OPENJDK_TARGET_CPU_OSARCH="i386"
15865   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15866     # On all platforms except macosx, we replace x86_64 with amd64.
15867     OPENJDK_TARGET_CPU_OSARCH="amd64"
15868   fi
15869 
15870 
15871   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15872   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15873     OPENJDK_TARGET_CPU_JLI="i386"
15874   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15875     # On all platforms except macosx, we replace x86_64 with amd64.
15876     OPENJDK_TARGET_CPU_JLI="amd64"
15877   fi
15878 
15879   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15880       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15881   else
15882       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15883   fi
15884 
15885 
15886   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15887   # Macosx is osx and x86_64 is x64
15888   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15889     OPENJDK_TARGET_OS_BUNDLE="osx"
15890   else
15891     OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15892   fi
15893   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15894     OPENJDK_TARGET_CPU_BUNDLE="x64"
15895   else
15896     OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15897   fi
15898   OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15899 
15900 
15901 
15902 
15903   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15904     A_LP64="LP64:="
15905     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15906     # unpack200.exe
15907     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15908       OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15909     fi
15910   fi
15911   LP64=$A_LP64
15912 
15913 
15914   if test "x$COMPILE_TYPE" = "xcross"; then
15915     # FIXME: ... or should this include reduced builds..?
15916     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15917   else
15918     DEFINE_CROSS_COMPILE_ARCH=""
15919   fi
15920 
15921 
15922   # Convert openjdk platform names to hotspot names
15923 
15924   HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15925   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15926     HOTSPOT_TARGET_OS=bsd
15927   fi
15928 
15929 
15930   HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15931   if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15932     HOTSPOT_TARGET_OS_TYPE=posix
15933   fi
15934 
15935 
15936   HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15937   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15938     HOTSPOT_TARGET_CPU=x86_32
15939   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15940     HOTSPOT_TARGET_CPU=sparc
15941   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15942     HOTSPOT_TARGET_CPU=ppc_64
15943   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15944     HOTSPOT_TARGET_CPU=ppc_64
15945   fi
15946 
15947 
15948   # This is identical with OPENJDK_*, but define anyway for consistency.
15949   HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15950 
15951 
15952   # Setup HOTSPOT_TARGET_CPU_DEFINE
15953   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15954     HOTSPOT_TARGET_CPU_DEFINE=IA32
15955   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15956     HOTSPOT_TARGET_CPU_DEFINE=AMD64
15957   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15958     HOTSPOT_TARGET_CPU_DEFINE=SPARC
15959   elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15960     HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15961   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15962     HOTSPOT_TARGET_CPU_DEFINE=PPC64
15963   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15964     HOTSPOT_TARGET_CPU_DEFINE=PPC64
15965 
15966   # The cpu defines below are for zero, we don't support them directly.
15967   elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15968     HOTSPOT_TARGET_CPU_DEFINE=SPARC
15969   elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15970     HOTSPOT_TARGET_CPU_DEFINE=PPC32
15971   elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15972     HOTSPOT_TARGET_CPU_DEFINE=S390
15973   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15974     HOTSPOT_TARGET_CPU_DEFINE=S390
15975   elif test "x$OPENJDK_TARGET_CPU" != x; then
15976     HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15977   fi
15978 
15979 
15980 
15981 
15982   # Also store the legacy naming of the cpu.
15983   # Ie i586 and amd64 instead of x86 and x86_64
15984   OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15985   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15986     OPENJDK_BUILD_CPU_LEGACY="i586"
15987   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15988     # On all platforms except MacOSX replace x86_64 with amd64.
15989     OPENJDK_BUILD_CPU_LEGACY="amd64"
15990   fi
15991 
15992 
15993   # And the second legacy naming of the cpu.
15994   # Ie i386 and amd64 instead of x86 and x86_64.
15995   OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15996   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15997     OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15998   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15999     OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16000   fi
16001 
16002 
16003   # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16004   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16005   # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16006   OPENJDK_BUILD_CPU_ISADIR=""
16007   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16008     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16009       OPENJDK_BUILD_CPU_ISADIR="/amd64"
16010     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16011       OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16012     fi
16013   fi
16014 
16015 
16016   # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16017   OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16018   if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16019     # On linux only, we replace x86 with i386.
16020     OPENJDK_BUILD_CPU_OSARCH="i386"
16021   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16022     # On all platforms except macosx, we replace x86_64 with amd64.
16023     OPENJDK_BUILD_CPU_OSARCH="amd64"
16024   fi
16025 
16026 
16027   OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16028   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16029     OPENJDK_BUILD_CPU_JLI="i386"
16030   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16031     # On all platforms except macosx, we replace x86_64 with amd64.
16032     OPENJDK_BUILD_CPU_JLI="amd64"
16033   fi
16034 
16035   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16036       OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16037   else
16038       OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16039   fi
16040 
16041 
16042   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16043   # Macosx is osx and x86_64 is x64
16044   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16045     OPENJDK_BUILD_OS_BUNDLE="osx"
16046   else
16047     OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16048   fi
16049   if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16050     OPENJDK_BUILD_CPU_BUNDLE="x64"
16051   else
16052     OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16053   fi
16054   OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16055 
16056 
16057 
16058 
16059   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16060     A_LP64="LP64:="
16061     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16062     # unpack200.exe
16063     if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16064       OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16065     fi
16066   fi
16067   LP64=$A_LP64
16068 
16069 
16070   if test "x$COMPILE_TYPE" = "xcross"; then
16071     # FIXME: ... or should this include reduced builds..?
16072     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16073   else
16074     DEFINE_CROSS_COMPILE_ARCH=""
16075   fi
16076 
16077 
16078   # Convert openjdk platform names to hotspot names
16079 
16080   HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16081   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16082     HOTSPOT_BUILD_OS=bsd
16083   fi
16084 
16085 
16086   HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16087   if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16088     HOTSPOT_BUILD_OS_TYPE=posix
16089   fi
16090 
16091 
16092   HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16093   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16094     HOTSPOT_BUILD_CPU=x86_32
16095   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16096     HOTSPOT_BUILD_CPU=sparc
16097   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16098     HOTSPOT_BUILD_CPU=ppc_64
16099   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16100     HOTSPOT_BUILD_CPU=ppc_64
16101   fi
16102 
16103 
16104   # This is identical with OPENJDK_*, but define anyway for consistency.
16105   HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16106 
16107 
16108   # Setup HOTSPOT_BUILD_CPU_DEFINE
16109   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16110     HOTSPOT_BUILD_CPU_DEFINE=IA32
16111   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16112     HOTSPOT_BUILD_CPU_DEFINE=AMD64
16113   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16114     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16115   elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16116     HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16117   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16118     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16119   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16120     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16121 
16122   # The cpu defines below are for zero, we don't support them directly.
16123   elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16124     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16125   elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16126     HOTSPOT_BUILD_CPU_DEFINE=PPC32
16127   elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16128     HOTSPOT_BUILD_CPU_DEFINE=S390
16129   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16130     HOTSPOT_BUILD_CPU_DEFINE=S390
16131   elif test "x$OPENJDK_BUILD_CPU" != x; then
16132     HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16133   fi
16134 
16135 
16136 
16137 
16138   # ZERO_ARCHDEF is used to enable architecture-specific code.
16139   # This is used in legacy hotspot build.
16140   ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16141 
16142 
16143 
16144 
16145 
16146 # Continue setting up basic stuff. Most remaining code require fundamental tools.
16147 
16148   # Save the current directory this script was started from
16149   CURDIR="$PWD"
16150 
16151   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16152   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16153   # was not available at that time.
16154   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16155   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16156     ORIGINAL_PATH="$REWRITTEN_PATH"
16157     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16158 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16159   fi
16160 
16161   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16162     PATH_SEP=";"
16163 
16164   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16165   if test $SRC_ROOT_LENGTH -gt 100; then
16166     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16167   fi
16168 
16169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16170     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16171 $as_echo_n "checking cygwin release... " >&6; }
16172     CYGWIN_VERSION=`$UNAME -r`
16173     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16174 $as_echo "$CYGWIN_VERSION" >&6; }
16175     WINDOWS_ENV_VENDOR='cygwin'
16176     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16177 
16178     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16179     if test "x$CYGWIN_VERSION_OLD" != x; then
16180       { $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
16181 $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;}
16182       as_fn_error $? "Cannot continue" "$LINENO" 5
16183     fi
16184     if test "x$CYGPATH" = x; then
16185       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16186     fi
16187     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16188 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16189     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16190     cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16191     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16192     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16193     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16194 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
16195     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16196     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16197     if test "x$test_cygdrive_prefix" = x; then
16198       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16199     fi
16200   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16201     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16202 $as_echo_n "checking msys release... " >&6; }
16203     MSYS_VERSION=`$UNAME -r`
16204     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16205 $as_echo "$MSYS_VERSION" >&6; }
16206 
16207     WINDOWS_ENV_VENDOR='msys'
16208     WINDOWS_ENV_VERSION="$MSYS_VERSION"
16209 
16210     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16211 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
16212     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16213     MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16214 
16215   windows_path="$MSYS_ROOT_PATH"
16216   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16217     unix_path=`$CYGPATH -u "$windows_path"`
16218     MSYS_ROOT_PATH="$unix_path"
16219   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16220     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16221     MSYS_ROOT_PATH="$unix_path"
16222   fi
16223 
16224     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16225 $as_echo "$MSYS_ROOT_PATH" >&6; }
16226     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16227   else
16228     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16229   fi
16230 
16231   # Test if windows or unix (cygwin/msys) find is first in path.
16232   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16233 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16234   FIND_BINARY_OUTPUT=`find --version 2>&1`
16235   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16236     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16237 $as_echo "unix style" >&6; }
16238   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16239     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16240 $as_echo "Windows" >&6; }
16241     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16242 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16243     { $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
16244 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16245     as_fn_error $? "Cannot continue" "$LINENO" 5
16246   else
16247     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16248 $as_echo "unknown" >&6; }
16249     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16250 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16251   fi
16252 
16253   else
16254     PATH_SEP=":"
16255   fi
16256 
16257 
16258   # We get the top-level directory from the supporting wrappers.
16259   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16260 $as_echo_n "checking for top-level directory... " >&6; }
16261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16262 $as_echo "$TOPDIR" >&6; }
16263 
16264 
16265   # Save the original version of TOPDIR for string comparisons
16266   ORIGINAL_TOPDIR="$TOPDIR"
16267 
16268 
16269   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16270 
16271   # Only process if variable expands to non-empty
16272 
16273   if test "x$CURDIR" != x; then
16274     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16275 
16276   # Input might be given as Windows format, start by converting to
16277   # unix format.
16278   path="$CURDIR"
16279   new_path=`$CYGPATH -u "$path"`
16280 
16281   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16282   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16283   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16284   # "foo.exe" is OK but "foo" is an error.
16285   #
16286   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16287   # It is also a way to make sure we got the proper file name for the real test later on.
16288   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16289   if test "x$test_shortpath" = x; then
16290     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16291 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16292     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16293   fi
16294 
16295   # Call helper function which possibly converts this using DOS-style short mode.
16296   # If so, the updated path is stored in $new_path.
16297 
16298   input_path="$new_path"
16299   # Check if we need to convert this using DOS-style short mode. If the path
16300   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16301   # take no chances and rewrite it.
16302   # Note: m4 eats our [], so we need to use [ and ] instead.
16303   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16304   if test "x$has_forbidden_chars" != x; then
16305     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16306     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16307     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16308     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16309       # Going to short mode and back again did indeed matter. Since short mode is
16310       # case insensitive, let's make it lowercase to improve readability.
16311       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16312       # Now convert it back to Unix-style (cygpath)
16313       input_path=`$CYGPATH -u "$shortmode_path"`
16314       new_path="$input_path"
16315     fi
16316   fi
16317 
16318   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16319   if test "x$test_cygdrive_prefix" = x; then
16320     # As a simple fix, exclude /usr/bin since it's not a real path.
16321     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16322       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16323       # a path prefixed by /cygdrive for fixpath to work.
16324       new_path="$CYGWIN_ROOT_PATH$input_path"
16325     fi
16326   fi
16327 
16328 
16329   if test "x$path" != "x$new_path"; then
16330     CURDIR="$new_path"
16331     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16332 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16333   fi
16334 
16335     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16336 
16337   path="$CURDIR"
16338   has_colon=`$ECHO $path | $GREP ^.:`
16339   new_path="$path"
16340   if test "x$has_colon" = x; then
16341     # Not in mixed or Windows style, start by that.
16342     new_path=`cmd //c echo $path`
16343   fi
16344 
16345 
16346   input_path="$new_path"
16347   # Check if we need to convert this using DOS-style short mode. If the path
16348   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16349   # take no chances and rewrite it.
16350   # Note: m4 eats our [], so we need to use [ and ] instead.
16351   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16352   if test "x$has_forbidden_chars" != x; then
16353     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16354     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16355   fi
16356 
16357 
16358   windows_path="$new_path"
16359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16360     unix_path=`$CYGPATH -u "$windows_path"`
16361     new_path="$unix_path"
16362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16363     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16364     new_path="$unix_path"
16365   fi
16366 
16367   if test "x$path" != "x$new_path"; then
16368     CURDIR="$new_path"
16369     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16370 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16371   fi
16372 
16373   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16374   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16375 
16376     else
16377       # We're on a unix platform. Hooray! :)
16378       path="$CURDIR"
16379       has_space=`$ECHO "$path" | $GREP " "`
16380       if test "x$has_space" != x; then
16381         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16382 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16383         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16384       fi
16385 
16386       # Use eval to expand a potential ~
16387       eval path="$path"
16388       if test ! -f "$path" && test ! -d "$path"; then
16389         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16390       fi
16391 
16392       if test -d "$path"; then
16393         CURDIR="`cd "$path"; $THEPWDCMD -L`"
16394       else
16395         dir="`$DIRNAME "$path"`"
16396         base="`$BASENAME "$path"`"
16397         CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16398       fi
16399     fi
16400   fi
16401 
16402 
16403   # Only process if variable expands to non-empty
16404 
16405   if test "x$TOPDIR" != x; then
16406     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16407 
16408   # Input might be given as Windows format, start by converting to
16409   # unix format.
16410   path="$TOPDIR"
16411   new_path=`$CYGPATH -u "$path"`
16412 
16413   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16414   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16415   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16416   # "foo.exe" is OK but "foo" is an error.
16417   #
16418   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16419   # It is also a way to make sure we got the proper file name for the real test later on.
16420   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16421   if test "x$test_shortpath" = x; then
16422     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16423 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16424     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16425   fi
16426 
16427   # Call helper function which possibly converts this using DOS-style short mode.
16428   # If so, the updated path is stored in $new_path.
16429 
16430   input_path="$new_path"
16431   # Check if we need to convert this using DOS-style short mode. If the path
16432   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16433   # take no chances and rewrite it.
16434   # Note: m4 eats our [], so we need to use [ and ] instead.
16435   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16436   if test "x$has_forbidden_chars" != x; then
16437     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16438     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16439     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16440     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16441       # Going to short mode and back again did indeed matter. Since short mode is
16442       # case insensitive, let's make it lowercase to improve readability.
16443       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16444       # Now convert it back to Unix-style (cygpath)
16445       input_path=`$CYGPATH -u "$shortmode_path"`
16446       new_path="$input_path"
16447     fi
16448   fi
16449 
16450   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16451   if test "x$test_cygdrive_prefix" = x; then
16452     # As a simple fix, exclude /usr/bin since it's not a real path.
16453     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16454       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16455       # a path prefixed by /cygdrive for fixpath to work.
16456       new_path="$CYGWIN_ROOT_PATH$input_path"
16457     fi
16458   fi
16459 
16460 
16461   if test "x$path" != "x$new_path"; then
16462     TOPDIR="$new_path"
16463     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16464 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16465   fi
16466 
16467     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16468 
16469   path="$TOPDIR"
16470   has_colon=`$ECHO $path | $GREP ^.:`
16471   new_path="$path"
16472   if test "x$has_colon" = x; then
16473     # Not in mixed or Windows style, start by that.
16474     new_path=`cmd //c echo $path`
16475   fi
16476 
16477 
16478   input_path="$new_path"
16479   # Check if we need to convert this using DOS-style short mode. If the path
16480   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16481   # take no chances and rewrite it.
16482   # Note: m4 eats our [], so we need to use [ and ] instead.
16483   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16484   if test "x$has_forbidden_chars" != x; then
16485     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16486     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16487   fi
16488 
16489 
16490   windows_path="$new_path"
16491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16492     unix_path=`$CYGPATH -u "$windows_path"`
16493     new_path="$unix_path"
16494   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16495     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16496     new_path="$unix_path"
16497   fi
16498 
16499   if test "x$path" != "x$new_path"; then
16500     TOPDIR="$new_path"
16501     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16502 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16503   fi
16504 
16505   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16506   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16507 
16508     else
16509       # We're on a unix platform. Hooray! :)
16510       path="$TOPDIR"
16511       has_space=`$ECHO "$path" | $GREP " "`
16512       if test "x$has_space" != x; then
16513         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16514 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16515         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16516       fi
16517 
16518       # Use eval to expand a potential ~
16519       eval path="$path"
16520       if test ! -f "$path" && test ! -d "$path"; then
16521         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16522       fi
16523 
16524       if test -d "$path"; then
16525         TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16526       else
16527         dir="`$DIRNAME "$path"`"
16528         base="`$BASENAME "$path"`"
16529         TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16530       fi
16531     fi
16532   fi
16533 
16534   # SRC_ROOT is a traditional alias for TOPDIR.
16535   SRC_ROOT=$TOPDIR
16536 
16537   # Calculate a canonical version of TOPDIR for string comparisons
16538   CANONICAL_TOPDIR=$TOPDIR
16539 
16540   if test "x$OPENJDK_BUILD_OS" != xwindows; then
16541     # Follow a chain of symbolic links. Use readlink
16542     # where it exists, else fall back to horribly
16543     # complicated shell code.
16544     if test "x$READLINK_TESTED" != yes; then
16545       # On MacOSX there is a readlink tool with a different
16546       # purpose than the GNU readlink tool. Check the found readlink.
16547       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16548       if test "x$ISGNU" = x; then
16549         # A readlink that we do not know how to use.
16550         # Are there other non-GNU readlinks out there?
16551         READLINK_TESTED=yes
16552         READLINK=
16553       fi
16554     fi
16555 
16556     if test "x$READLINK" != x; then
16557       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16558     else
16559       # Save the current directory for restoring afterwards
16560       STARTDIR=$PWD
16561       COUNTER=0
16562       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16563       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16564       cd $sym_link_dir
16565       # Use -P flag to resolve symlinks in directories.
16566       cd `$THEPWDCMD -P`
16567       sym_link_dir=`$THEPWDCMD -P`
16568       # Resolve file symlinks
16569       while test $COUNTER -lt 20; do
16570         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16571         if test "x$ISLINK" == x; then
16572           # This is not a symbolic link! We are done!
16573           break
16574         fi
16575         # Again resolve directory symlinks since the target of the just found
16576         # link could be in a different directory
16577         cd `$DIRNAME $ISLINK`
16578         sym_link_dir=`$THEPWDCMD -P`
16579         sym_link_file=`$BASENAME $ISLINK`
16580         let COUNTER=COUNTER+1
16581       done
16582       cd $STARTDIR
16583       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16584     fi
16585   fi
16586 
16587 
16588 
16589   # Locate the directory of this script.
16590   AUTOCONF_DIR=$TOPDIR/common/autoconf
16591 
16592   # Setup username (for use in adhoc version strings etc)
16593   # Outer [ ] to quote m4.
16594    USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16595 
16596 
16597 
16598 # Check if it's a pure open build or if custom sources are to be used.
16599 
16600   # Check whether --enable-openjdk-only was given.
16601 if test "${enable_openjdk_only+set}" = set; then :
16602   enableval=$enable_openjdk_only;
16603 else
16604   enable_openjdk_only="no"
16605 fi
16606 
16607 
16608   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16609 $as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16611 $as_echo "$enable_openjdk_only" >&6; }
16612   if test "x$enable_openjdk_only" = "xyes"; then
16613     SUPPRESS_CUSTOM_EXTENSIONS="true"
16614   elif test "x$enable_openjdk_only" = "xno"; then
16615     SUPPRESS_CUSTOM_EXTENSIONS="false"
16616   else
16617     as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16618   fi
16619 
16620   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16621   # the IncludeCustomExtension macro.
16622 
16623 
16624 # Check whether --with-custom-make-dir was given.
16625 if test "${with_custom_make_dir+set}" = set; then :
16626   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
16627 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16628 fi
16629 
16630 
16631 
16632 
16633 # These are needed to be able to create a configuration name (and thus the output directory)
16634 
16635   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16636 $as_echo_n "checking which variant of the JDK to build... " >&6; }
16637 
16638 # Check whether --with-jdk-variant was given.
16639 if test "${with_jdk_variant+set}" = set; then :
16640   withval=$with_jdk_variant;
16641 fi
16642 
16643 
16644   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16645     JDK_VARIANT="normal"
16646   else
16647     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16648   fi
16649 
16650 
16651 
16652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16653 $as_echo "$JDK_VARIANT" >&6; }
16654 
16655 
16656   DEBUG_LEVEL="release"
16657   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16658 $as_echo_n "checking which debug level to use... " >&6; }
16659   # Check whether --enable-debug was given.
16660 if test "${enable_debug+set}" = set; then :
16661   enableval=$enable_debug;
16662         ENABLE_DEBUG="${enableval}"
16663         DEBUG_LEVEL="fastdebug"
16664 
16665 else
16666   ENABLE_DEBUG="no"
16667 fi
16668 
16669 
16670 
16671 # Check whether --with-debug-level was given.
16672 if test "${with_debug_level+set}" = set; then :
16673   withval=$with_debug_level;
16674         DEBUG_LEVEL="${withval}"
16675         if test "x$ENABLE_DEBUG" = xyes; then
16676           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16677         fi
16678 
16679 fi
16680 
16681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16682 $as_echo "$DEBUG_LEVEL" >&6; }
16683 
16684   if test "x$DEBUG_LEVEL" != xrelease && \
16685       test "x$DEBUG_LEVEL" != xoptimized && \
16686       test "x$DEBUG_LEVEL" != xfastdebug && \
16687       test "x$DEBUG_LEVEL" != xslowdebug; then
16688     as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16689   fi
16690 
16691   # Translate DEBUG_LEVEL to debug level used by Hotspot
16692   HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16693   if test "x$DEBUG_LEVEL" = xrelease; then
16694     HOTSPOT_DEBUG_LEVEL="product"
16695   elif test "x$DEBUG_LEVEL" = xslowdebug; then
16696     HOTSPOT_DEBUG_LEVEL="debug"
16697   fi
16698 
16699   if test "x$DEBUG_LEVEL" = xoptimized; then
16700     # The debug level 'optimized' is a little special because it is currently only
16701     # applicable to the HotSpot build where it means to build a completely
16702     # optimized version of the VM without any debugging code (like for the
16703     # 'release' debug level which is called 'product' in the HotSpot build) but
16704     # with the exception that it can contain additional code which is otherwise
16705     # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16706     # test new and/or experimental features which are not intended for customer
16707     # shipment. Because these new features need to be tested and benchmarked in
16708     # real world scenarios, we want to build the containing JDK at the 'release'
16709     # debug level.
16710     DEBUG_LEVEL="release"
16711   fi
16712 
16713 
16714 
16715 
16716 
16717 
16718 # Check whether --with-jvm-variants was given.
16719 if test "${with_jvm_variants+set}" = set; then :
16720   withval=$with_jvm_variants;
16721 fi
16722 
16723 
16724   if test "x$with_jvm_variants" = x; then
16725     with_jvm_variants="server"
16726   fi
16727   JVM_VARIANTS_OPT="$with_jvm_variants"
16728 
16729   # Has the user listed more than one variant?
16730   # Additional [] needed to keep m4 from mangling shell constructs.
16731   if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16732     BUILDING_MULTIPLE_JVM_VARIANTS=true
16733   else
16734     BUILDING_MULTIPLE_JVM_VARIANTS=false
16735   fi
16736   # Replace the commas with AND for use in the build directory name.
16737   JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16738 
16739   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16740 $as_echo_n "checking which variants of the JVM to build... " >&6; }
16741   # JVM_VARIANTS is a space-separated list.
16742   # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16743   JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16745 $as_echo "$JVM_VARIANTS" >&6; }
16746 
16747   # Check that the selected variants are valid
16748 
16749   # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16750   # Notice that the original variant failes on SLES 10 and 11
16751   NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16752   STACK=${JVM_VARIANTS// /$'\n'}
16753   INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16754   if test "x$INVALID_VARIANTS" != x; then
16755     { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16756 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16757     as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16758   fi
16759 
16760   # All "special" variants share the same output directory ("server")
16761   VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16762   NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16763   STACK=${JVM_VARIANTS// /$'\n'}
16764   INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16765   if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16766     as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16767   fi
16768 
16769   # The "main" variant is the one used by other libs to link against during the
16770   # build.
16771   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16772     MAIN_VARIANT_PRIO_ORDER="server client minimal"
16773     for variant in $MAIN_VARIANT_PRIO_ORDER; do
16774       if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16775         JVM_VARIANT_MAIN="$variant"
16776         break
16777       fi
16778     done
16779   else
16780     JVM_VARIANT_MAIN="$JVM_VARIANTS"
16781   fi
16782 
16783 
16784 
16785 
16786 
16787   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16788     # zero behaves as a platform and rewrites these values. This is really weird. :(
16789     # We are guaranteed that we do not build any other variants when building zero.
16790     HOTSPOT_TARGET_CPU=zero
16791     HOTSPOT_TARGET_CPU_ARCH=zero
16792   fi
16793 
16794 
16795 # With basic setup done, call the custom early hook.
16796 
16797 
16798 # Check if we have devkits, extra paths or sysroot set.
16799 
16800 
16801 # Check whether --with-devkit was given.
16802 if test "${with_devkit+set}" = set; then :
16803   withval=$with_devkit;
16804 
16805   # Only process if variable expands to non-empty
16806 
16807   if test "x$with_devkit" != x; then
16808     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16809 
16810   # Input might be given as Windows format, start by converting to
16811   # unix format.
16812   path="$with_devkit"
16813   new_path=`$CYGPATH -u "$path"`
16814 
16815   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16816   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16817   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16818   # "foo.exe" is OK but "foo" is an error.
16819   #
16820   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16821   # It is also a way to make sure we got the proper file name for the real test later on.
16822   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16823   if test "x$test_shortpath" = x; then
16824     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16825 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16826     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16827   fi
16828 
16829   # Call helper function which possibly converts this using DOS-style short mode.
16830   # If so, the updated path is stored in $new_path.
16831 
16832   input_path="$new_path"
16833   # Check if we need to convert this using DOS-style short mode. If the path
16834   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16835   # take no chances and rewrite it.
16836   # Note: m4 eats our [], so we need to use [ and ] instead.
16837   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16838   if test "x$has_forbidden_chars" != x; then
16839     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16840     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16841     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16842     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16843       # Going to short mode and back again did indeed matter. Since short mode is
16844       # case insensitive, let's make it lowercase to improve readability.
16845       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16846       # Now convert it back to Unix-style (cygpath)
16847       input_path=`$CYGPATH -u "$shortmode_path"`
16848       new_path="$input_path"
16849     fi
16850   fi
16851 
16852   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16853   if test "x$test_cygdrive_prefix" = x; then
16854     # As a simple fix, exclude /usr/bin since it's not a real path.
16855     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16856       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16857       # a path prefixed by /cygdrive for fixpath to work.
16858       new_path="$CYGWIN_ROOT_PATH$input_path"
16859     fi
16860   fi
16861 
16862 
16863   if test "x$path" != "x$new_path"; then
16864     with_devkit="$new_path"
16865     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16866 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16867   fi
16868 
16869     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16870 
16871   path="$with_devkit"
16872   has_colon=`$ECHO $path | $GREP ^.:`
16873   new_path="$path"
16874   if test "x$has_colon" = x; then
16875     # Not in mixed or Windows style, start by that.
16876     new_path=`cmd //c echo $path`
16877   fi
16878 
16879 
16880   input_path="$new_path"
16881   # Check if we need to convert this using DOS-style short mode. If the path
16882   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16883   # take no chances and rewrite it.
16884   # Note: m4 eats our [], so we need to use [ and ] instead.
16885   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16886   if test "x$has_forbidden_chars" != x; then
16887     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16888     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16889   fi
16890 
16891 
16892   windows_path="$new_path"
16893   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16894     unix_path=`$CYGPATH -u "$windows_path"`
16895     new_path="$unix_path"
16896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16897     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16898     new_path="$unix_path"
16899   fi
16900 
16901   if test "x$path" != "x$new_path"; then
16902     with_devkit="$new_path"
16903     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16904 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16905   fi
16906 
16907   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16908   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16909 
16910     else
16911       # We're on a unix platform. Hooray! :)
16912       path="$with_devkit"
16913       has_space=`$ECHO "$path" | $GREP " "`
16914       if test "x$has_space" != x; then
16915         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16916 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16917         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16918       fi
16919 
16920       # Use eval to expand a potential ~
16921       eval path="$path"
16922       if test ! -f "$path" && test ! -d "$path"; then
16923         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16924       fi
16925 
16926       if test -d "$path"; then
16927         with_devkit="`cd "$path"; $THEPWDCMD -L`"
16928       else
16929         dir="`$DIRNAME "$path"`"
16930         base="`$BASENAME "$path"`"
16931         with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16932       fi
16933     fi
16934   fi
16935 
16936         DEVKIT_ROOT="$with_devkit"
16937         # Check for a meta data info file in the root of the devkit
16938         if test -f "$DEVKIT_ROOT/devkit.info"; then
16939           . $DEVKIT_ROOT/devkit.info
16940           # This potentially sets the following:
16941           # A descriptive name of the devkit
16942 
16943   if test "x$DEVKIT_NAME" = x; then
16944     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16945   fi
16946 
16947           # Corresponds to --with-extra-path
16948 
16949   if test "x$DEVKIT_EXTRA_PATH" = x; then
16950     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16951   fi
16952 
16953           # Corresponds to --with-toolchain-path
16954 
16955   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16956     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16957   fi
16958 
16959           # Corresponds to --with-sysroot
16960 
16961   if test "x$DEVKIT_SYSROOT" = x; then
16962     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16963   fi
16964 
16965 
16966           # Identifies the Visual Studio version in the devkit
16967 
16968   if test "x$DEVKIT_VS_VERSION" = x; then
16969     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16970   fi
16971 
16972           # The Visual Studio include environment variable
16973 
16974   if test "x$DEVKIT_VS_INCLUDE" = x; then
16975     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16976   fi
16977 
16978           # The Visual Studio lib environment variable
16979 
16980   if test "x$DEVKIT_VS_LIB" = x; then
16981     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16982   fi
16983 
16984           # Corresponds to --with-msvcr-dll
16985 
16986   if test "x$DEVKIT_MSVCR_DLL" = x; then
16987     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16988   fi
16989 
16990           # Corresponds to --with-msvcp-dll
16991 
16992   if test "x$DEVKIT_MSVCP_DLL" = x; then
16993     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16994   fi
16995 
16996         fi
16997 
16998         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16999 $as_echo_n "checking for devkit... " >&6; }
17000         if test "x$DEVKIT_NAME" != x; then
17001           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17002 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17003         else
17004           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17005 $as_echo "$DEVKIT_ROOT" >&6; }
17006         fi
17007 
17008 
17009   if test "x$DEVKIT_EXTRA_PATH" != x; then
17010     if test "x$EXTRA_PATH" = x; then
17011       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17012     else
17013       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17014     fi
17015   fi
17016 
17017 
17018         # Fallback default of just /bin if DEVKIT_PATH is not defined
17019         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17020           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17021         fi
17022 
17023   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17024     if test "x$TOOLCHAIN_PATH" = x; then
17025       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17026     else
17027       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17028     fi
17029   fi
17030 
17031 
17032         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17033         # places for backwards compatiblity.
17034         if test "x$DEVKIT_SYSROOT" != x; then
17035           SYSROOT="$DEVKIT_SYSROOT"
17036         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17037           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17038         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17039           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17040         fi
17041 
17042 
17043 fi
17044 
17045 
17046   # You can force the sysroot if the sysroot encoded into the compiler tools
17047   # is not correct.
17048 
17049 # Check whether --with-sys-root was given.
17050 if test "${with_sys_root+set}" = set; then :
17051   withval=$with_sys_root; SYSROOT=$with_sys_root
17052 
17053 fi
17054 
17055 
17056 
17057 # Check whether --with-sysroot was given.
17058 if test "${with_sysroot+set}" = set; then :
17059   withval=$with_sysroot; SYSROOT=$with_sysroot
17060 
17061 fi
17062 
17063 
17064 
17065 # Check whether --with-tools-dir was given.
17066 if test "${with_tools_dir+set}" = set; then :
17067   withval=$with_tools_dir;
17068   if test "x$with_tools_dir" != x; then
17069     if test "x$TOOLCHAIN_PATH" = x; then
17070       TOOLCHAIN_PATH="$with_tools_dir"
17071     else
17072       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17073     fi
17074   fi
17075 
17076 
17077 fi
17078 
17079 
17080 
17081 # Check whether --with-toolchain-path was given.
17082 if test "${with_toolchain_path+set}" = set; then :
17083   withval=$with_toolchain_path;
17084   if test "x$with_toolchain_path" != x; then
17085     if test "x$TOOLCHAIN_PATH" = x; then
17086       TOOLCHAIN_PATH="$with_toolchain_path"
17087     else
17088       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17089     fi
17090   fi
17091 
17092 
17093 fi
17094 
17095 
17096 
17097 # Check whether --with-extra-path was given.
17098 if test "${with_extra_path+set}" = set; then :
17099   withval=$with_extra_path;
17100   if test "x$with_extra_path" != x; then
17101     if test "x$EXTRA_PATH" = x; then
17102       EXTRA_PATH="$with_extra_path"
17103     else
17104       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17105     fi
17106   fi
17107 
17108 
17109 fi
17110 
17111 
17112   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17113     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17114     # If not, detect if Xcode is installed by running xcodebuild -version
17115     # if no Xcode installed, xcodebuild exits with 1
17116     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17117     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17118       # We need to use xcodebuild in the toolchain dir provided by the user, this will
17119       # fall back on the stub binary in /usr/bin/xcodebuild
17120       # Extract the first word of "xcodebuild", so it can be a program name with args.
17121 set dummy xcodebuild; ac_word=$2
17122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17123 $as_echo_n "checking for $ac_word... " >&6; }
17124 if ${ac_cv_path_XCODEBUILD+:} false; then :
17125   $as_echo_n "(cached) " >&6
17126 else
17127   case $XCODEBUILD in
17128   [\\/]* | ?:[\\/]*)
17129   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17130   ;;
17131   *)
17132   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17133 for as_dir in $TOOLCHAIN_PATH
17134 do
17135   IFS=$as_save_IFS
17136   test -z "$as_dir" && as_dir=.
17137     for ac_exec_ext in '' $ac_executable_extensions; do
17138   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17139     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17140     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17141     break 2
17142   fi
17143 done
17144   done
17145 IFS=$as_save_IFS
17146 
17147   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17148   ;;
17149 esac
17150 fi
17151 XCODEBUILD=$ac_cv_path_XCODEBUILD
17152 if test -n "$XCODEBUILD"; then
17153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17154 $as_echo "$XCODEBUILD" >&6; }
17155 else
17156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17157 $as_echo "no" >&6; }
17158 fi
17159 
17160 
17161     else
17162       # this should result in SYSROOT being empty, unless --with-sysroot is provided
17163       # when only the command line tools are installed there are no SDKs, so headers
17164       # are copied into the system frameworks
17165       XCODEBUILD=
17166 
17167     fi
17168 
17169     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17170 $as_echo_n "checking for sdk name... " >&6; }
17171 
17172 # Check whether --with-sdk-name was given.
17173 if test "${with_sdk_name+set}" = set; then :
17174   withval=$with_sdk_name; SDKNAME=$with_sdk_name
17175 
17176 fi
17177 
17178     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17179 $as_echo "$SDKNAME" >&6; }
17180 
17181     # if toolchain path is specified then don't rely on system headers, they may not compile
17182     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17183     test -z "$TOOLCHAIN_PATH" && \
17184       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17185 
17186     if test -z "$SYSROOT"; then
17187       if test -n "$XCODEBUILD"; then
17188         # if we don't have system headers, use default SDK name (last resort)
17189         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17190           SDKNAME=${SDKNAME:-macosx}
17191         fi
17192 
17193         if test -n "$SDKNAME"; then
17194           # Call xcodebuild to determine SYSROOT
17195           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17196         fi
17197       else
17198         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17199           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
17200         fi
17201       fi
17202     else
17203       # warn user if --with-sdk-name was also set
17204       if test -n "$with_sdk_name"; then
17205         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17206 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17207       fi
17208     fi
17209 
17210     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17211       # If no system framework headers, then SYSROOT must be set, or we won't build
17212       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
17213     fi
17214 
17215     # Perform a basic sanity test
17216     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17217       if test -z "$SYSROOT"; then
17218         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
17219       else
17220         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17221       fi
17222     fi
17223 
17224     # set SDKROOT too, Xcode tools will pick it up
17225     SDKROOT=$SYSROOT
17226 
17227   fi
17228 
17229   # Prepend the extra path to the global path
17230 
17231   if test "x$EXTRA_PATH" != x; then
17232     if test "x$PATH" = x; then
17233       PATH="$EXTRA_PATH"
17234     else
17235       PATH="$EXTRA_PATH:$PATH"
17236     fi
17237   fi
17238 
17239 
17240   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17241 $as_echo_n "checking for sysroot... " >&6; }
17242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17243 $as_echo "$SYSROOT" >&6; }
17244   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17245 $as_echo_n "checking for toolchain path... " >&6; }
17246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17247 $as_echo "$TOOLCHAIN_PATH" >&6; }
17248   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17249 $as_echo_n "checking for extra path... " >&6; }
17250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17251 $as_echo "$EXTRA_PATH" >&6; }
17252 
17253 
17254 # To properly create a configuration name, we need to have the OpenJDK target
17255 # and options (variants and debug level) parsed.
17256 
17257 
17258 
17259 # Check whether --with-conf-name was given.
17260 if test "${with_conf_name+set}" = set; then :
17261   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17262 fi
17263 
17264 
17265   # Test from where we are running configure, in or outside of src root.
17266   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17267 $as_echo_n "checking where to store configuration... " >&6; }
17268   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17269       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17270       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17271     # We are running configure from the src root.
17272     # Create a default ./build/target-variant-debuglevel output root.
17273     if test "x${CONF_NAME}" = x; then
17274       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17275 $as_echo "in default location" >&6; }
17276       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17277     else
17278       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17279 $as_echo "in build directory with custom name" >&6; }
17280     fi
17281     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17282     $MKDIR -p "$OUTPUT_ROOT"
17283     if test ! -d "$OUTPUT_ROOT"; then
17284       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17285     fi
17286   else
17287     # We are running configure from outside of the src dir.
17288     # Then use the current directory as output dir!
17289     # If configuration is situated in normal build directory, just use the build
17290     # directory name as configuration name, otherwise use the complete path.
17291     if test "x${CONF_NAME}" = x; then
17292       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17293     fi
17294     OUTPUT_ROOT="$CURDIR"
17295     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17296 $as_echo "in current directory" >&6; }
17297 
17298     # WARNING: This might be a bad thing to do. You need to be sure you want to
17299     # have a configuration in this directory. Do some sanity checks!
17300 
17301     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17302       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17303       # other files
17304       files_present=`$LS $OUTPUT_ROOT`
17305       # Configure has already touched config.log and confdefs.h in the current dir when this check
17306       # is performed.
17307       filtered_files=`$ECHO "$files_present" \
17308           | $SED -e 's/config.log//g' \
17309               -e 's/configure.log//g' \
17310               -e 's/confdefs.h//g' \
17311               -e 's/ //g' \
17312           | $TR -d '\n'`
17313       if test "x$filtered_files" != x; then
17314         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17315 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
17316         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17317 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17318         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17319 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17320         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17321 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17322         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17323 $as_echo "$as_me: seriously mess up just about everything." >&6;}
17324         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17325 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17326         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17327 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17328         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17329       fi
17330     fi
17331   fi
17332   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17333 $as_echo_n "checking what configuration name to use... " >&6; }
17334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17335 $as_echo "$CONF_NAME" >&6; }
17336 
17337 
17338   # Only process if variable expands to non-empty
17339 
17340   if test "x$OUTPUT_ROOT" != x; then
17341     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17342 
17343   # Input might be given as Windows format, start by converting to
17344   # unix format.
17345   path="$OUTPUT_ROOT"
17346   new_path=`$CYGPATH -u "$path"`
17347 
17348   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17349   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17350   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17351   # "foo.exe" is OK but "foo" is an error.
17352   #
17353   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17354   # It is also a way to make sure we got the proper file name for the real test later on.
17355   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17356   if test "x$test_shortpath" = x; then
17357     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17358 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17359     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17360   fi
17361 
17362   # Call helper function which possibly converts this using DOS-style short mode.
17363   # If so, the updated path is stored in $new_path.
17364 
17365   input_path="$new_path"
17366   # Check if we need to convert this using DOS-style short mode. If the path
17367   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17368   # take no chances and rewrite it.
17369   # Note: m4 eats our [], so we need to use [ and ] instead.
17370   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17371   if test "x$has_forbidden_chars" != x; then
17372     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17373     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17374     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17375     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17376       # Going to short mode and back again did indeed matter. Since short mode is
17377       # case insensitive, let's make it lowercase to improve readability.
17378       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17379       # Now convert it back to Unix-style (cygpath)
17380       input_path=`$CYGPATH -u "$shortmode_path"`
17381       new_path="$input_path"
17382     fi
17383   fi
17384 
17385   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17386   if test "x$test_cygdrive_prefix" = x; then
17387     # As a simple fix, exclude /usr/bin since it's not a real path.
17388     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17389       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17390       # a path prefixed by /cygdrive for fixpath to work.
17391       new_path="$CYGWIN_ROOT_PATH$input_path"
17392     fi
17393   fi
17394 
17395 
17396   if test "x$path" != "x$new_path"; then
17397     OUTPUT_ROOT="$new_path"
17398     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17399 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17400   fi
17401 
17402     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17403 
17404   path="$OUTPUT_ROOT"
17405   has_colon=`$ECHO $path | $GREP ^.:`
17406   new_path="$path"
17407   if test "x$has_colon" = x; then
17408     # Not in mixed or Windows style, start by that.
17409     new_path=`cmd //c echo $path`
17410   fi
17411 
17412 
17413   input_path="$new_path"
17414   # Check if we need to convert this using DOS-style short mode. If the path
17415   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17416   # take no chances and rewrite it.
17417   # Note: m4 eats our [], so we need to use [ and ] instead.
17418   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17419   if test "x$has_forbidden_chars" != x; then
17420     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17421     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17422   fi
17423 
17424 
17425   windows_path="$new_path"
17426   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17427     unix_path=`$CYGPATH -u "$windows_path"`
17428     new_path="$unix_path"
17429   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17430     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17431     new_path="$unix_path"
17432   fi
17433 
17434   if test "x$path" != "x$new_path"; then
17435     OUTPUT_ROOT="$new_path"
17436     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17437 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17438   fi
17439 
17440   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17441   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17442 
17443     else
17444       # We're on a unix platform. Hooray! :)
17445       path="$OUTPUT_ROOT"
17446       has_space=`$ECHO "$path" | $GREP " "`
17447       if test "x$has_space" != x; then
17448         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17449 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17450         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17451       fi
17452 
17453       # Use eval to expand a potential ~
17454       eval path="$path"
17455       if test ! -f "$path" && test ! -d "$path"; then
17456         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17457       fi
17458 
17459       if test -d "$path"; then
17460         OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17461       else
17462         dir="`$DIRNAME "$path"`"
17463         base="`$BASENAME "$path"`"
17464         OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17465       fi
17466     fi
17467   fi
17468 
17469 
17470   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17471   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17472 
17473   SPEC=$OUTPUT_ROOT/spec.gmk
17474 
17475   CONF_NAME=$CONF_NAME
17476 
17477   OUTPUT_ROOT=$OUTPUT_ROOT
17478 
17479 
17480 
17481   # The spec.gmk file contains all variables for the make system.
17482   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17483 
17484   # The bootcycle-spec.gmk file contains support for boot cycle builds.
17485   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17486 
17487   # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17488   ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17489 
17490   # The compare.sh is used to compare the build output to other builds.
17491   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17492 
17493   # The generated Makefile knows where the spec.gmk is and where the source is.
17494   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17495   # which will look for generated configurations
17496   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17497 
17498 
17499 
17500 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17501 
17502   for ac_prog in apt-get yum port pkgutil pkgadd
17503 do
17504   # Extract the first word of "$ac_prog", so it can be a program name with args.
17505 set dummy $ac_prog; ac_word=$2
17506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17507 $as_echo_n "checking for $ac_word... " >&6; }
17508 if ${ac_cv_prog_PKGHANDLER+:} false; then :
17509   $as_echo_n "(cached) " >&6
17510 else
17511   if test -n "$PKGHANDLER"; then
17512   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17513 else
17514 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17515 for as_dir in $PATH
17516 do
17517   IFS=$as_save_IFS
17518   test -z "$as_dir" && as_dir=.
17519     for ac_exec_ext in '' $ac_executable_extensions; do
17520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17521     ac_cv_prog_PKGHANDLER="$ac_prog"
17522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17523     break 2
17524   fi
17525 done
17526   done
17527 IFS=$as_save_IFS
17528 
17529 fi
17530 fi
17531 PKGHANDLER=$ac_cv_prog_PKGHANDLER
17532 if test -n "$PKGHANDLER"; then
17533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17534 $as_echo "$PKGHANDLER" >&6; }
17535 else
17536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17537 $as_echo "no" >&6; }
17538 fi
17539 
17540 
17541   test -n "$PKGHANDLER" && break
17542 done
17543 
17544 
17545 
17546 # Setup tools that requires more complex handling, or that is not needed by the configure script.
17547 
17548 
17549 
17550   # Publish this variable in the help.
17551 
17552 
17553   if [ -z "${MAKE+x}" ]; then
17554     # The variable is not set by user, try to locate tool using the code snippet
17555 
17556     # Try our hardest to locate a correct version of GNU make
17557     for ac_prog in gmake
17558 do
17559   # Extract the first word of "$ac_prog", so it can be a program name with args.
17560 set dummy $ac_prog; ac_word=$2
17561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17562 $as_echo_n "checking for $ac_word... " >&6; }
17563 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17564   $as_echo_n "(cached) " >&6
17565 else
17566   case $CHECK_GMAKE in
17567   [\\/]* | ?:[\\/]*)
17568   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17569   ;;
17570   *)
17571   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17572 for as_dir in $PATH
17573 do
17574   IFS=$as_save_IFS
17575   test -z "$as_dir" && as_dir=.
17576     for ac_exec_ext in '' $ac_executable_extensions; do
17577   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17578     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17579     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17580     break 2
17581   fi
17582 done
17583   done
17584 IFS=$as_save_IFS
17585 
17586   ;;
17587 esac
17588 fi
17589 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17590 if test -n "$CHECK_GMAKE"; then
17591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17592 $as_echo "$CHECK_GMAKE" >&6; }
17593 else
17594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17595 $as_echo "no" >&6; }
17596 fi
17597 
17598 
17599   test -n "$CHECK_GMAKE" && break
17600 done
17601 
17602 
17603   MAKE_CANDIDATE=""$CHECK_GMAKE""
17604   DESCRIPTION="gmake in PATH"
17605 
17606   # On Cygwin, we require a newer version of make than on other platforms
17607   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17608     MAKE_VERSION_EXPR="-e 4\."
17609     MAKE_REQUIRED_VERSION="4.0"
17610    else
17611     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17612     MAKE_REQUIRED_VERSION="3.81"
17613   fi
17614 
17615   if test "x$MAKE_CANDIDATE" != x; then
17616     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17617 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17618     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17619     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17620     if test "x$IS_GNU_MAKE" = x; then
17621       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17622 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17623     else
17624       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17625       if test "x$IS_MODERN_MAKE" = x; then
17626         { $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
17627 $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;}
17628       else
17629         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17630           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17631             MAKE_EXPECTED_ENV='cygwin'
17632           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17633             MAKE_EXPECTED_ENV='msys'
17634           else
17635             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17636           fi
17637           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17638           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17639         else
17640           # Not relevant for non-Windows
17641           IS_MAKE_CORRECT_ENV=true
17642         fi
17643         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17644           { $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
17645 $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;}
17646         else
17647           FOUND_MAKE=$MAKE_CANDIDATE
17648 
17649   # Only process if variable expands to non-empty
17650 
17651   if test "x$FOUND_MAKE" != x; then
17652     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17653 
17654   # First separate the path from the arguments. This will split at the first
17655   # space.
17656   complete="$FOUND_MAKE"
17657   path="${complete%% *}"
17658   tmp="$complete EOL"
17659   arguments="${tmp#* }"
17660 
17661   # Input might be given as Windows format, start by converting to
17662   # unix format.
17663   new_path=`$CYGPATH -u "$path"`
17664 
17665   # Now try to locate executable using which
17666   new_path=`$WHICH "$new_path" 2> /dev/null`
17667   # bat and cmd files are not always considered executable in cygwin causing which
17668   # to not find them
17669   if test "x$new_path" = x \
17670       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17671       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17672     new_path=`$CYGPATH -u "$path"`
17673   fi
17674   if test "x$new_path" = x; then
17675     # Oops. Which didn't find the executable.
17676     # The splitting of arguments from the executable at a space might have been incorrect,
17677     # since paths with space are more likely in Windows. Give it another try with the whole
17678     # argument.
17679     path="$complete"
17680     arguments="EOL"
17681     new_path=`$CYGPATH -u "$path"`
17682     new_path=`$WHICH "$new_path" 2> /dev/null`
17683     # bat and cmd files are not always considered executable in cygwin causing which
17684     # to not find them
17685     if test "x$new_path" = x \
17686         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17687         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17688       new_path=`$CYGPATH -u "$path"`
17689     fi
17690     if test "x$new_path" = x; then
17691       # It's still not found. Now this is an unrecoverable error.
17692       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17693 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17694       has_space=`$ECHO "$complete" | $GREP " "`
17695       if test "x$has_space" != x; then
17696         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17697 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17698       fi
17699       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17700     fi
17701   fi
17702 
17703   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17704   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17705   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17706   # "foo.exe" is OK but "foo" is an error.
17707   #
17708   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17709   # It is also a way to make sure we got the proper file name for the real test later on.
17710   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17711   if test "x$test_shortpath" = x; then
17712     # Short path failed, file does not exist as specified.
17713     # Try adding .exe or .cmd
17714     if test -f "${new_path}.exe"; then
17715       input_to_shortpath="${new_path}.exe"
17716     elif test -f "${new_path}.cmd"; then
17717       input_to_shortpath="${new_path}.cmd"
17718     else
17719       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17720 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17721       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17722 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17723       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17724     fi
17725   else
17726     input_to_shortpath="$new_path"
17727   fi
17728 
17729   # Call helper function which possibly converts this using DOS-style short mode.
17730   # If so, the updated path is stored in $new_path.
17731   new_path="$input_to_shortpath"
17732 
17733   input_path="$input_to_shortpath"
17734   # Check if we need to convert this using DOS-style short mode. If the path
17735   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17736   # take no chances and rewrite it.
17737   # Note: m4 eats our [], so we need to use [ and ] instead.
17738   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17739   if test "x$has_forbidden_chars" != x; then
17740     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17741     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17742     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17743     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17744       # Going to short mode and back again did indeed matter. Since short mode is
17745       # case insensitive, let's make it lowercase to improve readability.
17746       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17747       # Now convert it back to Unix-style (cygpath)
17748       input_path=`$CYGPATH -u "$shortmode_path"`
17749       new_path="$input_path"
17750     fi
17751   fi
17752 
17753   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17754   if test "x$test_cygdrive_prefix" = x; then
17755     # As a simple fix, exclude /usr/bin since it's not a real path.
17756     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17757       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17758       # a path prefixed by /cygdrive for fixpath to work.
17759       new_path="$CYGWIN_ROOT_PATH$input_path"
17760     fi
17761   fi
17762 
17763   # remove trailing .exe if any
17764   new_path="${new_path/%.exe/}"
17765 
17766     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17767 
17768   # First separate the path from the arguments. This will split at the first
17769   # space.
17770   complete="$FOUND_MAKE"
17771   path="${complete%% *}"
17772   tmp="$complete EOL"
17773   arguments="${tmp#* }"
17774 
17775   # Input might be given as Windows format, start by converting to
17776   # unix format.
17777   new_path="$path"
17778 
17779   windows_path="$new_path"
17780   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17781     unix_path=`$CYGPATH -u "$windows_path"`
17782     new_path="$unix_path"
17783   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17784     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17785     new_path="$unix_path"
17786   fi
17787 
17788 
17789   # Now try to locate executable using which
17790   new_path=`$WHICH "$new_path" 2> /dev/null`
17791 
17792   if test "x$new_path" = x; then
17793     # Oops. Which didn't find the executable.
17794     # The splitting of arguments from the executable at a space might have been incorrect,
17795     # since paths with space are more likely in Windows. Give it another try with the whole
17796     # argument.
17797     path="$complete"
17798     arguments="EOL"
17799     new_path="$path"
17800 
17801   windows_path="$new_path"
17802   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17803     unix_path=`$CYGPATH -u "$windows_path"`
17804     new_path="$unix_path"
17805   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17806     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17807     new_path="$unix_path"
17808   fi
17809 
17810 
17811     new_path=`$WHICH "$new_path" 2> /dev/null`
17812     # bat and cmd files are not always considered executable in MSYS causing which
17813     # to not find them
17814     if test "x$new_path" = x \
17815         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17816         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17817       new_path="$path"
17818 
17819   windows_path="$new_path"
17820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17821     unix_path=`$CYGPATH -u "$windows_path"`
17822     new_path="$unix_path"
17823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17825     new_path="$unix_path"
17826   fi
17827 
17828     fi
17829 
17830     if test "x$new_path" = x; then
17831       # It's still not found. Now this is an unrecoverable error.
17832       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17833 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17834       has_space=`$ECHO "$complete" | $GREP " "`
17835       if test "x$has_space" != x; then
17836         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17837 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17838       fi
17839       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17840     fi
17841   fi
17842 
17843   # Now new_path has a complete unix path to the binary
17844   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17845     # Keep paths in /bin as-is, but remove trailing .exe if any
17846     new_path="${new_path/%.exe/}"
17847     # Do not save /bin paths to all_fixpath_prefixes!
17848   else
17849     # Not in mixed or Windows style, start by that.
17850     new_path=`cmd //c echo $new_path`
17851 
17852   input_path="$new_path"
17853   # Check if we need to convert this using DOS-style short mode. If the path
17854   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17855   # take no chances and rewrite it.
17856   # Note: m4 eats our [], so we need to use [ and ] instead.
17857   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17858   if test "x$has_forbidden_chars" != x; then
17859     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17860     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17861   fi
17862 
17863     # Output is in $new_path
17864 
17865   windows_path="$new_path"
17866   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17867     unix_path=`$CYGPATH -u "$windows_path"`
17868     new_path="$unix_path"
17869   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17870     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17871     new_path="$unix_path"
17872   fi
17873 
17874     # remove trailing .exe if any
17875     new_path="${new_path/%.exe/}"
17876 
17877     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17878     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17879   fi
17880 
17881     else
17882       # We're on a unix platform. Hooray! :)
17883       # First separate the path from the arguments. This will split at the first
17884       # space.
17885       complete="$FOUND_MAKE"
17886       path="${complete%% *}"
17887       tmp="$complete EOL"
17888       arguments="${tmp#* }"
17889 
17890       # Cannot rely on the command "which" here since it doesn't always work.
17891       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17892       if test -z "$is_absolute_path"; then
17893         # Path to executable is not absolute. Find it.
17894         IFS_save="$IFS"
17895         IFS=:
17896         for p in $PATH; do
17897           if test -f "$p/$path" && test -x "$p/$path"; then
17898             new_path="$p/$path"
17899             break
17900           fi
17901         done
17902         IFS="$IFS_save"
17903       else
17904         # This is an absolute path, we can use it without further modifications.
17905         new_path="$path"
17906       fi
17907 
17908       if test "x$new_path" = x; then
17909         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17910 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17911         has_space=`$ECHO "$complete" | $GREP " "`
17912         if test "x$has_space" != x; then
17913           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17914 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17915         fi
17916         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17917       fi
17918     fi
17919 
17920     # Now join together the path and the arguments once again
17921     if test "x$arguments" != xEOL; then
17922       new_complete="$new_path ${arguments% *}"
17923     else
17924       new_complete="$new_path"
17925     fi
17926 
17927     if test "x$complete" != "x$new_complete"; then
17928       FOUND_MAKE="$new_complete"
17929       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17930 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17931     fi
17932   fi
17933 
17934         fi
17935       fi
17936     fi
17937   fi
17938 
17939 
17940     if test "x$FOUND_MAKE" = x; then
17941       for ac_prog in make
17942 do
17943   # Extract the first word of "$ac_prog", so it can be a program name with args.
17944 set dummy $ac_prog; ac_word=$2
17945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17946 $as_echo_n "checking for $ac_word... " >&6; }
17947 if ${ac_cv_path_CHECK_MAKE+:} false; then :
17948   $as_echo_n "(cached) " >&6
17949 else
17950   case $CHECK_MAKE in
17951   [\\/]* | ?:[\\/]*)
17952   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17953   ;;
17954   *)
17955   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17956 for as_dir in $PATH
17957 do
17958   IFS=$as_save_IFS
17959   test -z "$as_dir" && as_dir=.
17960     for ac_exec_ext in '' $ac_executable_extensions; do
17961   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17962     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17963     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17964     break 2
17965   fi
17966 done
17967   done
17968 IFS=$as_save_IFS
17969 
17970   ;;
17971 esac
17972 fi
17973 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17974 if test -n "$CHECK_MAKE"; then
17975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17976 $as_echo "$CHECK_MAKE" >&6; }
17977 else
17978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17979 $as_echo "no" >&6; }
17980 fi
17981 
17982 
17983   test -n "$CHECK_MAKE" && break
17984 done
17985 
17986 
17987   MAKE_CANDIDATE=""$CHECK_MAKE""
17988   DESCRIPTION="make in PATH"
17989 
17990   # On Cygwin, we require a newer version of make than on other platforms
17991   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17992     MAKE_VERSION_EXPR="-e 4\."
17993     MAKE_REQUIRED_VERSION="4.0"
17994    else
17995     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17996     MAKE_REQUIRED_VERSION="3.81"
17997   fi
17998 
17999   if test "x$MAKE_CANDIDATE" != x; then
18000     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18001 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18002     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18003     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18004     if test "x$IS_GNU_MAKE" = x; then
18005       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18006 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18007     else
18008       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18009       if test "x$IS_MODERN_MAKE" = x; then
18010         { $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
18011 $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;}
18012       else
18013         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18014           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18015             MAKE_EXPECTED_ENV='cygwin'
18016           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18017             MAKE_EXPECTED_ENV='msys'
18018           else
18019             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18020           fi
18021           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18022           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18023         else
18024           # Not relevant for non-Windows
18025           IS_MAKE_CORRECT_ENV=true
18026         fi
18027         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18028           { $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
18029 $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;}
18030         else
18031           FOUND_MAKE=$MAKE_CANDIDATE
18032 
18033   # Only process if variable expands to non-empty
18034 
18035   if test "x$FOUND_MAKE" != x; then
18036     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18037 
18038   # First separate the path from the arguments. This will split at the first
18039   # space.
18040   complete="$FOUND_MAKE"
18041   path="${complete%% *}"
18042   tmp="$complete EOL"
18043   arguments="${tmp#* }"
18044 
18045   # Input might be given as Windows format, start by converting to
18046   # unix format.
18047   new_path=`$CYGPATH -u "$path"`
18048 
18049   # Now try to locate executable using which
18050   new_path=`$WHICH "$new_path" 2> /dev/null`
18051   # bat and cmd files are not always considered executable in cygwin causing which
18052   # to not find them
18053   if test "x$new_path" = x \
18054       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18055       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18056     new_path=`$CYGPATH -u "$path"`
18057   fi
18058   if test "x$new_path" = x; then
18059     # Oops. Which didn't find the executable.
18060     # The splitting of arguments from the executable at a space might have been incorrect,
18061     # since paths with space are more likely in Windows. Give it another try with the whole
18062     # argument.
18063     path="$complete"
18064     arguments="EOL"
18065     new_path=`$CYGPATH -u "$path"`
18066     new_path=`$WHICH "$new_path" 2> /dev/null`
18067     # bat and cmd files are not always considered executable in cygwin causing which
18068     # to not find them
18069     if test "x$new_path" = x \
18070         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18071         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18072       new_path=`$CYGPATH -u "$path"`
18073     fi
18074     if test "x$new_path" = x; then
18075       # It's still not found. Now this is an unrecoverable error.
18076       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18077 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18078       has_space=`$ECHO "$complete" | $GREP " "`
18079       if test "x$has_space" != x; then
18080         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18081 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18082       fi
18083       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18084     fi
18085   fi
18086 
18087   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18088   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18089   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18090   # "foo.exe" is OK but "foo" is an error.
18091   #
18092   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18093   # It is also a way to make sure we got the proper file name for the real test later on.
18094   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18095   if test "x$test_shortpath" = x; then
18096     # Short path failed, file does not exist as specified.
18097     # Try adding .exe or .cmd
18098     if test -f "${new_path}.exe"; then
18099       input_to_shortpath="${new_path}.exe"
18100     elif test -f "${new_path}.cmd"; then
18101       input_to_shortpath="${new_path}.cmd"
18102     else
18103       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18104 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18105       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18106 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18107       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18108     fi
18109   else
18110     input_to_shortpath="$new_path"
18111   fi
18112 
18113   # Call helper function which possibly converts this using DOS-style short mode.
18114   # If so, the updated path is stored in $new_path.
18115   new_path="$input_to_shortpath"
18116 
18117   input_path="$input_to_shortpath"
18118   # Check if we need to convert this using DOS-style short mode. If the path
18119   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18120   # take no chances and rewrite it.
18121   # Note: m4 eats our [], so we need to use [ and ] instead.
18122   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18123   if test "x$has_forbidden_chars" != x; then
18124     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18125     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18126     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18127     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18128       # Going to short mode and back again did indeed matter. Since short mode is
18129       # case insensitive, let's make it lowercase to improve readability.
18130       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18131       # Now convert it back to Unix-style (cygpath)
18132       input_path=`$CYGPATH -u "$shortmode_path"`
18133       new_path="$input_path"
18134     fi
18135   fi
18136 
18137   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18138   if test "x$test_cygdrive_prefix" = x; then
18139     # As a simple fix, exclude /usr/bin since it's not a real path.
18140     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18141       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18142       # a path prefixed by /cygdrive for fixpath to work.
18143       new_path="$CYGWIN_ROOT_PATH$input_path"
18144     fi
18145   fi
18146 
18147   # remove trailing .exe if any
18148   new_path="${new_path/%.exe/}"
18149 
18150     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18151 
18152   # First separate the path from the arguments. This will split at the first
18153   # space.
18154   complete="$FOUND_MAKE"
18155   path="${complete%% *}"
18156   tmp="$complete EOL"
18157   arguments="${tmp#* }"
18158 
18159   # Input might be given as Windows format, start by converting to
18160   # unix format.
18161   new_path="$path"
18162 
18163   windows_path="$new_path"
18164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18165     unix_path=`$CYGPATH -u "$windows_path"`
18166     new_path="$unix_path"
18167   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18168     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18169     new_path="$unix_path"
18170   fi
18171 
18172 
18173   # Now try to locate executable using which
18174   new_path=`$WHICH "$new_path" 2> /dev/null`
18175 
18176   if test "x$new_path" = x; then
18177     # Oops. Which didn't find the executable.
18178     # The splitting of arguments from the executable at a space might have been incorrect,
18179     # since paths with space are more likely in Windows. Give it another try with the whole
18180     # argument.
18181     path="$complete"
18182     arguments="EOL"
18183     new_path="$path"
18184 
18185   windows_path="$new_path"
18186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18187     unix_path=`$CYGPATH -u "$windows_path"`
18188     new_path="$unix_path"
18189   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18190     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18191     new_path="$unix_path"
18192   fi
18193 
18194 
18195     new_path=`$WHICH "$new_path" 2> /dev/null`
18196     # bat and cmd files are not always considered executable in MSYS causing which
18197     # to not find them
18198     if test "x$new_path" = x \
18199         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18200         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18201       new_path="$path"
18202 
18203   windows_path="$new_path"
18204   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18205     unix_path=`$CYGPATH -u "$windows_path"`
18206     new_path="$unix_path"
18207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18208     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18209     new_path="$unix_path"
18210   fi
18211 
18212     fi
18213 
18214     if test "x$new_path" = x; then
18215       # It's still not found. Now this is an unrecoverable error.
18216       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18217 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18218       has_space=`$ECHO "$complete" | $GREP " "`
18219       if test "x$has_space" != x; then
18220         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18221 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18222       fi
18223       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18224     fi
18225   fi
18226 
18227   # Now new_path has a complete unix path to the binary
18228   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18229     # Keep paths in /bin as-is, but remove trailing .exe if any
18230     new_path="${new_path/%.exe/}"
18231     # Do not save /bin paths to all_fixpath_prefixes!
18232   else
18233     # Not in mixed or Windows style, start by that.
18234     new_path=`cmd //c echo $new_path`
18235 
18236   input_path="$new_path"
18237   # Check if we need to convert this using DOS-style short mode. If the path
18238   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18239   # take no chances and rewrite it.
18240   # Note: m4 eats our [], so we need to use [ and ] instead.
18241   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18242   if test "x$has_forbidden_chars" != x; then
18243     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18244     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18245   fi
18246 
18247     # Output is in $new_path
18248 
18249   windows_path="$new_path"
18250   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18251     unix_path=`$CYGPATH -u "$windows_path"`
18252     new_path="$unix_path"
18253   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18254     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18255     new_path="$unix_path"
18256   fi
18257 
18258     # remove trailing .exe if any
18259     new_path="${new_path/%.exe/}"
18260 
18261     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18262     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18263   fi
18264 
18265     else
18266       # We're on a unix platform. Hooray! :)
18267       # First separate the path from the arguments. This will split at the first
18268       # space.
18269       complete="$FOUND_MAKE"
18270       path="${complete%% *}"
18271       tmp="$complete EOL"
18272       arguments="${tmp#* }"
18273 
18274       # Cannot rely on the command "which" here since it doesn't always work.
18275       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18276       if test -z "$is_absolute_path"; then
18277         # Path to executable is not absolute. Find it.
18278         IFS_save="$IFS"
18279         IFS=:
18280         for p in $PATH; do
18281           if test -f "$p/$path" && test -x "$p/$path"; then
18282             new_path="$p/$path"
18283             break
18284           fi
18285         done
18286         IFS="$IFS_save"
18287       else
18288         # This is an absolute path, we can use it without further modifications.
18289         new_path="$path"
18290       fi
18291 
18292       if test "x$new_path" = x; then
18293         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18294 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18295         has_space=`$ECHO "$complete" | $GREP " "`
18296         if test "x$has_space" != x; then
18297           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18298 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18299         fi
18300         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18301       fi
18302     fi
18303 
18304     # Now join together the path and the arguments once again
18305     if test "x$arguments" != xEOL; then
18306       new_complete="$new_path ${arguments% *}"
18307     else
18308       new_complete="$new_path"
18309     fi
18310 
18311     if test "x$complete" != "x$new_complete"; then
18312       FOUND_MAKE="$new_complete"
18313       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18314 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18315     fi
18316   fi
18317 
18318         fi
18319       fi
18320     fi
18321   fi
18322 
18323     fi
18324 
18325     if test "x$FOUND_MAKE" = x; then
18326       if test "x$TOOLCHAIN_PATH" != x; then
18327         # We have a toolchain path, check that as well before giving up.
18328         OLD_PATH=$PATH
18329         PATH=$TOOLCHAIN_PATH:$PATH
18330         for ac_prog in gmake
18331 do
18332   # Extract the first word of "$ac_prog", so it can be a program name with args.
18333 set dummy $ac_prog; ac_word=$2
18334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18335 $as_echo_n "checking for $ac_word... " >&6; }
18336 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18337   $as_echo_n "(cached) " >&6
18338 else
18339   case $CHECK_TOOLSDIR_GMAKE in
18340   [\\/]* | ?:[\\/]*)
18341   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18342   ;;
18343   *)
18344   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18345 for as_dir in $PATH
18346 do
18347   IFS=$as_save_IFS
18348   test -z "$as_dir" && as_dir=.
18349     for ac_exec_ext in '' $ac_executable_extensions; do
18350   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18351     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18352     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18353     break 2
18354   fi
18355 done
18356   done
18357 IFS=$as_save_IFS
18358 
18359   ;;
18360 esac
18361 fi
18362 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18363 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18365 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18366 else
18367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18368 $as_echo "no" >&6; }
18369 fi
18370 
18371 
18372   test -n "$CHECK_TOOLSDIR_GMAKE" && break
18373 done
18374 
18375 
18376   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18377   DESCRIPTION="gmake in tools-dir"
18378 
18379   # On Cygwin, we require a newer version of make than on other platforms
18380   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18381     MAKE_VERSION_EXPR="-e 4\."
18382     MAKE_REQUIRED_VERSION="4.0"
18383    else
18384     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18385     MAKE_REQUIRED_VERSION="3.81"
18386   fi
18387 
18388   if test "x$MAKE_CANDIDATE" != x; then
18389     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18390 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18391     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18392     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18393     if test "x$IS_GNU_MAKE" = x; then
18394       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18395 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18396     else
18397       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18398       if test "x$IS_MODERN_MAKE" = x; then
18399         { $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
18400 $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;}
18401       else
18402         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18403           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18404             MAKE_EXPECTED_ENV='cygwin'
18405           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18406             MAKE_EXPECTED_ENV='msys'
18407           else
18408             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18409           fi
18410           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18411           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18412         else
18413           # Not relevant for non-Windows
18414           IS_MAKE_CORRECT_ENV=true
18415         fi
18416         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18417           { $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
18418 $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;}
18419         else
18420           FOUND_MAKE=$MAKE_CANDIDATE
18421 
18422   # Only process if variable expands to non-empty
18423 
18424   if test "x$FOUND_MAKE" != x; then
18425     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18426 
18427   # First separate the path from the arguments. This will split at the first
18428   # space.
18429   complete="$FOUND_MAKE"
18430   path="${complete%% *}"
18431   tmp="$complete EOL"
18432   arguments="${tmp#* }"
18433 
18434   # Input might be given as Windows format, start by converting to
18435   # unix format.
18436   new_path=`$CYGPATH -u "$path"`
18437 
18438   # Now try to locate executable using which
18439   new_path=`$WHICH "$new_path" 2> /dev/null`
18440   # bat and cmd files are not always considered executable in cygwin causing which
18441   # to not find them
18442   if test "x$new_path" = x \
18443       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18444       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18445     new_path=`$CYGPATH -u "$path"`
18446   fi
18447   if test "x$new_path" = x; then
18448     # Oops. Which didn't find the executable.
18449     # The splitting of arguments from the executable at a space might have been incorrect,
18450     # since paths with space are more likely in Windows. Give it another try with the whole
18451     # argument.
18452     path="$complete"
18453     arguments="EOL"
18454     new_path=`$CYGPATH -u "$path"`
18455     new_path=`$WHICH "$new_path" 2> /dev/null`
18456     # bat and cmd files are not always considered executable in cygwin causing which
18457     # to not find them
18458     if test "x$new_path" = x \
18459         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18460         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18461       new_path=`$CYGPATH -u "$path"`
18462     fi
18463     if test "x$new_path" = x; then
18464       # It's still not found. Now this is an unrecoverable error.
18465       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18466 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18467       has_space=`$ECHO "$complete" | $GREP " "`
18468       if test "x$has_space" != x; then
18469         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18470 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18471       fi
18472       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18473     fi
18474   fi
18475 
18476   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18477   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18478   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18479   # "foo.exe" is OK but "foo" is an error.
18480   #
18481   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18482   # It is also a way to make sure we got the proper file name for the real test later on.
18483   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18484   if test "x$test_shortpath" = x; then
18485     # Short path failed, file does not exist as specified.
18486     # Try adding .exe or .cmd
18487     if test -f "${new_path}.exe"; then
18488       input_to_shortpath="${new_path}.exe"
18489     elif test -f "${new_path}.cmd"; then
18490       input_to_shortpath="${new_path}.cmd"
18491     else
18492       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18493 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18494       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18495 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18496       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18497     fi
18498   else
18499     input_to_shortpath="$new_path"
18500   fi
18501 
18502   # Call helper function which possibly converts this using DOS-style short mode.
18503   # If so, the updated path is stored in $new_path.
18504   new_path="$input_to_shortpath"
18505 
18506   input_path="$input_to_shortpath"
18507   # Check if we need to convert this using DOS-style short mode. If the path
18508   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18509   # take no chances and rewrite it.
18510   # Note: m4 eats our [], so we need to use [ and ] instead.
18511   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18512   if test "x$has_forbidden_chars" != x; then
18513     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18514     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18515     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18516     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18517       # Going to short mode and back again did indeed matter. Since short mode is
18518       # case insensitive, let's make it lowercase to improve readability.
18519       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18520       # Now convert it back to Unix-style (cygpath)
18521       input_path=`$CYGPATH -u "$shortmode_path"`
18522       new_path="$input_path"
18523     fi
18524   fi
18525 
18526   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18527   if test "x$test_cygdrive_prefix" = x; then
18528     # As a simple fix, exclude /usr/bin since it's not a real path.
18529     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18530       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18531       # a path prefixed by /cygdrive for fixpath to work.
18532       new_path="$CYGWIN_ROOT_PATH$input_path"
18533     fi
18534   fi
18535 
18536   # remove trailing .exe if any
18537   new_path="${new_path/%.exe/}"
18538 
18539     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18540 
18541   # First separate the path from the arguments. This will split at the first
18542   # space.
18543   complete="$FOUND_MAKE"
18544   path="${complete%% *}"
18545   tmp="$complete EOL"
18546   arguments="${tmp#* }"
18547 
18548   # Input might be given as Windows format, start by converting to
18549   # unix format.
18550   new_path="$path"
18551 
18552   windows_path="$new_path"
18553   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18554     unix_path=`$CYGPATH -u "$windows_path"`
18555     new_path="$unix_path"
18556   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18557     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18558     new_path="$unix_path"
18559   fi
18560 
18561 
18562   # Now try to locate executable using which
18563   new_path=`$WHICH "$new_path" 2> /dev/null`
18564 
18565   if test "x$new_path" = x; then
18566     # Oops. Which didn't find the executable.
18567     # The splitting of arguments from the executable at a space might have been incorrect,
18568     # since paths with space are more likely in Windows. Give it another try with the whole
18569     # argument.
18570     path="$complete"
18571     arguments="EOL"
18572     new_path="$path"
18573 
18574   windows_path="$new_path"
18575   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18576     unix_path=`$CYGPATH -u "$windows_path"`
18577     new_path="$unix_path"
18578   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18579     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18580     new_path="$unix_path"
18581   fi
18582 
18583 
18584     new_path=`$WHICH "$new_path" 2> /dev/null`
18585     # bat and cmd files are not always considered executable in MSYS causing which
18586     # to not find them
18587     if test "x$new_path" = x \
18588         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18589         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18590       new_path="$path"
18591 
18592   windows_path="$new_path"
18593   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18594     unix_path=`$CYGPATH -u "$windows_path"`
18595     new_path="$unix_path"
18596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18597     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18598     new_path="$unix_path"
18599   fi
18600 
18601     fi
18602 
18603     if test "x$new_path" = x; then
18604       # It's still not found. Now this is an unrecoverable error.
18605       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18606 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18607       has_space=`$ECHO "$complete" | $GREP " "`
18608       if test "x$has_space" != x; then
18609         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18610 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18611       fi
18612       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18613     fi
18614   fi
18615 
18616   # Now new_path has a complete unix path to the binary
18617   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18618     # Keep paths in /bin as-is, but remove trailing .exe if any
18619     new_path="${new_path/%.exe/}"
18620     # Do not save /bin paths to all_fixpath_prefixes!
18621   else
18622     # Not in mixed or Windows style, start by that.
18623     new_path=`cmd //c echo $new_path`
18624 
18625   input_path="$new_path"
18626   # Check if we need to convert this using DOS-style short mode. If the path
18627   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18628   # take no chances and rewrite it.
18629   # Note: m4 eats our [], so we need to use [ and ] instead.
18630   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18631   if test "x$has_forbidden_chars" != x; then
18632     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18633     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18634   fi
18635 
18636     # Output is in $new_path
18637 
18638   windows_path="$new_path"
18639   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18640     unix_path=`$CYGPATH -u "$windows_path"`
18641     new_path="$unix_path"
18642   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18643     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18644     new_path="$unix_path"
18645   fi
18646 
18647     # remove trailing .exe if any
18648     new_path="${new_path/%.exe/}"
18649 
18650     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18651     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18652   fi
18653 
18654     else
18655       # We're on a unix platform. Hooray! :)
18656       # First separate the path from the arguments. This will split at the first
18657       # space.
18658       complete="$FOUND_MAKE"
18659       path="${complete%% *}"
18660       tmp="$complete EOL"
18661       arguments="${tmp#* }"
18662 
18663       # Cannot rely on the command "which" here since it doesn't always work.
18664       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18665       if test -z "$is_absolute_path"; then
18666         # Path to executable is not absolute. Find it.
18667         IFS_save="$IFS"
18668         IFS=:
18669         for p in $PATH; do
18670           if test -f "$p/$path" && test -x "$p/$path"; then
18671             new_path="$p/$path"
18672             break
18673           fi
18674         done
18675         IFS="$IFS_save"
18676       else
18677         # This is an absolute path, we can use it without further modifications.
18678         new_path="$path"
18679       fi
18680 
18681       if test "x$new_path" = x; then
18682         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18683 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18684         has_space=`$ECHO "$complete" | $GREP " "`
18685         if test "x$has_space" != x; then
18686           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18687 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18688         fi
18689         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18690       fi
18691     fi
18692 
18693     # Now join together the path and the arguments once again
18694     if test "x$arguments" != xEOL; then
18695       new_complete="$new_path ${arguments% *}"
18696     else
18697       new_complete="$new_path"
18698     fi
18699 
18700     if test "x$complete" != "x$new_complete"; then
18701       FOUND_MAKE="$new_complete"
18702       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18703 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18704     fi
18705   fi
18706 
18707         fi
18708       fi
18709     fi
18710   fi
18711 
18712         if test "x$FOUND_MAKE" = x; then
18713           for ac_prog in make
18714 do
18715   # Extract the first word of "$ac_prog", so it can be a program name with args.
18716 set dummy $ac_prog; ac_word=$2
18717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18718 $as_echo_n "checking for $ac_word... " >&6; }
18719 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18720   $as_echo_n "(cached) " >&6
18721 else
18722   case $CHECK_TOOLSDIR_MAKE in
18723   [\\/]* | ?:[\\/]*)
18724   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18725   ;;
18726   *)
18727   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18728 for as_dir in $PATH
18729 do
18730   IFS=$as_save_IFS
18731   test -z "$as_dir" && as_dir=.
18732     for ac_exec_ext in '' $ac_executable_extensions; do
18733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18734     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18736     break 2
18737   fi
18738 done
18739   done
18740 IFS=$as_save_IFS
18741 
18742   ;;
18743 esac
18744 fi
18745 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18746 if test -n "$CHECK_TOOLSDIR_MAKE"; then
18747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18748 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18749 else
18750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18751 $as_echo "no" >&6; }
18752 fi
18753 
18754 
18755   test -n "$CHECK_TOOLSDIR_MAKE" && break
18756 done
18757 
18758 
18759   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18760   DESCRIPTION="make in tools-dir"
18761 
18762   # On Cygwin, we require a newer version of make than on other platforms
18763   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18764     MAKE_VERSION_EXPR="-e 4\."
18765     MAKE_REQUIRED_VERSION="4.0"
18766    else
18767     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18768     MAKE_REQUIRED_VERSION="3.81"
18769   fi
18770 
18771   if test "x$MAKE_CANDIDATE" != x; then
18772     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18773 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18774     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18775     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18776     if test "x$IS_GNU_MAKE" = x; then
18777       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18778 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18779     else
18780       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18781       if test "x$IS_MODERN_MAKE" = x; then
18782         { $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
18783 $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;}
18784       else
18785         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18786           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18787             MAKE_EXPECTED_ENV='cygwin'
18788           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18789             MAKE_EXPECTED_ENV='msys'
18790           else
18791             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18792           fi
18793           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18794           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18795         else
18796           # Not relevant for non-Windows
18797           IS_MAKE_CORRECT_ENV=true
18798         fi
18799         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18800           { $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
18801 $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;}
18802         else
18803           FOUND_MAKE=$MAKE_CANDIDATE
18804 
18805   # Only process if variable expands to non-empty
18806 
18807   if test "x$FOUND_MAKE" != x; then
18808     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18809 
18810   # First separate the path from the arguments. This will split at the first
18811   # space.
18812   complete="$FOUND_MAKE"
18813   path="${complete%% *}"
18814   tmp="$complete EOL"
18815   arguments="${tmp#* }"
18816 
18817   # Input might be given as Windows format, start by converting to
18818   # unix format.
18819   new_path=`$CYGPATH -u "$path"`
18820 
18821   # Now try to locate executable using which
18822   new_path=`$WHICH "$new_path" 2> /dev/null`
18823   # bat and cmd files are not always considered executable in cygwin causing which
18824   # to not find them
18825   if test "x$new_path" = x \
18826       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18827       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18828     new_path=`$CYGPATH -u "$path"`
18829   fi
18830   if test "x$new_path" = x; then
18831     # Oops. Which didn't find the executable.
18832     # The splitting of arguments from the executable at a space might have been incorrect,
18833     # since paths with space are more likely in Windows. Give it another try with the whole
18834     # argument.
18835     path="$complete"
18836     arguments="EOL"
18837     new_path=`$CYGPATH -u "$path"`
18838     new_path=`$WHICH "$new_path" 2> /dev/null`
18839     # bat and cmd files are not always considered executable in cygwin causing which
18840     # to not find them
18841     if test "x$new_path" = x \
18842         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18843         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18844       new_path=`$CYGPATH -u "$path"`
18845     fi
18846     if test "x$new_path" = x; then
18847       # It's still not found. Now this is an unrecoverable error.
18848       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18849 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18850       has_space=`$ECHO "$complete" | $GREP " "`
18851       if test "x$has_space" != x; then
18852         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18853 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18854       fi
18855       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18856     fi
18857   fi
18858 
18859   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18860   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18861   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18862   # "foo.exe" is OK but "foo" is an error.
18863   #
18864   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18865   # It is also a way to make sure we got the proper file name for the real test later on.
18866   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18867   if test "x$test_shortpath" = x; then
18868     # Short path failed, file does not exist as specified.
18869     # Try adding .exe or .cmd
18870     if test -f "${new_path}.exe"; then
18871       input_to_shortpath="${new_path}.exe"
18872     elif test -f "${new_path}.cmd"; then
18873       input_to_shortpath="${new_path}.cmd"
18874     else
18875       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18876 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18877       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18878 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18879       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18880     fi
18881   else
18882     input_to_shortpath="$new_path"
18883   fi
18884 
18885   # Call helper function which possibly converts this using DOS-style short mode.
18886   # If so, the updated path is stored in $new_path.
18887   new_path="$input_to_shortpath"
18888 
18889   input_path="$input_to_shortpath"
18890   # Check if we need to convert this using DOS-style short mode. If the path
18891   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18892   # take no chances and rewrite it.
18893   # Note: m4 eats our [], so we need to use [ and ] instead.
18894   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18895   if test "x$has_forbidden_chars" != x; then
18896     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18897     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18898     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18899     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18900       # Going to short mode and back again did indeed matter. Since short mode is
18901       # case insensitive, let's make it lowercase to improve readability.
18902       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18903       # Now convert it back to Unix-style (cygpath)
18904       input_path=`$CYGPATH -u "$shortmode_path"`
18905       new_path="$input_path"
18906     fi
18907   fi
18908 
18909   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18910   if test "x$test_cygdrive_prefix" = x; then
18911     # As a simple fix, exclude /usr/bin since it's not a real path.
18912     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18913       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18914       # a path prefixed by /cygdrive for fixpath to work.
18915       new_path="$CYGWIN_ROOT_PATH$input_path"
18916     fi
18917   fi
18918 
18919   # remove trailing .exe if any
18920   new_path="${new_path/%.exe/}"
18921 
18922     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18923 
18924   # First separate the path from the arguments. This will split at the first
18925   # space.
18926   complete="$FOUND_MAKE"
18927   path="${complete%% *}"
18928   tmp="$complete EOL"
18929   arguments="${tmp#* }"
18930 
18931   # Input might be given as Windows format, start by converting to
18932   # unix format.
18933   new_path="$path"
18934 
18935   windows_path="$new_path"
18936   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18937     unix_path=`$CYGPATH -u "$windows_path"`
18938     new_path="$unix_path"
18939   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18940     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18941     new_path="$unix_path"
18942   fi
18943 
18944 
18945   # Now try to locate executable using which
18946   new_path=`$WHICH "$new_path" 2> /dev/null`
18947 
18948   if test "x$new_path" = x; then
18949     # Oops. Which didn't find the executable.
18950     # The splitting of arguments from the executable at a space might have been incorrect,
18951     # since paths with space are more likely in Windows. Give it another try with the whole
18952     # argument.
18953     path="$complete"
18954     arguments="EOL"
18955     new_path="$path"
18956 
18957   windows_path="$new_path"
18958   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18959     unix_path=`$CYGPATH -u "$windows_path"`
18960     new_path="$unix_path"
18961   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18962     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18963     new_path="$unix_path"
18964   fi
18965 
18966 
18967     new_path=`$WHICH "$new_path" 2> /dev/null`
18968     # bat and cmd files are not always considered executable in MSYS causing which
18969     # to not find them
18970     if test "x$new_path" = x \
18971         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18972         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18973       new_path="$path"
18974 
18975   windows_path="$new_path"
18976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18977     unix_path=`$CYGPATH -u "$windows_path"`
18978     new_path="$unix_path"
18979   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18980     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18981     new_path="$unix_path"
18982   fi
18983 
18984     fi
18985 
18986     if test "x$new_path" = x; then
18987       # It's still not found. Now this is an unrecoverable error.
18988       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18989 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18990       has_space=`$ECHO "$complete" | $GREP " "`
18991       if test "x$has_space" != x; then
18992         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18993 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18994       fi
18995       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18996     fi
18997   fi
18998 
18999   # Now new_path has a complete unix path to the binary
19000   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19001     # Keep paths in /bin as-is, but remove trailing .exe if any
19002     new_path="${new_path/%.exe/}"
19003     # Do not save /bin paths to all_fixpath_prefixes!
19004   else
19005     # Not in mixed or Windows style, start by that.
19006     new_path=`cmd //c echo $new_path`
19007 
19008   input_path="$new_path"
19009   # Check if we need to convert this using DOS-style short mode. If the path
19010   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19011   # take no chances and rewrite it.
19012   # Note: m4 eats our [], so we need to use [ and ] instead.
19013   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19014   if test "x$has_forbidden_chars" != x; then
19015     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19016     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19017   fi
19018 
19019     # Output is in $new_path
19020 
19021   windows_path="$new_path"
19022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19023     unix_path=`$CYGPATH -u "$windows_path"`
19024     new_path="$unix_path"
19025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19026     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19027     new_path="$unix_path"
19028   fi
19029 
19030     # remove trailing .exe if any
19031     new_path="${new_path/%.exe/}"
19032 
19033     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19034     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19035   fi
19036 
19037     else
19038       # We're on a unix platform. Hooray! :)
19039       # First separate the path from the arguments. This will split at the first
19040       # space.
19041       complete="$FOUND_MAKE"
19042       path="${complete%% *}"
19043       tmp="$complete EOL"
19044       arguments="${tmp#* }"
19045 
19046       # Cannot rely on the command "which" here since it doesn't always work.
19047       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19048       if test -z "$is_absolute_path"; then
19049         # Path to executable is not absolute. Find it.
19050         IFS_save="$IFS"
19051         IFS=:
19052         for p in $PATH; do
19053           if test -f "$p/$path" && test -x "$p/$path"; then
19054             new_path="$p/$path"
19055             break
19056           fi
19057         done
19058         IFS="$IFS_save"
19059       else
19060         # This is an absolute path, we can use it without further modifications.
19061         new_path="$path"
19062       fi
19063 
19064       if test "x$new_path" = x; then
19065         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19066 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19067         has_space=`$ECHO "$complete" | $GREP " "`
19068         if test "x$has_space" != x; then
19069           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19070 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19071         fi
19072         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19073       fi
19074     fi
19075 
19076     # Now join together the path and the arguments once again
19077     if test "x$arguments" != xEOL; then
19078       new_complete="$new_path ${arguments% *}"
19079     else
19080       new_complete="$new_path"
19081     fi
19082 
19083     if test "x$complete" != "x$new_complete"; then
19084       FOUND_MAKE="$new_complete"
19085       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19086 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19087     fi
19088   fi
19089 
19090         fi
19091       fi
19092     fi
19093   fi
19094 
19095         fi
19096         PATH=$OLD_PATH
19097       fi
19098     fi
19099 
19100     if test "x$FOUND_MAKE" = x; then
19101       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
19102     fi
19103 
19104   else
19105     # The variable is set, but is it from the command line or the environment?
19106 
19107     # Try to remove the string !MAKE! from our list.
19108     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19109     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19110       # If it failed, the variable was not from the command line. Ignore it,
19111       # but warn the user (except for BASH, which is always set by the calling BASH).
19112       if test "xMAKE" != xBASH; then
19113         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19114 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19115       fi
19116       # Try to locate tool using the code snippet
19117 
19118     # Try our hardest to locate a correct version of GNU make
19119     for ac_prog in gmake
19120 do
19121   # Extract the first word of "$ac_prog", so it can be a program name with args.
19122 set dummy $ac_prog; ac_word=$2
19123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19124 $as_echo_n "checking for $ac_word... " >&6; }
19125 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19126   $as_echo_n "(cached) " >&6
19127 else
19128   case $CHECK_GMAKE in
19129   [\\/]* | ?:[\\/]*)
19130   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19131   ;;
19132   *)
19133   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19134 for as_dir in $PATH
19135 do
19136   IFS=$as_save_IFS
19137   test -z "$as_dir" && as_dir=.
19138     for ac_exec_ext in '' $ac_executable_extensions; do
19139   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19140     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19141     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19142     break 2
19143   fi
19144 done
19145   done
19146 IFS=$as_save_IFS
19147 
19148   ;;
19149 esac
19150 fi
19151 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19152 if test -n "$CHECK_GMAKE"; then
19153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19154 $as_echo "$CHECK_GMAKE" >&6; }
19155 else
19156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19157 $as_echo "no" >&6; }
19158 fi
19159 
19160 
19161   test -n "$CHECK_GMAKE" && break
19162 done
19163 
19164 
19165   MAKE_CANDIDATE=""$CHECK_GMAKE""
19166   DESCRIPTION="gmake in PATH"
19167 
19168   # On Cygwin, we require a newer version of make than on other platforms
19169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19170     MAKE_VERSION_EXPR="-e 4\."
19171     MAKE_REQUIRED_VERSION="4.0"
19172    else
19173     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19174     MAKE_REQUIRED_VERSION="3.81"
19175   fi
19176 
19177   if test "x$MAKE_CANDIDATE" != x; then
19178     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19179 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19180     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19181     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19182     if test "x$IS_GNU_MAKE" = x; then
19183       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19184 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19185     else
19186       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19187       if test "x$IS_MODERN_MAKE" = x; then
19188         { $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
19189 $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;}
19190       else
19191         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19192           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19193             MAKE_EXPECTED_ENV='cygwin'
19194           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19195             MAKE_EXPECTED_ENV='msys'
19196           else
19197             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19198           fi
19199           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19200           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19201         else
19202           # Not relevant for non-Windows
19203           IS_MAKE_CORRECT_ENV=true
19204         fi
19205         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19206           { $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
19207 $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;}
19208         else
19209           FOUND_MAKE=$MAKE_CANDIDATE
19210 
19211   # Only process if variable expands to non-empty
19212 
19213   if test "x$FOUND_MAKE" != x; then
19214     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19215 
19216   # First separate the path from the arguments. This will split at the first
19217   # space.
19218   complete="$FOUND_MAKE"
19219   path="${complete%% *}"
19220   tmp="$complete EOL"
19221   arguments="${tmp#* }"
19222 
19223   # Input might be given as Windows format, start by converting to
19224   # unix format.
19225   new_path=`$CYGPATH -u "$path"`
19226 
19227   # Now try to locate executable using which
19228   new_path=`$WHICH "$new_path" 2> /dev/null`
19229   # bat and cmd files are not always considered executable in cygwin causing which
19230   # to not find them
19231   if test "x$new_path" = x \
19232       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19233       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19234     new_path=`$CYGPATH -u "$path"`
19235   fi
19236   if test "x$new_path" = x; then
19237     # Oops. Which didn't find the executable.
19238     # The splitting of arguments from the executable at a space might have been incorrect,
19239     # since paths with space are more likely in Windows. Give it another try with the whole
19240     # argument.
19241     path="$complete"
19242     arguments="EOL"
19243     new_path=`$CYGPATH -u "$path"`
19244     new_path=`$WHICH "$new_path" 2> /dev/null`
19245     # bat and cmd files are not always considered executable in cygwin causing which
19246     # to not find them
19247     if test "x$new_path" = x \
19248         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19249         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19250       new_path=`$CYGPATH -u "$path"`
19251     fi
19252     if test "x$new_path" = x; then
19253       # It's still not found. Now this is an unrecoverable error.
19254       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19255 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19256       has_space=`$ECHO "$complete" | $GREP " "`
19257       if test "x$has_space" != x; then
19258         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19259 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19260       fi
19261       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19262     fi
19263   fi
19264 
19265   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19266   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19267   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19268   # "foo.exe" is OK but "foo" is an error.
19269   #
19270   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19271   # It is also a way to make sure we got the proper file name for the real test later on.
19272   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19273   if test "x$test_shortpath" = x; then
19274     # Short path failed, file does not exist as specified.
19275     # Try adding .exe or .cmd
19276     if test -f "${new_path}.exe"; then
19277       input_to_shortpath="${new_path}.exe"
19278     elif test -f "${new_path}.cmd"; then
19279       input_to_shortpath="${new_path}.cmd"
19280     else
19281       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19282 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19283       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19284 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19285       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19286     fi
19287   else
19288     input_to_shortpath="$new_path"
19289   fi
19290 
19291   # Call helper function which possibly converts this using DOS-style short mode.
19292   # If so, the updated path is stored in $new_path.
19293   new_path="$input_to_shortpath"
19294 
19295   input_path="$input_to_shortpath"
19296   # Check if we need to convert this using DOS-style short mode. If the path
19297   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19298   # take no chances and rewrite it.
19299   # Note: m4 eats our [], so we need to use [ and ] instead.
19300   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19301   if test "x$has_forbidden_chars" != x; then
19302     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19303     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19304     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19305     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19306       # Going to short mode and back again did indeed matter. Since short mode is
19307       # case insensitive, let's make it lowercase to improve readability.
19308       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19309       # Now convert it back to Unix-style (cygpath)
19310       input_path=`$CYGPATH -u "$shortmode_path"`
19311       new_path="$input_path"
19312     fi
19313   fi
19314 
19315   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19316   if test "x$test_cygdrive_prefix" = x; then
19317     # As a simple fix, exclude /usr/bin since it's not a real path.
19318     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19319       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19320       # a path prefixed by /cygdrive for fixpath to work.
19321       new_path="$CYGWIN_ROOT_PATH$input_path"
19322     fi
19323   fi
19324 
19325   # remove trailing .exe if any
19326   new_path="${new_path/%.exe/}"
19327 
19328     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19329 
19330   # First separate the path from the arguments. This will split at the first
19331   # space.
19332   complete="$FOUND_MAKE"
19333   path="${complete%% *}"
19334   tmp="$complete EOL"
19335   arguments="${tmp#* }"
19336 
19337   # Input might be given as Windows format, start by converting to
19338   # unix format.
19339   new_path="$path"
19340 
19341   windows_path="$new_path"
19342   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19343     unix_path=`$CYGPATH -u "$windows_path"`
19344     new_path="$unix_path"
19345   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19346     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19347     new_path="$unix_path"
19348   fi
19349 
19350 
19351   # Now try to locate executable using which
19352   new_path=`$WHICH "$new_path" 2> /dev/null`
19353 
19354   if test "x$new_path" = x; then
19355     # Oops. Which didn't find the executable.
19356     # The splitting of arguments from the executable at a space might have been incorrect,
19357     # since paths with space are more likely in Windows. Give it another try with the whole
19358     # argument.
19359     path="$complete"
19360     arguments="EOL"
19361     new_path="$path"
19362 
19363   windows_path="$new_path"
19364   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19365     unix_path=`$CYGPATH -u "$windows_path"`
19366     new_path="$unix_path"
19367   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19368     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19369     new_path="$unix_path"
19370   fi
19371 
19372 
19373     new_path=`$WHICH "$new_path" 2> /dev/null`
19374     # bat and cmd files are not always considered executable in MSYS causing which
19375     # to not find them
19376     if test "x$new_path" = x \
19377         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19378         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19379       new_path="$path"
19380 
19381   windows_path="$new_path"
19382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19383     unix_path=`$CYGPATH -u "$windows_path"`
19384     new_path="$unix_path"
19385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19386     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19387     new_path="$unix_path"
19388   fi
19389 
19390     fi
19391 
19392     if test "x$new_path" = x; then
19393       # It's still not found. Now this is an unrecoverable error.
19394       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19395 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19396       has_space=`$ECHO "$complete" | $GREP " "`
19397       if test "x$has_space" != x; then
19398         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19399 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19400       fi
19401       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19402     fi
19403   fi
19404 
19405   # Now new_path has a complete unix path to the binary
19406   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19407     # Keep paths in /bin as-is, but remove trailing .exe if any
19408     new_path="${new_path/%.exe/}"
19409     # Do not save /bin paths to all_fixpath_prefixes!
19410   else
19411     # Not in mixed or Windows style, start by that.
19412     new_path=`cmd //c echo $new_path`
19413 
19414   input_path="$new_path"
19415   # Check if we need to convert this using DOS-style short mode. If the path
19416   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19417   # take no chances and rewrite it.
19418   # Note: m4 eats our [], so we need to use [ and ] instead.
19419   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19420   if test "x$has_forbidden_chars" != x; then
19421     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19422     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19423   fi
19424 
19425     # Output is in $new_path
19426 
19427   windows_path="$new_path"
19428   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19429     unix_path=`$CYGPATH -u "$windows_path"`
19430     new_path="$unix_path"
19431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19432     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19433     new_path="$unix_path"
19434   fi
19435 
19436     # remove trailing .exe if any
19437     new_path="${new_path/%.exe/}"
19438 
19439     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19440     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19441   fi
19442 
19443     else
19444       # We're on a unix platform. Hooray! :)
19445       # First separate the path from the arguments. This will split at the first
19446       # space.
19447       complete="$FOUND_MAKE"
19448       path="${complete%% *}"
19449       tmp="$complete EOL"
19450       arguments="${tmp#* }"
19451 
19452       # Cannot rely on the command "which" here since it doesn't always work.
19453       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19454       if test -z "$is_absolute_path"; then
19455         # Path to executable is not absolute. Find it.
19456         IFS_save="$IFS"
19457         IFS=:
19458         for p in $PATH; do
19459           if test -f "$p/$path" && test -x "$p/$path"; then
19460             new_path="$p/$path"
19461             break
19462           fi
19463         done
19464         IFS="$IFS_save"
19465       else
19466         # This is an absolute path, we can use it without further modifications.
19467         new_path="$path"
19468       fi
19469 
19470       if test "x$new_path" = x; then
19471         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19472 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19473         has_space=`$ECHO "$complete" | $GREP " "`
19474         if test "x$has_space" != x; then
19475           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19476 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19477         fi
19478         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19479       fi
19480     fi
19481 
19482     # Now join together the path and the arguments once again
19483     if test "x$arguments" != xEOL; then
19484       new_complete="$new_path ${arguments% *}"
19485     else
19486       new_complete="$new_path"
19487     fi
19488 
19489     if test "x$complete" != "x$new_complete"; then
19490       FOUND_MAKE="$new_complete"
19491       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19492 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19493     fi
19494   fi
19495 
19496         fi
19497       fi
19498     fi
19499   fi
19500 
19501 
19502     if test "x$FOUND_MAKE" = x; then
19503       for ac_prog in make
19504 do
19505   # Extract the first word of "$ac_prog", so it can be a program name with args.
19506 set dummy $ac_prog; ac_word=$2
19507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19508 $as_echo_n "checking for $ac_word... " >&6; }
19509 if ${ac_cv_path_CHECK_MAKE+:} false; then :
19510   $as_echo_n "(cached) " >&6
19511 else
19512   case $CHECK_MAKE in
19513   [\\/]* | ?:[\\/]*)
19514   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19515   ;;
19516   *)
19517   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19518 for as_dir in $PATH
19519 do
19520   IFS=$as_save_IFS
19521   test -z "$as_dir" && as_dir=.
19522     for ac_exec_ext in '' $ac_executable_extensions; do
19523   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19524     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19526     break 2
19527   fi
19528 done
19529   done
19530 IFS=$as_save_IFS
19531 
19532   ;;
19533 esac
19534 fi
19535 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19536 if test -n "$CHECK_MAKE"; then
19537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19538 $as_echo "$CHECK_MAKE" >&6; }
19539 else
19540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19541 $as_echo "no" >&6; }
19542 fi
19543 
19544 
19545   test -n "$CHECK_MAKE" && break
19546 done
19547 
19548 
19549   MAKE_CANDIDATE=""$CHECK_MAKE""
19550   DESCRIPTION="make in PATH"
19551 
19552   # On Cygwin, we require a newer version of make than on other platforms
19553   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19554     MAKE_VERSION_EXPR="-e 4\."
19555     MAKE_REQUIRED_VERSION="4.0"
19556    else
19557     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19558     MAKE_REQUIRED_VERSION="3.81"
19559   fi
19560 
19561   if test "x$MAKE_CANDIDATE" != x; then
19562     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19563 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19564     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19565     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19566     if test "x$IS_GNU_MAKE" = x; then
19567       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19568 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19569     else
19570       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19571       if test "x$IS_MODERN_MAKE" = x; then
19572         { $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
19573 $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;}
19574       else
19575         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19576           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19577             MAKE_EXPECTED_ENV='cygwin'
19578           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19579             MAKE_EXPECTED_ENV='msys'
19580           else
19581             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19582           fi
19583           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19584           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19585         else
19586           # Not relevant for non-Windows
19587           IS_MAKE_CORRECT_ENV=true
19588         fi
19589         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19590           { $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
19591 $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;}
19592         else
19593           FOUND_MAKE=$MAKE_CANDIDATE
19594 
19595   # Only process if variable expands to non-empty
19596 
19597   if test "x$FOUND_MAKE" != x; then
19598     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19599 
19600   # First separate the path from the arguments. This will split at the first
19601   # space.
19602   complete="$FOUND_MAKE"
19603   path="${complete%% *}"
19604   tmp="$complete EOL"
19605   arguments="${tmp#* }"
19606 
19607   # Input might be given as Windows format, start by converting to
19608   # unix format.
19609   new_path=`$CYGPATH -u "$path"`
19610 
19611   # Now try to locate executable using which
19612   new_path=`$WHICH "$new_path" 2> /dev/null`
19613   # bat and cmd files are not always considered executable in cygwin causing which
19614   # to not find them
19615   if test "x$new_path" = x \
19616       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19617       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19618     new_path=`$CYGPATH -u "$path"`
19619   fi
19620   if test "x$new_path" = x; then
19621     # Oops. Which didn't find the executable.
19622     # The splitting of arguments from the executable at a space might have been incorrect,
19623     # since paths with space are more likely in Windows. Give it another try with the whole
19624     # argument.
19625     path="$complete"
19626     arguments="EOL"
19627     new_path=`$CYGPATH -u "$path"`
19628     new_path=`$WHICH "$new_path" 2> /dev/null`
19629     # bat and cmd files are not always considered executable in cygwin causing which
19630     # to not find them
19631     if test "x$new_path" = x \
19632         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19633         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19634       new_path=`$CYGPATH -u "$path"`
19635     fi
19636     if test "x$new_path" = x; then
19637       # It's still not found. Now this is an unrecoverable error.
19638       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19639 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19640       has_space=`$ECHO "$complete" | $GREP " "`
19641       if test "x$has_space" != x; then
19642         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19643 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19644       fi
19645       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19646     fi
19647   fi
19648 
19649   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19650   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19651   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19652   # "foo.exe" is OK but "foo" is an error.
19653   #
19654   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19655   # It is also a way to make sure we got the proper file name for the real test later on.
19656   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19657   if test "x$test_shortpath" = x; then
19658     # Short path failed, file does not exist as specified.
19659     # Try adding .exe or .cmd
19660     if test -f "${new_path}.exe"; then
19661       input_to_shortpath="${new_path}.exe"
19662     elif test -f "${new_path}.cmd"; then
19663       input_to_shortpath="${new_path}.cmd"
19664     else
19665       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19666 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19667       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19668 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19669       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19670     fi
19671   else
19672     input_to_shortpath="$new_path"
19673   fi
19674 
19675   # Call helper function which possibly converts this using DOS-style short mode.
19676   # If so, the updated path is stored in $new_path.
19677   new_path="$input_to_shortpath"
19678 
19679   input_path="$input_to_shortpath"
19680   # Check if we need to convert this using DOS-style short mode. If the path
19681   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19682   # take no chances and rewrite it.
19683   # Note: m4 eats our [], so we need to use [ and ] instead.
19684   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19685   if test "x$has_forbidden_chars" != x; then
19686     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19687     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19688     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19689     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19690       # Going to short mode and back again did indeed matter. Since short mode is
19691       # case insensitive, let's make it lowercase to improve readability.
19692       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19693       # Now convert it back to Unix-style (cygpath)
19694       input_path=`$CYGPATH -u "$shortmode_path"`
19695       new_path="$input_path"
19696     fi
19697   fi
19698 
19699   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19700   if test "x$test_cygdrive_prefix" = x; then
19701     # As a simple fix, exclude /usr/bin since it's not a real path.
19702     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19703       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19704       # a path prefixed by /cygdrive for fixpath to work.
19705       new_path="$CYGWIN_ROOT_PATH$input_path"
19706     fi
19707   fi
19708 
19709   # remove trailing .exe if any
19710   new_path="${new_path/%.exe/}"
19711 
19712     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19713 
19714   # First separate the path from the arguments. This will split at the first
19715   # space.
19716   complete="$FOUND_MAKE"
19717   path="${complete%% *}"
19718   tmp="$complete EOL"
19719   arguments="${tmp#* }"
19720 
19721   # Input might be given as Windows format, start by converting to
19722   # unix format.
19723   new_path="$path"
19724 
19725   windows_path="$new_path"
19726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19727     unix_path=`$CYGPATH -u "$windows_path"`
19728     new_path="$unix_path"
19729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19731     new_path="$unix_path"
19732   fi
19733 
19734 
19735   # Now try to locate executable using which
19736   new_path=`$WHICH "$new_path" 2> /dev/null`
19737 
19738   if test "x$new_path" = x; then
19739     # Oops. Which didn't find the executable.
19740     # The splitting of arguments from the executable at a space might have been incorrect,
19741     # since paths with space are more likely in Windows. Give it another try with the whole
19742     # argument.
19743     path="$complete"
19744     arguments="EOL"
19745     new_path="$path"
19746 
19747   windows_path="$new_path"
19748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19749     unix_path=`$CYGPATH -u "$windows_path"`
19750     new_path="$unix_path"
19751   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19752     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19753     new_path="$unix_path"
19754   fi
19755 
19756 
19757     new_path=`$WHICH "$new_path" 2> /dev/null`
19758     # bat and cmd files are not always considered executable in MSYS causing which
19759     # to not find them
19760     if test "x$new_path" = x \
19761         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19762         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19763       new_path="$path"
19764 
19765   windows_path="$new_path"
19766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19767     unix_path=`$CYGPATH -u "$windows_path"`
19768     new_path="$unix_path"
19769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19770     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19771     new_path="$unix_path"
19772   fi
19773 
19774     fi
19775 
19776     if test "x$new_path" = x; then
19777       # It's still not found. Now this is an unrecoverable error.
19778       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19779 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19780       has_space=`$ECHO "$complete" | $GREP " "`
19781       if test "x$has_space" != x; then
19782         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19783 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19784       fi
19785       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19786     fi
19787   fi
19788 
19789   # Now new_path has a complete unix path to the binary
19790   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19791     # Keep paths in /bin as-is, but remove trailing .exe if any
19792     new_path="${new_path/%.exe/}"
19793     # Do not save /bin paths to all_fixpath_prefixes!
19794   else
19795     # Not in mixed or Windows style, start by that.
19796     new_path=`cmd //c echo $new_path`
19797 
19798   input_path="$new_path"
19799   # Check if we need to convert this using DOS-style short mode. If the path
19800   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19801   # take no chances and rewrite it.
19802   # Note: m4 eats our [], so we need to use [ and ] instead.
19803   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19804   if test "x$has_forbidden_chars" != x; then
19805     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19806     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19807   fi
19808 
19809     # Output is in $new_path
19810 
19811   windows_path="$new_path"
19812   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19813     unix_path=`$CYGPATH -u "$windows_path"`
19814     new_path="$unix_path"
19815   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19816     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19817     new_path="$unix_path"
19818   fi
19819 
19820     # remove trailing .exe if any
19821     new_path="${new_path/%.exe/}"
19822 
19823     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19824     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19825   fi
19826 
19827     else
19828       # We're on a unix platform. Hooray! :)
19829       # First separate the path from the arguments. This will split at the first
19830       # space.
19831       complete="$FOUND_MAKE"
19832       path="${complete%% *}"
19833       tmp="$complete EOL"
19834       arguments="${tmp#* }"
19835 
19836       # Cannot rely on the command "which" here since it doesn't always work.
19837       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19838       if test -z "$is_absolute_path"; then
19839         # Path to executable is not absolute. Find it.
19840         IFS_save="$IFS"
19841         IFS=:
19842         for p in $PATH; do
19843           if test -f "$p/$path" && test -x "$p/$path"; then
19844             new_path="$p/$path"
19845             break
19846           fi
19847         done
19848         IFS="$IFS_save"
19849       else
19850         # This is an absolute path, we can use it without further modifications.
19851         new_path="$path"
19852       fi
19853 
19854       if test "x$new_path" = x; then
19855         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19856 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19857         has_space=`$ECHO "$complete" | $GREP " "`
19858         if test "x$has_space" != x; then
19859           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19860 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19861         fi
19862         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19863       fi
19864     fi
19865 
19866     # Now join together the path and the arguments once again
19867     if test "x$arguments" != xEOL; then
19868       new_complete="$new_path ${arguments% *}"
19869     else
19870       new_complete="$new_path"
19871     fi
19872 
19873     if test "x$complete" != "x$new_complete"; then
19874       FOUND_MAKE="$new_complete"
19875       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19876 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19877     fi
19878   fi
19879 
19880         fi
19881       fi
19882     fi
19883   fi
19884 
19885     fi
19886 
19887     if test "x$FOUND_MAKE" = x; then
19888       if test "x$TOOLCHAIN_PATH" != x; then
19889         # We have a toolchain path, check that as well before giving up.
19890         OLD_PATH=$PATH
19891         PATH=$TOOLCHAIN_PATH:$PATH
19892         for ac_prog in gmake
19893 do
19894   # Extract the first word of "$ac_prog", so it can be a program name with args.
19895 set dummy $ac_prog; ac_word=$2
19896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19897 $as_echo_n "checking for $ac_word... " >&6; }
19898 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19899   $as_echo_n "(cached) " >&6
19900 else
19901   case $CHECK_TOOLSDIR_GMAKE in
19902   [\\/]* | ?:[\\/]*)
19903   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19904   ;;
19905   *)
19906   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19907 for as_dir in $PATH
19908 do
19909   IFS=$as_save_IFS
19910   test -z "$as_dir" && as_dir=.
19911     for ac_exec_ext in '' $ac_executable_extensions; do
19912   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19913     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19914     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19915     break 2
19916   fi
19917 done
19918   done
19919 IFS=$as_save_IFS
19920 
19921   ;;
19922 esac
19923 fi
19924 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19925 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19927 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19928 else
19929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19930 $as_echo "no" >&6; }
19931 fi
19932 
19933 
19934   test -n "$CHECK_TOOLSDIR_GMAKE" && break
19935 done
19936 
19937 
19938   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19939   DESCRIPTION="gmake in tools-dir"
19940 
19941   # On Cygwin, we require a newer version of make than on other platforms
19942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19943     MAKE_VERSION_EXPR="-e 4\."
19944     MAKE_REQUIRED_VERSION="4.0"
19945    else
19946     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19947     MAKE_REQUIRED_VERSION="3.81"
19948   fi
19949 
19950   if test "x$MAKE_CANDIDATE" != x; then
19951     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19952 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19953     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19954     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19955     if test "x$IS_GNU_MAKE" = x; then
19956       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19957 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19958     else
19959       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19960       if test "x$IS_MODERN_MAKE" = x; then
19961         { $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
19962 $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;}
19963       else
19964         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19965           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19966             MAKE_EXPECTED_ENV='cygwin'
19967           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19968             MAKE_EXPECTED_ENV='msys'
19969           else
19970             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19971           fi
19972           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19973           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19974         else
19975           # Not relevant for non-Windows
19976           IS_MAKE_CORRECT_ENV=true
19977         fi
19978         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19979           { $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
19980 $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;}
19981         else
19982           FOUND_MAKE=$MAKE_CANDIDATE
19983 
19984   # Only process if variable expands to non-empty
19985 
19986   if test "x$FOUND_MAKE" != x; then
19987     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19988 
19989   # First separate the path from the arguments. This will split at the first
19990   # space.
19991   complete="$FOUND_MAKE"
19992   path="${complete%% *}"
19993   tmp="$complete EOL"
19994   arguments="${tmp#* }"
19995 
19996   # Input might be given as Windows format, start by converting to
19997   # unix format.
19998   new_path=`$CYGPATH -u "$path"`
19999 
20000   # Now try to locate executable using which
20001   new_path=`$WHICH "$new_path" 2> /dev/null`
20002   # bat and cmd files are not always considered executable in cygwin causing which
20003   # to not find them
20004   if test "x$new_path" = x \
20005       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20006       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20007     new_path=`$CYGPATH -u "$path"`
20008   fi
20009   if test "x$new_path" = x; then
20010     # Oops. Which didn't find the executable.
20011     # The splitting of arguments from the executable at a space might have been incorrect,
20012     # since paths with space are more likely in Windows. Give it another try with the whole
20013     # argument.
20014     path="$complete"
20015     arguments="EOL"
20016     new_path=`$CYGPATH -u "$path"`
20017     new_path=`$WHICH "$new_path" 2> /dev/null`
20018     # bat and cmd files are not always considered executable in cygwin causing which
20019     # to not find them
20020     if test "x$new_path" = x \
20021         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20022         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20023       new_path=`$CYGPATH -u "$path"`
20024     fi
20025     if test "x$new_path" = x; then
20026       # It's still not found. Now this is an unrecoverable error.
20027       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20028 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20029       has_space=`$ECHO "$complete" | $GREP " "`
20030       if test "x$has_space" != x; then
20031         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20032 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20033       fi
20034       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20035     fi
20036   fi
20037 
20038   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20039   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20040   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20041   # "foo.exe" is OK but "foo" is an error.
20042   #
20043   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20044   # It is also a way to make sure we got the proper file name for the real test later on.
20045   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20046   if test "x$test_shortpath" = x; then
20047     # Short path failed, file does not exist as specified.
20048     # Try adding .exe or .cmd
20049     if test -f "${new_path}.exe"; then
20050       input_to_shortpath="${new_path}.exe"
20051     elif test -f "${new_path}.cmd"; then
20052       input_to_shortpath="${new_path}.cmd"
20053     else
20054       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20055 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20056       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20057 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20058       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20059     fi
20060   else
20061     input_to_shortpath="$new_path"
20062   fi
20063 
20064   # Call helper function which possibly converts this using DOS-style short mode.
20065   # If so, the updated path is stored in $new_path.
20066   new_path="$input_to_shortpath"
20067 
20068   input_path="$input_to_shortpath"
20069   # Check if we need to convert this using DOS-style short mode. If the path
20070   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20071   # take no chances and rewrite it.
20072   # Note: m4 eats our [], so we need to use [ and ] instead.
20073   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20074   if test "x$has_forbidden_chars" != x; then
20075     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20076     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20077     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20078     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20079       # Going to short mode and back again did indeed matter. Since short mode is
20080       # case insensitive, let's make it lowercase to improve readability.
20081       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20082       # Now convert it back to Unix-style (cygpath)
20083       input_path=`$CYGPATH -u "$shortmode_path"`
20084       new_path="$input_path"
20085     fi
20086   fi
20087 
20088   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20089   if test "x$test_cygdrive_prefix" = x; then
20090     # As a simple fix, exclude /usr/bin since it's not a real path.
20091     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20092       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20093       # a path prefixed by /cygdrive for fixpath to work.
20094       new_path="$CYGWIN_ROOT_PATH$input_path"
20095     fi
20096   fi
20097 
20098   # remove trailing .exe if any
20099   new_path="${new_path/%.exe/}"
20100 
20101     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20102 
20103   # First separate the path from the arguments. This will split at the first
20104   # space.
20105   complete="$FOUND_MAKE"
20106   path="${complete%% *}"
20107   tmp="$complete EOL"
20108   arguments="${tmp#* }"
20109 
20110   # Input might be given as Windows format, start by converting to
20111   # unix format.
20112   new_path="$path"
20113 
20114   windows_path="$new_path"
20115   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20116     unix_path=`$CYGPATH -u "$windows_path"`
20117     new_path="$unix_path"
20118   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20119     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20120     new_path="$unix_path"
20121   fi
20122 
20123 
20124   # Now try to locate executable using which
20125   new_path=`$WHICH "$new_path" 2> /dev/null`
20126 
20127   if test "x$new_path" = x; then
20128     # Oops. Which didn't find the executable.
20129     # The splitting of arguments from the executable at a space might have been incorrect,
20130     # since paths with space are more likely in Windows. Give it another try with the whole
20131     # argument.
20132     path="$complete"
20133     arguments="EOL"
20134     new_path="$path"
20135 
20136   windows_path="$new_path"
20137   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20138     unix_path=`$CYGPATH -u "$windows_path"`
20139     new_path="$unix_path"
20140   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20141     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20142     new_path="$unix_path"
20143   fi
20144 
20145 
20146     new_path=`$WHICH "$new_path" 2> /dev/null`
20147     # bat and cmd files are not always considered executable in MSYS causing which
20148     # to not find them
20149     if test "x$new_path" = x \
20150         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20151         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20152       new_path="$path"
20153 
20154   windows_path="$new_path"
20155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20156     unix_path=`$CYGPATH -u "$windows_path"`
20157     new_path="$unix_path"
20158   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20159     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20160     new_path="$unix_path"
20161   fi
20162 
20163     fi
20164 
20165     if test "x$new_path" = x; then
20166       # It's still not found. Now this is an unrecoverable error.
20167       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20168 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20169       has_space=`$ECHO "$complete" | $GREP " "`
20170       if test "x$has_space" != x; then
20171         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20172 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20173       fi
20174       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20175     fi
20176   fi
20177 
20178   # Now new_path has a complete unix path to the binary
20179   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20180     # Keep paths in /bin as-is, but remove trailing .exe if any
20181     new_path="${new_path/%.exe/}"
20182     # Do not save /bin paths to all_fixpath_prefixes!
20183   else
20184     # Not in mixed or Windows style, start by that.
20185     new_path=`cmd //c echo $new_path`
20186 
20187   input_path="$new_path"
20188   # Check if we need to convert this using DOS-style short mode. If the path
20189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20190   # take no chances and rewrite it.
20191   # Note: m4 eats our [], so we need to use [ and ] instead.
20192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20193   if test "x$has_forbidden_chars" != x; then
20194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20195     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20196   fi
20197 
20198     # Output is in $new_path
20199 
20200   windows_path="$new_path"
20201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20202     unix_path=`$CYGPATH -u "$windows_path"`
20203     new_path="$unix_path"
20204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20206     new_path="$unix_path"
20207   fi
20208 
20209     # remove trailing .exe if any
20210     new_path="${new_path/%.exe/}"
20211 
20212     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20213     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20214   fi
20215 
20216     else
20217       # We're on a unix platform. Hooray! :)
20218       # First separate the path from the arguments. This will split at the first
20219       # space.
20220       complete="$FOUND_MAKE"
20221       path="${complete%% *}"
20222       tmp="$complete EOL"
20223       arguments="${tmp#* }"
20224 
20225       # Cannot rely on the command "which" here since it doesn't always work.
20226       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20227       if test -z "$is_absolute_path"; then
20228         # Path to executable is not absolute. Find it.
20229         IFS_save="$IFS"
20230         IFS=:
20231         for p in $PATH; do
20232           if test -f "$p/$path" && test -x "$p/$path"; then
20233             new_path="$p/$path"
20234             break
20235           fi
20236         done
20237         IFS="$IFS_save"
20238       else
20239         # This is an absolute path, we can use it without further modifications.
20240         new_path="$path"
20241       fi
20242 
20243       if test "x$new_path" = x; then
20244         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20245 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20246         has_space=`$ECHO "$complete" | $GREP " "`
20247         if test "x$has_space" != x; then
20248           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20249 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20250         fi
20251         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20252       fi
20253     fi
20254 
20255     # Now join together the path and the arguments once again
20256     if test "x$arguments" != xEOL; then
20257       new_complete="$new_path ${arguments% *}"
20258     else
20259       new_complete="$new_path"
20260     fi
20261 
20262     if test "x$complete" != "x$new_complete"; then
20263       FOUND_MAKE="$new_complete"
20264       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20265 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20266     fi
20267   fi
20268 
20269         fi
20270       fi
20271     fi
20272   fi
20273 
20274         if test "x$FOUND_MAKE" = x; then
20275           for ac_prog in make
20276 do
20277   # Extract the first word of "$ac_prog", so it can be a program name with args.
20278 set dummy $ac_prog; ac_word=$2
20279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20280 $as_echo_n "checking for $ac_word... " >&6; }
20281 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20282   $as_echo_n "(cached) " >&6
20283 else
20284   case $CHECK_TOOLSDIR_MAKE in
20285   [\\/]* | ?:[\\/]*)
20286   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20287   ;;
20288   *)
20289   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20290 for as_dir in $PATH
20291 do
20292   IFS=$as_save_IFS
20293   test -z "$as_dir" && as_dir=.
20294     for ac_exec_ext in '' $ac_executable_extensions; do
20295   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20296     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20297     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20298     break 2
20299   fi
20300 done
20301   done
20302 IFS=$as_save_IFS
20303 
20304   ;;
20305 esac
20306 fi
20307 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20308 if test -n "$CHECK_TOOLSDIR_MAKE"; then
20309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20310 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20311 else
20312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20313 $as_echo "no" >&6; }
20314 fi
20315 
20316 
20317   test -n "$CHECK_TOOLSDIR_MAKE" && break
20318 done
20319 
20320 
20321   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20322   DESCRIPTION="make in tools-dir"
20323 
20324   # On Cygwin, we require a newer version of make than on other platforms
20325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20326     MAKE_VERSION_EXPR="-e 4\."
20327     MAKE_REQUIRED_VERSION="4.0"
20328    else
20329     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20330     MAKE_REQUIRED_VERSION="3.81"
20331   fi
20332 
20333   if test "x$MAKE_CANDIDATE" != x; then
20334     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20335 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20336     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20337     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20338     if test "x$IS_GNU_MAKE" = x; then
20339       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20340 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20341     else
20342       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20343       if test "x$IS_MODERN_MAKE" = x; then
20344         { $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
20345 $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;}
20346       else
20347         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20348           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20349             MAKE_EXPECTED_ENV='cygwin'
20350           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20351             MAKE_EXPECTED_ENV='msys'
20352           else
20353             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20354           fi
20355           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20356           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20357         else
20358           # Not relevant for non-Windows
20359           IS_MAKE_CORRECT_ENV=true
20360         fi
20361         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20362           { $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
20363 $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;}
20364         else
20365           FOUND_MAKE=$MAKE_CANDIDATE
20366 
20367   # Only process if variable expands to non-empty
20368 
20369   if test "x$FOUND_MAKE" != x; then
20370     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20371 
20372   # First separate the path from the arguments. This will split at the first
20373   # space.
20374   complete="$FOUND_MAKE"
20375   path="${complete%% *}"
20376   tmp="$complete EOL"
20377   arguments="${tmp#* }"
20378 
20379   # Input might be given as Windows format, start by converting to
20380   # unix format.
20381   new_path=`$CYGPATH -u "$path"`
20382 
20383   # Now try to locate executable using which
20384   new_path=`$WHICH "$new_path" 2> /dev/null`
20385   # bat and cmd files are not always considered executable in cygwin causing which
20386   # to not find them
20387   if test "x$new_path" = x \
20388       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20389       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20390     new_path=`$CYGPATH -u "$path"`
20391   fi
20392   if test "x$new_path" = x; then
20393     # Oops. Which didn't find the executable.
20394     # The splitting of arguments from the executable at a space might have been incorrect,
20395     # since paths with space are more likely in Windows. Give it another try with the whole
20396     # argument.
20397     path="$complete"
20398     arguments="EOL"
20399     new_path=`$CYGPATH -u "$path"`
20400     new_path=`$WHICH "$new_path" 2> /dev/null`
20401     # bat and cmd files are not always considered executable in cygwin causing which
20402     # to not find them
20403     if test "x$new_path" = x \
20404         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20405         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20406       new_path=`$CYGPATH -u "$path"`
20407     fi
20408     if test "x$new_path" = x; then
20409       # It's still not found. Now this is an unrecoverable error.
20410       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20411 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20412       has_space=`$ECHO "$complete" | $GREP " "`
20413       if test "x$has_space" != x; then
20414         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20415 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20416       fi
20417       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20418     fi
20419   fi
20420 
20421   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20422   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20423   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20424   # "foo.exe" is OK but "foo" is an error.
20425   #
20426   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20427   # It is also a way to make sure we got the proper file name for the real test later on.
20428   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20429   if test "x$test_shortpath" = x; then
20430     # Short path failed, file does not exist as specified.
20431     # Try adding .exe or .cmd
20432     if test -f "${new_path}.exe"; then
20433       input_to_shortpath="${new_path}.exe"
20434     elif test -f "${new_path}.cmd"; then
20435       input_to_shortpath="${new_path}.cmd"
20436     else
20437       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20438 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20439       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20440 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20441       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20442     fi
20443   else
20444     input_to_shortpath="$new_path"
20445   fi
20446 
20447   # Call helper function which possibly converts this using DOS-style short mode.
20448   # If so, the updated path is stored in $new_path.
20449   new_path="$input_to_shortpath"
20450 
20451   input_path="$input_to_shortpath"
20452   # Check if we need to convert this using DOS-style short mode. If the path
20453   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20454   # take no chances and rewrite it.
20455   # Note: m4 eats our [], so we need to use [ and ] instead.
20456   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20457   if test "x$has_forbidden_chars" != x; then
20458     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20459     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20460     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20461     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20462       # Going to short mode and back again did indeed matter. Since short mode is
20463       # case insensitive, let's make it lowercase to improve readability.
20464       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20465       # Now convert it back to Unix-style (cygpath)
20466       input_path=`$CYGPATH -u "$shortmode_path"`
20467       new_path="$input_path"
20468     fi
20469   fi
20470 
20471   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20472   if test "x$test_cygdrive_prefix" = x; then
20473     # As a simple fix, exclude /usr/bin since it's not a real path.
20474     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20475       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20476       # a path prefixed by /cygdrive for fixpath to work.
20477       new_path="$CYGWIN_ROOT_PATH$input_path"
20478     fi
20479   fi
20480 
20481   # remove trailing .exe if any
20482   new_path="${new_path/%.exe/}"
20483 
20484     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20485 
20486   # First separate the path from the arguments. This will split at the first
20487   # space.
20488   complete="$FOUND_MAKE"
20489   path="${complete%% *}"
20490   tmp="$complete EOL"
20491   arguments="${tmp#* }"
20492 
20493   # Input might be given as Windows format, start by converting to
20494   # unix format.
20495   new_path="$path"
20496 
20497   windows_path="$new_path"
20498   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20499     unix_path=`$CYGPATH -u "$windows_path"`
20500     new_path="$unix_path"
20501   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20502     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20503     new_path="$unix_path"
20504   fi
20505 
20506 
20507   # Now try to locate executable using which
20508   new_path=`$WHICH "$new_path" 2> /dev/null`
20509 
20510   if test "x$new_path" = x; then
20511     # Oops. Which didn't find the executable.
20512     # The splitting of arguments from the executable at a space might have been incorrect,
20513     # since paths with space are more likely in Windows. Give it another try with the whole
20514     # argument.
20515     path="$complete"
20516     arguments="EOL"
20517     new_path="$path"
20518 
20519   windows_path="$new_path"
20520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20521     unix_path=`$CYGPATH -u "$windows_path"`
20522     new_path="$unix_path"
20523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20524     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20525     new_path="$unix_path"
20526   fi
20527 
20528 
20529     new_path=`$WHICH "$new_path" 2> /dev/null`
20530     # bat and cmd files are not always considered executable in MSYS causing which
20531     # to not find them
20532     if test "x$new_path" = x \
20533         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20534         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20535       new_path="$path"
20536 
20537   windows_path="$new_path"
20538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20539     unix_path=`$CYGPATH -u "$windows_path"`
20540     new_path="$unix_path"
20541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20543     new_path="$unix_path"
20544   fi
20545 
20546     fi
20547 
20548     if test "x$new_path" = x; then
20549       # It's still not found. Now this is an unrecoverable error.
20550       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20551 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20552       has_space=`$ECHO "$complete" | $GREP " "`
20553       if test "x$has_space" != x; then
20554         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20555 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20556       fi
20557       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20558     fi
20559   fi
20560 
20561   # Now new_path has a complete unix path to the binary
20562   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20563     # Keep paths in /bin as-is, but remove trailing .exe if any
20564     new_path="${new_path/%.exe/}"
20565     # Do not save /bin paths to all_fixpath_prefixes!
20566   else
20567     # Not in mixed or Windows style, start by that.
20568     new_path=`cmd //c echo $new_path`
20569 
20570   input_path="$new_path"
20571   # Check if we need to convert this using DOS-style short mode. If the path
20572   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20573   # take no chances and rewrite it.
20574   # Note: m4 eats our [], so we need to use [ and ] instead.
20575   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20576   if test "x$has_forbidden_chars" != x; then
20577     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20578     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20579   fi
20580 
20581     # Output is in $new_path
20582 
20583   windows_path="$new_path"
20584   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20585     unix_path=`$CYGPATH -u "$windows_path"`
20586     new_path="$unix_path"
20587   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20588     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20589     new_path="$unix_path"
20590   fi
20591 
20592     # remove trailing .exe if any
20593     new_path="${new_path/%.exe/}"
20594 
20595     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20596     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20597   fi
20598 
20599     else
20600       # We're on a unix platform. Hooray! :)
20601       # First separate the path from the arguments. This will split at the first
20602       # space.
20603       complete="$FOUND_MAKE"
20604       path="${complete%% *}"
20605       tmp="$complete EOL"
20606       arguments="${tmp#* }"
20607 
20608       # Cannot rely on the command "which" here since it doesn't always work.
20609       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20610       if test -z "$is_absolute_path"; then
20611         # Path to executable is not absolute. Find it.
20612         IFS_save="$IFS"
20613         IFS=:
20614         for p in $PATH; do
20615           if test -f "$p/$path" && test -x "$p/$path"; then
20616             new_path="$p/$path"
20617             break
20618           fi
20619         done
20620         IFS="$IFS_save"
20621       else
20622         # This is an absolute path, we can use it without further modifications.
20623         new_path="$path"
20624       fi
20625 
20626       if test "x$new_path" = x; then
20627         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20628 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20629         has_space=`$ECHO "$complete" | $GREP " "`
20630         if test "x$has_space" != x; then
20631           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20632 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20633         fi
20634         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20635       fi
20636     fi
20637 
20638     # Now join together the path and the arguments once again
20639     if test "x$arguments" != xEOL; then
20640       new_complete="$new_path ${arguments% *}"
20641     else
20642       new_complete="$new_path"
20643     fi
20644 
20645     if test "x$complete" != "x$new_complete"; then
20646       FOUND_MAKE="$new_complete"
20647       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20648 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20649     fi
20650   fi
20651 
20652         fi
20653       fi
20654     fi
20655   fi
20656 
20657         fi
20658         PATH=$OLD_PATH
20659       fi
20660     fi
20661 
20662     if test "x$FOUND_MAKE" = x; then
20663       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
20664     fi
20665 
20666     else
20667       # If it succeeded, then it was overridden by the user. We will use it
20668       # for the tool.
20669 
20670       # First remove it from the list of overridden variables, so we can test
20671       # for unknown variables in the end.
20672       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20673 
20674       # Check if we try to supply an empty value
20675       if test "x$MAKE" = x; then
20676         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20677 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20678         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20679 $as_echo_n "checking for MAKE... " >&6; }
20680         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20681 $as_echo "disabled" >&6; }
20682       else
20683         # Check if the provided tool contains a complete path.
20684         tool_specified="$MAKE"
20685         tool_basename="${tool_specified##*/}"
20686         if test "x$tool_basename" = "x$tool_specified"; then
20687           # A command without a complete path is provided, search $PATH.
20688           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20689 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20690           # Extract the first word of "$tool_basename", so it can be a program name with args.
20691 set dummy $tool_basename; ac_word=$2
20692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20693 $as_echo_n "checking for $ac_word... " >&6; }
20694 if ${ac_cv_path_MAKE+:} false; then :
20695   $as_echo_n "(cached) " >&6
20696 else
20697   case $MAKE in
20698   [\\/]* | ?:[\\/]*)
20699   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20700   ;;
20701   *)
20702   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20703 for as_dir in $PATH
20704 do
20705   IFS=$as_save_IFS
20706   test -z "$as_dir" && as_dir=.
20707     for ac_exec_ext in '' $ac_executable_extensions; do
20708   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20709     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20710     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20711     break 2
20712   fi
20713 done
20714   done
20715 IFS=$as_save_IFS
20716 
20717   ;;
20718 esac
20719 fi
20720 MAKE=$ac_cv_path_MAKE
20721 if test -n "$MAKE"; then
20722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20723 $as_echo "$MAKE" >&6; }
20724 else
20725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20726 $as_echo "no" >&6; }
20727 fi
20728 
20729 
20730           if test "x$MAKE" = x; then
20731             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20732           fi
20733         else
20734           # Otherwise we believe it is a complete path. Use it as it is.
20735           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20736 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20737           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20738 $as_echo_n "checking for MAKE... " >&6; }
20739           if test ! -x "$tool_specified"; then
20740             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20741 $as_echo "not found" >&6; }
20742             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20743           fi
20744           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20745 $as_echo "$tool_specified" >&6; }
20746         fi
20747       fi
20748     fi
20749 
20750     # If MAKE was set by user, verify the version
20751 
20752   MAKE_CANDIDATE=""$MAKE""
20753   DESCRIPTION="user supplied MAKE=$MAKE"
20754 
20755   # On Cygwin, we require a newer version of make than on other platforms
20756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20757     MAKE_VERSION_EXPR="-e 4\."
20758     MAKE_REQUIRED_VERSION="4.0"
20759    else
20760     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20761     MAKE_REQUIRED_VERSION="3.81"
20762   fi
20763 
20764   if test "x$MAKE_CANDIDATE" != x; then
20765     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20766 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20767     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20768     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20769     if test "x$IS_GNU_MAKE" = x; then
20770       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20771 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20772     else
20773       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20774       if test "x$IS_MODERN_MAKE" = x; then
20775         { $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
20776 $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;}
20777       else
20778         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20779           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20780             MAKE_EXPECTED_ENV='cygwin'
20781           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20782             MAKE_EXPECTED_ENV='msys'
20783           else
20784             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20785           fi
20786           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20787           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20788         else
20789           # Not relevant for non-Windows
20790           IS_MAKE_CORRECT_ENV=true
20791         fi
20792         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20793           { $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
20794 $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;}
20795         else
20796           FOUND_MAKE=$MAKE_CANDIDATE
20797 
20798   # Only process if variable expands to non-empty
20799 
20800   if test "x$FOUND_MAKE" != x; then
20801     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20802 
20803   # First separate the path from the arguments. This will split at the first
20804   # space.
20805   complete="$FOUND_MAKE"
20806   path="${complete%% *}"
20807   tmp="$complete EOL"
20808   arguments="${tmp#* }"
20809 
20810   # Input might be given as Windows format, start by converting to
20811   # unix format.
20812   new_path=`$CYGPATH -u "$path"`
20813 
20814   # Now try to locate executable using which
20815   new_path=`$WHICH "$new_path" 2> /dev/null`
20816   # bat and cmd files are not always considered executable in cygwin causing which
20817   # to not find them
20818   if test "x$new_path" = x \
20819       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20820       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20821     new_path=`$CYGPATH -u "$path"`
20822   fi
20823   if test "x$new_path" = x; then
20824     # Oops. Which didn't find the executable.
20825     # The splitting of arguments from the executable at a space might have been incorrect,
20826     # since paths with space are more likely in Windows. Give it another try with the whole
20827     # argument.
20828     path="$complete"
20829     arguments="EOL"
20830     new_path=`$CYGPATH -u "$path"`
20831     new_path=`$WHICH "$new_path" 2> /dev/null`
20832     # bat and cmd files are not always considered executable in cygwin causing which
20833     # to not find them
20834     if test "x$new_path" = x \
20835         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20836         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20837       new_path=`$CYGPATH -u "$path"`
20838     fi
20839     if test "x$new_path" = x; then
20840       # It's still not found. Now this is an unrecoverable error.
20841       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20842 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20843       has_space=`$ECHO "$complete" | $GREP " "`
20844       if test "x$has_space" != x; then
20845         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20846 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20847       fi
20848       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20849     fi
20850   fi
20851 
20852   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20853   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20854   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20855   # "foo.exe" is OK but "foo" is an error.
20856   #
20857   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20858   # It is also a way to make sure we got the proper file name for the real test later on.
20859   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20860   if test "x$test_shortpath" = x; then
20861     # Short path failed, file does not exist as specified.
20862     # Try adding .exe or .cmd
20863     if test -f "${new_path}.exe"; then
20864       input_to_shortpath="${new_path}.exe"
20865     elif test -f "${new_path}.cmd"; then
20866       input_to_shortpath="${new_path}.cmd"
20867     else
20868       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20869 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20870       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20871 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20872       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20873     fi
20874   else
20875     input_to_shortpath="$new_path"
20876   fi
20877 
20878   # Call helper function which possibly converts this using DOS-style short mode.
20879   # If so, the updated path is stored in $new_path.
20880   new_path="$input_to_shortpath"
20881 
20882   input_path="$input_to_shortpath"
20883   # Check if we need to convert this using DOS-style short mode. If the path
20884   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20885   # take no chances and rewrite it.
20886   # Note: m4 eats our [], so we need to use [ and ] instead.
20887   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20888   if test "x$has_forbidden_chars" != x; then
20889     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20890     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20891     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20892     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20893       # Going to short mode and back again did indeed matter. Since short mode is
20894       # case insensitive, let's make it lowercase to improve readability.
20895       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20896       # Now convert it back to Unix-style (cygpath)
20897       input_path=`$CYGPATH -u "$shortmode_path"`
20898       new_path="$input_path"
20899     fi
20900   fi
20901 
20902   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20903   if test "x$test_cygdrive_prefix" = x; then
20904     # As a simple fix, exclude /usr/bin since it's not a real path.
20905     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20906       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20907       # a path prefixed by /cygdrive for fixpath to work.
20908       new_path="$CYGWIN_ROOT_PATH$input_path"
20909     fi
20910   fi
20911 
20912   # remove trailing .exe if any
20913   new_path="${new_path/%.exe/}"
20914 
20915     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20916 
20917   # First separate the path from the arguments. This will split at the first
20918   # space.
20919   complete="$FOUND_MAKE"
20920   path="${complete%% *}"
20921   tmp="$complete EOL"
20922   arguments="${tmp#* }"
20923 
20924   # Input might be given as Windows format, start by converting to
20925   # unix format.
20926   new_path="$path"
20927 
20928   windows_path="$new_path"
20929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20930     unix_path=`$CYGPATH -u "$windows_path"`
20931     new_path="$unix_path"
20932   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20933     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20934     new_path="$unix_path"
20935   fi
20936 
20937 
20938   # Now try to locate executable using which
20939   new_path=`$WHICH "$new_path" 2> /dev/null`
20940 
20941   if test "x$new_path" = x; then
20942     # Oops. Which didn't find the executable.
20943     # The splitting of arguments from the executable at a space might have been incorrect,
20944     # since paths with space are more likely in Windows. Give it another try with the whole
20945     # argument.
20946     path="$complete"
20947     arguments="EOL"
20948     new_path="$path"
20949 
20950   windows_path="$new_path"
20951   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20952     unix_path=`$CYGPATH -u "$windows_path"`
20953     new_path="$unix_path"
20954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20955     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20956     new_path="$unix_path"
20957   fi
20958 
20959 
20960     new_path=`$WHICH "$new_path" 2> /dev/null`
20961     # bat and cmd files are not always considered executable in MSYS causing which
20962     # to not find them
20963     if test "x$new_path" = x \
20964         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20965         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20966       new_path="$path"
20967 
20968   windows_path="$new_path"
20969   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20970     unix_path=`$CYGPATH -u "$windows_path"`
20971     new_path="$unix_path"
20972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20973     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20974     new_path="$unix_path"
20975   fi
20976 
20977     fi
20978 
20979     if test "x$new_path" = x; then
20980       # It's still not found. Now this is an unrecoverable error.
20981       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20982 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20983       has_space=`$ECHO "$complete" | $GREP " "`
20984       if test "x$has_space" != x; then
20985         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20986 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20987       fi
20988       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20989     fi
20990   fi
20991 
20992   # Now new_path has a complete unix path to the binary
20993   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20994     # Keep paths in /bin as-is, but remove trailing .exe if any
20995     new_path="${new_path/%.exe/}"
20996     # Do not save /bin paths to all_fixpath_prefixes!
20997   else
20998     # Not in mixed or Windows style, start by that.
20999     new_path=`cmd //c echo $new_path`
21000 
21001   input_path="$new_path"
21002   # Check if we need to convert this using DOS-style short mode. If the path
21003   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21004   # take no chances and rewrite it.
21005   # Note: m4 eats our [], so we need to use [ and ] instead.
21006   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21007   if test "x$has_forbidden_chars" != x; then
21008     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21009     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21010   fi
21011 
21012     # Output is in $new_path
21013 
21014   windows_path="$new_path"
21015   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21016     unix_path=`$CYGPATH -u "$windows_path"`
21017     new_path="$unix_path"
21018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21019     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21020     new_path="$unix_path"
21021   fi
21022 
21023     # remove trailing .exe if any
21024     new_path="${new_path/%.exe/}"
21025 
21026     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21027     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21028   fi
21029 
21030     else
21031       # We're on a unix platform. Hooray! :)
21032       # First separate the path from the arguments. This will split at the first
21033       # space.
21034       complete="$FOUND_MAKE"
21035       path="${complete%% *}"
21036       tmp="$complete EOL"
21037       arguments="${tmp#* }"
21038 
21039       # Cannot rely on the command "which" here since it doesn't always work.
21040       is_absolute_path=`$ECHO "$path" | $GREP ^/`
21041       if test -z "$is_absolute_path"; then
21042         # Path to executable is not absolute. Find it.
21043         IFS_save="$IFS"
21044         IFS=:
21045         for p in $PATH; do
21046           if test -f "$p/$path" && test -x "$p/$path"; then
21047             new_path="$p/$path"
21048             break
21049           fi
21050         done
21051         IFS="$IFS_save"
21052       else
21053         # This is an absolute path, we can use it without further modifications.
21054         new_path="$path"
21055       fi
21056 
21057       if test "x$new_path" = x; then
21058         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21059 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21060         has_space=`$ECHO "$complete" | $GREP " "`
21061         if test "x$has_space" != x; then
21062           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21063 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21064         fi
21065         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21066       fi
21067     fi
21068 
21069     # Now join together the path and the arguments once again
21070     if test "x$arguments" != xEOL; then
21071       new_complete="$new_path ${arguments% *}"
21072     else
21073       new_complete="$new_path"
21074     fi
21075 
21076     if test "x$complete" != "x$new_complete"; then
21077       FOUND_MAKE="$new_complete"
21078       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21079 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21080     fi
21081   fi
21082 
21083         fi
21084       fi
21085     fi
21086   fi
21087 
21088     if test "x$FOUND_MAKE" = x; then
21089       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21090     fi
21091 
21092   fi
21093 
21094 
21095   MAKE=$FOUND_MAKE
21096 
21097   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21098 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21099 
21100 
21101   # Check if make supports the output sync option and if so, setup using it.
21102   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21103 $as_echo_n "checking if make --output-sync is supported... " >&6; }
21104   if $MAKE --version -O > /dev/null 2>&1; then
21105     OUTPUT_SYNC_SUPPORTED=true
21106     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21107 $as_echo "yes" >&6; }
21108     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21109 $as_echo_n "checking for output-sync value... " >&6; }
21110 
21111 # Check whether --with-output-sync was given.
21112 if test "${with_output_sync+set}" = set; then :
21113   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21114 fi
21115 
21116     if test "x$OUTPUT_SYNC" = "x"; then
21117       OUTPUT_SYNC=none
21118     fi
21119     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21120 $as_echo "$OUTPUT_SYNC" >&6; }
21121     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21122       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21123     fi
21124   else
21125     OUTPUT_SYNC_SUPPORTED=false
21126     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21127 $as_echo "no" >&6; }
21128   fi
21129 
21130 
21131 
21132 
21133 
21134 
21135   # Test if find supports -delete
21136   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21137 $as_echo_n "checking if find supports -delete... " >&6; }
21138   FIND_DELETE="-delete"
21139 
21140   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21141 
21142   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21143 
21144   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21145   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21146     # No, it does not.
21147     $RM $DELETEDIR/TestIfFindSupportsDelete
21148     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21149       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21150       FIND_DELETE="-print | $XARGS $RM"
21151     else
21152       FIND_DELETE="-exec $RM \{\} \+"
21153     fi
21154     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21155 $as_echo "no" >&6; }
21156   else
21157     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21158 $as_echo "yes" >&6; }
21159   fi
21160   $RMDIR $DELETEDIR
21161 
21162 
21163 
21164   # Test which kind of tar was found
21165   if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21166     TAR_TYPE="gnu"
21167   elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21168     TAR_TYPE="bsd"
21169   elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21170     TAR_TYPE="solaris"
21171   fi
21172   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21173 $as_echo_n "checking what type of tar was found... " >&6; }
21174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21175 $as_echo "$TAR_TYPE" >&6; }
21176 
21177   TAR_CREATE_FILE_PARAM=""
21178 
21179   if test "x$TAR_TYPE" = "xgnu"; then
21180     TAR_INCLUDE_PARAM="T"
21181     TAR_SUPPORTS_TRANSFORM="true"
21182     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21183       # When using gnu tar for Solaris targets, need to use compatibility mode
21184       TAR_CREATE_EXTRA_PARAM="--format=ustar"
21185     fi
21186   else
21187     TAR_INCLUDE_PARAM="I"
21188     TAR_SUPPORTS_TRANSFORM="false"
21189   fi
21190 
21191 
21192 
21193 
21194 
21195 
21196   # These tools might not be installed by default,
21197   # need hint on how to install them.
21198 
21199 
21200 
21201   # Publish this variable in the help.
21202 
21203 
21204   if [ -z "${UNZIP+x}" ]; then
21205     # The variable is not set by user, try to locate tool using the code snippet
21206     for ac_prog in unzip
21207 do
21208   # Extract the first word of "$ac_prog", so it can be a program name with args.
21209 set dummy $ac_prog; ac_word=$2
21210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21211 $as_echo_n "checking for $ac_word... " >&6; }
21212 if ${ac_cv_path_UNZIP+:} false; then :
21213   $as_echo_n "(cached) " >&6
21214 else
21215   case $UNZIP in
21216   [\\/]* | ?:[\\/]*)
21217   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21218   ;;
21219   *)
21220   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21221 for as_dir in $PATH
21222 do
21223   IFS=$as_save_IFS
21224   test -z "$as_dir" && as_dir=.
21225     for ac_exec_ext in '' $ac_executable_extensions; do
21226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21227     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21229     break 2
21230   fi
21231 done
21232   done
21233 IFS=$as_save_IFS
21234 
21235   ;;
21236 esac
21237 fi
21238 UNZIP=$ac_cv_path_UNZIP
21239 if test -n "$UNZIP"; then
21240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21241 $as_echo "$UNZIP" >&6; }
21242 else
21243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21244 $as_echo "no" >&6; }
21245 fi
21246 
21247 
21248   test -n "$UNZIP" && break
21249 done
21250 
21251   else
21252     # The variable is set, but is it from the command line or the environment?
21253 
21254     # Try to remove the string !UNZIP! from our list.
21255     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21256     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21257       # If it failed, the variable was not from the command line. Ignore it,
21258       # but warn the user (except for BASH, which is always set by the calling BASH).
21259       if test "xUNZIP" != xBASH; then
21260         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21261 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21262       fi
21263       # Try to locate tool using the code snippet
21264       for ac_prog in unzip
21265 do
21266   # Extract the first word of "$ac_prog", so it can be a program name with args.
21267 set dummy $ac_prog; ac_word=$2
21268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21269 $as_echo_n "checking for $ac_word... " >&6; }
21270 if ${ac_cv_path_UNZIP+:} false; then :
21271   $as_echo_n "(cached) " >&6
21272 else
21273   case $UNZIP in
21274   [\\/]* | ?:[\\/]*)
21275   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21276   ;;
21277   *)
21278   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21279 for as_dir in $PATH
21280 do
21281   IFS=$as_save_IFS
21282   test -z "$as_dir" && as_dir=.
21283     for ac_exec_ext in '' $ac_executable_extensions; do
21284   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21285     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21286     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21287     break 2
21288   fi
21289 done
21290   done
21291 IFS=$as_save_IFS
21292 
21293   ;;
21294 esac
21295 fi
21296 UNZIP=$ac_cv_path_UNZIP
21297 if test -n "$UNZIP"; then
21298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21299 $as_echo "$UNZIP" >&6; }
21300 else
21301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21302 $as_echo "no" >&6; }
21303 fi
21304 
21305 
21306   test -n "$UNZIP" && break
21307 done
21308 
21309     else
21310       # If it succeeded, then it was overridden by the user. We will use it
21311       # for the tool.
21312 
21313       # First remove it from the list of overridden variables, so we can test
21314       # for unknown variables in the end.
21315       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21316 
21317       # Check if we try to supply an empty value
21318       if test "x$UNZIP" = x; then
21319         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21320 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21321         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21322 $as_echo_n "checking for UNZIP... " >&6; }
21323         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21324 $as_echo "disabled" >&6; }
21325       else
21326         # Check if the provided tool contains a complete path.
21327         tool_specified="$UNZIP"
21328         tool_basename="${tool_specified##*/}"
21329         if test "x$tool_basename" = "x$tool_specified"; then
21330           # A command without a complete path is provided, search $PATH.
21331           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21332 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21333           # Extract the first word of "$tool_basename", so it can be a program name with args.
21334 set dummy $tool_basename; ac_word=$2
21335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21336 $as_echo_n "checking for $ac_word... " >&6; }
21337 if ${ac_cv_path_UNZIP+:} false; then :
21338   $as_echo_n "(cached) " >&6
21339 else
21340   case $UNZIP in
21341   [\\/]* | ?:[\\/]*)
21342   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21343   ;;
21344   *)
21345   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21346 for as_dir in $PATH
21347 do
21348   IFS=$as_save_IFS
21349   test -z "$as_dir" && as_dir=.
21350     for ac_exec_ext in '' $ac_executable_extensions; do
21351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21352     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21354     break 2
21355   fi
21356 done
21357   done
21358 IFS=$as_save_IFS
21359 
21360   ;;
21361 esac
21362 fi
21363 UNZIP=$ac_cv_path_UNZIP
21364 if test -n "$UNZIP"; then
21365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21366 $as_echo "$UNZIP" >&6; }
21367 else
21368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21369 $as_echo "no" >&6; }
21370 fi
21371 
21372 
21373           if test "x$UNZIP" = x; then
21374             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21375           fi
21376         else
21377           # Otherwise we believe it is a complete path. Use it as it is.
21378           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21379 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21380           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21381 $as_echo_n "checking for UNZIP... " >&6; }
21382           if test ! -x "$tool_specified"; then
21383             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21384 $as_echo "not found" >&6; }
21385             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21386           fi
21387           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21388 $as_echo "$tool_specified" >&6; }
21389         fi
21390       fi
21391     fi
21392 
21393   fi
21394 
21395 
21396 
21397   if test "x$UNZIP" = x; then
21398     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21399   fi
21400 
21401 
21402   # Since zip uses "ZIP" as a environment variable for passing options, we need
21403   # to name our variable differently, hence ZIPEXE.
21404 
21405 
21406 
21407   # Publish this variable in the help.
21408 
21409 
21410   if [ -z "${ZIPEXE+x}" ]; then
21411     # The variable is not set by user, try to locate tool using the code snippet
21412     for ac_prog in zip
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_ZIPEXE+:} false; then :
21419   $as_echo_n "(cached) " >&6
21420 else
21421   case $ZIPEXE in
21422   [\\/]* | ?:[\\/]*)
21423   ac_cv_path_ZIPEXE="$ZIPEXE" # 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_ZIPEXE="$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 ZIPEXE=$ac_cv_path_ZIPEXE
21445 if test -n "$ZIPEXE"; then
21446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21447 $as_echo "$ZIPEXE" >&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 "$ZIPEXE" && 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 !ZIPEXE! from our list.
21461     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
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 "xZIPEXE" != xBASH; then
21466         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21467 $as_echo "$as_me: WARNING: Ignoring value of ZIPEXE 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 zip
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_ZIPEXE+:} false; then :
21477   $as_echo_n "(cached) " >&6
21478 else
21479   case $ZIPEXE in
21480   [\\/]* | ?:[\\/]*)
21481   ac_cv_path_ZIPEXE="$ZIPEXE" # 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_ZIPEXE="$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 ZIPEXE=$ac_cv_path_ZIPEXE
21503 if test -n "$ZIPEXE"; then
21504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21505 $as_echo "$ZIPEXE" >&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 "$ZIPEXE" && 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$ZIPEXE" = x; then
21525         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21526 $as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21527         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21528 $as_echo_n "checking for ZIPEXE... " >&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="$ZIPEXE"
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 ZIPEXE=$tool_basename" >&5
21538 $as_echo "$as_me: Will search for user supplied tool ZIPEXE=$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_ZIPEXE+:} false; then :
21544   $as_echo_n "(cached) " >&6
21545 else
21546   case $ZIPEXE in
21547   [\\/]* | ?:[\\/]*)
21548   ac_cv_path_ZIPEXE="$ZIPEXE" # 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_ZIPEXE="$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 ZIPEXE=$ac_cv_path_ZIPEXE
21570 if test -n "$ZIPEXE"; then
21571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21572 $as_echo "$ZIPEXE" >&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$ZIPEXE" = 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 ZIPEXE=$tool_specified" >&5
21585 $as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21586           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21587 $as_echo_n "checking for ZIPEXE... " >&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 ZIPEXE=$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   if test "x$ZIPEXE" = x; then
21604     as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21605   fi
21606 
21607 
21608 
21609   # Non-required basic tools
21610 
21611 
21612 
21613   # Publish this variable in the help.
21614 
21615 
21616   if [ -z "${LDD+x}" ]; then
21617     # The variable is not set by user, try to locate tool using the code snippet
21618     for ac_prog in ldd
21619 do
21620   # Extract the first word of "$ac_prog", so it can be a program name with args.
21621 set dummy $ac_prog; ac_word=$2
21622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21623 $as_echo_n "checking for $ac_word... " >&6; }
21624 if ${ac_cv_path_LDD+:} false; then :
21625   $as_echo_n "(cached) " >&6
21626 else
21627   case $LDD in
21628   [\\/]* | ?:[\\/]*)
21629   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21630   ;;
21631   *)
21632   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21633 for as_dir in $PATH
21634 do
21635   IFS=$as_save_IFS
21636   test -z "$as_dir" && as_dir=.
21637     for ac_exec_ext in '' $ac_executable_extensions; do
21638   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21639     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21640     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21641     break 2
21642   fi
21643 done
21644   done
21645 IFS=$as_save_IFS
21646 
21647   ;;
21648 esac
21649 fi
21650 LDD=$ac_cv_path_LDD
21651 if test -n "$LDD"; then
21652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21653 $as_echo "$LDD" >&6; }
21654 else
21655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21656 $as_echo "no" >&6; }
21657 fi
21658 
21659 
21660   test -n "$LDD" && break
21661 done
21662 
21663   else
21664     # The variable is set, but is it from the command line or the environment?
21665 
21666     # Try to remove the string !LDD! from our list.
21667     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21668     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21669       # If it failed, the variable was not from the command line. Ignore it,
21670       # but warn the user (except for BASH, which is always set by the calling BASH).
21671       if test "xLDD" != xBASH; then
21672         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21673 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21674       fi
21675       # Try to locate tool using the code snippet
21676       for ac_prog in ldd
21677 do
21678   # Extract the first word of "$ac_prog", so it can be a program name with args.
21679 set dummy $ac_prog; ac_word=$2
21680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21681 $as_echo_n "checking for $ac_word... " >&6; }
21682 if ${ac_cv_path_LDD+:} false; then :
21683   $as_echo_n "(cached) " >&6
21684 else
21685   case $LDD in
21686   [\\/]* | ?:[\\/]*)
21687   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21688   ;;
21689   *)
21690   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21691 for as_dir in $PATH
21692 do
21693   IFS=$as_save_IFS
21694   test -z "$as_dir" && as_dir=.
21695     for ac_exec_ext in '' $ac_executable_extensions; do
21696   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21697     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21698     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21699     break 2
21700   fi
21701 done
21702   done
21703 IFS=$as_save_IFS
21704 
21705   ;;
21706 esac
21707 fi
21708 LDD=$ac_cv_path_LDD
21709 if test -n "$LDD"; then
21710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21711 $as_echo "$LDD" >&6; }
21712 else
21713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21714 $as_echo "no" >&6; }
21715 fi
21716 
21717 
21718   test -n "$LDD" && break
21719 done
21720 
21721     else
21722       # If it succeeded, then it was overridden by the user. We will use it
21723       # for the tool.
21724 
21725       # First remove it from the list of overridden variables, so we can test
21726       # for unknown variables in the end.
21727       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21728 
21729       # Check if we try to supply an empty value
21730       if test "x$LDD" = x; then
21731         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21732 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21733         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21734 $as_echo_n "checking for LDD... " >&6; }
21735         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21736 $as_echo "disabled" >&6; }
21737       else
21738         # Check if the provided tool contains a complete path.
21739         tool_specified="$LDD"
21740         tool_basename="${tool_specified##*/}"
21741         if test "x$tool_basename" = "x$tool_specified"; then
21742           # A command without a complete path is provided, search $PATH.
21743           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21744 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21745           # Extract the first word of "$tool_basename", so it can be a program name with args.
21746 set dummy $tool_basename; ac_word=$2
21747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21748 $as_echo_n "checking for $ac_word... " >&6; }
21749 if ${ac_cv_path_LDD+:} false; then :
21750   $as_echo_n "(cached) " >&6
21751 else
21752   case $LDD in
21753   [\\/]* | ?:[\\/]*)
21754   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21755   ;;
21756   *)
21757   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21758 for as_dir in $PATH
21759 do
21760   IFS=$as_save_IFS
21761   test -z "$as_dir" && as_dir=.
21762     for ac_exec_ext in '' $ac_executable_extensions; do
21763   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21764     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21765     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21766     break 2
21767   fi
21768 done
21769   done
21770 IFS=$as_save_IFS
21771 
21772   ;;
21773 esac
21774 fi
21775 LDD=$ac_cv_path_LDD
21776 if test -n "$LDD"; then
21777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21778 $as_echo "$LDD" >&6; }
21779 else
21780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21781 $as_echo "no" >&6; }
21782 fi
21783 
21784 
21785           if test "x$LDD" = x; then
21786             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21787           fi
21788         else
21789           # Otherwise we believe it is a complete path. Use it as it is.
21790           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21791 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21792           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21793 $as_echo_n "checking for LDD... " >&6; }
21794           if test ! -x "$tool_specified"; then
21795             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21796 $as_echo "not found" >&6; }
21797             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21798           fi
21799           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21800 $as_echo "$tool_specified" >&6; }
21801         fi
21802       fi
21803     fi
21804 
21805   fi
21806 
21807 
21808   if test "x$LDD" = "x"; then
21809     # List shared lib dependencies is used for
21810     # debug output and checking for forbidden dependencies.
21811     # We can build without it.
21812     LDD="true"
21813   fi
21814 
21815 
21816   # Publish this variable in the help.
21817 
21818 
21819   if [ -z "${OTOOL+x}" ]; then
21820     # The variable is not set by user, try to locate tool using the code snippet
21821     for ac_prog in otool
21822 do
21823   # Extract the first word of "$ac_prog", so it can be a program name with args.
21824 set dummy $ac_prog; ac_word=$2
21825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21826 $as_echo_n "checking for $ac_word... " >&6; }
21827 if ${ac_cv_path_OTOOL+:} false; then :
21828   $as_echo_n "(cached) " >&6
21829 else
21830   case $OTOOL in
21831   [\\/]* | ?:[\\/]*)
21832   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21833   ;;
21834   *)
21835   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21836 for as_dir in $PATH
21837 do
21838   IFS=$as_save_IFS
21839   test -z "$as_dir" && as_dir=.
21840     for ac_exec_ext in '' $ac_executable_extensions; do
21841   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21842     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21843     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21844     break 2
21845   fi
21846 done
21847   done
21848 IFS=$as_save_IFS
21849 
21850   ;;
21851 esac
21852 fi
21853 OTOOL=$ac_cv_path_OTOOL
21854 if test -n "$OTOOL"; then
21855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21856 $as_echo "$OTOOL" >&6; }
21857 else
21858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21859 $as_echo "no" >&6; }
21860 fi
21861 
21862 
21863   test -n "$OTOOL" && break
21864 done
21865 
21866   else
21867     # The variable is set, but is it from the command line or the environment?
21868 
21869     # Try to remove the string !OTOOL! from our list.
21870     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21871     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21872       # If it failed, the variable was not from the command line. Ignore it,
21873       # but warn the user (except for BASH, which is always set by the calling BASH).
21874       if test "xOTOOL" != xBASH; then
21875         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21876 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21877       fi
21878       # Try to locate tool using the code snippet
21879       for ac_prog in otool
21880 do
21881   # Extract the first word of "$ac_prog", so it can be a program name with args.
21882 set dummy $ac_prog; ac_word=$2
21883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21884 $as_echo_n "checking for $ac_word... " >&6; }
21885 if ${ac_cv_path_OTOOL+:} false; then :
21886   $as_echo_n "(cached) " >&6
21887 else
21888   case $OTOOL in
21889   [\\/]* | ?:[\\/]*)
21890   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21891   ;;
21892   *)
21893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21894 for as_dir in $PATH
21895 do
21896   IFS=$as_save_IFS
21897   test -z "$as_dir" && as_dir=.
21898     for ac_exec_ext in '' $ac_executable_extensions; do
21899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21900     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21902     break 2
21903   fi
21904 done
21905   done
21906 IFS=$as_save_IFS
21907 
21908   ;;
21909 esac
21910 fi
21911 OTOOL=$ac_cv_path_OTOOL
21912 if test -n "$OTOOL"; then
21913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21914 $as_echo "$OTOOL" >&6; }
21915 else
21916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21917 $as_echo "no" >&6; }
21918 fi
21919 
21920 
21921   test -n "$OTOOL" && break
21922 done
21923 
21924     else
21925       # If it succeeded, then it was overridden by the user. We will use it
21926       # for the tool.
21927 
21928       # First remove it from the list of overridden variables, so we can test
21929       # for unknown variables in the end.
21930       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21931 
21932       # Check if we try to supply an empty value
21933       if test "x$OTOOL" = x; then
21934         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21935 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21936         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21937 $as_echo_n "checking for OTOOL... " >&6; }
21938         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21939 $as_echo "disabled" >&6; }
21940       else
21941         # Check if the provided tool contains a complete path.
21942         tool_specified="$OTOOL"
21943         tool_basename="${tool_specified##*/}"
21944         if test "x$tool_basename" = "x$tool_specified"; then
21945           # A command without a complete path is provided, search $PATH.
21946           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21947 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21948           # Extract the first word of "$tool_basename", so it can be a program name with args.
21949 set dummy $tool_basename; ac_word=$2
21950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21951 $as_echo_n "checking for $ac_word... " >&6; }
21952 if ${ac_cv_path_OTOOL+:} false; then :
21953   $as_echo_n "(cached) " >&6
21954 else
21955   case $OTOOL in
21956   [\\/]* | ?:[\\/]*)
21957   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21958   ;;
21959   *)
21960   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21961 for as_dir in $PATH
21962 do
21963   IFS=$as_save_IFS
21964   test -z "$as_dir" && as_dir=.
21965     for ac_exec_ext in '' $ac_executable_extensions; do
21966   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21967     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21968     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21969     break 2
21970   fi
21971 done
21972   done
21973 IFS=$as_save_IFS
21974 
21975   ;;
21976 esac
21977 fi
21978 OTOOL=$ac_cv_path_OTOOL
21979 if test -n "$OTOOL"; then
21980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21981 $as_echo "$OTOOL" >&6; }
21982 else
21983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21984 $as_echo "no" >&6; }
21985 fi
21986 
21987 
21988           if test "x$OTOOL" = x; then
21989             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21990           fi
21991         else
21992           # Otherwise we believe it is a complete path. Use it as it is.
21993           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21994 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21995           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21996 $as_echo_n "checking for OTOOL... " >&6; }
21997           if test ! -x "$tool_specified"; then
21998             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21999 $as_echo "not found" >&6; }
22000             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22001           fi
22002           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22003 $as_echo "$tool_specified" >&6; }
22004         fi
22005       fi
22006     fi
22007 
22008   fi
22009 
22010 
22011   if test "x$OTOOL" = "x"; then
22012     OTOOL="true"
22013   fi
22014 
22015 
22016   # Publish this variable in the help.
22017 
22018 
22019   if [ -z "${READELF+x}" ]; then
22020     # The variable is not set by user, try to locate tool using the code snippet
22021     for ac_prog in greadelf readelf
22022 do
22023   # Extract the first word of "$ac_prog", so it can be a program name with args.
22024 set dummy $ac_prog; ac_word=$2
22025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22026 $as_echo_n "checking for $ac_word... " >&6; }
22027 if ${ac_cv_path_READELF+:} false; then :
22028   $as_echo_n "(cached) " >&6
22029 else
22030   case $READELF in
22031   [\\/]* | ?:[\\/]*)
22032   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22033   ;;
22034   *)
22035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22036 for as_dir in $PATH
22037 do
22038   IFS=$as_save_IFS
22039   test -z "$as_dir" && as_dir=.
22040     for ac_exec_ext in '' $ac_executable_extensions; do
22041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22042     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22044     break 2
22045   fi
22046 done
22047   done
22048 IFS=$as_save_IFS
22049 
22050   ;;
22051 esac
22052 fi
22053 READELF=$ac_cv_path_READELF
22054 if test -n "$READELF"; then
22055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22056 $as_echo "$READELF" >&6; }
22057 else
22058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22059 $as_echo "no" >&6; }
22060 fi
22061 
22062 
22063   test -n "$READELF" && break
22064 done
22065 
22066   else
22067     # The variable is set, but is it from the command line or the environment?
22068 
22069     # Try to remove the string !READELF! from our list.
22070     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22071     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22072       # If it failed, the variable was not from the command line. Ignore it,
22073       # but warn the user (except for BASH, which is always set by the calling BASH).
22074       if test "xREADELF" != xBASH; then
22075         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22076 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22077       fi
22078       # Try to locate tool using the code snippet
22079       for ac_prog in greadelf readelf
22080 do
22081   # Extract the first word of "$ac_prog", so it can be a program name with args.
22082 set dummy $ac_prog; ac_word=$2
22083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22084 $as_echo_n "checking for $ac_word... " >&6; }
22085 if ${ac_cv_path_READELF+:} false; then :
22086   $as_echo_n "(cached) " >&6
22087 else
22088   case $READELF in
22089   [\\/]* | ?:[\\/]*)
22090   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22091   ;;
22092   *)
22093   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22094 for as_dir in $PATH
22095 do
22096   IFS=$as_save_IFS
22097   test -z "$as_dir" && as_dir=.
22098     for ac_exec_ext in '' $ac_executable_extensions; do
22099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22100     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22102     break 2
22103   fi
22104 done
22105   done
22106 IFS=$as_save_IFS
22107 
22108   ;;
22109 esac
22110 fi
22111 READELF=$ac_cv_path_READELF
22112 if test -n "$READELF"; then
22113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22114 $as_echo "$READELF" >&6; }
22115 else
22116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22117 $as_echo "no" >&6; }
22118 fi
22119 
22120 
22121   test -n "$READELF" && break
22122 done
22123 
22124     else
22125       # If it succeeded, then it was overridden by the user. We will use it
22126       # for the tool.
22127 
22128       # First remove it from the list of overridden variables, so we can test
22129       # for unknown variables in the end.
22130       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22131 
22132       # Check if we try to supply an empty value
22133       if test "x$READELF" = x; then
22134         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22135 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22136         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22137 $as_echo_n "checking for READELF... " >&6; }
22138         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22139 $as_echo "disabled" >&6; }
22140       else
22141         # Check if the provided tool contains a complete path.
22142         tool_specified="$READELF"
22143         tool_basename="${tool_specified##*/}"
22144         if test "x$tool_basename" = "x$tool_specified"; then
22145           # A command without a complete path is provided, search $PATH.
22146           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22147 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22148           # Extract the first word of "$tool_basename", so it can be a program name with args.
22149 set dummy $tool_basename; ac_word=$2
22150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22151 $as_echo_n "checking for $ac_word... " >&6; }
22152 if ${ac_cv_path_READELF+:} false; then :
22153   $as_echo_n "(cached) " >&6
22154 else
22155   case $READELF in
22156   [\\/]* | ?:[\\/]*)
22157   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22158   ;;
22159   *)
22160   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22161 for as_dir in $PATH
22162 do
22163   IFS=$as_save_IFS
22164   test -z "$as_dir" && as_dir=.
22165     for ac_exec_ext in '' $ac_executable_extensions; do
22166   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22167     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22168     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22169     break 2
22170   fi
22171 done
22172   done
22173 IFS=$as_save_IFS
22174 
22175   ;;
22176 esac
22177 fi
22178 READELF=$ac_cv_path_READELF
22179 if test -n "$READELF"; then
22180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22181 $as_echo "$READELF" >&6; }
22182 else
22183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22184 $as_echo "no" >&6; }
22185 fi
22186 
22187 
22188           if test "x$READELF" = x; then
22189             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22190           fi
22191         else
22192           # Otherwise we believe it is a complete path. Use it as it is.
22193           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22194 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22195           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22196 $as_echo_n "checking for READELF... " >&6; }
22197           if test ! -x "$tool_specified"; then
22198             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22199 $as_echo "not found" >&6; }
22200             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22201           fi
22202           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22203 $as_echo "$tool_specified" >&6; }
22204         fi
22205       fi
22206     fi
22207 
22208   fi
22209 
22210 
22211 
22212 
22213   # Publish this variable in the help.
22214 
22215 
22216   if [ -z "${HG+x}" ]; then
22217     # The variable is not set by user, try to locate tool using the code snippet
22218     for ac_prog in hg
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_HG+:} false; then :
22225   $as_echo_n "(cached) " >&6
22226 else
22227   case $HG in
22228   [\\/]* | ?:[\\/]*)
22229   ac_cv_path_HG="$HG" # 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_HG="$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 HG=$ac_cv_path_HG
22251 if test -n "$HG"; then
22252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22253 $as_echo "$HG" >&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 "$HG" && 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 !HG! from our list.
22267     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
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 "xHG" != xBASH; then
22272         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22273 $as_echo "$as_me: WARNING: Ignoring value of HG 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 hg
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_HG+:} false; then :
22283   $as_echo_n "(cached) " >&6
22284 else
22285   case $HG in
22286   [\\/]* | ?:[\\/]*)
22287   ac_cv_path_HG="$HG" # 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_HG="$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 HG=$ac_cv_path_HG
22309 if test -n "$HG"; then
22310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22311 $as_echo "$HG" >&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 "$HG" && 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$HG" = x; then
22331         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22332 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22333         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22334 $as_echo_n "checking for HG... " >&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="$HG"
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 HG=$tool_basename" >&5
22344 $as_echo "$as_me: Will search for user supplied tool HG=$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_HG+:} false; then :
22350   $as_echo_n "(cached) " >&6
22351 else
22352   case $HG in
22353   [\\/]* | ?:[\\/]*)
22354   ac_cv_path_HG="$HG" # 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_HG="$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 HG=$ac_cv_path_HG
22376 if test -n "$HG"; then
22377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22378 $as_echo "$HG" >&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$HG" = 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 HG=$tool_specified" >&5
22391 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22392           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22393 $as_echo_n "checking for HG... " >&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 HG=$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 
22410   # Publish this variable in the help.
22411 
22412 
22413   if [ -z "${STAT+x}" ]; then
22414     # The variable is not set by user, try to locate tool using the code snippet
22415     for ac_prog in stat
22416 do
22417   # Extract the first word of "$ac_prog", so it can be a program name with args.
22418 set dummy $ac_prog; ac_word=$2
22419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22420 $as_echo_n "checking for $ac_word... " >&6; }
22421 if ${ac_cv_path_STAT+:} false; then :
22422   $as_echo_n "(cached) " >&6
22423 else
22424   case $STAT in
22425   [\\/]* | ?:[\\/]*)
22426   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22427   ;;
22428   *)
22429   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22430 for as_dir in $PATH
22431 do
22432   IFS=$as_save_IFS
22433   test -z "$as_dir" && as_dir=.
22434     for ac_exec_ext in '' $ac_executable_extensions; do
22435   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22436     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22437     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22438     break 2
22439   fi
22440 done
22441   done
22442 IFS=$as_save_IFS
22443 
22444   ;;
22445 esac
22446 fi
22447 STAT=$ac_cv_path_STAT
22448 if test -n "$STAT"; then
22449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22450 $as_echo "$STAT" >&6; }
22451 else
22452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22453 $as_echo "no" >&6; }
22454 fi
22455 
22456 
22457   test -n "$STAT" && break
22458 done
22459 
22460   else
22461     # The variable is set, but is it from the command line or the environment?
22462 
22463     # Try to remove the string !STAT! from our list.
22464     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22465     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22466       # If it failed, the variable was not from the command line. Ignore it,
22467       # but warn the user (except for BASH, which is always set by the calling BASH).
22468       if test "xSTAT" != xBASH; then
22469         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22470 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22471       fi
22472       # Try to locate tool using the code snippet
22473       for ac_prog in stat
22474 do
22475   # Extract the first word of "$ac_prog", so it can be a program name with args.
22476 set dummy $ac_prog; ac_word=$2
22477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22478 $as_echo_n "checking for $ac_word... " >&6; }
22479 if ${ac_cv_path_STAT+:} false; then :
22480   $as_echo_n "(cached) " >&6
22481 else
22482   case $STAT in
22483   [\\/]* | ?:[\\/]*)
22484   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22485   ;;
22486   *)
22487   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22488 for as_dir in $PATH
22489 do
22490   IFS=$as_save_IFS
22491   test -z "$as_dir" && as_dir=.
22492     for ac_exec_ext in '' $ac_executable_extensions; do
22493   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22494     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22495     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22496     break 2
22497   fi
22498 done
22499   done
22500 IFS=$as_save_IFS
22501 
22502   ;;
22503 esac
22504 fi
22505 STAT=$ac_cv_path_STAT
22506 if test -n "$STAT"; then
22507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22508 $as_echo "$STAT" >&6; }
22509 else
22510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22511 $as_echo "no" >&6; }
22512 fi
22513 
22514 
22515   test -n "$STAT" && break
22516 done
22517 
22518     else
22519       # If it succeeded, then it was overridden by the user. We will use it
22520       # for the tool.
22521 
22522       # First remove it from the list of overridden variables, so we can test
22523       # for unknown variables in the end.
22524       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22525 
22526       # Check if we try to supply an empty value
22527       if test "x$STAT" = x; then
22528         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22529 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22530         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22531 $as_echo_n "checking for STAT... " >&6; }
22532         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22533 $as_echo "disabled" >&6; }
22534       else
22535         # Check if the provided tool contains a complete path.
22536         tool_specified="$STAT"
22537         tool_basename="${tool_specified##*/}"
22538         if test "x$tool_basename" = "x$tool_specified"; then
22539           # A command without a complete path is provided, search $PATH.
22540           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22541 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22542           # Extract the first word of "$tool_basename", so it can be a program name with args.
22543 set dummy $tool_basename; ac_word=$2
22544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22545 $as_echo_n "checking for $ac_word... " >&6; }
22546 if ${ac_cv_path_STAT+:} false; then :
22547   $as_echo_n "(cached) " >&6
22548 else
22549   case $STAT in
22550   [\\/]* | ?:[\\/]*)
22551   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22552   ;;
22553   *)
22554   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22555 for as_dir in $PATH
22556 do
22557   IFS=$as_save_IFS
22558   test -z "$as_dir" && as_dir=.
22559     for ac_exec_ext in '' $ac_executable_extensions; do
22560   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22561     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22562     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22563     break 2
22564   fi
22565 done
22566   done
22567 IFS=$as_save_IFS
22568 
22569   ;;
22570 esac
22571 fi
22572 STAT=$ac_cv_path_STAT
22573 if test -n "$STAT"; then
22574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22575 $as_echo "$STAT" >&6; }
22576 else
22577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22578 $as_echo "no" >&6; }
22579 fi
22580 
22581 
22582           if test "x$STAT" = x; then
22583             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22584           fi
22585         else
22586           # Otherwise we believe it is a complete path. Use it as it is.
22587           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22588 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22589           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22590 $as_echo_n "checking for STAT... " >&6; }
22591           if test ! -x "$tool_specified"; then
22592             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22593 $as_echo "not found" >&6; }
22594             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22595           fi
22596           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22597 $as_echo "$tool_specified" >&6; }
22598         fi
22599       fi
22600     fi
22601 
22602   fi
22603 
22604 
22605 
22606 
22607   # Publish this variable in the help.
22608 
22609 
22610   if [ -z "${TIME+x}" ]; then
22611     # The variable is not set by user, try to locate tool using the code snippet
22612     for ac_prog in time
22613 do
22614   # Extract the first word of "$ac_prog", so it can be a program name with args.
22615 set dummy $ac_prog; ac_word=$2
22616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22617 $as_echo_n "checking for $ac_word... " >&6; }
22618 if ${ac_cv_path_TIME+:} false; then :
22619   $as_echo_n "(cached) " >&6
22620 else
22621   case $TIME in
22622   [\\/]* | ?:[\\/]*)
22623   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22624   ;;
22625   *)
22626   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22627 for as_dir in $PATH
22628 do
22629   IFS=$as_save_IFS
22630   test -z "$as_dir" && as_dir=.
22631     for ac_exec_ext in '' $ac_executable_extensions; do
22632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22633     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22635     break 2
22636   fi
22637 done
22638   done
22639 IFS=$as_save_IFS
22640 
22641   ;;
22642 esac
22643 fi
22644 TIME=$ac_cv_path_TIME
22645 if test -n "$TIME"; then
22646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22647 $as_echo "$TIME" >&6; }
22648 else
22649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22650 $as_echo "no" >&6; }
22651 fi
22652 
22653 
22654   test -n "$TIME" && break
22655 done
22656 
22657   else
22658     # The variable is set, but is it from the command line or the environment?
22659 
22660     # Try to remove the string !TIME! from our list.
22661     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22662     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22663       # If it failed, the variable was not from the command line. Ignore it,
22664       # but warn the user (except for BASH, which is always set by the calling BASH).
22665       if test "xTIME" != xBASH; then
22666         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22667 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22668       fi
22669       # Try to locate tool using the code snippet
22670       for ac_prog in time
22671 do
22672   # Extract the first word of "$ac_prog", so it can be a program name with args.
22673 set dummy $ac_prog; ac_word=$2
22674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22675 $as_echo_n "checking for $ac_word... " >&6; }
22676 if ${ac_cv_path_TIME+:} false; then :
22677   $as_echo_n "(cached) " >&6
22678 else
22679   case $TIME in
22680   [\\/]* | ?:[\\/]*)
22681   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22682   ;;
22683   *)
22684   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22685 for as_dir in $PATH
22686 do
22687   IFS=$as_save_IFS
22688   test -z "$as_dir" && as_dir=.
22689     for ac_exec_ext in '' $ac_executable_extensions; do
22690   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22691     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22692     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22693     break 2
22694   fi
22695 done
22696   done
22697 IFS=$as_save_IFS
22698 
22699   ;;
22700 esac
22701 fi
22702 TIME=$ac_cv_path_TIME
22703 if test -n "$TIME"; then
22704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22705 $as_echo "$TIME" >&6; }
22706 else
22707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22708 $as_echo "no" >&6; }
22709 fi
22710 
22711 
22712   test -n "$TIME" && break
22713 done
22714 
22715     else
22716       # If it succeeded, then it was overridden by the user. We will use it
22717       # for the tool.
22718 
22719       # First remove it from the list of overridden variables, so we can test
22720       # for unknown variables in the end.
22721       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22722 
22723       # Check if we try to supply an empty value
22724       if test "x$TIME" = x; then
22725         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22726 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22727         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22728 $as_echo_n "checking for TIME... " >&6; }
22729         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22730 $as_echo "disabled" >&6; }
22731       else
22732         # Check if the provided tool contains a complete path.
22733         tool_specified="$TIME"
22734         tool_basename="${tool_specified##*/}"
22735         if test "x$tool_basename" = "x$tool_specified"; then
22736           # A command without a complete path is provided, search $PATH.
22737           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22738 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22739           # Extract the first word of "$tool_basename", so it can be a program name with args.
22740 set dummy $tool_basename; ac_word=$2
22741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22742 $as_echo_n "checking for $ac_word... " >&6; }
22743 if ${ac_cv_path_TIME+:} false; then :
22744   $as_echo_n "(cached) " >&6
22745 else
22746   case $TIME in
22747   [\\/]* | ?:[\\/]*)
22748   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22749   ;;
22750   *)
22751   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22752 for as_dir in $PATH
22753 do
22754   IFS=$as_save_IFS
22755   test -z "$as_dir" && as_dir=.
22756     for ac_exec_ext in '' $ac_executable_extensions; do
22757   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22758     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22759     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22760     break 2
22761   fi
22762 done
22763   done
22764 IFS=$as_save_IFS
22765 
22766   ;;
22767 esac
22768 fi
22769 TIME=$ac_cv_path_TIME
22770 if test -n "$TIME"; then
22771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22772 $as_echo "$TIME" >&6; }
22773 else
22774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22775 $as_echo "no" >&6; }
22776 fi
22777 
22778 
22779           if test "x$TIME" = x; then
22780             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22781           fi
22782         else
22783           # Otherwise we believe it is a complete path. Use it as it is.
22784           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22785 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22786           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22787 $as_echo_n "checking for TIME... " >&6; }
22788           if test ! -x "$tool_specified"; then
22789             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22790 $as_echo "not found" >&6; }
22791             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22792           fi
22793           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22794 $as_echo "$tool_specified" >&6; }
22795         fi
22796       fi
22797     fi
22798 
22799   fi
22800 
22801 
22802   # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22803   # be in the user path.
22804 
22805 
22806   # Publish this variable in the help.
22807 
22808 
22809   if [ -z "${DTRACE+x}" ]; then
22810     # The variable is not set by user, try to locate tool using the code snippet
22811     for ac_prog in dtrace
22812 do
22813   # Extract the first word of "$ac_prog", so it can be a program name with args.
22814 set dummy $ac_prog; ac_word=$2
22815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22816 $as_echo_n "checking for $ac_word... " >&6; }
22817 if ${ac_cv_path_DTRACE+:} false; then :
22818   $as_echo_n "(cached) " >&6
22819 else
22820   case $DTRACE in
22821   [\\/]* | ?:[\\/]*)
22822   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22823   ;;
22824   *)
22825   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22826 as_dummy="$PATH:/usr/sbin"
22827 for as_dir in $as_dummy
22828 do
22829   IFS=$as_save_IFS
22830   test -z "$as_dir" && as_dir=.
22831     for ac_exec_ext in '' $ac_executable_extensions; do
22832   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22833     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22834     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22835     break 2
22836   fi
22837 done
22838   done
22839 IFS=$as_save_IFS
22840 
22841   ;;
22842 esac
22843 fi
22844 DTRACE=$ac_cv_path_DTRACE
22845 if test -n "$DTRACE"; then
22846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22847 $as_echo "$DTRACE" >&6; }
22848 else
22849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22850 $as_echo "no" >&6; }
22851 fi
22852 
22853 
22854   test -n "$DTRACE" && break
22855 done
22856 
22857   else
22858     # The variable is set, but is it from the command line or the environment?
22859 
22860     # Try to remove the string !DTRACE! from our list.
22861     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22862     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22863       # If it failed, the variable was not from the command line. Ignore it,
22864       # but warn the user (except for BASH, which is always set by the calling BASH).
22865       if test "xDTRACE" != xBASH; then
22866         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22867 $as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22868       fi
22869       # Try to locate tool using the code snippet
22870       for ac_prog in dtrace
22871 do
22872   # Extract the first word of "$ac_prog", so it can be a program name with args.
22873 set dummy $ac_prog; ac_word=$2
22874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22875 $as_echo_n "checking for $ac_word... " >&6; }
22876 if ${ac_cv_path_DTRACE+:} false; then :
22877   $as_echo_n "(cached) " >&6
22878 else
22879   case $DTRACE in
22880   [\\/]* | ?:[\\/]*)
22881   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22882   ;;
22883   *)
22884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22885 as_dummy="$PATH:/usr/sbin"
22886 for as_dir in $as_dummy
22887 do
22888   IFS=$as_save_IFS
22889   test -z "$as_dir" && as_dir=.
22890     for ac_exec_ext in '' $ac_executable_extensions; do
22891   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22892     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22893     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22894     break 2
22895   fi
22896 done
22897   done
22898 IFS=$as_save_IFS
22899 
22900   ;;
22901 esac
22902 fi
22903 DTRACE=$ac_cv_path_DTRACE
22904 if test -n "$DTRACE"; then
22905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22906 $as_echo "$DTRACE" >&6; }
22907 else
22908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22909 $as_echo "no" >&6; }
22910 fi
22911 
22912 
22913   test -n "$DTRACE" && break
22914 done
22915 
22916     else
22917       # If it succeeded, then it was overridden by the user. We will use it
22918       # for the tool.
22919 
22920       # First remove it from the list of overridden variables, so we can test
22921       # for unknown variables in the end.
22922       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22923 
22924       # Check if we try to supply an empty value
22925       if test "x$DTRACE" = x; then
22926         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22927 $as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22928         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22929 $as_echo_n "checking for DTRACE... " >&6; }
22930         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22931 $as_echo "disabled" >&6; }
22932       else
22933         # Check if the provided tool contains a complete path.
22934         tool_specified="$DTRACE"
22935         tool_basename="${tool_specified##*/}"
22936         if test "x$tool_basename" = "x$tool_specified"; then
22937           # A command without a complete path is provided, search $PATH.
22938           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22939 $as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22940           # Extract the first word of "$tool_basename", so it can be a program name with args.
22941 set dummy $tool_basename; ac_word=$2
22942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22943 $as_echo_n "checking for $ac_word... " >&6; }
22944 if ${ac_cv_path_DTRACE+:} false; then :
22945   $as_echo_n "(cached) " >&6
22946 else
22947   case $DTRACE in
22948   [\\/]* | ?:[\\/]*)
22949   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22950   ;;
22951   *)
22952   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22953 for as_dir in $PATH
22954 do
22955   IFS=$as_save_IFS
22956   test -z "$as_dir" && as_dir=.
22957     for ac_exec_ext in '' $ac_executable_extensions; do
22958   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22959     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22960     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22961     break 2
22962   fi
22963 done
22964   done
22965 IFS=$as_save_IFS
22966 
22967   ;;
22968 esac
22969 fi
22970 DTRACE=$ac_cv_path_DTRACE
22971 if test -n "$DTRACE"; then
22972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22973 $as_echo "$DTRACE" >&6; }
22974 else
22975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22976 $as_echo "no" >&6; }
22977 fi
22978 
22979 
22980           if test "x$DTRACE" = x; then
22981             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22982           fi
22983         else
22984           # Otherwise we believe it is a complete path. Use it as it is.
22985           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22986 $as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22987           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22988 $as_echo_n "checking for DTRACE... " >&6; }
22989           if test ! -x "$tool_specified"; then
22990             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22991 $as_echo "not found" >&6; }
22992             as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22993           fi
22994           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22995 $as_echo "$tool_specified" >&6; }
22996         fi
22997       fi
22998     fi
22999 
23000   fi
23001 
23002 
23003 
23004 
23005   # Publish this variable in the help.
23006 
23007 
23008   if [ -z "${PATCH+x}" ]; then
23009     # The variable is not set by user, try to locate tool using the code snippet
23010     for ac_prog in gpatch patch
23011 do
23012   # Extract the first word of "$ac_prog", so it can be a program name with args.
23013 set dummy $ac_prog; ac_word=$2
23014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23015 $as_echo_n "checking for $ac_word... " >&6; }
23016 if ${ac_cv_path_PATCH+:} false; then :
23017   $as_echo_n "(cached) " >&6
23018 else
23019   case $PATCH in
23020   [\\/]* | ?:[\\/]*)
23021   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23022   ;;
23023   *)
23024   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23025 for as_dir in $PATH
23026 do
23027   IFS=$as_save_IFS
23028   test -z "$as_dir" && as_dir=.
23029     for ac_exec_ext in '' $ac_executable_extensions; do
23030   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23031     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23032     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23033     break 2
23034   fi
23035 done
23036   done
23037 IFS=$as_save_IFS
23038 
23039   ;;
23040 esac
23041 fi
23042 PATCH=$ac_cv_path_PATCH
23043 if test -n "$PATCH"; then
23044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23045 $as_echo "$PATCH" >&6; }
23046 else
23047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23048 $as_echo "no" >&6; }
23049 fi
23050 
23051 
23052   test -n "$PATCH" && break
23053 done
23054 
23055   else
23056     # The variable is set, but is it from the command line or the environment?
23057 
23058     # Try to remove the string !PATCH! from our list.
23059     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23060     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23061       # If it failed, the variable was not from the command line. Ignore it,
23062       # but warn the user (except for BASH, which is always set by the calling BASH).
23063       if test "xPATCH" != xBASH; then
23064         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23065 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23066       fi
23067       # Try to locate tool using the code snippet
23068       for ac_prog in gpatch patch
23069 do
23070   # Extract the first word of "$ac_prog", so it can be a program name with args.
23071 set dummy $ac_prog; ac_word=$2
23072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23073 $as_echo_n "checking for $ac_word... " >&6; }
23074 if ${ac_cv_path_PATCH+:} false; then :
23075   $as_echo_n "(cached) " >&6
23076 else
23077   case $PATCH in
23078   [\\/]* | ?:[\\/]*)
23079   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23080   ;;
23081   *)
23082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23083 for as_dir in $PATH
23084 do
23085   IFS=$as_save_IFS
23086   test -z "$as_dir" && as_dir=.
23087     for ac_exec_ext in '' $ac_executable_extensions; do
23088   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23089     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23090     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23091     break 2
23092   fi
23093 done
23094   done
23095 IFS=$as_save_IFS
23096 
23097   ;;
23098 esac
23099 fi
23100 PATCH=$ac_cv_path_PATCH
23101 if test -n "$PATCH"; then
23102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23103 $as_echo "$PATCH" >&6; }
23104 else
23105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23106 $as_echo "no" >&6; }
23107 fi
23108 
23109 
23110   test -n "$PATCH" && break
23111 done
23112 
23113     else
23114       # If it succeeded, then it was overridden by the user. We will use it
23115       # for the tool.
23116 
23117       # First remove it from the list of overridden variables, so we can test
23118       # for unknown variables in the end.
23119       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23120 
23121       # Check if we try to supply an empty value
23122       if test "x$PATCH" = x; then
23123         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23124 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23125         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23126 $as_echo_n "checking for PATCH... " >&6; }
23127         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23128 $as_echo "disabled" >&6; }
23129       else
23130         # Check if the provided tool contains a complete path.
23131         tool_specified="$PATCH"
23132         tool_basename="${tool_specified##*/}"
23133         if test "x$tool_basename" = "x$tool_specified"; then
23134           # A command without a complete path is provided, search $PATH.
23135           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23136 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23137           # Extract the first word of "$tool_basename", so it can be a program name with args.
23138 set dummy $tool_basename; ac_word=$2
23139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23140 $as_echo_n "checking for $ac_word... " >&6; }
23141 if ${ac_cv_path_PATCH+:} false; then :
23142   $as_echo_n "(cached) " >&6
23143 else
23144   case $PATCH in
23145   [\\/]* | ?:[\\/]*)
23146   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23147   ;;
23148   *)
23149   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23150 for as_dir in $PATH
23151 do
23152   IFS=$as_save_IFS
23153   test -z "$as_dir" && as_dir=.
23154     for ac_exec_ext in '' $ac_executable_extensions; do
23155   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23156     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23157     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23158     break 2
23159   fi
23160 done
23161   done
23162 IFS=$as_save_IFS
23163 
23164   ;;
23165 esac
23166 fi
23167 PATCH=$ac_cv_path_PATCH
23168 if test -n "$PATCH"; then
23169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23170 $as_echo "$PATCH" >&6; }
23171 else
23172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23173 $as_echo "no" >&6; }
23174 fi
23175 
23176 
23177           if test "x$PATCH" = x; then
23178             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23179           fi
23180         else
23181           # Otherwise we believe it is a complete path. Use it as it is.
23182           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23183 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23184           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23185 $as_echo_n "checking for PATCH... " >&6; }
23186           if test ! -x "$tool_specified"; then
23187             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23188 $as_echo "not found" >&6; }
23189             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23190           fi
23191           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23192 $as_echo "$tool_specified" >&6; }
23193         fi
23194       fi
23195     fi
23196 
23197   fi
23198 
23199 
23200   # Check if it's GNU time
23201   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23202   if test "x$IS_GNU_TIME" != x; then
23203     IS_GNU_TIME=yes
23204   else
23205     IS_GNU_TIME=no
23206   fi
23207 
23208 
23209   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23210 
23211 
23212 
23213   # Publish this variable in the help.
23214 
23215 
23216   if [ -z "${DSYMUTIL+x}" ]; then
23217     # The variable is not set by user, try to locate tool using the code snippet
23218     for ac_prog in dsymutil
23219 do
23220   # Extract the first word of "$ac_prog", so it can be a program name with args.
23221 set dummy $ac_prog; ac_word=$2
23222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23223 $as_echo_n "checking for $ac_word... " >&6; }
23224 if ${ac_cv_path_DSYMUTIL+:} false; then :
23225   $as_echo_n "(cached) " >&6
23226 else
23227   case $DSYMUTIL in
23228   [\\/]* | ?:[\\/]*)
23229   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23230   ;;
23231   *)
23232   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23233 for as_dir in $PATH
23234 do
23235   IFS=$as_save_IFS
23236   test -z "$as_dir" && as_dir=.
23237     for ac_exec_ext in '' $ac_executable_extensions; do
23238   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23239     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23240     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23241     break 2
23242   fi
23243 done
23244   done
23245 IFS=$as_save_IFS
23246 
23247   ;;
23248 esac
23249 fi
23250 DSYMUTIL=$ac_cv_path_DSYMUTIL
23251 if test -n "$DSYMUTIL"; then
23252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23253 $as_echo "$DSYMUTIL" >&6; }
23254 else
23255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23256 $as_echo "no" >&6; }
23257 fi
23258 
23259 
23260   test -n "$DSYMUTIL" && break
23261 done
23262 
23263   else
23264     # The variable is set, but is it from the command line or the environment?
23265 
23266     # Try to remove the string !DSYMUTIL! from our list.
23267     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23268     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23269       # If it failed, the variable was not from the command line. Ignore it,
23270       # but warn the user (except for BASH, which is always set by the calling BASH).
23271       if test "xDSYMUTIL" != xBASH; then
23272         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23273 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23274       fi
23275       # Try to locate tool using the code snippet
23276       for ac_prog in dsymutil
23277 do
23278   # Extract the first word of "$ac_prog", so it can be a program name with args.
23279 set dummy $ac_prog; ac_word=$2
23280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23281 $as_echo_n "checking for $ac_word... " >&6; }
23282 if ${ac_cv_path_DSYMUTIL+:} false; then :
23283   $as_echo_n "(cached) " >&6
23284 else
23285   case $DSYMUTIL in
23286   [\\/]* | ?:[\\/]*)
23287   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23288   ;;
23289   *)
23290   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23291 for as_dir in $PATH
23292 do
23293   IFS=$as_save_IFS
23294   test -z "$as_dir" && as_dir=.
23295     for ac_exec_ext in '' $ac_executable_extensions; do
23296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23297     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23299     break 2
23300   fi
23301 done
23302   done
23303 IFS=$as_save_IFS
23304 
23305   ;;
23306 esac
23307 fi
23308 DSYMUTIL=$ac_cv_path_DSYMUTIL
23309 if test -n "$DSYMUTIL"; then
23310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23311 $as_echo "$DSYMUTIL" >&6; }
23312 else
23313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23314 $as_echo "no" >&6; }
23315 fi
23316 
23317 
23318   test -n "$DSYMUTIL" && break
23319 done
23320 
23321     else
23322       # If it succeeded, then it was overridden by the user. We will use it
23323       # for the tool.
23324 
23325       # First remove it from the list of overridden variables, so we can test
23326       # for unknown variables in the end.
23327       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23328 
23329       # Check if we try to supply an empty value
23330       if test "x$DSYMUTIL" = x; then
23331         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23332 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23333         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23334 $as_echo_n "checking for DSYMUTIL... " >&6; }
23335         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23336 $as_echo "disabled" >&6; }
23337       else
23338         # Check if the provided tool contains a complete path.
23339         tool_specified="$DSYMUTIL"
23340         tool_basename="${tool_specified##*/}"
23341         if test "x$tool_basename" = "x$tool_specified"; then
23342           # A command without a complete path is provided, search $PATH.
23343           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23344 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23345           # Extract the first word of "$tool_basename", so it can be a program name with args.
23346 set dummy $tool_basename; ac_word=$2
23347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23348 $as_echo_n "checking for $ac_word... " >&6; }
23349 if ${ac_cv_path_DSYMUTIL+:} false; then :
23350   $as_echo_n "(cached) " >&6
23351 else
23352   case $DSYMUTIL in
23353   [\\/]* | ?:[\\/]*)
23354   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23355   ;;
23356   *)
23357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23358 for as_dir in $PATH
23359 do
23360   IFS=$as_save_IFS
23361   test -z "$as_dir" && as_dir=.
23362     for ac_exec_ext in '' $ac_executable_extensions; do
23363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23364     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23366     break 2
23367   fi
23368 done
23369   done
23370 IFS=$as_save_IFS
23371 
23372   ;;
23373 esac
23374 fi
23375 DSYMUTIL=$ac_cv_path_DSYMUTIL
23376 if test -n "$DSYMUTIL"; then
23377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23378 $as_echo "$DSYMUTIL" >&6; }
23379 else
23380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23381 $as_echo "no" >&6; }
23382 fi
23383 
23384 
23385           if test "x$DSYMUTIL" = x; then
23386             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23387           fi
23388         else
23389           # Otherwise we believe it is a complete path. Use it as it is.
23390           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23391 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23392           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23393 $as_echo_n "checking for DSYMUTIL... " >&6; }
23394           if test ! -x "$tool_specified"; then
23395             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23396 $as_echo "not found" >&6; }
23397             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23398           fi
23399           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23400 $as_echo "$tool_specified" >&6; }
23401         fi
23402       fi
23403     fi
23404 
23405   fi
23406 
23407 
23408 
23409   if test "x$DSYMUTIL" = x; then
23410     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23411   fi
23412 
23413 
23414 
23415 
23416 
23417   # Publish this variable in the help.
23418 
23419 
23420   if [ -z "${XATTR+x}" ]; then
23421     # The variable is not set by user, try to locate tool using the code snippet
23422     for ac_prog in xattr
23423 do
23424   # Extract the first word of "$ac_prog", so it can be a program name with args.
23425 set dummy $ac_prog; ac_word=$2
23426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23427 $as_echo_n "checking for $ac_word... " >&6; }
23428 if ${ac_cv_path_XATTR+:} false; then :
23429   $as_echo_n "(cached) " >&6
23430 else
23431   case $XATTR in
23432   [\\/]* | ?:[\\/]*)
23433   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23434   ;;
23435   *)
23436   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23437 for as_dir in $PATH
23438 do
23439   IFS=$as_save_IFS
23440   test -z "$as_dir" && as_dir=.
23441     for ac_exec_ext in '' $ac_executable_extensions; do
23442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23443     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23445     break 2
23446   fi
23447 done
23448   done
23449 IFS=$as_save_IFS
23450 
23451   ;;
23452 esac
23453 fi
23454 XATTR=$ac_cv_path_XATTR
23455 if test -n "$XATTR"; then
23456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23457 $as_echo "$XATTR" >&6; }
23458 else
23459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23460 $as_echo "no" >&6; }
23461 fi
23462 
23463 
23464   test -n "$XATTR" && break
23465 done
23466 
23467   else
23468     # The variable is set, but is it from the command line or the environment?
23469 
23470     # Try to remove the string !XATTR! from our list.
23471     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23472     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23473       # If it failed, the variable was not from the command line. Ignore it,
23474       # but warn the user (except for BASH, which is always set by the calling BASH).
23475       if test "xXATTR" != xBASH; then
23476         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23477 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23478       fi
23479       # Try to locate tool using the code snippet
23480       for ac_prog in xattr
23481 do
23482   # Extract the first word of "$ac_prog", so it can be a program name with args.
23483 set dummy $ac_prog; ac_word=$2
23484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23485 $as_echo_n "checking for $ac_word... " >&6; }
23486 if ${ac_cv_path_XATTR+:} false; then :
23487   $as_echo_n "(cached) " >&6
23488 else
23489   case $XATTR in
23490   [\\/]* | ?:[\\/]*)
23491   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23492   ;;
23493   *)
23494   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23495 for as_dir in $PATH
23496 do
23497   IFS=$as_save_IFS
23498   test -z "$as_dir" && as_dir=.
23499     for ac_exec_ext in '' $ac_executable_extensions; do
23500   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23501     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23503     break 2
23504   fi
23505 done
23506   done
23507 IFS=$as_save_IFS
23508 
23509   ;;
23510 esac
23511 fi
23512 XATTR=$ac_cv_path_XATTR
23513 if test -n "$XATTR"; then
23514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23515 $as_echo "$XATTR" >&6; }
23516 else
23517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23518 $as_echo "no" >&6; }
23519 fi
23520 
23521 
23522   test -n "$XATTR" && break
23523 done
23524 
23525     else
23526       # If it succeeded, then it was overridden by the user. We will use it
23527       # for the tool.
23528 
23529       # First remove it from the list of overridden variables, so we can test
23530       # for unknown variables in the end.
23531       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23532 
23533       # Check if we try to supply an empty value
23534       if test "x$XATTR" = x; then
23535         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23536 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23537         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23538 $as_echo_n "checking for XATTR... " >&6; }
23539         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23540 $as_echo "disabled" >&6; }
23541       else
23542         # Check if the provided tool contains a complete path.
23543         tool_specified="$XATTR"
23544         tool_basename="${tool_specified##*/}"
23545         if test "x$tool_basename" = "x$tool_specified"; then
23546           # A command without a complete path is provided, search $PATH.
23547           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23548 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23549           # Extract the first word of "$tool_basename", so it can be a program name with args.
23550 set dummy $tool_basename; ac_word=$2
23551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23552 $as_echo_n "checking for $ac_word... " >&6; }
23553 if ${ac_cv_path_XATTR+:} false; then :
23554   $as_echo_n "(cached) " >&6
23555 else
23556   case $XATTR in
23557   [\\/]* | ?:[\\/]*)
23558   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23559   ;;
23560   *)
23561   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23562 for as_dir in $PATH
23563 do
23564   IFS=$as_save_IFS
23565   test -z "$as_dir" && as_dir=.
23566     for ac_exec_ext in '' $ac_executable_extensions; do
23567   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23568     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23570     break 2
23571   fi
23572 done
23573   done
23574 IFS=$as_save_IFS
23575 
23576   ;;
23577 esac
23578 fi
23579 XATTR=$ac_cv_path_XATTR
23580 if test -n "$XATTR"; then
23581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23582 $as_echo "$XATTR" >&6; }
23583 else
23584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23585 $as_echo "no" >&6; }
23586 fi
23587 
23588 
23589           if test "x$XATTR" = x; then
23590             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23591           fi
23592         else
23593           # Otherwise we believe it is a complete path. Use it as it is.
23594           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23595 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23596           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23597 $as_echo_n "checking for XATTR... " >&6; }
23598           if test ! -x "$tool_specified"; then
23599             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23600 $as_echo "not found" >&6; }
23601             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23602           fi
23603           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23604 $as_echo "$tool_specified" >&6; }
23605         fi
23606       fi
23607     fi
23608 
23609   fi
23610 
23611 
23612 
23613   if test "x$XATTR" = x; then
23614     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23615   fi
23616 
23617 
23618 
23619 
23620   # Publish this variable in the help.
23621 
23622 
23623   if [ -z "${CODESIGN+x}" ]; then
23624     # The variable is not set by user, try to locate tool using the code snippet
23625     for ac_prog in codesign
23626 do
23627   # Extract the first word of "$ac_prog", so it can be a program name with args.
23628 set dummy $ac_prog; ac_word=$2
23629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23630 $as_echo_n "checking for $ac_word... " >&6; }
23631 if ${ac_cv_path_CODESIGN+:} false; then :
23632   $as_echo_n "(cached) " >&6
23633 else
23634   case $CODESIGN in
23635   [\\/]* | ?:[\\/]*)
23636   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23637   ;;
23638   *)
23639   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23640 for as_dir in $PATH
23641 do
23642   IFS=$as_save_IFS
23643   test -z "$as_dir" && as_dir=.
23644     for ac_exec_ext in '' $ac_executable_extensions; do
23645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23646     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23648     break 2
23649   fi
23650 done
23651   done
23652 IFS=$as_save_IFS
23653 
23654   ;;
23655 esac
23656 fi
23657 CODESIGN=$ac_cv_path_CODESIGN
23658 if test -n "$CODESIGN"; then
23659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23660 $as_echo "$CODESIGN" >&6; }
23661 else
23662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23663 $as_echo "no" >&6; }
23664 fi
23665 
23666 
23667   test -n "$CODESIGN" && break
23668 done
23669 
23670   else
23671     # The variable is set, but is it from the command line or the environment?
23672 
23673     # Try to remove the string !CODESIGN! from our list.
23674     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23675     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23676       # If it failed, the variable was not from the command line. Ignore it,
23677       # but warn the user (except for BASH, which is always set by the calling BASH).
23678       if test "xCODESIGN" != xBASH; then
23679         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23680 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23681       fi
23682       # Try to locate tool using the code snippet
23683       for ac_prog in codesign
23684 do
23685   # Extract the first word of "$ac_prog", so it can be a program name with args.
23686 set dummy $ac_prog; ac_word=$2
23687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23688 $as_echo_n "checking for $ac_word... " >&6; }
23689 if ${ac_cv_path_CODESIGN+:} false; then :
23690   $as_echo_n "(cached) " >&6
23691 else
23692   case $CODESIGN in
23693   [\\/]* | ?:[\\/]*)
23694   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23695   ;;
23696   *)
23697   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23698 for as_dir in $PATH
23699 do
23700   IFS=$as_save_IFS
23701   test -z "$as_dir" && as_dir=.
23702     for ac_exec_ext in '' $ac_executable_extensions; do
23703   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23704     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23705     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23706     break 2
23707   fi
23708 done
23709   done
23710 IFS=$as_save_IFS
23711 
23712   ;;
23713 esac
23714 fi
23715 CODESIGN=$ac_cv_path_CODESIGN
23716 if test -n "$CODESIGN"; then
23717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23718 $as_echo "$CODESIGN" >&6; }
23719 else
23720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23721 $as_echo "no" >&6; }
23722 fi
23723 
23724 
23725   test -n "$CODESIGN" && break
23726 done
23727 
23728     else
23729       # If it succeeded, then it was overridden by the user. We will use it
23730       # for the tool.
23731 
23732       # First remove it from the list of overridden variables, so we can test
23733       # for unknown variables in the end.
23734       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23735 
23736       # Check if we try to supply an empty value
23737       if test "x$CODESIGN" = x; then
23738         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23739 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23740         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23741 $as_echo_n "checking for CODESIGN... " >&6; }
23742         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23743 $as_echo "disabled" >&6; }
23744       else
23745         # Check if the provided tool contains a complete path.
23746         tool_specified="$CODESIGN"
23747         tool_basename="${tool_specified##*/}"
23748         if test "x$tool_basename" = "x$tool_specified"; then
23749           # A command without a complete path is provided, search $PATH.
23750           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23751 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23752           # Extract the first word of "$tool_basename", so it can be a program name with args.
23753 set dummy $tool_basename; ac_word=$2
23754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23755 $as_echo_n "checking for $ac_word... " >&6; }
23756 if ${ac_cv_path_CODESIGN+:} false; then :
23757   $as_echo_n "(cached) " >&6
23758 else
23759   case $CODESIGN in
23760   [\\/]* | ?:[\\/]*)
23761   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23762   ;;
23763   *)
23764   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23765 for as_dir in $PATH
23766 do
23767   IFS=$as_save_IFS
23768   test -z "$as_dir" && as_dir=.
23769     for ac_exec_ext in '' $ac_executable_extensions; do
23770   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23771     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23772     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23773     break 2
23774   fi
23775 done
23776   done
23777 IFS=$as_save_IFS
23778 
23779   ;;
23780 esac
23781 fi
23782 CODESIGN=$ac_cv_path_CODESIGN
23783 if test -n "$CODESIGN"; then
23784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23785 $as_echo "$CODESIGN" >&6; }
23786 else
23787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23788 $as_echo "no" >&6; }
23789 fi
23790 
23791 
23792           if test "x$CODESIGN" = x; then
23793             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23794           fi
23795         else
23796           # Otherwise we believe it is a complete path. Use it as it is.
23797           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23798 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23799           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23800 $as_echo_n "checking for CODESIGN... " >&6; }
23801           if test ! -x "$tool_specified"; then
23802             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23803 $as_echo "not found" >&6; }
23804             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23805           fi
23806           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23807 $as_echo "$tool_specified" >&6; }
23808         fi
23809       fi
23810     fi
23811 
23812   fi
23813 
23814 
23815     if test "x$CODESIGN" != "x"; then
23816       # Verify that the openjdk_codesign certificate is present
23817       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23818 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23819       $RM codesign-testfile
23820       $TOUCH codesign-testfile
23821       $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23822       $RM codesign-testfile
23823       if test "x$CODESIGN" = x; then
23824         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23825 $as_echo "no" >&6; }
23826       else
23827         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23828 $as_echo "yes" >&6; }
23829       fi
23830     fi
23831 
23832 
23833 
23834   # Publish this variable in the help.
23835 
23836 
23837   if [ -z "${SETFILE+x}" ]; then
23838     # The variable is not set by user, try to locate tool using the code snippet
23839     for ac_prog in SetFile
23840 do
23841   # Extract the first word of "$ac_prog", so it can be a program name with args.
23842 set dummy $ac_prog; ac_word=$2
23843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23844 $as_echo_n "checking for $ac_word... " >&6; }
23845 if ${ac_cv_path_SETFILE+:} false; then :
23846   $as_echo_n "(cached) " >&6
23847 else
23848   case $SETFILE in
23849   [\\/]* | ?:[\\/]*)
23850   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23851   ;;
23852   *)
23853   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23854 for as_dir in $PATH
23855 do
23856   IFS=$as_save_IFS
23857   test -z "$as_dir" && as_dir=.
23858     for ac_exec_ext in '' $ac_executable_extensions; do
23859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23860     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23862     break 2
23863   fi
23864 done
23865   done
23866 IFS=$as_save_IFS
23867 
23868   ;;
23869 esac
23870 fi
23871 SETFILE=$ac_cv_path_SETFILE
23872 if test -n "$SETFILE"; then
23873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23874 $as_echo "$SETFILE" >&6; }
23875 else
23876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23877 $as_echo "no" >&6; }
23878 fi
23879 
23880 
23881   test -n "$SETFILE" && break
23882 done
23883 
23884   else
23885     # The variable is set, but is it from the command line or the environment?
23886 
23887     # Try to remove the string !SETFILE! from our list.
23888     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23889     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23890       # If it failed, the variable was not from the command line. Ignore it,
23891       # but warn the user (except for BASH, which is always set by the calling BASH).
23892       if test "xSETFILE" != xBASH; then
23893         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23894 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23895       fi
23896       # Try to locate tool using the code snippet
23897       for ac_prog in SetFile
23898 do
23899   # Extract the first word of "$ac_prog", so it can be a program name with args.
23900 set dummy $ac_prog; ac_word=$2
23901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23902 $as_echo_n "checking for $ac_word... " >&6; }
23903 if ${ac_cv_path_SETFILE+:} false; then :
23904   $as_echo_n "(cached) " >&6
23905 else
23906   case $SETFILE in
23907   [\\/]* | ?:[\\/]*)
23908   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23909   ;;
23910   *)
23911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23912 for as_dir in $PATH
23913 do
23914   IFS=$as_save_IFS
23915   test -z "$as_dir" && as_dir=.
23916     for ac_exec_ext in '' $ac_executable_extensions; do
23917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23918     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23920     break 2
23921   fi
23922 done
23923   done
23924 IFS=$as_save_IFS
23925 
23926   ;;
23927 esac
23928 fi
23929 SETFILE=$ac_cv_path_SETFILE
23930 if test -n "$SETFILE"; then
23931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23932 $as_echo "$SETFILE" >&6; }
23933 else
23934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23935 $as_echo "no" >&6; }
23936 fi
23937 
23938 
23939   test -n "$SETFILE" && break
23940 done
23941 
23942     else
23943       # If it succeeded, then it was overridden by the user. We will use it
23944       # for the tool.
23945 
23946       # First remove it from the list of overridden variables, so we can test
23947       # for unknown variables in the end.
23948       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23949 
23950       # Check if we try to supply an empty value
23951       if test "x$SETFILE" = x; then
23952         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23953 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23954         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23955 $as_echo_n "checking for SETFILE... " >&6; }
23956         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23957 $as_echo "disabled" >&6; }
23958       else
23959         # Check if the provided tool contains a complete path.
23960         tool_specified="$SETFILE"
23961         tool_basename="${tool_specified##*/}"
23962         if test "x$tool_basename" = "x$tool_specified"; then
23963           # A command without a complete path is provided, search $PATH.
23964           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23965 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23966           # Extract the first word of "$tool_basename", so it can be a program name with args.
23967 set dummy $tool_basename; ac_word=$2
23968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23969 $as_echo_n "checking for $ac_word... " >&6; }
23970 if ${ac_cv_path_SETFILE+:} false; then :
23971   $as_echo_n "(cached) " >&6
23972 else
23973   case $SETFILE in
23974   [\\/]* | ?:[\\/]*)
23975   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23976   ;;
23977   *)
23978   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23979 for as_dir in $PATH
23980 do
23981   IFS=$as_save_IFS
23982   test -z "$as_dir" && as_dir=.
23983     for ac_exec_ext in '' $ac_executable_extensions; do
23984   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23985     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23986     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23987     break 2
23988   fi
23989 done
23990   done
23991 IFS=$as_save_IFS
23992 
23993   ;;
23994 esac
23995 fi
23996 SETFILE=$ac_cv_path_SETFILE
23997 if test -n "$SETFILE"; then
23998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23999 $as_echo "$SETFILE" >&6; }
24000 else
24001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24002 $as_echo "no" >&6; }
24003 fi
24004 
24005 
24006           if test "x$SETFILE" = x; then
24007             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24008           fi
24009         else
24010           # Otherwise we believe it is a complete path. Use it as it is.
24011           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24012 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24013           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24014 $as_echo_n "checking for SETFILE... " >&6; }
24015           if test ! -x "$tool_specified"; then
24016             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24017 $as_echo "not found" >&6; }
24018             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24019           fi
24020           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24021 $as_echo "$tool_specified" >&6; }
24022         fi
24023       fi
24024     fi
24025 
24026   fi
24027 
24028 
24029 
24030   if test "x$SETFILE" = x; then
24031     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24032   fi
24033 
24034 
24035   fi
24036 
24037 
24038   # Test if bash supports pipefail.
24039   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24040 $as_echo_n "checking if bash supports pipefail... " >&6; }
24041   if ${BASH} -c 'set -o pipefail'; then
24042     BASH_ARGS="$BASH_ARGS -o pipefail"
24043     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24044 $as_echo "yes" >&6; }
24045   else
24046     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24047 $as_echo "no" >&6; }
24048   fi
24049 
24050   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24051 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24052   if ${BASH} -e -c 'true'; then
24053     BASH_ARGS="$BASH_ARGS -e"
24054     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24055 $as_echo "yes" >&6; }
24056   else
24057     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24058 $as_echo "no" >&6; }
24059   fi
24060 
24061 
24062 
24063 
24064 # Check if pkg-config is available.
24065 
24066 
24067 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24068         if test -n "$ac_tool_prefix"; then
24069   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24070 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24072 $as_echo_n "checking for $ac_word... " >&6; }
24073 if ${ac_cv_path_PKG_CONFIG+:} false; then :
24074   $as_echo_n "(cached) " >&6
24075 else
24076   case $PKG_CONFIG in
24077   [\\/]* | ?:[\\/]*)
24078   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24079   ;;
24080   *)
24081   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24082 for as_dir in $PATH
24083 do
24084   IFS=$as_save_IFS
24085   test -z "$as_dir" && as_dir=.
24086     for ac_exec_ext in '' $ac_executable_extensions; do
24087   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24088     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24089     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24090     break 2
24091   fi
24092 done
24093   done
24094 IFS=$as_save_IFS
24095 
24096   ;;
24097 esac
24098 fi
24099 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24100 if test -n "$PKG_CONFIG"; then
24101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24102 $as_echo "$PKG_CONFIG" >&6; }
24103 else
24104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24105 $as_echo "no" >&6; }
24106 fi
24107 
24108 
24109 fi
24110 if test -z "$ac_cv_path_PKG_CONFIG"; then
24111   ac_pt_PKG_CONFIG=$PKG_CONFIG
24112   # Extract the first word of "pkg-config", so it can be a program name with args.
24113 set dummy pkg-config; ac_word=$2
24114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24115 $as_echo_n "checking for $ac_word... " >&6; }
24116 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24117   $as_echo_n "(cached) " >&6
24118 else
24119   case $ac_pt_PKG_CONFIG in
24120   [\\/]* | ?:[\\/]*)
24121   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24122   ;;
24123   *)
24124   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24125 for as_dir in $PATH
24126 do
24127   IFS=$as_save_IFS
24128   test -z "$as_dir" && as_dir=.
24129     for ac_exec_ext in '' $ac_executable_extensions; do
24130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24131     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24133     break 2
24134   fi
24135 done
24136   done
24137 IFS=$as_save_IFS
24138 
24139   ;;
24140 esac
24141 fi
24142 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24143 if test -n "$ac_pt_PKG_CONFIG"; then
24144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24145 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
24146 else
24147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24148 $as_echo "no" >&6; }
24149 fi
24150 
24151   if test "x$ac_pt_PKG_CONFIG" = x; then
24152     PKG_CONFIG=""
24153   else
24154     case $cross_compiling:$ac_tool_warned in
24155 yes:)
24156 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24157 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24158 ac_tool_warned=yes ;;
24159 esac
24160     PKG_CONFIG=$ac_pt_PKG_CONFIG
24161   fi
24162 else
24163   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24164 fi
24165 
24166 fi
24167 if test -n "$PKG_CONFIG"; then
24168         _pkg_min_version=0.9.0
24169         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24170 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24171         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24172                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24173 $as_echo "yes" >&6; }
24174         else
24175                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24176 $as_echo "no" >&6; }
24177                 PKG_CONFIG=""
24178         fi
24179 
24180 fi
24181 
24182 # After basic tools have been setup, we can check build os specific details.
24183 
24184   ###############################################################################
24185 
24186   # Note that this is the build platform OS version!
24187 
24188   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24189   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24190   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24191   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24192 
24193 
24194 
24195 
24196 
24197 # Misc basic settings
24198 
24199 
24200 # Check whether --with-default-make-target was given.
24201 if test "${with_default_make_target+set}" = set; then :
24202   withval=$with_default_make_target;
24203 fi
24204 
24205   if test "x$with_default_make_target" = "x" \
24206       || test "x$with_default_make_target" = "xyes"; then
24207     DEFAULT_MAKE_TARGET="exploded-image"
24208   elif test "x$with_default_make_target" = "xno"; then
24209     as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24210   else
24211     DEFAULT_MAKE_TARGET="$with_default_make_target"
24212   fi
24213 
24214 
24215 
24216 
24217 ###############################################################################
24218 #
24219 # Determine OpenJDK variants, options and version numbers.
24220 #
24221 ###############################################################################
24222 
24223 # We need build & target for this.
24224 
24225   # Should we build a JDK without a graphical UI?
24226   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24227 $as_echo_n "checking headless only... " >&6; }
24228   # Check whether --enable-headless-only was given.
24229 if test "${enable_headless_only+set}" = set; then :
24230   enableval=$enable_headless_only;
24231 fi
24232 
24233 
24234   if test "x$enable_headless_only" = "xyes"; then
24235     ENABLE_HEADLESS_ONLY="true"
24236     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24237 $as_echo "yes" >&6; }
24238   elif test "x$enable_headless_only" = "xno"; then
24239     ENABLE_HEADLESS_ONLY="false"
24240     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24241 $as_echo "no" >&6; }
24242   elif test "x$enable_headless_only" = "x"; then
24243     ENABLE_HEADLESS_ONLY="false"
24244     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24245 $as_echo "no" >&6; }
24246   else
24247     as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24248   fi
24249 
24250 
24251 
24252   # Choose cacerts source file
24253 
24254 # Check whether --with-cacerts-file was given.
24255 if test "${with_cacerts_file+set}" = set; then :
24256   withval=$with_cacerts_file;
24257 fi
24258 
24259   if test "x$with_cacerts_file" != x; then
24260     CACERTS_FILE=$with_cacerts_file
24261   fi
24262 
24263 
24264   # Enable or disable unlimited crypto
24265   # Check whether --enable-unlimited-crypto was given.
24266 if test "${enable_unlimited_crypto+set}" = set; then :
24267   enableval=$enable_unlimited_crypto;
24268 else
24269   enable_unlimited_crypto=yes
24270 fi
24271 
24272   if test "x$enable_unlimited_crypto" = "xyes"; then
24273     UNLIMITED_CRYPTO=true
24274   else
24275     UNLIMITED_CRYPTO=false
24276   fi
24277 
24278 
24279   # Should we build the serviceability agent (SA)?
24280   INCLUDE_SA=true
24281   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24282     INCLUDE_SA=false
24283   fi
24284   if test "x$OPENJDK_TARGET_OS" = xaix ; then
24285     INCLUDE_SA=false
24286   fi
24287 
24288 
24289   # Compress jars
24290   COMPRESS_JARS=false
24291 
24292 
24293 
24294   # Setup default copyright year. Mostly overridden when building close to a new year.
24295 
24296 # Check whether --with-copyright-year was given.
24297 if test "${with_copyright_year+set}" = set; then :
24298   withval=$with_copyright_year;
24299 fi
24300 
24301   if test "x$with_copyright_year" = xyes; then
24302     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24303   elif test "x$with_copyright_year" != x; then
24304     COPYRIGHT_YEAR="$with_copyright_year"
24305   else
24306     COPYRIGHT_YEAR=`$DATE +'%Y'`
24307   fi
24308 
24309 
24310 
24311   # Check whether --enable-keep-packaged-modules was given.
24312 if test "${enable_keep_packaged_modules+set}" = set; then :
24313   enableval=$enable_keep_packaged_modules;
24314 fi
24315 
24316 
24317   if test "x$enable_keep_packaged_modules" = "xyes"; then
24318     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24319 $as_echo_n "checking if packaged modules are kept... " >&6; }
24320     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24321 $as_echo "yes" >&6; }
24322     JLINK_KEEP_PACKAGED_MODULES=true
24323   elif test "x$enable_keep_packaged_modules" = "xno"; then
24324     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24325 $as_echo_n "checking if packaged modules are kept... " >&6; }
24326     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24327 $as_echo "no" >&6; }
24328     JLINK_KEEP_PACKAGED_MODULES=false
24329   elif test "x$enable_keep_packaged_modules" = "x"; then
24330     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24331 $as_echo "yes (default)" >&6; }
24332     JLINK_KEEP_PACKAGED_MODULES=true
24333   else
24334     as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24335   fi
24336 
24337 
24338 
24339 
24340   # Warn user that old version arguments are deprecated.
24341 
24342 
24343 # Check whether --with-milestone was given.
24344 if test "${with_milestone+set}" = set; then :
24345   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24346 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24347 fi
24348 
24349 
24350 
24351 
24352 # Check whether --with-update-version was given.
24353 if test "${with_update_version+set}" = set; then :
24354   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24355 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24356 fi
24357 
24358 
24359 
24360 
24361 # Check whether --with-user-release-suffix was given.
24362 if test "${with_user_release_suffix+set}" = set; then :
24363   withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
24364 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24365 fi
24366 
24367 
24368 
24369 
24370 # Check whether --with-build-number was given.
24371 if test "${with_build_number+set}" = set; then :
24372   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24373 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24374 fi
24375 
24376 
24377 
24378   # Source the version numbers file
24379   . $AUTOCONF_DIR/version-numbers
24380 
24381   # Some non-version number information is set in that file
24382 
24383 
24384 
24385 
24386 
24387 
24388 
24389 
24390 
24391   # Override version from arguments
24392 
24393   # If --with-version-string is set, process it first. It is possible to
24394   # override parts with more specific flags, since these are processed later.
24395 
24396 # Check whether --with-version-string was given.
24397 if test "${with_version_string+set}" = set; then :
24398   withval=$with_version_string;
24399 fi
24400 
24401   if test "x$with_version_string" = xyes; then
24402     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24403   elif test "x$with_version_string" != x; then
24404     # Additional [] needed to keep m4 from mangling shell constructs.
24405     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24406       VERSION_MAJOR=${BASH_REMATCH[1]}
24407       VERSION_MINOR=${BASH_REMATCH[3]}
24408       VERSION_SECURITY=${BASH_REMATCH[5]}
24409       VERSION_PATCH=${BASH_REMATCH[7]}
24410       VERSION_PRE=${BASH_REMATCH[9]}
24411       version_plus_separator=${BASH_REMATCH[11]}
24412       VERSION_BUILD=${BASH_REMATCH[12]}
24413       VERSION_OPT=${BASH_REMATCH[14]}
24414       # Unspecified numerical fields are interpreted as 0.
24415       if test "x$VERSION_MINOR" = x; then
24416         VERSION_MINOR=0
24417       fi
24418       if test "x$VERSION_SECURITY" = x; then
24419         VERSION_SECURITY=0
24420       fi
24421       if test "x$VERSION_PATCH" = x; then
24422         VERSION_PATCH=0
24423       fi
24424       if test "x$version_plus_separator" != x \
24425           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24426         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24427       fi
24428       # Stop the version part process from setting default values.
24429       # We still allow them to explicitly override though.
24430       NO_DEFAULT_VERSION_PARTS=true
24431     else
24432       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24433     fi
24434   fi
24435 
24436 
24437 # Check whether --with-version-pre was given.
24438 if test "${with_version_pre+set}" = set; then :
24439   withval=$with_version_pre; with_version_pre_present=true
24440 else
24441   with_version_pre_present=false
24442 fi
24443 
24444 
24445   if test "x$with_version_pre_present" = xtrue; then
24446     if test "x$with_version_pre" = xyes; then
24447       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24448     elif test "x$with_version_pre" = xno; then
24449       # Interpret --without-* as empty string instead of the literal "no"
24450       VERSION_PRE=
24451     else
24452       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24453        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24454       if test "x$VERSION_PRE" != "x$with_version_pre"; then
24455         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24456 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24457       fi
24458     fi
24459   else
24460     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24461       # Default is to use "internal" as pre
24462       VERSION_PRE="internal"
24463     fi
24464   fi
24465 
24466 
24467 # Check whether --with-version-opt was given.
24468 if test "${with_version_opt+set}" = set; then :
24469   withval=$with_version_opt; with_version_opt_present=true
24470 else
24471   with_version_opt_present=false
24472 fi
24473 
24474 
24475   if test "x$with_version_opt_present" = xtrue; then
24476     if test "x$with_version_opt" = xyes; then
24477       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24478     elif test "x$with_version_opt" = xno; then
24479       # Interpret --without-* as empty string instead of the literal "no"
24480       VERSION_OPT=
24481     else
24482       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24483        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24484       if test "x$VERSION_OPT" != "x$with_version_opt"; then
24485         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24486 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24487       fi
24488     fi
24489   else
24490     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24491       # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24492       # Outer [ ] to quote m4.
24493        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24494       VERSION_OPT="adhoc.$USERNAME.$basedirname"
24495     fi
24496   fi
24497 
24498 
24499 # Check whether --with-version-build was given.
24500 if test "${with_version_build+set}" = set; then :
24501   withval=$with_version_build; with_version_build_present=true
24502 else
24503   with_version_build_present=false
24504 fi
24505 
24506 
24507   if test "x$with_version_build_present" = xtrue; then
24508     if test "x$with_version_build" = xyes; then
24509       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24510     elif test "x$with_version_build" = xno; then
24511       # Interpret --without-* as empty string instead of the literal "no"
24512       VERSION_BUILD=
24513     elif test "x$with_version_build" = x; then
24514       VERSION_BUILD=
24515     else
24516 
24517   # Additional [] needed to keep m4 from mangling shell constructs.
24518   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24519     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24520   fi
24521   # Extract the version number without leading zeros.
24522   cleaned_value=${BASH_REMATCH[1]}
24523   if test "x$cleaned_value" = x; then
24524     # Special case for zero
24525     cleaned_value=${BASH_REMATCH[2]}
24526   fi
24527 
24528   if test $cleaned_value -gt 255; then
24529     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24530   fi
24531   if test "x$cleaned_value" != "x$with_version_build"; then
24532     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24533 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24534   fi
24535   VERSION_BUILD=$cleaned_value
24536 
24537     fi
24538   else
24539     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24540       # Default is to not have a build number.
24541       VERSION_BUILD=""
24542       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24543       VERSION_BUILD=0
24544     fi
24545   fi
24546 
24547 
24548 # Check whether --with-version-major was given.
24549 if test "${with_version_major+set}" = set; then :
24550   withval=$with_version_major; with_version_major_present=true
24551 else
24552   with_version_major_present=false
24553 fi
24554 
24555 
24556   if test "x$with_version_major_present" = xtrue; then
24557     if test "x$with_version_major" = xyes; then
24558       as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24559     else
24560 
24561   # Additional [] needed to keep m4 from mangling shell constructs.
24562   if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24563     as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24564   fi
24565   # Extract the version number without leading zeros.
24566   cleaned_value=${BASH_REMATCH[1]}
24567   if test "x$cleaned_value" = x; then
24568     # Special case for zero
24569     cleaned_value=${BASH_REMATCH[2]}
24570   fi
24571 
24572   if test $cleaned_value -gt 255; then
24573     as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24574   fi
24575   if test "x$cleaned_value" != "x$with_version_major"; then
24576     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24577 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24578   fi
24579   VERSION_MAJOR=$cleaned_value
24580 
24581     fi
24582   else
24583     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24584       # Default is to get value from version-numbers
24585       VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24586     fi
24587   fi
24588 
24589 
24590 # Check whether --with-version-minor was given.
24591 if test "${with_version_minor+set}" = set; then :
24592   withval=$with_version_minor; with_version_minor_present=true
24593 else
24594   with_version_minor_present=false
24595 fi
24596 
24597 
24598   if test "x$with_version_minor_present" = xtrue; then
24599     if test "x$with_version_minor" = xyes; then
24600       as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24601     elif test "x$with_version_minor" = xno; then
24602       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24603       VERSION_MINOR=0
24604     elif test "x$with_version_minor" = x; then
24605       VERSION_MINOR=0
24606     else
24607 
24608   # Additional [] needed to keep m4 from mangling shell constructs.
24609   if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24610     as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24611   fi
24612   # Extract the version number without leading zeros.
24613   cleaned_value=${BASH_REMATCH[1]}
24614   if test "x$cleaned_value" = x; then
24615     # Special case for zero
24616     cleaned_value=${BASH_REMATCH[2]}
24617   fi
24618 
24619   if test $cleaned_value -gt 255; then
24620     as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24621   fi
24622   if test "x$cleaned_value" != "x$with_version_minor"; then
24623     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24624 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24625   fi
24626   VERSION_MINOR=$cleaned_value
24627 
24628     fi
24629   else
24630     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24631       # Default is 0, if unspecified
24632       VERSION_MINOR=0
24633     fi
24634   fi
24635 
24636 
24637 # Check whether --with-version-security was given.
24638 if test "${with_version_security+set}" = set; then :
24639   withval=$with_version_security; with_version_security_present=true
24640 else
24641   with_version_security_present=false
24642 fi
24643 
24644 
24645   if test "x$with_version_security_present" = xtrue; then
24646     if test "x$with_version_security" = xyes; then
24647       as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24648     elif test "x$with_version_security" = xno; then
24649       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24650       VERSION_SECURITY=0
24651     elif test "x$with_version_security" = x; then
24652       VERSION_SECURITY=0
24653     else
24654 
24655   # Additional [] needed to keep m4 from mangling shell constructs.
24656   if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24657     as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24658   fi
24659   # Extract the version number without leading zeros.
24660   cleaned_value=${BASH_REMATCH[1]}
24661   if test "x$cleaned_value" = x; then
24662     # Special case for zero
24663     cleaned_value=${BASH_REMATCH[2]}
24664   fi
24665 
24666   if test $cleaned_value -gt 255; then
24667     as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24668   fi
24669   if test "x$cleaned_value" != "x$with_version_security"; then
24670     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24671 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24672   fi
24673   VERSION_SECURITY=$cleaned_value
24674 
24675     fi
24676   else
24677     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24678       # Default is 0, if unspecified
24679       VERSION_SECURITY=0
24680     fi
24681   fi
24682 
24683 
24684 # Check whether --with-version-patch was given.
24685 if test "${with_version_patch+set}" = set; then :
24686   withval=$with_version_patch; with_version_patch_present=true
24687 else
24688   with_version_patch_present=false
24689 fi
24690 
24691 
24692   if test "x$with_version_patch_present" = xtrue; then
24693     if test "x$with_version_patch" = xyes; then
24694       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24695     elif test "x$with_version_patch" = xno; then
24696       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24697       VERSION_PATCH=0
24698     elif test "x$with_version_patch" = x; then
24699       VERSION_PATCH=0
24700     else
24701 
24702   # Additional [] needed to keep m4 from mangling shell constructs.
24703   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24704     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24705   fi
24706   # Extract the version number without leading zeros.
24707   cleaned_value=${BASH_REMATCH[1]}
24708   if test "x$cleaned_value" = x; then
24709     # Special case for zero
24710     cleaned_value=${BASH_REMATCH[2]}
24711   fi
24712 
24713   if test $cleaned_value -gt 255; then
24714     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24715   fi
24716   if test "x$cleaned_value" != "x$with_version_patch"; then
24717     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24718 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24719   fi
24720   VERSION_PATCH=$cleaned_value
24721 
24722     fi
24723   else
24724     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24725       # Default is 0, if unspecified
24726       VERSION_PATCH=0
24727     fi
24728   fi
24729 
24730   # Calculate derived version properties
24731 
24732   # Set VERSION_IS_GA based on if VERSION_PRE has a value
24733   if test "x$VERSION_PRE" = x; then
24734     VERSION_IS_GA=true
24735   else
24736     VERSION_IS_GA=false
24737   fi
24738 
24739   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24740   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24741 
24742   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24743   # Strip trailing zeroes from stripped_version_number
24744   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24745   VERSION_NUMBER=$stripped_version_number
24746 
24747   # The complete version string, with additional build information
24748   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24749     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24750   else
24751     # If either build or opt is set, we need a + separator
24752     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24753   fi
24754 
24755   # The short version string, just VERSION_NUMBER and PRE, if present.
24756   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24757 
24758   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24759 $as_echo_n "checking for version string... " >&6; }
24760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24761 $as_echo "$VERSION_STRING" >&6; }
24762 
24763 
24764 
24765 
24766 
24767 
24768 
24769 
24770 
24771 
24772 
24773 
24774 
24775 
24776 
24777 ###############################################################################
24778 #
24779 # Setup BootJDK, used to bootstrap the build.
24780 #
24781 ###############################################################################
24782 
24783 
24784   BOOT_JDK_FOUND=no
24785 
24786 # Check whether --with-boot-jdk was given.
24787 if test "${with_boot_jdk+set}" = set; then :
24788   withval=$with_boot_jdk;
24789 fi
24790 
24791 
24792   # We look for the Boot JDK through various means, going from more certain to
24793   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24794   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24795   # must check if this is indeed valid; otherwise we'll continue looking.
24796 
24797   # Test: Is bootjdk explicitly set by command line arguments?
24798 
24799   if test "x$BOOT_JDK_FOUND" = xno; then
24800     # Now execute the test
24801 
24802   if test "x$with_boot_jdk" != x; then
24803     BOOT_JDK=$with_boot_jdk
24804     BOOT_JDK_FOUND=maybe
24805     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24806 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24807   fi
24808 
24809 
24810     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24811     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24812       # Do we have a bin/java?
24813       if test ! -x "$BOOT_JDK/bin/java"; then
24814         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24815 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24816         BOOT_JDK_FOUND=no
24817       else
24818         # Do we have a bin/javac?
24819         if test ! -x "$BOOT_JDK/bin/javac"; then
24820           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24821 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24822           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24823 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24824           BOOT_JDK_FOUND=no
24825         else
24826           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24827           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24828 
24829           # Extra M4 quote needed to protect [] in grep expression.
24830           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24831           if test "x$FOUND_CORRECT_VERSION" = x; then
24832             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24833 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24834             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24835 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24836             BOOT_JDK_FOUND=no
24837           else
24838             # We're done! :-)
24839             BOOT_JDK_FOUND=yes
24840 
24841   # Only process if variable expands to non-empty
24842 
24843   if test "x$BOOT_JDK" != x; then
24844     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24845 
24846   # Input might be given as Windows format, start by converting to
24847   # unix format.
24848   path="$BOOT_JDK"
24849   new_path=`$CYGPATH -u "$path"`
24850 
24851   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24852   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24853   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24854   # "foo.exe" is OK but "foo" is an error.
24855   #
24856   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24857   # It is also a way to make sure we got the proper file name for the real test later on.
24858   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24859   if test "x$test_shortpath" = x; then
24860     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24861 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24862     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24863   fi
24864 
24865   # Call helper function which possibly converts this using DOS-style short mode.
24866   # If so, the updated path is stored in $new_path.
24867 
24868   input_path="$new_path"
24869   # Check if we need to convert this using DOS-style short mode. If the path
24870   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24871   # take no chances and rewrite it.
24872   # Note: m4 eats our [], so we need to use [ and ] instead.
24873   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24874   if test "x$has_forbidden_chars" != x; then
24875     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24876     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24877     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24878     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24879       # Going to short mode and back again did indeed matter. Since short mode is
24880       # case insensitive, let's make it lowercase to improve readability.
24881       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24882       # Now convert it back to Unix-style (cygpath)
24883       input_path=`$CYGPATH -u "$shortmode_path"`
24884       new_path="$input_path"
24885     fi
24886   fi
24887 
24888   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24889   if test "x$test_cygdrive_prefix" = x; then
24890     # As a simple fix, exclude /usr/bin since it's not a real path.
24891     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24892       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24893       # a path prefixed by /cygdrive for fixpath to work.
24894       new_path="$CYGWIN_ROOT_PATH$input_path"
24895     fi
24896   fi
24897 
24898 
24899   if test "x$path" != "x$new_path"; then
24900     BOOT_JDK="$new_path"
24901     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24902 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24903   fi
24904 
24905     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24906 
24907   path="$BOOT_JDK"
24908   has_colon=`$ECHO $path | $GREP ^.:`
24909   new_path="$path"
24910   if test "x$has_colon" = x; then
24911     # Not in mixed or Windows style, start by that.
24912     new_path=`cmd //c echo $path`
24913   fi
24914 
24915 
24916   input_path="$new_path"
24917   # Check if we need to convert this using DOS-style short mode. If the path
24918   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24919   # take no chances and rewrite it.
24920   # Note: m4 eats our [], so we need to use [ and ] instead.
24921   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24922   if test "x$has_forbidden_chars" != x; then
24923     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24924     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24925   fi
24926 
24927 
24928   windows_path="$new_path"
24929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24930     unix_path=`$CYGPATH -u "$windows_path"`
24931     new_path="$unix_path"
24932   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24933     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24934     new_path="$unix_path"
24935   fi
24936 
24937   if test "x$path" != "x$new_path"; then
24938     BOOT_JDK="$new_path"
24939     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24940 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24941   fi
24942 
24943   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24944   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24945 
24946     else
24947       # We're on a unix platform. Hooray! :)
24948       path="$BOOT_JDK"
24949       has_space=`$ECHO "$path" | $GREP " "`
24950       if test "x$has_space" != x; then
24951         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24952 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24953         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24954       fi
24955 
24956       # Use eval to expand a potential ~
24957       eval path="$path"
24958       if test ! -f "$path" && test ! -d "$path"; then
24959         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24960       fi
24961 
24962       if test -d "$path"; then
24963         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24964       else
24965         dir="`$DIRNAME "$path"`"
24966         base="`$BASENAME "$path"`"
24967         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24968       fi
24969     fi
24970   fi
24971 
24972             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24973 $as_echo_n "checking for Boot JDK... " >&6; }
24974             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24975 $as_echo "$BOOT_JDK" >&6; }
24976             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24977 $as_echo_n "checking Boot JDK version... " >&6; }
24978             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24979             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24980 $as_echo "$BOOT_JDK_VERSION" >&6; }
24981           fi # end check jdk version
24982         fi # end check javac
24983       fi # end check java
24984     fi # end check boot jdk found
24985   fi
24986 
24987   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24988     # Having specified an argument which is incorrect will produce an instant failure;
24989     # we should not go on looking
24990     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24991   fi
24992 
24993   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24994 
24995   if test "x$BOOT_JDK_FOUND" = xno; then
24996     # Now execute the test
24997 
24998   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24999     # First check at user selected default
25000 
25001   if test "x$BOOT_JDK_FOUND" = xno; then
25002     # Now execute the test
25003 
25004   if test -x /usr/libexec/java_home; then
25005     BOOT_JDK=`/usr/libexec/java_home `
25006     BOOT_JDK_FOUND=maybe
25007     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25008 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25009   fi
25010 
25011 
25012     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25013     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25014       # Do we have a bin/java?
25015       if test ! -x "$BOOT_JDK/bin/java"; then
25016         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25017 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25018         BOOT_JDK_FOUND=no
25019       else
25020         # Do we have a bin/javac?
25021         if test ! -x "$BOOT_JDK/bin/javac"; then
25022           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25023 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25024           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25025 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25026           BOOT_JDK_FOUND=no
25027         else
25028           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25029           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25030 
25031           # Extra M4 quote needed to protect [] in grep expression.
25032           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25033           if test "x$FOUND_CORRECT_VERSION" = x; then
25034             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25035 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25036             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25037 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25038             BOOT_JDK_FOUND=no
25039           else
25040             # We're done! :-)
25041             BOOT_JDK_FOUND=yes
25042 
25043   # Only process if variable expands to non-empty
25044 
25045   if test "x$BOOT_JDK" != x; then
25046     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25047 
25048   # Input might be given as Windows format, start by converting to
25049   # unix format.
25050   path="$BOOT_JDK"
25051   new_path=`$CYGPATH -u "$path"`
25052 
25053   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25054   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25055   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25056   # "foo.exe" is OK but "foo" is an error.
25057   #
25058   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25059   # It is also a way to make sure we got the proper file name for the real test later on.
25060   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25061   if test "x$test_shortpath" = x; then
25062     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25063 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25064     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25065   fi
25066 
25067   # Call helper function which possibly converts this using DOS-style short mode.
25068   # If so, the updated path is stored in $new_path.
25069 
25070   input_path="$new_path"
25071   # Check if we need to convert this using DOS-style short mode. If the path
25072   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25073   # take no chances and rewrite it.
25074   # Note: m4 eats our [], so we need to use [ and ] instead.
25075   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25076   if test "x$has_forbidden_chars" != x; then
25077     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25078     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25079     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25080     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25081       # Going to short mode and back again did indeed matter. Since short mode is
25082       # case insensitive, let's make it lowercase to improve readability.
25083       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25084       # Now convert it back to Unix-style (cygpath)
25085       input_path=`$CYGPATH -u "$shortmode_path"`
25086       new_path="$input_path"
25087     fi
25088   fi
25089 
25090   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25091   if test "x$test_cygdrive_prefix" = x; then
25092     # As a simple fix, exclude /usr/bin since it's not a real path.
25093     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25094       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25095       # a path prefixed by /cygdrive for fixpath to work.
25096       new_path="$CYGWIN_ROOT_PATH$input_path"
25097     fi
25098   fi
25099 
25100 
25101   if test "x$path" != "x$new_path"; then
25102     BOOT_JDK="$new_path"
25103     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25104 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25105   fi
25106 
25107     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25108 
25109   path="$BOOT_JDK"
25110   has_colon=`$ECHO $path | $GREP ^.:`
25111   new_path="$path"
25112   if test "x$has_colon" = x; then
25113     # Not in mixed or Windows style, start by that.
25114     new_path=`cmd //c echo $path`
25115   fi
25116 
25117 
25118   input_path="$new_path"
25119   # Check if we need to convert this using DOS-style short mode. If the path
25120   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25121   # take no chances and rewrite it.
25122   # Note: m4 eats our [], so we need to use [ and ] instead.
25123   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25124   if test "x$has_forbidden_chars" != x; then
25125     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25126     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25127   fi
25128 
25129 
25130   windows_path="$new_path"
25131   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25132     unix_path=`$CYGPATH -u "$windows_path"`
25133     new_path="$unix_path"
25134   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25135     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25136     new_path="$unix_path"
25137   fi
25138 
25139   if test "x$path" != "x$new_path"; then
25140     BOOT_JDK="$new_path"
25141     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25142 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25143   fi
25144 
25145   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25146   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25147 
25148     else
25149       # We're on a unix platform. Hooray! :)
25150       path="$BOOT_JDK"
25151       has_space=`$ECHO "$path" | $GREP " "`
25152       if test "x$has_space" != x; then
25153         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25154 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25155         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25156       fi
25157 
25158       # Use eval to expand a potential ~
25159       eval path="$path"
25160       if test ! -f "$path" && test ! -d "$path"; then
25161         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25162       fi
25163 
25164       if test -d "$path"; then
25165         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25166       else
25167         dir="`$DIRNAME "$path"`"
25168         base="`$BASENAME "$path"`"
25169         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25170       fi
25171     fi
25172   fi
25173 
25174             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25175 $as_echo_n "checking for Boot JDK... " >&6; }
25176             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25177 $as_echo "$BOOT_JDK" >&6; }
25178             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25179 $as_echo_n "checking Boot JDK version... " >&6; }
25180             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25181             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25182 $as_echo "$BOOT_JDK_VERSION" >&6; }
25183           fi # end check jdk version
25184         fi # end check javac
25185       fi # end check java
25186     fi # end check boot jdk found
25187   fi
25188 
25189     # If that did not work out (e.g. too old), try explicit versions instead
25190 
25191   if test "x$BOOT_JDK_FOUND" = xno; then
25192     # Now execute the test
25193 
25194   if test -x /usr/libexec/java_home; then
25195     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25196     BOOT_JDK_FOUND=maybe
25197     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25198 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25199   fi
25200 
25201 
25202     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25203     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25204       # Do we have a bin/java?
25205       if test ! -x "$BOOT_JDK/bin/java"; then
25206         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25207 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25208         BOOT_JDK_FOUND=no
25209       else
25210         # Do we have a bin/javac?
25211         if test ! -x "$BOOT_JDK/bin/javac"; then
25212           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25213 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25214           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25215 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25216           BOOT_JDK_FOUND=no
25217         else
25218           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25219           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25220 
25221           # Extra M4 quote needed to protect [] in grep expression.
25222           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25223           if test "x$FOUND_CORRECT_VERSION" = x; then
25224             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25225 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25226             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25227 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25228             BOOT_JDK_FOUND=no
25229           else
25230             # We're done! :-)
25231             BOOT_JDK_FOUND=yes
25232 
25233   # Only process if variable expands to non-empty
25234 
25235   if test "x$BOOT_JDK" != x; then
25236     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25237 
25238   # Input might be given as Windows format, start by converting to
25239   # unix format.
25240   path="$BOOT_JDK"
25241   new_path=`$CYGPATH -u "$path"`
25242 
25243   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25244   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25245   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25246   # "foo.exe" is OK but "foo" is an error.
25247   #
25248   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25249   # It is also a way to make sure we got the proper file name for the real test later on.
25250   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25251   if test "x$test_shortpath" = x; then
25252     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25253 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25254     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25255   fi
25256 
25257   # Call helper function which possibly converts this using DOS-style short mode.
25258   # If so, the updated path is stored in $new_path.
25259 
25260   input_path="$new_path"
25261   # Check if we need to convert this using DOS-style short mode. If the path
25262   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25263   # take no chances and rewrite it.
25264   # Note: m4 eats our [], so we need to use [ and ] instead.
25265   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25266   if test "x$has_forbidden_chars" != x; then
25267     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25268     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25269     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25270     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25271       # Going to short mode and back again did indeed matter. Since short mode is
25272       # case insensitive, let's make it lowercase to improve readability.
25273       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25274       # Now convert it back to Unix-style (cygpath)
25275       input_path=`$CYGPATH -u "$shortmode_path"`
25276       new_path="$input_path"
25277     fi
25278   fi
25279 
25280   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25281   if test "x$test_cygdrive_prefix" = x; then
25282     # As a simple fix, exclude /usr/bin since it's not a real path.
25283     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25284       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25285       # a path prefixed by /cygdrive for fixpath to work.
25286       new_path="$CYGWIN_ROOT_PATH$input_path"
25287     fi
25288   fi
25289 
25290 
25291   if test "x$path" != "x$new_path"; then
25292     BOOT_JDK="$new_path"
25293     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25294 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25295   fi
25296 
25297     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25298 
25299   path="$BOOT_JDK"
25300   has_colon=`$ECHO $path | $GREP ^.:`
25301   new_path="$path"
25302   if test "x$has_colon" = x; then
25303     # Not in mixed or Windows style, start by that.
25304     new_path=`cmd //c echo $path`
25305   fi
25306 
25307 
25308   input_path="$new_path"
25309   # Check if we need to convert this using DOS-style short mode. If the path
25310   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25311   # take no chances and rewrite it.
25312   # Note: m4 eats our [], so we need to use [ and ] instead.
25313   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25314   if test "x$has_forbidden_chars" != x; then
25315     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25316     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25317   fi
25318 
25319 
25320   windows_path="$new_path"
25321   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25322     unix_path=`$CYGPATH -u "$windows_path"`
25323     new_path="$unix_path"
25324   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25325     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25326     new_path="$unix_path"
25327   fi
25328 
25329   if test "x$path" != "x$new_path"; then
25330     BOOT_JDK="$new_path"
25331     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25332 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25333   fi
25334 
25335   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25336   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25337 
25338     else
25339       # We're on a unix platform. Hooray! :)
25340       path="$BOOT_JDK"
25341       has_space=`$ECHO "$path" | $GREP " "`
25342       if test "x$has_space" != x; then
25343         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25344 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25345         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25346       fi
25347 
25348       # Use eval to expand a potential ~
25349       eval path="$path"
25350       if test ! -f "$path" && test ! -d "$path"; then
25351         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25352       fi
25353 
25354       if test -d "$path"; then
25355         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25356       else
25357         dir="`$DIRNAME "$path"`"
25358         base="`$BASENAME "$path"`"
25359         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25360       fi
25361     fi
25362   fi
25363 
25364             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25365 $as_echo_n "checking for Boot JDK... " >&6; }
25366             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25367 $as_echo "$BOOT_JDK" >&6; }
25368             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25369 $as_echo_n "checking Boot JDK version... " >&6; }
25370             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25371             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25372 $as_echo "$BOOT_JDK_VERSION" >&6; }
25373           fi # end check jdk version
25374         fi # end check javac
25375       fi # end check java
25376     fi # end check boot jdk found
25377   fi
25378 
25379 
25380   if test "x$BOOT_JDK_FOUND" = xno; then
25381     # Now execute the test
25382 
25383   if test -x /usr/libexec/java_home; then
25384     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25385     BOOT_JDK_FOUND=maybe
25386     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25387 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25388   fi
25389 
25390 
25391     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25392     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25393       # Do we have a bin/java?
25394       if test ! -x "$BOOT_JDK/bin/java"; then
25395         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25396 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25397         BOOT_JDK_FOUND=no
25398       else
25399         # Do we have a bin/javac?
25400         if test ! -x "$BOOT_JDK/bin/javac"; then
25401           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25402 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25403           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25404 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25405           BOOT_JDK_FOUND=no
25406         else
25407           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25408           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25409 
25410           # Extra M4 quote needed to protect [] in grep expression.
25411           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25412           if test "x$FOUND_CORRECT_VERSION" = x; then
25413             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25414 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25415             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25416 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25417             BOOT_JDK_FOUND=no
25418           else
25419             # We're done! :-)
25420             BOOT_JDK_FOUND=yes
25421 
25422   # Only process if variable expands to non-empty
25423 
25424   if test "x$BOOT_JDK" != x; then
25425     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25426 
25427   # Input might be given as Windows format, start by converting to
25428   # unix format.
25429   path="$BOOT_JDK"
25430   new_path=`$CYGPATH -u "$path"`
25431 
25432   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25433   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25434   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25435   # "foo.exe" is OK but "foo" is an error.
25436   #
25437   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25438   # It is also a way to make sure we got the proper file name for the real test later on.
25439   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25440   if test "x$test_shortpath" = x; then
25441     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25442 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25443     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25444   fi
25445 
25446   # Call helper function which possibly converts this using DOS-style short mode.
25447   # If so, the updated path is stored in $new_path.
25448 
25449   input_path="$new_path"
25450   # Check if we need to convert this using DOS-style short mode. If the path
25451   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25452   # take no chances and rewrite it.
25453   # Note: m4 eats our [], so we need to use [ and ] instead.
25454   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25455   if test "x$has_forbidden_chars" != x; then
25456     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25457     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25458     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25459     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25460       # Going to short mode and back again did indeed matter. Since short mode is
25461       # case insensitive, let's make it lowercase to improve readability.
25462       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25463       # Now convert it back to Unix-style (cygpath)
25464       input_path=`$CYGPATH -u "$shortmode_path"`
25465       new_path="$input_path"
25466     fi
25467   fi
25468 
25469   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25470   if test "x$test_cygdrive_prefix" = x; then
25471     # As a simple fix, exclude /usr/bin since it's not a real path.
25472     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25473       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25474       # a path prefixed by /cygdrive for fixpath to work.
25475       new_path="$CYGWIN_ROOT_PATH$input_path"
25476     fi
25477   fi
25478 
25479 
25480   if test "x$path" != "x$new_path"; then
25481     BOOT_JDK="$new_path"
25482     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25483 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25484   fi
25485 
25486     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25487 
25488   path="$BOOT_JDK"
25489   has_colon=`$ECHO $path | $GREP ^.:`
25490   new_path="$path"
25491   if test "x$has_colon" = x; then
25492     # Not in mixed or Windows style, start by that.
25493     new_path=`cmd //c echo $path`
25494   fi
25495 
25496 
25497   input_path="$new_path"
25498   # Check if we need to convert this using DOS-style short mode. If the path
25499   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25500   # take no chances and rewrite it.
25501   # Note: m4 eats our [], so we need to use [ and ] instead.
25502   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25503   if test "x$has_forbidden_chars" != x; then
25504     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25505     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25506   fi
25507 
25508 
25509   windows_path="$new_path"
25510   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25511     unix_path=`$CYGPATH -u "$windows_path"`
25512     new_path="$unix_path"
25513   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25514     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25515     new_path="$unix_path"
25516   fi
25517 
25518   if test "x$path" != "x$new_path"; then
25519     BOOT_JDK="$new_path"
25520     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25521 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25522   fi
25523 
25524   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25525   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25526 
25527     else
25528       # We're on a unix platform. Hooray! :)
25529       path="$BOOT_JDK"
25530       has_space=`$ECHO "$path" | $GREP " "`
25531       if test "x$has_space" != x; then
25532         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25533 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25534         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25535       fi
25536 
25537       # Use eval to expand a potential ~
25538       eval path="$path"
25539       if test ! -f "$path" && test ! -d "$path"; then
25540         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25541       fi
25542 
25543       if test -d "$path"; then
25544         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25545       else
25546         dir="`$DIRNAME "$path"`"
25547         base="`$BASENAME "$path"`"
25548         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25549       fi
25550     fi
25551   fi
25552 
25553             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25554 $as_echo_n "checking for Boot JDK... " >&6; }
25555             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25556 $as_echo "$BOOT_JDK" >&6; }
25557             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25558 $as_echo_n "checking Boot JDK version... " >&6; }
25559             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25560             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25561 $as_echo "$BOOT_JDK_VERSION" >&6; }
25562           fi # end check jdk version
25563         fi # end check javac
25564       fi # end check java
25565     fi # end check boot jdk found
25566   fi
25567 
25568 
25569   if test "x$BOOT_JDK_FOUND" = xno; then
25570     # Now execute the test
25571 
25572   if test -x /usr/libexec/java_home; then
25573     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25574     BOOT_JDK_FOUND=maybe
25575     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25576 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25577   fi
25578 
25579 
25580     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25581     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25582       # Do we have a bin/java?
25583       if test ! -x "$BOOT_JDK/bin/java"; then
25584         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25585 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25586         BOOT_JDK_FOUND=no
25587       else
25588         # Do we have a bin/javac?
25589         if test ! -x "$BOOT_JDK/bin/javac"; then
25590           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25591 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25592           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25593 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25594           BOOT_JDK_FOUND=no
25595         else
25596           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25597           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25598 
25599           # Extra M4 quote needed to protect [] in grep expression.
25600           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25601           if test "x$FOUND_CORRECT_VERSION" = x; then
25602             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25603 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25604             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25605 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25606             BOOT_JDK_FOUND=no
25607           else
25608             # We're done! :-)
25609             BOOT_JDK_FOUND=yes
25610 
25611   # Only process if variable expands to non-empty
25612 
25613   if test "x$BOOT_JDK" != x; then
25614     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25615 
25616   # Input might be given as Windows format, start by converting to
25617   # unix format.
25618   path="$BOOT_JDK"
25619   new_path=`$CYGPATH -u "$path"`
25620 
25621   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25622   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25623   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25624   # "foo.exe" is OK but "foo" is an error.
25625   #
25626   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25627   # It is also a way to make sure we got the proper file name for the real test later on.
25628   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25629   if test "x$test_shortpath" = x; then
25630     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25631 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25632     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25633   fi
25634 
25635   # Call helper function which possibly converts this using DOS-style short mode.
25636   # If so, the updated path is stored in $new_path.
25637 
25638   input_path="$new_path"
25639   # Check if we need to convert this using DOS-style short mode. If the path
25640   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25641   # take no chances and rewrite it.
25642   # Note: m4 eats our [], so we need to use [ and ] instead.
25643   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25644   if test "x$has_forbidden_chars" != x; then
25645     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25646     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25647     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25648     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25649       # Going to short mode and back again did indeed matter. Since short mode is
25650       # case insensitive, let's make it lowercase to improve readability.
25651       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25652       # Now convert it back to Unix-style (cygpath)
25653       input_path=`$CYGPATH -u "$shortmode_path"`
25654       new_path="$input_path"
25655     fi
25656   fi
25657 
25658   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25659   if test "x$test_cygdrive_prefix" = x; then
25660     # As a simple fix, exclude /usr/bin since it's not a real path.
25661     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25662       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25663       # a path prefixed by /cygdrive for fixpath to work.
25664       new_path="$CYGWIN_ROOT_PATH$input_path"
25665     fi
25666   fi
25667 
25668 
25669   if test "x$path" != "x$new_path"; then
25670     BOOT_JDK="$new_path"
25671     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25672 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25673   fi
25674 
25675     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25676 
25677   path="$BOOT_JDK"
25678   has_colon=`$ECHO $path | $GREP ^.:`
25679   new_path="$path"
25680   if test "x$has_colon" = x; then
25681     # Not in mixed or Windows style, start by that.
25682     new_path=`cmd //c echo $path`
25683   fi
25684 
25685 
25686   input_path="$new_path"
25687   # Check if we need to convert this using DOS-style short mode. If the path
25688   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25689   # take no chances and rewrite it.
25690   # Note: m4 eats our [], so we need to use [ and ] instead.
25691   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25692   if test "x$has_forbidden_chars" != x; then
25693     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25694     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25695   fi
25696 
25697 
25698   windows_path="$new_path"
25699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25700     unix_path=`$CYGPATH -u "$windows_path"`
25701     new_path="$unix_path"
25702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25703     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25704     new_path="$unix_path"
25705   fi
25706 
25707   if test "x$path" != "x$new_path"; then
25708     BOOT_JDK="$new_path"
25709     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25710 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25711   fi
25712 
25713   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25714   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25715 
25716     else
25717       # We're on a unix platform. Hooray! :)
25718       path="$BOOT_JDK"
25719       has_space=`$ECHO "$path" | $GREP " "`
25720       if test "x$has_space" != x; then
25721         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25722 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25723         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25724       fi
25725 
25726       # Use eval to expand a potential ~
25727       eval path="$path"
25728       if test ! -f "$path" && test ! -d "$path"; then
25729         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25730       fi
25731 
25732       if test -d "$path"; then
25733         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25734       else
25735         dir="`$DIRNAME "$path"`"
25736         base="`$BASENAME "$path"`"
25737         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25738       fi
25739     fi
25740   fi
25741 
25742             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25743 $as_echo_n "checking for Boot JDK... " >&6; }
25744             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25745 $as_echo "$BOOT_JDK" >&6; }
25746             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25747 $as_echo_n "checking Boot JDK version... " >&6; }
25748             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25749             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25750 $as_echo "$BOOT_JDK_VERSION" >&6; }
25751           fi # end check jdk version
25752         fi # end check javac
25753       fi # end check java
25754     fi # end check boot jdk found
25755   fi
25756 
25757   fi
25758 
25759 
25760     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25761     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25762       # Do we have a bin/java?
25763       if test ! -x "$BOOT_JDK/bin/java"; then
25764         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25765 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25766         BOOT_JDK_FOUND=no
25767       else
25768         # Do we have a bin/javac?
25769         if test ! -x "$BOOT_JDK/bin/javac"; then
25770           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25771 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25772           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25773 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25774           BOOT_JDK_FOUND=no
25775         else
25776           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25777           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25778 
25779           # Extra M4 quote needed to protect [] in grep expression.
25780           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25781           if test "x$FOUND_CORRECT_VERSION" = x; then
25782             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25783 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25784             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25785 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25786             BOOT_JDK_FOUND=no
25787           else
25788             # We're done! :-)
25789             BOOT_JDK_FOUND=yes
25790 
25791   # Only process if variable expands to non-empty
25792 
25793   if test "x$BOOT_JDK" != x; then
25794     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25795 
25796   # Input might be given as Windows format, start by converting to
25797   # unix format.
25798   path="$BOOT_JDK"
25799   new_path=`$CYGPATH -u "$path"`
25800 
25801   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25802   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25803   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25804   # "foo.exe" is OK but "foo" is an error.
25805   #
25806   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25807   # It is also a way to make sure we got the proper file name for the real test later on.
25808   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25809   if test "x$test_shortpath" = x; then
25810     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25811 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25812     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25813   fi
25814 
25815   # Call helper function which possibly converts this using DOS-style short mode.
25816   # If so, the updated path is stored in $new_path.
25817 
25818   input_path="$new_path"
25819   # Check if we need to convert this using DOS-style short mode. If the path
25820   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25821   # take no chances and rewrite it.
25822   # Note: m4 eats our [], so we need to use [ and ] instead.
25823   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25824   if test "x$has_forbidden_chars" != x; then
25825     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25826     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25827     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25828     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25829       # Going to short mode and back again did indeed matter. Since short mode is
25830       # case insensitive, let's make it lowercase to improve readability.
25831       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25832       # Now convert it back to Unix-style (cygpath)
25833       input_path=`$CYGPATH -u "$shortmode_path"`
25834       new_path="$input_path"
25835     fi
25836   fi
25837 
25838   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25839   if test "x$test_cygdrive_prefix" = x; then
25840     # As a simple fix, exclude /usr/bin since it's not a real path.
25841     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25842       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25843       # a path prefixed by /cygdrive for fixpath to work.
25844       new_path="$CYGWIN_ROOT_PATH$input_path"
25845     fi
25846   fi
25847 
25848 
25849   if test "x$path" != "x$new_path"; then
25850     BOOT_JDK="$new_path"
25851     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25852 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25853   fi
25854 
25855     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25856 
25857   path="$BOOT_JDK"
25858   has_colon=`$ECHO $path | $GREP ^.:`
25859   new_path="$path"
25860   if test "x$has_colon" = x; then
25861     # Not in mixed or Windows style, start by that.
25862     new_path=`cmd //c echo $path`
25863   fi
25864 
25865 
25866   input_path="$new_path"
25867   # Check if we need to convert this using DOS-style short mode. If the path
25868   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25869   # take no chances and rewrite it.
25870   # Note: m4 eats our [], so we need to use [ and ] instead.
25871   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25872   if test "x$has_forbidden_chars" != x; then
25873     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25874     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25875   fi
25876 
25877 
25878   windows_path="$new_path"
25879   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25880     unix_path=`$CYGPATH -u "$windows_path"`
25881     new_path="$unix_path"
25882   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25883     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25884     new_path="$unix_path"
25885   fi
25886 
25887   if test "x$path" != "x$new_path"; then
25888     BOOT_JDK="$new_path"
25889     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25890 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25891   fi
25892 
25893   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25894   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25895 
25896     else
25897       # We're on a unix platform. Hooray! :)
25898       path="$BOOT_JDK"
25899       has_space=`$ECHO "$path" | $GREP " "`
25900       if test "x$has_space" != x; then
25901         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25902 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25903         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25904       fi
25905 
25906       # Use eval to expand a potential ~
25907       eval path="$path"
25908       if test ! -f "$path" && test ! -d "$path"; then
25909         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25910       fi
25911 
25912       if test -d "$path"; then
25913         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25914       else
25915         dir="`$DIRNAME "$path"`"
25916         base="`$BASENAME "$path"`"
25917         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25918       fi
25919     fi
25920   fi
25921 
25922             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25923 $as_echo_n "checking for Boot JDK... " >&6; }
25924             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25925 $as_echo "$BOOT_JDK" >&6; }
25926             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25927 $as_echo_n "checking Boot JDK version... " >&6; }
25928             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25929             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25930 $as_echo "$BOOT_JDK_VERSION" >&6; }
25931           fi # end check jdk version
25932         fi # end check javac
25933       fi # end check java
25934     fi # end check boot jdk found
25935   fi
25936 
25937 
25938   # Test: Is $JAVA_HOME set?
25939 
25940   if test "x$BOOT_JDK_FOUND" = xno; then
25941     # Now execute the test
25942 
25943   if test "x$JAVA_HOME" != x; then
25944     JAVA_HOME_PROCESSED="$JAVA_HOME"
25945 
25946   # Only process if variable expands to non-empty
25947 
25948   if test "x$JAVA_HOME_PROCESSED" != x; then
25949     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25950 
25951   # Input might be given as Windows format, start by converting to
25952   # unix format.
25953   path="$JAVA_HOME_PROCESSED"
25954   new_path=`$CYGPATH -u "$path"`
25955 
25956   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25957   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25958   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25959   # "foo.exe" is OK but "foo" is an error.
25960   #
25961   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25962   # It is also a way to make sure we got the proper file name for the real test later on.
25963   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25964   if test "x$test_shortpath" = x; then
25965     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25966 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25967     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25968   fi
25969 
25970   # Call helper function which possibly converts this using DOS-style short mode.
25971   # If so, the updated path is stored in $new_path.
25972 
25973   input_path="$new_path"
25974   # Check if we need to convert this using DOS-style short mode. If the path
25975   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25976   # take no chances and rewrite it.
25977   # Note: m4 eats our [], so we need to use [ and ] instead.
25978   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25979   if test "x$has_forbidden_chars" != x; then
25980     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25981     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25982     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25983     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25984       # Going to short mode and back again did indeed matter. Since short mode is
25985       # case insensitive, let's make it lowercase to improve readability.
25986       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25987       # Now convert it back to Unix-style (cygpath)
25988       input_path=`$CYGPATH -u "$shortmode_path"`
25989       new_path="$input_path"
25990     fi
25991   fi
25992 
25993   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25994   if test "x$test_cygdrive_prefix" = x; then
25995     # As a simple fix, exclude /usr/bin since it's not a real path.
25996     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25997       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25998       # a path prefixed by /cygdrive for fixpath to work.
25999       new_path="$CYGWIN_ROOT_PATH$input_path"
26000     fi
26001   fi
26002 
26003 
26004   if test "x$path" != "x$new_path"; then
26005     JAVA_HOME_PROCESSED="$new_path"
26006     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26007 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26008   fi
26009 
26010     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26011 
26012   path="$JAVA_HOME_PROCESSED"
26013   has_colon=`$ECHO $path | $GREP ^.:`
26014   new_path="$path"
26015   if test "x$has_colon" = x; then
26016     # Not in mixed or Windows style, start by that.
26017     new_path=`cmd //c echo $path`
26018   fi
26019 
26020 
26021   input_path="$new_path"
26022   # Check if we need to convert this using DOS-style short mode. If the path
26023   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26024   # take no chances and rewrite it.
26025   # Note: m4 eats our [], so we need to use [ and ] instead.
26026   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26027   if test "x$has_forbidden_chars" != x; then
26028     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26029     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26030   fi
26031 
26032 
26033   windows_path="$new_path"
26034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26035     unix_path=`$CYGPATH -u "$windows_path"`
26036     new_path="$unix_path"
26037   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26038     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26039     new_path="$unix_path"
26040   fi
26041 
26042   if test "x$path" != "x$new_path"; then
26043     JAVA_HOME_PROCESSED="$new_path"
26044     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26045 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26046   fi
26047 
26048   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26049   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26050 
26051     else
26052       # We're on a unix platform. Hooray! :)
26053       path="$JAVA_HOME_PROCESSED"
26054       has_space=`$ECHO "$path" | $GREP " "`
26055       if test "x$has_space" != x; then
26056         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26057 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26058         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26059       fi
26060 
26061       # Use eval to expand a potential ~
26062       eval path="$path"
26063       if test ! -f "$path" && test ! -d "$path"; then
26064         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26065       fi
26066 
26067       if test -d "$path"; then
26068         JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26069       else
26070         dir="`$DIRNAME "$path"`"
26071         base="`$BASENAME "$path"`"
26072         JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26073       fi
26074     fi
26075   fi
26076 
26077     if test ! -d "$JAVA_HOME_PROCESSED"; then
26078       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26079 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26080     else
26081       # Aha, the user has set a JAVA_HOME
26082       # let us use that as the Boot JDK.
26083       BOOT_JDK="$JAVA_HOME_PROCESSED"
26084       BOOT_JDK_FOUND=maybe
26085       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26086 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26087     fi
26088   fi
26089 
26090 
26091     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26092     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26093       # Do we have a bin/java?
26094       if test ! -x "$BOOT_JDK/bin/java"; then
26095         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26096 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26097         BOOT_JDK_FOUND=no
26098       else
26099         # Do we have a bin/javac?
26100         if test ! -x "$BOOT_JDK/bin/javac"; then
26101           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26102 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26103           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26104 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26105           BOOT_JDK_FOUND=no
26106         else
26107           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26108           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26109 
26110           # Extra M4 quote needed to protect [] in grep expression.
26111           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26112           if test "x$FOUND_CORRECT_VERSION" = x; then
26113             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26114 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26115             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26116 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26117             BOOT_JDK_FOUND=no
26118           else
26119             # We're done! :-)
26120             BOOT_JDK_FOUND=yes
26121 
26122   # Only process if variable expands to non-empty
26123 
26124   if test "x$BOOT_JDK" != x; then
26125     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26126 
26127   # Input might be given as Windows format, start by converting to
26128   # unix format.
26129   path="$BOOT_JDK"
26130   new_path=`$CYGPATH -u "$path"`
26131 
26132   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26133   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26134   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26135   # "foo.exe" is OK but "foo" is an error.
26136   #
26137   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26138   # It is also a way to make sure we got the proper file name for the real test later on.
26139   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26140   if test "x$test_shortpath" = x; then
26141     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26142 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26143     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26144   fi
26145 
26146   # Call helper function which possibly converts this using DOS-style short mode.
26147   # If so, the updated path is stored in $new_path.
26148 
26149   input_path="$new_path"
26150   # Check if we need to convert this using DOS-style short mode. If the path
26151   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26152   # take no chances and rewrite it.
26153   # Note: m4 eats our [], so we need to use [ and ] instead.
26154   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26155   if test "x$has_forbidden_chars" != x; then
26156     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26157     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26158     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26159     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26160       # Going to short mode and back again did indeed matter. Since short mode is
26161       # case insensitive, let's make it lowercase to improve readability.
26162       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26163       # Now convert it back to Unix-style (cygpath)
26164       input_path=`$CYGPATH -u "$shortmode_path"`
26165       new_path="$input_path"
26166     fi
26167   fi
26168 
26169   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26170   if test "x$test_cygdrive_prefix" = x; then
26171     # As a simple fix, exclude /usr/bin since it's not a real path.
26172     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26173       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26174       # a path prefixed by /cygdrive for fixpath to work.
26175       new_path="$CYGWIN_ROOT_PATH$input_path"
26176     fi
26177   fi
26178 
26179 
26180   if test "x$path" != "x$new_path"; then
26181     BOOT_JDK="$new_path"
26182     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26183 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26184   fi
26185 
26186     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26187 
26188   path="$BOOT_JDK"
26189   has_colon=`$ECHO $path | $GREP ^.:`
26190   new_path="$path"
26191   if test "x$has_colon" = x; then
26192     # Not in mixed or Windows style, start by that.
26193     new_path=`cmd //c echo $path`
26194   fi
26195 
26196 
26197   input_path="$new_path"
26198   # Check if we need to convert this using DOS-style short mode. If the path
26199   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26200   # take no chances and rewrite it.
26201   # Note: m4 eats our [], so we need to use [ and ] instead.
26202   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26203   if test "x$has_forbidden_chars" != x; then
26204     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26205     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26206   fi
26207 
26208 
26209   windows_path="$new_path"
26210   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26211     unix_path=`$CYGPATH -u "$windows_path"`
26212     new_path="$unix_path"
26213   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26214     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26215     new_path="$unix_path"
26216   fi
26217 
26218   if test "x$path" != "x$new_path"; then
26219     BOOT_JDK="$new_path"
26220     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26221 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26222   fi
26223 
26224   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26225   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26226 
26227     else
26228       # We're on a unix platform. Hooray! :)
26229       path="$BOOT_JDK"
26230       has_space=`$ECHO "$path" | $GREP " "`
26231       if test "x$has_space" != x; then
26232         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26233 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26234         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26235       fi
26236 
26237       # Use eval to expand a potential ~
26238       eval path="$path"
26239       if test ! -f "$path" && test ! -d "$path"; then
26240         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26241       fi
26242 
26243       if test -d "$path"; then
26244         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26245       else
26246         dir="`$DIRNAME "$path"`"
26247         base="`$BASENAME "$path"`"
26248         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26249       fi
26250     fi
26251   fi
26252 
26253             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26254 $as_echo_n "checking for Boot JDK... " >&6; }
26255             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26256 $as_echo "$BOOT_JDK" >&6; }
26257             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26258 $as_echo_n "checking Boot JDK version... " >&6; }
26259             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26260             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26261 $as_echo "$BOOT_JDK_VERSION" >&6; }
26262           fi # end check jdk version
26263         fi # end check javac
26264       fi # end check java
26265     fi # end check boot jdk found
26266   fi
26267 
26268 
26269   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26270 
26271   if test "x$BOOT_JDK_FOUND" = xno; then
26272     # Now execute the test
26273 
26274   # Extract the first word of "javac", so it can be a program name with args.
26275 set dummy javac; ac_word=$2
26276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26277 $as_echo_n "checking for $ac_word... " >&6; }
26278 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26279   $as_echo_n "(cached) " >&6
26280 else
26281   case $JAVAC_CHECK in
26282   [\\/]* | ?:[\\/]*)
26283   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26284   ;;
26285   *)
26286   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26287 for as_dir in $PATH
26288 do
26289   IFS=$as_save_IFS
26290   test -z "$as_dir" && as_dir=.
26291     for ac_exec_ext in '' $ac_executable_extensions; do
26292   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26293     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26294     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26295     break 2
26296   fi
26297 done
26298   done
26299 IFS=$as_save_IFS
26300 
26301   ;;
26302 esac
26303 fi
26304 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26305 if test -n "$JAVAC_CHECK"; then
26306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26307 $as_echo "$JAVAC_CHECK" >&6; }
26308 else
26309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26310 $as_echo "no" >&6; }
26311 fi
26312 
26313 
26314   # Extract the first word of "java", so it can be a program name with args.
26315 set dummy java; ac_word=$2
26316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26317 $as_echo_n "checking for $ac_word... " >&6; }
26318 if ${ac_cv_path_JAVA_CHECK+:} false; then :
26319   $as_echo_n "(cached) " >&6
26320 else
26321   case $JAVA_CHECK in
26322   [\\/]* | ?:[\\/]*)
26323   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26324   ;;
26325   *)
26326   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26327 for as_dir in $PATH
26328 do
26329   IFS=$as_save_IFS
26330   test -z "$as_dir" && as_dir=.
26331     for ac_exec_ext in '' $ac_executable_extensions; do
26332   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26333     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26334     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26335     break 2
26336   fi
26337 done
26338   done
26339 IFS=$as_save_IFS
26340 
26341   ;;
26342 esac
26343 fi
26344 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26345 if test -n "$JAVA_CHECK"; then
26346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26347 $as_echo "$JAVA_CHECK" >&6; }
26348 else
26349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26350 $as_echo "no" >&6; }
26351 fi
26352 
26353 
26354   BINARY="$JAVAC_CHECK"
26355   if test "x$JAVAC_CHECK" = x; then
26356     BINARY="$JAVA_CHECK"
26357   fi
26358   if test "x$BINARY" != x; then
26359     # So there is a java(c) binary, it might be part of a JDK.
26360     # Lets find the JDK/JRE directory by following symbolic links.
26361     # Linux/GNU systems often have links from /usr/bin/java to
26362     # /etc/alternatives/java to the real JDK binary.
26363 
26364   if test "x$OPENJDK_BUILD_OS" != xwindows; then
26365     # Follow a chain of symbolic links. Use readlink
26366     # where it exists, else fall back to horribly
26367     # complicated shell code.
26368     if test "x$READLINK_TESTED" != yes; then
26369       # On MacOSX there is a readlink tool with a different
26370       # purpose than the GNU readlink tool. Check the found readlink.
26371       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26372       if test "x$ISGNU" = x; then
26373         # A readlink that we do not know how to use.
26374         # Are there other non-GNU readlinks out there?
26375         READLINK_TESTED=yes
26376         READLINK=
26377       fi
26378     fi
26379 
26380     if test "x$READLINK" != x; then
26381       BINARY=`$READLINK -f $BINARY`
26382     else
26383       # Save the current directory for restoring afterwards
26384       STARTDIR=$PWD
26385       COUNTER=0
26386       sym_link_dir=`$DIRNAME $BINARY`
26387       sym_link_file=`$BASENAME $BINARY`
26388       cd $sym_link_dir
26389       # Use -P flag to resolve symlinks in directories.
26390       cd `$THEPWDCMD -P`
26391       sym_link_dir=`$THEPWDCMD -P`
26392       # Resolve file symlinks
26393       while test $COUNTER -lt 20; do
26394         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26395         if test "x$ISLINK" == x; then
26396           # This is not a symbolic link! We are done!
26397           break
26398         fi
26399         # Again resolve directory symlinks since the target of the just found
26400         # link could be in a different directory
26401         cd `$DIRNAME $ISLINK`
26402         sym_link_dir=`$THEPWDCMD -P`
26403         sym_link_file=`$BASENAME $ISLINK`
26404         let COUNTER=COUNTER+1
26405       done
26406       cd $STARTDIR
26407       BINARY=$sym_link_dir/$sym_link_file
26408     fi
26409   fi
26410 
26411     BOOT_JDK=`dirname "$BINARY"`
26412     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26413     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26414       # Looks like we found ourselves an JDK
26415       BOOT_JDK_FOUND=maybe
26416       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26417 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26418     fi
26419   fi
26420 
26421 
26422     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26423     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26424       # Do we have a bin/java?
26425       if test ! -x "$BOOT_JDK/bin/java"; then
26426         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26427 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26428         BOOT_JDK_FOUND=no
26429       else
26430         # Do we have a bin/javac?
26431         if test ! -x "$BOOT_JDK/bin/javac"; then
26432           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26433 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26434           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26435 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26436           BOOT_JDK_FOUND=no
26437         else
26438           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26439           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26440 
26441           # Extra M4 quote needed to protect [] in grep expression.
26442           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26443           if test "x$FOUND_CORRECT_VERSION" = x; then
26444             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26445 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26446             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26447 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26448             BOOT_JDK_FOUND=no
26449           else
26450             # We're done! :-)
26451             BOOT_JDK_FOUND=yes
26452 
26453   # Only process if variable expands to non-empty
26454 
26455   if test "x$BOOT_JDK" != x; then
26456     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26457 
26458   # Input might be given as Windows format, start by converting to
26459   # unix format.
26460   path="$BOOT_JDK"
26461   new_path=`$CYGPATH -u "$path"`
26462 
26463   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26464   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26465   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26466   # "foo.exe" is OK but "foo" is an error.
26467   #
26468   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26469   # It is also a way to make sure we got the proper file name for the real test later on.
26470   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26471   if test "x$test_shortpath" = x; then
26472     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26473 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26474     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26475   fi
26476 
26477   # Call helper function which possibly converts this using DOS-style short mode.
26478   # If so, the updated path is stored in $new_path.
26479 
26480   input_path="$new_path"
26481   # Check if we need to convert this using DOS-style short mode. If the path
26482   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26483   # take no chances and rewrite it.
26484   # Note: m4 eats our [], so we need to use [ and ] instead.
26485   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26486   if test "x$has_forbidden_chars" != x; then
26487     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26488     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26489     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26490     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26491       # Going to short mode and back again did indeed matter. Since short mode is
26492       # case insensitive, let's make it lowercase to improve readability.
26493       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26494       # Now convert it back to Unix-style (cygpath)
26495       input_path=`$CYGPATH -u "$shortmode_path"`
26496       new_path="$input_path"
26497     fi
26498   fi
26499 
26500   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26501   if test "x$test_cygdrive_prefix" = x; then
26502     # As a simple fix, exclude /usr/bin since it's not a real path.
26503     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26504       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26505       # a path prefixed by /cygdrive for fixpath to work.
26506       new_path="$CYGWIN_ROOT_PATH$input_path"
26507     fi
26508   fi
26509 
26510 
26511   if test "x$path" != "x$new_path"; then
26512     BOOT_JDK="$new_path"
26513     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26514 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26515   fi
26516 
26517     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26518 
26519   path="$BOOT_JDK"
26520   has_colon=`$ECHO $path | $GREP ^.:`
26521   new_path="$path"
26522   if test "x$has_colon" = x; then
26523     # Not in mixed or Windows style, start by that.
26524     new_path=`cmd //c echo $path`
26525   fi
26526 
26527 
26528   input_path="$new_path"
26529   # Check if we need to convert this using DOS-style short mode. If the path
26530   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26531   # take no chances and rewrite it.
26532   # Note: m4 eats our [], so we need to use [ and ] instead.
26533   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26534   if test "x$has_forbidden_chars" != x; then
26535     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26536     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26537   fi
26538 
26539 
26540   windows_path="$new_path"
26541   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26542     unix_path=`$CYGPATH -u "$windows_path"`
26543     new_path="$unix_path"
26544   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26545     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26546     new_path="$unix_path"
26547   fi
26548 
26549   if test "x$path" != "x$new_path"; then
26550     BOOT_JDK="$new_path"
26551     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26552 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26553   fi
26554 
26555   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26556   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26557 
26558     else
26559       # We're on a unix platform. Hooray! :)
26560       path="$BOOT_JDK"
26561       has_space=`$ECHO "$path" | $GREP " "`
26562       if test "x$has_space" != x; then
26563         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26564 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26565         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26566       fi
26567 
26568       # Use eval to expand a potential ~
26569       eval path="$path"
26570       if test ! -f "$path" && test ! -d "$path"; then
26571         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26572       fi
26573 
26574       if test -d "$path"; then
26575         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26576       else
26577         dir="`$DIRNAME "$path"`"
26578         base="`$BASENAME "$path"`"
26579         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26580       fi
26581     fi
26582   fi
26583 
26584             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26585 $as_echo_n "checking for Boot JDK... " >&6; }
26586             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26587 $as_echo "$BOOT_JDK" >&6; }
26588             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26589 $as_echo_n "checking Boot JDK version... " >&6; }
26590             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26591             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26592 $as_echo "$BOOT_JDK_VERSION" >&6; }
26593           fi # end check jdk version
26594         fi # end check javac
26595       fi # end check java
26596     fi # end check boot jdk found
26597   fi
26598 
26599 
26600   # Test: Is there a JDK installed in default, well-known locations?
26601 
26602   if test "x$BOOT_JDK_FOUND" = xno; then
26603     # Now execute the test
26604 
26605   if test "x$OPENJDK_TARGET_OS" = xwindows; then
26606 
26607   if test "x$BOOT_JDK_FOUND" = xno; then
26608     # Now execute the test
26609 
26610   if test "x$ProgramW6432" != x; then
26611     VIRTUAL_DIR="$ProgramW6432/Java"
26612 
26613   windows_path="$VIRTUAL_DIR"
26614   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26615     unix_path=`$CYGPATH -u "$windows_path"`
26616     VIRTUAL_DIR="$unix_path"
26617   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26618     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26619     VIRTUAL_DIR="$unix_path"
26620   fi
26621 
26622 
26623   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26624   BOOT_JDK_SUFFIX=""
26625   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26626   if test "x$ALL_JDKS_FOUND" != x; then
26627     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26628 
26629   if test "x$BOOT_JDK_FOUND" = xno; then
26630     # Now execute the test
26631 
26632         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26633         if test -d "$BOOT_JDK"; then
26634           BOOT_JDK_FOUND=maybe
26635           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26636 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26637         fi
26638 
26639 
26640     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26641     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26642       # Do we have a bin/java?
26643       if test ! -x "$BOOT_JDK/bin/java"; then
26644         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26645 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26646         BOOT_JDK_FOUND=no
26647       else
26648         # Do we have a bin/javac?
26649         if test ! -x "$BOOT_JDK/bin/javac"; then
26650           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26651 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26652           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26653 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26654           BOOT_JDK_FOUND=no
26655         else
26656           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26657           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26658 
26659           # Extra M4 quote needed to protect [] in grep expression.
26660           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26661           if test "x$FOUND_CORRECT_VERSION" = x; then
26662             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26663 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26664             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26665 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26666             BOOT_JDK_FOUND=no
26667           else
26668             # We're done! :-)
26669             BOOT_JDK_FOUND=yes
26670 
26671   # Only process if variable expands to non-empty
26672 
26673   if test "x$BOOT_JDK" != x; then
26674     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26675 
26676   # Input might be given as Windows format, start by converting to
26677   # unix format.
26678   path="$BOOT_JDK"
26679   new_path=`$CYGPATH -u "$path"`
26680 
26681   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26682   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26683   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26684   # "foo.exe" is OK but "foo" is an error.
26685   #
26686   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26687   # It is also a way to make sure we got the proper file name for the real test later on.
26688   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26689   if test "x$test_shortpath" = x; then
26690     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26691 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26692     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26693   fi
26694 
26695   # Call helper function which possibly converts this using DOS-style short mode.
26696   # If so, the updated path is stored in $new_path.
26697 
26698   input_path="$new_path"
26699   # Check if we need to convert this using DOS-style short mode. If the path
26700   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26701   # take no chances and rewrite it.
26702   # Note: m4 eats our [], so we need to use [ and ] instead.
26703   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26704   if test "x$has_forbidden_chars" != x; then
26705     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26706     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26707     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26708     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26709       # Going to short mode and back again did indeed matter. Since short mode is
26710       # case insensitive, let's make it lowercase to improve readability.
26711       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26712       # Now convert it back to Unix-style (cygpath)
26713       input_path=`$CYGPATH -u "$shortmode_path"`
26714       new_path="$input_path"
26715     fi
26716   fi
26717 
26718   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26719   if test "x$test_cygdrive_prefix" = x; then
26720     # As a simple fix, exclude /usr/bin since it's not a real path.
26721     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26722       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26723       # a path prefixed by /cygdrive for fixpath to work.
26724       new_path="$CYGWIN_ROOT_PATH$input_path"
26725     fi
26726   fi
26727 
26728 
26729   if test "x$path" != "x$new_path"; then
26730     BOOT_JDK="$new_path"
26731     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26732 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26733   fi
26734 
26735     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26736 
26737   path="$BOOT_JDK"
26738   has_colon=`$ECHO $path | $GREP ^.:`
26739   new_path="$path"
26740   if test "x$has_colon" = x; then
26741     # Not in mixed or Windows style, start by that.
26742     new_path=`cmd //c echo $path`
26743   fi
26744 
26745 
26746   input_path="$new_path"
26747   # Check if we need to convert this using DOS-style short mode. If the path
26748   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26749   # take no chances and rewrite it.
26750   # Note: m4 eats our [], so we need to use [ and ] instead.
26751   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26752   if test "x$has_forbidden_chars" != x; then
26753     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26754     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26755   fi
26756 
26757 
26758   windows_path="$new_path"
26759   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26760     unix_path=`$CYGPATH -u "$windows_path"`
26761     new_path="$unix_path"
26762   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26763     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26764     new_path="$unix_path"
26765   fi
26766 
26767   if test "x$path" != "x$new_path"; then
26768     BOOT_JDK="$new_path"
26769     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26770 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26771   fi
26772 
26773   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26774   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26775 
26776     else
26777       # We're on a unix platform. Hooray! :)
26778       path="$BOOT_JDK"
26779       has_space=`$ECHO "$path" | $GREP " "`
26780       if test "x$has_space" != x; then
26781         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26782 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26783         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26784       fi
26785 
26786       # Use eval to expand a potential ~
26787       eval path="$path"
26788       if test ! -f "$path" && test ! -d "$path"; then
26789         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26790       fi
26791 
26792       if test -d "$path"; then
26793         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26794       else
26795         dir="`$DIRNAME "$path"`"
26796         base="`$BASENAME "$path"`"
26797         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26798       fi
26799     fi
26800   fi
26801 
26802             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26803 $as_echo_n "checking for Boot JDK... " >&6; }
26804             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26805 $as_echo "$BOOT_JDK" >&6; }
26806             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26807 $as_echo_n "checking Boot JDK version... " >&6; }
26808             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26809             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26810 $as_echo "$BOOT_JDK_VERSION" >&6; }
26811           fi # end check jdk version
26812         fi # end check javac
26813       fi # end check java
26814     fi # end check boot jdk found
26815   fi
26816 
26817     done
26818   fi
26819 
26820   fi
26821 
26822 
26823     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26824     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26825       # Do we have a bin/java?
26826       if test ! -x "$BOOT_JDK/bin/java"; then
26827         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26828 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26829         BOOT_JDK_FOUND=no
26830       else
26831         # Do we have a bin/javac?
26832         if test ! -x "$BOOT_JDK/bin/javac"; then
26833           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26834 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26835           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26836 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26837           BOOT_JDK_FOUND=no
26838         else
26839           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26840           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26841 
26842           # Extra M4 quote needed to protect [] in grep expression.
26843           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26844           if test "x$FOUND_CORRECT_VERSION" = x; then
26845             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26846 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26847             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26848 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26849             BOOT_JDK_FOUND=no
26850           else
26851             # We're done! :-)
26852             BOOT_JDK_FOUND=yes
26853 
26854   # Only process if variable expands to non-empty
26855 
26856   if test "x$BOOT_JDK" != x; then
26857     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26858 
26859   # Input might be given as Windows format, start by converting to
26860   # unix format.
26861   path="$BOOT_JDK"
26862   new_path=`$CYGPATH -u "$path"`
26863 
26864   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26865   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26866   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26867   # "foo.exe" is OK but "foo" is an error.
26868   #
26869   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26870   # It is also a way to make sure we got the proper file name for the real test later on.
26871   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26872   if test "x$test_shortpath" = x; then
26873     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26874 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26875     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26876   fi
26877 
26878   # Call helper function which possibly converts this using DOS-style short mode.
26879   # If so, the updated path is stored in $new_path.
26880 
26881   input_path="$new_path"
26882   # Check if we need to convert this using DOS-style short mode. If the path
26883   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26884   # take no chances and rewrite it.
26885   # Note: m4 eats our [], so we need to use [ and ] instead.
26886   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26887   if test "x$has_forbidden_chars" != x; then
26888     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26889     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26890     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26891     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26892       # Going to short mode and back again did indeed matter. Since short mode is
26893       # case insensitive, let's make it lowercase to improve readability.
26894       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26895       # Now convert it back to Unix-style (cygpath)
26896       input_path=`$CYGPATH -u "$shortmode_path"`
26897       new_path="$input_path"
26898     fi
26899   fi
26900 
26901   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26902   if test "x$test_cygdrive_prefix" = x; then
26903     # As a simple fix, exclude /usr/bin since it's not a real path.
26904     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26905       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26906       # a path prefixed by /cygdrive for fixpath to work.
26907       new_path="$CYGWIN_ROOT_PATH$input_path"
26908     fi
26909   fi
26910 
26911 
26912   if test "x$path" != "x$new_path"; then
26913     BOOT_JDK="$new_path"
26914     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26915 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26916   fi
26917 
26918     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26919 
26920   path="$BOOT_JDK"
26921   has_colon=`$ECHO $path | $GREP ^.:`
26922   new_path="$path"
26923   if test "x$has_colon" = x; then
26924     # Not in mixed or Windows style, start by that.
26925     new_path=`cmd //c echo $path`
26926   fi
26927 
26928 
26929   input_path="$new_path"
26930   # Check if we need to convert this using DOS-style short mode. If the path
26931   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26932   # take no chances and rewrite it.
26933   # Note: m4 eats our [], so we need to use [ and ] instead.
26934   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26935   if test "x$has_forbidden_chars" != x; then
26936     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26937     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26938   fi
26939 
26940 
26941   windows_path="$new_path"
26942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26943     unix_path=`$CYGPATH -u "$windows_path"`
26944     new_path="$unix_path"
26945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26946     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26947     new_path="$unix_path"
26948   fi
26949 
26950   if test "x$path" != "x$new_path"; then
26951     BOOT_JDK="$new_path"
26952     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26953 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26954   fi
26955 
26956   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26957   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26958 
26959     else
26960       # We're on a unix platform. Hooray! :)
26961       path="$BOOT_JDK"
26962       has_space=`$ECHO "$path" | $GREP " "`
26963       if test "x$has_space" != x; then
26964         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26965 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26966         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26967       fi
26968 
26969       # Use eval to expand a potential ~
26970       eval path="$path"
26971       if test ! -f "$path" && test ! -d "$path"; then
26972         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26973       fi
26974 
26975       if test -d "$path"; then
26976         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26977       else
26978         dir="`$DIRNAME "$path"`"
26979         base="`$BASENAME "$path"`"
26980         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26981       fi
26982     fi
26983   fi
26984 
26985             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26986 $as_echo_n "checking for Boot JDK... " >&6; }
26987             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26988 $as_echo "$BOOT_JDK" >&6; }
26989             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26990 $as_echo_n "checking Boot JDK version... " >&6; }
26991             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26992             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26993 $as_echo "$BOOT_JDK_VERSION" >&6; }
26994           fi # end check jdk version
26995         fi # end check javac
26996       fi # end check java
26997     fi # end check boot jdk found
26998   fi
26999 
27000 
27001   if test "x$BOOT_JDK_FOUND" = xno; then
27002     # Now execute the test
27003 
27004   if test "x$PROGRAMW6432" != x; then
27005     VIRTUAL_DIR="$PROGRAMW6432/Java"
27006 
27007   windows_path="$VIRTUAL_DIR"
27008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27009     unix_path=`$CYGPATH -u "$windows_path"`
27010     VIRTUAL_DIR="$unix_path"
27011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27012     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27013     VIRTUAL_DIR="$unix_path"
27014   fi
27015 
27016 
27017   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27018   BOOT_JDK_SUFFIX=""
27019   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27020   if test "x$ALL_JDKS_FOUND" != x; then
27021     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27022 
27023   if test "x$BOOT_JDK_FOUND" = xno; then
27024     # Now execute the test
27025 
27026         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27027         if test -d "$BOOT_JDK"; then
27028           BOOT_JDK_FOUND=maybe
27029           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27030 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27031         fi
27032 
27033 
27034     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27035     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27036       # Do we have a bin/java?
27037       if test ! -x "$BOOT_JDK/bin/java"; then
27038         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27039 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27040         BOOT_JDK_FOUND=no
27041       else
27042         # Do we have a bin/javac?
27043         if test ! -x "$BOOT_JDK/bin/javac"; then
27044           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27045 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27046           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27047 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27048           BOOT_JDK_FOUND=no
27049         else
27050           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27051           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27052 
27053           # Extra M4 quote needed to protect [] in grep expression.
27054           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27055           if test "x$FOUND_CORRECT_VERSION" = x; then
27056             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27057 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27058             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27059 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27060             BOOT_JDK_FOUND=no
27061           else
27062             # We're done! :-)
27063             BOOT_JDK_FOUND=yes
27064 
27065   # Only process if variable expands to non-empty
27066 
27067   if test "x$BOOT_JDK" != x; then
27068     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27069 
27070   # Input might be given as Windows format, start by converting to
27071   # unix format.
27072   path="$BOOT_JDK"
27073   new_path=`$CYGPATH -u "$path"`
27074 
27075   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27076   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27077   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27078   # "foo.exe" is OK but "foo" is an error.
27079   #
27080   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27081   # It is also a way to make sure we got the proper file name for the real test later on.
27082   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27083   if test "x$test_shortpath" = x; then
27084     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27085 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27086     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27087   fi
27088 
27089   # Call helper function which possibly converts this using DOS-style short mode.
27090   # If so, the updated path is stored in $new_path.
27091 
27092   input_path="$new_path"
27093   # Check if we need to convert this using DOS-style short mode. If the path
27094   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27095   # take no chances and rewrite it.
27096   # Note: m4 eats our [], so we need to use [ and ] instead.
27097   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27098   if test "x$has_forbidden_chars" != x; then
27099     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27100     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27101     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27102     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27103       # Going to short mode and back again did indeed matter. Since short mode is
27104       # case insensitive, let's make it lowercase to improve readability.
27105       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27106       # Now convert it back to Unix-style (cygpath)
27107       input_path=`$CYGPATH -u "$shortmode_path"`
27108       new_path="$input_path"
27109     fi
27110   fi
27111 
27112   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27113   if test "x$test_cygdrive_prefix" = x; then
27114     # As a simple fix, exclude /usr/bin since it's not a real path.
27115     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27116       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27117       # a path prefixed by /cygdrive for fixpath to work.
27118       new_path="$CYGWIN_ROOT_PATH$input_path"
27119     fi
27120   fi
27121 
27122 
27123   if test "x$path" != "x$new_path"; then
27124     BOOT_JDK="$new_path"
27125     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27126 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27127   fi
27128 
27129     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27130 
27131   path="$BOOT_JDK"
27132   has_colon=`$ECHO $path | $GREP ^.:`
27133   new_path="$path"
27134   if test "x$has_colon" = x; then
27135     # Not in mixed or Windows style, start by that.
27136     new_path=`cmd //c echo $path`
27137   fi
27138 
27139 
27140   input_path="$new_path"
27141   # Check if we need to convert this using DOS-style short mode. If the path
27142   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27143   # take no chances and rewrite it.
27144   # Note: m4 eats our [], so we need to use [ and ] instead.
27145   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27146   if test "x$has_forbidden_chars" != x; then
27147     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27148     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27149   fi
27150 
27151 
27152   windows_path="$new_path"
27153   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27154     unix_path=`$CYGPATH -u "$windows_path"`
27155     new_path="$unix_path"
27156   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27157     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27158     new_path="$unix_path"
27159   fi
27160 
27161   if test "x$path" != "x$new_path"; then
27162     BOOT_JDK="$new_path"
27163     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27164 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27165   fi
27166 
27167   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27168   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27169 
27170     else
27171       # We're on a unix platform. Hooray! :)
27172       path="$BOOT_JDK"
27173       has_space=`$ECHO "$path" | $GREP " "`
27174       if test "x$has_space" != x; then
27175         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27176 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27177         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27178       fi
27179 
27180       # Use eval to expand a potential ~
27181       eval path="$path"
27182       if test ! -f "$path" && test ! -d "$path"; then
27183         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27184       fi
27185 
27186       if test -d "$path"; then
27187         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27188       else
27189         dir="`$DIRNAME "$path"`"
27190         base="`$BASENAME "$path"`"
27191         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27192       fi
27193     fi
27194   fi
27195 
27196             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27197 $as_echo_n "checking for Boot JDK... " >&6; }
27198             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27199 $as_echo "$BOOT_JDK" >&6; }
27200             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27201 $as_echo_n "checking Boot JDK version... " >&6; }
27202             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27203             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27204 $as_echo "$BOOT_JDK_VERSION" >&6; }
27205           fi # end check jdk version
27206         fi # end check javac
27207       fi # end check java
27208     fi # end check boot jdk found
27209   fi
27210 
27211     done
27212   fi
27213 
27214   fi
27215 
27216 
27217     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27218     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27219       # Do we have a bin/java?
27220       if test ! -x "$BOOT_JDK/bin/java"; then
27221         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27222 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27223         BOOT_JDK_FOUND=no
27224       else
27225         # Do we have a bin/javac?
27226         if test ! -x "$BOOT_JDK/bin/javac"; then
27227           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27228 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27229           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27230 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27231           BOOT_JDK_FOUND=no
27232         else
27233           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27234           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27235 
27236           # Extra M4 quote needed to protect [] in grep expression.
27237           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27238           if test "x$FOUND_CORRECT_VERSION" = x; then
27239             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27240 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27241             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27242 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27243             BOOT_JDK_FOUND=no
27244           else
27245             # We're done! :-)
27246             BOOT_JDK_FOUND=yes
27247 
27248   # Only process if variable expands to non-empty
27249 
27250   if test "x$BOOT_JDK" != x; then
27251     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27252 
27253   # Input might be given as Windows format, start by converting to
27254   # unix format.
27255   path="$BOOT_JDK"
27256   new_path=`$CYGPATH -u "$path"`
27257 
27258   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27259   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27260   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27261   # "foo.exe" is OK but "foo" is an error.
27262   #
27263   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27264   # It is also a way to make sure we got the proper file name for the real test later on.
27265   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27266   if test "x$test_shortpath" = x; then
27267     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27268 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27269     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27270   fi
27271 
27272   # Call helper function which possibly converts this using DOS-style short mode.
27273   # If so, the updated path is stored in $new_path.
27274 
27275   input_path="$new_path"
27276   # Check if we need to convert this using DOS-style short mode. If the path
27277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27278   # take no chances and rewrite it.
27279   # Note: m4 eats our [], so we need to use [ and ] instead.
27280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27281   if test "x$has_forbidden_chars" != x; then
27282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27283     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27284     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27285     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27286       # Going to short mode and back again did indeed matter. Since short mode is
27287       # case insensitive, let's make it lowercase to improve readability.
27288       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27289       # Now convert it back to Unix-style (cygpath)
27290       input_path=`$CYGPATH -u "$shortmode_path"`
27291       new_path="$input_path"
27292     fi
27293   fi
27294 
27295   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27296   if test "x$test_cygdrive_prefix" = x; then
27297     # As a simple fix, exclude /usr/bin since it's not a real path.
27298     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27299       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27300       # a path prefixed by /cygdrive for fixpath to work.
27301       new_path="$CYGWIN_ROOT_PATH$input_path"
27302     fi
27303   fi
27304 
27305 
27306   if test "x$path" != "x$new_path"; then
27307     BOOT_JDK="$new_path"
27308     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27309 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27310   fi
27311 
27312     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27313 
27314   path="$BOOT_JDK"
27315   has_colon=`$ECHO $path | $GREP ^.:`
27316   new_path="$path"
27317   if test "x$has_colon" = x; then
27318     # Not in mixed or Windows style, start by that.
27319     new_path=`cmd //c echo $path`
27320   fi
27321 
27322 
27323   input_path="$new_path"
27324   # Check if we need to convert this using DOS-style short mode. If the path
27325   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27326   # take no chances and rewrite it.
27327   # Note: m4 eats our [], so we need to use [ and ] instead.
27328   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27329   if test "x$has_forbidden_chars" != x; then
27330     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27331     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27332   fi
27333 
27334 
27335   windows_path="$new_path"
27336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27337     unix_path=`$CYGPATH -u "$windows_path"`
27338     new_path="$unix_path"
27339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27340     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27341     new_path="$unix_path"
27342   fi
27343 
27344   if test "x$path" != "x$new_path"; then
27345     BOOT_JDK="$new_path"
27346     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27347 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27348   fi
27349 
27350   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27351   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27352 
27353     else
27354       # We're on a unix platform. Hooray! :)
27355       path="$BOOT_JDK"
27356       has_space=`$ECHO "$path" | $GREP " "`
27357       if test "x$has_space" != x; then
27358         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27359 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27360         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27361       fi
27362 
27363       # Use eval to expand a potential ~
27364       eval path="$path"
27365       if test ! -f "$path" && test ! -d "$path"; then
27366         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27367       fi
27368 
27369       if test -d "$path"; then
27370         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27371       else
27372         dir="`$DIRNAME "$path"`"
27373         base="`$BASENAME "$path"`"
27374         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27375       fi
27376     fi
27377   fi
27378 
27379             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27380 $as_echo_n "checking for Boot JDK... " >&6; }
27381             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27382 $as_echo "$BOOT_JDK" >&6; }
27383             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27384 $as_echo_n "checking Boot JDK version... " >&6; }
27385             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27386             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27387 $as_echo "$BOOT_JDK_VERSION" >&6; }
27388           fi # end check jdk version
27389         fi # end check javac
27390       fi # end check java
27391     fi # end check boot jdk found
27392   fi
27393 
27394 
27395   if test "x$BOOT_JDK_FOUND" = xno; then
27396     # Now execute the test
27397 
27398   if test "x$PROGRAMFILES" != x; then
27399     VIRTUAL_DIR="$PROGRAMFILES/Java"
27400 
27401   windows_path="$VIRTUAL_DIR"
27402   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27403     unix_path=`$CYGPATH -u "$windows_path"`
27404     VIRTUAL_DIR="$unix_path"
27405   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27406     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27407     VIRTUAL_DIR="$unix_path"
27408   fi
27409 
27410 
27411   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27412   BOOT_JDK_SUFFIX=""
27413   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27414   if test "x$ALL_JDKS_FOUND" != x; then
27415     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27416 
27417   if test "x$BOOT_JDK_FOUND" = xno; then
27418     # Now execute the test
27419 
27420         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27421         if test -d "$BOOT_JDK"; then
27422           BOOT_JDK_FOUND=maybe
27423           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27424 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27425         fi
27426 
27427 
27428     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27429     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27430       # Do we have a bin/java?
27431       if test ! -x "$BOOT_JDK/bin/java"; then
27432         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27433 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27434         BOOT_JDK_FOUND=no
27435       else
27436         # Do we have a bin/javac?
27437         if test ! -x "$BOOT_JDK/bin/javac"; then
27438           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27439 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27440           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27441 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27442           BOOT_JDK_FOUND=no
27443         else
27444           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27445           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27446 
27447           # Extra M4 quote needed to protect [] in grep expression.
27448           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27449           if test "x$FOUND_CORRECT_VERSION" = x; then
27450             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27451 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27452             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27453 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27454             BOOT_JDK_FOUND=no
27455           else
27456             # We're done! :-)
27457             BOOT_JDK_FOUND=yes
27458 
27459   # Only process if variable expands to non-empty
27460 
27461   if test "x$BOOT_JDK" != x; then
27462     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27463 
27464   # Input might be given as Windows format, start by converting to
27465   # unix format.
27466   path="$BOOT_JDK"
27467   new_path=`$CYGPATH -u "$path"`
27468 
27469   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27470   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27471   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27472   # "foo.exe" is OK but "foo" is an error.
27473   #
27474   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27475   # It is also a way to make sure we got the proper file name for the real test later on.
27476   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27477   if test "x$test_shortpath" = x; then
27478     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27479 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27480     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27481   fi
27482 
27483   # Call helper function which possibly converts this using DOS-style short mode.
27484   # If so, the updated path is stored in $new_path.
27485 
27486   input_path="$new_path"
27487   # Check if we need to convert this using DOS-style short mode. If the path
27488   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27489   # take no chances and rewrite it.
27490   # Note: m4 eats our [], so we need to use [ and ] instead.
27491   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27492   if test "x$has_forbidden_chars" != x; then
27493     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27494     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27495     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27496     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27497       # Going to short mode and back again did indeed matter. Since short mode is
27498       # case insensitive, let's make it lowercase to improve readability.
27499       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27500       # Now convert it back to Unix-style (cygpath)
27501       input_path=`$CYGPATH -u "$shortmode_path"`
27502       new_path="$input_path"
27503     fi
27504   fi
27505 
27506   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27507   if test "x$test_cygdrive_prefix" = x; then
27508     # As a simple fix, exclude /usr/bin since it's not a real path.
27509     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27510       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27511       # a path prefixed by /cygdrive for fixpath to work.
27512       new_path="$CYGWIN_ROOT_PATH$input_path"
27513     fi
27514   fi
27515 
27516 
27517   if test "x$path" != "x$new_path"; then
27518     BOOT_JDK="$new_path"
27519     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27520 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27521   fi
27522 
27523     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27524 
27525   path="$BOOT_JDK"
27526   has_colon=`$ECHO $path | $GREP ^.:`
27527   new_path="$path"
27528   if test "x$has_colon" = x; then
27529     # Not in mixed or Windows style, start by that.
27530     new_path=`cmd //c echo $path`
27531   fi
27532 
27533 
27534   input_path="$new_path"
27535   # Check if we need to convert this using DOS-style short mode. If the path
27536   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27537   # take no chances and rewrite it.
27538   # Note: m4 eats our [], so we need to use [ and ] instead.
27539   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27540   if test "x$has_forbidden_chars" != x; then
27541     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27542     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27543   fi
27544 
27545 
27546   windows_path="$new_path"
27547   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27548     unix_path=`$CYGPATH -u "$windows_path"`
27549     new_path="$unix_path"
27550   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27551     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27552     new_path="$unix_path"
27553   fi
27554 
27555   if test "x$path" != "x$new_path"; then
27556     BOOT_JDK="$new_path"
27557     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27558 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27559   fi
27560 
27561   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27562   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27563 
27564     else
27565       # We're on a unix platform. Hooray! :)
27566       path="$BOOT_JDK"
27567       has_space=`$ECHO "$path" | $GREP " "`
27568       if test "x$has_space" != x; then
27569         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27570 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27571         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27572       fi
27573 
27574       # Use eval to expand a potential ~
27575       eval path="$path"
27576       if test ! -f "$path" && test ! -d "$path"; then
27577         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27578       fi
27579 
27580       if test -d "$path"; then
27581         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27582       else
27583         dir="`$DIRNAME "$path"`"
27584         base="`$BASENAME "$path"`"
27585         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27586       fi
27587     fi
27588   fi
27589 
27590             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27591 $as_echo_n "checking for Boot JDK... " >&6; }
27592             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27593 $as_echo "$BOOT_JDK" >&6; }
27594             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27595 $as_echo_n "checking Boot JDK version... " >&6; }
27596             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27597             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27598 $as_echo "$BOOT_JDK_VERSION" >&6; }
27599           fi # end check jdk version
27600         fi # end check javac
27601       fi # end check java
27602     fi # end check boot jdk found
27603   fi
27604 
27605     done
27606   fi
27607 
27608   fi
27609 
27610 
27611     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27612     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27613       # Do we have a bin/java?
27614       if test ! -x "$BOOT_JDK/bin/java"; then
27615         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27616 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27617         BOOT_JDK_FOUND=no
27618       else
27619         # Do we have a bin/javac?
27620         if test ! -x "$BOOT_JDK/bin/javac"; then
27621           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27622 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27623           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27624 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27625           BOOT_JDK_FOUND=no
27626         else
27627           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27628           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27629 
27630           # Extra M4 quote needed to protect [] in grep expression.
27631           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27632           if test "x$FOUND_CORRECT_VERSION" = x; then
27633             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27634 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27635             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27636 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27637             BOOT_JDK_FOUND=no
27638           else
27639             # We're done! :-)
27640             BOOT_JDK_FOUND=yes
27641 
27642   # Only process if variable expands to non-empty
27643 
27644   if test "x$BOOT_JDK" != x; then
27645     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27646 
27647   # Input might be given as Windows format, start by converting to
27648   # unix format.
27649   path="$BOOT_JDK"
27650   new_path=`$CYGPATH -u "$path"`
27651 
27652   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27653   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27654   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27655   # "foo.exe" is OK but "foo" is an error.
27656   #
27657   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27658   # It is also a way to make sure we got the proper file name for the real test later on.
27659   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27660   if test "x$test_shortpath" = x; then
27661     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27662 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27663     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27664   fi
27665 
27666   # Call helper function which possibly converts this using DOS-style short mode.
27667   # If so, the updated path is stored in $new_path.
27668 
27669   input_path="$new_path"
27670   # Check if we need to convert this using DOS-style short mode. If the path
27671   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27672   # take no chances and rewrite it.
27673   # Note: m4 eats our [], so we need to use [ and ] instead.
27674   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27675   if test "x$has_forbidden_chars" != x; then
27676     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27677     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27678     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27679     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27680       # Going to short mode and back again did indeed matter. Since short mode is
27681       # case insensitive, let's make it lowercase to improve readability.
27682       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27683       # Now convert it back to Unix-style (cygpath)
27684       input_path=`$CYGPATH -u "$shortmode_path"`
27685       new_path="$input_path"
27686     fi
27687   fi
27688 
27689   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27690   if test "x$test_cygdrive_prefix" = x; then
27691     # As a simple fix, exclude /usr/bin since it's not a real path.
27692     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27693       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27694       # a path prefixed by /cygdrive for fixpath to work.
27695       new_path="$CYGWIN_ROOT_PATH$input_path"
27696     fi
27697   fi
27698 
27699 
27700   if test "x$path" != "x$new_path"; then
27701     BOOT_JDK="$new_path"
27702     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27703 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27704   fi
27705 
27706     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27707 
27708   path="$BOOT_JDK"
27709   has_colon=`$ECHO $path | $GREP ^.:`
27710   new_path="$path"
27711   if test "x$has_colon" = x; then
27712     # Not in mixed or Windows style, start by that.
27713     new_path=`cmd //c echo $path`
27714   fi
27715 
27716 
27717   input_path="$new_path"
27718   # Check if we need to convert this using DOS-style short mode. If the path
27719   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27720   # take no chances and rewrite it.
27721   # Note: m4 eats our [], so we need to use [ and ] instead.
27722   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27723   if test "x$has_forbidden_chars" != x; then
27724     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27725     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27726   fi
27727 
27728 
27729   windows_path="$new_path"
27730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27731     unix_path=`$CYGPATH -u "$windows_path"`
27732     new_path="$unix_path"
27733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27734     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27735     new_path="$unix_path"
27736   fi
27737 
27738   if test "x$path" != "x$new_path"; then
27739     BOOT_JDK="$new_path"
27740     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27741 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27742   fi
27743 
27744   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27745   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27746 
27747     else
27748       # We're on a unix platform. Hooray! :)
27749       path="$BOOT_JDK"
27750       has_space=`$ECHO "$path" | $GREP " "`
27751       if test "x$has_space" != x; then
27752         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27753 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27754         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27755       fi
27756 
27757       # Use eval to expand a potential ~
27758       eval path="$path"
27759       if test ! -f "$path" && test ! -d "$path"; then
27760         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27761       fi
27762 
27763       if test -d "$path"; then
27764         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27765       else
27766         dir="`$DIRNAME "$path"`"
27767         base="`$BASENAME "$path"`"
27768         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27769       fi
27770     fi
27771   fi
27772 
27773             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27774 $as_echo_n "checking for Boot JDK... " >&6; }
27775             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27776 $as_echo "$BOOT_JDK" >&6; }
27777             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27778 $as_echo_n "checking Boot JDK version... " >&6; }
27779             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27780             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27781 $as_echo "$BOOT_JDK_VERSION" >&6; }
27782           fi # end check jdk version
27783         fi # end check javac
27784       fi # end check java
27785     fi # end check boot jdk found
27786   fi
27787 
27788 
27789   if test "x$BOOT_JDK_FOUND" = xno; then
27790     # Now execute the test
27791 
27792   if test "x$ProgramFiles" != x; then
27793     VIRTUAL_DIR="$ProgramFiles/Java"
27794 
27795   windows_path="$VIRTUAL_DIR"
27796   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27797     unix_path=`$CYGPATH -u "$windows_path"`
27798     VIRTUAL_DIR="$unix_path"
27799   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27800     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27801     VIRTUAL_DIR="$unix_path"
27802   fi
27803 
27804 
27805   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27806   BOOT_JDK_SUFFIX=""
27807   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27808   if test "x$ALL_JDKS_FOUND" != x; then
27809     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27810 
27811   if test "x$BOOT_JDK_FOUND" = xno; then
27812     # Now execute the test
27813 
27814         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27815         if test -d "$BOOT_JDK"; then
27816           BOOT_JDK_FOUND=maybe
27817           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27818 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27819         fi
27820 
27821 
27822     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27823     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27824       # Do we have a bin/java?
27825       if test ! -x "$BOOT_JDK/bin/java"; then
27826         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27827 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27828         BOOT_JDK_FOUND=no
27829       else
27830         # Do we have a bin/javac?
27831         if test ! -x "$BOOT_JDK/bin/javac"; then
27832           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27833 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27834           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27835 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27836           BOOT_JDK_FOUND=no
27837         else
27838           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27839           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27840 
27841           # Extra M4 quote needed to protect [] in grep expression.
27842           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27843           if test "x$FOUND_CORRECT_VERSION" = x; then
27844             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27845 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27846             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27847 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27848             BOOT_JDK_FOUND=no
27849           else
27850             # We're done! :-)
27851             BOOT_JDK_FOUND=yes
27852 
27853   # Only process if variable expands to non-empty
27854 
27855   if test "x$BOOT_JDK" != x; then
27856     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27857 
27858   # Input might be given as Windows format, start by converting to
27859   # unix format.
27860   path="$BOOT_JDK"
27861   new_path=`$CYGPATH -u "$path"`
27862 
27863   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27864   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27865   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27866   # "foo.exe" is OK but "foo" is an error.
27867   #
27868   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27869   # It is also a way to make sure we got the proper file name for the real test later on.
27870   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27871   if test "x$test_shortpath" = x; then
27872     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27873 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27874     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27875   fi
27876 
27877   # Call helper function which possibly converts this using DOS-style short mode.
27878   # If so, the updated path is stored in $new_path.
27879 
27880   input_path="$new_path"
27881   # Check if we need to convert this using DOS-style short mode. If the path
27882   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27883   # take no chances and rewrite it.
27884   # Note: m4 eats our [], so we need to use [ and ] instead.
27885   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27886   if test "x$has_forbidden_chars" != x; then
27887     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27888     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27889     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27890     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27891       # Going to short mode and back again did indeed matter. Since short mode is
27892       # case insensitive, let's make it lowercase to improve readability.
27893       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27894       # Now convert it back to Unix-style (cygpath)
27895       input_path=`$CYGPATH -u "$shortmode_path"`
27896       new_path="$input_path"
27897     fi
27898   fi
27899 
27900   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27901   if test "x$test_cygdrive_prefix" = x; then
27902     # As a simple fix, exclude /usr/bin since it's not a real path.
27903     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27904       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27905       # a path prefixed by /cygdrive for fixpath to work.
27906       new_path="$CYGWIN_ROOT_PATH$input_path"
27907     fi
27908   fi
27909 
27910 
27911   if test "x$path" != "x$new_path"; then
27912     BOOT_JDK="$new_path"
27913     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27914 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27915   fi
27916 
27917     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27918 
27919   path="$BOOT_JDK"
27920   has_colon=`$ECHO $path | $GREP ^.:`
27921   new_path="$path"
27922   if test "x$has_colon" = x; then
27923     # Not in mixed or Windows style, start by that.
27924     new_path=`cmd //c echo $path`
27925   fi
27926 
27927 
27928   input_path="$new_path"
27929   # Check if we need to convert this using DOS-style short mode. If the path
27930   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27931   # take no chances and rewrite it.
27932   # Note: m4 eats our [], so we need to use [ and ] instead.
27933   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27934   if test "x$has_forbidden_chars" != x; then
27935     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27936     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27937   fi
27938 
27939 
27940   windows_path="$new_path"
27941   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27942     unix_path=`$CYGPATH -u "$windows_path"`
27943     new_path="$unix_path"
27944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27945     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27946     new_path="$unix_path"
27947   fi
27948 
27949   if test "x$path" != "x$new_path"; then
27950     BOOT_JDK="$new_path"
27951     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27952 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27953   fi
27954 
27955   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27956   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27957 
27958     else
27959       # We're on a unix platform. Hooray! :)
27960       path="$BOOT_JDK"
27961       has_space=`$ECHO "$path" | $GREP " "`
27962       if test "x$has_space" != x; then
27963         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27964 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27965         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27966       fi
27967 
27968       # Use eval to expand a potential ~
27969       eval path="$path"
27970       if test ! -f "$path" && test ! -d "$path"; then
27971         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27972       fi
27973 
27974       if test -d "$path"; then
27975         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27976       else
27977         dir="`$DIRNAME "$path"`"
27978         base="`$BASENAME "$path"`"
27979         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27980       fi
27981     fi
27982   fi
27983 
27984             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27985 $as_echo_n "checking for Boot JDK... " >&6; }
27986             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27987 $as_echo "$BOOT_JDK" >&6; }
27988             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27989 $as_echo_n "checking Boot JDK version... " >&6; }
27990             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27991             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27992 $as_echo "$BOOT_JDK_VERSION" >&6; }
27993           fi # end check jdk version
27994         fi # end check javac
27995       fi # end check java
27996     fi # end check boot jdk found
27997   fi
27998 
27999     done
28000   fi
28001 
28002   fi
28003 
28004 
28005     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28006     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28007       # Do we have a bin/java?
28008       if test ! -x "$BOOT_JDK/bin/java"; then
28009         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28010 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28011         BOOT_JDK_FOUND=no
28012       else
28013         # Do we have a bin/javac?
28014         if test ! -x "$BOOT_JDK/bin/javac"; then
28015           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28016 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28017           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28018 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28019           BOOT_JDK_FOUND=no
28020         else
28021           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28022           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28023 
28024           # Extra M4 quote needed to protect [] in grep expression.
28025           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28026           if test "x$FOUND_CORRECT_VERSION" = x; then
28027             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28028 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28029             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28030 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28031             BOOT_JDK_FOUND=no
28032           else
28033             # We're done! :-)
28034             BOOT_JDK_FOUND=yes
28035 
28036   # Only process if variable expands to non-empty
28037 
28038   if test "x$BOOT_JDK" != x; then
28039     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28040 
28041   # Input might be given as Windows format, start by converting to
28042   # unix format.
28043   path="$BOOT_JDK"
28044   new_path=`$CYGPATH -u "$path"`
28045 
28046   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28047   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28048   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28049   # "foo.exe" is OK but "foo" is an error.
28050   #
28051   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28052   # It is also a way to make sure we got the proper file name for the real test later on.
28053   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28054   if test "x$test_shortpath" = x; then
28055     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28056 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28057     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28058   fi
28059 
28060   # Call helper function which possibly converts this using DOS-style short mode.
28061   # If so, the updated path is stored in $new_path.
28062 
28063   input_path="$new_path"
28064   # Check if we need to convert this using DOS-style short mode. If the path
28065   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28066   # take no chances and rewrite it.
28067   # Note: m4 eats our [], so we need to use [ and ] instead.
28068   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28069   if test "x$has_forbidden_chars" != x; then
28070     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28071     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28072     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28073     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28074       # Going to short mode and back again did indeed matter. Since short mode is
28075       # case insensitive, let's make it lowercase to improve readability.
28076       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28077       # Now convert it back to Unix-style (cygpath)
28078       input_path=`$CYGPATH -u "$shortmode_path"`
28079       new_path="$input_path"
28080     fi
28081   fi
28082 
28083   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28084   if test "x$test_cygdrive_prefix" = x; then
28085     # As a simple fix, exclude /usr/bin since it's not a real path.
28086     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28087       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28088       # a path prefixed by /cygdrive for fixpath to work.
28089       new_path="$CYGWIN_ROOT_PATH$input_path"
28090     fi
28091   fi
28092 
28093 
28094   if test "x$path" != "x$new_path"; then
28095     BOOT_JDK="$new_path"
28096     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28097 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28098   fi
28099 
28100     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28101 
28102   path="$BOOT_JDK"
28103   has_colon=`$ECHO $path | $GREP ^.:`
28104   new_path="$path"
28105   if test "x$has_colon" = x; then
28106     # Not in mixed or Windows style, start by that.
28107     new_path=`cmd //c echo $path`
28108   fi
28109 
28110 
28111   input_path="$new_path"
28112   # Check if we need to convert this using DOS-style short mode. If the path
28113   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28114   # take no chances and rewrite it.
28115   # Note: m4 eats our [], so we need to use [ and ] instead.
28116   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28117   if test "x$has_forbidden_chars" != x; then
28118     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28119     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28120   fi
28121 
28122 
28123   windows_path="$new_path"
28124   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28125     unix_path=`$CYGPATH -u "$windows_path"`
28126     new_path="$unix_path"
28127   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28128     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28129     new_path="$unix_path"
28130   fi
28131 
28132   if test "x$path" != "x$new_path"; then
28133     BOOT_JDK="$new_path"
28134     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28135 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28136   fi
28137 
28138   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28139   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28140 
28141     else
28142       # We're on a unix platform. Hooray! :)
28143       path="$BOOT_JDK"
28144       has_space=`$ECHO "$path" | $GREP " "`
28145       if test "x$has_space" != x; then
28146         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28147 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28148         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28149       fi
28150 
28151       # Use eval to expand a potential ~
28152       eval path="$path"
28153       if test ! -f "$path" && test ! -d "$path"; then
28154         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28155       fi
28156 
28157       if test -d "$path"; then
28158         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28159       else
28160         dir="`$DIRNAME "$path"`"
28161         base="`$BASENAME "$path"`"
28162         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28163       fi
28164     fi
28165   fi
28166 
28167             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28168 $as_echo_n "checking for Boot JDK... " >&6; }
28169             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28170 $as_echo "$BOOT_JDK" >&6; }
28171             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28172 $as_echo_n "checking Boot JDK version... " >&6; }
28173             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28174             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28175 $as_echo "$BOOT_JDK_VERSION" >&6; }
28176           fi # end check jdk version
28177         fi # end check javac
28178       fi # end check java
28179     fi # end check boot jdk found
28180   fi
28181 
28182 
28183   if test "x$BOOT_JDK_FOUND" = xno; then
28184     # Now execute the test
28185 
28186   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28187   BOOT_JDK_SUFFIX=""
28188   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28189   if test "x$ALL_JDKS_FOUND" != x; then
28190     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28191 
28192   if test "x$BOOT_JDK_FOUND" = xno; then
28193     # Now execute the test
28194 
28195         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28196         if test -d "$BOOT_JDK"; then
28197           BOOT_JDK_FOUND=maybe
28198           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28199 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28200         fi
28201 
28202 
28203     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28204     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28205       # Do we have a bin/java?
28206       if test ! -x "$BOOT_JDK/bin/java"; then
28207         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28208 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28209         BOOT_JDK_FOUND=no
28210       else
28211         # Do we have a bin/javac?
28212         if test ! -x "$BOOT_JDK/bin/javac"; then
28213           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28214 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28215           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28216 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28217           BOOT_JDK_FOUND=no
28218         else
28219           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28220           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28221 
28222           # Extra M4 quote needed to protect [] in grep expression.
28223           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28224           if test "x$FOUND_CORRECT_VERSION" = x; then
28225             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28226 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28227             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28228 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28229             BOOT_JDK_FOUND=no
28230           else
28231             # We're done! :-)
28232             BOOT_JDK_FOUND=yes
28233 
28234   # Only process if variable expands to non-empty
28235 
28236   if test "x$BOOT_JDK" != x; then
28237     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28238 
28239   # Input might be given as Windows format, start by converting to
28240   # unix format.
28241   path="$BOOT_JDK"
28242   new_path=`$CYGPATH -u "$path"`
28243 
28244   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28245   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28246   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28247   # "foo.exe" is OK but "foo" is an error.
28248   #
28249   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28250   # It is also a way to make sure we got the proper file name for the real test later on.
28251   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28252   if test "x$test_shortpath" = x; then
28253     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28254 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28255     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28256   fi
28257 
28258   # Call helper function which possibly converts this using DOS-style short mode.
28259   # If so, the updated path is stored in $new_path.
28260 
28261   input_path="$new_path"
28262   # Check if we need to convert this using DOS-style short mode. If the path
28263   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28264   # take no chances and rewrite it.
28265   # Note: m4 eats our [], so we need to use [ and ] instead.
28266   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28267   if test "x$has_forbidden_chars" != x; then
28268     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28269     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28270     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28271     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28272       # Going to short mode and back again did indeed matter. Since short mode is
28273       # case insensitive, let's make it lowercase to improve readability.
28274       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28275       # Now convert it back to Unix-style (cygpath)
28276       input_path=`$CYGPATH -u "$shortmode_path"`
28277       new_path="$input_path"
28278     fi
28279   fi
28280 
28281   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28282   if test "x$test_cygdrive_prefix" = x; then
28283     # As a simple fix, exclude /usr/bin since it's not a real path.
28284     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28285       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28286       # a path prefixed by /cygdrive for fixpath to work.
28287       new_path="$CYGWIN_ROOT_PATH$input_path"
28288     fi
28289   fi
28290 
28291 
28292   if test "x$path" != "x$new_path"; then
28293     BOOT_JDK="$new_path"
28294     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28295 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28296   fi
28297 
28298     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28299 
28300   path="$BOOT_JDK"
28301   has_colon=`$ECHO $path | $GREP ^.:`
28302   new_path="$path"
28303   if test "x$has_colon" = x; then
28304     # Not in mixed or Windows style, start by that.
28305     new_path=`cmd //c echo $path`
28306   fi
28307 
28308 
28309   input_path="$new_path"
28310   # Check if we need to convert this using DOS-style short mode. If the path
28311   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28312   # take no chances and rewrite it.
28313   # Note: m4 eats our [], so we need to use [ and ] instead.
28314   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28315   if test "x$has_forbidden_chars" != x; then
28316     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28317     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28318   fi
28319 
28320 
28321   windows_path="$new_path"
28322   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28323     unix_path=`$CYGPATH -u "$windows_path"`
28324     new_path="$unix_path"
28325   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28326     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28327     new_path="$unix_path"
28328   fi
28329 
28330   if test "x$path" != "x$new_path"; then
28331     BOOT_JDK="$new_path"
28332     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28333 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28334   fi
28335 
28336   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28337   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28338 
28339     else
28340       # We're on a unix platform. Hooray! :)
28341       path="$BOOT_JDK"
28342       has_space=`$ECHO "$path" | $GREP " "`
28343       if test "x$has_space" != x; then
28344         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28345 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28346         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28347       fi
28348 
28349       # Use eval to expand a potential ~
28350       eval path="$path"
28351       if test ! -f "$path" && test ! -d "$path"; then
28352         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28353       fi
28354 
28355       if test -d "$path"; then
28356         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28357       else
28358         dir="`$DIRNAME "$path"`"
28359         base="`$BASENAME "$path"`"
28360         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28361       fi
28362     fi
28363   fi
28364 
28365             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28366 $as_echo_n "checking for Boot JDK... " >&6; }
28367             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28368 $as_echo "$BOOT_JDK" >&6; }
28369             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28370 $as_echo_n "checking Boot JDK version... " >&6; }
28371             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28372             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28373 $as_echo "$BOOT_JDK_VERSION" >&6; }
28374           fi # end check jdk version
28375         fi # end check javac
28376       fi # end check java
28377     fi # end check boot jdk found
28378   fi
28379 
28380     done
28381   fi
28382 
28383 
28384     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28385     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28386       # Do we have a bin/java?
28387       if test ! -x "$BOOT_JDK/bin/java"; then
28388         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28389 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28390         BOOT_JDK_FOUND=no
28391       else
28392         # Do we have a bin/javac?
28393         if test ! -x "$BOOT_JDK/bin/javac"; then
28394           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28395 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28396           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28397 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28398           BOOT_JDK_FOUND=no
28399         else
28400           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28401           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28402 
28403           # Extra M4 quote needed to protect [] in grep expression.
28404           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28405           if test "x$FOUND_CORRECT_VERSION" = x; then
28406             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28407 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28408             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28409 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28410             BOOT_JDK_FOUND=no
28411           else
28412             # We're done! :-)
28413             BOOT_JDK_FOUND=yes
28414 
28415   # Only process if variable expands to non-empty
28416 
28417   if test "x$BOOT_JDK" != x; then
28418     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28419 
28420   # Input might be given as Windows format, start by converting to
28421   # unix format.
28422   path="$BOOT_JDK"
28423   new_path=`$CYGPATH -u "$path"`
28424 
28425   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28426   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28427   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28428   # "foo.exe" is OK but "foo" is an error.
28429   #
28430   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28431   # It is also a way to make sure we got the proper file name for the real test later on.
28432   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28433   if test "x$test_shortpath" = x; then
28434     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28435 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28436     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28437   fi
28438 
28439   # Call helper function which possibly converts this using DOS-style short mode.
28440   # If so, the updated path is stored in $new_path.
28441 
28442   input_path="$new_path"
28443   # Check if we need to convert this using DOS-style short mode. If the path
28444   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28445   # take no chances and rewrite it.
28446   # Note: m4 eats our [], so we need to use [ and ] instead.
28447   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28448   if test "x$has_forbidden_chars" != x; then
28449     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28450     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28451     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28452     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28453       # Going to short mode and back again did indeed matter. Since short mode is
28454       # case insensitive, let's make it lowercase to improve readability.
28455       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28456       # Now convert it back to Unix-style (cygpath)
28457       input_path=`$CYGPATH -u "$shortmode_path"`
28458       new_path="$input_path"
28459     fi
28460   fi
28461 
28462   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28463   if test "x$test_cygdrive_prefix" = x; then
28464     # As a simple fix, exclude /usr/bin since it's not a real path.
28465     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28466       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28467       # a path prefixed by /cygdrive for fixpath to work.
28468       new_path="$CYGWIN_ROOT_PATH$input_path"
28469     fi
28470   fi
28471 
28472 
28473   if test "x$path" != "x$new_path"; then
28474     BOOT_JDK="$new_path"
28475     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28476 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28477   fi
28478 
28479     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28480 
28481   path="$BOOT_JDK"
28482   has_colon=`$ECHO $path | $GREP ^.:`
28483   new_path="$path"
28484   if test "x$has_colon" = x; then
28485     # Not in mixed or Windows style, start by that.
28486     new_path=`cmd //c echo $path`
28487   fi
28488 
28489 
28490   input_path="$new_path"
28491   # Check if we need to convert this using DOS-style short mode. If the path
28492   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28493   # take no chances and rewrite it.
28494   # Note: m4 eats our [], so we need to use [ and ] instead.
28495   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28496   if test "x$has_forbidden_chars" != x; then
28497     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28498     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28499   fi
28500 
28501 
28502   windows_path="$new_path"
28503   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28504     unix_path=`$CYGPATH -u "$windows_path"`
28505     new_path="$unix_path"
28506   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28507     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28508     new_path="$unix_path"
28509   fi
28510 
28511   if test "x$path" != "x$new_path"; then
28512     BOOT_JDK="$new_path"
28513     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28514 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28515   fi
28516 
28517   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28518   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28519 
28520     else
28521       # We're on a unix platform. Hooray! :)
28522       path="$BOOT_JDK"
28523       has_space=`$ECHO "$path" | $GREP " "`
28524       if test "x$has_space" != x; then
28525         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28526 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28527         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28528       fi
28529 
28530       # Use eval to expand a potential ~
28531       eval path="$path"
28532       if test ! -f "$path" && test ! -d "$path"; then
28533         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28534       fi
28535 
28536       if test -d "$path"; then
28537         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28538       else
28539         dir="`$DIRNAME "$path"`"
28540         base="`$BASENAME "$path"`"
28541         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28542       fi
28543     fi
28544   fi
28545 
28546             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28547 $as_echo_n "checking for Boot JDK... " >&6; }
28548             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28549 $as_echo "$BOOT_JDK" >&6; }
28550             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28551 $as_echo_n "checking Boot JDK version... " >&6; }
28552             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28553             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28554 $as_echo "$BOOT_JDK_VERSION" >&6; }
28555           fi # end check jdk version
28556         fi # end check javac
28557       fi # end check java
28558     fi # end check boot jdk found
28559   fi
28560 
28561   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28562 
28563   if test "x$BOOT_JDK_FOUND" = xno; then
28564     # Now execute the test
28565 
28566   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28567   BOOT_JDK_SUFFIX="/Contents/Home"
28568   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28569   if test "x$ALL_JDKS_FOUND" != x; then
28570     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28571 
28572   if test "x$BOOT_JDK_FOUND" = xno; then
28573     # Now execute the test
28574 
28575         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28576         if test -d "$BOOT_JDK"; then
28577           BOOT_JDK_FOUND=maybe
28578           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28579 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28580         fi
28581 
28582 
28583     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28584     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28585       # Do we have a bin/java?
28586       if test ! -x "$BOOT_JDK/bin/java"; then
28587         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28588 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28589         BOOT_JDK_FOUND=no
28590       else
28591         # Do we have a bin/javac?
28592         if test ! -x "$BOOT_JDK/bin/javac"; then
28593           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28594 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28595           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28596 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28597           BOOT_JDK_FOUND=no
28598         else
28599           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28600           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28601 
28602           # Extra M4 quote needed to protect [] in grep expression.
28603           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28604           if test "x$FOUND_CORRECT_VERSION" = x; then
28605             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28606 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28607             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28608 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28609             BOOT_JDK_FOUND=no
28610           else
28611             # We're done! :-)
28612             BOOT_JDK_FOUND=yes
28613 
28614   # Only process if variable expands to non-empty
28615 
28616   if test "x$BOOT_JDK" != x; then
28617     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28618 
28619   # Input might be given as Windows format, start by converting to
28620   # unix format.
28621   path="$BOOT_JDK"
28622   new_path=`$CYGPATH -u "$path"`
28623 
28624   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28625   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28626   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28627   # "foo.exe" is OK but "foo" is an error.
28628   #
28629   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28630   # It is also a way to make sure we got the proper file name for the real test later on.
28631   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28632   if test "x$test_shortpath" = x; then
28633     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28634 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28635     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28636   fi
28637 
28638   # Call helper function which possibly converts this using DOS-style short mode.
28639   # If so, the updated path is stored in $new_path.
28640 
28641   input_path="$new_path"
28642   # Check if we need to convert this using DOS-style short mode. If the path
28643   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28644   # take no chances and rewrite it.
28645   # Note: m4 eats our [], so we need to use [ and ] instead.
28646   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28647   if test "x$has_forbidden_chars" != x; then
28648     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28649     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28650     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28651     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28652       # Going to short mode and back again did indeed matter. Since short mode is
28653       # case insensitive, let's make it lowercase to improve readability.
28654       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28655       # Now convert it back to Unix-style (cygpath)
28656       input_path=`$CYGPATH -u "$shortmode_path"`
28657       new_path="$input_path"
28658     fi
28659   fi
28660 
28661   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28662   if test "x$test_cygdrive_prefix" = x; then
28663     # As a simple fix, exclude /usr/bin since it's not a real path.
28664     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28665       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28666       # a path prefixed by /cygdrive for fixpath to work.
28667       new_path="$CYGWIN_ROOT_PATH$input_path"
28668     fi
28669   fi
28670 
28671 
28672   if test "x$path" != "x$new_path"; then
28673     BOOT_JDK="$new_path"
28674     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28675 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28676   fi
28677 
28678     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28679 
28680   path="$BOOT_JDK"
28681   has_colon=`$ECHO $path | $GREP ^.:`
28682   new_path="$path"
28683   if test "x$has_colon" = x; then
28684     # Not in mixed or Windows style, start by that.
28685     new_path=`cmd //c echo $path`
28686   fi
28687 
28688 
28689   input_path="$new_path"
28690   # Check if we need to convert this using DOS-style short mode. If the path
28691   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28692   # take no chances and rewrite it.
28693   # Note: m4 eats our [], so we need to use [ and ] instead.
28694   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28695   if test "x$has_forbidden_chars" != x; then
28696     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28697     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28698   fi
28699 
28700 
28701   windows_path="$new_path"
28702   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28703     unix_path=`$CYGPATH -u "$windows_path"`
28704     new_path="$unix_path"
28705   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28706     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28707     new_path="$unix_path"
28708   fi
28709 
28710   if test "x$path" != "x$new_path"; then
28711     BOOT_JDK="$new_path"
28712     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28713 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28714   fi
28715 
28716   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28717   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28718 
28719     else
28720       # We're on a unix platform. Hooray! :)
28721       path="$BOOT_JDK"
28722       has_space=`$ECHO "$path" | $GREP " "`
28723       if test "x$has_space" != x; then
28724         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28725 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28726         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28727       fi
28728 
28729       # Use eval to expand a potential ~
28730       eval path="$path"
28731       if test ! -f "$path" && test ! -d "$path"; then
28732         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28733       fi
28734 
28735       if test -d "$path"; then
28736         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28737       else
28738         dir="`$DIRNAME "$path"`"
28739         base="`$BASENAME "$path"`"
28740         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28741       fi
28742     fi
28743   fi
28744 
28745             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28746 $as_echo_n "checking for Boot JDK... " >&6; }
28747             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28748 $as_echo "$BOOT_JDK" >&6; }
28749             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28750 $as_echo_n "checking Boot JDK version... " >&6; }
28751             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28752             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28753 $as_echo "$BOOT_JDK_VERSION" >&6; }
28754           fi # end check jdk version
28755         fi # end check javac
28756       fi # end check java
28757     fi # end check boot jdk found
28758   fi
28759 
28760     done
28761   fi
28762 
28763 
28764     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28765     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28766       # Do we have a bin/java?
28767       if test ! -x "$BOOT_JDK/bin/java"; then
28768         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28769 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28770         BOOT_JDK_FOUND=no
28771       else
28772         # Do we have a bin/javac?
28773         if test ! -x "$BOOT_JDK/bin/javac"; then
28774           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28775 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28776           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28777 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28778           BOOT_JDK_FOUND=no
28779         else
28780           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28781           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28782 
28783           # Extra M4 quote needed to protect [] in grep expression.
28784           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28785           if test "x$FOUND_CORRECT_VERSION" = x; then
28786             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28787 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28788             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28789 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28790             BOOT_JDK_FOUND=no
28791           else
28792             # We're done! :-)
28793             BOOT_JDK_FOUND=yes
28794 
28795   # Only process if variable expands to non-empty
28796 
28797   if test "x$BOOT_JDK" != x; then
28798     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28799 
28800   # Input might be given as Windows format, start by converting to
28801   # unix format.
28802   path="$BOOT_JDK"
28803   new_path=`$CYGPATH -u "$path"`
28804 
28805   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28806   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28807   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28808   # "foo.exe" is OK but "foo" is an error.
28809   #
28810   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28811   # It is also a way to make sure we got the proper file name for the real test later on.
28812   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28813   if test "x$test_shortpath" = x; then
28814     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28815 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28816     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28817   fi
28818 
28819   # Call helper function which possibly converts this using DOS-style short mode.
28820   # If so, the updated path is stored in $new_path.
28821 
28822   input_path="$new_path"
28823   # Check if we need to convert this using DOS-style short mode. If the path
28824   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28825   # take no chances and rewrite it.
28826   # Note: m4 eats our [], so we need to use [ and ] instead.
28827   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28828   if test "x$has_forbidden_chars" != x; then
28829     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28830     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28831     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28832     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28833       # Going to short mode and back again did indeed matter. Since short mode is
28834       # case insensitive, let's make it lowercase to improve readability.
28835       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28836       # Now convert it back to Unix-style (cygpath)
28837       input_path=`$CYGPATH -u "$shortmode_path"`
28838       new_path="$input_path"
28839     fi
28840   fi
28841 
28842   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28843   if test "x$test_cygdrive_prefix" = x; then
28844     # As a simple fix, exclude /usr/bin since it's not a real path.
28845     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28846       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28847       # a path prefixed by /cygdrive for fixpath to work.
28848       new_path="$CYGWIN_ROOT_PATH$input_path"
28849     fi
28850   fi
28851 
28852 
28853   if test "x$path" != "x$new_path"; then
28854     BOOT_JDK="$new_path"
28855     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28856 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28857   fi
28858 
28859     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28860 
28861   path="$BOOT_JDK"
28862   has_colon=`$ECHO $path | $GREP ^.:`
28863   new_path="$path"
28864   if test "x$has_colon" = x; then
28865     # Not in mixed or Windows style, start by that.
28866     new_path=`cmd //c echo $path`
28867   fi
28868 
28869 
28870   input_path="$new_path"
28871   # Check if we need to convert this using DOS-style short mode. If the path
28872   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28873   # take no chances and rewrite it.
28874   # Note: m4 eats our [], so we need to use [ and ] instead.
28875   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28876   if test "x$has_forbidden_chars" != x; then
28877     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28878     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28879   fi
28880 
28881 
28882   windows_path="$new_path"
28883   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28884     unix_path=`$CYGPATH -u "$windows_path"`
28885     new_path="$unix_path"
28886   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28887     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28888     new_path="$unix_path"
28889   fi
28890 
28891   if test "x$path" != "x$new_path"; then
28892     BOOT_JDK="$new_path"
28893     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28894 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28895   fi
28896 
28897   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28898   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28899 
28900     else
28901       # We're on a unix platform. Hooray! :)
28902       path="$BOOT_JDK"
28903       has_space=`$ECHO "$path" | $GREP " "`
28904       if test "x$has_space" != x; then
28905         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28906 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28907         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28908       fi
28909 
28910       # Use eval to expand a potential ~
28911       eval path="$path"
28912       if test ! -f "$path" && test ! -d "$path"; then
28913         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28914       fi
28915 
28916       if test -d "$path"; then
28917         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28918       else
28919         dir="`$DIRNAME "$path"`"
28920         base="`$BASENAME "$path"`"
28921         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28922       fi
28923     fi
28924   fi
28925 
28926             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28927 $as_echo_n "checking for Boot JDK... " >&6; }
28928             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28929 $as_echo "$BOOT_JDK" >&6; }
28930             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28931 $as_echo_n "checking Boot JDK version... " >&6; }
28932             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28933             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28934 $as_echo "$BOOT_JDK_VERSION" >&6; }
28935           fi # end check jdk version
28936         fi # end check javac
28937       fi # end check java
28938     fi # end check boot jdk found
28939   fi
28940 
28941 
28942   if test "x$BOOT_JDK_FOUND" = xno; then
28943     # Now execute the test
28944 
28945   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28946   BOOT_JDK_SUFFIX="/Contents/Home"
28947   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28948   if test "x$ALL_JDKS_FOUND" != x; then
28949     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28950 
28951   if test "x$BOOT_JDK_FOUND" = xno; then
28952     # Now execute the test
28953 
28954         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28955         if test -d "$BOOT_JDK"; then
28956           BOOT_JDK_FOUND=maybe
28957           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28958 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28959         fi
28960 
28961 
28962     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28963     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28964       # Do we have a bin/java?
28965       if test ! -x "$BOOT_JDK/bin/java"; then
28966         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28967 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28968         BOOT_JDK_FOUND=no
28969       else
28970         # Do we have a bin/javac?
28971         if test ! -x "$BOOT_JDK/bin/javac"; then
28972           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28973 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28974           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28975 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28976           BOOT_JDK_FOUND=no
28977         else
28978           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28979           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28980 
28981           # Extra M4 quote needed to protect [] in grep expression.
28982           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28983           if test "x$FOUND_CORRECT_VERSION" = x; then
28984             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28985 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28986             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28987 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28988             BOOT_JDK_FOUND=no
28989           else
28990             # We're done! :-)
28991             BOOT_JDK_FOUND=yes
28992 
28993   # Only process if variable expands to non-empty
28994 
28995   if test "x$BOOT_JDK" != x; then
28996     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28997 
28998   # Input might be given as Windows format, start by converting to
28999   # unix format.
29000   path="$BOOT_JDK"
29001   new_path=`$CYGPATH -u "$path"`
29002 
29003   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29004   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29005   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29006   # "foo.exe" is OK but "foo" is an error.
29007   #
29008   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29009   # It is also a way to make sure we got the proper file name for the real test later on.
29010   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29011   if test "x$test_shortpath" = x; then
29012     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29013 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29014     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29015   fi
29016 
29017   # Call helper function which possibly converts this using DOS-style short mode.
29018   # If so, the updated path is stored in $new_path.
29019 
29020   input_path="$new_path"
29021   # Check if we need to convert this using DOS-style short mode. If the path
29022   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29023   # take no chances and rewrite it.
29024   # Note: m4 eats our [], so we need to use [ and ] instead.
29025   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29026   if test "x$has_forbidden_chars" != x; then
29027     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29028     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29029     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29030     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29031       # Going to short mode and back again did indeed matter. Since short mode is
29032       # case insensitive, let's make it lowercase to improve readability.
29033       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29034       # Now convert it back to Unix-style (cygpath)
29035       input_path=`$CYGPATH -u "$shortmode_path"`
29036       new_path="$input_path"
29037     fi
29038   fi
29039 
29040   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29041   if test "x$test_cygdrive_prefix" = x; then
29042     # As a simple fix, exclude /usr/bin since it's not a real path.
29043     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29044       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29045       # a path prefixed by /cygdrive for fixpath to work.
29046       new_path="$CYGWIN_ROOT_PATH$input_path"
29047     fi
29048   fi
29049 
29050 
29051   if test "x$path" != "x$new_path"; then
29052     BOOT_JDK="$new_path"
29053     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29054 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29055   fi
29056 
29057     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29058 
29059   path="$BOOT_JDK"
29060   has_colon=`$ECHO $path | $GREP ^.:`
29061   new_path="$path"
29062   if test "x$has_colon" = x; then
29063     # Not in mixed or Windows style, start by that.
29064     new_path=`cmd //c echo $path`
29065   fi
29066 
29067 
29068   input_path="$new_path"
29069   # Check if we need to convert this using DOS-style short mode. If the path
29070   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29071   # take no chances and rewrite it.
29072   # Note: m4 eats our [], so we need to use [ and ] instead.
29073   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29074   if test "x$has_forbidden_chars" != x; then
29075     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29076     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29077   fi
29078 
29079 
29080   windows_path="$new_path"
29081   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29082     unix_path=`$CYGPATH -u "$windows_path"`
29083     new_path="$unix_path"
29084   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29085     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29086     new_path="$unix_path"
29087   fi
29088 
29089   if test "x$path" != "x$new_path"; then
29090     BOOT_JDK="$new_path"
29091     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29092 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29093   fi
29094 
29095   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29096   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29097 
29098     else
29099       # We're on a unix platform. Hooray! :)
29100       path="$BOOT_JDK"
29101       has_space=`$ECHO "$path" | $GREP " "`
29102       if test "x$has_space" != x; then
29103         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29104 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29105         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29106       fi
29107 
29108       # Use eval to expand a potential ~
29109       eval path="$path"
29110       if test ! -f "$path" && test ! -d "$path"; then
29111         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29112       fi
29113 
29114       if test -d "$path"; then
29115         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29116       else
29117         dir="`$DIRNAME "$path"`"
29118         base="`$BASENAME "$path"`"
29119         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29120       fi
29121     fi
29122   fi
29123 
29124             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29125 $as_echo_n "checking for Boot JDK... " >&6; }
29126             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29127 $as_echo "$BOOT_JDK" >&6; }
29128             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29129 $as_echo_n "checking Boot JDK version... " >&6; }
29130             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29131             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29132 $as_echo "$BOOT_JDK_VERSION" >&6; }
29133           fi # end check jdk version
29134         fi # end check javac
29135       fi # end check java
29136     fi # end check boot jdk found
29137   fi
29138 
29139     done
29140   fi
29141 
29142 
29143     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29144     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29145       # Do we have a bin/java?
29146       if test ! -x "$BOOT_JDK/bin/java"; then
29147         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29148 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29149         BOOT_JDK_FOUND=no
29150       else
29151         # Do we have a bin/javac?
29152         if test ! -x "$BOOT_JDK/bin/javac"; then
29153           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29154 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29155           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29156 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29157           BOOT_JDK_FOUND=no
29158         else
29159           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29160           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29161 
29162           # Extra M4 quote needed to protect [] in grep expression.
29163           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29164           if test "x$FOUND_CORRECT_VERSION" = x; then
29165             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29166 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29167             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29168 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29169             BOOT_JDK_FOUND=no
29170           else
29171             # We're done! :-)
29172             BOOT_JDK_FOUND=yes
29173 
29174   # Only process if variable expands to non-empty
29175 
29176   if test "x$BOOT_JDK" != x; then
29177     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29178 
29179   # Input might be given as Windows format, start by converting to
29180   # unix format.
29181   path="$BOOT_JDK"
29182   new_path=`$CYGPATH -u "$path"`
29183 
29184   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29185   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29186   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29187   # "foo.exe" is OK but "foo" is an error.
29188   #
29189   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29190   # It is also a way to make sure we got the proper file name for the real test later on.
29191   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29192   if test "x$test_shortpath" = x; then
29193     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29194 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29195     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29196   fi
29197 
29198   # Call helper function which possibly converts this using DOS-style short mode.
29199   # If so, the updated path is stored in $new_path.
29200 
29201   input_path="$new_path"
29202   # Check if we need to convert this using DOS-style short mode. If the path
29203   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29204   # take no chances and rewrite it.
29205   # Note: m4 eats our [], so we need to use [ and ] instead.
29206   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29207   if test "x$has_forbidden_chars" != x; then
29208     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29209     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29210     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29211     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29212       # Going to short mode and back again did indeed matter. Since short mode is
29213       # case insensitive, let's make it lowercase to improve readability.
29214       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29215       # Now convert it back to Unix-style (cygpath)
29216       input_path=`$CYGPATH -u "$shortmode_path"`
29217       new_path="$input_path"
29218     fi
29219   fi
29220 
29221   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29222   if test "x$test_cygdrive_prefix" = x; then
29223     # As a simple fix, exclude /usr/bin since it's not a real path.
29224     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29225       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29226       # a path prefixed by /cygdrive for fixpath to work.
29227       new_path="$CYGWIN_ROOT_PATH$input_path"
29228     fi
29229   fi
29230 
29231 
29232   if test "x$path" != "x$new_path"; then
29233     BOOT_JDK="$new_path"
29234     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29235 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29236   fi
29237 
29238     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29239 
29240   path="$BOOT_JDK"
29241   has_colon=`$ECHO $path | $GREP ^.:`
29242   new_path="$path"
29243   if test "x$has_colon" = x; then
29244     # Not in mixed or Windows style, start by that.
29245     new_path=`cmd //c echo $path`
29246   fi
29247 
29248 
29249   input_path="$new_path"
29250   # Check if we need to convert this using DOS-style short mode. If the path
29251   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29252   # take no chances and rewrite it.
29253   # Note: m4 eats our [], so we need to use [ and ] instead.
29254   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29255   if test "x$has_forbidden_chars" != x; then
29256     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29257     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29258   fi
29259 
29260 
29261   windows_path="$new_path"
29262   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29263     unix_path=`$CYGPATH -u "$windows_path"`
29264     new_path="$unix_path"
29265   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29266     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29267     new_path="$unix_path"
29268   fi
29269 
29270   if test "x$path" != "x$new_path"; then
29271     BOOT_JDK="$new_path"
29272     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29273 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29274   fi
29275 
29276   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29277   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29278 
29279     else
29280       # We're on a unix platform. Hooray! :)
29281       path="$BOOT_JDK"
29282       has_space=`$ECHO "$path" | $GREP " "`
29283       if test "x$has_space" != x; then
29284         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29285 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29286         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29287       fi
29288 
29289       # Use eval to expand a potential ~
29290       eval path="$path"
29291       if test ! -f "$path" && test ! -d "$path"; then
29292         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29293       fi
29294 
29295       if test -d "$path"; then
29296         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29297       else
29298         dir="`$DIRNAME "$path"`"
29299         base="`$BASENAME "$path"`"
29300         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29301       fi
29302     fi
29303   fi
29304 
29305             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29306 $as_echo_n "checking for Boot JDK... " >&6; }
29307             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29308 $as_echo "$BOOT_JDK" >&6; }
29309             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29310 $as_echo_n "checking Boot JDK version... " >&6; }
29311             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29312             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29313 $as_echo "$BOOT_JDK_VERSION" >&6; }
29314           fi # end check jdk version
29315         fi # end check javac
29316       fi # end check java
29317     fi # end check boot jdk found
29318   fi
29319 
29320   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29321 
29322   if test "x$BOOT_JDK_FOUND" = xno; then
29323     # Now execute the test
29324 
29325   BOOT_JDK_PREFIX="/usr/lib/jvm"
29326   BOOT_JDK_SUFFIX=""
29327   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29328   if test "x$ALL_JDKS_FOUND" != x; then
29329     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29330 
29331   if test "x$BOOT_JDK_FOUND" = xno; then
29332     # Now execute the test
29333 
29334         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29335         if test -d "$BOOT_JDK"; then
29336           BOOT_JDK_FOUND=maybe
29337           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29338 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29339         fi
29340 
29341 
29342     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29343     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29344       # Do we have a bin/java?
29345       if test ! -x "$BOOT_JDK/bin/java"; then
29346         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29347 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29348         BOOT_JDK_FOUND=no
29349       else
29350         # Do we have a bin/javac?
29351         if test ! -x "$BOOT_JDK/bin/javac"; then
29352           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29353 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29354           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29355 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29356           BOOT_JDK_FOUND=no
29357         else
29358           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29359           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29360 
29361           # Extra M4 quote needed to protect [] in grep expression.
29362           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29363           if test "x$FOUND_CORRECT_VERSION" = x; then
29364             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29365 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29366             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29367 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29368             BOOT_JDK_FOUND=no
29369           else
29370             # We're done! :-)
29371             BOOT_JDK_FOUND=yes
29372 
29373   # Only process if variable expands to non-empty
29374 
29375   if test "x$BOOT_JDK" != x; then
29376     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29377 
29378   # Input might be given as Windows format, start by converting to
29379   # unix format.
29380   path="$BOOT_JDK"
29381   new_path=`$CYGPATH -u "$path"`
29382 
29383   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29384   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29385   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29386   # "foo.exe" is OK but "foo" is an error.
29387   #
29388   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29389   # It is also a way to make sure we got the proper file name for the real test later on.
29390   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29391   if test "x$test_shortpath" = x; then
29392     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29393 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29394     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29395   fi
29396 
29397   # Call helper function which possibly converts this using DOS-style short mode.
29398   # If so, the updated path is stored in $new_path.
29399 
29400   input_path="$new_path"
29401   # Check if we need to convert this using DOS-style short mode. If the path
29402   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29403   # take no chances and rewrite it.
29404   # Note: m4 eats our [], so we need to use [ and ] instead.
29405   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29406   if test "x$has_forbidden_chars" != x; then
29407     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29408     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29409     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29410     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29411       # Going to short mode and back again did indeed matter. Since short mode is
29412       # case insensitive, let's make it lowercase to improve readability.
29413       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29414       # Now convert it back to Unix-style (cygpath)
29415       input_path=`$CYGPATH -u "$shortmode_path"`
29416       new_path="$input_path"
29417     fi
29418   fi
29419 
29420   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29421   if test "x$test_cygdrive_prefix" = x; then
29422     # As a simple fix, exclude /usr/bin since it's not a real path.
29423     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29424       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29425       # a path prefixed by /cygdrive for fixpath to work.
29426       new_path="$CYGWIN_ROOT_PATH$input_path"
29427     fi
29428   fi
29429 
29430 
29431   if test "x$path" != "x$new_path"; then
29432     BOOT_JDK="$new_path"
29433     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29434 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29435   fi
29436 
29437     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29438 
29439   path="$BOOT_JDK"
29440   has_colon=`$ECHO $path | $GREP ^.:`
29441   new_path="$path"
29442   if test "x$has_colon" = x; then
29443     # Not in mixed or Windows style, start by that.
29444     new_path=`cmd //c echo $path`
29445   fi
29446 
29447 
29448   input_path="$new_path"
29449   # Check if we need to convert this using DOS-style short mode. If the path
29450   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29451   # take no chances and rewrite it.
29452   # Note: m4 eats our [], so we need to use [ and ] instead.
29453   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29454   if test "x$has_forbidden_chars" != x; then
29455     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29456     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29457   fi
29458 
29459 
29460   windows_path="$new_path"
29461   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29462     unix_path=`$CYGPATH -u "$windows_path"`
29463     new_path="$unix_path"
29464   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29465     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29466     new_path="$unix_path"
29467   fi
29468 
29469   if test "x$path" != "x$new_path"; then
29470     BOOT_JDK="$new_path"
29471     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29472 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29473   fi
29474 
29475   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29476   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29477 
29478     else
29479       # We're on a unix platform. Hooray! :)
29480       path="$BOOT_JDK"
29481       has_space=`$ECHO "$path" | $GREP " "`
29482       if test "x$has_space" != x; then
29483         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29484 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29485         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29486       fi
29487 
29488       # Use eval to expand a potential ~
29489       eval path="$path"
29490       if test ! -f "$path" && test ! -d "$path"; then
29491         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29492       fi
29493 
29494       if test -d "$path"; then
29495         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29496       else
29497         dir="`$DIRNAME "$path"`"
29498         base="`$BASENAME "$path"`"
29499         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29500       fi
29501     fi
29502   fi
29503 
29504             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29505 $as_echo_n "checking for Boot JDK... " >&6; }
29506             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29507 $as_echo "$BOOT_JDK" >&6; }
29508             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29509 $as_echo_n "checking Boot JDK version... " >&6; }
29510             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29511             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29512 $as_echo "$BOOT_JDK_VERSION" >&6; }
29513           fi # end check jdk version
29514         fi # end check javac
29515       fi # end check java
29516     fi # end check boot jdk found
29517   fi
29518 
29519     done
29520   fi
29521 
29522 
29523     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29524     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29525       # Do we have a bin/java?
29526       if test ! -x "$BOOT_JDK/bin/java"; then
29527         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29528 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29529         BOOT_JDK_FOUND=no
29530       else
29531         # Do we have a bin/javac?
29532         if test ! -x "$BOOT_JDK/bin/javac"; then
29533           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29534 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29535           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29536 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29537           BOOT_JDK_FOUND=no
29538         else
29539           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29540           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29541 
29542           # Extra M4 quote needed to protect [] in grep expression.
29543           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29544           if test "x$FOUND_CORRECT_VERSION" = x; then
29545             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29546 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29547             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29548 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29549             BOOT_JDK_FOUND=no
29550           else
29551             # We're done! :-)
29552             BOOT_JDK_FOUND=yes
29553 
29554   # Only process if variable expands to non-empty
29555 
29556   if test "x$BOOT_JDK" != x; then
29557     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29558 
29559   # Input might be given as Windows format, start by converting to
29560   # unix format.
29561   path="$BOOT_JDK"
29562   new_path=`$CYGPATH -u "$path"`
29563 
29564   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29565   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29566   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29567   # "foo.exe" is OK but "foo" is an error.
29568   #
29569   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29570   # It is also a way to make sure we got the proper file name for the real test later on.
29571   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29572   if test "x$test_shortpath" = x; then
29573     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29574 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29575     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29576   fi
29577 
29578   # Call helper function which possibly converts this using DOS-style short mode.
29579   # If so, the updated path is stored in $new_path.
29580 
29581   input_path="$new_path"
29582   # Check if we need to convert this using DOS-style short mode. If the path
29583   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29584   # take no chances and rewrite it.
29585   # Note: m4 eats our [], so we need to use [ and ] instead.
29586   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29587   if test "x$has_forbidden_chars" != x; then
29588     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29589     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29590     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29591     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29592       # Going to short mode and back again did indeed matter. Since short mode is
29593       # case insensitive, let's make it lowercase to improve readability.
29594       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29595       # Now convert it back to Unix-style (cygpath)
29596       input_path=`$CYGPATH -u "$shortmode_path"`
29597       new_path="$input_path"
29598     fi
29599   fi
29600 
29601   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29602   if test "x$test_cygdrive_prefix" = x; then
29603     # As a simple fix, exclude /usr/bin since it's not a real path.
29604     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29605       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29606       # a path prefixed by /cygdrive for fixpath to work.
29607       new_path="$CYGWIN_ROOT_PATH$input_path"
29608     fi
29609   fi
29610 
29611 
29612   if test "x$path" != "x$new_path"; then
29613     BOOT_JDK="$new_path"
29614     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29615 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29616   fi
29617 
29618     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29619 
29620   path="$BOOT_JDK"
29621   has_colon=`$ECHO $path | $GREP ^.:`
29622   new_path="$path"
29623   if test "x$has_colon" = x; then
29624     # Not in mixed or Windows style, start by that.
29625     new_path=`cmd //c echo $path`
29626   fi
29627 
29628 
29629   input_path="$new_path"
29630   # Check if we need to convert this using DOS-style short mode. If the path
29631   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29632   # take no chances and rewrite it.
29633   # Note: m4 eats our [], so we need to use [ and ] instead.
29634   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29635   if test "x$has_forbidden_chars" != x; then
29636     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29637     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29638   fi
29639 
29640 
29641   windows_path="$new_path"
29642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29643     unix_path=`$CYGPATH -u "$windows_path"`
29644     new_path="$unix_path"
29645   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29646     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29647     new_path="$unix_path"
29648   fi
29649 
29650   if test "x$path" != "x$new_path"; then
29651     BOOT_JDK="$new_path"
29652     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29653 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29654   fi
29655 
29656   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29657   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29658 
29659     else
29660       # We're on a unix platform. Hooray! :)
29661       path="$BOOT_JDK"
29662       has_space=`$ECHO "$path" | $GREP " "`
29663       if test "x$has_space" != x; then
29664         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29665 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29666         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29667       fi
29668 
29669       # Use eval to expand a potential ~
29670       eval path="$path"
29671       if test ! -f "$path" && test ! -d "$path"; then
29672         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29673       fi
29674 
29675       if test -d "$path"; then
29676         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29677       else
29678         dir="`$DIRNAME "$path"`"
29679         base="`$BASENAME "$path"`"
29680         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29681       fi
29682     fi
29683   fi
29684 
29685             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29686 $as_echo_n "checking for Boot JDK... " >&6; }
29687             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29688 $as_echo "$BOOT_JDK" >&6; }
29689             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29690 $as_echo_n "checking Boot JDK version... " >&6; }
29691             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29692             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29693 $as_echo "$BOOT_JDK_VERSION" >&6; }
29694           fi # end check jdk version
29695         fi # end check javac
29696       fi # end check java
29697     fi # end check boot jdk found
29698   fi
29699 
29700   fi
29701 
29702 
29703     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29704     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29705       # Do we have a bin/java?
29706       if test ! -x "$BOOT_JDK/bin/java"; then
29707         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29708 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29709         BOOT_JDK_FOUND=no
29710       else
29711         # Do we have a bin/javac?
29712         if test ! -x "$BOOT_JDK/bin/javac"; then
29713           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29714 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29715           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29716 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29717           BOOT_JDK_FOUND=no
29718         else
29719           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29720           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29721 
29722           # Extra M4 quote needed to protect [] in grep expression.
29723           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29724           if test "x$FOUND_CORRECT_VERSION" = x; then
29725             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29726 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29727             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29728 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29729             BOOT_JDK_FOUND=no
29730           else
29731             # We're done! :-)
29732             BOOT_JDK_FOUND=yes
29733 
29734   # Only process if variable expands to non-empty
29735 
29736   if test "x$BOOT_JDK" != x; then
29737     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29738 
29739   # Input might be given as Windows format, start by converting to
29740   # unix format.
29741   path="$BOOT_JDK"
29742   new_path=`$CYGPATH -u "$path"`
29743 
29744   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29745   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29746   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29747   # "foo.exe" is OK but "foo" is an error.
29748   #
29749   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29750   # It is also a way to make sure we got the proper file name for the real test later on.
29751   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29752   if test "x$test_shortpath" = x; then
29753     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29754 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29755     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29756   fi
29757 
29758   # Call helper function which possibly converts this using DOS-style short mode.
29759   # If so, the updated path is stored in $new_path.
29760 
29761   input_path="$new_path"
29762   # Check if we need to convert this using DOS-style short mode. If the path
29763   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29764   # take no chances and rewrite it.
29765   # Note: m4 eats our [], so we need to use [ and ] instead.
29766   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29767   if test "x$has_forbidden_chars" != x; then
29768     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29769     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29770     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29771     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29772       # Going to short mode and back again did indeed matter. Since short mode is
29773       # case insensitive, let's make it lowercase to improve readability.
29774       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29775       # Now convert it back to Unix-style (cygpath)
29776       input_path=`$CYGPATH -u "$shortmode_path"`
29777       new_path="$input_path"
29778     fi
29779   fi
29780 
29781   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29782   if test "x$test_cygdrive_prefix" = x; then
29783     # As a simple fix, exclude /usr/bin since it's not a real path.
29784     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29785       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29786       # a path prefixed by /cygdrive for fixpath to work.
29787       new_path="$CYGWIN_ROOT_PATH$input_path"
29788     fi
29789   fi
29790 
29791 
29792   if test "x$path" != "x$new_path"; then
29793     BOOT_JDK="$new_path"
29794     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29795 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29796   fi
29797 
29798     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29799 
29800   path="$BOOT_JDK"
29801   has_colon=`$ECHO $path | $GREP ^.:`
29802   new_path="$path"
29803   if test "x$has_colon" = x; then
29804     # Not in mixed or Windows style, start by that.
29805     new_path=`cmd //c echo $path`
29806   fi
29807 
29808 
29809   input_path="$new_path"
29810   # Check if we need to convert this using DOS-style short mode. If the path
29811   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29812   # take no chances and rewrite it.
29813   # Note: m4 eats our [], so we need to use [ and ] instead.
29814   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29815   if test "x$has_forbidden_chars" != x; then
29816     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29817     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29818   fi
29819 
29820 
29821   windows_path="$new_path"
29822   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29823     unix_path=`$CYGPATH -u "$windows_path"`
29824     new_path="$unix_path"
29825   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29826     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29827     new_path="$unix_path"
29828   fi
29829 
29830   if test "x$path" != "x$new_path"; then
29831     BOOT_JDK="$new_path"
29832     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29833 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29834   fi
29835 
29836   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29837   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29838 
29839     else
29840       # We're on a unix platform. Hooray! :)
29841       path="$BOOT_JDK"
29842       has_space=`$ECHO "$path" | $GREP " "`
29843       if test "x$has_space" != x; then
29844         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29845 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29846         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29847       fi
29848 
29849       # Use eval to expand a potential ~
29850       eval path="$path"
29851       if test ! -f "$path" && test ! -d "$path"; then
29852         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29853       fi
29854 
29855       if test -d "$path"; then
29856         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29857       else
29858         dir="`$DIRNAME "$path"`"
29859         base="`$BASENAME "$path"`"
29860         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29861       fi
29862     fi
29863   fi
29864 
29865             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29866 $as_echo_n "checking for Boot JDK... " >&6; }
29867             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29868 $as_echo "$BOOT_JDK" >&6; }
29869             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29870 $as_echo_n "checking Boot JDK version... " >&6; }
29871             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29872             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29873 $as_echo "$BOOT_JDK_VERSION" >&6; }
29874           fi # end check jdk version
29875         fi # end check javac
29876       fi # end check java
29877     fi # end check boot jdk found
29878   fi
29879 
29880 
29881   # If we haven't found anything yet, we've truly lost. Give up.
29882   if test "x$BOOT_JDK_FOUND" = xno; then
29883 
29884   # Print a helpful message on how to acquire the necessary build dependency.
29885   # openjdk is the help tag: freetype, cups, alsa etc
29886   MISSING_DEPENDENCY=openjdk
29887 
29888   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29889     cygwin_help $MISSING_DEPENDENCY
29890   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29891     msys_help $MISSING_DEPENDENCY
29892   else
29893     PKGHANDLER_COMMAND=
29894 
29895     case $PKGHANDLER in
29896       apt-get)
29897         apt_help     $MISSING_DEPENDENCY ;;
29898       yum)
29899         yum_help     $MISSING_DEPENDENCY ;;
29900       port)
29901         port_help    $MISSING_DEPENDENCY ;;
29902       pkgutil)
29903         pkgutil_help $MISSING_DEPENDENCY ;;
29904       pkgadd)
29905         pkgadd_help  $MISSING_DEPENDENCY ;;
29906     esac
29907 
29908     if test "x$PKGHANDLER_COMMAND" != x; then
29909       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29910     fi
29911   fi
29912 
29913     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29914 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29915     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
29916 $as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29917     as_fn_error $? "Cannot continue" "$LINENO" 5
29918   fi
29919 
29920 
29921 
29922   # Setup tools from the Boot JDK.
29923 
29924   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29925 
29926   # Publish this variable in the help.
29927 
29928 
29929   if [ -z "${JAVA+x}" ]; then
29930     # The variable is not set by user, try to locate tool using the code snippet
29931 
29932       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29933 $as_echo_n "checking for java in Boot JDK... " >&6; }
29934       JAVA=$BOOT_JDK/bin/java
29935       if test ! -x $JAVA; then
29936         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29937 $as_echo "not found" >&6; }
29938         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29939 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29940         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29941       fi
29942       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29943 $as_echo "ok" >&6; }
29944 
29945 
29946   else
29947     # The variable is set, but is it from the command line or the environment?
29948 
29949     # Try to remove the string !JAVA! from our list.
29950     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29951     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29952       # If it failed, the variable was not from the command line. Ignore it,
29953       # but warn the user (except for BASH, which is always set by the calling BASH).
29954       if test "xJAVA" != xBASH; then
29955         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29956 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29957       fi
29958       # Try to locate tool using the code snippet
29959 
29960       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29961 $as_echo_n "checking for java in Boot JDK... " >&6; }
29962       JAVA=$BOOT_JDK/bin/java
29963       if test ! -x $JAVA; then
29964         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29965 $as_echo "not found" >&6; }
29966         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29967 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29968         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29969       fi
29970       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29971 $as_echo "ok" >&6; }
29972 
29973 
29974     else
29975       # If it succeeded, then it was overridden by the user. We will use it
29976       # for the tool.
29977 
29978       # First remove it from the list of overridden variables, so we can test
29979       # for unknown variables in the end.
29980       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29981 
29982       # Check if we try to supply an empty value
29983       if test "x$JAVA" = x; then
29984         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29985 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29986         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29987 $as_echo_n "checking for JAVA... " >&6; }
29988         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29989 $as_echo "disabled" >&6; }
29990       else
29991         # Check if the provided tool contains a complete path.
29992         tool_specified="$JAVA"
29993         tool_basename="${tool_specified##*/}"
29994         if test "x$tool_basename" = "x$tool_specified"; then
29995           # A command without a complete path is provided, search $PATH.
29996           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29997 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29998           # Extract the first word of "$tool_basename", so it can be a program name with args.
29999 set dummy $tool_basename; ac_word=$2
30000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30001 $as_echo_n "checking for $ac_word... " >&6; }
30002 if ${ac_cv_path_JAVA+:} false; then :
30003   $as_echo_n "(cached) " >&6
30004 else
30005   case $JAVA in
30006   [\\/]* | ?:[\\/]*)
30007   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30008   ;;
30009   *)
30010   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30011 for as_dir in $PATH
30012 do
30013   IFS=$as_save_IFS
30014   test -z "$as_dir" && as_dir=.
30015     for ac_exec_ext in '' $ac_executable_extensions; do
30016   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30017     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30018     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30019     break 2
30020   fi
30021 done
30022   done
30023 IFS=$as_save_IFS
30024 
30025   ;;
30026 esac
30027 fi
30028 JAVA=$ac_cv_path_JAVA
30029 if test -n "$JAVA"; then
30030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30031 $as_echo "$JAVA" >&6; }
30032 else
30033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30034 $as_echo "no" >&6; }
30035 fi
30036 
30037 
30038           if test "x$JAVA" = x; then
30039             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30040           fi
30041         else
30042           # Otherwise we believe it is a complete path. Use it as it is.
30043           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30044 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30045           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30046 $as_echo_n "checking for JAVA... " >&6; }
30047           if test ! -x "$tool_specified"; then
30048             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30049 $as_echo "not found" >&6; }
30050             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30051           fi
30052           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30053 $as_echo "$tool_specified" >&6; }
30054         fi
30055       fi
30056     fi
30057 
30058   fi
30059 
30060 
30061 
30062   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30063 
30064   # Publish this variable in the help.
30065 
30066 
30067   if [ -z "${JAVAC+x}" ]; then
30068     # The variable is not set by user, try to locate tool using the code snippet
30069 
30070       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30071 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30072       JAVAC=$BOOT_JDK/bin/javac
30073       if test ! -x $JAVAC; then
30074         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30075 $as_echo "not found" >&6; }
30076         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30077 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30078         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30079       fi
30080       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30081 $as_echo "ok" >&6; }
30082 
30083 
30084   else
30085     # The variable is set, but is it from the command line or the environment?
30086 
30087     # Try to remove the string !JAVAC! from our list.
30088     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30089     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30090       # If it failed, the variable was not from the command line. Ignore it,
30091       # but warn the user (except for BASH, which is always set by the calling BASH).
30092       if test "xJAVAC" != xBASH; then
30093         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30094 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30095       fi
30096       # Try to locate tool using the code snippet
30097 
30098       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30099 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30100       JAVAC=$BOOT_JDK/bin/javac
30101       if test ! -x $JAVAC; then
30102         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30103 $as_echo "not found" >&6; }
30104         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30105 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30106         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30107       fi
30108       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30109 $as_echo "ok" >&6; }
30110 
30111 
30112     else
30113       # If it succeeded, then it was overridden by the user. We will use it
30114       # for the tool.
30115 
30116       # First remove it from the list of overridden variables, so we can test
30117       # for unknown variables in the end.
30118       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30119 
30120       # Check if we try to supply an empty value
30121       if test "x$JAVAC" = x; then
30122         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30123 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30124         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30125 $as_echo_n "checking for JAVAC... " >&6; }
30126         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30127 $as_echo "disabled" >&6; }
30128       else
30129         # Check if the provided tool contains a complete path.
30130         tool_specified="$JAVAC"
30131         tool_basename="${tool_specified##*/}"
30132         if test "x$tool_basename" = "x$tool_specified"; then
30133           # A command without a complete path is provided, search $PATH.
30134           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30135 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30136           # Extract the first word of "$tool_basename", so it can be a program name with args.
30137 set dummy $tool_basename; ac_word=$2
30138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30139 $as_echo_n "checking for $ac_word... " >&6; }
30140 if ${ac_cv_path_JAVAC+:} false; then :
30141   $as_echo_n "(cached) " >&6
30142 else
30143   case $JAVAC in
30144   [\\/]* | ?:[\\/]*)
30145   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30146   ;;
30147   *)
30148   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30149 for as_dir in $PATH
30150 do
30151   IFS=$as_save_IFS
30152   test -z "$as_dir" && as_dir=.
30153     for ac_exec_ext in '' $ac_executable_extensions; do
30154   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30155     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30156     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30157     break 2
30158   fi
30159 done
30160   done
30161 IFS=$as_save_IFS
30162 
30163   ;;
30164 esac
30165 fi
30166 JAVAC=$ac_cv_path_JAVAC
30167 if test -n "$JAVAC"; then
30168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30169 $as_echo "$JAVAC" >&6; }
30170 else
30171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30172 $as_echo "no" >&6; }
30173 fi
30174 
30175 
30176           if test "x$JAVAC" = x; then
30177             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30178           fi
30179         else
30180           # Otherwise we believe it is a complete path. Use it as it is.
30181           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30182 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30183           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30184 $as_echo_n "checking for JAVAC... " >&6; }
30185           if test ! -x "$tool_specified"; then
30186             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30187 $as_echo "not found" >&6; }
30188             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30189           fi
30190           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30191 $as_echo "$tool_specified" >&6; }
30192         fi
30193       fi
30194     fi
30195 
30196   fi
30197 
30198 
30199 
30200   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30201 
30202   # Publish this variable in the help.
30203 
30204 
30205   if [ -z "${JAVAH+x}" ]; then
30206     # The variable is not set by user, try to locate tool using the code snippet
30207 
30208       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30209 $as_echo_n "checking for javah in Boot JDK... " >&6; }
30210       JAVAH=$BOOT_JDK/bin/javah
30211       if test ! -x $JAVAH; then
30212         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30213 $as_echo "not found" >&6; }
30214         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30215 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30216         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30217       fi
30218       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30219 $as_echo "ok" >&6; }
30220 
30221 
30222   else
30223     # The variable is set, but is it from the command line or the environment?
30224 
30225     # Try to remove the string !JAVAH! from our list.
30226     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30227     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30228       # If it failed, the variable was not from the command line. Ignore it,
30229       # but warn the user (except for BASH, which is always set by the calling BASH).
30230       if test "xJAVAH" != xBASH; then
30231         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30232 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30233       fi
30234       # Try to locate tool using the code snippet
30235 
30236       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30237 $as_echo_n "checking for javah in Boot JDK... " >&6; }
30238       JAVAH=$BOOT_JDK/bin/javah
30239       if test ! -x $JAVAH; then
30240         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30241 $as_echo "not found" >&6; }
30242         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30243 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30244         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30245       fi
30246       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30247 $as_echo "ok" >&6; }
30248 
30249 
30250     else
30251       # If it succeeded, then it was overridden by the user. We will use it
30252       # for the tool.
30253 
30254       # First remove it from the list of overridden variables, so we can test
30255       # for unknown variables in the end.
30256       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30257 
30258       # Check if we try to supply an empty value
30259       if test "x$JAVAH" = x; then
30260         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30261 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30262         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30263 $as_echo_n "checking for JAVAH... " >&6; }
30264         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30265 $as_echo "disabled" >&6; }
30266       else
30267         # Check if the provided tool contains a complete path.
30268         tool_specified="$JAVAH"
30269         tool_basename="${tool_specified##*/}"
30270         if test "x$tool_basename" = "x$tool_specified"; then
30271           # A command without a complete path is provided, search $PATH.
30272           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30273 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30274           # Extract the first word of "$tool_basename", so it can be a program name with args.
30275 set dummy $tool_basename; ac_word=$2
30276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30277 $as_echo_n "checking for $ac_word... " >&6; }
30278 if ${ac_cv_path_JAVAH+:} false; then :
30279   $as_echo_n "(cached) " >&6
30280 else
30281   case $JAVAH in
30282   [\\/]* | ?:[\\/]*)
30283   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30284   ;;
30285   *)
30286   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30287 for as_dir in $PATH
30288 do
30289   IFS=$as_save_IFS
30290   test -z "$as_dir" && as_dir=.
30291     for ac_exec_ext in '' $ac_executable_extensions; do
30292   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30293     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30294     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30295     break 2
30296   fi
30297 done
30298   done
30299 IFS=$as_save_IFS
30300 
30301   ;;
30302 esac
30303 fi
30304 JAVAH=$ac_cv_path_JAVAH
30305 if test -n "$JAVAH"; then
30306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30307 $as_echo "$JAVAH" >&6; }
30308 else
30309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30310 $as_echo "no" >&6; }
30311 fi
30312 
30313 
30314           if test "x$JAVAH" = x; then
30315             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30316           fi
30317         else
30318           # Otherwise we believe it is a complete path. Use it as it is.
30319           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30320 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30321           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30322 $as_echo_n "checking for JAVAH... " >&6; }
30323           if test ! -x "$tool_specified"; then
30324             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30325 $as_echo "not found" >&6; }
30326             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30327           fi
30328           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30329 $as_echo "$tool_specified" >&6; }
30330         fi
30331       fi
30332     fi
30333 
30334   fi
30335 
30336 
30337 
30338   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30339 
30340   # Publish this variable in the help.
30341 
30342 
30343   if [ -z "${JAR+x}" ]; then
30344     # The variable is not set by user, try to locate tool using the code snippet
30345 
30346       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30347 $as_echo_n "checking for jar in Boot JDK... " >&6; }
30348       JAR=$BOOT_JDK/bin/jar
30349       if test ! -x $JAR; then
30350         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30351 $as_echo "not found" >&6; }
30352         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30353 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30354         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30355       fi
30356       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30357 $as_echo "ok" >&6; }
30358 
30359 
30360   else
30361     # The variable is set, but is it from the command line or the environment?
30362 
30363     # Try to remove the string !JAR! from our list.
30364     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30365     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30366       # If it failed, the variable was not from the command line. Ignore it,
30367       # but warn the user (except for BASH, which is always set by the calling BASH).
30368       if test "xJAR" != xBASH; then
30369         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30370 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30371       fi
30372       # Try to locate tool using the code snippet
30373 
30374       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30375 $as_echo_n "checking for jar in Boot JDK... " >&6; }
30376       JAR=$BOOT_JDK/bin/jar
30377       if test ! -x $JAR; then
30378         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30379 $as_echo "not found" >&6; }
30380         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30381 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30382         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30383       fi
30384       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30385 $as_echo "ok" >&6; }
30386 
30387 
30388     else
30389       # If it succeeded, then it was overridden by the user. We will use it
30390       # for the tool.
30391 
30392       # First remove it from the list of overridden variables, so we can test
30393       # for unknown variables in the end.
30394       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30395 
30396       # Check if we try to supply an empty value
30397       if test "x$JAR" = x; then
30398         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30399 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30400         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30401 $as_echo_n "checking for JAR... " >&6; }
30402         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30403 $as_echo "disabled" >&6; }
30404       else
30405         # Check if the provided tool contains a complete path.
30406         tool_specified="$JAR"
30407         tool_basename="${tool_specified##*/}"
30408         if test "x$tool_basename" = "x$tool_specified"; then
30409           # A command without a complete path is provided, search $PATH.
30410           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30411 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30412           # Extract the first word of "$tool_basename", so it can be a program name with args.
30413 set dummy $tool_basename; ac_word=$2
30414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30415 $as_echo_n "checking for $ac_word... " >&6; }
30416 if ${ac_cv_path_JAR+:} false; then :
30417   $as_echo_n "(cached) " >&6
30418 else
30419   case $JAR in
30420   [\\/]* | ?:[\\/]*)
30421   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30422   ;;
30423   *)
30424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30425 for as_dir in $PATH
30426 do
30427   IFS=$as_save_IFS
30428   test -z "$as_dir" && as_dir=.
30429     for ac_exec_ext in '' $ac_executable_extensions; do
30430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30431     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30433     break 2
30434   fi
30435 done
30436   done
30437 IFS=$as_save_IFS
30438 
30439   ;;
30440 esac
30441 fi
30442 JAR=$ac_cv_path_JAR
30443 if test -n "$JAR"; then
30444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30445 $as_echo "$JAR" >&6; }
30446 else
30447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30448 $as_echo "no" >&6; }
30449 fi
30450 
30451 
30452           if test "x$JAR" = x; then
30453             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30454           fi
30455         else
30456           # Otherwise we believe it is a complete path. Use it as it is.
30457           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30458 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30459           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30460 $as_echo_n "checking for JAR... " >&6; }
30461           if test ! -x "$tool_specified"; then
30462             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30463 $as_echo "not found" >&6; }
30464             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30465           fi
30466           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30467 $as_echo "$tool_specified" >&6; }
30468         fi
30469       fi
30470     fi
30471 
30472   fi
30473 
30474 
30475 
30476   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30477 
30478   # Publish this variable in the help.
30479 
30480 
30481   if [ -z "${JARSIGNER+x}" ]; then
30482     # The variable is not set by user, try to locate tool using the code snippet
30483 
30484       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30485 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30486       JARSIGNER=$BOOT_JDK/bin/jarsigner
30487       if test ! -x $JARSIGNER; then
30488         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30489 $as_echo "not found" >&6; }
30490         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30491 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30492         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30493       fi
30494       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30495 $as_echo "ok" >&6; }
30496 
30497 
30498   else
30499     # The variable is set, but is it from the command line or the environment?
30500 
30501     # Try to remove the string !JARSIGNER! from our list.
30502     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30503     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30504       # If it failed, the variable was not from the command line. Ignore it,
30505       # but warn the user (except for BASH, which is always set by the calling BASH).
30506       if test "xJARSIGNER" != xBASH; then
30507         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30508 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30509       fi
30510       # Try to locate tool using the code snippet
30511 
30512       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30513 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30514       JARSIGNER=$BOOT_JDK/bin/jarsigner
30515       if test ! -x $JARSIGNER; then
30516         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30517 $as_echo "not found" >&6; }
30518         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30519 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30520         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30521       fi
30522       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30523 $as_echo "ok" >&6; }
30524 
30525 
30526     else
30527       # If it succeeded, then it was overridden by the user. We will use it
30528       # for the tool.
30529 
30530       # First remove it from the list of overridden variables, so we can test
30531       # for unknown variables in the end.
30532       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30533 
30534       # Check if we try to supply an empty value
30535       if test "x$JARSIGNER" = x; then
30536         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30537 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30538         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30539 $as_echo_n "checking for JARSIGNER... " >&6; }
30540         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30541 $as_echo "disabled" >&6; }
30542       else
30543         # Check if the provided tool contains a complete path.
30544         tool_specified="$JARSIGNER"
30545         tool_basename="${tool_specified##*/}"
30546         if test "x$tool_basename" = "x$tool_specified"; then
30547           # A command without a complete path is provided, search $PATH.
30548           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30549 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30550           # Extract the first word of "$tool_basename", so it can be a program name with args.
30551 set dummy $tool_basename; ac_word=$2
30552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30553 $as_echo_n "checking for $ac_word... " >&6; }
30554 if ${ac_cv_path_JARSIGNER+:} false; then :
30555   $as_echo_n "(cached) " >&6
30556 else
30557   case $JARSIGNER in
30558   [\\/]* | ?:[\\/]*)
30559   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30560   ;;
30561   *)
30562   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30563 for as_dir in $PATH
30564 do
30565   IFS=$as_save_IFS
30566   test -z "$as_dir" && as_dir=.
30567     for ac_exec_ext in '' $ac_executable_extensions; do
30568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30569     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30571     break 2
30572   fi
30573 done
30574   done
30575 IFS=$as_save_IFS
30576 
30577   ;;
30578 esac
30579 fi
30580 JARSIGNER=$ac_cv_path_JARSIGNER
30581 if test -n "$JARSIGNER"; then
30582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30583 $as_echo "$JARSIGNER" >&6; }
30584 else
30585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30586 $as_echo "no" >&6; }
30587 fi
30588 
30589 
30590           if test "x$JARSIGNER" = x; then
30591             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30592           fi
30593         else
30594           # Otherwise we believe it is a complete path. Use it as it is.
30595           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30596 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30597           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30598 $as_echo_n "checking for JARSIGNER... " >&6; }
30599           if test ! -x "$tool_specified"; then
30600             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30601 $as_echo "not found" >&6; }
30602             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30603           fi
30604           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30605 $as_echo "$tool_specified" >&6; }
30606         fi
30607       fi
30608     fi
30609 
30610   fi
30611 
30612 
30613 
30614   # Finally, set some other options...
30615 
30616   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30617   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30618 
30619 
30620 
30621   $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30622   $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30623   OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30624   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30625   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30626   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30627     dummy="$dummy --patch-module foo=bar"
30628     JVM_ARG_OK=true
30629   else
30630     $ECHO "Arg failed:" >&5
30631     $ECHO "$OUTPUT" >&5
30632     JVM_ARG_OK=false
30633   fi
30634 
30635   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30636 $as_echo_n "checking if Boot JDK supports modules... " >&6; }
30637   if test "x$JVM_ARG_OK" = "xtrue"; then
30638     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30639 $as_echo "yes" >&6; }
30640     BOOT_JDK_MODULAR="true"
30641   else
30642     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30643 $as_echo "no" >&6; }
30644     BOOT_JDK_MODULAR="false"
30645   fi
30646 
30647 
30648 
30649 
30650   # Check if the boot jdk is 32 or 64 bit
30651   if "$JAVA" -d64 -version > /dev/null 2>&1; then
30652     BOOT_JDK_BITS="64"
30653   else
30654     BOOT_JDK_BITS="32"
30655   fi
30656   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30657 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30659 $as_echo "$BOOT_JDK_BITS" >&6; }
30660 
30661 
30662 
30663 
30664 # Check whether --with-build-jdk was given.
30665 if test "${with_build_jdk+set}" = set; then :
30666   withval=$with_build_jdk;
30667 fi
30668 
30669 
30670   CREATE_BUILDJDK=false
30671   EXTERNAL_BUILDJDK=false
30672   BUILD_JDK_FOUND="no"
30673   if test "x$with_build_jdk" != "x"; then
30674 
30675   if test "x$BUILD_JDK_FOUND" = xno; then
30676     # Execute the test
30677 
30678        if test "x$with_build_jdk" != x; then
30679          BUILD_JDK=$with_build_jdk
30680          BUILD_JDK_FOUND=maybe
30681          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30682 $as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30683        fi
30684 
30685     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30686     if test "x$BUILD_JDK_FOUND" = xmaybe; then
30687       # Do we have a bin/java?
30688       if test ! -x "$BUILD_JDK/bin/java"; then
30689         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30690 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30691         BUILD_JDK_FOUND=no
30692       elif test ! -x "$BUILD_JDK/bin/jlink"; then
30693         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30694 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30695         BUILD_JDK_FOUND=no
30696       elif test ! -x "$BUILD_JDK/bin/jmod"; then
30697         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30698 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30699         BUILD_JDK_FOUND=no
30700       elif test ! -x "$BUILD_JDK/bin/javac"; then
30701         # Do we have a bin/javac?
30702         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30703 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30704         { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30705 $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30706         BUILD_JDK_FOUND=no
30707       else
30708         # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30709         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30710 
30711         # Extra M4 quote needed to protect [] in grep expression.
30712         FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30713         if test "x$FOUND_CORRECT_VERSION" = x; then
30714           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30715 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30716           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30717 $as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30718           BUILD_JDK_FOUND=no
30719         else
30720           # We're done!
30721           BUILD_JDK_FOUND=yes
30722 
30723   # Only process if variable expands to non-empty
30724 
30725   if test "x$BUILD_JDK" != x; then
30726     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30727 
30728   # Input might be given as Windows format, start by converting to
30729   # unix format.
30730   path="$BUILD_JDK"
30731   new_path=`$CYGPATH -u "$path"`
30732 
30733   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30734   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30735   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30736   # "foo.exe" is OK but "foo" is an error.
30737   #
30738   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30739   # It is also a way to make sure we got the proper file name for the real test later on.
30740   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30741   if test "x$test_shortpath" = x; then
30742     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30743 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30744     as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30745   fi
30746 
30747   # Call helper function which possibly converts this using DOS-style short mode.
30748   # If so, the updated path is stored in $new_path.
30749 
30750   input_path="$new_path"
30751   # Check if we need to convert this using DOS-style short mode. If the path
30752   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30753   # take no chances and rewrite it.
30754   # Note: m4 eats our [], so we need to use [ and ] instead.
30755   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30756   if test "x$has_forbidden_chars" != x; then
30757     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30758     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30759     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30760     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30761       # Going to short mode and back again did indeed matter. Since short mode is
30762       # case insensitive, let's make it lowercase to improve readability.
30763       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30764       # Now convert it back to Unix-style (cygpath)
30765       input_path=`$CYGPATH -u "$shortmode_path"`
30766       new_path="$input_path"
30767     fi
30768   fi
30769 
30770   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30771   if test "x$test_cygdrive_prefix" = x; then
30772     # As a simple fix, exclude /usr/bin since it's not a real path.
30773     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30774       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30775       # a path prefixed by /cygdrive for fixpath to work.
30776       new_path="$CYGWIN_ROOT_PATH$input_path"
30777     fi
30778   fi
30779 
30780 
30781   if test "x$path" != "x$new_path"; then
30782     BUILD_JDK="$new_path"
30783     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30784 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30785   fi
30786 
30787     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30788 
30789   path="$BUILD_JDK"
30790   has_colon=`$ECHO $path | $GREP ^.:`
30791   new_path="$path"
30792   if test "x$has_colon" = x; then
30793     # Not in mixed or Windows style, start by that.
30794     new_path=`cmd //c echo $path`
30795   fi
30796 
30797 
30798   input_path="$new_path"
30799   # Check if we need to convert this using DOS-style short mode. If the path
30800   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30801   # take no chances and rewrite it.
30802   # Note: m4 eats our [], so we need to use [ and ] instead.
30803   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30804   if test "x$has_forbidden_chars" != x; then
30805     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30806     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30807   fi
30808 
30809 
30810   windows_path="$new_path"
30811   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30812     unix_path=`$CYGPATH -u "$windows_path"`
30813     new_path="$unix_path"
30814   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30815     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30816     new_path="$unix_path"
30817   fi
30818 
30819   if test "x$path" != "x$new_path"; then
30820     BUILD_JDK="$new_path"
30821     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30822 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30823   fi
30824 
30825   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30826   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30827 
30828     else
30829       # We're on a unix platform. Hooray! :)
30830       path="$BUILD_JDK"
30831       has_space=`$ECHO "$path" | $GREP " "`
30832       if test "x$has_space" != x; then
30833         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30834 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30835         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30836       fi
30837 
30838       # Use eval to expand a potential ~
30839       eval path="$path"
30840       if test ! -f "$path" && test ! -d "$path"; then
30841         as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30842       fi
30843 
30844       if test -d "$path"; then
30845         BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30846       else
30847         dir="`$DIRNAME "$path"`"
30848         base="`$BASENAME "$path"`"
30849         BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30850       fi
30851     fi
30852   fi
30853 
30854           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30855 $as_echo_n "checking for Build JDK... " >&6; }
30856           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30857 $as_echo "$BUILD_JDK" >&6; }
30858           { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30859 $as_echo_n "checking Build JDK version... " >&6; }
30860           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30861           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30862 $as_echo "$BUILD_JDK_VERSION" >&6; }
30863         fi # end check jdk version
30864       fi # end check java
30865     fi # end check build jdk found
30866   fi
30867 
30868     EXTERNAL_BUILDJDK=true
30869   else
30870     if test "x$COMPILE_TYPE" = "xcross"; then
30871       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30872       BUILD_JDK_FOUND=yes
30873       CREATE_BUILDJDK=true
30874       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30875 $as_echo_n "checking for Build JDK... " >&6; }
30876       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30877 $as_echo "yes, will build it for the host platform" >&6; }
30878     else
30879       BUILD_JDK="\$(JDK_OUTPUTDIR)"
30880       BUILD_JDK_FOUND=yes
30881       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30882 $as_echo_n "checking for Build JDK... " >&6; }
30883       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30884 $as_echo "yes, will use output dir" >&6; }
30885     fi
30886   fi
30887 
30888   JMOD="$BUILD_JDK/bin/jmod"
30889   JLINK="$BUILD_JDK/bin/jlink"
30890 
30891 
30892 
30893   if test "x$BUILD_JDK_FOUND" != "xyes"; then
30894     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30895 $as_echo_n "checking for Build JDK... " >&6; }
30896     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30897 $as_echo "no" >&6; }
30898     as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30899   fi
30900 
30901 
30902 
30903 
30904 
30905 
30906 ###############################################################################
30907 #
30908 # Configure the sources to use. We can add or override individual directories.
30909 #
30910 ###############################################################################
30911 
30912 
30913   # Where are the sources.
30914   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30915   CORBA_TOPDIR="$SRC_ROOT/corba"
30916   JAXP_TOPDIR="$SRC_ROOT/jaxp"
30917   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30918   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30919   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30920   JDK_TOPDIR="$SRC_ROOT/jdk"
30921 
30922 
30923 
30924 
30925 
30926 
30927 
30928 
30929 
30930   # This feature is no longer supported.
30931 
30932 
30933 
30934 # Check whether --with-add-source-root was given.
30935 if test "${with_add_source_root+set}" = set; then :
30936   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
30937 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30938 fi
30939 
30940 
30941 
30942 
30943 # Check whether --with-override-source-root was given.
30944 if test "${with_override_source_root+set}" = set; then :
30945   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
30946 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30947 fi
30948 
30949 
30950 
30951 
30952 # Check whether --with-adds-and-overrides was given.
30953 if test "${with_adds_and_overrides+set}" = set; then :
30954   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
30955 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30956 fi
30957 
30958 
30959 
30960 
30961 # Check whether --with-override-langtools was given.
30962 if test "${with_override_langtools+set}" = set; then :
30963   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30964 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30965 fi
30966 
30967 
30968 
30969 
30970 # Check whether --with-override-corba was given.
30971 if test "${with_override_corba+set}" = set; then :
30972   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30973 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30974 fi
30975 
30976 
30977 
30978 
30979 # Check whether --with-override-jaxp was given.
30980 if test "${with_override_jaxp+set}" = set; then :
30981   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30982 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30983 fi
30984 
30985 
30986 
30987 
30988 # Check whether --with-override-jaxws was given.
30989 if test "${with_override_jaxws+set}" = set; then :
30990   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30991 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30992 fi
30993 
30994 
30995 
30996 
30997 # Check whether --with-override-hotspot was given.
30998 if test "${with_override_hotspot+set}" = set; then :
30999   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31000 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31001 fi
31002 
31003 
31004 
31005 
31006 # Check whether --with-override-nashorn was given.
31007 if test "${with_override_nashorn+set}" = set; then :
31008   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31009 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31010 fi
31011 
31012 
31013 
31014 
31015 # Check whether --with-override-jdk was given.
31016 if test "${with_override_jdk+set}" = set; then :
31017   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31018 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31019 fi
31020 
31021 
31022 
31023 
31024   BUILD_OUTPUT="$OUTPUT_ROOT"
31025 
31026   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31027 
31028 
31029 
31030 # Check whether --with-import_hotspot was given.
31031 if test "${with_import_hotspot+set}" = set; then :
31032   withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31033 $as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31034 fi
31035 
31036 
31037 
31038 
31039 
31040 
31041 # Check whether --with-import-modules was given.
31042 if test "${with_import_modules+set}" = set; then :
31043   withval=$with_import_modules;
31044 fi
31045 
31046 
31047   if test "x$with_import_modules" != x \
31048       && test "x$with_import_modules" != "xno"; then
31049     if test -d "$with_import_modules"; then
31050       IMPORT_MODULES_TOPDIR="$with_import_modules"
31051 
31052   # Only process if variable expands to non-empty
31053 
31054   if test "x$IMPORT_MODULES_TOPDIR" != x; then
31055     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31056 
31057   # Input might be given as Windows format, start by converting to
31058   # unix format.
31059   path="$IMPORT_MODULES_TOPDIR"
31060   new_path=`$CYGPATH -u "$path"`
31061 
31062   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31063   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31064   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31065   # "foo.exe" is OK but "foo" is an error.
31066   #
31067   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31068   # It is also a way to make sure we got the proper file name for the real test later on.
31069   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31070   if test "x$test_shortpath" = x; then
31071     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31072 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31073     as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31074   fi
31075 
31076   # Call helper function which possibly converts this using DOS-style short mode.
31077   # If so, the updated path is stored in $new_path.
31078 
31079   input_path="$new_path"
31080   # Check if we need to convert this using DOS-style short mode. If the path
31081   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31082   # take no chances and rewrite it.
31083   # Note: m4 eats our [], so we need to use [ and ] instead.
31084   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31085   if test "x$has_forbidden_chars" != x; then
31086     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31087     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31088     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31089     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31090       # Going to short mode and back again did indeed matter. Since short mode is
31091       # case insensitive, let's make it lowercase to improve readability.
31092       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31093       # Now convert it back to Unix-style (cygpath)
31094       input_path=`$CYGPATH -u "$shortmode_path"`
31095       new_path="$input_path"
31096     fi
31097   fi
31098 
31099   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31100   if test "x$test_cygdrive_prefix" = x; then
31101     # As a simple fix, exclude /usr/bin since it's not a real path.
31102     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31103       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31104       # a path prefixed by /cygdrive for fixpath to work.
31105       new_path="$CYGWIN_ROOT_PATH$input_path"
31106     fi
31107   fi
31108 
31109 
31110   if test "x$path" != "x$new_path"; then
31111     IMPORT_MODULES_TOPDIR="$new_path"
31112     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31113 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31114   fi
31115 
31116     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31117 
31118   path="$IMPORT_MODULES_TOPDIR"
31119   has_colon=`$ECHO $path | $GREP ^.:`
31120   new_path="$path"
31121   if test "x$has_colon" = x; then
31122     # Not in mixed or Windows style, start by that.
31123     new_path=`cmd //c echo $path`
31124   fi
31125 
31126 
31127   input_path="$new_path"
31128   # Check if we need to convert this using DOS-style short mode. If the path
31129   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31130   # take no chances and rewrite it.
31131   # Note: m4 eats our [], so we need to use [ and ] instead.
31132   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31133   if test "x$has_forbidden_chars" != x; then
31134     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31135     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31136   fi
31137 
31138 
31139   windows_path="$new_path"
31140   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31141     unix_path=`$CYGPATH -u "$windows_path"`
31142     new_path="$unix_path"
31143   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31144     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31145     new_path="$unix_path"
31146   fi
31147 
31148   if test "x$path" != "x$new_path"; then
31149     IMPORT_MODULES_TOPDIR="$new_path"
31150     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31151 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31152   fi
31153 
31154   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31155   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31156 
31157     else
31158       # We're on a unix platform. Hooray! :)
31159       path="$IMPORT_MODULES_TOPDIR"
31160       has_space=`$ECHO "$path" | $GREP " "`
31161       if test "x$has_space" != x; then
31162         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31163 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31164         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31165       fi
31166 
31167       # Use eval to expand a potential ~
31168       eval path="$path"
31169       if test ! -f "$path" && test ! -d "$path"; then
31170         as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31171       fi
31172 
31173       if test -d "$path"; then
31174         IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31175       else
31176         dir="`$DIRNAME "$path"`"
31177         base="`$BASENAME "$path"`"
31178         IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31179       fi
31180     fi
31181   fi
31182 
31183     elif test -e "$with_import_modules"; then
31184       IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31185       $RM -rf "$IMPORT_MODULES_TOPDIR"
31186       $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31187       if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31188         as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31189       fi
31190     else
31191       as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31192     fi
31193   fi
31194 
31195   if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31196     IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31197   fi
31198   if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31199     IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31200   fi
31201   if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31202     IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31203   fi
31204   if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31205     IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31206   fi
31207   if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31208     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31209   fi
31210   # Workaround for using different imported module-info.java in Jake due to a
31211   # change in format. Remove once new format is standard in JDK 9 and javafx
31212   # delivers just that.
31213   if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
31214     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
31215   fi
31216   if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31217     IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31218   fi
31219 
31220 
31221 
31222 
31223 
31224 
31225 
31226 
31227 
31228 ###############################################################################
31229 #
31230 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
31231 # native code.
31232 #
31233 ###############################################################################
31234 
31235 # See if we are doing a complete static build or not
31236 
31237   # Check whether --enable-static-build was given.
31238 if test "${enable_static_build+set}" = set; then :
31239   enableval=$enable_static_build;
31240 fi
31241 
31242   STATIC_BUILD=false
31243   if test "x$enable_static_build" = "xyes"; then
31244     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31245 $as_echo_n "checking if static build is enabled... " >&6; }
31246     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31247 $as_echo "yes" >&6; }
31248     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31249       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31250     fi
31251     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31252     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31253     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31254     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31255     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31256     STATIC_BUILD=true
31257   elif test "x$enable_static_build" = "xno"; then
31258     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31259 $as_echo_n "checking if static build is enabled... " >&6; }
31260     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31261 $as_echo "no" >&6; }
31262   elif test "x$enable_static_build" != "x"; then
31263     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31264   fi
31265 
31266 
31267 
31268 
31269 # First determine the toolchain type (compiler family)
31270 
31271 
31272 # Check whether --with-toolchain-type was given.
31273 if test "${with_toolchain_type+set}" = set; then :
31274   withval=$with_toolchain_type;
31275 fi
31276 
31277 
31278   # Use indirect variable referencing
31279   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31280   VALID_TOOLCHAINS=${!toolchain_var_name}
31281 
31282   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31283     if test -n "$XCODEBUILD"; then
31284       # On Mac OS X, default toolchain to clang after Xcode 5
31285       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31286       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31287       if test $? -ne 0; then
31288         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31289       fi
31290       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31291           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31292           $CUT -f 1 -d .`
31293       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31294 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31295       if test $XCODE_MAJOR_VERSION -ge 5; then
31296           DEFAULT_TOOLCHAIN="clang"
31297       else
31298           DEFAULT_TOOLCHAIN="gcc"
31299       fi
31300     else
31301       # If Xcode is not installed, but the command line tools are
31302       # then we can't run xcodebuild. On these systems we should
31303       # default to clang
31304       DEFAULT_TOOLCHAIN="clang"
31305     fi
31306   else
31307     # First toolchain type in the list is the default
31308     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31309   fi
31310 
31311   if test "x$with_toolchain_type" = xlist; then
31312     # List all toolchains
31313     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31314 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31315     for toolchain in $VALID_TOOLCHAINS; do
31316       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31317       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31318       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31319     done
31320 
31321     exit 0
31322   elif test "x$with_toolchain_type" != x; then
31323     # User override; check that it is valid
31324     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31325       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31326 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31327       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31328 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31329       as_fn_error $? "Cannot continue." "$LINENO" 5
31330     fi
31331     TOOLCHAIN_TYPE=$with_toolchain_type
31332   else
31333     # No flag given, use default
31334     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31335   fi
31336 
31337 
31338   TOOLCHAIN_CC_BINARY_clang="clang"
31339   TOOLCHAIN_CC_BINARY_gcc="gcc"
31340   TOOLCHAIN_CC_BINARY_microsoft="cl"
31341   TOOLCHAIN_CC_BINARY_solstudio="cc"
31342   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31343 
31344   TOOLCHAIN_CXX_BINARY_clang="clang++"
31345   TOOLCHAIN_CXX_BINARY_gcc="g++"
31346   TOOLCHAIN_CXX_BINARY_microsoft="cl"
31347   TOOLCHAIN_CXX_BINARY_solstudio="CC"
31348   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31349 
31350   # Use indirect variable referencing
31351   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31352   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31353   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31354   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31355   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31356   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31357   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31358   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31359 
31360 
31361   # Define filename patterns
31362   if test "x$OPENJDK_TARGET_OS" = xwindows; then
31363     LIBRARY_PREFIX=
31364     SHARED_LIBRARY_SUFFIX='.dll'
31365     STATIC_LIBRARY_SUFFIX='.lib'
31366     SHARED_LIBRARY='$1.dll'
31367     STATIC_LIBRARY='$1.lib'
31368     OBJ_SUFFIX='.obj'
31369     EXE_SUFFIX='.exe'
31370   else
31371     LIBRARY_PREFIX=lib
31372     SHARED_LIBRARY_SUFFIX='.so'
31373     STATIC_LIBRARY_SUFFIX='.a'
31374     SHARED_LIBRARY='lib$1.so'
31375     STATIC_LIBRARY='lib$1.a'
31376     OBJ_SUFFIX='.o'
31377     EXE_SUFFIX=''
31378     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31379       # For full static builds, we're overloading the SHARED_LIBRARY
31380       # variables in order to limit the amount of changes required.
31381       # It would be better to remove SHARED and just use LIBRARY and
31382       # LIBRARY_SUFFIX for libraries that can be built either
31383       # shared or static and use STATIC_* for libraries that are
31384       # always built statically.
31385       if test "x$STATIC_BUILD" = xtrue; then
31386         SHARED_LIBRARY='lib$1.a'
31387         SHARED_LIBRARY_SUFFIX='.a'
31388       else
31389         SHARED_LIBRARY='lib$1.dylib'
31390         SHARED_LIBRARY_SUFFIX='.dylib'
31391       fi
31392     fi
31393   fi
31394 
31395 
31396 
31397 
31398 
31399 
31400 
31401 
31402 
31403 
31404   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31405     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31406 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31407   else
31408     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31409 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31410   fi
31411 
31412 
31413 # User supplied flags should be used when configure detects compilers
31414 
31415   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31416     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31417 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31418   fi
31419 
31420   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31421     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31422 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31423   fi
31424 
31425   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31426     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31427 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31428   fi
31429 
31430 
31431 # Check whether --with-extra-cflags was given.
31432 if test "${with_extra_cflags+set}" = set; then :
31433   withval=$with_extra_cflags;
31434 fi
31435 
31436 
31437 
31438 # Check whether --with-extra-cxxflags was given.
31439 if test "${with_extra_cxxflags+set}" = set; then :
31440   withval=$with_extra_cxxflags;
31441 fi
31442 
31443 
31444 
31445 # Check whether --with-extra-ldflags was given.
31446 if test "${with_extra_ldflags+set}" = set; then :
31447   withval=$with_extra_ldflags;
31448 fi
31449 
31450 
31451   EXTRA_CFLAGS="$with_extra_cflags"
31452   EXTRA_CXXFLAGS="$with_extra_cxxflags"
31453   EXTRA_LDFLAGS="$with_extra_ldflags"
31454 
31455   # Hotspot needs these set in their legacy form
31456   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31457   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31458   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31459 
31460 
31461 
31462 
31463 
31464 
31465 
31466 
31467 
31468   # The global CFLAGS and LDLAGS variables are used by configure tests and
31469   # should include the extra parameters
31470   CFLAGS="$EXTRA_CFLAGS"
31471   CXXFLAGS="$EXTRA_CXXFLAGS"
31472   LDFLAGS="$EXTRA_LDFLAGS"
31473   CPPFLAGS=""
31474 
31475 # The sysroot cflags are needed for configure to be able to run the compilers
31476 
31477   if test "x$SYSROOT" != "x"; then
31478     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31479       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31480         # Solaris Studio does not have a concept of sysroot. Instead we must
31481         # make sure the default include and lib dirs are appended to each
31482         # compile and link command line. Must also add -I-xbuiltin to enable
31483         # inlining of system functions and intrinsics.
31484         SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31485         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31486             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31487       fi
31488     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31489       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31490       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31491     elif test "x$TOOLCHAIN_TYPE" = xclang; then
31492       SYSROOT_CFLAGS="-isysroot $SYSROOT"
31493       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31494     fi
31495     # Propagate the sysroot args to hotspot
31496     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31497     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31498     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31499     # The global CFLAGS and LDFLAGS variables need these for configure to function
31500     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31501     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31502     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31503     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31504   fi
31505 
31506   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31507     # We also need -iframework<path>/System/Library/Frameworks
31508     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31509     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31510     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31511     # set this here so it doesn't have to be peppered throughout the forest
31512     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31513     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31514   fi
31515 
31516 
31517 
31518 
31519 
31520 # Then detect the actual binaries needed
31521 
31522   # FIXME: Is this needed?
31523   ac_ext=cpp
31524 ac_cpp='$CXXCPP $CPPFLAGS'
31525 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31526 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31527 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31528 
31529 
31530   # Store the CFLAGS etc passed to the configure script.
31531   ORG_CFLAGS="$CFLAGS"
31532   ORG_CXXFLAGS="$CXXFLAGS"
31533 
31534   # autoconf magic only relies on PATH, so update it if tools dir is specified
31535   OLD_PATH="$PATH"
31536 
31537   # On Windows, we need to detect the visual studio installation first.
31538   # This will change the PATH, but we need to keep that new PATH even
31539   # after toolchain detection is done, since the compiler (on x86) uses
31540   # it for DLL resolution in runtime.
31541   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31542       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31543 
31544   # Store path to cygwin link.exe to help excluding it when searching for
31545   # VS linker. This must be done before changing the PATH when looking for VS.
31546   # Extract the first word of "link", so it can be a program name with args.
31547 set dummy link; ac_word=$2
31548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31549 $as_echo_n "checking for $ac_word... " >&6; }
31550 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31551   $as_echo_n "(cached) " >&6
31552 else
31553   case $CYGWIN_LINK in
31554   [\\/]* | ?:[\\/]*)
31555   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31556   ;;
31557   *)
31558   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31559 for as_dir in $PATH
31560 do
31561   IFS=$as_save_IFS
31562   test -z "$as_dir" && as_dir=.
31563     for ac_exec_ext in '' $ac_executable_extensions; do
31564   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31565     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31566     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31567     break 2
31568   fi
31569 done
31570   done
31571 IFS=$as_save_IFS
31572 
31573   ;;
31574 esac
31575 fi
31576 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31577 if test -n "$CYGWIN_LINK"; then
31578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31579 $as_echo "$CYGWIN_LINK" >&6; }
31580 else
31581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31582 $as_echo "no" >&6; }
31583 fi
31584 
31585 
31586   if test "x$CYGWIN_LINK" != x; then
31587     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31588 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31589     "$CYGWIN_LINK" --version > /dev/null
31590     if test $? -eq 0 ; then
31591       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31592 $as_echo "yes" >&6; }
31593     else
31594       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31595 $as_echo "no" >&6; }
31596       # This might be the VS linker. Don't exclude it later on.
31597       CYGWIN_LINK=""
31598     fi
31599   fi
31600 
31601   # First-hand choice is to locate and run the vsvars bat file.
31602 
31603 
31604 # Check whether --with-toolchain-version was given.
31605 if test "${with_toolchain_version+set}" = set; then :
31606   withval=$with_toolchain_version;
31607 fi
31608 
31609 
31610   if test "x$with_toolchain_version" = xlist; then
31611     # List all toolchains
31612     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31613 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31614     for version in $VALID_VS_VERSIONS; do
31615       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31616       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31617     done
31618 
31619     exit 0
31620   elif test "x$DEVKIT_VS_VERSION" != x; then
31621     VS_VERSION=$DEVKIT_VS_VERSION
31622     TOOLCHAIN_VERSION=$VS_VERSION
31623     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31624     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31625     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31626     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31627     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31628     VS_PATH="$TOOLCHAIN_PATH:$PATH"
31629 
31630     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31631     # can still be exported as INCLUDE for compiler invocations without
31632     # SYSROOT_CFLAGS
31633     OLDIFS="$IFS"
31634     IFS=";"
31635     for i in $DEVKIT_VS_INCLUDE; do
31636       ipath=$i
31637 
31638   unix_path="$ipath"
31639   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31640     windows_path=`$CYGPATH -m "$unix_path"`
31641     ipath="$windows_path"
31642   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31643     windows_path=`cmd //c echo $unix_path`
31644     ipath="$windows_path"
31645   fi
31646 
31647       VS_INCLUDE="$VS_INCLUDE;$ipath"
31648     done
31649     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31650     # as LIB for compiler invocations without SYSROOT_LDFLAGS
31651     for i in $DEVKIT_VS_LIB; do
31652       libpath=$i
31653 
31654   unix_path="$libpath"
31655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31656     windows_path=`$CYGPATH -m "$unix_path"`
31657     libpath="$windows_path"
31658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31659     windows_path=`cmd //c echo $unix_path`
31660     libpath="$windows_path"
31661   fi
31662 
31663       VS_LIB="$VS_LIB;$libpath"
31664     done
31665     IFS="$OLDIFS"
31666 
31667     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31668 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31669 
31670   elif test "x$with_toolchain_version" != x; then
31671     # User override; check that it is valid
31672     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31673       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31674 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31675       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31676 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31677       as_fn_error $? "Cannot continue." "$LINENO" 5
31678     fi
31679     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31680   else
31681     # No flag given, use default
31682     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31683   fi
31684 
31685   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31686 
31687   VS_VERSION="$VS_VERSION"
31688   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31689   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31690   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31691   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31692 
31693   # When using --with-tools-dir, assume it points to the correct and default
31694   # version of Visual Studio or that --with-toolchain-version was also set.
31695   if test "x$with_tools_dir" != x; then
31696 
31697   if test "x$VS_ENV_CMD" = x; then
31698     VS_VERSION="${VS_VERSION}"
31699     VS_BASE="$with_tools_dir/../.."
31700     METHOD="--with-tools-dir"
31701 
31702     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31703       VCVARSFILE="vc/bin/vcvars32.bat"
31704     else
31705       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31706     fi
31707 
31708 
31709   windows_path="$VS_BASE"
31710   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31711     unix_path=`$CYGPATH -u "$windows_path"`
31712     VS_BASE="$unix_path"
31713   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31714     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31715     VS_BASE="$unix_path"
31716   fi
31717 
31718     if test -d "$VS_BASE"; then
31719       if test -f "$VS_BASE/$VCVARSFILE"; then
31720         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31721 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31722         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31723         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31724         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31725         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31726       else
31727         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31728 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31729         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31730 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31731       fi
31732     fi
31733   fi
31734 
31735 
31736   if test "x$VS_ENV_CMD" = x; then
31737     VS_VERSION="${VS_VERSION}"
31738     VS_BASE="$with_tools_dir/../../.."
31739     METHOD="--with-tools-dir"
31740 
31741     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31742       VCVARSFILE="vc/bin/vcvars32.bat"
31743     else
31744       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31745     fi
31746 
31747 
31748   windows_path="$VS_BASE"
31749   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31750     unix_path=`$CYGPATH -u "$windows_path"`
31751     VS_BASE="$unix_path"
31752   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31753     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31754     VS_BASE="$unix_path"
31755   fi
31756 
31757     if test -d "$VS_BASE"; then
31758       if test -f "$VS_BASE/$VCVARSFILE"; then
31759         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31760 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31761         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31762         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31763         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31764         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31765       else
31766         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31767 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31768         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31769 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31770       fi
31771     fi
31772   fi
31773 
31774     if test "x$VS_ENV_CMD" = x; then
31775       # Having specified an argument which is incorrect will produce an instant failure;
31776       # we should not go on looking
31777       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31778 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31779       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31780 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31781       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31782 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31783       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31784     fi
31785   fi
31786 
31787   VS_ENV_CMD=""
31788   VS_ENV_ARGS=""
31789 
31790   if test "x$VS_COMNTOOLS" != x; then
31791 
31792   if test "x$VS_ENV_CMD" = x; then
31793     VS_VERSION="${VS_VERSION}"
31794     VS_BASE="$VS_COMNTOOLS/../.."
31795     METHOD="$VS_COMNTOOLS_VAR variable"
31796 
31797     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31798       VCVARSFILE="vc/bin/vcvars32.bat"
31799     else
31800       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31801     fi
31802 
31803 
31804   windows_path="$VS_BASE"
31805   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31806     unix_path=`$CYGPATH -u "$windows_path"`
31807     VS_BASE="$unix_path"
31808   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31809     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31810     VS_BASE="$unix_path"
31811   fi
31812 
31813     if test -d "$VS_BASE"; then
31814       if test -f "$VS_BASE/$VCVARSFILE"; then
31815         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31816 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31817         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31818         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31819         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31820         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31821       else
31822         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31823 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31824         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31825 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31826       fi
31827     fi
31828   fi
31829 
31830   fi
31831   if test "x$PROGRAMFILES" != x; then
31832 
31833   if test "x$VS_ENV_CMD" = x; then
31834     VS_VERSION="${VS_VERSION}"
31835     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31836     METHOD="well-known name"
31837 
31838     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31839       VCVARSFILE="vc/bin/vcvars32.bat"
31840     else
31841       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31842     fi
31843 
31844 
31845   windows_path="$VS_BASE"
31846   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31847     unix_path=`$CYGPATH -u "$windows_path"`
31848     VS_BASE="$unix_path"
31849   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31850     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31851     VS_BASE="$unix_path"
31852   fi
31853 
31854     if test -d "$VS_BASE"; then
31855       if test -f "$VS_BASE/$VCVARSFILE"; then
31856         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31857 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31858         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31859         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31860         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31861         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31862       else
31863         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31864 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31865         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31866 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31867       fi
31868     fi
31869   fi
31870 
31871   fi
31872   # Work around the insanely named ProgramFiles(x86) env variable
31873   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31874   if test "x$PROGRAMFILES_X86" != x; then
31875 
31876   if test "x$VS_ENV_CMD" = x; then
31877     VS_VERSION="${VS_VERSION}"
31878     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31879     METHOD="well-known name"
31880 
31881     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31882       VCVARSFILE="vc/bin/vcvars32.bat"
31883     else
31884       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31885     fi
31886 
31887 
31888   windows_path="$VS_BASE"
31889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31890     unix_path=`$CYGPATH -u "$windows_path"`
31891     VS_BASE="$unix_path"
31892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31893     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31894     VS_BASE="$unix_path"
31895   fi
31896 
31897     if test -d "$VS_BASE"; then
31898       if test -f "$VS_BASE/$VCVARSFILE"; then
31899         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31900 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31901         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31902         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31903         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31904         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31905       else
31906         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31907 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31908         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31909 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31910       fi
31911     fi
31912   fi
31913 
31914   fi
31915 
31916   if test "x$VS_ENV_CMD" = x; then
31917     VS_VERSION="${VS_VERSION}"
31918     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31919     METHOD="well-known name"
31920 
31921     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31922       VCVARSFILE="vc/bin/vcvars32.bat"
31923     else
31924       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31925     fi
31926 
31927 
31928   windows_path="$VS_BASE"
31929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31930     unix_path=`$CYGPATH -u "$windows_path"`
31931     VS_BASE="$unix_path"
31932   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31933     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31934     VS_BASE="$unix_path"
31935   fi
31936 
31937     if test -d "$VS_BASE"; then
31938       if test -f "$VS_BASE/$VCVARSFILE"; then
31939         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31940 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31941         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31942         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31943         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31944         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31945       else
31946         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31947 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31948         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31949 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31950       fi
31951     fi
31952   fi
31953 
31954 
31955   if test "x$VS_ENV_CMD" = x; then
31956     VS_VERSION="${VS_VERSION}"
31957     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31958     METHOD="well-known name"
31959 
31960     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31961       VCVARSFILE="vc/bin/vcvars32.bat"
31962     else
31963       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31964     fi
31965 
31966 
31967   windows_path="$VS_BASE"
31968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31969     unix_path=`$CYGPATH -u "$windows_path"`
31970     VS_BASE="$unix_path"
31971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31972     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31973     VS_BASE="$unix_path"
31974   fi
31975 
31976     if test -d "$VS_BASE"; then
31977       if test -f "$VS_BASE/$VCVARSFILE"; then
31978         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31979 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31980         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31981         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31982         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31983         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31984       else
31985         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31986 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31987         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31988 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31989       fi
31990     fi
31991   fi
31992 
31993 
31994   if test "x$SDK_INSTALL_DIR" != x; then
31995     if test "x$ProgramW6432" != x; then
31996 
31997   if test "x$VS_ENV_CMD" = x; then
31998     VS_VERSION="${VS_VERSION}"
31999     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32000     METHOD="well-known name"
32001 
32002   windows_path="$WIN_SDK_BASE"
32003   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32004     unix_path=`$CYGPATH -u "$windows_path"`
32005     WIN_SDK_BASE="$unix_path"
32006   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32007     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32008     WIN_SDK_BASE="$unix_path"
32009   fi
32010 
32011     if test -d "$WIN_SDK_BASE"; then
32012       # There have been cases of partial or broken SDK installations. A missing
32013       # lib dir is not going to work.
32014       if test ! -d "$WIN_SDK_BASE/lib"; then
32015         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32016 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32017         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32018 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32019       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32020         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32021 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32022         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32023         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32024           VS_ENV_ARGS="/x86"
32025         else
32026           VS_ENV_ARGS="/x64"
32027         fi
32028         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32029         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32030         # TODO: improve detection for other versions of SDK
32031         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32032       else
32033         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32034 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32035         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32036 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32037       fi
32038     fi
32039   fi
32040 
32041     fi
32042     if test "x$PROGRAMW6432" != x; then
32043 
32044   if test "x$VS_ENV_CMD" = x; then
32045     VS_VERSION="${VS_VERSION}"
32046     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32047     METHOD="well-known name"
32048 
32049   windows_path="$WIN_SDK_BASE"
32050   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32051     unix_path=`$CYGPATH -u "$windows_path"`
32052     WIN_SDK_BASE="$unix_path"
32053   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32054     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32055     WIN_SDK_BASE="$unix_path"
32056   fi
32057 
32058     if test -d "$WIN_SDK_BASE"; then
32059       # There have been cases of partial or broken SDK installations. A missing
32060       # lib dir is not going to work.
32061       if test ! -d "$WIN_SDK_BASE/lib"; then
32062         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32063 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32064         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32065 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32066       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32067         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32068 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32069         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32070         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32071           VS_ENV_ARGS="/x86"
32072         else
32073           VS_ENV_ARGS="/x64"
32074         fi
32075         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32076         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32077         # TODO: improve detection for other versions of SDK
32078         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32079       else
32080         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32081 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32082         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32083 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32084       fi
32085     fi
32086   fi
32087 
32088     fi
32089     if test "x$PROGRAMFILES" != x; then
32090 
32091   if test "x$VS_ENV_CMD" = x; then
32092     VS_VERSION="${VS_VERSION}"
32093     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32094     METHOD="well-known name"
32095 
32096   windows_path="$WIN_SDK_BASE"
32097   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32098     unix_path=`$CYGPATH -u "$windows_path"`
32099     WIN_SDK_BASE="$unix_path"
32100   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32101     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32102     WIN_SDK_BASE="$unix_path"
32103   fi
32104 
32105     if test -d "$WIN_SDK_BASE"; then
32106       # There have been cases of partial or broken SDK installations. A missing
32107       # lib dir is not going to work.
32108       if test ! -d "$WIN_SDK_BASE/lib"; then
32109         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32110 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32111         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32112 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32113       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32114         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32115 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32116         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32117         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32118           VS_ENV_ARGS="/x86"
32119         else
32120           VS_ENV_ARGS="/x64"
32121         fi
32122         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32123         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32124         # TODO: improve detection for other versions of SDK
32125         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32126       else
32127         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32128 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32129         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32130 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32131       fi
32132     fi
32133   fi
32134 
32135     fi
32136 
32137   if test "x$VS_ENV_CMD" = x; then
32138     VS_VERSION="${VS_VERSION}"
32139     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32140     METHOD="well-known name"
32141 
32142   windows_path="$WIN_SDK_BASE"
32143   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32144     unix_path=`$CYGPATH -u "$windows_path"`
32145     WIN_SDK_BASE="$unix_path"
32146   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32147     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32148     WIN_SDK_BASE="$unix_path"
32149   fi
32150 
32151     if test -d "$WIN_SDK_BASE"; then
32152       # There have been cases of partial or broken SDK installations. A missing
32153       # lib dir is not going to work.
32154       if test ! -d "$WIN_SDK_BASE/lib"; then
32155         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32156 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32157         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32158 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32159       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32160         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32161 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32162         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32163         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32164           VS_ENV_ARGS="/x86"
32165         else
32166           VS_ENV_ARGS="/x64"
32167         fi
32168         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32169         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32170         # TODO: improve detection for other versions of SDK
32171         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32172       else
32173         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32174 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32175         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32176 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32177       fi
32178     fi
32179   fi
32180 
32181 
32182   if test "x$VS_ENV_CMD" = x; then
32183     VS_VERSION="${VS_VERSION}"
32184     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32185     METHOD="well-known name"
32186 
32187   windows_path="$WIN_SDK_BASE"
32188   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32189     unix_path=`$CYGPATH -u "$windows_path"`
32190     WIN_SDK_BASE="$unix_path"
32191   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32192     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32193     WIN_SDK_BASE="$unix_path"
32194   fi
32195 
32196     if test -d "$WIN_SDK_BASE"; then
32197       # There have been cases of partial or broken SDK installations. A missing
32198       # lib dir is not going to work.
32199       if test ! -d "$WIN_SDK_BASE/lib"; then
32200         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32201 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32202         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32203 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32204       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32205         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32206 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32207         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32208         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32209           VS_ENV_ARGS="/x86"
32210         else
32211           VS_ENV_ARGS="/x64"
32212         fi
32213         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32214         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32215         # TODO: improve detection for other versions of SDK
32216         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32217       else
32218         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32219 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32220         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32221 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32222       fi
32223     fi
32224   fi
32225 
32226   fi
32227 
32228     if test "x$VS_ENV_CMD" != x; then
32229       TOOLCHAIN_VERSION=$VS_VERSION
32230       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32231       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32232       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32233       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32234       # The rest of the variables are already evaled while probing
32235       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32236 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32237       break
32238     fi
32239   done
32240 
32241 
32242   # If we have a devkit, skip all of the below.
32243   if test "x$DEVKIT_VS_VERSION" = x; then
32244     if test "x$VS_ENV_CMD" != x; then
32245       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32246 
32247   # Only process if variable expands to non-empty
32248 
32249   if test "x$VS_ENV_CMD" != x; then
32250     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32251 
32252   # First separate the path from the arguments. This will split at the first
32253   # space.
32254   complete="$VS_ENV_CMD"
32255   path="${complete%% *}"
32256   tmp="$complete EOL"
32257   arguments="${tmp#* }"
32258 
32259   # Input might be given as Windows format, start by converting to
32260   # unix format.
32261   new_path=`$CYGPATH -u "$path"`
32262 
32263   # Now try to locate executable using which
32264   new_path=`$WHICH "$new_path" 2> /dev/null`
32265   # bat and cmd files are not always considered executable in cygwin causing which
32266   # to not find them
32267   if test "x$new_path" = x \
32268       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32269       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32270     new_path=`$CYGPATH -u "$path"`
32271   fi
32272   if test "x$new_path" = x; then
32273     # Oops. Which didn't find the executable.
32274     # The splitting of arguments from the executable at a space might have been incorrect,
32275     # since paths with space are more likely in Windows. Give it another try with the whole
32276     # argument.
32277     path="$complete"
32278     arguments="EOL"
32279     new_path=`$CYGPATH -u "$path"`
32280     new_path=`$WHICH "$new_path" 2> /dev/null`
32281     # bat and cmd files are not always considered executable in cygwin causing which
32282     # to not find them
32283     if test "x$new_path" = x \
32284         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32285         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32286       new_path=`$CYGPATH -u "$path"`
32287     fi
32288     if test "x$new_path" = x; then
32289       # It's still not found. Now this is an unrecoverable error.
32290       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32291 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32292       has_space=`$ECHO "$complete" | $GREP " "`
32293       if test "x$has_space" != x; then
32294         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32295 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32296       fi
32297       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32298     fi
32299   fi
32300 
32301   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32302   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32303   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32304   # "foo.exe" is OK but "foo" is an error.
32305   #
32306   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32307   # It is also a way to make sure we got the proper file name for the real test later on.
32308   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32309   if test "x$test_shortpath" = x; then
32310     # Short path failed, file does not exist as specified.
32311     # Try adding .exe or .cmd
32312     if test -f "${new_path}.exe"; then
32313       input_to_shortpath="${new_path}.exe"
32314     elif test -f "${new_path}.cmd"; then
32315       input_to_shortpath="${new_path}.cmd"
32316     else
32317       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32318 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32319       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32320 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32321       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32322     fi
32323   else
32324     input_to_shortpath="$new_path"
32325   fi
32326 
32327   # Call helper function which possibly converts this using DOS-style short mode.
32328   # If so, the updated path is stored in $new_path.
32329   new_path="$input_to_shortpath"
32330 
32331   input_path="$input_to_shortpath"
32332   # Check if we need to convert this using DOS-style short mode. If the path
32333   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32334   # take no chances and rewrite it.
32335   # Note: m4 eats our [], so we need to use [ and ] instead.
32336   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32337   if test "x$has_forbidden_chars" != x; then
32338     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32339     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32340     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32341     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32342       # Going to short mode and back again did indeed matter. Since short mode is
32343       # case insensitive, let's make it lowercase to improve readability.
32344       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32345       # Now convert it back to Unix-style (cygpath)
32346       input_path=`$CYGPATH -u "$shortmode_path"`
32347       new_path="$input_path"
32348     fi
32349   fi
32350 
32351   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32352   if test "x$test_cygdrive_prefix" = x; then
32353     # As a simple fix, exclude /usr/bin since it's not a real path.
32354     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32355       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32356       # a path prefixed by /cygdrive for fixpath to work.
32357       new_path="$CYGWIN_ROOT_PATH$input_path"
32358     fi
32359   fi
32360 
32361   # remove trailing .exe if any
32362   new_path="${new_path/%.exe/}"
32363 
32364     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32365 
32366   # First separate the path from the arguments. This will split at the first
32367   # space.
32368   complete="$VS_ENV_CMD"
32369   path="${complete%% *}"
32370   tmp="$complete EOL"
32371   arguments="${tmp#* }"
32372 
32373   # Input might be given as Windows format, start by converting to
32374   # unix format.
32375   new_path="$path"
32376 
32377   windows_path="$new_path"
32378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32379     unix_path=`$CYGPATH -u "$windows_path"`
32380     new_path="$unix_path"
32381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32382     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32383     new_path="$unix_path"
32384   fi
32385 
32386 
32387   # Now try to locate executable using which
32388   new_path=`$WHICH "$new_path" 2> /dev/null`
32389 
32390   if test "x$new_path" = x; then
32391     # Oops. Which didn't find the executable.
32392     # The splitting of arguments from the executable at a space might have been incorrect,
32393     # since paths with space are more likely in Windows. Give it another try with the whole
32394     # argument.
32395     path="$complete"
32396     arguments="EOL"
32397     new_path="$path"
32398 
32399   windows_path="$new_path"
32400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32401     unix_path=`$CYGPATH -u "$windows_path"`
32402     new_path="$unix_path"
32403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32405     new_path="$unix_path"
32406   fi
32407 
32408 
32409     new_path=`$WHICH "$new_path" 2> /dev/null`
32410     # bat and cmd files are not always considered executable in MSYS causing which
32411     # to not find them
32412     if test "x$new_path" = x \
32413         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32414         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32415       new_path="$path"
32416 
32417   windows_path="$new_path"
32418   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32419     unix_path=`$CYGPATH -u "$windows_path"`
32420     new_path="$unix_path"
32421   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32422     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32423     new_path="$unix_path"
32424   fi
32425 
32426     fi
32427 
32428     if test "x$new_path" = x; then
32429       # It's still not found. Now this is an unrecoverable error.
32430       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32431 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32432       has_space=`$ECHO "$complete" | $GREP " "`
32433       if test "x$has_space" != x; then
32434         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32435 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32436       fi
32437       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32438     fi
32439   fi
32440 
32441   # Now new_path has a complete unix path to the binary
32442   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32443     # Keep paths in /bin as-is, but remove trailing .exe if any
32444     new_path="${new_path/%.exe/}"
32445     # Do not save /bin paths to all_fixpath_prefixes!
32446   else
32447     # Not in mixed or Windows style, start by that.
32448     new_path=`cmd //c echo $new_path`
32449 
32450   input_path="$new_path"
32451   # Check if we need to convert this using DOS-style short mode. If the path
32452   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32453   # take no chances and rewrite it.
32454   # Note: m4 eats our [], so we need to use [ and ] instead.
32455   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32456   if test "x$has_forbidden_chars" != x; then
32457     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32458     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32459   fi
32460 
32461     # Output is in $new_path
32462 
32463   windows_path="$new_path"
32464   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32465     unix_path=`$CYGPATH -u "$windows_path"`
32466     new_path="$unix_path"
32467   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32468     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32469     new_path="$unix_path"
32470   fi
32471 
32472     # remove trailing .exe if any
32473     new_path="${new_path/%.exe/}"
32474 
32475     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32476     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32477   fi
32478 
32479     else
32480       # We're on a unix platform. Hooray! :)
32481       # First separate the path from the arguments. This will split at the first
32482       # space.
32483       complete="$VS_ENV_CMD"
32484       path="${complete%% *}"
32485       tmp="$complete EOL"
32486       arguments="${tmp#* }"
32487 
32488       # Cannot rely on the command "which" here since it doesn't always work.
32489       is_absolute_path=`$ECHO "$path" | $GREP ^/`
32490       if test -z "$is_absolute_path"; then
32491         # Path to executable is not absolute. Find it.
32492         IFS_save="$IFS"
32493         IFS=:
32494         for p in $PATH; do
32495           if test -f "$p/$path" && test -x "$p/$path"; then
32496             new_path="$p/$path"
32497             break
32498           fi
32499         done
32500         IFS="$IFS_save"
32501       else
32502         # This is an absolute path, we can use it without further modifications.
32503         new_path="$path"
32504       fi
32505 
32506       if test "x$new_path" = x; then
32507         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32508 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32509         has_space=`$ECHO "$complete" | $GREP " "`
32510         if test "x$has_space" != x; then
32511           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32512 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32513         fi
32514         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32515       fi
32516     fi
32517 
32518     # Now join together the path and the arguments once again
32519     if test "x$arguments" != xEOL; then
32520       new_complete="$new_path ${arguments% *}"
32521     else
32522       new_complete="$new_path"
32523     fi
32524 
32525     if test "x$complete" != "x$new_complete"; then
32526       VS_ENV_CMD="$new_complete"
32527       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32528 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32529     fi
32530   fi
32531 
32532 
32533       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32534       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32535 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32536 
32537       # We need to create a couple of temporary files.
32538       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32539       $MKDIR -p $VS_ENV_TMP_DIR
32540 
32541       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32542       # Instead create a shell script which will set the relevant variables when run.
32543       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32544 
32545   unix_path="$WINPATH_VS_ENV_CMD"
32546   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32547     windows_path=`$CYGPATH -m "$unix_path"`
32548     WINPATH_VS_ENV_CMD="$windows_path"
32549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32550     windows_path=`cmd //c echo $unix_path`
32551     WINPATH_VS_ENV_CMD="$windows_path"
32552   fi
32553 
32554       WINPATH_BASH="$BASH"
32555 
32556   unix_path="$WINPATH_BASH"
32557   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32558     windows_path=`$CYGPATH -m "$unix_path"`
32559     WINPATH_BASH="$windows_path"
32560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32561     windows_path=`cmd //c echo $unix_path`
32562     WINPATH_BASH="$windows_path"
32563   fi
32564 
32565 
32566       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32567       # script (executable by bash) that will setup the important variables.
32568       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32569       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32570       # This will end up something like:
32571       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32572       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32573       # These will end up something like:
32574       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32575       # The trailing space for everyone except PATH is no typo, but is needed due
32576       # to trailing \ in the Windows paths. These will be stripped later.
32577       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32578           >> $EXTRACT_VC_ENV_BAT_FILE
32579       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32580           >> $EXTRACT_VC_ENV_BAT_FILE
32581       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32582           >> $EXTRACT_VC_ENV_BAT_FILE
32583       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32584           >> $EXTRACT_VC_ENV_BAT_FILE
32585       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32586           >> $EXTRACT_VC_ENV_BAT_FILE
32587       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32588           >> $EXTRACT_VC_ENV_BAT_FILE
32589 
32590       # Now execute the newly created bat file.
32591       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32592       # Change directory so we don't need to mess with Windows paths in redirects.
32593       cd $VS_ENV_TMP_DIR
32594       cmd /c extract-vs-env.bat | $CAT
32595       cd $CURDIR
32596 
32597       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32598         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32599 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32600         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32601 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32602         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32603 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32604         as_fn_error $? "Cannot continue" "$LINENO" 5
32605       fi
32606 
32607       # Now set all paths and other env variables. This will allow the rest of
32608       # the configure script to find and run the compiler in the proper way.
32609       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32610 $as_echo "$as_me: Setting extracted environment variables" >&6;}
32611       . $VS_ENV_TMP_DIR/set-vs-env.sh
32612       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32613       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32614     else
32615       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32616       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32617 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32618     fi
32619   fi
32620 
32621   # At this point, we should have correct variables in the environment, or we can't continue.
32622   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32623 $as_echo_n "checking for Visual Studio variables... " >&6; }
32624 
32625   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32626       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32627     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32628       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32629 $as_echo "present but broken" >&6; }
32630       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32631     else
32632       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32633 $as_echo "ok" >&6; }
32634       # Remove any trailing "\" ";" and " " from the variables.
32635       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32636       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32637       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32638       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32639       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32640       # Remove any paths containing # (typically F#) as that messes up make. This
32641       # is needed if visual studio was installed with F# support.
32642       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32643 
32644 
32645 
32646 
32647 
32648       # Convert VS_INCLUDE into SYSROOT_CFLAGS
32649       OLDIFS="$IFS"
32650       IFS=";"
32651       for i in $VS_INCLUDE; do
32652         ipath=$i
32653         # Only process non-empty elements
32654         if test "x$ipath" != x; then
32655           IFS="$OLDIFS"
32656           # Check that directory exists before calling fixup_path
32657           testpath=$ipath
32658 
32659   windows_path="$testpath"
32660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32661     unix_path=`$CYGPATH -u "$windows_path"`
32662     testpath="$unix_path"
32663   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32664     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32665     testpath="$unix_path"
32666   fi
32667 
32668           if test -d "$testpath"; then
32669 
32670   # Only process if variable expands to non-empty
32671 
32672   if test "x$ipath" != x; then
32673     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32674 
32675   # Input might be given as Windows format, start by converting to
32676   # unix format.
32677   path="$ipath"
32678   new_path=`$CYGPATH -u "$path"`
32679 
32680   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32681   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32682   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32683   # "foo.exe" is OK but "foo" is an error.
32684   #
32685   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32686   # It is also a way to make sure we got the proper file name for the real test later on.
32687   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32688   if test "x$test_shortpath" = x; then
32689     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32690 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32691     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32692   fi
32693 
32694   # Call helper function which possibly converts this using DOS-style short mode.
32695   # If so, the updated path is stored in $new_path.
32696 
32697   input_path="$new_path"
32698   # Check if we need to convert this using DOS-style short mode. If the path
32699   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32700   # take no chances and rewrite it.
32701   # Note: m4 eats our [], so we need to use [ and ] instead.
32702   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32703   if test "x$has_forbidden_chars" != x; then
32704     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32705     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32706     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32707     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32708       # Going to short mode and back again did indeed matter. Since short mode is
32709       # case insensitive, let's make it lowercase to improve readability.
32710       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32711       # Now convert it back to Unix-style (cygpath)
32712       input_path=`$CYGPATH -u "$shortmode_path"`
32713       new_path="$input_path"
32714     fi
32715   fi
32716 
32717   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32718   if test "x$test_cygdrive_prefix" = x; then
32719     # As a simple fix, exclude /usr/bin since it's not a real path.
32720     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32721       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32722       # a path prefixed by /cygdrive for fixpath to work.
32723       new_path="$CYGWIN_ROOT_PATH$input_path"
32724     fi
32725   fi
32726 
32727 
32728   if test "x$path" != "x$new_path"; then
32729     ipath="$new_path"
32730     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32731 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32732   fi
32733 
32734     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32735 
32736   path="$ipath"
32737   has_colon=`$ECHO $path | $GREP ^.:`
32738   new_path="$path"
32739   if test "x$has_colon" = x; then
32740     # Not in mixed or Windows style, start by that.
32741     new_path=`cmd //c echo $path`
32742   fi
32743 
32744 
32745   input_path="$new_path"
32746   # Check if we need to convert this using DOS-style short mode. If the path
32747   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32748   # take no chances and rewrite it.
32749   # Note: m4 eats our [], so we need to use [ and ] instead.
32750   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32751   if test "x$has_forbidden_chars" != x; then
32752     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32753     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32754   fi
32755 
32756 
32757   windows_path="$new_path"
32758   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32759     unix_path=`$CYGPATH -u "$windows_path"`
32760     new_path="$unix_path"
32761   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32762     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32763     new_path="$unix_path"
32764   fi
32765 
32766   if test "x$path" != "x$new_path"; then
32767     ipath="$new_path"
32768     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32769 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32770   fi
32771 
32772   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32773   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32774 
32775     else
32776       # We're on a unix platform. Hooray! :)
32777       path="$ipath"
32778       has_space=`$ECHO "$path" | $GREP " "`
32779       if test "x$has_space" != x; then
32780         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32781 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32782         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32783       fi
32784 
32785       # Use eval to expand a potential ~
32786       eval path="$path"
32787       if test ! -f "$path" && test ! -d "$path"; then
32788         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32789       fi
32790 
32791       if test -d "$path"; then
32792         ipath="`cd "$path"; $THEPWDCMD -L`"
32793       else
32794         dir="`$DIRNAME "$path"`"
32795         base="`$BASENAME "$path"`"
32796         ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32797       fi
32798     fi
32799   fi
32800 
32801             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32802           fi
32803           IFS=";"
32804         fi
32805       done
32806       # Convert VS_LIB into SYSROOT_LDFLAGS
32807       for i in $VS_LIB; do
32808         libpath=$i
32809         # Only process non-empty elements
32810         if test "x$libpath" != x; then
32811           IFS="$OLDIFS"
32812           # Check that directory exists before calling fixup_path
32813           testpath=$libpath
32814 
32815   windows_path="$testpath"
32816   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32817     unix_path=`$CYGPATH -u "$windows_path"`
32818     testpath="$unix_path"
32819   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32820     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32821     testpath="$unix_path"
32822   fi
32823 
32824           if test -d "$testpath"; then
32825 
32826   # Only process if variable expands to non-empty
32827 
32828   if test "x$libpath" != x; then
32829     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32830 
32831   # Input might be given as Windows format, start by converting to
32832   # unix format.
32833   path="$libpath"
32834   new_path=`$CYGPATH -u "$path"`
32835 
32836   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32837   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32838   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32839   # "foo.exe" is OK but "foo" is an error.
32840   #
32841   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32842   # It is also a way to make sure we got the proper file name for the real test later on.
32843   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32844   if test "x$test_shortpath" = x; then
32845     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32846 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32847     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32848   fi
32849 
32850   # Call helper function which possibly converts this using DOS-style short mode.
32851   # If so, the updated path is stored in $new_path.
32852 
32853   input_path="$new_path"
32854   # Check if we need to convert this using DOS-style short mode. If the path
32855   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32856   # take no chances and rewrite it.
32857   # Note: m4 eats our [], so we need to use [ and ] instead.
32858   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32859   if test "x$has_forbidden_chars" != x; then
32860     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32861     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32862     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32863     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32864       # Going to short mode and back again did indeed matter. Since short mode is
32865       # case insensitive, let's make it lowercase to improve readability.
32866       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32867       # Now convert it back to Unix-style (cygpath)
32868       input_path=`$CYGPATH -u "$shortmode_path"`
32869       new_path="$input_path"
32870     fi
32871   fi
32872 
32873   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32874   if test "x$test_cygdrive_prefix" = x; then
32875     # As a simple fix, exclude /usr/bin since it's not a real path.
32876     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32877       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32878       # a path prefixed by /cygdrive for fixpath to work.
32879       new_path="$CYGWIN_ROOT_PATH$input_path"
32880     fi
32881   fi
32882 
32883 
32884   if test "x$path" != "x$new_path"; then
32885     libpath="$new_path"
32886     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32887 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32888   fi
32889 
32890     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32891 
32892   path="$libpath"
32893   has_colon=`$ECHO $path | $GREP ^.:`
32894   new_path="$path"
32895   if test "x$has_colon" = x; then
32896     # Not in mixed or Windows style, start by that.
32897     new_path=`cmd //c echo $path`
32898   fi
32899 
32900 
32901   input_path="$new_path"
32902   # Check if we need to convert this using DOS-style short mode. If the path
32903   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32904   # take no chances and rewrite it.
32905   # Note: m4 eats our [], so we need to use [ and ] instead.
32906   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32907   if test "x$has_forbidden_chars" != x; then
32908     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32909     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32910   fi
32911 
32912 
32913   windows_path="$new_path"
32914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32915     unix_path=`$CYGPATH -u "$windows_path"`
32916     new_path="$unix_path"
32917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32918     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32919     new_path="$unix_path"
32920   fi
32921 
32922   if test "x$path" != "x$new_path"; then
32923     libpath="$new_path"
32924     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32925 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32926   fi
32927 
32928   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32929   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32930 
32931     else
32932       # We're on a unix platform. Hooray! :)
32933       path="$libpath"
32934       has_space=`$ECHO "$path" | $GREP " "`
32935       if test "x$has_space" != x; then
32936         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32937 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32938         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32939       fi
32940 
32941       # Use eval to expand a potential ~
32942       eval path="$path"
32943       if test ! -f "$path" && test ! -d "$path"; then
32944         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32945       fi
32946 
32947       if test -d "$path"; then
32948         libpath="`cd "$path"; $THEPWDCMD -L`"
32949       else
32950         dir="`$DIRNAME "$path"`"
32951         base="`$BASENAME "$path"`"
32952         libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32953       fi
32954     fi
32955   fi
32956 
32957             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32958           fi
32959           IFS=";"
32960         fi
32961       done
32962       IFS="$OLDIFS"
32963     fi
32964   else
32965     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32966 $as_echo "not found" >&6; }
32967 
32968     if test "x$VS_ENV_CMD" = x; then
32969       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32970 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32971       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32972 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32973     else
32974       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32975 $as_echo "$as_me: Running the extraction script failed." >&6;}
32976     fi
32977     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32978 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32979     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32980 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32981     as_fn_error $? "Cannot continue" "$LINENO" 5
32982   fi
32983 
32984     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32985     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32986     PATH="$VS_PATH"
32987     # The microsoft toolchain also requires INCLUDE and LIB to be set.
32988     export INCLUDE="$VS_INCLUDE"
32989     export LIB="$VS_LIB"
32990   else
32991     if test "x$XCODE_VERSION_OUTPUT" != x; then
32992       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32993       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32994       TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32995     else
32996       # Currently we do not define this for other toolchains. This might change as the need arise.
32997       TOOLCHAIN_VERSION=
32998     fi
32999   fi
33000 
33001 
33002   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33003   # override all other locations.
33004   if test "x$TOOLCHAIN_PATH" != x; then
33005     PATH=$TOOLCHAIN_PATH:$PATH
33006   fi
33007 
33008 
33009   #
33010   # Setup the compilers (CC and CXX)
33011   #
33012 
33013   COMPILER_NAME=C
33014   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33015 
33016   if test "x$CC" != x; then
33017     # User has supplied compiler name already, always let that override.
33018     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33019 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33020     if test "x`basename $CC`" = "x$CC"; then
33021       # A command without a complete path is provided, search $PATH.
33022 
33023       for ac_prog in $CC
33024 do
33025   # Extract the first word of "$ac_prog", so it can be a program name with args.
33026 set dummy $ac_prog; ac_word=$2
33027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33028 $as_echo_n "checking for $ac_word... " >&6; }
33029 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33030   $as_echo_n "(cached) " >&6
33031 else
33032   case $POTENTIAL_CC in
33033   [\\/]* | ?:[\\/]*)
33034   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33035   ;;
33036   *)
33037   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33038 for as_dir in $PATH
33039 do
33040   IFS=$as_save_IFS
33041   test -z "$as_dir" && as_dir=.
33042     for ac_exec_ext in '' $ac_executable_extensions; do
33043   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33044     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33045     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33046     break 2
33047   fi
33048 done
33049   done
33050 IFS=$as_save_IFS
33051 
33052   ;;
33053 esac
33054 fi
33055 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33056 if test -n "$POTENTIAL_CC"; then
33057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33058 $as_echo "$POTENTIAL_CC" >&6; }
33059 else
33060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33061 $as_echo "no" >&6; }
33062 fi
33063 
33064 
33065   test -n "$POTENTIAL_CC" && break
33066 done
33067 
33068       if test "x$POTENTIAL_CC" != x; then
33069         CC=$POTENTIAL_CC
33070       else
33071         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33072       fi
33073     else
33074       # Otherwise it might already be a complete path
33075       if test ! -x "$CC"; then
33076         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33077       fi
33078     fi
33079   else
33080     # No user supplied value. Locate compiler ourselves.
33081 
33082     # If we are cross compiling, assume cross compilation tools follows the
33083     # cross compilation standard where they are prefixed with the autoconf
33084     # standard name for the target. For example the binary
33085     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33086     # If we are not cross compiling, then the default compiler name will be
33087     # used.
33088 
33089     CC=
33090     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33091     # before checking the rest of the PATH.
33092     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33093     # step, this should not be necessary.
33094     if test -n "$TOOLCHAIN_PATH"; then
33095       PATH_save="$PATH"
33096       PATH="$TOOLCHAIN_PATH"
33097       for ac_prog in $SEARCH_LIST
33098 do
33099   # Extract the first word of "$ac_prog", so it can be a program name with args.
33100 set dummy $ac_prog; ac_word=$2
33101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33102 $as_echo_n "checking for $ac_word... " >&6; }
33103 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33104   $as_echo_n "(cached) " >&6
33105 else
33106   case $TOOLCHAIN_PATH_CC in
33107   [\\/]* | ?:[\\/]*)
33108   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33109   ;;
33110   *)
33111   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33112 for as_dir in $PATH
33113 do
33114   IFS=$as_save_IFS
33115   test -z "$as_dir" && as_dir=.
33116     for ac_exec_ext in '' $ac_executable_extensions; do
33117   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33118     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33119     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33120     break 2
33121   fi
33122 done
33123   done
33124 IFS=$as_save_IFS
33125 
33126   ;;
33127 esac
33128 fi
33129 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33130 if test -n "$TOOLCHAIN_PATH_CC"; then
33131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33132 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33133 else
33134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33135 $as_echo "no" >&6; }
33136 fi
33137 
33138 
33139   test -n "$TOOLCHAIN_PATH_CC" && break
33140 done
33141 
33142       CC=$TOOLCHAIN_PATH_CC
33143       PATH="$PATH_save"
33144     fi
33145 
33146     # AC_PATH_PROGS can't be run multiple times with the same variable,
33147     # so create a new name for this run.
33148     if test "x$CC" = x; then
33149       for ac_prog in $SEARCH_LIST
33150 do
33151   # Extract the first word of "$ac_prog", so it can be a program name with args.
33152 set dummy $ac_prog; ac_word=$2
33153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33154 $as_echo_n "checking for $ac_word... " >&6; }
33155 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33156   $as_echo_n "(cached) " >&6
33157 else
33158   case $POTENTIAL_CC in
33159   [\\/]* | ?:[\\/]*)
33160   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33161   ;;
33162   *)
33163   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33164 for as_dir in $PATH
33165 do
33166   IFS=$as_save_IFS
33167   test -z "$as_dir" && as_dir=.
33168     for ac_exec_ext in '' $ac_executable_extensions; do
33169   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33170     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33171     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33172     break 2
33173   fi
33174 done
33175   done
33176 IFS=$as_save_IFS
33177 
33178   ;;
33179 esac
33180 fi
33181 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33182 if test -n "$POTENTIAL_CC"; then
33183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33184 $as_echo "$POTENTIAL_CC" >&6; }
33185 else
33186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33187 $as_echo "no" >&6; }
33188 fi
33189 
33190 
33191   test -n "$POTENTIAL_CC" && break
33192 done
33193 
33194       CC=$POTENTIAL_CC
33195     fi
33196 
33197     if test "x$CC" = x; then
33198 
33199   # Print a helpful message on how to acquire the necessary build dependency.
33200   # devkit is the help tag: freetype, cups, alsa etc
33201   MISSING_DEPENDENCY=devkit
33202 
33203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33204     cygwin_help $MISSING_DEPENDENCY
33205   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33206     msys_help $MISSING_DEPENDENCY
33207   else
33208     PKGHANDLER_COMMAND=
33209 
33210     case $PKGHANDLER in
33211       apt-get)
33212         apt_help     $MISSING_DEPENDENCY ;;
33213       yum)
33214         yum_help     $MISSING_DEPENDENCY ;;
33215       port)
33216         port_help    $MISSING_DEPENDENCY ;;
33217       pkgutil)
33218         pkgutil_help $MISSING_DEPENDENCY ;;
33219       pkgadd)
33220         pkgadd_help  $MISSING_DEPENDENCY ;;
33221     esac
33222 
33223     if test "x$PKGHANDLER_COMMAND" != x; then
33224       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33225     fi
33226   fi
33227 
33228       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33229     fi
33230   fi
33231 
33232   # Now we have a compiler binary in CC. Make sure it's okay.
33233 
33234   # Only process if variable expands to non-empty
33235 
33236   if test "x$CC" != x; then
33237     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33238 
33239   # First separate the path from the arguments. This will split at the first
33240   # space.
33241   complete="$CC"
33242   path="${complete%% *}"
33243   tmp="$complete EOL"
33244   arguments="${tmp#* }"
33245 
33246   # Input might be given as Windows format, start by converting to
33247   # unix format.
33248   new_path=`$CYGPATH -u "$path"`
33249 
33250   # Now try to locate executable using which
33251   new_path=`$WHICH "$new_path" 2> /dev/null`
33252   # bat and cmd files are not always considered executable in cygwin causing which
33253   # to not find them
33254   if test "x$new_path" = x \
33255       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33256       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33257     new_path=`$CYGPATH -u "$path"`
33258   fi
33259   if test "x$new_path" = x; then
33260     # Oops. Which didn't find the executable.
33261     # The splitting of arguments from the executable at a space might have been incorrect,
33262     # since paths with space are more likely in Windows. Give it another try with the whole
33263     # argument.
33264     path="$complete"
33265     arguments="EOL"
33266     new_path=`$CYGPATH -u "$path"`
33267     new_path=`$WHICH "$new_path" 2> /dev/null`
33268     # bat and cmd files are not always considered executable in cygwin causing which
33269     # to not find them
33270     if test "x$new_path" = x \
33271         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33272         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33273       new_path=`$CYGPATH -u "$path"`
33274     fi
33275     if test "x$new_path" = x; then
33276       # It's still not found. Now this is an unrecoverable error.
33277       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33278 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33279       has_space=`$ECHO "$complete" | $GREP " "`
33280       if test "x$has_space" != x; then
33281         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33282 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33283       fi
33284       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33285     fi
33286   fi
33287 
33288   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33289   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33290   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33291   # "foo.exe" is OK but "foo" is an error.
33292   #
33293   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33294   # It is also a way to make sure we got the proper file name for the real test later on.
33295   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33296   if test "x$test_shortpath" = x; then
33297     # Short path failed, file does not exist as specified.
33298     # Try adding .exe or .cmd
33299     if test -f "${new_path}.exe"; then
33300       input_to_shortpath="${new_path}.exe"
33301     elif test -f "${new_path}.cmd"; then
33302       input_to_shortpath="${new_path}.cmd"
33303     else
33304       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33305 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33306       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33307 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33308       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33309     fi
33310   else
33311     input_to_shortpath="$new_path"
33312   fi
33313 
33314   # Call helper function which possibly converts this using DOS-style short mode.
33315   # If so, the updated path is stored in $new_path.
33316   new_path="$input_to_shortpath"
33317 
33318   input_path="$input_to_shortpath"
33319   # Check if we need to convert this using DOS-style short mode. If the path
33320   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33321   # take no chances and rewrite it.
33322   # Note: m4 eats our [], so we need to use [ and ] instead.
33323   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33324   if test "x$has_forbidden_chars" != x; then
33325     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33326     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33327     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33328     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33329       # Going to short mode and back again did indeed matter. Since short mode is
33330       # case insensitive, let's make it lowercase to improve readability.
33331       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33332       # Now convert it back to Unix-style (cygpath)
33333       input_path=`$CYGPATH -u "$shortmode_path"`
33334       new_path="$input_path"
33335     fi
33336   fi
33337 
33338   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33339   if test "x$test_cygdrive_prefix" = x; then
33340     # As a simple fix, exclude /usr/bin since it's not a real path.
33341     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33342       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33343       # a path prefixed by /cygdrive for fixpath to work.
33344       new_path="$CYGWIN_ROOT_PATH$input_path"
33345     fi
33346   fi
33347 
33348   # remove trailing .exe if any
33349   new_path="${new_path/%.exe/}"
33350 
33351     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33352 
33353   # First separate the path from the arguments. This will split at the first
33354   # space.
33355   complete="$CC"
33356   path="${complete%% *}"
33357   tmp="$complete EOL"
33358   arguments="${tmp#* }"
33359 
33360   # Input might be given as Windows format, start by converting to
33361   # unix format.
33362   new_path="$path"
33363 
33364   windows_path="$new_path"
33365   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33366     unix_path=`$CYGPATH -u "$windows_path"`
33367     new_path="$unix_path"
33368   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33369     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33370     new_path="$unix_path"
33371   fi
33372 
33373 
33374   # Now try to locate executable using which
33375   new_path=`$WHICH "$new_path" 2> /dev/null`
33376 
33377   if test "x$new_path" = x; then
33378     # Oops. Which didn't find the executable.
33379     # The splitting of arguments from the executable at a space might have been incorrect,
33380     # since paths with space are more likely in Windows. Give it another try with the whole
33381     # argument.
33382     path="$complete"
33383     arguments="EOL"
33384     new_path="$path"
33385 
33386   windows_path="$new_path"
33387   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33388     unix_path=`$CYGPATH -u "$windows_path"`
33389     new_path="$unix_path"
33390   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33391     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33392     new_path="$unix_path"
33393   fi
33394 
33395 
33396     new_path=`$WHICH "$new_path" 2> /dev/null`
33397     # bat and cmd files are not always considered executable in MSYS causing which
33398     # to not find them
33399     if test "x$new_path" = x \
33400         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33401         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33402       new_path="$path"
33403 
33404   windows_path="$new_path"
33405   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33406     unix_path=`$CYGPATH -u "$windows_path"`
33407     new_path="$unix_path"
33408   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33409     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33410     new_path="$unix_path"
33411   fi
33412 
33413     fi
33414 
33415     if test "x$new_path" = x; then
33416       # It's still not found. Now this is an unrecoverable error.
33417       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33418 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33419       has_space=`$ECHO "$complete" | $GREP " "`
33420       if test "x$has_space" != x; then
33421         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33422 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33423       fi
33424       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33425     fi
33426   fi
33427 
33428   # Now new_path has a complete unix path to the binary
33429   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33430     # Keep paths in /bin as-is, but remove trailing .exe if any
33431     new_path="${new_path/%.exe/}"
33432     # Do not save /bin paths to all_fixpath_prefixes!
33433   else
33434     # Not in mixed or Windows style, start by that.
33435     new_path=`cmd //c echo $new_path`
33436 
33437   input_path="$new_path"
33438   # Check if we need to convert this using DOS-style short mode. If the path
33439   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33440   # take no chances and rewrite it.
33441   # Note: m4 eats our [], so we need to use [ and ] instead.
33442   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33443   if test "x$has_forbidden_chars" != x; then
33444     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33445     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33446   fi
33447 
33448     # Output is in $new_path
33449 
33450   windows_path="$new_path"
33451   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33452     unix_path=`$CYGPATH -u "$windows_path"`
33453     new_path="$unix_path"
33454   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33455     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33456     new_path="$unix_path"
33457   fi
33458 
33459     # remove trailing .exe if any
33460     new_path="${new_path/%.exe/}"
33461 
33462     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33463     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33464   fi
33465 
33466     else
33467       # We're on a unix platform. Hooray! :)
33468       # First separate the path from the arguments. This will split at the first
33469       # space.
33470       complete="$CC"
33471       path="${complete%% *}"
33472       tmp="$complete EOL"
33473       arguments="${tmp#* }"
33474 
33475       # Cannot rely on the command "which" here since it doesn't always work.
33476       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33477       if test -z "$is_absolute_path"; then
33478         # Path to executable is not absolute. Find it.
33479         IFS_save="$IFS"
33480         IFS=:
33481         for p in $PATH; do
33482           if test -f "$p/$path" && test -x "$p/$path"; then
33483             new_path="$p/$path"
33484             break
33485           fi
33486         done
33487         IFS="$IFS_save"
33488       else
33489         # This is an absolute path, we can use it without further modifications.
33490         new_path="$path"
33491       fi
33492 
33493       if test "x$new_path" = x; then
33494         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33495 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33496         has_space=`$ECHO "$complete" | $GREP " "`
33497         if test "x$has_space" != x; then
33498           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33499 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33500         fi
33501         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33502       fi
33503     fi
33504 
33505     # Now join together the path and the arguments once again
33506     if test "x$arguments" != xEOL; then
33507       new_complete="$new_path ${arguments% *}"
33508     else
33509       new_complete="$new_path"
33510     fi
33511 
33512     if test "x$complete" != "x$new_complete"; then
33513       CC="$new_complete"
33514       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33515 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33516     fi
33517   fi
33518 
33519   TEST_COMPILER="$CC"
33520 
33521   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33522 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
33523   SYMLINK_ORIGINAL="$TEST_COMPILER"
33524 
33525   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33526     # Follow a chain of symbolic links. Use readlink
33527     # where it exists, else fall back to horribly
33528     # complicated shell code.
33529     if test "x$READLINK_TESTED" != yes; then
33530       # On MacOSX there is a readlink tool with a different
33531       # purpose than the GNU readlink tool. Check the found readlink.
33532       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33533       if test "x$ISGNU" = x; then
33534         # A readlink that we do not know how to use.
33535         # Are there other non-GNU readlinks out there?
33536         READLINK_TESTED=yes
33537         READLINK=
33538       fi
33539     fi
33540 
33541     if test "x$READLINK" != x; then
33542       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33543     else
33544       # Save the current directory for restoring afterwards
33545       STARTDIR=$PWD
33546       COUNTER=0
33547       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33548       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33549       cd $sym_link_dir
33550       # Use -P flag to resolve symlinks in directories.
33551       cd `$THEPWDCMD -P`
33552       sym_link_dir=`$THEPWDCMD -P`
33553       # Resolve file symlinks
33554       while test $COUNTER -lt 20; do
33555         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33556         if test "x$ISLINK" == x; then
33557           # This is not a symbolic link! We are done!
33558           break
33559         fi
33560         # Again resolve directory symlinks since the target of the just found
33561         # link could be in a different directory
33562         cd `$DIRNAME $ISLINK`
33563         sym_link_dir=`$THEPWDCMD -P`
33564         sym_link_file=`$BASENAME $ISLINK`
33565         let COUNTER=COUNTER+1
33566       done
33567       cd $STARTDIR
33568       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33569     fi
33570   fi
33571 
33572   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33573     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33574 $as_echo "no symlink" >&6; }
33575   else
33576     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33577 $as_echo "$SYMLINK_ORIGINAL" >&6; }
33578 
33579     # We can't handle ccache by gcc wrappers, since we need to know if we're
33580     # using ccache. Instead ccache usage must be controlled by a configure option.
33581     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33582     if test "x$COMPILER_BASENAME" = "xccache"; then
33583       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33584 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33585       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33586     fi
33587   fi
33588 
33589 
33590   COMPILER=$CC
33591   COMPILER_NAME=$COMPILER_NAME
33592 
33593   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33594     # cc -V output typically looks like
33595     #     cc: Sun C 5.12 Linux_i386 2011/11/16
33596     # or
33597     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33598     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33599     # Check that this is likely to be the Solaris Studio cc.
33600     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33601     if test $? -ne 0; then
33602       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33603       { $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
33604 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33605       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33606 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33607       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33608 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33609       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33610     fi
33611     # Remove usage instructions (if present), and
33612     # collapse compiler output into a single line
33613     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33614         $SED -e 's/ *[Uu]sage:.*//'`
33615     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33616         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33617   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33618     # xlc -qversion output typically looks like
33619     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33620     #     Version: 11.01.0000.0015
33621     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33622     # Check that this is likely to be the IBM XL C compiler.
33623     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33624     if test $? -ne 0; then
33625       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33626       { $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
33627 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33628       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33629 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33630       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33631 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33632       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33633     fi
33634     # Collapse compiler output into a single line
33635     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33636     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33637         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33638   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33639     # There is no specific version flag, but all output starts with a version string.
33640     # First line typically looks something like:
33641     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33642     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33643     # Check that this is likely to be Microsoft CL.EXE.
33644     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33645     if test $? -ne 0; then
33646       { $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
33647 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33648       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33649 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33650       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33651     fi
33652     # Collapse compiler output into a single line
33653     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33654     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33655         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33656   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33657     # gcc --version output typically looks like
33658     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33659     #     Copyright (C) 2013 Free Software Foundation, Inc.
33660     #     This is free software; see the source for copying conditions.  There is NO
33661     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33662     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33663     # Check that this is likely to be GCC.
33664     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33665     if test $? -ne 0; then
33666       { $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
33667 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33668       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33669 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33670       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33671     fi
33672     # Remove Copyright and legalese from version string, and
33673     # collapse into a single line
33674     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33675         $SED -e 's/ *Copyright .*//'`
33676     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33677         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33678   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33679     # clang --version output typically looks like
33680     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33681     #    clang version 3.3 (tags/RELEASE_33/final)
33682     # or
33683     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33684     #    Target: x86_64-pc-linux-gnu
33685     #    Thread model: posix
33686     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33687     # Check that this is likely to be clang
33688     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33689     if test $? -ne 0; then
33690       { $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
33691 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33692       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33693 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33694       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33695     fi
33696     # Collapse compiler output into a single line
33697     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33698     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33699         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33700   else
33701       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33702   fi
33703   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33704   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33705   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33706   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33707 
33708   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33709 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33710 
33711 
33712   # Now that we have resolved CC ourself, let autoconf have its go at it
33713   ac_ext=c
33714 ac_cpp='$CPP $CPPFLAGS'
33715 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33716 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33717 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33718 if test -n "$ac_tool_prefix"; then
33719   for ac_prog in $CC
33720   do
33721     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33722 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33724 $as_echo_n "checking for $ac_word... " >&6; }
33725 if ${ac_cv_prog_CC+:} false; then :
33726   $as_echo_n "(cached) " >&6
33727 else
33728   if test -n "$CC"; then
33729   ac_cv_prog_CC="$CC" # Let the user override the test.
33730 else
33731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33732 for as_dir in $PATH
33733 do
33734   IFS=$as_save_IFS
33735   test -z "$as_dir" && as_dir=.
33736     for ac_exec_ext in '' $ac_executable_extensions; do
33737   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33738     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33739     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33740     break 2
33741   fi
33742 done
33743   done
33744 IFS=$as_save_IFS
33745 
33746 fi
33747 fi
33748 CC=$ac_cv_prog_CC
33749 if test -n "$CC"; then
33750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33751 $as_echo "$CC" >&6; }
33752 else
33753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33754 $as_echo "no" >&6; }
33755 fi
33756 
33757 
33758     test -n "$CC" && break
33759   done
33760 fi
33761 if test -z "$CC"; then
33762   ac_ct_CC=$CC
33763   for ac_prog in $CC
33764 do
33765   # Extract the first word of "$ac_prog", so it can be a program name with args.
33766 set dummy $ac_prog; ac_word=$2
33767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33768 $as_echo_n "checking for $ac_word... " >&6; }
33769 if ${ac_cv_prog_ac_ct_CC+:} false; then :
33770   $as_echo_n "(cached) " >&6
33771 else
33772   if test -n "$ac_ct_CC"; then
33773   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33774 else
33775 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33776 for as_dir in $PATH
33777 do
33778   IFS=$as_save_IFS
33779   test -z "$as_dir" && as_dir=.
33780     for ac_exec_ext in '' $ac_executable_extensions; do
33781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33782     ac_cv_prog_ac_ct_CC="$ac_prog"
33783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33784     break 2
33785   fi
33786 done
33787   done
33788 IFS=$as_save_IFS
33789 
33790 fi
33791 fi
33792 ac_ct_CC=$ac_cv_prog_ac_ct_CC
33793 if test -n "$ac_ct_CC"; then
33794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33795 $as_echo "$ac_ct_CC" >&6; }
33796 else
33797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33798 $as_echo "no" >&6; }
33799 fi
33800 
33801 
33802   test -n "$ac_ct_CC" && break
33803 done
33804 
33805   if test "x$ac_ct_CC" = x; then
33806     CC=""
33807   else
33808     case $cross_compiling:$ac_tool_warned in
33809 yes:)
33810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33811 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33812 ac_tool_warned=yes ;;
33813 esac
33814     CC=$ac_ct_CC
33815   fi
33816 fi
33817 
33818 
33819 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33820 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33821 as_fn_error $? "no acceptable C compiler found in \$PATH
33822 See \`config.log' for more details" "$LINENO" 5; }
33823 
33824 # Provide some information about the compiler.
33825 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33826 set X $ac_compile
33827 ac_compiler=$2
33828 for ac_option in --version -v -V -qversion; do
33829   { { ac_try="$ac_compiler $ac_option >&5"
33830 case "(($ac_try" in
33831   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33832   *) ac_try_echo=$ac_try;;
33833 esac
33834 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33835 $as_echo "$ac_try_echo"; } >&5
33836   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33837   ac_status=$?
33838   if test -s conftest.err; then
33839     sed '10a\
33840 ... rest of stderr output deleted ...
33841          10q' conftest.err >conftest.er1
33842     cat conftest.er1 >&5
33843   fi
33844   rm -f conftest.er1 conftest.err
33845   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33846   test $ac_status = 0; }
33847 done
33848 
33849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33850 /* end confdefs.h.  */
33851 
33852 int
33853 main ()
33854 {
33855 
33856   ;
33857   return 0;
33858 }
33859 _ACEOF
33860 ac_clean_files_save=$ac_clean_files
33861 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33862 # Try to create an executable without -o first, disregard a.out.
33863 # It will help us diagnose broken compilers, and finding out an intuition
33864 # of exeext.
33865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33866 $as_echo_n "checking whether the C compiler works... " >&6; }
33867 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33868 
33869 # The possible output files:
33870 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33871 
33872 ac_rmfiles=
33873 for ac_file in $ac_files
33874 do
33875   case $ac_file in
33876     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33877     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33878   esac
33879 done
33880 rm -f $ac_rmfiles
33881 
33882 if { { ac_try="$ac_link_default"
33883 case "(($ac_try" in
33884   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33885   *) ac_try_echo=$ac_try;;
33886 esac
33887 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33888 $as_echo "$ac_try_echo"; } >&5
33889   (eval "$ac_link_default") 2>&5
33890   ac_status=$?
33891   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33892   test $ac_status = 0; }; then :
33893   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33894 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33895 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
33896 # so that the user can short-circuit this test for compilers unknown to
33897 # Autoconf.
33898 for ac_file in $ac_files ''
33899 do
33900   test -f "$ac_file" || continue
33901   case $ac_file in
33902     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33903         ;;
33904     [ab].out )
33905         # We found the default executable, but exeext='' is most
33906         # certainly right.
33907         break;;
33908     *.* )
33909         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33910         then :; else
33911            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33912         fi
33913         # We set ac_cv_exeext here because the later test for it is not
33914         # safe: cross compilers may not add the suffix if given an `-o'
33915         # argument, so we may need to know it at that point already.
33916         # Even if this section looks crufty: it has the advantage of
33917         # actually working.
33918         break;;
33919     * )
33920         break;;
33921   esac
33922 done
33923 test "$ac_cv_exeext" = no && ac_cv_exeext=
33924 
33925 else
33926   ac_file=''
33927 fi
33928 if test -z "$ac_file"; then :
33929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33930 $as_echo "no" >&6; }
33931 $as_echo "$as_me: failed program was:" >&5
33932 sed 's/^/| /' conftest.$ac_ext >&5
33933 
33934 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33935 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33936 as_fn_error 77 "C compiler cannot create executables
33937 See \`config.log' for more details" "$LINENO" 5; }
33938 else
33939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33940 $as_echo "yes" >&6; }
33941 fi
33942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33943 $as_echo_n "checking for C compiler default output file name... " >&6; }
33944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33945 $as_echo "$ac_file" >&6; }
33946 ac_exeext=$ac_cv_exeext
33947 
33948 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33949 ac_clean_files=$ac_clean_files_save
33950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33951 $as_echo_n "checking for suffix of executables... " >&6; }
33952 if { { ac_try="$ac_link"
33953 case "(($ac_try" in
33954   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33955   *) ac_try_echo=$ac_try;;
33956 esac
33957 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33958 $as_echo "$ac_try_echo"; } >&5
33959   (eval "$ac_link") 2>&5
33960   ac_status=$?
33961   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33962   test $ac_status = 0; }; then :
33963   # If both `conftest.exe' and `conftest' are `present' (well, observable)
33964 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33965 # work properly (i.e., refer to `conftest.exe'), while it won't with
33966 # `rm'.
33967 for ac_file in conftest.exe conftest conftest.*; do
33968   test -f "$ac_file" || continue
33969   case $ac_file in
33970     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33971     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33972           break;;
33973     * ) break;;
33974   esac
33975 done
33976 else
33977   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33978 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33979 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33980 See \`config.log' for more details" "$LINENO" 5; }
33981 fi
33982 rm -f conftest conftest$ac_cv_exeext
33983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33984 $as_echo "$ac_cv_exeext" >&6; }
33985 
33986 rm -f conftest.$ac_ext
33987 EXEEXT=$ac_cv_exeext
33988 ac_exeext=$EXEEXT
33989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33990 /* end confdefs.h.  */
33991 #include <stdio.h>
33992 int
33993 main ()
33994 {
33995 FILE *f = fopen ("conftest.out", "w");
33996  return ferror (f) || fclose (f) != 0;
33997 
33998   ;
33999   return 0;
34000 }
34001 _ACEOF
34002 ac_clean_files="$ac_clean_files conftest.out"
34003 # Check that the compiler produces executables we can run.  If not, either
34004 # the compiler is broken, or we cross compile.
34005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34006 $as_echo_n "checking whether we are cross compiling... " >&6; }
34007 if test "$cross_compiling" != yes; then
34008   { { ac_try="$ac_link"
34009 case "(($ac_try" in
34010   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34011   *) ac_try_echo=$ac_try;;
34012 esac
34013 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34014 $as_echo "$ac_try_echo"; } >&5
34015   (eval "$ac_link") 2>&5
34016   ac_status=$?
34017   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34018   test $ac_status = 0; }
34019   if { ac_try='./conftest$ac_cv_exeext'
34020   { { case "(($ac_try" in
34021   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34022   *) ac_try_echo=$ac_try;;
34023 esac
34024 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34025 $as_echo "$ac_try_echo"; } >&5
34026   (eval "$ac_try") 2>&5
34027   ac_status=$?
34028   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34029   test $ac_status = 0; }; }; then
34030     cross_compiling=no
34031   else
34032     if test "$cross_compiling" = maybe; then
34033         cross_compiling=yes
34034     else
34035         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34036 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34037 as_fn_error $? "cannot run C compiled programs.
34038 If you meant to cross compile, use \`--host'.
34039 See \`config.log' for more details" "$LINENO" 5; }
34040     fi
34041   fi
34042 fi
34043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34044 $as_echo "$cross_compiling" >&6; }
34045 
34046 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34047 ac_clean_files=$ac_clean_files_save
34048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34049 $as_echo_n "checking for suffix of object files... " >&6; }
34050 if ${ac_cv_objext+:} false; then :
34051   $as_echo_n "(cached) " >&6
34052 else
34053   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34054 /* end confdefs.h.  */
34055 
34056 int
34057 main ()
34058 {
34059 
34060   ;
34061   return 0;
34062 }
34063 _ACEOF
34064 rm -f conftest.o conftest.obj
34065 if { { ac_try="$ac_compile"
34066 case "(($ac_try" in
34067   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34068   *) ac_try_echo=$ac_try;;
34069 esac
34070 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34071 $as_echo "$ac_try_echo"; } >&5
34072   (eval "$ac_compile") 2>&5
34073   ac_status=$?
34074   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34075   test $ac_status = 0; }; then :
34076   for ac_file in conftest.o conftest.obj conftest.*; do
34077   test -f "$ac_file" || continue;
34078   case $ac_file in
34079     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34080     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34081        break;;
34082   esac
34083 done
34084 else
34085   $as_echo "$as_me: failed program was:" >&5
34086 sed 's/^/| /' conftest.$ac_ext >&5
34087 
34088 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34089 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34090 as_fn_error $? "cannot compute suffix of object files: cannot compile
34091 See \`config.log' for more details" "$LINENO" 5; }
34092 fi
34093 rm -f conftest.$ac_cv_objext conftest.$ac_ext
34094 fi
34095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34096 $as_echo "$ac_cv_objext" >&6; }
34097 OBJEXT=$ac_cv_objext
34098 ac_objext=$OBJEXT
34099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34100 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34101 if ${ac_cv_c_compiler_gnu+:} false; then :
34102   $as_echo_n "(cached) " >&6
34103 else
34104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34105 /* end confdefs.h.  */
34106 
34107 int
34108 main ()
34109 {
34110 #ifndef __GNUC__
34111        choke me
34112 #endif
34113 
34114   ;
34115   return 0;
34116 }
34117 _ACEOF
34118 if ac_fn_c_try_compile "$LINENO"; then :
34119   ac_compiler_gnu=yes
34120 else
34121   ac_compiler_gnu=no
34122 fi
34123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34124 ac_cv_c_compiler_gnu=$ac_compiler_gnu
34125 
34126 fi
34127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34128 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
34129 if test $ac_compiler_gnu = yes; then
34130   GCC=yes
34131 else
34132   GCC=
34133 fi
34134 ac_test_CFLAGS=${CFLAGS+set}
34135 ac_save_CFLAGS=$CFLAGS
34136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34137 $as_echo_n "checking whether $CC accepts -g... " >&6; }
34138 if ${ac_cv_prog_cc_g+:} false; then :
34139   $as_echo_n "(cached) " >&6
34140 else
34141   ac_save_c_werror_flag=$ac_c_werror_flag
34142    ac_c_werror_flag=yes
34143    ac_cv_prog_cc_g=no
34144    CFLAGS="-g"
34145    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34146 /* end confdefs.h.  */
34147 
34148 int
34149 main ()
34150 {
34151 
34152   ;
34153   return 0;
34154 }
34155 _ACEOF
34156 if ac_fn_c_try_compile "$LINENO"; then :
34157   ac_cv_prog_cc_g=yes
34158 else
34159   CFLAGS=""
34160       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34161 /* end confdefs.h.  */
34162 
34163 int
34164 main ()
34165 {
34166 
34167   ;
34168   return 0;
34169 }
34170 _ACEOF
34171 if ac_fn_c_try_compile "$LINENO"; then :
34172 
34173 else
34174   ac_c_werror_flag=$ac_save_c_werror_flag
34175          CFLAGS="-g"
34176          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34177 /* end confdefs.h.  */
34178 
34179 int
34180 main ()
34181 {
34182 
34183   ;
34184   return 0;
34185 }
34186 _ACEOF
34187 if ac_fn_c_try_compile "$LINENO"; then :
34188   ac_cv_prog_cc_g=yes
34189 fi
34190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34191 fi
34192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34193 fi
34194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34195    ac_c_werror_flag=$ac_save_c_werror_flag
34196 fi
34197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34198 $as_echo "$ac_cv_prog_cc_g" >&6; }
34199 if test "$ac_test_CFLAGS" = set; then
34200   CFLAGS=$ac_save_CFLAGS
34201 elif test $ac_cv_prog_cc_g = yes; then
34202   if test "$GCC" = yes; then
34203     CFLAGS="-g -O2"
34204   else
34205     CFLAGS="-g"
34206   fi
34207 else
34208   if test "$GCC" = yes; then
34209     CFLAGS="-O2"
34210   else
34211     CFLAGS=
34212   fi
34213 fi
34214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34215 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34216 if ${ac_cv_prog_cc_c89+:} false; then :
34217   $as_echo_n "(cached) " >&6
34218 else
34219   ac_cv_prog_cc_c89=no
34220 ac_save_CC=$CC
34221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34222 /* end confdefs.h.  */
34223 #include <stdarg.h>
34224 #include <stdio.h>
34225 struct stat;
34226 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34227 struct buf { int x; };
34228 FILE * (*rcsopen) (struct buf *, struct stat *, int);
34229 static char *e (p, i)
34230      char **p;
34231      int i;
34232 {
34233   return p[i];
34234 }
34235 static char *f (char * (*g) (char **, int), char **p, ...)
34236 {
34237   char *s;
34238   va_list v;
34239   va_start (v,p);
34240   s = g (p, va_arg (v,int));
34241   va_end (v);
34242   return s;
34243 }
34244 
34245 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34246    function prototypes and stuff, but not '\xHH' hex character constants.
34247    These don't provoke an error unfortunately, instead are silently treated
34248    as 'x'.  The following induces an error, until -std is added to get
34249    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34250    array size at least.  It's necessary to write '\x00'==0 to get something
34251    that's true only with -std.  */
34252 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34253 
34254 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34255    inside strings and character constants.  */
34256 #define FOO(x) 'x'
34257 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34258 
34259 int test (int i, double x);
34260 struct s1 {int (*f) (int a);};
34261 struct s2 {int (*f) (double a);};
34262 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34263 int argc;
34264 char **argv;
34265 int
34266 main ()
34267 {
34268 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34269   ;
34270   return 0;
34271 }
34272 _ACEOF
34273 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34274         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34275 do
34276   CC="$ac_save_CC $ac_arg"
34277   if ac_fn_c_try_compile "$LINENO"; then :
34278   ac_cv_prog_cc_c89=$ac_arg
34279 fi
34280 rm -f core conftest.err conftest.$ac_objext
34281   test "x$ac_cv_prog_cc_c89" != "xno" && break
34282 done
34283 rm -f conftest.$ac_ext
34284 CC=$ac_save_CC
34285 
34286 fi
34287 # AC_CACHE_VAL
34288 case "x$ac_cv_prog_cc_c89" in
34289   x)
34290     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34291 $as_echo "none needed" >&6; } ;;
34292   xno)
34293     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34294 $as_echo "unsupported" >&6; } ;;
34295   *)
34296     CC="$CC $ac_cv_prog_cc_c89"
34297     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34298 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34299 esac
34300 if test "x$ac_cv_prog_cc_c89" != xno; then :
34301 
34302 fi
34303 
34304 ac_ext=cpp
34305 ac_cpp='$CXXCPP $CPPFLAGS'
34306 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34307 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34308 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34309 
34310 
34311 
34312   COMPILER_NAME=C++
34313   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34314 
34315   if test "x$CXX" != x; then
34316     # User has supplied compiler name already, always let that override.
34317     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34318 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34319     if test "x`basename $CXX`" = "x$CXX"; then
34320       # A command without a complete path is provided, search $PATH.
34321 
34322       for ac_prog in $CXX
34323 do
34324   # Extract the first word of "$ac_prog", so it can be a program name with args.
34325 set dummy $ac_prog; ac_word=$2
34326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34327 $as_echo_n "checking for $ac_word... " >&6; }
34328 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34329   $as_echo_n "(cached) " >&6
34330 else
34331   case $POTENTIAL_CXX in
34332   [\\/]* | ?:[\\/]*)
34333   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34334   ;;
34335   *)
34336   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34337 for as_dir in $PATH
34338 do
34339   IFS=$as_save_IFS
34340   test -z "$as_dir" && as_dir=.
34341     for ac_exec_ext in '' $ac_executable_extensions; do
34342   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34343     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34344     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34345     break 2
34346   fi
34347 done
34348   done
34349 IFS=$as_save_IFS
34350 
34351   ;;
34352 esac
34353 fi
34354 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34355 if test -n "$POTENTIAL_CXX"; then
34356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34357 $as_echo "$POTENTIAL_CXX" >&6; }
34358 else
34359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34360 $as_echo "no" >&6; }
34361 fi
34362 
34363 
34364   test -n "$POTENTIAL_CXX" && break
34365 done
34366 
34367       if test "x$POTENTIAL_CXX" != x; then
34368         CXX=$POTENTIAL_CXX
34369       else
34370         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34371       fi
34372     else
34373       # Otherwise it might already be a complete path
34374       if test ! -x "$CXX"; then
34375         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34376       fi
34377     fi
34378   else
34379     # No user supplied value. Locate compiler ourselves.
34380 
34381     # If we are cross compiling, assume cross compilation tools follows the
34382     # cross compilation standard where they are prefixed with the autoconf
34383     # standard name for the target. For example the binary
34384     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34385     # If we are not cross compiling, then the default compiler name will be
34386     # used.
34387 
34388     CXX=
34389     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34390     # before checking the rest of the PATH.
34391     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34392     # step, this should not be necessary.
34393     if test -n "$TOOLCHAIN_PATH"; then
34394       PATH_save="$PATH"
34395       PATH="$TOOLCHAIN_PATH"
34396       for ac_prog in $SEARCH_LIST
34397 do
34398   # Extract the first word of "$ac_prog", so it can be a program name with args.
34399 set dummy $ac_prog; ac_word=$2
34400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34401 $as_echo_n "checking for $ac_word... " >&6; }
34402 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34403   $as_echo_n "(cached) " >&6
34404 else
34405   case $TOOLCHAIN_PATH_CXX in
34406   [\\/]* | ?:[\\/]*)
34407   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34408   ;;
34409   *)
34410   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34411 for as_dir in $PATH
34412 do
34413   IFS=$as_save_IFS
34414   test -z "$as_dir" && as_dir=.
34415     for ac_exec_ext in '' $ac_executable_extensions; do
34416   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34417     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34419     break 2
34420   fi
34421 done
34422   done
34423 IFS=$as_save_IFS
34424 
34425   ;;
34426 esac
34427 fi
34428 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34429 if test -n "$TOOLCHAIN_PATH_CXX"; then
34430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34431 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34432 else
34433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34434 $as_echo "no" >&6; }
34435 fi
34436 
34437 
34438   test -n "$TOOLCHAIN_PATH_CXX" && break
34439 done
34440 
34441       CXX=$TOOLCHAIN_PATH_CXX
34442       PATH="$PATH_save"
34443     fi
34444 
34445     # AC_PATH_PROGS can't be run multiple times with the same variable,
34446     # so create a new name for this run.
34447     if test "x$CXX" = x; then
34448       for ac_prog in $SEARCH_LIST
34449 do
34450   # Extract the first word of "$ac_prog", so it can be a program name with args.
34451 set dummy $ac_prog; ac_word=$2
34452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34453 $as_echo_n "checking for $ac_word... " >&6; }
34454 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34455   $as_echo_n "(cached) " >&6
34456 else
34457   case $POTENTIAL_CXX in
34458   [\\/]* | ?:[\\/]*)
34459   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34460   ;;
34461   *)
34462   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34463 for as_dir in $PATH
34464 do
34465   IFS=$as_save_IFS
34466   test -z "$as_dir" && as_dir=.
34467     for ac_exec_ext in '' $ac_executable_extensions; do
34468   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34469     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34470     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34471     break 2
34472   fi
34473 done
34474   done
34475 IFS=$as_save_IFS
34476 
34477   ;;
34478 esac
34479 fi
34480 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34481 if test -n "$POTENTIAL_CXX"; then
34482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34483 $as_echo "$POTENTIAL_CXX" >&6; }
34484 else
34485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34486 $as_echo "no" >&6; }
34487 fi
34488 
34489 
34490   test -n "$POTENTIAL_CXX" && break
34491 done
34492 
34493       CXX=$POTENTIAL_CXX
34494     fi
34495 
34496     if test "x$CXX" = x; then
34497 
34498   # Print a helpful message on how to acquire the necessary build dependency.
34499   # devkit is the help tag: freetype, cups, alsa etc
34500   MISSING_DEPENDENCY=devkit
34501 
34502   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34503     cygwin_help $MISSING_DEPENDENCY
34504   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34505     msys_help $MISSING_DEPENDENCY
34506   else
34507     PKGHANDLER_COMMAND=
34508 
34509     case $PKGHANDLER in
34510       apt-get)
34511         apt_help     $MISSING_DEPENDENCY ;;
34512       yum)
34513         yum_help     $MISSING_DEPENDENCY ;;
34514       port)
34515         port_help    $MISSING_DEPENDENCY ;;
34516       pkgutil)
34517         pkgutil_help $MISSING_DEPENDENCY ;;
34518       pkgadd)
34519         pkgadd_help  $MISSING_DEPENDENCY ;;
34520     esac
34521 
34522     if test "x$PKGHANDLER_COMMAND" != x; then
34523       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34524     fi
34525   fi
34526 
34527       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34528     fi
34529   fi
34530 
34531   # Now we have a compiler binary in CXX. Make sure it's okay.
34532 
34533   # Only process if variable expands to non-empty
34534 
34535   if test "x$CXX" != x; then
34536     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34537 
34538   # First separate the path from the arguments. This will split at the first
34539   # space.
34540   complete="$CXX"
34541   path="${complete%% *}"
34542   tmp="$complete EOL"
34543   arguments="${tmp#* }"
34544 
34545   # Input might be given as Windows format, start by converting to
34546   # unix format.
34547   new_path=`$CYGPATH -u "$path"`
34548 
34549   # Now try to locate executable using which
34550   new_path=`$WHICH "$new_path" 2> /dev/null`
34551   # bat and cmd files are not always considered executable in cygwin causing which
34552   # to not find them
34553   if test "x$new_path" = x \
34554       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34555       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34556     new_path=`$CYGPATH -u "$path"`
34557   fi
34558   if test "x$new_path" = x; then
34559     # Oops. Which didn't find the executable.
34560     # The splitting of arguments from the executable at a space might have been incorrect,
34561     # since paths with space are more likely in Windows. Give it another try with the whole
34562     # argument.
34563     path="$complete"
34564     arguments="EOL"
34565     new_path=`$CYGPATH -u "$path"`
34566     new_path=`$WHICH "$new_path" 2> /dev/null`
34567     # bat and cmd files are not always considered executable in cygwin causing which
34568     # to not find them
34569     if test "x$new_path" = x \
34570         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34571         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34572       new_path=`$CYGPATH -u "$path"`
34573     fi
34574     if test "x$new_path" = x; then
34575       # It's still not found. Now this is an unrecoverable error.
34576       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34577 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34578       has_space=`$ECHO "$complete" | $GREP " "`
34579       if test "x$has_space" != x; then
34580         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34581 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34582       fi
34583       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34584     fi
34585   fi
34586 
34587   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34588   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34589   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34590   # "foo.exe" is OK but "foo" is an error.
34591   #
34592   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34593   # It is also a way to make sure we got the proper file name for the real test later on.
34594   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34595   if test "x$test_shortpath" = x; then
34596     # Short path failed, file does not exist as specified.
34597     # Try adding .exe or .cmd
34598     if test -f "${new_path}.exe"; then
34599       input_to_shortpath="${new_path}.exe"
34600     elif test -f "${new_path}.cmd"; then
34601       input_to_shortpath="${new_path}.cmd"
34602     else
34603       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34604 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34605       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34606 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34607       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34608     fi
34609   else
34610     input_to_shortpath="$new_path"
34611   fi
34612 
34613   # Call helper function which possibly converts this using DOS-style short mode.
34614   # If so, the updated path is stored in $new_path.
34615   new_path="$input_to_shortpath"
34616 
34617   input_path="$input_to_shortpath"
34618   # Check if we need to convert this using DOS-style short mode. If the path
34619   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34620   # take no chances and rewrite it.
34621   # Note: m4 eats our [], so we need to use [ and ] instead.
34622   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34623   if test "x$has_forbidden_chars" != x; then
34624     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34625     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34626     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34627     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34628       # Going to short mode and back again did indeed matter. Since short mode is
34629       # case insensitive, let's make it lowercase to improve readability.
34630       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34631       # Now convert it back to Unix-style (cygpath)
34632       input_path=`$CYGPATH -u "$shortmode_path"`
34633       new_path="$input_path"
34634     fi
34635   fi
34636 
34637   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34638   if test "x$test_cygdrive_prefix" = x; then
34639     # As a simple fix, exclude /usr/bin since it's not a real path.
34640     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34641       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34642       # a path prefixed by /cygdrive for fixpath to work.
34643       new_path="$CYGWIN_ROOT_PATH$input_path"
34644     fi
34645   fi
34646 
34647   # remove trailing .exe if any
34648   new_path="${new_path/%.exe/}"
34649 
34650     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34651 
34652   # First separate the path from the arguments. This will split at the first
34653   # space.
34654   complete="$CXX"
34655   path="${complete%% *}"
34656   tmp="$complete EOL"
34657   arguments="${tmp#* }"
34658 
34659   # Input might be given as Windows format, start by converting to
34660   # unix format.
34661   new_path="$path"
34662 
34663   windows_path="$new_path"
34664   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34665     unix_path=`$CYGPATH -u "$windows_path"`
34666     new_path="$unix_path"
34667   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34668     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34669     new_path="$unix_path"
34670   fi
34671 
34672 
34673   # Now try to locate executable using which
34674   new_path=`$WHICH "$new_path" 2> /dev/null`
34675 
34676   if test "x$new_path" = x; then
34677     # Oops. Which didn't find the executable.
34678     # The splitting of arguments from the executable at a space might have been incorrect,
34679     # since paths with space are more likely in Windows. Give it another try with the whole
34680     # argument.
34681     path="$complete"
34682     arguments="EOL"
34683     new_path="$path"
34684 
34685   windows_path="$new_path"
34686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34687     unix_path=`$CYGPATH -u "$windows_path"`
34688     new_path="$unix_path"
34689   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34690     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34691     new_path="$unix_path"
34692   fi
34693 
34694 
34695     new_path=`$WHICH "$new_path" 2> /dev/null`
34696     # bat and cmd files are not always considered executable in MSYS causing which
34697     # to not find them
34698     if test "x$new_path" = x \
34699         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34700         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34701       new_path="$path"
34702 
34703   windows_path="$new_path"
34704   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34705     unix_path=`$CYGPATH -u "$windows_path"`
34706     new_path="$unix_path"
34707   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34708     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34709     new_path="$unix_path"
34710   fi
34711 
34712     fi
34713 
34714     if test "x$new_path" = x; then
34715       # It's still not found. Now this is an unrecoverable error.
34716       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34717 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34718       has_space=`$ECHO "$complete" | $GREP " "`
34719       if test "x$has_space" != x; then
34720         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34721 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34722       fi
34723       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34724     fi
34725   fi
34726 
34727   # Now new_path has a complete unix path to the binary
34728   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34729     # Keep paths in /bin as-is, but remove trailing .exe if any
34730     new_path="${new_path/%.exe/}"
34731     # Do not save /bin paths to all_fixpath_prefixes!
34732   else
34733     # Not in mixed or Windows style, start by that.
34734     new_path=`cmd //c echo $new_path`
34735 
34736   input_path="$new_path"
34737   # Check if we need to convert this using DOS-style short mode. If the path
34738   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34739   # take no chances and rewrite it.
34740   # Note: m4 eats our [], so we need to use [ and ] instead.
34741   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34742   if test "x$has_forbidden_chars" != x; then
34743     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34744     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34745   fi
34746 
34747     # Output is in $new_path
34748 
34749   windows_path="$new_path"
34750   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34751     unix_path=`$CYGPATH -u "$windows_path"`
34752     new_path="$unix_path"
34753   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34754     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34755     new_path="$unix_path"
34756   fi
34757 
34758     # remove trailing .exe if any
34759     new_path="${new_path/%.exe/}"
34760 
34761     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34762     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34763   fi
34764 
34765     else
34766       # We're on a unix platform. Hooray! :)
34767       # First separate the path from the arguments. This will split at the first
34768       # space.
34769       complete="$CXX"
34770       path="${complete%% *}"
34771       tmp="$complete EOL"
34772       arguments="${tmp#* }"
34773 
34774       # Cannot rely on the command "which" here since it doesn't always work.
34775       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34776       if test -z "$is_absolute_path"; then
34777         # Path to executable is not absolute. Find it.
34778         IFS_save="$IFS"
34779         IFS=:
34780         for p in $PATH; do
34781           if test -f "$p/$path" && test -x "$p/$path"; then
34782             new_path="$p/$path"
34783             break
34784           fi
34785         done
34786         IFS="$IFS_save"
34787       else
34788         # This is an absolute path, we can use it without further modifications.
34789         new_path="$path"
34790       fi
34791 
34792       if test "x$new_path" = x; then
34793         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34794 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34795         has_space=`$ECHO "$complete" | $GREP " "`
34796         if test "x$has_space" != x; then
34797           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34798 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34799         fi
34800         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34801       fi
34802     fi
34803 
34804     # Now join together the path and the arguments once again
34805     if test "x$arguments" != xEOL; then
34806       new_complete="$new_path ${arguments% *}"
34807     else
34808       new_complete="$new_path"
34809     fi
34810 
34811     if test "x$complete" != "x$new_complete"; then
34812       CXX="$new_complete"
34813       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34814 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34815     fi
34816   fi
34817 
34818   TEST_COMPILER="$CXX"
34819 
34820   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34821 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34822   SYMLINK_ORIGINAL="$TEST_COMPILER"
34823 
34824   if test "x$OPENJDK_BUILD_OS" != xwindows; then
34825     # Follow a chain of symbolic links. Use readlink
34826     # where it exists, else fall back to horribly
34827     # complicated shell code.
34828     if test "x$READLINK_TESTED" != yes; then
34829       # On MacOSX there is a readlink tool with a different
34830       # purpose than the GNU readlink tool. Check the found readlink.
34831       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34832       if test "x$ISGNU" = x; then
34833         # A readlink that we do not know how to use.
34834         # Are there other non-GNU readlinks out there?
34835         READLINK_TESTED=yes
34836         READLINK=
34837       fi
34838     fi
34839 
34840     if test "x$READLINK" != x; then
34841       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34842     else
34843       # Save the current directory for restoring afterwards
34844       STARTDIR=$PWD
34845       COUNTER=0
34846       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34847       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34848       cd $sym_link_dir
34849       # Use -P flag to resolve symlinks in directories.
34850       cd `$THEPWDCMD -P`
34851       sym_link_dir=`$THEPWDCMD -P`
34852       # Resolve file symlinks
34853       while test $COUNTER -lt 20; do
34854         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34855         if test "x$ISLINK" == x; then
34856           # This is not a symbolic link! We are done!
34857           break
34858         fi
34859         # Again resolve directory symlinks since the target of the just found
34860         # link could be in a different directory
34861         cd `$DIRNAME $ISLINK`
34862         sym_link_dir=`$THEPWDCMD -P`
34863         sym_link_file=`$BASENAME $ISLINK`
34864         let COUNTER=COUNTER+1
34865       done
34866       cd $STARTDIR
34867       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34868     fi
34869   fi
34870 
34871   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34872     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34873 $as_echo "no symlink" >&6; }
34874   else
34875     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34876 $as_echo "$SYMLINK_ORIGINAL" >&6; }
34877 
34878     # We can't handle ccache by gcc wrappers, since we need to know if we're
34879     # using ccache. Instead ccache usage must be controlled by a configure option.
34880     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34881     if test "x$COMPILER_BASENAME" = "xccache"; then
34882       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34883 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34884       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34885     fi
34886   fi
34887 
34888 
34889   COMPILER=$CXX
34890   COMPILER_NAME=$COMPILER_NAME
34891 
34892   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34893     # cc -V output typically looks like
34894     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34895     # or
34896     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34897     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34898     # Check that this is likely to be the Solaris Studio cc.
34899     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34900     if test $? -ne 0; then
34901       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34902       { $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
34903 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34904       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34905 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34906       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34907 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34908       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34909     fi
34910     # Remove usage instructions (if present), and
34911     # collapse compiler output into a single line
34912     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34913         $SED -e 's/ *[Uu]sage:.*//'`
34914     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34915         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34916   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34917     # xlc -qversion output typically looks like
34918     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34919     #     Version: 11.01.0000.0015
34920     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34921     # Check that this is likely to be the IBM XL C compiler.
34922     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34923     if test $? -ne 0; then
34924       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34925       { $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
34926 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34927       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34928 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34929       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34930 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34931       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34932     fi
34933     # Collapse compiler output into a single line
34934     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34935     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34936         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34937   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34938     # There is no specific version flag, but all output starts with a version string.
34939     # First line typically looks something like:
34940     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34941     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34942     # Check that this is likely to be Microsoft CL.EXE.
34943     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34944     if test $? -ne 0; then
34945       { $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
34946 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34947       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34948 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34949       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34950     fi
34951     # Collapse compiler output into a single line
34952     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34953     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34954         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34955   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34956     # gcc --version output typically looks like
34957     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34958     #     Copyright (C) 2013 Free Software Foundation, Inc.
34959     #     This is free software; see the source for copying conditions.  There is NO
34960     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34961     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34962     # Check that this is likely to be GCC.
34963     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34964     if test $? -ne 0; then
34965       { $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
34966 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34967       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34968 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34969       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34970     fi
34971     # Remove Copyright and legalese from version string, and
34972     # collapse into a single line
34973     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34974         $SED -e 's/ *Copyright .*//'`
34975     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34976         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34977   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34978     # clang --version output typically looks like
34979     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34980     #    clang version 3.3 (tags/RELEASE_33/final)
34981     # or
34982     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34983     #    Target: x86_64-pc-linux-gnu
34984     #    Thread model: posix
34985     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34986     # Check that this is likely to be clang
34987     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34988     if test $? -ne 0; then
34989       { $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
34990 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34991       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34992 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34993       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34994     fi
34995     # Collapse compiler output into a single line
34996     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34997     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34998         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34999   else
35000       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35001   fi
35002   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35003   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35004   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35005   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35006 
35007   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35008 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35009 
35010 
35011   # Now that we have resolved CXX ourself, let autoconf have its go at it
35012   ac_ext=cpp
35013 ac_cpp='$CXXCPP $CPPFLAGS'
35014 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35015 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35016 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35017 if test -z "$CXX"; then
35018   if test -n "$CCC"; then
35019     CXX=$CCC
35020   else
35021     if test -n "$ac_tool_prefix"; then
35022   for ac_prog in $CXX
35023   do
35024     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35025 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35027 $as_echo_n "checking for $ac_word... " >&6; }
35028 if ${ac_cv_prog_CXX+:} false; then :
35029   $as_echo_n "(cached) " >&6
35030 else
35031   if test -n "$CXX"; then
35032   ac_cv_prog_CXX="$CXX" # Let the user override the test.
35033 else
35034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35035 for as_dir in $PATH
35036 do
35037   IFS=$as_save_IFS
35038   test -z "$as_dir" && as_dir=.
35039     for ac_exec_ext in '' $ac_executable_extensions; do
35040   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35041     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35042     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35043     break 2
35044   fi
35045 done
35046   done
35047 IFS=$as_save_IFS
35048 
35049 fi
35050 fi
35051 CXX=$ac_cv_prog_CXX
35052 if test -n "$CXX"; then
35053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35054 $as_echo "$CXX" >&6; }
35055 else
35056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35057 $as_echo "no" >&6; }
35058 fi
35059 
35060 
35061     test -n "$CXX" && break
35062   done
35063 fi
35064 if test -z "$CXX"; then
35065   ac_ct_CXX=$CXX
35066   for ac_prog in $CXX
35067 do
35068   # Extract the first word of "$ac_prog", so it can be a program name with args.
35069 set dummy $ac_prog; ac_word=$2
35070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35071 $as_echo_n "checking for $ac_word... " >&6; }
35072 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35073   $as_echo_n "(cached) " >&6
35074 else
35075   if test -n "$ac_ct_CXX"; then
35076   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35077 else
35078 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35079 for as_dir in $PATH
35080 do
35081   IFS=$as_save_IFS
35082   test -z "$as_dir" && as_dir=.
35083     for ac_exec_ext in '' $ac_executable_extensions; do
35084   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35085     ac_cv_prog_ac_ct_CXX="$ac_prog"
35086     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35087     break 2
35088   fi
35089 done
35090   done
35091 IFS=$as_save_IFS
35092 
35093 fi
35094 fi
35095 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35096 if test -n "$ac_ct_CXX"; then
35097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35098 $as_echo "$ac_ct_CXX" >&6; }
35099 else
35100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35101 $as_echo "no" >&6; }
35102 fi
35103 
35104 
35105   test -n "$ac_ct_CXX" && break
35106 done
35107 
35108   if test "x$ac_ct_CXX" = x; then
35109     CXX="g++"
35110   else
35111     case $cross_compiling:$ac_tool_warned in
35112 yes:)
35113 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35114 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35115 ac_tool_warned=yes ;;
35116 esac
35117     CXX=$ac_ct_CXX
35118   fi
35119 fi
35120 
35121   fi
35122 fi
35123 # Provide some information about the compiler.
35124 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35125 set X $ac_compile
35126 ac_compiler=$2
35127 for ac_option in --version -v -V -qversion; do
35128   { { ac_try="$ac_compiler $ac_option >&5"
35129 case "(($ac_try" in
35130   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35131   *) ac_try_echo=$ac_try;;
35132 esac
35133 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35134 $as_echo "$ac_try_echo"; } >&5
35135   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35136   ac_status=$?
35137   if test -s conftest.err; then
35138     sed '10a\
35139 ... rest of stderr output deleted ...
35140          10q' conftest.err >conftest.er1
35141     cat conftest.er1 >&5
35142   fi
35143   rm -f conftest.er1 conftest.err
35144   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35145   test $ac_status = 0; }
35146 done
35147 
35148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35149 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35150 if ${ac_cv_cxx_compiler_gnu+:} false; then :
35151   $as_echo_n "(cached) " >&6
35152 else
35153   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35154 /* end confdefs.h.  */
35155 
35156 int
35157 main ()
35158 {
35159 #ifndef __GNUC__
35160        choke me
35161 #endif
35162 
35163   ;
35164   return 0;
35165 }
35166 _ACEOF
35167 if ac_fn_cxx_try_compile "$LINENO"; then :
35168   ac_compiler_gnu=yes
35169 else
35170   ac_compiler_gnu=no
35171 fi
35172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35173 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35174 
35175 fi
35176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35177 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35178 if test $ac_compiler_gnu = yes; then
35179   GXX=yes
35180 else
35181   GXX=
35182 fi
35183 ac_test_CXXFLAGS=${CXXFLAGS+set}
35184 ac_save_CXXFLAGS=$CXXFLAGS
35185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35186 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
35187 if ${ac_cv_prog_cxx_g+:} false; then :
35188   $as_echo_n "(cached) " >&6
35189 else
35190   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35191    ac_cxx_werror_flag=yes
35192    ac_cv_prog_cxx_g=no
35193    CXXFLAGS="-g"
35194    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35195 /* end confdefs.h.  */
35196 
35197 int
35198 main ()
35199 {
35200 
35201   ;
35202   return 0;
35203 }
35204 _ACEOF
35205 if ac_fn_cxx_try_compile "$LINENO"; then :
35206   ac_cv_prog_cxx_g=yes
35207 else
35208   CXXFLAGS=""
35209       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35210 /* end confdefs.h.  */
35211 
35212 int
35213 main ()
35214 {
35215 
35216   ;
35217   return 0;
35218 }
35219 _ACEOF
35220 if ac_fn_cxx_try_compile "$LINENO"; then :
35221 
35222 else
35223   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35224          CXXFLAGS="-g"
35225          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35226 /* end confdefs.h.  */
35227 
35228 int
35229 main ()
35230 {
35231 
35232   ;
35233   return 0;
35234 }
35235 _ACEOF
35236 if ac_fn_cxx_try_compile "$LINENO"; then :
35237   ac_cv_prog_cxx_g=yes
35238 fi
35239 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35240 fi
35241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35242 fi
35243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35244    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35245 fi
35246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35247 $as_echo "$ac_cv_prog_cxx_g" >&6; }
35248 if test "$ac_test_CXXFLAGS" = set; then
35249   CXXFLAGS=$ac_save_CXXFLAGS
35250 elif test $ac_cv_prog_cxx_g = yes; then
35251   if test "$GXX" = yes; then
35252     CXXFLAGS="-g -O2"
35253   else
35254     CXXFLAGS="-g"
35255   fi
35256 else
35257   if test "$GXX" = yes; then
35258     CXXFLAGS="-O2"
35259   else
35260     CXXFLAGS=
35261   fi
35262 fi
35263 ac_ext=cpp
35264 ac_cpp='$CXXCPP $CPPFLAGS'
35265 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35266 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35267 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35268 
35269 
35270   # This is the compiler version number on the form X.Y[.Z]
35271 
35272 
35273 
35274 
35275   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35276     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35277 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35278     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35279 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35280   fi
35281 
35282   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35283   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35284     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35285 $as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35286   fi
35287 
35288   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35289     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35290 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35291   fi
35292 
35293   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35294 
35295 
35296   if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35297 
35298 
35299 
35300 
35301 
35302 
35303 
35304 
35305 
35306 
35307 
35308 
35309 
35310 
35311 
35312 
35313 
35314 
35315 
35316 
35317 
35318 
35319 
35320 
35321 
35322 
35323 
35324 
35325 
35326 
35327 
35328 
35329 
35330 
35331 
35332 
35333 
35334 
35335 
35336 
35337 
35338 
35339 
35340 
35341 
35342 
35343 
35344 
35345 
35346     # Execute function body
35347 
35348   # Need to assign to a variable since m4 is blocked from modifying parts in [].
35349   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35350 
35351   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35352     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35353   fi
35354 
35355   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35356     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35357   fi
35358 
35359   # Version comparison method inspired by http://stackoverflow.com/a/24067243
35360   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35361 
35362   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35363     :
35364 
35365   else
35366     :
35367 
35368           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
35369 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35370 
35371 
35372   fi
35373 
35374 
35375 
35376 
35377 
35378 
35379 
35380 
35381 
35382 
35383 
35384 
35385 
35386 
35387   fi
35388 
35389   #
35390   # Setup the preprocessor (CPP and CXXCPP)
35391   #
35392   ac_ext=c
35393 ac_cpp='$CPP $CPPFLAGS'
35394 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35395 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35396 ac_compiler_gnu=$ac_cv_c_compiler_gnu
35397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35398 $as_echo_n "checking how to run the C preprocessor... " >&6; }
35399 # On Suns, sometimes $CPP names a directory.
35400 if test -n "$CPP" && test -d "$CPP"; then
35401   CPP=
35402 fi
35403 if test -z "$CPP"; then
35404   if ${ac_cv_prog_CPP+:} false; then :
35405   $as_echo_n "(cached) " >&6
35406 else
35407       # Double quotes because CPP needs to be expanded
35408     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35409     do
35410       ac_preproc_ok=false
35411 for ac_c_preproc_warn_flag in '' yes
35412 do
35413   # Use a header file that comes with gcc, so configuring glibc
35414   # with a fresh cross-compiler works.
35415   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35416   # <limits.h> exists even on freestanding compilers.
35417   # On the NeXT, cc -E runs the code through the compiler's parser,
35418   # not just through cpp. "Syntax error" is here to catch this case.
35419   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35420 /* end confdefs.h.  */
35421 #ifdef __STDC__
35422 # include <limits.h>
35423 #else
35424 # include <assert.h>
35425 #endif
35426                      Syntax error
35427 _ACEOF
35428 if ac_fn_c_try_cpp "$LINENO"; then :
35429 
35430 else
35431   # Broken: fails on valid input.
35432 continue
35433 fi
35434 rm -f conftest.err conftest.i conftest.$ac_ext
35435 
35436   # OK, works on sane cases.  Now check whether nonexistent headers
35437   # can be detected and how.
35438   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35439 /* end confdefs.h.  */
35440 #include <ac_nonexistent.h>
35441 _ACEOF
35442 if ac_fn_c_try_cpp "$LINENO"; then :
35443   # Broken: success on invalid input.
35444 continue
35445 else
35446   # Passes both tests.
35447 ac_preproc_ok=:
35448 break
35449 fi
35450 rm -f conftest.err conftest.i conftest.$ac_ext
35451 
35452 done
35453 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35454 rm -f conftest.i conftest.err conftest.$ac_ext
35455 if $ac_preproc_ok; then :
35456   break
35457 fi
35458 
35459     done
35460     ac_cv_prog_CPP=$CPP
35461 
35462 fi
35463   CPP=$ac_cv_prog_CPP
35464 else
35465   ac_cv_prog_CPP=$CPP
35466 fi
35467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35468 $as_echo "$CPP" >&6; }
35469 ac_preproc_ok=false
35470 for ac_c_preproc_warn_flag in '' yes
35471 do
35472   # Use a header file that comes with gcc, so configuring glibc
35473   # with a fresh cross-compiler works.
35474   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35475   # <limits.h> exists even on freestanding compilers.
35476   # On the NeXT, cc -E runs the code through the compiler's parser,
35477   # not just through cpp. "Syntax error" is here to catch this case.
35478   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35479 /* end confdefs.h.  */
35480 #ifdef __STDC__
35481 # include <limits.h>
35482 #else
35483 # include <assert.h>
35484 #endif
35485                      Syntax error
35486 _ACEOF
35487 if ac_fn_c_try_cpp "$LINENO"; then :
35488 
35489 else
35490   # Broken: fails on valid input.
35491 continue
35492 fi
35493 rm -f conftest.err conftest.i conftest.$ac_ext
35494 
35495   # OK, works on sane cases.  Now check whether nonexistent headers
35496   # can be detected and how.
35497   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35498 /* end confdefs.h.  */
35499 #include <ac_nonexistent.h>
35500 _ACEOF
35501 if ac_fn_c_try_cpp "$LINENO"; then :
35502   # Broken: success on invalid input.
35503 continue
35504 else
35505   # Passes both tests.
35506 ac_preproc_ok=:
35507 break
35508 fi
35509 rm -f conftest.err conftest.i conftest.$ac_ext
35510 
35511 done
35512 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35513 rm -f conftest.i conftest.err conftest.$ac_ext
35514 if $ac_preproc_ok; then :
35515 
35516 else
35517   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35518 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35519 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35520 See \`config.log' for more details" "$LINENO" 5; }
35521 fi
35522 
35523 ac_ext=cpp
35524 ac_cpp='$CXXCPP $CPPFLAGS'
35525 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35526 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35527 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35528 
35529 
35530   # Only process if variable expands to non-empty
35531 
35532   if test "x$CPP" != x; then
35533     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35534 
35535   # First separate the path from the arguments. This will split at the first
35536   # space.
35537   complete="$CPP"
35538   path="${complete%% *}"
35539   tmp="$complete EOL"
35540   arguments="${tmp#* }"
35541 
35542   # Input might be given as Windows format, start by converting to
35543   # unix format.
35544   new_path=`$CYGPATH -u "$path"`
35545 
35546   # Now try to locate executable using which
35547   new_path=`$WHICH "$new_path" 2> /dev/null`
35548   # bat and cmd files are not always considered executable in cygwin causing which
35549   # to not find them
35550   if test "x$new_path" = x \
35551       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35552       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35553     new_path=`$CYGPATH -u "$path"`
35554   fi
35555   if test "x$new_path" = x; then
35556     # Oops. Which didn't find the executable.
35557     # The splitting of arguments from the executable at a space might have been incorrect,
35558     # since paths with space are more likely in Windows. Give it another try with the whole
35559     # argument.
35560     path="$complete"
35561     arguments="EOL"
35562     new_path=`$CYGPATH -u "$path"`
35563     new_path=`$WHICH "$new_path" 2> /dev/null`
35564     # bat and cmd files are not always considered executable in cygwin causing which
35565     # to not find them
35566     if test "x$new_path" = x \
35567         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35568         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35569       new_path=`$CYGPATH -u "$path"`
35570     fi
35571     if test "x$new_path" = x; then
35572       # It's still not found. Now this is an unrecoverable error.
35573       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35574 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35575       has_space=`$ECHO "$complete" | $GREP " "`
35576       if test "x$has_space" != x; then
35577         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35578 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35579       fi
35580       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35581     fi
35582   fi
35583 
35584   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35585   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35586   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35587   # "foo.exe" is OK but "foo" is an error.
35588   #
35589   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35590   # It is also a way to make sure we got the proper file name for the real test later on.
35591   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35592   if test "x$test_shortpath" = x; then
35593     # Short path failed, file does not exist as specified.
35594     # Try adding .exe or .cmd
35595     if test -f "${new_path}.exe"; then
35596       input_to_shortpath="${new_path}.exe"
35597     elif test -f "${new_path}.cmd"; then
35598       input_to_shortpath="${new_path}.cmd"
35599     else
35600       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35601 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35602       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35603 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35604       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35605     fi
35606   else
35607     input_to_shortpath="$new_path"
35608   fi
35609 
35610   # Call helper function which possibly converts this using DOS-style short mode.
35611   # If so, the updated path is stored in $new_path.
35612   new_path="$input_to_shortpath"
35613 
35614   input_path="$input_to_shortpath"
35615   # Check if we need to convert this using DOS-style short mode. If the path
35616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35617   # take no chances and rewrite it.
35618   # Note: m4 eats our [], so we need to use [ and ] instead.
35619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35620   if test "x$has_forbidden_chars" != x; then
35621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35622     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35623     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35624     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35625       # Going to short mode and back again did indeed matter. Since short mode is
35626       # case insensitive, let's make it lowercase to improve readability.
35627       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35628       # Now convert it back to Unix-style (cygpath)
35629       input_path=`$CYGPATH -u "$shortmode_path"`
35630       new_path="$input_path"
35631     fi
35632   fi
35633 
35634   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35635   if test "x$test_cygdrive_prefix" = x; then
35636     # As a simple fix, exclude /usr/bin since it's not a real path.
35637     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35638       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35639       # a path prefixed by /cygdrive for fixpath to work.
35640       new_path="$CYGWIN_ROOT_PATH$input_path"
35641     fi
35642   fi
35643 
35644   # remove trailing .exe if any
35645   new_path="${new_path/%.exe/}"
35646 
35647     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35648 
35649   # First separate the path from the arguments. This will split at the first
35650   # space.
35651   complete="$CPP"
35652   path="${complete%% *}"
35653   tmp="$complete EOL"
35654   arguments="${tmp#* }"
35655 
35656   # Input might be given as Windows format, start by converting to
35657   # unix format.
35658   new_path="$path"
35659 
35660   windows_path="$new_path"
35661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35662     unix_path=`$CYGPATH -u "$windows_path"`
35663     new_path="$unix_path"
35664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35665     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35666     new_path="$unix_path"
35667   fi
35668 
35669 
35670   # Now try to locate executable using which
35671   new_path=`$WHICH "$new_path" 2> /dev/null`
35672 
35673   if test "x$new_path" = x; then
35674     # Oops. Which didn't find the executable.
35675     # The splitting of arguments from the executable at a space might have been incorrect,
35676     # since paths with space are more likely in Windows. Give it another try with the whole
35677     # argument.
35678     path="$complete"
35679     arguments="EOL"
35680     new_path="$path"
35681 
35682   windows_path="$new_path"
35683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35684     unix_path=`$CYGPATH -u "$windows_path"`
35685     new_path="$unix_path"
35686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35688     new_path="$unix_path"
35689   fi
35690 
35691 
35692     new_path=`$WHICH "$new_path" 2> /dev/null`
35693     # bat and cmd files are not always considered executable in MSYS causing which
35694     # to not find them
35695     if test "x$new_path" = x \
35696         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35697         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35698       new_path="$path"
35699 
35700   windows_path="$new_path"
35701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35702     unix_path=`$CYGPATH -u "$windows_path"`
35703     new_path="$unix_path"
35704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35706     new_path="$unix_path"
35707   fi
35708 
35709     fi
35710 
35711     if test "x$new_path" = x; then
35712       # It's still not found. Now this is an unrecoverable error.
35713       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35714 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35715       has_space=`$ECHO "$complete" | $GREP " "`
35716       if test "x$has_space" != x; then
35717         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35718 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35719       fi
35720       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35721     fi
35722   fi
35723 
35724   # Now new_path has a complete unix path to the binary
35725   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35726     # Keep paths in /bin as-is, but remove trailing .exe if any
35727     new_path="${new_path/%.exe/}"
35728     # Do not save /bin paths to all_fixpath_prefixes!
35729   else
35730     # Not in mixed or Windows style, start by that.
35731     new_path=`cmd //c echo $new_path`
35732 
35733   input_path="$new_path"
35734   # Check if we need to convert this using DOS-style short mode. If the path
35735   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35736   # take no chances and rewrite it.
35737   # Note: m4 eats our [], so we need to use [ and ] instead.
35738   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35739   if test "x$has_forbidden_chars" != x; then
35740     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35741     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35742   fi
35743 
35744     # Output is in $new_path
35745 
35746   windows_path="$new_path"
35747   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35748     unix_path=`$CYGPATH -u "$windows_path"`
35749     new_path="$unix_path"
35750   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35751     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35752     new_path="$unix_path"
35753   fi
35754 
35755     # remove trailing .exe if any
35756     new_path="${new_path/%.exe/}"
35757 
35758     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35759     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35760   fi
35761 
35762     else
35763       # We're on a unix platform. Hooray! :)
35764       # First separate the path from the arguments. This will split at the first
35765       # space.
35766       complete="$CPP"
35767       path="${complete%% *}"
35768       tmp="$complete EOL"
35769       arguments="${tmp#* }"
35770 
35771       # Cannot rely on the command "which" here since it doesn't always work.
35772       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35773       if test -z "$is_absolute_path"; then
35774         # Path to executable is not absolute. Find it.
35775         IFS_save="$IFS"
35776         IFS=:
35777         for p in $PATH; do
35778           if test -f "$p/$path" && test -x "$p/$path"; then
35779             new_path="$p/$path"
35780             break
35781           fi
35782         done
35783         IFS="$IFS_save"
35784       else
35785         # This is an absolute path, we can use it without further modifications.
35786         new_path="$path"
35787       fi
35788 
35789       if test "x$new_path" = x; then
35790         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35791 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35792         has_space=`$ECHO "$complete" | $GREP " "`
35793         if test "x$has_space" != x; then
35794           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35795 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35796         fi
35797         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35798       fi
35799     fi
35800 
35801     # Now join together the path and the arguments once again
35802     if test "x$arguments" != xEOL; then
35803       new_complete="$new_path ${arguments% *}"
35804     else
35805       new_complete="$new_path"
35806     fi
35807 
35808     if test "x$complete" != "x$new_complete"; then
35809       CPP="$new_complete"
35810       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35811 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35812     fi
35813   fi
35814 
35815   ac_ext=cpp
35816 ac_cpp='$CXXCPP $CPPFLAGS'
35817 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35818 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35819 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35821 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35822 if test -z "$CXXCPP"; then
35823   if ${ac_cv_prog_CXXCPP+:} false; then :
35824   $as_echo_n "(cached) " >&6
35825 else
35826       # Double quotes because CXXCPP needs to be expanded
35827     for CXXCPP in "$CXX -E" "/lib/cpp"
35828     do
35829       ac_preproc_ok=false
35830 for ac_cxx_preproc_warn_flag in '' yes
35831 do
35832   # Use a header file that comes with gcc, so configuring glibc
35833   # with a fresh cross-compiler works.
35834   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35835   # <limits.h> exists even on freestanding compilers.
35836   # On the NeXT, cc -E runs the code through the compiler's parser,
35837   # not just through cpp. "Syntax error" is here to catch this case.
35838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35839 /* end confdefs.h.  */
35840 #ifdef __STDC__
35841 # include <limits.h>
35842 #else
35843 # include <assert.h>
35844 #endif
35845                      Syntax error
35846 _ACEOF
35847 if ac_fn_cxx_try_cpp "$LINENO"; then :
35848 
35849 else
35850   # Broken: fails on valid input.
35851 continue
35852 fi
35853 rm -f conftest.err conftest.i conftest.$ac_ext
35854 
35855   # OK, works on sane cases.  Now check whether nonexistent headers
35856   # can be detected and how.
35857   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35858 /* end confdefs.h.  */
35859 #include <ac_nonexistent.h>
35860 _ACEOF
35861 if ac_fn_cxx_try_cpp "$LINENO"; then :
35862   # Broken: success on invalid input.
35863 continue
35864 else
35865   # Passes both tests.
35866 ac_preproc_ok=:
35867 break
35868 fi
35869 rm -f conftest.err conftest.i conftest.$ac_ext
35870 
35871 done
35872 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35873 rm -f conftest.i conftest.err conftest.$ac_ext
35874 if $ac_preproc_ok; then :
35875   break
35876 fi
35877 
35878     done
35879     ac_cv_prog_CXXCPP=$CXXCPP
35880 
35881 fi
35882   CXXCPP=$ac_cv_prog_CXXCPP
35883 else
35884   ac_cv_prog_CXXCPP=$CXXCPP
35885 fi
35886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35887 $as_echo "$CXXCPP" >&6; }
35888 ac_preproc_ok=false
35889 for ac_cxx_preproc_warn_flag in '' yes
35890 do
35891   # Use a header file that comes with gcc, so configuring glibc
35892   # with a fresh cross-compiler works.
35893   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35894   # <limits.h> exists even on freestanding compilers.
35895   # On the NeXT, cc -E runs the code through the compiler's parser,
35896   # not just through cpp. "Syntax error" is here to catch this case.
35897   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35898 /* end confdefs.h.  */
35899 #ifdef __STDC__
35900 # include <limits.h>
35901 #else
35902 # include <assert.h>
35903 #endif
35904                      Syntax error
35905 _ACEOF
35906 if ac_fn_cxx_try_cpp "$LINENO"; then :
35907 
35908 else
35909   # Broken: fails on valid input.
35910 continue
35911 fi
35912 rm -f conftest.err conftest.i conftest.$ac_ext
35913 
35914   # OK, works on sane cases.  Now check whether nonexistent headers
35915   # can be detected and how.
35916   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35917 /* end confdefs.h.  */
35918 #include <ac_nonexistent.h>
35919 _ACEOF
35920 if ac_fn_cxx_try_cpp "$LINENO"; then :
35921   # Broken: success on invalid input.
35922 continue
35923 else
35924   # Passes both tests.
35925 ac_preproc_ok=:
35926 break
35927 fi
35928 rm -f conftest.err conftest.i conftest.$ac_ext
35929 
35930 done
35931 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35932 rm -f conftest.i conftest.err conftest.$ac_ext
35933 if $ac_preproc_ok; then :
35934 
35935 else
35936   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35937 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35938 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35939 See \`config.log' for more details" "$LINENO" 5; }
35940 fi
35941 
35942 ac_ext=cpp
35943 ac_cpp='$CXXCPP $CPPFLAGS'
35944 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35945 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35946 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35947 
35948 
35949   # Only process if variable expands to non-empty
35950 
35951   if test "x$CXXCPP" != x; then
35952     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35953 
35954   # First separate the path from the arguments. This will split at the first
35955   # space.
35956   complete="$CXXCPP"
35957   path="${complete%% *}"
35958   tmp="$complete EOL"
35959   arguments="${tmp#* }"
35960 
35961   # Input might be given as Windows format, start by converting to
35962   # unix format.
35963   new_path=`$CYGPATH -u "$path"`
35964 
35965   # Now try to locate executable using which
35966   new_path=`$WHICH "$new_path" 2> /dev/null`
35967   # bat and cmd files are not always considered executable in cygwin causing which
35968   # to not find them
35969   if test "x$new_path" = x \
35970       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35971       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35972     new_path=`$CYGPATH -u "$path"`
35973   fi
35974   if test "x$new_path" = x; then
35975     # Oops. Which didn't find the executable.
35976     # The splitting of arguments from the executable at a space might have been incorrect,
35977     # since paths with space are more likely in Windows. Give it another try with the whole
35978     # argument.
35979     path="$complete"
35980     arguments="EOL"
35981     new_path=`$CYGPATH -u "$path"`
35982     new_path=`$WHICH "$new_path" 2> /dev/null`
35983     # bat and cmd files are not always considered executable in cygwin causing which
35984     # to not find them
35985     if test "x$new_path" = x \
35986         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35987         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35988       new_path=`$CYGPATH -u "$path"`
35989     fi
35990     if test "x$new_path" = x; then
35991       # It's still not found. Now this is an unrecoverable error.
35992       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35993 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35994       has_space=`$ECHO "$complete" | $GREP " "`
35995       if test "x$has_space" != x; then
35996         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35997 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35998       fi
35999       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36000     fi
36001   fi
36002 
36003   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36004   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36005   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36006   # "foo.exe" is OK but "foo" is an error.
36007   #
36008   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36009   # It is also a way to make sure we got the proper file name for the real test later on.
36010   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36011   if test "x$test_shortpath" = x; then
36012     # Short path failed, file does not exist as specified.
36013     # Try adding .exe or .cmd
36014     if test -f "${new_path}.exe"; then
36015       input_to_shortpath="${new_path}.exe"
36016     elif test -f "${new_path}.cmd"; then
36017       input_to_shortpath="${new_path}.cmd"
36018     else
36019       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36020 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36021       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36022 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36023       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36024     fi
36025   else
36026     input_to_shortpath="$new_path"
36027   fi
36028 
36029   # Call helper function which possibly converts this using DOS-style short mode.
36030   # If so, the updated path is stored in $new_path.
36031   new_path="$input_to_shortpath"
36032 
36033   input_path="$input_to_shortpath"
36034   # Check if we need to convert this using DOS-style short mode. If the path
36035   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36036   # take no chances and rewrite it.
36037   # Note: m4 eats our [], so we need to use [ and ] instead.
36038   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36039   if test "x$has_forbidden_chars" != x; then
36040     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36041     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36042     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36043     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36044       # Going to short mode and back again did indeed matter. Since short mode is
36045       # case insensitive, let's make it lowercase to improve readability.
36046       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36047       # Now convert it back to Unix-style (cygpath)
36048       input_path=`$CYGPATH -u "$shortmode_path"`
36049       new_path="$input_path"
36050     fi
36051   fi
36052 
36053   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36054   if test "x$test_cygdrive_prefix" = x; then
36055     # As a simple fix, exclude /usr/bin since it's not a real path.
36056     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36057       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36058       # a path prefixed by /cygdrive for fixpath to work.
36059       new_path="$CYGWIN_ROOT_PATH$input_path"
36060     fi
36061   fi
36062 
36063   # remove trailing .exe if any
36064   new_path="${new_path/%.exe/}"
36065 
36066     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36067 
36068   # First separate the path from the arguments. This will split at the first
36069   # space.
36070   complete="$CXXCPP"
36071   path="${complete%% *}"
36072   tmp="$complete EOL"
36073   arguments="${tmp#* }"
36074 
36075   # Input might be given as Windows format, start by converting to
36076   # unix format.
36077   new_path="$path"
36078 
36079   windows_path="$new_path"
36080   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36081     unix_path=`$CYGPATH -u "$windows_path"`
36082     new_path="$unix_path"
36083   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36084     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36085     new_path="$unix_path"
36086   fi
36087 
36088 
36089   # Now try to locate executable using which
36090   new_path=`$WHICH "$new_path" 2> /dev/null`
36091 
36092   if test "x$new_path" = x; then
36093     # Oops. Which didn't find the executable.
36094     # The splitting of arguments from the executable at a space might have been incorrect,
36095     # since paths with space are more likely in Windows. Give it another try with the whole
36096     # argument.
36097     path="$complete"
36098     arguments="EOL"
36099     new_path="$path"
36100 
36101   windows_path="$new_path"
36102   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36103     unix_path=`$CYGPATH -u "$windows_path"`
36104     new_path="$unix_path"
36105   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36106     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36107     new_path="$unix_path"
36108   fi
36109 
36110 
36111     new_path=`$WHICH "$new_path" 2> /dev/null`
36112     # bat and cmd files are not always considered executable in MSYS causing which
36113     # to not find them
36114     if test "x$new_path" = x \
36115         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36116         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36117       new_path="$path"
36118 
36119   windows_path="$new_path"
36120   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36121     unix_path=`$CYGPATH -u "$windows_path"`
36122     new_path="$unix_path"
36123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36124     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36125     new_path="$unix_path"
36126   fi
36127 
36128     fi
36129 
36130     if test "x$new_path" = x; then
36131       # It's still not found. Now this is an unrecoverable error.
36132       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36133 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36134       has_space=`$ECHO "$complete" | $GREP " "`
36135       if test "x$has_space" != x; then
36136         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36137 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36138       fi
36139       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36140     fi
36141   fi
36142 
36143   # Now new_path has a complete unix path to the binary
36144   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36145     # Keep paths in /bin as-is, but remove trailing .exe if any
36146     new_path="${new_path/%.exe/}"
36147     # Do not save /bin paths to all_fixpath_prefixes!
36148   else
36149     # Not in mixed or Windows style, start by that.
36150     new_path=`cmd //c echo $new_path`
36151 
36152   input_path="$new_path"
36153   # Check if we need to convert this using DOS-style short mode. If the path
36154   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36155   # take no chances and rewrite it.
36156   # Note: m4 eats our [], so we need to use [ and ] instead.
36157   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36158   if test "x$has_forbidden_chars" != x; then
36159     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36160     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36161   fi
36162 
36163     # Output is in $new_path
36164 
36165   windows_path="$new_path"
36166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36167     unix_path=`$CYGPATH -u "$windows_path"`
36168     new_path="$unix_path"
36169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36170     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36171     new_path="$unix_path"
36172   fi
36173 
36174     # remove trailing .exe if any
36175     new_path="${new_path/%.exe/}"
36176 
36177     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36178     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36179   fi
36180 
36181     else
36182       # We're on a unix platform. Hooray! :)
36183       # First separate the path from the arguments. This will split at the first
36184       # space.
36185       complete="$CXXCPP"
36186       path="${complete%% *}"
36187       tmp="$complete EOL"
36188       arguments="${tmp#* }"
36189 
36190       # Cannot rely on the command "which" here since it doesn't always work.
36191       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36192       if test -z "$is_absolute_path"; then
36193         # Path to executable is not absolute. Find it.
36194         IFS_save="$IFS"
36195         IFS=:
36196         for p in $PATH; do
36197           if test -f "$p/$path" && test -x "$p/$path"; then
36198             new_path="$p/$path"
36199             break
36200           fi
36201         done
36202         IFS="$IFS_save"
36203       else
36204         # This is an absolute path, we can use it without further modifications.
36205         new_path="$path"
36206       fi
36207 
36208       if test "x$new_path" = x; then
36209         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36210 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36211         has_space=`$ECHO "$complete" | $GREP " "`
36212         if test "x$has_space" != x; then
36213           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36214 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36215         fi
36216         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36217       fi
36218     fi
36219 
36220     # Now join together the path and the arguments once again
36221     if test "x$arguments" != xEOL; then
36222       new_complete="$new_path ${arguments% *}"
36223     else
36224       new_complete="$new_path"
36225     fi
36226 
36227     if test "x$complete" != "x$new_complete"; then
36228       CXXCPP="$new_complete"
36229       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36230 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36231     fi
36232   fi
36233 
36234 
36235   #
36236   # Setup the linker (LD)
36237   #
36238   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36239     # In the Microsoft toolchain we have a separate LD command "link".
36240     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36241     # a cygwin program for something completely different.
36242     # Extract the first word of "link", so it can be a program name with args.
36243 set dummy link; ac_word=$2
36244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36245 $as_echo_n "checking for $ac_word... " >&6; }
36246 if ${ac_cv_prog_LD+:} false; then :
36247   $as_echo_n "(cached) " >&6
36248 else
36249   if test -n "$LD"; then
36250   ac_cv_prog_LD="$LD" # Let the user override the test.
36251 else
36252   ac_prog_rejected=no
36253 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36254 for as_dir in $PATH
36255 do
36256   IFS=$as_save_IFS
36257   test -z "$as_dir" && as_dir=.
36258     for ac_exec_ext in '' $ac_executable_extensions; do
36259   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36260     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36261        ac_prog_rejected=yes
36262        continue
36263      fi
36264     ac_cv_prog_LD="link"
36265     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36266     break 2
36267   fi
36268 done
36269   done
36270 IFS=$as_save_IFS
36271 
36272 if test $ac_prog_rejected = yes; then
36273   # We found a bogon in the path, so make sure we never use it.
36274   set dummy $ac_cv_prog_LD
36275   shift
36276   if test $# != 0; then
36277     # We chose a different compiler from the bogus one.
36278     # However, it has the same basename, so the bogon will be chosen
36279     # first if we set LD to just the basename; use the full file name.
36280     shift
36281     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36282   fi
36283 fi
36284 fi
36285 fi
36286 LD=$ac_cv_prog_LD
36287 if test -n "$LD"; then
36288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36289 $as_echo "$LD" >&6; }
36290 else
36291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36292 $as_echo "no" >&6; }
36293 fi
36294 
36295 
36296 
36297   # Only process if variable expands to non-empty
36298 
36299   if test "x$LD" != x; then
36300     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36301 
36302   # First separate the path from the arguments. This will split at the first
36303   # space.
36304   complete="$LD"
36305   path="${complete%% *}"
36306   tmp="$complete EOL"
36307   arguments="${tmp#* }"
36308 
36309   # Input might be given as Windows format, start by converting to
36310   # unix format.
36311   new_path=`$CYGPATH -u "$path"`
36312 
36313   # Now try to locate executable using which
36314   new_path=`$WHICH "$new_path" 2> /dev/null`
36315   # bat and cmd files are not always considered executable in cygwin causing which
36316   # to not find them
36317   if test "x$new_path" = x \
36318       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36319       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36320     new_path=`$CYGPATH -u "$path"`
36321   fi
36322   if test "x$new_path" = x; then
36323     # Oops. Which didn't find the executable.
36324     # The splitting of arguments from the executable at a space might have been incorrect,
36325     # since paths with space are more likely in Windows. Give it another try with the whole
36326     # argument.
36327     path="$complete"
36328     arguments="EOL"
36329     new_path=`$CYGPATH -u "$path"`
36330     new_path=`$WHICH "$new_path" 2> /dev/null`
36331     # bat and cmd files are not always considered executable in cygwin causing which
36332     # to not find them
36333     if test "x$new_path" = x \
36334         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36335         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36336       new_path=`$CYGPATH -u "$path"`
36337     fi
36338     if test "x$new_path" = x; then
36339       # It's still not found. Now this is an unrecoverable error.
36340       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36341 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36342       has_space=`$ECHO "$complete" | $GREP " "`
36343       if test "x$has_space" != x; then
36344         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36345 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36346       fi
36347       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36348     fi
36349   fi
36350 
36351   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36352   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36353   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36354   # "foo.exe" is OK but "foo" is an error.
36355   #
36356   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36357   # It is also a way to make sure we got the proper file name for the real test later on.
36358   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36359   if test "x$test_shortpath" = x; then
36360     # Short path failed, file does not exist as specified.
36361     # Try adding .exe or .cmd
36362     if test -f "${new_path}.exe"; then
36363       input_to_shortpath="${new_path}.exe"
36364     elif test -f "${new_path}.cmd"; then
36365       input_to_shortpath="${new_path}.cmd"
36366     else
36367       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36368 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36369       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36370 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36371       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36372     fi
36373   else
36374     input_to_shortpath="$new_path"
36375   fi
36376 
36377   # Call helper function which possibly converts this using DOS-style short mode.
36378   # If so, the updated path is stored in $new_path.
36379   new_path="$input_to_shortpath"
36380 
36381   input_path="$input_to_shortpath"
36382   # Check if we need to convert this using DOS-style short mode. If the path
36383   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36384   # take no chances and rewrite it.
36385   # Note: m4 eats our [], so we need to use [ and ] instead.
36386   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36387   if test "x$has_forbidden_chars" != x; then
36388     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36389     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36390     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36391     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36392       # Going to short mode and back again did indeed matter. Since short mode is
36393       # case insensitive, let's make it lowercase to improve readability.
36394       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36395       # Now convert it back to Unix-style (cygpath)
36396       input_path=`$CYGPATH -u "$shortmode_path"`
36397       new_path="$input_path"
36398     fi
36399   fi
36400 
36401   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36402   if test "x$test_cygdrive_prefix" = x; then
36403     # As a simple fix, exclude /usr/bin since it's not a real path.
36404     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36405       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36406       # a path prefixed by /cygdrive for fixpath to work.
36407       new_path="$CYGWIN_ROOT_PATH$input_path"
36408     fi
36409   fi
36410 
36411   # remove trailing .exe if any
36412   new_path="${new_path/%.exe/}"
36413 
36414     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36415 
36416   # First separate the path from the arguments. This will split at the first
36417   # space.
36418   complete="$LD"
36419   path="${complete%% *}"
36420   tmp="$complete EOL"
36421   arguments="${tmp#* }"
36422 
36423   # Input might be given as Windows format, start by converting to
36424   # unix format.
36425   new_path="$path"
36426 
36427   windows_path="$new_path"
36428   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36429     unix_path=`$CYGPATH -u "$windows_path"`
36430     new_path="$unix_path"
36431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36432     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36433     new_path="$unix_path"
36434   fi
36435 
36436 
36437   # Now try to locate executable using which
36438   new_path=`$WHICH "$new_path" 2> /dev/null`
36439 
36440   if test "x$new_path" = x; then
36441     # Oops. Which didn't find the executable.
36442     # The splitting of arguments from the executable at a space might have been incorrect,
36443     # since paths with space are more likely in Windows. Give it another try with the whole
36444     # argument.
36445     path="$complete"
36446     arguments="EOL"
36447     new_path="$path"
36448 
36449   windows_path="$new_path"
36450   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36451     unix_path=`$CYGPATH -u "$windows_path"`
36452     new_path="$unix_path"
36453   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36454     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36455     new_path="$unix_path"
36456   fi
36457 
36458 
36459     new_path=`$WHICH "$new_path" 2> /dev/null`
36460     # bat and cmd files are not always considered executable in MSYS causing which
36461     # to not find them
36462     if test "x$new_path" = x \
36463         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36464         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36465       new_path="$path"
36466 
36467   windows_path="$new_path"
36468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36469     unix_path=`$CYGPATH -u "$windows_path"`
36470     new_path="$unix_path"
36471   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36472     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36473     new_path="$unix_path"
36474   fi
36475 
36476     fi
36477 
36478     if test "x$new_path" = x; then
36479       # It's still not found. Now this is an unrecoverable error.
36480       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36481 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36482       has_space=`$ECHO "$complete" | $GREP " "`
36483       if test "x$has_space" != x; then
36484         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36485 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36486       fi
36487       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36488     fi
36489   fi
36490 
36491   # Now new_path has a complete unix path to the binary
36492   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36493     # Keep paths in /bin as-is, but remove trailing .exe if any
36494     new_path="${new_path/%.exe/}"
36495     # Do not save /bin paths to all_fixpath_prefixes!
36496   else
36497     # Not in mixed or Windows style, start by that.
36498     new_path=`cmd //c echo $new_path`
36499 
36500   input_path="$new_path"
36501   # Check if we need to convert this using DOS-style short mode. If the path
36502   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36503   # take no chances and rewrite it.
36504   # Note: m4 eats our [], so we need to use [ and ] instead.
36505   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36506   if test "x$has_forbidden_chars" != x; then
36507     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36508     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36509   fi
36510 
36511     # Output is in $new_path
36512 
36513   windows_path="$new_path"
36514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36515     unix_path=`$CYGPATH -u "$windows_path"`
36516     new_path="$unix_path"
36517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36519     new_path="$unix_path"
36520   fi
36521 
36522     # remove trailing .exe if any
36523     new_path="${new_path/%.exe/}"
36524 
36525     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36526     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36527   fi
36528 
36529     else
36530       # We're on a unix platform. Hooray! :)
36531       # First separate the path from the arguments. This will split at the first
36532       # space.
36533       complete="$LD"
36534       path="${complete%% *}"
36535       tmp="$complete EOL"
36536       arguments="${tmp#* }"
36537 
36538       # Cannot rely on the command "which" here since it doesn't always work.
36539       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36540       if test -z "$is_absolute_path"; then
36541         # Path to executable is not absolute. Find it.
36542         IFS_save="$IFS"
36543         IFS=:
36544         for p in $PATH; do
36545           if test -f "$p/$path" && test -x "$p/$path"; then
36546             new_path="$p/$path"
36547             break
36548           fi
36549         done
36550         IFS="$IFS_save"
36551       else
36552         # This is an absolute path, we can use it without further modifications.
36553         new_path="$path"
36554       fi
36555 
36556       if test "x$new_path" = x; then
36557         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36558 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36559         has_space=`$ECHO "$complete" | $GREP " "`
36560         if test "x$has_space" != x; then
36561           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36562 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36563         fi
36564         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36565       fi
36566     fi
36567 
36568     # Now join together the path and the arguments once again
36569     if test "x$arguments" != xEOL; then
36570       new_complete="$new_path ${arguments% *}"
36571     else
36572       new_complete="$new_path"
36573     fi
36574 
36575     if test "x$complete" != "x$new_complete"; then
36576       LD="$new_complete"
36577       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36578 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36579     fi
36580   fi
36581 
36582     # Verify that we indeed succeeded with this trick.
36583     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36584 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36585     "$LD" --version > /dev/null
36586     if test $? -eq 0 ; then
36587       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36588 $as_echo "no" >&6; }
36589       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36590     else
36591       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36592 $as_echo "yes" >&6; }
36593     fi
36594     LDCXX="$LD"
36595   else
36596     # All other toolchains use the compiler to link.
36597     LD="$CC"
36598     LDCXX="$CXX"
36599   fi
36600 
36601   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36602 
36603 
36604   #
36605   # Setup the assembler (AS)
36606   #
36607   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36608 
36609 
36610   # Publish this variable in the help.
36611 
36612 
36613   if [ -z "${AS+x}" ]; then
36614     # The variable is not set by user, try to locate tool using the code snippet
36615     for ac_prog in as
36616 do
36617   # Extract the first word of "$ac_prog", so it can be a program name with args.
36618 set dummy $ac_prog; ac_word=$2
36619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36620 $as_echo_n "checking for $ac_word... " >&6; }
36621 if ${ac_cv_path_AS+:} false; then :
36622   $as_echo_n "(cached) " >&6
36623 else
36624   case $AS in
36625   [\\/]* | ?:[\\/]*)
36626   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36627   ;;
36628   *)
36629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36630 for as_dir in $PATH
36631 do
36632   IFS=$as_save_IFS
36633   test -z "$as_dir" && as_dir=.
36634     for ac_exec_ext in '' $ac_executable_extensions; do
36635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36636     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36638     break 2
36639   fi
36640 done
36641   done
36642 IFS=$as_save_IFS
36643 
36644   ;;
36645 esac
36646 fi
36647 AS=$ac_cv_path_AS
36648 if test -n "$AS"; then
36649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36650 $as_echo "$AS" >&6; }
36651 else
36652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36653 $as_echo "no" >&6; }
36654 fi
36655 
36656 
36657   test -n "$AS" && break
36658 done
36659 
36660   else
36661     # The variable is set, but is it from the command line or the environment?
36662 
36663     # Try to remove the string !AS! from our list.
36664     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36665     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36666       # If it failed, the variable was not from the command line. Ignore it,
36667       # but warn the user (except for BASH, which is always set by the calling BASH).
36668       if test "xAS" != xBASH; then
36669         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36670 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36671       fi
36672       # Try to locate tool using the code snippet
36673       for ac_prog in as
36674 do
36675   # Extract the first word of "$ac_prog", so it can be a program name with args.
36676 set dummy $ac_prog; ac_word=$2
36677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36678 $as_echo_n "checking for $ac_word... " >&6; }
36679 if ${ac_cv_path_AS+:} false; then :
36680   $as_echo_n "(cached) " >&6
36681 else
36682   case $AS in
36683   [\\/]* | ?:[\\/]*)
36684   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36685   ;;
36686   *)
36687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36688 for as_dir in $PATH
36689 do
36690   IFS=$as_save_IFS
36691   test -z "$as_dir" && as_dir=.
36692     for ac_exec_ext in '' $ac_executable_extensions; do
36693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36694     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36696     break 2
36697   fi
36698 done
36699   done
36700 IFS=$as_save_IFS
36701 
36702   ;;
36703 esac
36704 fi
36705 AS=$ac_cv_path_AS
36706 if test -n "$AS"; then
36707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36708 $as_echo "$AS" >&6; }
36709 else
36710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36711 $as_echo "no" >&6; }
36712 fi
36713 
36714 
36715   test -n "$AS" && break
36716 done
36717 
36718     else
36719       # If it succeeded, then it was overridden by the user. We will use it
36720       # for the tool.
36721 
36722       # First remove it from the list of overridden variables, so we can test
36723       # for unknown variables in the end.
36724       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36725 
36726       # Check if we try to supply an empty value
36727       if test "x$AS" = x; then
36728         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36729 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36730         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36731 $as_echo_n "checking for AS... " >&6; }
36732         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36733 $as_echo "disabled" >&6; }
36734       else
36735         # Check if the provided tool contains a complete path.
36736         tool_specified="$AS"
36737         tool_basename="${tool_specified##*/}"
36738         if test "x$tool_basename" = "x$tool_specified"; then
36739           # A command without a complete path is provided, search $PATH.
36740           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36741 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36742           # Extract the first word of "$tool_basename", so it can be a program name with args.
36743 set dummy $tool_basename; ac_word=$2
36744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36745 $as_echo_n "checking for $ac_word... " >&6; }
36746 if ${ac_cv_path_AS+:} false; then :
36747   $as_echo_n "(cached) " >&6
36748 else
36749   case $AS in
36750   [\\/]* | ?:[\\/]*)
36751   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36752   ;;
36753   *)
36754   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36755 for as_dir in $PATH
36756 do
36757   IFS=$as_save_IFS
36758   test -z "$as_dir" && as_dir=.
36759     for ac_exec_ext in '' $ac_executable_extensions; do
36760   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36761     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36762     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36763     break 2
36764   fi
36765 done
36766   done
36767 IFS=$as_save_IFS
36768 
36769   ;;
36770 esac
36771 fi
36772 AS=$ac_cv_path_AS
36773 if test -n "$AS"; then
36774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36775 $as_echo "$AS" >&6; }
36776 else
36777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36778 $as_echo "no" >&6; }
36779 fi
36780 
36781 
36782           if test "x$AS" = x; then
36783             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36784           fi
36785         else
36786           # Otherwise we believe it is a complete path. Use it as it is.
36787           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36788 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36789           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36790 $as_echo_n "checking for AS... " >&6; }
36791           if test ! -x "$tool_specified"; then
36792             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36793 $as_echo "not found" >&6; }
36794             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36795           fi
36796           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36797 $as_echo "$tool_specified" >&6; }
36798         fi
36799       fi
36800     fi
36801 
36802   fi
36803 
36804 
36805 
36806   # Only process if variable expands to non-empty
36807 
36808   if test "x$AS" != x; then
36809     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36810 
36811   # First separate the path from the arguments. This will split at the first
36812   # space.
36813   complete="$AS"
36814   path="${complete%% *}"
36815   tmp="$complete EOL"
36816   arguments="${tmp#* }"
36817 
36818   # Input might be given as Windows format, start by converting to
36819   # unix format.
36820   new_path=`$CYGPATH -u "$path"`
36821 
36822   # Now try to locate executable using which
36823   new_path=`$WHICH "$new_path" 2> /dev/null`
36824   # bat and cmd files are not always considered executable in cygwin causing which
36825   # to not find them
36826   if test "x$new_path" = x \
36827       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36828       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36829     new_path=`$CYGPATH -u "$path"`
36830   fi
36831   if test "x$new_path" = x; then
36832     # Oops. Which didn't find the executable.
36833     # The splitting of arguments from the executable at a space might have been incorrect,
36834     # since paths with space are more likely in Windows. Give it another try with the whole
36835     # argument.
36836     path="$complete"
36837     arguments="EOL"
36838     new_path=`$CYGPATH -u "$path"`
36839     new_path=`$WHICH "$new_path" 2> /dev/null`
36840     # bat and cmd files are not always considered executable in cygwin causing which
36841     # to not find them
36842     if test "x$new_path" = x \
36843         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36844         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36845       new_path=`$CYGPATH -u "$path"`
36846     fi
36847     if test "x$new_path" = x; then
36848       # It's still not found. Now this is an unrecoverable error.
36849       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36850 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36851       has_space=`$ECHO "$complete" | $GREP " "`
36852       if test "x$has_space" != x; then
36853         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36854 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36855       fi
36856       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36857     fi
36858   fi
36859 
36860   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36861   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36862   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36863   # "foo.exe" is OK but "foo" is an error.
36864   #
36865   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36866   # It is also a way to make sure we got the proper file name for the real test later on.
36867   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36868   if test "x$test_shortpath" = x; then
36869     # Short path failed, file does not exist as specified.
36870     # Try adding .exe or .cmd
36871     if test -f "${new_path}.exe"; then
36872       input_to_shortpath="${new_path}.exe"
36873     elif test -f "${new_path}.cmd"; then
36874       input_to_shortpath="${new_path}.cmd"
36875     else
36876       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36877 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36878       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36879 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36880       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36881     fi
36882   else
36883     input_to_shortpath="$new_path"
36884   fi
36885 
36886   # Call helper function which possibly converts this using DOS-style short mode.
36887   # If so, the updated path is stored in $new_path.
36888   new_path="$input_to_shortpath"
36889 
36890   input_path="$input_to_shortpath"
36891   # Check if we need to convert this using DOS-style short mode. If the path
36892   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36893   # take no chances and rewrite it.
36894   # Note: m4 eats our [], so we need to use [ and ] instead.
36895   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36896   if test "x$has_forbidden_chars" != x; then
36897     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36898     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36899     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36900     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36901       # Going to short mode and back again did indeed matter. Since short mode is
36902       # case insensitive, let's make it lowercase to improve readability.
36903       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36904       # Now convert it back to Unix-style (cygpath)
36905       input_path=`$CYGPATH -u "$shortmode_path"`
36906       new_path="$input_path"
36907     fi
36908   fi
36909 
36910   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36911   if test "x$test_cygdrive_prefix" = x; then
36912     # As a simple fix, exclude /usr/bin since it's not a real path.
36913     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36914       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36915       # a path prefixed by /cygdrive for fixpath to work.
36916       new_path="$CYGWIN_ROOT_PATH$input_path"
36917     fi
36918   fi
36919 
36920   # remove trailing .exe if any
36921   new_path="${new_path/%.exe/}"
36922 
36923     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36924 
36925   # First separate the path from the arguments. This will split at the first
36926   # space.
36927   complete="$AS"
36928   path="${complete%% *}"
36929   tmp="$complete EOL"
36930   arguments="${tmp#* }"
36931 
36932   # Input might be given as Windows format, start by converting to
36933   # unix format.
36934   new_path="$path"
36935 
36936   windows_path="$new_path"
36937   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36938     unix_path=`$CYGPATH -u "$windows_path"`
36939     new_path="$unix_path"
36940   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36941     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36942     new_path="$unix_path"
36943   fi
36944 
36945 
36946   # Now try to locate executable using which
36947   new_path=`$WHICH "$new_path" 2> /dev/null`
36948 
36949   if test "x$new_path" = x; then
36950     # Oops. Which didn't find the executable.
36951     # The splitting of arguments from the executable at a space might have been incorrect,
36952     # since paths with space are more likely in Windows. Give it another try with the whole
36953     # argument.
36954     path="$complete"
36955     arguments="EOL"
36956     new_path="$path"
36957 
36958   windows_path="$new_path"
36959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36960     unix_path=`$CYGPATH -u "$windows_path"`
36961     new_path="$unix_path"
36962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36963     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36964     new_path="$unix_path"
36965   fi
36966 
36967 
36968     new_path=`$WHICH "$new_path" 2> /dev/null`
36969     # bat and cmd files are not always considered executable in MSYS causing which
36970     # to not find them
36971     if test "x$new_path" = x \
36972         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36973         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36974       new_path="$path"
36975 
36976   windows_path="$new_path"
36977   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36978     unix_path=`$CYGPATH -u "$windows_path"`
36979     new_path="$unix_path"
36980   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36981     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36982     new_path="$unix_path"
36983   fi
36984 
36985     fi
36986 
36987     if test "x$new_path" = x; then
36988       # It's still not found. Now this is an unrecoverable error.
36989       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36990 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36991       has_space=`$ECHO "$complete" | $GREP " "`
36992       if test "x$has_space" != x; then
36993         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36994 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36995       fi
36996       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36997     fi
36998   fi
36999 
37000   # Now new_path has a complete unix path to the binary
37001   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37002     # Keep paths in /bin as-is, but remove trailing .exe if any
37003     new_path="${new_path/%.exe/}"
37004     # Do not save /bin paths to all_fixpath_prefixes!
37005   else
37006     # Not in mixed or Windows style, start by that.
37007     new_path=`cmd //c echo $new_path`
37008 
37009   input_path="$new_path"
37010   # Check if we need to convert this using DOS-style short mode. If the path
37011   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37012   # take no chances and rewrite it.
37013   # Note: m4 eats our [], so we need to use [ and ] instead.
37014   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37015   if test "x$has_forbidden_chars" != x; then
37016     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37017     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37018   fi
37019 
37020     # Output is in $new_path
37021 
37022   windows_path="$new_path"
37023   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37024     unix_path=`$CYGPATH -u "$windows_path"`
37025     new_path="$unix_path"
37026   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37027     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37028     new_path="$unix_path"
37029   fi
37030 
37031     # remove trailing .exe if any
37032     new_path="${new_path/%.exe/}"
37033 
37034     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37035     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37036   fi
37037 
37038     else
37039       # We're on a unix platform. Hooray! :)
37040       # First separate the path from the arguments. This will split at the first
37041       # space.
37042       complete="$AS"
37043       path="${complete%% *}"
37044       tmp="$complete EOL"
37045       arguments="${tmp#* }"
37046 
37047       # Cannot rely on the command "which" here since it doesn't always work.
37048       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37049       if test -z "$is_absolute_path"; then
37050         # Path to executable is not absolute. Find it.
37051         IFS_save="$IFS"
37052         IFS=:
37053         for p in $PATH; do
37054           if test -f "$p/$path" && test -x "$p/$path"; then
37055             new_path="$p/$path"
37056             break
37057           fi
37058         done
37059         IFS="$IFS_save"
37060       else
37061         # This is an absolute path, we can use it without further modifications.
37062         new_path="$path"
37063       fi
37064 
37065       if test "x$new_path" = x; then
37066         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37067 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37068         has_space=`$ECHO "$complete" | $GREP " "`
37069         if test "x$has_space" != x; then
37070           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37071 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37072         fi
37073         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37074       fi
37075     fi
37076 
37077     # Now join together the path and the arguments once again
37078     if test "x$arguments" != xEOL; then
37079       new_complete="$new_path ${arguments% *}"
37080     else
37081       new_complete="$new_path"
37082     fi
37083 
37084     if test "x$complete" != "x$new_complete"; then
37085       AS="$new_complete"
37086       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37087 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37088     fi
37089   fi
37090 
37091     if test "x$AS" = x; then
37092       as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37093     fi
37094   else
37095     # FIXME: is this correct for microsoft?
37096     AS="$CC -c"
37097   fi
37098 
37099 
37100   #
37101   # Setup the archiver (AR)
37102   #
37103   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37104     # The corresponding ar tool is lib.exe (used to create static libraries)
37105     # Extract the first word of "lib", so it can be a program name with args.
37106 set dummy lib; ac_word=$2
37107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37108 $as_echo_n "checking for $ac_word... " >&6; }
37109 if ${ac_cv_prog_AR+:} false; then :
37110   $as_echo_n "(cached) " >&6
37111 else
37112   if test -n "$AR"; then
37113   ac_cv_prog_AR="$AR" # Let the user override the test.
37114 else
37115 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37116 for as_dir in $PATH
37117 do
37118   IFS=$as_save_IFS
37119   test -z "$as_dir" && as_dir=.
37120     for ac_exec_ext in '' $ac_executable_extensions; do
37121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37122     ac_cv_prog_AR="lib"
37123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37124     break 2
37125   fi
37126 done
37127   done
37128 IFS=$as_save_IFS
37129 
37130 fi
37131 fi
37132 AR=$ac_cv_prog_AR
37133 if test -n "$AR"; then
37134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37135 $as_echo "$AR" >&6; }
37136 else
37137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37138 $as_echo "no" >&6; }
37139 fi
37140 
37141 
37142   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37143 
37144 
37145   # Publish this variable in the help.
37146 
37147 
37148   if [ -z "${AR+x}" ]; then
37149     # The variable is not set by user, try to locate tool using the code snippet
37150     if test -n "$ac_tool_prefix"; then
37151   for ac_prog in ar gcc-ar
37152   do
37153     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37154 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37156 $as_echo_n "checking for $ac_word... " >&6; }
37157 if ${ac_cv_prog_AR+:} false; then :
37158   $as_echo_n "(cached) " >&6
37159 else
37160   if test -n "$AR"; then
37161   ac_cv_prog_AR="$AR" # Let the user override the test.
37162 else
37163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37164 for as_dir in $PATH
37165 do
37166   IFS=$as_save_IFS
37167   test -z "$as_dir" && as_dir=.
37168     for ac_exec_ext in '' $ac_executable_extensions; do
37169   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37170     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37171     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37172     break 2
37173   fi
37174 done
37175   done
37176 IFS=$as_save_IFS
37177 
37178 fi
37179 fi
37180 AR=$ac_cv_prog_AR
37181 if test -n "$AR"; then
37182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37183 $as_echo "$AR" >&6; }
37184 else
37185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37186 $as_echo "no" >&6; }
37187 fi
37188 
37189 
37190     test -n "$AR" && break
37191   done
37192 fi
37193 if test -z "$AR"; then
37194   ac_ct_AR=$AR
37195   for ac_prog in ar gcc-ar
37196 do
37197   # Extract the first word of "$ac_prog", so it can be a program name with args.
37198 set dummy $ac_prog; ac_word=$2
37199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37200 $as_echo_n "checking for $ac_word... " >&6; }
37201 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37202   $as_echo_n "(cached) " >&6
37203 else
37204   if test -n "$ac_ct_AR"; then
37205   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37206 else
37207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37208 for as_dir in $PATH
37209 do
37210   IFS=$as_save_IFS
37211   test -z "$as_dir" && as_dir=.
37212     for ac_exec_ext in '' $ac_executable_extensions; do
37213   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37214     ac_cv_prog_ac_ct_AR="$ac_prog"
37215     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37216     break 2
37217   fi
37218 done
37219   done
37220 IFS=$as_save_IFS
37221 
37222 fi
37223 fi
37224 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37225 if test -n "$ac_ct_AR"; then
37226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37227 $as_echo "$ac_ct_AR" >&6; }
37228 else
37229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37230 $as_echo "no" >&6; }
37231 fi
37232 
37233 
37234   test -n "$ac_ct_AR" && break
37235 done
37236 
37237   if test "x$ac_ct_AR" = x; then
37238     AR=""
37239   else
37240     case $cross_compiling:$ac_tool_warned in
37241 yes:)
37242 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37243 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37244 ac_tool_warned=yes ;;
37245 esac
37246     AR=$ac_ct_AR
37247   fi
37248 fi
37249 
37250   else
37251     # The variable is set, but is it from the command line or the environment?
37252 
37253     # Try to remove the string !AR! from our list.
37254     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37255     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37256       # If it failed, the variable was not from the command line. Ignore it,
37257       # but warn the user (except for BASH, which is always set by the calling BASH).
37258       if test "xAR" != xBASH; then
37259         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37260 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37261       fi
37262       # Try to locate tool using the code snippet
37263       if test -n "$ac_tool_prefix"; then
37264   for ac_prog in ar gcc-ar
37265   do
37266     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37267 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37269 $as_echo_n "checking for $ac_word... " >&6; }
37270 if ${ac_cv_prog_AR+:} false; then :
37271   $as_echo_n "(cached) " >&6
37272 else
37273   if test -n "$AR"; then
37274   ac_cv_prog_AR="$AR" # Let the user override the test.
37275 else
37276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37277 for as_dir in $PATH
37278 do
37279   IFS=$as_save_IFS
37280   test -z "$as_dir" && as_dir=.
37281     for ac_exec_ext in '' $ac_executable_extensions; do
37282   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37283     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37284     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37285     break 2
37286   fi
37287 done
37288   done
37289 IFS=$as_save_IFS
37290 
37291 fi
37292 fi
37293 AR=$ac_cv_prog_AR
37294 if test -n "$AR"; then
37295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37296 $as_echo "$AR" >&6; }
37297 else
37298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37299 $as_echo "no" >&6; }
37300 fi
37301 
37302 
37303     test -n "$AR" && break
37304   done
37305 fi
37306 if test -z "$AR"; then
37307   ac_ct_AR=$AR
37308   for ac_prog in ar gcc-ar
37309 do
37310   # Extract the first word of "$ac_prog", so it can be a program name with args.
37311 set dummy $ac_prog; ac_word=$2
37312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37313 $as_echo_n "checking for $ac_word... " >&6; }
37314 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37315   $as_echo_n "(cached) " >&6
37316 else
37317   if test -n "$ac_ct_AR"; then
37318   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37319 else
37320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37321 for as_dir in $PATH
37322 do
37323   IFS=$as_save_IFS
37324   test -z "$as_dir" && as_dir=.
37325     for ac_exec_ext in '' $ac_executable_extensions; do
37326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37327     ac_cv_prog_ac_ct_AR="$ac_prog"
37328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37329     break 2
37330   fi
37331 done
37332   done
37333 IFS=$as_save_IFS
37334 
37335 fi
37336 fi
37337 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37338 if test -n "$ac_ct_AR"; then
37339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37340 $as_echo "$ac_ct_AR" >&6; }
37341 else
37342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37343 $as_echo "no" >&6; }
37344 fi
37345 
37346 
37347   test -n "$ac_ct_AR" && break
37348 done
37349 
37350   if test "x$ac_ct_AR" = x; then
37351     AR=""
37352   else
37353     case $cross_compiling:$ac_tool_warned in
37354 yes:)
37355 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37356 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37357 ac_tool_warned=yes ;;
37358 esac
37359     AR=$ac_ct_AR
37360   fi
37361 fi
37362 
37363     else
37364       # If it succeeded, then it was overridden by the user. We will use it
37365       # for the tool.
37366 
37367       # First remove it from the list of overridden variables, so we can test
37368       # for unknown variables in the end.
37369       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37370 
37371       # Check if we try to supply an empty value
37372       if test "x$AR" = x; then
37373         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37374 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37375         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37376 $as_echo_n "checking for AR... " >&6; }
37377         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37378 $as_echo "disabled" >&6; }
37379       else
37380         # Check if the provided tool contains a complete path.
37381         tool_specified="$AR"
37382         tool_basename="${tool_specified##*/}"
37383         if test "x$tool_basename" = "x$tool_specified"; then
37384           # A command without a complete path is provided, search $PATH.
37385           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37386 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37387           # Extract the first word of "$tool_basename", so it can be a program name with args.
37388 set dummy $tool_basename; ac_word=$2
37389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37390 $as_echo_n "checking for $ac_word... " >&6; }
37391 if ${ac_cv_path_AR+:} false; then :
37392   $as_echo_n "(cached) " >&6
37393 else
37394   case $AR in
37395   [\\/]* | ?:[\\/]*)
37396   ac_cv_path_AR="$AR" # Let the user override the test with a path.
37397   ;;
37398   *)
37399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37400 for as_dir in $PATH
37401 do
37402   IFS=$as_save_IFS
37403   test -z "$as_dir" && as_dir=.
37404     for ac_exec_ext in '' $ac_executable_extensions; do
37405   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37406     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37408     break 2
37409   fi
37410 done
37411   done
37412 IFS=$as_save_IFS
37413 
37414   ;;
37415 esac
37416 fi
37417 AR=$ac_cv_path_AR
37418 if test -n "$AR"; then
37419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37420 $as_echo "$AR" >&6; }
37421 else
37422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37423 $as_echo "no" >&6; }
37424 fi
37425 
37426 
37427           if test "x$AR" = x; then
37428             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37429           fi
37430         else
37431           # Otherwise we believe it is a complete path. Use it as it is.
37432           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37433 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37434           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37435 $as_echo_n "checking for AR... " >&6; }
37436           if test ! -x "$tool_specified"; then
37437             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37438 $as_echo "not found" >&6; }
37439             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37440           fi
37441           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37442 $as_echo "$tool_specified" >&6; }
37443         fi
37444       fi
37445     fi
37446 
37447   fi
37448 
37449 
37450   else
37451 
37452 
37453   # Publish this variable in the help.
37454 
37455 
37456   if [ -z "${AR+x}" ]; then
37457     # The variable is not set by user, try to locate tool using the code snippet
37458     if test -n "$ac_tool_prefix"; then
37459   for ac_prog in ar
37460   do
37461     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37462 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37464 $as_echo_n "checking for $ac_word... " >&6; }
37465 if ${ac_cv_prog_AR+:} false; then :
37466   $as_echo_n "(cached) " >&6
37467 else
37468   if test -n "$AR"; then
37469   ac_cv_prog_AR="$AR" # Let the user override the test.
37470 else
37471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37472 for as_dir in $PATH
37473 do
37474   IFS=$as_save_IFS
37475   test -z "$as_dir" && as_dir=.
37476     for ac_exec_ext in '' $ac_executable_extensions; do
37477   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37478     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37479     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37480     break 2
37481   fi
37482 done
37483   done
37484 IFS=$as_save_IFS
37485 
37486 fi
37487 fi
37488 AR=$ac_cv_prog_AR
37489 if test -n "$AR"; then
37490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37491 $as_echo "$AR" >&6; }
37492 else
37493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37494 $as_echo "no" >&6; }
37495 fi
37496 
37497 
37498     test -n "$AR" && break
37499   done
37500 fi
37501 if test -z "$AR"; then
37502   ac_ct_AR=$AR
37503   for ac_prog in ar
37504 do
37505   # Extract the first word of "$ac_prog", so it can be a program name with args.
37506 set dummy $ac_prog; ac_word=$2
37507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37508 $as_echo_n "checking for $ac_word... " >&6; }
37509 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37510   $as_echo_n "(cached) " >&6
37511 else
37512   if test -n "$ac_ct_AR"; then
37513   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37514 else
37515 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37516 for as_dir in $PATH
37517 do
37518   IFS=$as_save_IFS
37519   test -z "$as_dir" && as_dir=.
37520     for ac_exec_ext in '' $ac_executable_extensions; do
37521   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37522     ac_cv_prog_ac_ct_AR="$ac_prog"
37523     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37524     break 2
37525   fi
37526 done
37527   done
37528 IFS=$as_save_IFS
37529 
37530 fi
37531 fi
37532 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37533 if test -n "$ac_ct_AR"; then
37534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37535 $as_echo "$ac_ct_AR" >&6; }
37536 else
37537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37538 $as_echo "no" >&6; }
37539 fi
37540 
37541 
37542   test -n "$ac_ct_AR" && break
37543 done
37544 
37545   if test "x$ac_ct_AR" = x; then
37546     AR=""
37547   else
37548     case $cross_compiling:$ac_tool_warned in
37549 yes:)
37550 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37551 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37552 ac_tool_warned=yes ;;
37553 esac
37554     AR=$ac_ct_AR
37555   fi
37556 fi
37557 
37558   else
37559     # The variable is set, but is it from the command line or the environment?
37560 
37561     # Try to remove the string !AR! from our list.
37562     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37563     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37564       # If it failed, the variable was not from the command line. Ignore it,
37565       # but warn the user (except for BASH, which is always set by the calling BASH).
37566       if test "xAR" != xBASH; then
37567         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37568 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37569       fi
37570       # Try to locate tool using the code snippet
37571       if test -n "$ac_tool_prefix"; then
37572   for ac_prog in ar
37573   do
37574     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37575 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37577 $as_echo_n "checking for $ac_word... " >&6; }
37578 if ${ac_cv_prog_AR+:} false; then :
37579   $as_echo_n "(cached) " >&6
37580 else
37581   if test -n "$AR"; then
37582   ac_cv_prog_AR="$AR" # Let the user override the test.
37583 else
37584 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37585 for as_dir in $PATH
37586 do
37587   IFS=$as_save_IFS
37588   test -z "$as_dir" && as_dir=.
37589     for ac_exec_ext in '' $ac_executable_extensions; do
37590   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37591     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37593     break 2
37594   fi
37595 done
37596   done
37597 IFS=$as_save_IFS
37598 
37599 fi
37600 fi
37601 AR=$ac_cv_prog_AR
37602 if test -n "$AR"; then
37603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37604 $as_echo "$AR" >&6; }
37605 else
37606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37607 $as_echo "no" >&6; }
37608 fi
37609 
37610 
37611     test -n "$AR" && break
37612   done
37613 fi
37614 if test -z "$AR"; then
37615   ac_ct_AR=$AR
37616   for ac_prog in ar
37617 do
37618   # Extract the first word of "$ac_prog", so it can be a program name with args.
37619 set dummy $ac_prog; ac_word=$2
37620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37621 $as_echo_n "checking for $ac_word... " >&6; }
37622 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37623   $as_echo_n "(cached) " >&6
37624 else
37625   if test -n "$ac_ct_AR"; then
37626   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37627 else
37628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37629 for as_dir in $PATH
37630 do
37631   IFS=$as_save_IFS
37632   test -z "$as_dir" && as_dir=.
37633     for ac_exec_ext in '' $ac_executable_extensions; do
37634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37635     ac_cv_prog_ac_ct_AR="$ac_prog"
37636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37637     break 2
37638   fi
37639 done
37640   done
37641 IFS=$as_save_IFS
37642 
37643 fi
37644 fi
37645 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37646 if test -n "$ac_ct_AR"; then
37647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37648 $as_echo "$ac_ct_AR" >&6; }
37649 else
37650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37651 $as_echo "no" >&6; }
37652 fi
37653 
37654 
37655   test -n "$ac_ct_AR" && break
37656 done
37657 
37658   if test "x$ac_ct_AR" = x; then
37659     AR=""
37660   else
37661     case $cross_compiling:$ac_tool_warned in
37662 yes:)
37663 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37664 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37665 ac_tool_warned=yes ;;
37666 esac
37667     AR=$ac_ct_AR
37668   fi
37669 fi
37670 
37671     else
37672       # If it succeeded, then it was overridden by the user. We will use it
37673       # for the tool.
37674 
37675       # First remove it from the list of overridden variables, so we can test
37676       # for unknown variables in the end.
37677       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37678 
37679       # Check if we try to supply an empty value
37680       if test "x$AR" = x; then
37681         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37682 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37683         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37684 $as_echo_n "checking for AR... " >&6; }
37685         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37686 $as_echo "disabled" >&6; }
37687       else
37688         # Check if the provided tool contains a complete path.
37689         tool_specified="$AR"
37690         tool_basename="${tool_specified##*/}"
37691         if test "x$tool_basename" = "x$tool_specified"; then
37692           # A command without a complete path is provided, search $PATH.
37693           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37694 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37695           # Extract the first word of "$tool_basename", so it can be a program name with args.
37696 set dummy $tool_basename; ac_word=$2
37697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37698 $as_echo_n "checking for $ac_word... " >&6; }
37699 if ${ac_cv_path_AR+:} false; then :
37700   $as_echo_n "(cached) " >&6
37701 else
37702   case $AR in
37703   [\\/]* | ?:[\\/]*)
37704   ac_cv_path_AR="$AR" # Let the user override the test with a path.
37705   ;;
37706   *)
37707   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37708 for as_dir in $PATH
37709 do
37710   IFS=$as_save_IFS
37711   test -z "$as_dir" && as_dir=.
37712     for ac_exec_ext in '' $ac_executable_extensions; do
37713   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37714     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37716     break 2
37717   fi
37718 done
37719   done
37720 IFS=$as_save_IFS
37721 
37722   ;;
37723 esac
37724 fi
37725 AR=$ac_cv_path_AR
37726 if test -n "$AR"; then
37727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37728 $as_echo "$AR" >&6; }
37729 else
37730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37731 $as_echo "no" >&6; }
37732 fi
37733 
37734 
37735           if test "x$AR" = x; then
37736             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37737           fi
37738         else
37739           # Otherwise we believe it is a complete path. Use it as it is.
37740           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37741 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37742           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37743 $as_echo_n "checking for AR... " >&6; }
37744           if test ! -x "$tool_specified"; then
37745             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37746 $as_echo "not found" >&6; }
37747             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37748           fi
37749           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37750 $as_echo "$tool_specified" >&6; }
37751         fi
37752       fi
37753     fi
37754 
37755   fi
37756 
37757 
37758   fi
37759 
37760   # Only process if variable expands to non-empty
37761 
37762   if test "x$AR" != x; then
37763     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37764 
37765   # First separate the path from the arguments. This will split at the first
37766   # space.
37767   complete="$AR"
37768   path="${complete%% *}"
37769   tmp="$complete EOL"
37770   arguments="${tmp#* }"
37771 
37772   # Input might be given as Windows format, start by converting to
37773   # unix format.
37774   new_path=`$CYGPATH -u "$path"`
37775 
37776   # Now try to locate executable using which
37777   new_path=`$WHICH "$new_path" 2> /dev/null`
37778   # bat and cmd files are not always considered executable in cygwin causing which
37779   # to not find them
37780   if test "x$new_path" = x \
37781       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37782       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37783     new_path=`$CYGPATH -u "$path"`
37784   fi
37785   if test "x$new_path" = x; then
37786     # Oops. Which didn't find the executable.
37787     # The splitting of arguments from the executable at a space might have been incorrect,
37788     # since paths with space are more likely in Windows. Give it another try with the whole
37789     # argument.
37790     path="$complete"
37791     arguments="EOL"
37792     new_path=`$CYGPATH -u "$path"`
37793     new_path=`$WHICH "$new_path" 2> /dev/null`
37794     # bat and cmd files are not always considered executable in cygwin causing which
37795     # to not find them
37796     if test "x$new_path" = x \
37797         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37798         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37799       new_path=`$CYGPATH -u "$path"`
37800     fi
37801     if test "x$new_path" = x; then
37802       # It's still not found. Now this is an unrecoverable error.
37803       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37804 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37805       has_space=`$ECHO "$complete" | $GREP " "`
37806       if test "x$has_space" != x; then
37807         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37808 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37809       fi
37810       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37811     fi
37812   fi
37813 
37814   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37815   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37816   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37817   # "foo.exe" is OK but "foo" is an error.
37818   #
37819   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37820   # It is also a way to make sure we got the proper file name for the real test later on.
37821   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37822   if test "x$test_shortpath" = x; then
37823     # Short path failed, file does not exist as specified.
37824     # Try adding .exe or .cmd
37825     if test -f "${new_path}.exe"; then
37826       input_to_shortpath="${new_path}.exe"
37827     elif test -f "${new_path}.cmd"; then
37828       input_to_shortpath="${new_path}.cmd"
37829     else
37830       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37831 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37832       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37833 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37834       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37835     fi
37836   else
37837     input_to_shortpath="$new_path"
37838   fi
37839 
37840   # Call helper function which possibly converts this using DOS-style short mode.
37841   # If so, the updated path is stored in $new_path.
37842   new_path="$input_to_shortpath"
37843 
37844   input_path="$input_to_shortpath"
37845   # Check if we need to convert this using DOS-style short mode. If the path
37846   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37847   # take no chances and rewrite it.
37848   # Note: m4 eats our [], so we need to use [ and ] instead.
37849   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37850   if test "x$has_forbidden_chars" != x; then
37851     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37852     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37853     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37854     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37855       # Going to short mode and back again did indeed matter. Since short mode is
37856       # case insensitive, let's make it lowercase to improve readability.
37857       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37858       # Now convert it back to Unix-style (cygpath)
37859       input_path=`$CYGPATH -u "$shortmode_path"`
37860       new_path="$input_path"
37861     fi
37862   fi
37863 
37864   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37865   if test "x$test_cygdrive_prefix" = x; then
37866     # As a simple fix, exclude /usr/bin since it's not a real path.
37867     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37868       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37869       # a path prefixed by /cygdrive for fixpath to work.
37870       new_path="$CYGWIN_ROOT_PATH$input_path"
37871     fi
37872   fi
37873 
37874   # remove trailing .exe if any
37875   new_path="${new_path/%.exe/}"
37876 
37877     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37878 
37879   # First separate the path from the arguments. This will split at the first
37880   # space.
37881   complete="$AR"
37882   path="${complete%% *}"
37883   tmp="$complete EOL"
37884   arguments="${tmp#* }"
37885 
37886   # Input might be given as Windows format, start by converting to
37887   # unix format.
37888   new_path="$path"
37889 
37890   windows_path="$new_path"
37891   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37892     unix_path=`$CYGPATH -u "$windows_path"`
37893     new_path="$unix_path"
37894   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37895     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37896     new_path="$unix_path"
37897   fi
37898 
37899 
37900   # Now try to locate executable using which
37901   new_path=`$WHICH "$new_path" 2> /dev/null`
37902 
37903   if test "x$new_path" = x; then
37904     # Oops. Which didn't find the executable.
37905     # The splitting of arguments from the executable at a space might have been incorrect,
37906     # since paths with space are more likely in Windows. Give it another try with the whole
37907     # argument.
37908     path="$complete"
37909     arguments="EOL"
37910     new_path="$path"
37911 
37912   windows_path="$new_path"
37913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37914     unix_path=`$CYGPATH -u "$windows_path"`
37915     new_path="$unix_path"
37916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37917     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37918     new_path="$unix_path"
37919   fi
37920 
37921 
37922     new_path=`$WHICH "$new_path" 2> /dev/null`
37923     # bat and cmd files are not always considered executable in MSYS causing which
37924     # to not find them
37925     if test "x$new_path" = x \
37926         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37927         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37928       new_path="$path"
37929 
37930   windows_path="$new_path"
37931   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37932     unix_path=`$CYGPATH -u "$windows_path"`
37933     new_path="$unix_path"
37934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37935     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37936     new_path="$unix_path"
37937   fi
37938 
37939     fi
37940 
37941     if test "x$new_path" = x; then
37942       # It's still not found. Now this is an unrecoverable error.
37943       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37944 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37945       has_space=`$ECHO "$complete" | $GREP " "`
37946       if test "x$has_space" != x; then
37947         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37948 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37949       fi
37950       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37951     fi
37952   fi
37953 
37954   # Now new_path has a complete unix path to the binary
37955   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37956     # Keep paths in /bin as-is, but remove trailing .exe if any
37957     new_path="${new_path/%.exe/}"
37958     # Do not save /bin paths to all_fixpath_prefixes!
37959   else
37960     # Not in mixed or Windows style, start by that.
37961     new_path=`cmd //c echo $new_path`
37962 
37963   input_path="$new_path"
37964   # Check if we need to convert this using DOS-style short mode. If the path
37965   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37966   # take no chances and rewrite it.
37967   # Note: m4 eats our [], so we need to use [ and ] instead.
37968   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37969   if test "x$has_forbidden_chars" != x; then
37970     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37971     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37972   fi
37973 
37974     # Output is in $new_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     # remove trailing .exe if any
37986     new_path="${new_path/%.exe/}"
37987 
37988     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37989     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37990   fi
37991 
37992     else
37993       # We're on a unix platform. Hooray! :)
37994       # First separate the path from the arguments. This will split at the first
37995       # space.
37996       complete="$AR"
37997       path="${complete%% *}"
37998       tmp="$complete EOL"
37999       arguments="${tmp#* }"
38000 
38001       # Cannot rely on the command "which" here since it doesn't always work.
38002       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38003       if test -z "$is_absolute_path"; then
38004         # Path to executable is not absolute. Find it.
38005         IFS_save="$IFS"
38006         IFS=:
38007         for p in $PATH; do
38008           if test -f "$p/$path" && test -x "$p/$path"; then
38009             new_path="$p/$path"
38010             break
38011           fi
38012         done
38013         IFS="$IFS_save"
38014       else
38015         # This is an absolute path, we can use it without further modifications.
38016         new_path="$path"
38017       fi
38018 
38019       if test "x$new_path" = x; then
38020         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38021 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38022         has_space=`$ECHO "$complete" | $GREP " "`
38023         if test "x$has_space" != x; then
38024           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38025 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38026         fi
38027         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38028       fi
38029     fi
38030 
38031     # Now join together the path and the arguments once again
38032     if test "x$arguments" != xEOL; then
38033       new_complete="$new_path ${arguments% *}"
38034     else
38035       new_complete="$new_path"
38036     fi
38037 
38038     if test "x$complete" != "x$new_complete"; then
38039       AR="$new_complete"
38040       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38041 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38042     fi
38043   fi
38044 
38045 
38046 
38047   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38048 
38049 
38050   # Publish this variable in the help.
38051 
38052 
38053   if [ -z "${LIPO+x}" ]; then
38054     # The variable is not set by user, try to locate tool using the code snippet
38055     for ac_prog in lipo
38056 do
38057   # Extract the first word of "$ac_prog", so it can be a program name with args.
38058 set dummy $ac_prog; ac_word=$2
38059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38060 $as_echo_n "checking for $ac_word... " >&6; }
38061 if ${ac_cv_path_LIPO+:} false; then :
38062   $as_echo_n "(cached) " >&6
38063 else
38064   case $LIPO in
38065   [\\/]* | ?:[\\/]*)
38066   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38067   ;;
38068   *)
38069   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38070 for as_dir in $PATH
38071 do
38072   IFS=$as_save_IFS
38073   test -z "$as_dir" && as_dir=.
38074     for ac_exec_ext in '' $ac_executable_extensions; do
38075   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38076     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38077     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38078     break 2
38079   fi
38080 done
38081   done
38082 IFS=$as_save_IFS
38083 
38084   ;;
38085 esac
38086 fi
38087 LIPO=$ac_cv_path_LIPO
38088 if test -n "$LIPO"; then
38089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38090 $as_echo "$LIPO" >&6; }
38091 else
38092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38093 $as_echo "no" >&6; }
38094 fi
38095 
38096 
38097   test -n "$LIPO" && break
38098 done
38099 
38100   else
38101     # The variable is set, but is it from the command line or the environment?
38102 
38103     # Try to remove the string !LIPO! from our list.
38104     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38105     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38106       # If it failed, the variable was not from the command line. Ignore it,
38107       # but warn the user (except for BASH, which is always set by the calling BASH).
38108       if test "xLIPO" != xBASH; then
38109         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38110 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38111       fi
38112       # Try to locate tool using the code snippet
38113       for ac_prog in lipo
38114 do
38115   # Extract the first word of "$ac_prog", so it can be a program name with args.
38116 set dummy $ac_prog; ac_word=$2
38117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38118 $as_echo_n "checking for $ac_word... " >&6; }
38119 if ${ac_cv_path_LIPO+:} false; then :
38120   $as_echo_n "(cached) " >&6
38121 else
38122   case $LIPO in
38123   [\\/]* | ?:[\\/]*)
38124   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38125   ;;
38126   *)
38127   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38128 for as_dir in $PATH
38129 do
38130   IFS=$as_save_IFS
38131   test -z "$as_dir" && as_dir=.
38132     for ac_exec_ext in '' $ac_executable_extensions; do
38133   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38134     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38135     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38136     break 2
38137   fi
38138 done
38139   done
38140 IFS=$as_save_IFS
38141 
38142   ;;
38143 esac
38144 fi
38145 LIPO=$ac_cv_path_LIPO
38146 if test -n "$LIPO"; then
38147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38148 $as_echo "$LIPO" >&6; }
38149 else
38150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38151 $as_echo "no" >&6; }
38152 fi
38153 
38154 
38155   test -n "$LIPO" && break
38156 done
38157 
38158     else
38159       # If it succeeded, then it was overridden by the user. We will use it
38160       # for the tool.
38161 
38162       # First remove it from the list of overridden variables, so we can test
38163       # for unknown variables in the end.
38164       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38165 
38166       # Check if we try to supply an empty value
38167       if test "x$LIPO" = x; then
38168         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38169 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38170         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38171 $as_echo_n "checking for LIPO... " >&6; }
38172         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38173 $as_echo "disabled" >&6; }
38174       else
38175         # Check if the provided tool contains a complete path.
38176         tool_specified="$LIPO"
38177         tool_basename="${tool_specified##*/}"
38178         if test "x$tool_basename" = "x$tool_specified"; then
38179           # A command without a complete path is provided, search $PATH.
38180           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38181 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38182           # Extract the first word of "$tool_basename", so it can be a program name with args.
38183 set dummy $tool_basename; ac_word=$2
38184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38185 $as_echo_n "checking for $ac_word... " >&6; }
38186 if ${ac_cv_path_LIPO+:} false; then :
38187   $as_echo_n "(cached) " >&6
38188 else
38189   case $LIPO in
38190   [\\/]* | ?:[\\/]*)
38191   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38192   ;;
38193   *)
38194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38195 for as_dir in $PATH
38196 do
38197   IFS=$as_save_IFS
38198   test -z "$as_dir" && as_dir=.
38199     for ac_exec_ext in '' $ac_executable_extensions; do
38200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38201     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38203     break 2
38204   fi
38205 done
38206   done
38207 IFS=$as_save_IFS
38208 
38209   ;;
38210 esac
38211 fi
38212 LIPO=$ac_cv_path_LIPO
38213 if test -n "$LIPO"; then
38214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38215 $as_echo "$LIPO" >&6; }
38216 else
38217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38218 $as_echo "no" >&6; }
38219 fi
38220 
38221 
38222           if test "x$LIPO" = x; then
38223             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38224           fi
38225         else
38226           # Otherwise we believe it is a complete path. Use it as it is.
38227           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38228 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38229           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38230 $as_echo_n "checking for LIPO... " >&6; }
38231           if test ! -x "$tool_specified"; then
38232             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38233 $as_echo "not found" >&6; }
38234             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38235           fi
38236           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38237 $as_echo "$tool_specified" >&6; }
38238         fi
38239       fi
38240     fi
38241 
38242   fi
38243 
38244 
38245 
38246   # Only process if variable expands to non-empty
38247 
38248   if test "x$LIPO" != x; then
38249     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38250 
38251   # First separate the path from the arguments. This will split at the first
38252   # space.
38253   complete="$LIPO"
38254   path="${complete%% *}"
38255   tmp="$complete EOL"
38256   arguments="${tmp#* }"
38257 
38258   # Input might be given as Windows format, start by converting to
38259   # unix format.
38260   new_path=`$CYGPATH -u "$path"`
38261 
38262   # Now try to locate executable using which
38263   new_path=`$WHICH "$new_path" 2> /dev/null`
38264   # bat and cmd files are not always considered executable in cygwin causing which
38265   # to not find them
38266   if test "x$new_path" = x \
38267       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38268       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38269     new_path=`$CYGPATH -u "$path"`
38270   fi
38271   if test "x$new_path" = x; then
38272     # Oops. Which didn't find the executable.
38273     # The splitting of arguments from the executable at a space might have been incorrect,
38274     # since paths with space are more likely in Windows. Give it another try with the whole
38275     # argument.
38276     path="$complete"
38277     arguments="EOL"
38278     new_path=`$CYGPATH -u "$path"`
38279     new_path=`$WHICH "$new_path" 2> /dev/null`
38280     # bat and cmd files are not always considered executable in cygwin causing which
38281     # to not find them
38282     if test "x$new_path" = x \
38283         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38284         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38285       new_path=`$CYGPATH -u "$path"`
38286     fi
38287     if test "x$new_path" = x; then
38288       # It's still not found. Now this is an unrecoverable error.
38289       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38290 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38291       has_space=`$ECHO "$complete" | $GREP " "`
38292       if test "x$has_space" != x; then
38293         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38294 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38295       fi
38296       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38297     fi
38298   fi
38299 
38300   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38301   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38302   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38303   # "foo.exe" is OK but "foo" is an error.
38304   #
38305   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38306   # It is also a way to make sure we got the proper file name for the real test later on.
38307   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38308   if test "x$test_shortpath" = x; then
38309     # Short path failed, file does not exist as specified.
38310     # Try adding .exe or .cmd
38311     if test -f "${new_path}.exe"; then
38312       input_to_shortpath="${new_path}.exe"
38313     elif test -f "${new_path}.cmd"; then
38314       input_to_shortpath="${new_path}.cmd"
38315     else
38316       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38317 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38318       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38319 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38320       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38321     fi
38322   else
38323     input_to_shortpath="$new_path"
38324   fi
38325 
38326   # Call helper function which possibly converts this using DOS-style short mode.
38327   # If so, the updated path is stored in $new_path.
38328   new_path="$input_to_shortpath"
38329 
38330   input_path="$input_to_shortpath"
38331   # Check if we need to convert this using DOS-style short mode. If the path
38332   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38333   # take no chances and rewrite it.
38334   # Note: m4 eats our [], so we need to use [ and ] instead.
38335   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38336   if test "x$has_forbidden_chars" != x; then
38337     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38338     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38339     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38340     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38341       # Going to short mode and back again did indeed matter. Since short mode is
38342       # case insensitive, let's make it lowercase to improve readability.
38343       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38344       # Now convert it back to Unix-style (cygpath)
38345       input_path=`$CYGPATH -u "$shortmode_path"`
38346       new_path="$input_path"
38347     fi
38348   fi
38349 
38350   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38351   if test "x$test_cygdrive_prefix" = x; then
38352     # As a simple fix, exclude /usr/bin since it's not a real path.
38353     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38354       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38355       # a path prefixed by /cygdrive for fixpath to work.
38356       new_path="$CYGWIN_ROOT_PATH$input_path"
38357     fi
38358   fi
38359 
38360   # remove trailing .exe if any
38361   new_path="${new_path/%.exe/}"
38362 
38363     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38364 
38365   # First separate the path from the arguments. This will split at the first
38366   # space.
38367   complete="$LIPO"
38368   path="${complete%% *}"
38369   tmp="$complete EOL"
38370   arguments="${tmp#* }"
38371 
38372   # Input might be given as Windows format, start by converting to
38373   # unix format.
38374   new_path="$path"
38375 
38376   windows_path="$new_path"
38377   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38378     unix_path=`$CYGPATH -u "$windows_path"`
38379     new_path="$unix_path"
38380   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38381     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38382     new_path="$unix_path"
38383   fi
38384 
38385 
38386   # Now try to locate executable using which
38387   new_path=`$WHICH "$new_path" 2> /dev/null`
38388 
38389   if test "x$new_path" = x; then
38390     # Oops. Which didn't find the executable.
38391     # The splitting of arguments from the executable at a space might have been incorrect,
38392     # since paths with space are more likely in Windows. Give it another try with the whole
38393     # argument.
38394     path="$complete"
38395     arguments="EOL"
38396     new_path="$path"
38397 
38398   windows_path="$new_path"
38399   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38400     unix_path=`$CYGPATH -u "$windows_path"`
38401     new_path="$unix_path"
38402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38403     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38404     new_path="$unix_path"
38405   fi
38406 
38407 
38408     new_path=`$WHICH "$new_path" 2> /dev/null`
38409     # bat and cmd files are not always considered executable in MSYS causing which
38410     # to not find them
38411     if test "x$new_path" = x \
38412         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38413         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38414       new_path="$path"
38415 
38416   windows_path="$new_path"
38417   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38418     unix_path=`$CYGPATH -u "$windows_path"`
38419     new_path="$unix_path"
38420   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38421     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38422     new_path="$unix_path"
38423   fi
38424 
38425     fi
38426 
38427     if test "x$new_path" = x; then
38428       # It's still not found. Now this is an unrecoverable error.
38429       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38430 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38431       has_space=`$ECHO "$complete" | $GREP " "`
38432       if test "x$has_space" != x; then
38433         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38434 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38435       fi
38436       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38437     fi
38438   fi
38439 
38440   # Now new_path has a complete unix path to the binary
38441   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38442     # Keep paths in /bin as-is, but remove trailing .exe if any
38443     new_path="${new_path/%.exe/}"
38444     # Do not save /bin paths to all_fixpath_prefixes!
38445   else
38446     # Not in mixed or Windows style, start by that.
38447     new_path=`cmd //c echo $new_path`
38448 
38449   input_path="$new_path"
38450   # Check if we need to convert this using DOS-style short mode. If the path
38451   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38452   # take no chances and rewrite it.
38453   # Note: m4 eats our [], so we need to use [ and ] instead.
38454   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38455   if test "x$has_forbidden_chars" != x; then
38456     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38457     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38458   fi
38459 
38460     # Output is in $new_path
38461 
38462   windows_path="$new_path"
38463   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38464     unix_path=`$CYGPATH -u "$windows_path"`
38465     new_path="$unix_path"
38466   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38467     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38468     new_path="$unix_path"
38469   fi
38470 
38471     # remove trailing .exe if any
38472     new_path="${new_path/%.exe/}"
38473 
38474     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38475     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38476   fi
38477 
38478     else
38479       # We're on a unix platform. Hooray! :)
38480       # First separate the path from the arguments. This will split at the first
38481       # space.
38482       complete="$LIPO"
38483       path="${complete%% *}"
38484       tmp="$complete EOL"
38485       arguments="${tmp#* }"
38486 
38487       # Cannot rely on the command "which" here since it doesn't always work.
38488       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38489       if test -z "$is_absolute_path"; then
38490         # Path to executable is not absolute. Find it.
38491         IFS_save="$IFS"
38492         IFS=:
38493         for p in $PATH; do
38494           if test -f "$p/$path" && test -x "$p/$path"; then
38495             new_path="$p/$path"
38496             break
38497           fi
38498         done
38499         IFS="$IFS_save"
38500       else
38501         # This is an absolute path, we can use it without further modifications.
38502         new_path="$path"
38503       fi
38504 
38505       if test "x$new_path" = x; then
38506         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38507 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38508         has_space=`$ECHO "$complete" | $GREP " "`
38509         if test "x$has_space" != x; then
38510           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38511 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38512         fi
38513         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38514       fi
38515     fi
38516 
38517     # Now join together the path and the arguments once again
38518     if test "x$arguments" != xEOL; then
38519       new_complete="$new_path ${arguments% *}"
38520     else
38521       new_complete="$new_path"
38522     fi
38523 
38524     if test "x$complete" != "x$new_complete"; then
38525       LIPO="$new_complete"
38526       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38527 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38528     fi
38529   fi
38530 
38531   fi
38532 
38533   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38534     # Extract the first word of "mt", so it can be a program name with args.
38535 set dummy mt; ac_word=$2
38536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38537 $as_echo_n "checking for $ac_word... " >&6; }
38538 if ${ac_cv_prog_MT+:} false; then :
38539   $as_echo_n "(cached) " >&6
38540 else
38541   if test -n "$MT"; then
38542   ac_cv_prog_MT="$MT" # Let the user override the test.
38543 else
38544   ac_prog_rejected=no
38545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38546 for as_dir in $PATH
38547 do
38548   IFS=$as_save_IFS
38549   test -z "$as_dir" && as_dir=.
38550     for ac_exec_ext in '' $ac_executable_extensions; do
38551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38552     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38553        ac_prog_rejected=yes
38554        continue
38555      fi
38556     ac_cv_prog_MT="mt"
38557     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38558     break 2
38559   fi
38560 done
38561   done
38562 IFS=$as_save_IFS
38563 
38564 if test $ac_prog_rejected = yes; then
38565   # We found a bogon in the path, so make sure we never use it.
38566   set dummy $ac_cv_prog_MT
38567   shift
38568   if test $# != 0; then
38569     # We chose a different compiler from the bogus one.
38570     # However, it has the same basename, so the bogon will be chosen
38571     # first if we set MT to just the basename; use the full file name.
38572     shift
38573     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38574   fi
38575 fi
38576 fi
38577 fi
38578 MT=$ac_cv_prog_MT
38579 if test -n "$MT"; then
38580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38581 $as_echo "$MT" >&6; }
38582 else
38583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38584 $as_echo "no" >&6; }
38585 fi
38586 
38587 
38588 
38589   # Only process if variable expands to non-empty
38590 
38591   if test "x$MT" != x; then
38592     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38593 
38594   # First separate the path from the arguments. This will split at the first
38595   # space.
38596   complete="$MT"
38597   path="${complete%% *}"
38598   tmp="$complete EOL"
38599   arguments="${tmp#* }"
38600 
38601   # Input might be given as Windows format, start by converting to
38602   # unix format.
38603   new_path=`$CYGPATH -u "$path"`
38604 
38605   # Now try to locate executable using which
38606   new_path=`$WHICH "$new_path" 2> /dev/null`
38607   # bat and cmd files are not always considered executable in cygwin causing which
38608   # to not find them
38609   if test "x$new_path" = x \
38610       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38611       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38612     new_path=`$CYGPATH -u "$path"`
38613   fi
38614   if test "x$new_path" = x; then
38615     # Oops. Which didn't find the executable.
38616     # The splitting of arguments from the executable at a space might have been incorrect,
38617     # since paths with space are more likely in Windows. Give it another try with the whole
38618     # argument.
38619     path="$complete"
38620     arguments="EOL"
38621     new_path=`$CYGPATH -u "$path"`
38622     new_path=`$WHICH "$new_path" 2> /dev/null`
38623     # bat and cmd files are not always considered executable in cygwin causing which
38624     # to not find them
38625     if test "x$new_path" = x \
38626         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38627         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38628       new_path=`$CYGPATH -u "$path"`
38629     fi
38630     if test "x$new_path" = x; then
38631       # It's still not found. Now this is an unrecoverable error.
38632       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38633 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38634       has_space=`$ECHO "$complete" | $GREP " "`
38635       if test "x$has_space" != x; then
38636         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38637 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38638       fi
38639       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38640     fi
38641   fi
38642 
38643   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38644   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38645   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38646   # "foo.exe" is OK but "foo" is an error.
38647   #
38648   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38649   # It is also a way to make sure we got the proper file name for the real test later on.
38650   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38651   if test "x$test_shortpath" = x; then
38652     # Short path failed, file does not exist as specified.
38653     # Try adding .exe or .cmd
38654     if test -f "${new_path}.exe"; then
38655       input_to_shortpath="${new_path}.exe"
38656     elif test -f "${new_path}.cmd"; then
38657       input_to_shortpath="${new_path}.cmd"
38658     else
38659       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38660 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38661       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38662 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38663       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38664     fi
38665   else
38666     input_to_shortpath="$new_path"
38667   fi
38668 
38669   # Call helper function which possibly converts this using DOS-style short mode.
38670   # If so, the updated path is stored in $new_path.
38671   new_path="$input_to_shortpath"
38672 
38673   input_path="$input_to_shortpath"
38674   # Check if we need to convert this using DOS-style short mode. If the path
38675   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38676   # take no chances and rewrite it.
38677   # Note: m4 eats our [], so we need to use [ and ] instead.
38678   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38679   if test "x$has_forbidden_chars" != x; then
38680     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38681     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38682     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38683     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38684       # Going to short mode and back again did indeed matter. Since short mode is
38685       # case insensitive, let's make it lowercase to improve readability.
38686       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38687       # Now convert it back to Unix-style (cygpath)
38688       input_path=`$CYGPATH -u "$shortmode_path"`
38689       new_path="$input_path"
38690     fi
38691   fi
38692 
38693   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38694   if test "x$test_cygdrive_prefix" = x; then
38695     # As a simple fix, exclude /usr/bin since it's not a real path.
38696     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38697       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38698       # a path prefixed by /cygdrive for fixpath to work.
38699       new_path="$CYGWIN_ROOT_PATH$input_path"
38700     fi
38701   fi
38702 
38703   # remove trailing .exe if any
38704   new_path="${new_path/%.exe/}"
38705 
38706     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38707 
38708   # First separate the path from the arguments. This will split at the first
38709   # space.
38710   complete="$MT"
38711   path="${complete%% *}"
38712   tmp="$complete EOL"
38713   arguments="${tmp#* }"
38714 
38715   # Input might be given as Windows format, start by converting to
38716   # unix format.
38717   new_path="$path"
38718 
38719   windows_path="$new_path"
38720   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38721     unix_path=`$CYGPATH -u "$windows_path"`
38722     new_path="$unix_path"
38723   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38724     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38725     new_path="$unix_path"
38726   fi
38727 
38728 
38729   # Now try to locate executable using which
38730   new_path=`$WHICH "$new_path" 2> /dev/null`
38731 
38732   if test "x$new_path" = x; then
38733     # Oops. Which didn't find the executable.
38734     # The splitting of arguments from the executable at a space might have been incorrect,
38735     # since paths with space are more likely in Windows. Give it another try with the whole
38736     # argument.
38737     path="$complete"
38738     arguments="EOL"
38739     new_path="$path"
38740 
38741   windows_path="$new_path"
38742   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38743     unix_path=`$CYGPATH -u "$windows_path"`
38744     new_path="$unix_path"
38745   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38746     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38747     new_path="$unix_path"
38748   fi
38749 
38750 
38751     new_path=`$WHICH "$new_path" 2> /dev/null`
38752     # bat and cmd files are not always considered executable in MSYS causing which
38753     # to not find them
38754     if test "x$new_path" = x \
38755         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38756         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38757       new_path="$path"
38758 
38759   windows_path="$new_path"
38760   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38761     unix_path=`$CYGPATH -u "$windows_path"`
38762     new_path="$unix_path"
38763   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38764     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38765     new_path="$unix_path"
38766   fi
38767 
38768     fi
38769 
38770     if test "x$new_path" = x; then
38771       # It's still not found. Now this is an unrecoverable error.
38772       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38773 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38774       has_space=`$ECHO "$complete" | $GREP " "`
38775       if test "x$has_space" != x; then
38776         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38777 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38778       fi
38779       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38780     fi
38781   fi
38782 
38783   # Now new_path has a complete unix path to the binary
38784   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38785     # Keep paths in /bin as-is, but remove trailing .exe if any
38786     new_path="${new_path/%.exe/}"
38787     # Do not save /bin paths to all_fixpath_prefixes!
38788   else
38789     # Not in mixed or Windows style, start by that.
38790     new_path=`cmd //c echo $new_path`
38791 
38792   input_path="$new_path"
38793   # Check if we need to convert this using DOS-style short mode. If the path
38794   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38795   # take no chances and rewrite it.
38796   # Note: m4 eats our [], so we need to use [ and ] instead.
38797   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38798   if test "x$has_forbidden_chars" != x; then
38799     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38800     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38801   fi
38802 
38803     # Output is in $new_path
38804 
38805   windows_path="$new_path"
38806   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38807     unix_path=`$CYGPATH -u "$windows_path"`
38808     new_path="$unix_path"
38809   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38810     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38811     new_path="$unix_path"
38812   fi
38813 
38814     # remove trailing .exe if any
38815     new_path="${new_path/%.exe/}"
38816 
38817     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38818     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38819   fi
38820 
38821     else
38822       # We're on a unix platform. Hooray! :)
38823       # First separate the path from the arguments. This will split at the first
38824       # space.
38825       complete="$MT"
38826       path="${complete%% *}"
38827       tmp="$complete EOL"
38828       arguments="${tmp#* }"
38829 
38830       # Cannot rely on the command "which" here since it doesn't always work.
38831       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38832       if test -z "$is_absolute_path"; then
38833         # Path to executable is not absolute. Find it.
38834         IFS_save="$IFS"
38835         IFS=:
38836         for p in $PATH; do
38837           if test -f "$p/$path" && test -x "$p/$path"; then
38838             new_path="$p/$path"
38839             break
38840           fi
38841         done
38842         IFS="$IFS_save"
38843       else
38844         # This is an absolute path, we can use it without further modifications.
38845         new_path="$path"
38846       fi
38847 
38848       if test "x$new_path" = x; then
38849         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38850 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38851         has_space=`$ECHO "$complete" | $GREP " "`
38852         if test "x$has_space" != x; then
38853           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38854 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38855         fi
38856         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38857       fi
38858     fi
38859 
38860     # Now join together the path and the arguments once again
38861     if test "x$arguments" != xEOL; then
38862       new_complete="$new_path ${arguments% *}"
38863     else
38864       new_complete="$new_path"
38865     fi
38866 
38867     if test "x$complete" != "x$new_complete"; then
38868       MT="$new_complete"
38869       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38870 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38871     fi
38872   fi
38873 
38874     # Setup the resource compiler (RC)
38875     # Extract the first word of "rc", so it can be a program name with args.
38876 set dummy rc; ac_word=$2
38877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38878 $as_echo_n "checking for $ac_word... " >&6; }
38879 if ${ac_cv_prog_RC+:} false; then :
38880   $as_echo_n "(cached) " >&6
38881 else
38882   if test -n "$RC"; then
38883   ac_cv_prog_RC="$RC" # Let the user override the test.
38884 else
38885   ac_prog_rejected=no
38886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38887 for as_dir in $PATH
38888 do
38889   IFS=$as_save_IFS
38890   test -z "$as_dir" && as_dir=.
38891     for ac_exec_ext in '' $ac_executable_extensions; do
38892   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38893     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38894        ac_prog_rejected=yes
38895        continue
38896      fi
38897     ac_cv_prog_RC="rc"
38898     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38899     break 2
38900   fi
38901 done
38902   done
38903 IFS=$as_save_IFS
38904 
38905 if test $ac_prog_rejected = yes; then
38906   # We found a bogon in the path, so make sure we never use it.
38907   set dummy $ac_cv_prog_RC
38908   shift
38909   if test $# != 0; then
38910     # We chose a different compiler from the bogus one.
38911     # However, it has the same basename, so the bogon will be chosen
38912     # first if we set RC to just the basename; use the full file name.
38913     shift
38914     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38915   fi
38916 fi
38917 fi
38918 fi
38919 RC=$ac_cv_prog_RC
38920 if test -n "$RC"; then
38921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38922 $as_echo "$RC" >&6; }
38923 else
38924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38925 $as_echo "no" >&6; }
38926 fi
38927 
38928 
38929 
38930   # Only process if variable expands to non-empty
38931 
38932   if test "x$RC" != x; then
38933     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38934 
38935   # First separate the path from the arguments. This will split at the first
38936   # space.
38937   complete="$RC"
38938   path="${complete%% *}"
38939   tmp="$complete EOL"
38940   arguments="${tmp#* }"
38941 
38942   # Input might be given as Windows format, start by converting to
38943   # unix format.
38944   new_path=`$CYGPATH -u "$path"`
38945 
38946   # Now try to locate executable using which
38947   new_path=`$WHICH "$new_path" 2> /dev/null`
38948   # bat and cmd files are not always considered executable in cygwin causing which
38949   # to not find them
38950   if test "x$new_path" = x \
38951       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38952       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38953     new_path=`$CYGPATH -u "$path"`
38954   fi
38955   if test "x$new_path" = x; then
38956     # Oops. Which didn't find the executable.
38957     # The splitting of arguments from the executable at a space might have been incorrect,
38958     # since paths with space are more likely in Windows. Give it another try with the whole
38959     # argument.
38960     path="$complete"
38961     arguments="EOL"
38962     new_path=`$CYGPATH -u "$path"`
38963     new_path=`$WHICH "$new_path" 2> /dev/null`
38964     # bat and cmd files are not always considered executable in cygwin causing which
38965     # to not find them
38966     if test "x$new_path" = x \
38967         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38968         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38969       new_path=`$CYGPATH -u "$path"`
38970     fi
38971     if test "x$new_path" = x; then
38972       # It's still not found. Now this is an unrecoverable error.
38973       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38974 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38975       has_space=`$ECHO "$complete" | $GREP " "`
38976       if test "x$has_space" != x; then
38977         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38978 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38979       fi
38980       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38981     fi
38982   fi
38983 
38984   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38985   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38986   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38987   # "foo.exe" is OK but "foo" is an error.
38988   #
38989   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38990   # It is also a way to make sure we got the proper file name for the real test later on.
38991   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38992   if test "x$test_shortpath" = x; then
38993     # Short path failed, file does not exist as specified.
38994     # Try adding .exe or .cmd
38995     if test -f "${new_path}.exe"; then
38996       input_to_shortpath="${new_path}.exe"
38997     elif test -f "${new_path}.cmd"; then
38998       input_to_shortpath="${new_path}.cmd"
38999     else
39000       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39001 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39002       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39003 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39004       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39005     fi
39006   else
39007     input_to_shortpath="$new_path"
39008   fi
39009 
39010   # Call helper function which possibly converts this using DOS-style short mode.
39011   # If so, the updated path is stored in $new_path.
39012   new_path="$input_to_shortpath"
39013 
39014   input_path="$input_to_shortpath"
39015   # Check if we need to convert this using DOS-style short mode. If the path
39016   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39017   # take no chances and rewrite it.
39018   # Note: m4 eats our [], so we need to use [ and ] instead.
39019   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39020   if test "x$has_forbidden_chars" != x; then
39021     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39022     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39023     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39024     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39025       # Going to short mode and back again did indeed matter. Since short mode is
39026       # case insensitive, let's make it lowercase to improve readability.
39027       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39028       # Now convert it back to Unix-style (cygpath)
39029       input_path=`$CYGPATH -u "$shortmode_path"`
39030       new_path="$input_path"
39031     fi
39032   fi
39033 
39034   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39035   if test "x$test_cygdrive_prefix" = x; then
39036     # As a simple fix, exclude /usr/bin since it's not a real path.
39037     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39038       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39039       # a path prefixed by /cygdrive for fixpath to work.
39040       new_path="$CYGWIN_ROOT_PATH$input_path"
39041     fi
39042   fi
39043 
39044   # remove trailing .exe if any
39045   new_path="${new_path/%.exe/}"
39046 
39047     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39048 
39049   # First separate the path from the arguments. This will split at the first
39050   # space.
39051   complete="$RC"
39052   path="${complete%% *}"
39053   tmp="$complete EOL"
39054   arguments="${tmp#* }"
39055 
39056   # Input might be given as Windows format, start by converting to
39057   # unix format.
39058   new_path="$path"
39059 
39060   windows_path="$new_path"
39061   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39062     unix_path=`$CYGPATH -u "$windows_path"`
39063     new_path="$unix_path"
39064   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39065     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39066     new_path="$unix_path"
39067   fi
39068 
39069 
39070   # Now try to locate executable using which
39071   new_path=`$WHICH "$new_path" 2> /dev/null`
39072 
39073   if test "x$new_path" = x; then
39074     # Oops. Which didn't find the executable.
39075     # The splitting of arguments from the executable at a space might have been incorrect,
39076     # since paths with space are more likely in Windows. Give it another try with the whole
39077     # argument.
39078     path="$complete"
39079     arguments="EOL"
39080     new_path="$path"
39081 
39082   windows_path="$new_path"
39083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39084     unix_path=`$CYGPATH -u "$windows_path"`
39085     new_path="$unix_path"
39086   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39087     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39088     new_path="$unix_path"
39089   fi
39090 
39091 
39092     new_path=`$WHICH "$new_path" 2> /dev/null`
39093     # bat and cmd files are not always considered executable in MSYS causing which
39094     # to not find them
39095     if test "x$new_path" = x \
39096         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39097         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39098       new_path="$path"
39099 
39100   windows_path="$new_path"
39101   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39102     unix_path=`$CYGPATH -u "$windows_path"`
39103     new_path="$unix_path"
39104   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39105     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39106     new_path="$unix_path"
39107   fi
39108 
39109     fi
39110 
39111     if test "x$new_path" = x; then
39112       # It's still not found. Now this is an unrecoverable error.
39113       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39114 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39115       has_space=`$ECHO "$complete" | $GREP " "`
39116       if test "x$has_space" != x; then
39117         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39118 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39119       fi
39120       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39121     fi
39122   fi
39123 
39124   # Now new_path has a complete unix path to the binary
39125   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39126     # Keep paths in /bin as-is, but remove trailing .exe if any
39127     new_path="${new_path/%.exe/}"
39128     # Do not save /bin paths to all_fixpath_prefixes!
39129   else
39130     # Not in mixed or Windows style, start by that.
39131     new_path=`cmd //c echo $new_path`
39132 
39133   input_path="$new_path"
39134   # Check if we need to convert this using DOS-style short mode. If the path
39135   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39136   # take no chances and rewrite it.
39137   # Note: m4 eats our [], so we need to use [ and ] instead.
39138   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39139   if test "x$has_forbidden_chars" != x; then
39140     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39141     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39142   fi
39143 
39144     # Output is in $new_path
39145 
39146   windows_path="$new_path"
39147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39148     unix_path=`$CYGPATH -u "$windows_path"`
39149     new_path="$unix_path"
39150   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39151     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39152     new_path="$unix_path"
39153   fi
39154 
39155     # remove trailing .exe if any
39156     new_path="${new_path/%.exe/}"
39157 
39158     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39159     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39160   fi
39161 
39162     else
39163       # We're on a unix platform. Hooray! :)
39164       # First separate the path from the arguments. This will split at the first
39165       # space.
39166       complete="$RC"
39167       path="${complete%% *}"
39168       tmp="$complete EOL"
39169       arguments="${tmp#* }"
39170 
39171       # Cannot rely on the command "which" here since it doesn't always work.
39172       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39173       if test -z "$is_absolute_path"; then
39174         # Path to executable is not absolute. Find it.
39175         IFS_save="$IFS"
39176         IFS=:
39177         for p in $PATH; do
39178           if test -f "$p/$path" && test -x "$p/$path"; then
39179             new_path="$p/$path"
39180             break
39181           fi
39182         done
39183         IFS="$IFS_save"
39184       else
39185         # This is an absolute path, we can use it without further modifications.
39186         new_path="$path"
39187       fi
39188 
39189       if test "x$new_path" = x; then
39190         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39191 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39192         has_space=`$ECHO "$complete" | $GREP " "`
39193         if test "x$has_space" != x; then
39194           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39195 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39196         fi
39197         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39198       fi
39199     fi
39200 
39201     # Now join together the path and the arguments once again
39202     if test "x$arguments" != xEOL; then
39203       new_complete="$new_path ${arguments% *}"
39204     else
39205       new_complete="$new_path"
39206     fi
39207 
39208     if test "x$complete" != "x$new_complete"; then
39209       RC="$new_complete"
39210       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39211 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39212     fi
39213   fi
39214 
39215     # Extract the first word of "dumpbin", so it can be a program name with args.
39216 set dummy dumpbin; ac_word=$2
39217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39218 $as_echo_n "checking for $ac_word... " >&6; }
39219 if ${ac_cv_prog_DUMPBIN+:} false; then :
39220   $as_echo_n "(cached) " >&6
39221 else
39222   if test -n "$DUMPBIN"; then
39223   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39224 else
39225 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39226 for as_dir in $PATH
39227 do
39228   IFS=$as_save_IFS
39229   test -z "$as_dir" && as_dir=.
39230     for ac_exec_ext in '' $ac_executable_extensions; do
39231   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39232     ac_cv_prog_DUMPBIN="dumpbin"
39233     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39234     break 2
39235   fi
39236 done
39237   done
39238 IFS=$as_save_IFS
39239 
39240 fi
39241 fi
39242 DUMPBIN=$ac_cv_prog_DUMPBIN
39243 if test -n "$DUMPBIN"; then
39244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39245 $as_echo "$DUMPBIN" >&6; }
39246 else
39247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39248 $as_echo "no" >&6; }
39249 fi
39250 
39251 
39252 
39253   # Only process if variable expands to non-empty
39254 
39255   if test "x$DUMPBIN" != x; then
39256     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39257 
39258   # First separate the path from the arguments. This will split at the first
39259   # space.
39260   complete="$DUMPBIN"
39261   path="${complete%% *}"
39262   tmp="$complete EOL"
39263   arguments="${tmp#* }"
39264 
39265   # Input might be given as Windows format, start by converting to
39266   # unix format.
39267   new_path=`$CYGPATH -u "$path"`
39268 
39269   # Now try to locate executable using which
39270   new_path=`$WHICH "$new_path" 2> /dev/null`
39271   # bat and cmd files are not always considered executable in cygwin causing which
39272   # to not find them
39273   if test "x$new_path" = x \
39274       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39275       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39276     new_path=`$CYGPATH -u "$path"`
39277   fi
39278   if test "x$new_path" = x; then
39279     # Oops. Which didn't find the executable.
39280     # The splitting of arguments from the executable at a space might have been incorrect,
39281     # since paths with space are more likely in Windows. Give it another try with the whole
39282     # argument.
39283     path="$complete"
39284     arguments="EOL"
39285     new_path=`$CYGPATH -u "$path"`
39286     new_path=`$WHICH "$new_path" 2> /dev/null`
39287     # bat and cmd files are not always considered executable in cygwin causing which
39288     # to not find them
39289     if test "x$new_path" = x \
39290         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39291         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39292       new_path=`$CYGPATH -u "$path"`
39293     fi
39294     if test "x$new_path" = x; then
39295       # It's still not found. Now this is an unrecoverable error.
39296       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39297 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39298       has_space=`$ECHO "$complete" | $GREP " "`
39299       if test "x$has_space" != x; then
39300         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39301 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39302       fi
39303       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39304     fi
39305   fi
39306 
39307   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39308   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39309   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39310   # "foo.exe" is OK but "foo" is an error.
39311   #
39312   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39313   # It is also a way to make sure we got the proper file name for the real test later on.
39314   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39315   if test "x$test_shortpath" = x; then
39316     # Short path failed, file does not exist as specified.
39317     # Try adding .exe or .cmd
39318     if test -f "${new_path}.exe"; then
39319       input_to_shortpath="${new_path}.exe"
39320     elif test -f "${new_path}.cmd"; then
39321       input_to_shortpath="${new_path}.cmd"
39322     else
39323       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39324 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39325       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39326 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39327       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39328     fi
39329   else
39330     input_to_shortpath="$new_path"
39331   fi
39332 
39333   # Call helper function which possibly converts this using DOS-style short mode.
39334   # If so, the updated path is stored in $new_path.
39335   new_path="$input_to_shortpath"
39336 
39337   input_path="$input_to_shortpath"
39338   # Check if we need to convert this using DOS-style short mode. If the path
39339   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39340   # take no chances and rewrite it.
39341   # Note: m4 eats our [], so we need to use [ and ] instead.
39342   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39343   if test "x$has_forbidden_chars" != x; then
39344     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39345     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39346     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39347     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39348       # Going to short mode and back again did indeed matter. Since short mode is
39349       # case insensitive, let's make it lowercase to improve readability.
39350       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39351       # Now convert it back to Unix-style (cygpath)
39352       input_path=`$CYGPATH -u "$shortmode_path"`
39353       new_path="$input_path"
39354     fi
39355   fi
39356 
39357   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39358   if test "x$test_cygdrive_prefix" = x; then
39359     # As a simple fix, exclude /usr/bin since it's not a real path.
39360     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39361       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39362       # a path prefixed by /cygdrive for fixpath to work.
39363       new_path="$CYGWIN_ROOT_PATH$input_path"
39364     fi
39365   fi
39366 
39367   # remove trailing .exe if any
39368   new_path="${new_path/%.exe/}"
39369 
39370     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39371 
39372   # First separate the path from the arguments. This will split at the first
39373   # space.
39374   complete="$DUMPBIN"
39375   path="${complete%% *}"
39376   tmp="$complete EOL"
39377   arguments="${tmp#* }"
39378 
39379   # Input might be given as Windows format, start by converting to
39380   # unix format.
39381   new_path="$path"
39382 
39383   windows_path="$new_path"
39384   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39385     unix_path=`$CYGPATH -u "$windows_path"`
39386     new_path="$unix_path"
39387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39388     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39389     new_path="$unix_path"
39390   fi
39391 
39392 
39393   # Now try to locate executable using which
39394   new_path=`$WHICH "$new_path" 2> /dev/null`
39395 
39396   if test "x$new_path" = x; then
39397     # Oops. Which didn't find the executable.
39398     # The splitting of arguments from the executable at a space might have been incorrect,
39399     # since paths with space are more likely in Windows. Give it another try with the whole
39400     # argument.
39401     path="$complete"
39402     arguments="EOL"
39403     new_path="$path"
39404 
39405   windows_path="$new_path"
39406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39407     unix_path=`$CYGPATH -u "$windows_path"`
39408     new_path="$unix_path"
39409   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39410     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39411     new_path="$unix_path"
39412   fi
39413 
39414 
39415     new_path=`$WHICH "$new_path" 2> /dev/null`
39416     # bat and cmd files are not always considered executable in MSYS causing which
39417     # to not find them
39418     if test "x$new_path" = x \
39419         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39420         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39421       new_path="$path"
39422 
39423   windows_path="$new_path"
39424   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39425     unix_path=`$CYGPATH -u "$windows_path"`
39426     new_path="$unix_path"
39427   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39428     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39429     new_path="$unix_path"
39430   fi
39431 
39432     fi
39433 
39434     if test "x$new_path" = x; then
39435       # It's still not found. Now this is an unrecoverable error.
39436       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39437 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39438       has_space=`$ECHO "$complete" | $GREP " "`
39439       if test "x$has_space" != x; then
39440         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39441 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39442       fi
39443       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39444     fi
39445   fi
39446 
39447   # Now new_path has a complete unix path to the binary
39448   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39449     # Keep paths in /bin as-is, but remove trailing .exe if any
39450     new_path="${new_path/%.exe/}"
39451     # Do not save /bin paths to all_fixpath_prefixes!
39452   else
39453     # Not in mixed or Windows style, start by that.
39454     new_path=`cmd //c echo $new_path`
39455 
39456   input_path="$new_path"
39457   # Check if we need to convert this using DOS-style short mode. If the path
39458   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39459   # take no chances and rewrite it.
39460   # Note: m4 eats our [], so we need to use [ and ] instead.
39461   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39462   if test "x$has_forbidden_chars" != x; then
39463     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39464     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39465   fi
39466 
39467     # Output is in $new_path
39468 
39469   windows_path="$new_path"
39470   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39471     unix_path=`$CYGPATH -u "$windows_path"`
39472     new_path="$unix_path"
39473   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39474     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39475     new_path="$unix_path"
39476   fi
39477 
39478     # remove trailing .exe if any
39479     new_path="${new_path/%.exe/}"
39480 
39481     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39482     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39483   fi
39484 
39485     else
39486       # We're on a unix platform. Hooray! :)
39487       # First separate the path from the arguments. This will split at the first
39488       # space.
39489       complete="$DUMPBIN"
39490       path="${complete%% *}"
39491       tmp="$complete EOL"
39492       arguments="${tmp#* }"
39493 
39494       # Cannot rely on the command "which" here since it doesn't always work.
39495       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39496       if test -z "$is_absolute_path"; then
39497         # Path to executable is not absolute. Find it.
39498         IFS_save="$IFS"
39499         IFS=:
39500         for p in $PATH; do
39501           if test -f "$p/$path" && test -x "$p/$path"; then
39502             new_path="$p/$path"
39503             break
39504           fi
39505         done
39506         IFS="$IFS_save"
39507       else
39508         # This is an absolute path, we can use it without further modifications.
39509         new_path="$path"
39510       fi
39511 
39512       if test "x$new_path" = x; then
39513         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39514 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39515         has_space=`$ECHO "$complete" | $GREP " "`
39516         if test "x$has_space" != x; then
39517           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39518 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39519         fi
39520         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39521       fi
39522     fi
39523 
39524     # Now join together the path and the arguments once again
39525     if test "x$arguments" != xEOL; then
39526       new_complete="$new_path ${arguments% *}"
39527     else
39528       new_complete="$new_path"
39529     fi
39530 
39531     if test "x$complete" != "x$new_complete"; then
39532       DUMPBIN="$new_complete"
39533       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39534 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39535     fi
39536   fi
39537 
39538     # We need to check for 'msbuild.exe' because at the place where we expect to
39539     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39540     # won't find the 'msbuild.exe' executable in that case (and the
39541     # 'ac_executable_extensions' is unusable due to performance reasons).
39542     # Notice that we intentionally don't fix up the path to MSBUILD because we
39543     # will call it in a DOS shell during freetype detection on Windows (see
39544     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39545     # Extract the first word of "msbuild.exe", so it can be a program name with args.
39546 set dummy msbuild.exe; ac_word=$2
39547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39548 $as_echo_n "checking for $ac_word... " >&6; }
39549 if ${ac_cv_prog_MSBUILD+:} false; then :
39550   $as_echo_n "(cached) " >&6
39551 else
39552   if test -n "$MSBUILD"; then
39553   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39554 else
39555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39556 for as_dir in $PATH
39557 do
39558   IFS=$as_save_IFS
39559   test -z "$as_dir" && as_dir=.
39560     for ac_exec_ext in '' $ac_executable_extensions; do
39561   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39562     ac_cv_prog_MSBUILD="msbuild.exe"
39563     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39564     break 2
39565   fi
39566 done
39567   done
39568 IFS=$as_save_IFS
39569 
39570 fi
39571 fi
39572 MSBUILD=$ac_cv_prog_MSBUILD
39573 if test -n "$MSBUILD"; then
39574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39575 $as_echo "$MSBUILD" >&6; }
39576 else
39577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39578 $as_echo "no" >&6; }
39579 fi
39580 
39581 
39582   fi
39583 
39584   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39585 
39586 
39587   # Publish this variable in the help.
39588 
39589 
39590   if [ -z "${STRIP+x}" ]; then
39591     # The variable is not set by user, try to locate tool using the code snippet
39592     for ac_prog in strip
39593 do
39594   # Extract the first word of "$ac_prog", so it can be a program name with args.
39595 set dummy $ac_prog; ac_word=$2
39596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39597 $as_echo_n "checking for $ac_word... " >&6; }
39598 if ${ac_cv_path_STRIP+:} false; then :
39599   $as_echo_n "(cached) " >&6
39600 else
39601   case $STRIP in
39602   [\\/]* | ?:[\\/]*)
39603   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39604   ;;
39605   *)
39606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39607 for as_dir in $PATH
39608 do
39609   IFS=$as_save_IFS
39610   test -z "$as_dir" && as_dir=.
39611     for ac_exec_ext in '' $ac_executable_extensions; do
39612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39613     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39615     break 2
39616   fi
39617 done
39618   done
39619 IFS=$as_save_IFS
39620 
39621   ;;
39622 esac
39623 fi
39624 STRIP=$ac_cv_path_STRIP
39625 if test -n "$STRIP"; then
39626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39627 $as_echo "$STRIP" >&6; }
39628 else
39629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39630 $as_echo "no" >&6; }
39631 fi
39632 
39633 
39634   test -n "$STRIP" && break
39635 done
39636 
39637   else
39638     # The variable is set, but is it from the command line or the environment?
39639 
39640     # Try to remove the string !STRIP! from our list.
39641     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39642     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39643       # If it failed, the variable was not from the command line. Ignore it,
39644       # but warn the user (except for BASH, which is always set by the calling BASH).
39645       if test "xSTRIP" != xBASH; then
39646         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39647 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39648       fi
39649       # Try to locate tool using the code snippet
39650       for ac_prog in strip
39651 do
39652   # Extract the first word of "$ac_prog", so it can be a program name with args.
39653 set dummy $ac_prog; ac_word=$2
39654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39655 $as_echo_n "checking for $ac_word... " >&6; }
39656 if ${ac_cv_path_STRIP+:} false; then :
39657   $as_echo_n "(cached) " >&6
39658 else
39659   case $STRIP in
39660   [\\/]* | ?:[\\/]*)
39661   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39662   ;;
39663   *)
39664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39665 for as_dir in $PATH
39666 do
39667   IFS=$as_save_IFS
39668   test -z "$as_dir" && as_dir=.
39669     for ac_exec_ext in '' $ac_executable_extensions; do
39670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39671     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39673     break 2
39674   fi
39675 done
39676   done
39677 IFS=$as_save_IFS
39678 
39679   ;;
39680 esac
39681 fi
39682 STRIP=$ac_cv_path_STRIP
39683 if test -n "$STRIP"; then
39684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39685 $as_echo "$STRIP" >&6; }
39686 else
39687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39688 $as_echo "no" >&6; }
39689 fi
39690 
39691 
39692   test -n "$STRIP" && break
39693 done
39694 
39695     else
39696       # If it succeeded, then it was overridden by the user. We will use it
39697       # for the tool.
39698 
39699       # First remove it from the list of overridden variables, so we can test
39700       # for unknown variables in the end.
39701       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39702 
39703       # Check if we try to supply an empty value
39704       if test "x$STRIP" = x; then
39705         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39706 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39707         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39708 $as_echo_n "checking for STRIP... " >&6; }
39709         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39710 $as_echo "disabled" >&6; }
39711       else
39712         # Check if the provided tool contains a complete path.
39713         tool_specified="$STRIP"
39714         tool_basename="${tool_specified##*/}"
39715         if test "x$tool_basename" = "x$tool_specified"; then
39716           # A command without a complete path is provided, search $PATH.
39717           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39718 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39719           # Extract the first word of "$tool_basename", so it can be a program name with args.
39720 set dummy $tool_basename; ac_word=$2
39721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39722 $as_echo_n "checking for $ac_word... " >&6; }
39723 if ${ac_cv_path_STRIP+:} false; then :
39724   $as_echo_n "(cached) " >&6
39725 else
39726   case $STRIP in
39727   [\\/]* | ?:[\\/]*)
39728   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39729   ;;
39730   *)
39731   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39732 for as_dir in $PATH
39733 do
39734   IFS=$as_save_IFS
39735   test -z "$as_dir" && as_dir=.
39736     for ac_exec_ext in '' $ac_executable_extensions; do
39737   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39738     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39739     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39740     break 2
39741   fi
39742 done
39743   done
39744 IFS=$as_save_IFS
39745 
39746   ;;
39747 esac
39748 fi
39749 STRIP=$ac_cv_path_STRIP
39750 if test -n "$STRIP"; then
39751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39752 $as_echo "$STRIP" >&6; }
39753 else
39754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39755 $as_echo "no" >&6; }
39756 fi
39757 
39758 
39759           if test "x$STRIP" = x; then
39760             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39761           fi
39762         else
39763           # Otherwise we believe it is a complete path. Use it as it is.
39764           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39765 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39766           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39767 $as_echo_n "checking for STRIP... " >&6; }
39768           if test ! -x "$tool_specified"; then
39769             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39770 $as_echo "not found" >&6; }
39771             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39772           fi
39773           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39774 $as_echo "$tool_specified" >&6; }
39775         fi
39776       fi
39777     fi
39778 
39779   fi
39780 
39781 
39782 
39783   # Only process if variable expands to non-empty
39784 
39785   if test "x$STRIP" != x; then
39786     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39787 
39788   # First separate the path from the arguments. This will split at the first
39789   # space.
39790   complete="$STRIP"
39791   path="${complete%% *}"
39792   tmp="$complete EOL"
39793   arguments="${tmp#* }"
39794 
39795   # Input might be given as Windows format, start by converting to
39796   # unix format.
39797   new_path=`$CYGPATH -u "$path"`
39798 
39799   # Now try to locate executable using which
39800   new_path=`$WHICH "$new_path" 2> /dev/null`
39801   # bat and cmd files are not always considered executable in cygwin causing which
39802   # to not find them
39803   if test "x$new_path" = x \
39804       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39805       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39806     new_path=`$CYGPATH -u "$path"`
39807   fi
39808   if test "x$new_path" = x; then
39809     # Oops. Which didn't find the executable.
39810     # The splitting of arguments from the executable at a space might have been incorrect,
39811     # since paths with space are more likely in Windows. Give it another try with the whole
39812     # argument.
39813     path="$complete"
39814     arguments="EOL"
39815     new_path=`$CYGPATH -u "$path"`
39816     new_path=`$WHICH "$new_path" 2> /dev/null`
39817     # bat and cmd files are not always considered executable in cygwin causing which
39818     # to not find them
39819     if test "x$new_path" = x \
39820         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39821         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39822       new_path=`$CYGPATH -u "$path"`
39823     fi
39824     if test "x$new_path" = x; then
39825       # It's still not found. Now this is an unrecoverable error.
39826       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39827 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39828       has_space=`$ECHO "$complete" | $GREP " "`
39829       if test "x$has_space" != x; then
39830         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39831 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39832       fi
39833       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39834     fi
39835   fi
39836 
39837   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39838   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39839   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39840   # "foo.exe" is OK but "foo" is an error.
39841   #
39842   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39843   # It is also a way to make sure we got the proper file name for the real test later on.
39844   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39845   if test "x$test_shortpath" = x; then
39846     # Short path failed, file does not exist as specified.
39847     # Try adding .exe or .cmd
39848     if test -f "${new_path}.exe"; then
39849       input_to_shortpath="${new_path}.exe"
39850     elif test -f "${new_path}.cmd"; then
39851       input_to_shortpath="${new_path}.cmd"
39852     else
39853       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39854 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39855       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39856 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39857       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39858     fi
39859   else
39860     input_to_shortpath="$new_path"
39861   fi
39862 
39863   # Call helper function which possibly converts this using DOS-style short mode.
39864   # If so, the updated path is stored in $new_path.
39865   new_path="$input_to_shortpath"
39866 
39867   input_path="$input_to_shortpath"
39868   # Check if we need to convert this using DOS-style short mode. If the path
39869   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39870   # take no chances and rewrite it.
39871   # Note: m4 eats our [], so we need to use [ and ] instead.
39872   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39873   if test "x$has_forbidden_chars" != x; then
39874     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39875     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39876     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39877     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39878       # Going to short mode and back again did indeed matter. Since short mode is
39879       # case insensitive, let's make it lowercase to improve readability.
39880       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39881       # Now convert it back to Unix-style (cygpath)
39882       input_path=`$CYGPATH -u "$shortmode_path"`
39883       new_path="$input_path"
39884     fi
39885   fi
39886 
39887   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39888   if test "x$test_cygdrive_prefix" = x; then
39889     # As a simple fix, exclude /usr/bin since it's not a real path.
39890     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39891       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39892       # a path prefixed by /cygdrive for fixpath to work.
39893       new_path="$CYGWIN_ROOT_PATH$input_path"
39894     fi
39895   fi
39896 
39897   # remove trailing .exe if any
39898   new_path="${new_path/%.exe/}"
39899 
39900     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39901 
39902   # First separate the path from the arguments. This will split at the first
39903   # space.
39904   complete="$STRIP"
39905   path="${complete%% *}"
39906   tmp="$complete EOL"
39907   arguments="${tmp#* }"
39908 
39909   # Input might be given as Windows format, start by converting to
39910   # unix format.
39911   new_path="$path"
39912 
39913   windows_path="$new_path"
39914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39915     unix_path=`$CYGPATH -u "$windows_path"`
39916     new_path="$unix_path"
39917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39918     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39919     new_path="$unix_path"
39920   fi
39921 
39922 
39923   # Now try to locate executable using which
39924   new_path=`$WHICH "$new_path" 2> /dev/null`
39925 
39926   if test "x$new_path" = x; then
39927     # Oops. Which didn't find the executable.
39928     # The splitting of arguments from the executable at a space might have been incorrect,
39929     # since paths with space are more likely in Windows. Give it another try with the whole
39930     # argument.
39931     path="$complete"
39932     arguments="EOL"
39933     new_path="$path"
39934 
39935   windows_path="$new_path"
39936   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39937     unix_path=`$CYGPATH -u "$windows_path"`
39938     new_path="$unix_path"
39939   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39940     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39941     new_path="$unix_path"
39942   fi
39943 
39944 
39945     new_path=`$WHICH "$new_path" 2> /dev/null`
39946     # bat and cmd files are not always considered executable in MSYS causing which
39947     # to not find them
39948     if test "x$new_path" = x \
39949         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39950         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39951       new_path="$path"
39952 
39953   windows_path="$new_path"
39954   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39955     unix_path=`$CYGPATH -u "$windows_path"`
39956     new_path="$unix_path"
39957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39958     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39959     new_path="$unix_path"
39960   fi
39961 
39962     fi
39963 
39964     if test "x$new_path" = x; then
39965       # It's still not found. Now this is an unrecoverable error.
39966       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39967 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39968       has_space=`$ECHO "$complete" | $GREP " "`
39969       if test "x$has_space" != x; then
39970         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39971 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39972       fi
39973       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39974     fi
39975   fi
39976 
39977   # Now new_path has a complete unix path to the binary
39978   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39979     # Keep paths in /bin as-is, but remove trailing .exe if any
39980     new_path="${new_path/%.exe/}"
39981     # Do not save /bin paths to all_fixpath_prefixes!
39982   else
39983     # Not in mixed or Windows style, start by that.
39984     new_path=`cmd //c echo $new_path`
39985 
39986   input_path="$new_path"
39987   # Check if we need to convert this using DOS-style short mode. If the path
39988   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39989   # take no chances and rewrite it.
39990   # Note: m4 eats our [], so we need to use [ and ] instead.
39991   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39992   if test "x$has_forbidden_chars" != x; then
39993     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39994     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39995   fi
39996 
39997     # Output is in $new_path
39998 
39999   windows_path="$new_path"
40000   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40001     unix_path=`$CYGPATH -u "$windows_path"`
40002     new_path="$unix_path"
40003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40004     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40005     new_path="$unix_path"
40006   fi
40007 
40008     # remove trailing .exe if any
40009     new_path="${new_path/%.exe/}"
40010 
40011     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40012     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40013   fi
40014 
40015     else
40016       # We're on a unix platform. Hooray! :)
40017       # First separate the path from the arguments. This will split at the first
40018       # space.
40019       complete="$STRIP"
40020       path="${complete%% *}"
40021       tmp="$complete EOL"
40022       arguments="${tmp#* }"
40023 
40024       # Cannot rely on the command "which" here since it doesn't always work.
40025       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40026       if test -z "$is_absolute_path"; then
40027         # Path to executable is not absolute. Find it.
40028         IFS_save="$IFS"
40029         IFS=:
40030         for p in $PATH; do
40031           if test -f "$p/$path" && test -x "$p/$path"; then
40032             new_path="$p/$path"
40033             break
40034           fi
40035         done
40036         IFS="$IFS_save"
40037       else
40038         # This is an absolute path, we can use it without further modifications.
40039         new_path="$path"
40040       fi
40041 
40042       if test "x$new_path" = x; then
40043         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40044 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40045         has_space=`$ECHO "$complete" | $GREP " "`
40046         if test "x$has_space" != x; then
40047           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40048 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40049         fi
40050         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40051       fi
40052     fi
40053 
40054     # Now join together the path and the arguments once again
40055     if test "x$arguments" != xEOL; then
40056       new_complete="$new_path ${arguments% *}"
40057     else
40058       new_complete="$new_path"
40059     fi
40060 
40061     if test "x$complete" != "x$new_complete"; then
40062       STRIP="$new_complete"
40063       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40064 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40065     fi
40066   fi
40067 
40068 
40069 
40070   # Publish this variable in the help.
40071 
40072 
40073   if [ -z "${NM+x}" ]; then
40074     # The variable is not set by user, try to locate tool using the code snippet
40075     for ac_prog in nm
40076 do
40077   # Extract the first word of "$ac_prog", so it can be a program name with args.
40078 set dummy $ac_prog; ac_word=$2
40079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40080 $as_echo_n "checking for $ac_word... " >&6; }
40081 if ${ac_cv_path_NM+:} false; then :
40082   $as_echo_n "(cached) " >&6
40083 else
40084   case $NM in
40085   [\\/]* | ?:[\\/]*)
40086   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40087   ;;
40088   *)
40089   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40090 for as_dir in $PATH
40091 do
40092   IFS=$as_save_IFS
40093   test -z "$as_dir" && as_dir=.
40094     for ac_exec_ext in '' $ac_executable_extensions; do
40095   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40096     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40097     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40098     break 2
40099   fi
40100 done
40101   done
40102 IFS=$as_save_IFS
40103 
40104   ;;
40105 esac
40106 fi
40107 NM=$ac_cv_path_NM
40108 if test -n "$NM"; then
40109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40110 $as_echo "$NM" >&6; }
40111 else
40112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40113 $as_echo "no" >&6; }
40114 fi
40115 
40116 
40117   test -n "$NM" && break
40118 done
40119 
40120   else
40121     # The variable is set, but is it from the command line or the environment?
40122 
40123     # Try to remove the string !NM! from our list.
40124     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40125     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40126       # If it failed, the variable was not from the command line. Ignore it,
40127       # but warn the user (except for BASH, which is always set by the calling BASH).
40128       if test "xNM" != xBASH; then
40129         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40130 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40131       fi
40132       # Try to locate tool using the code snippet
40133       for ac_prog in nm
40134 do
40135   # Extract the first word of "$ac_prog", so it can be a program name with args.
40136 set dummy $ac_prog; ac_word=$2
40137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40138 $as_echo_n "checking for $ac_word... " >&6; }
40139 if ${ac_cv_path_NM+:} false; then :
40140   $as_echo_n "(cached) " >&6
40141 else
40142   case $NM in
40143   [\\/]* | ?:[\\/]*)
40144   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40145   ;;
40146   *)
40147   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40148 for as_dir in $PATH
40149 do
40150   IFS=$as_save_IFS
40151   test -z "$as_dir" && as_dir=.
40152     for ac_exec_ext in '' $ac_executable_extensions; do
40153   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40154     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40155     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40156     break 2
40157   fi
40158 done
40159   done
40160 IFS=$as_save_IFS
40161 
40162   ;;
40163 esac
40164 fi
40165 NM=$ac_cv_path_NM
40166 if test -n "$NM"; then
40167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40168 $as_echo "$NM" >&6; }
40169 else
40170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40171 $as_echo "no" >&6; }
40172 fi
40173 
40174 
40175   test -n "$NM" && break
40176 done
40177 
40178     else
40179       # If it succeeded, then it was overridden by the user. We will use it
40180       # for the tool.
40181 
40182       # First remove it from the list of overridden variables, so we can test
40183       # for unknown variables in the end.
40184       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40185 
40186       # Check if we try to supply an empty value
40187       if test "x$NM" = x; then
40188         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40189 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40190         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40191 $as_echo_n "checking for NM... " >&6; }
40192         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40193 $as_echo "disabled" >&6; }
40194       else
40195         # Check if the provided tool contains a complete path.
40196         tool_specified="$NM"
40197         tool_basename="${tool_specified##*/}"
40198         if test "x$tool_basename" = "x$tool_specified"; then
40199           # A command without a complete path is provided, search $PATH.
40200           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40201 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40202           # Extract the first word of "$tool_basename", so it can be a program name with args.
40203 set dummy $tool_basename; ac_word=$2
40204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40205 $as_echo_n "checking for $ac_word... " >&6; }
40206 if ${ac_cv_path_NM+:} false; then :
40207   $as_echo_n "(cached) " >&6
40208 else
40209   case $NM in
40210   [\\/]* | ?:[\\/]*)
40211   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40212   ;;
40213   *)
40214   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40215 for as_dir in $PATH
40216 do
40217   IFS=$as_save_IFS
40218   test -z "$as_dir" && as_dir=.
40219     for ac_exec_ext in '' $ac_executable_extensions; do
40220   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40221     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40222     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40223     break 2
40224   fi
40225 done
40226   done
40227 IFS=$as_save_IFS
40228 
40229   ;;
40230 esac
40231 fi
40232 NM=$ac_cv_path_NM
40233 if test -n "$NM"; then
40234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40235 $as_echo "$NM" >&6; }
40236 else
40237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40238 $as_echo "no" >&6; }
40239 fi
40240 
40241 
40242           if test "x$NM" = x; then
40243             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40244           fi
40245         else
40246           # Otherwise we believe it is a complete path. Use it as it is.
40247           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40248 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40249           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40250 $as_echo_n "checking for NM... " >&6; }
40251           if test ! -x "$tool_specified"; then
40252             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40253 $as_echo "not found" >&6; }
40254             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40255           fi
40256           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40257 $as_echo "$tool_specified" >&6; }
40258         fi
40259       fi
40260     fi
40261 
40262   fi
40263 
40264 
40265 
40266   # Only process if variable expands to non-empty
40267 
40268   if test "x$NM" != x; then
40269     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40270 
40271   # First separate the path from the arguments. This will split at the first
40272   # space.
40273   complete="$NM"
40274   path="${complete%% *}"
40275   tmp="$complete EOL"
40276   arguments="${tmp#* }"
40277 
40278   # Input might be given as Windows format, start by converting to
40279   # unix format.
40280   new_path=`$CYGPATH -u "$path"`
40281 
40282   # Now try to locate executable using which
40283   new_path=`$WHICH "$new_path" 2> /dev/null`
40284   # bat and cmd files are not always considered executable in cygwin causing which
40285   # to not find them
40286   if test "x$new_path" = x \
40287       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40288       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40289     new_path=`$CYGPATH -u "$path"`
40290   fi
40291   if test "x$new_path" = x; then
40292     # Oops. Which didn't find the executable.
40293     # The splitting of arguments from the executable at a space might have been incorrect,
40294     # since paths with space are more likely in Windows. Give it another try with the whole
40295     # argument.
40296     path="$complete"
40297     arguments="EOL"
40298     new_path=`$CYGPATH -u "$path"`
40299     new_path=`$WHICH "$new_path" 2> /dev/null`
40300     # bat and cmd files are not always considered executable in cygwin causing which
40301     # to not find them
40302     if test "x$new_path" = x \
40303         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40304         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40305       new_path=`$CYGPATH -u "$path"`
40306     fi
40307     if test "x$new_path" = x; then
40308       # It's still not found. Now this is an unrecoverable error.
40309       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40310 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40311       has_space=`$ECHO "$complete" | $GREP " "`
40312       if test "x$has_space" != x; then
40313         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40314 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40315       fi
40316       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40317     fi
40318   fi
40319 
40320   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40321   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40322   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40323   # "foo.exe" is OK but "foo" is an error.
40324   #
40325   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40326   # It is also a way to make sure we got the proper file name for the real test later on.
40327   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40328   if test "x$test_shortpath" = x; then
40329     # Short path failed, file does not exist as specified.
40330     # Try adding .exe or .cmd
40331     if test -f "${new_path}.exe"; then
40332       input_to_shortpath="${new_path}.exe"
40333     elif test -f "${new_path}.cmd"; then
40334       input_to_shortpath="${new_path}.cmd"
40335     else
40336       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40337 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40338       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40339 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40340       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40341     fi
40342   else
40343     input_to_shortpath="$new_path"
40344   fi
40345 
40346   # Call helper function which possibly converts this using DOS-style short mode.
40347   # If so, the updated path is stored in $new_path.
40348   new_path="$input_to_shortpath"
40349 
40350   input_path="$input_to_shortpath"
40351   # Check if we need to convert this using DOS-style short mode. If the path
40352   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40353   # take no chances and rewrite it.
40354   # Note: m4 eats our [], so we need to use [ and ] instead.
40355   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40356   if test "x$has_forbidden_chars" != x; then
40357     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40358     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40359     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40360     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40361       # Going to short mode and back again did indeed matter. Since short mode is
40362       # case insensitive, let's make it lowercase to improve readability.
40363       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40364       # Now convert it back to Unix-style (cygpath)
40365       input_path=`$CYGPATH -u "$shortmode_path"`
40366       new_path="$input_path"
40367     fi
40368   fi
40369 
40370   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40371   if test "x$test_cygdrive_prefix" = x; then
40372     # As a simple fix, exclude /usr/bin since it's not a real path.
40373     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40374       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40375       # a path prefixed by /cygdrive for fixpath to work.
40376       new_path="$CYGWIN_ROOT_PATH$input_path"
40377     fi
40378   fi
40379 
40380   # remove trailing .exe if any
40381   new_path="${new_path/%.exe/}"
40382 
40383     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40384 
40385   # First separate the path from the arguments. This will split at the first
40386   # space.
40387   complete="$NM"
40388   path="${complete%% *}"
40389   tmp="$complete EOL"
40390   arguments="${tmp#* }"
40391 
40392   # Input might be given as Windows format, start by converting to
40393   # unix format.
40394   new_path="$path"
40395 
40396   windows_path="$new_path"
40397   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40398     unix_path=`$CYGPATH -u "$windows_path"`
40399     new_path="$unix_path"
40400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40401     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40402     new_path="$unix_path"
40403   fi
40404 
40405 
40406   # Now try to locate executable using which
40407   new_path=`$WHICH "$new_path" 2> /dev/null`
40408 
40409   if test "x$new_path" = x; then
40410     # Oops. Which didn't find the executable.
40411     # The splitting of arguments from the executable at a space might have been incorrect,
40412     # since paths with space are more likely in Windows. Give it another try with the whole
40413     # argument.
40414     path="$complete"
40415     arguments="EOL"
40416     new_path="$path"
40417 
40418   windows_path="$new_path"
40419   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40420     unix_path=`$CYGPATH -u "$windows_path"`
40421     new_path="$unix_path"
40422   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40423     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40424     new_path="$unix_path"
40425   fi
40426 
40427 
40428     new_path=`$WHICH "$new_path" 2> /dev/null`
40429     # bat and cmd files are not always considered executable in MSYS causing which
40430     # to not find them
40431     if test "x$new_path" = x \
40432         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40433         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40434       new_path="$path"
40435 
40436   windows_path="$new_path"
40437   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40438     unix_path=`$CYGPATH -u "$windows_path"`
40439     new_path="$unix_path"
40440   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40441     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40442     new_path="$unix_path"
40443   fi
40444 
40445     fi
40446 
40447     if test "x$new_path" = x; then
40448       # It's still not found. Now this is an unrecoverable error.
40449       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40450 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40451       has_space=`$ECHO "$complete" | $GREP " "`
40452       if test "x$has_space" != x; then
40453         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40454 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40455       fi
40456       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40457     fi
40458   fi
40459 
40460   # Now new_path has a complete unix path to the binary
40461   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40462     # Keep paths in /bin as-is, but remove trailing .exe if any
40463     new_path="${new_path/%.exe/}"
40464     # Do not save /bin paths to all_fixpath_prefixes!
40465   else
40466     # Not in mixed or Windows style, start by that.
40467     new_path=`cmd //c echo $new_path`
40468 
40469   input_path="$new_path"
40470   # Check if we need to convert this using DOS-style short mode. If the path
40471   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40472   # take no chances and rewrite it.
40473   # Note: m4 eats our [], so we need to use [ and ] instead.
40474   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40475   if test "x$has_forbidden_chars" != x; then
40476     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40477     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40478   fi
40479 
40480     # Output is in $new_path
40481 
40482   windows_path="$new_path"
40483   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40484     unix_path=`$CYGPATH -u "$windows_path"`
40485     new_path="$unix_path"
40486   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40487     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40488     new_path="$unix_path"
40489   fi
40490 
40491     # remove trailing .exe if any
40492     new_path="${new_path/%.exe/}"
40493 
40494     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40495     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40496   fi
40497 
40498     else
40499       # We're on a unix platform. Hooray! :)
40500       # First separate the path from the arguments. This will split at the first
40501       # space.
40502       complete="$NM"
40503       path="${complete%% *}"
40504       tmp="$complete EOL"
40505       arguments="${tmp#* }"
40506 
40507       # Cannot rely on the command "which" here since it doesn't always work.
40508       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40509       if test -z "$is_absolute_path"; then
40510         # Path to executable is not absolute. Find it.
40511         IFS_save="$IFS"
40512         IFS=:
40513         for p in $PATH; do
40514           if test -f "$p/$path" && test -x "$p/$path"; then
40515             new_path="$p/$path"
40516             break
40517           fi
40518         done
40519         IFS="$IFS_save"
40520       else
40521         # This is an absolute path, we can use it without further modifications.
40522         new_path="$path"
40523       fi
40524 
40525       if test "x$new_path" = x; then
40526         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40527 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40528         has_space=`$ECHO "$complete" | $GREP " "`
40529         if test "x$has_space" != x; then
40530           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40531 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40532         fi
40533         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40534       fi
40535     fi
40536 
40537     # Now join together the path and the arguments once again
40538     if test "x$arguments" != xEOL; then
40539       new_complete="$new_path ${arguments% *}"
40540     else
40541       new_complete="$new_path"
40542     fi
40543 
40544     if test "x$complete" != "x$new_complete"; then
40545       NM="$new_complete"
40546       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40547 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40548     fi
40549   fi
40550 
40551 
40552 
40553   # Publish this variable in the help.
40554 
40555 
40556   if [ -z "${GNM+x}" ]; then
40557     # The variable is not set by user, try to locate tool using the code snippet
40558     for ac_prog in gnm
40559 do
40560   # Extract the first word of "$ac_prog", so it can be a program name with args.
40561 set dummy $ac_prog; ac_word=$2
40562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40563 $as_echo_n "checking for $ac_word... " >&6; }
40564 if ${ac_cv_path_GNM+:} false; then :
40565   $as_echo_n "(cached) " >&6
40566 else
40567   case $GNM in
40568   [\\/]* | ?:[\\/]*)
40569   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40570   ;;
40571   *)
40572   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40573 for as_dir in $PATH
40574 do
40575   IFS=$as_save_IFS
40576   test -z "$as_dir" && as_dir=.
40577     for ac_exec_ext in '' $ac_executable_extensions; do
40578   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40579     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40580     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40581     break 2
40582   fi
40583 done
40584   done
40585 IFS=$as_save_IFS
40586 
40587   ;;
40588 esac
40589 fi
40590 GNM=$ac_cv_path_GNM
40591 if test -n "$GNM"; then
40592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40593 $as_echo "$GNM" >&6; }
40594 else
40595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40596 $as_echo "no" >&6; }
40597 fi
40598 
40599 
40600   test -n "$GNM" && break
40601 done
40602 
40603   else
40604     # The variable is set, but is it from the command line or the environment?
40605 
40606     # Try to remove the string !GNM! from our list.
40607     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40608     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40609       # If it failed, the variable was not from the command line. Ignore it,
40610       # but warn the user (except for BASH, which is always set by the calling BASH).
40611       if test "xGNM" != xBASH; then
40612         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40613 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40614       fi
40615       # Try to locate tool using the code snippet
40616       for ac_prog in gnm
40617 do
40618   # Extract the first word of "$ac_prog", so it can be a program name with args.
40619 set dummy $ac_prog; ac_word=$2
40620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40621 $as_echo_n "checking for $ac_word... " >&6; }
40622 if ${ac_cv_path_GNM+:} false; then :
40623   $as_echo_n "(cached) " >&6
40624 else
40625   case $GNM in
40626   [\\/]* | ?:[\\/]*)
40627   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40628   ;;
40629   *)
40630   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40631 for as_dir in $PATH
40632 do
40633   IFS=$as_save_IFS
40634   test -z "$as_dir" && as_dir=.
40635     for ac_exec_ext in '' $ac_executable_extensions; do
40636   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40637     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40638     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40639     break 2
40640   fi
40641 done
40642   done
40643 IFS=$as_save_IFS
40644 
40645   ;;
40646 esac
40647 fi
40648 GNM=$ac_cv_path_GNM
40649 if test -n "$GNM"; then
40650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40651 $as_echo "$GNM" >&6; }
40652 else
40653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40654 $as_echo "no" >&6; }
40655 fi
40656 
40657 
40658   test -n "$GNM" && break
40659 done
40660 
40661     else
40662       # If it succeeded, then it was overridden by the user. We will use it
40663       # for the tool.
40664 
40665       # First remove it from the list of overridden variables, so we can test
40666       # for unknown variables in the end.
40667       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40668 
40669       # Check if we try to supply an empty value
40670       if test "x$GNM" = x; then
40671         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40672 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40673         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40674 $as_echo_n "checking for GNM... " >&6; }
40675         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40676 $as_echo "disabled" >&6; }
40677       else
40678         # Check if the provided tool contains a complete path.
40679         tool_specified="$GNM"
40680         tool_basename="${tool_specified##*/}"
40681         if test "x$tool_basename" = "x$tool_specified"; then
40682           # A command without a complete path is provided, search $PATH.
40683           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40684 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40685           # Extract the first word of "$tool_basename", so it can be a program name with args.
40686 set dummy $tool_basename; ac_word=$2
40687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40688 $as_echo_n "checking for $ac_word... " >&6; }
40689 if ${ac_cv_path_GNM+:} false; then :
40690   $as_echo_n "(cached) " >&6
40691 else
40692   case $GNM in
40693   [\\/]* | ?:[\\/]*)
40694   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40695   ;;
40696   *)
40697   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40698 for as_dir in $PATH
40699 do
40700   IFS=$as_save_IFS
40701   test -z "$as_dir" && as_dir=.
40702     for ac_exec_ext in '' $ac_executable_extensions; do
40703   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40704     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40705     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40706     break 2
40707   fi
40708 done
40709   done
40710 IFS=$as_save_IFS
40711 
40712   ;;
40713 esac
40714 fi
40715 GNM=$ac_cv_path_GNM
40716 if test -n "$GNM"; then
40717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40718 $as_echo "$GNM" >&6; }
40719 else
40720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40721 $as_echo "no" >&6; }
40722 fi
40723 
40724 
40725           if test "x$GNM" = x; then
40726             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40727           fi
40728         else
40729           # Otherwise we believe it is a complete path. Use it as it is.
40730           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40731 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40732           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40733 $as_echo_n "checking for GNM... " >&6; }
40734           if test ! -x "$tool_specified"; then
40735             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40736 $as_echo "not found" >&6; }
40737             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40738           fi
40739           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40740 $as_echo "$tool_specified" >&6; }
40741         fi
40742       fi
40743     fi
40744 
40745   fi
40746 
40747 
40748 
40749   # Only process if variable expands to non-empty
40750 
40751   if test "x$GNM" != x; then
40752     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40753 
40754   # First separate the path from the arguments. This will split at the first
40755   # space.
40756   complete="$GNM"
40757   path="${complete%% *}"
40758   tmp="$complete EOL"
40759   arguments="${tmp#* }"
40760 
40761   # Input might be given as Windows format, start by converting to
40762   # unix format.
40763   new_path=`$CYGPATH -u "$path"`
40764 
40765   # Now try to locate executable using which
40766   new_path=`$WHICH "$new_path" 2> /dev/null`
40767   # bat and cmd files are not always considered executable in cygwin causing which
40768   # to not find them
40769   if test "x$new_path" = x \
40770       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40771       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40772     new_path=`$CYGPATH -u "$path"`
40773   fi
40774   if test "x$new_path" = x; then
40775     # Oops. Which didn't find the executable.
40776     # The splitting of arguments from the executable at a space might have been incorrect,
40777     # since paths with space are more likely in Windows. Give it another try with the whole
40778     # argument.
40779     path="$complete"
40780     arguments="EOL"
40781     new_path=`$CYGPATH -u "$path"`
40782     new_path=`$WHICH "$new_path" 2> /dev/null`
40783     # bat and cmd files are not always considered executable in cygwin causing which
40784     # to not find them
40785     if test "x$new_path" = x \
40786         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40787         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40788       new_path=`$CYGPATH -u "$path"`
40789     fi
40790     if test "x$new_path" = x; then
40791       # It's still not found. Now this is an unrecoverable error.
40792       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40793 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40794       has_space=`$ECHO "$complete" | $GREP " "`
40795       if test "x$has_space" != x; then
40796         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40797 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40798       fi
40799       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40800     fi
40801   fi
40802 
40803   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40804   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40805   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40806   # "foo.exe" is OK but "foo" is an error.
40807   #
40808   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40809   # It is also a way to make sure we got the proper file name for the real test later on.
40810   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40811   if test "x$test_shortpath" = x; then
40812     # Short path failed, file does not exist as specified.
40813     # Try adding .exe or .cmd
40814     if test -f "${new_path}.exe"; then
40815       input_to_shortpath="${new_path}.exe"
40816     elif test -f "${new_path}.cmd"; then
40817       input_to_shortpath="${new_path}.cmd"
40818     else
40819       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40820 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40821       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40822 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40823       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40824     fi
40825   else
40826     input_to_shortpath="$new_path"
40827   fi
40828 
40829   # Call helper function which possibly converts this using DOS-style short mode.
40830   # If so, the updated path is stored in $new_path.
40831   new_path="$input_to_shortpath"
40832 
40833   input_path="$input_to_shortpath"
40834   # Check if we need to convert this using DOS-style short mode. If the path
40835   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40836   # take no chances and rewrite it.
40837   # Note: m4 eats our [], so we need to use [ and ] instead.
40838   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40839   if test "x$has_forbidden_chars" != x; then
40840     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40841     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40842     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40843     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40844       # Going to short mode and back again did indeed matter. Since short mode is
40845       # case insensitive, let's make it lowercase to improve readability.
40846       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40847       # Now convert it back to Unix-style (cygpath)
40848       input_path=`$CYGPATH -u "$shortmode_path"`
40849       new_path="$input_path"
40850     fi
40851   fi
40852 
40853   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40854   if test "x$test_cygdrive_prefix" = x; then
40855     # As a simple fix, exclude /usr/bin since it's not a real path.
40856     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40857       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40858       # a path prefixed by /cygdrive for fixpath to work.
40859       new_path="$CYGWIN_ROOT_PATH$input_path"
40860     fi
40861   fi
40862 
40863   # remove trailing .exe if any
40864   new_path="${new_path/%.exe/}"
40865 
40866     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40867 
40868   # First separate the path from the arguments. This will split at the first
40869   # space.
40870   complete="$GNM"
40871   path="${complete%% *}"
40872   tmp="$complete EOL"
40873   arguments="${tmp#* }"
40874 
40875   # Input might be given as Windows format, start by converting to
40876   # unix format.
40877   new_path="$path"
40878 
40879   windows_path="$new_path"
40880   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40881     unix_path=`$CYGPATH -u "$windows_path"`
40882     new_path="$unix_path"
40883   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40884     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40885     new_path="$unix_path"
40886   fi
40887 
40888 
40889   # Now try to locate executable using which
40890   new_path=`$WHICH "$new_path" 2> /dev/null`
40891 
40892   if test "x$new_path" = x; then
40893     # Oops. Which didn't find the executable.
40894     # The splitting of arguments from the executable at a space might have been incorrect,
40895     # since paths with space are more likely in Windows. Give it another try with the whole
40896     # argument.
40897     path="$complete"
40898     arguments="EOL"
40899     new_path="$path"
40900 
40901   windows_path="$new_path"
40902   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40903     unix_path=`$CYGPATH -u "$windows_path"`
40904     new_path="$unix_path"
40905   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40906     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40907     new_path="$unix_path"
40908   fi
40909 
40910 
40911     new_path=`$WHICH "$new_path" 2> /dev/null`
40912     # bat and cmd files are not always considered executable in MSYS causing which
40913     # to not find them
40914     if test "x$new_path" = x \
40915         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40916         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40917       new_path="$path"
40918 
40919   windows_path="$new_path"
40920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40921     unix_path=`$CYGPATH -u "$windows_path"`
40922     new_path="$unix_path"
40923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40924     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40925     new_path="$unix_path"
40926   fi
40927 
40928     fi
40929 
40930     if test "x$new_path" = x; then
40931       # It's still not found. Now this is an unrecoverable error.
40932       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40933 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40934       has_space=`$ECHO "$complete" | $GREP " "`
40935       if test "x$has_space" != x; then
40936         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40937 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40938       fi
40939       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40940     fi
40941   fi
40942 
40943   # Now new_path has a complete unix path to the binary
40944   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40945     # Keep paths in /bin as-is, but remove trailing .exe if any
40946     new_path="${new_path/%.exe/}"
40947     # Do not save /bin paths to all_fixpath_prefixes!
40948   else
40949     # Not in mixed or Windows style, start by that.
40950     new_path=`cmd //c echo $new_path`
40951 
40952   input_path="$new_path"
40953   # Check if we need to convert this using DOS-style short mode. If the path
40954   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40955   # take no chances and rewrite it.
40956   # Note: m4 eats our [], so we need to use [ and ] instead.
40957   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40958   if test "x$has_forbidden_chars" != x; then
40959     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40960     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40961   fi
40962 
40963     # Output is in $new_path
40964 
40965   windows_path="$new_path"
40966   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40967     unix_path=`$CYGPATH -u "$windows_path"`
40968     new_path="$unix_path"
40969   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40970     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40971     new_path="$unix_path"
40972   fi
40973 
40974     # remove trailing .exe if any
40975     new_path="${new_path/%.exe/}"
40976 
40977     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40978     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40979   fi
40980 
40981     else
40982       # We're on a unix platform. Hooray! :)
40983       # First separate the path from the arguments. This will split at the first
40984       # space.
40985       complete="$GNM"
40986       path="${complete%% *}"
40987       tmp="$complete EOL"
40988       arguments="${tmp#* }"
40989 
40990       # Cannot rely on the command "which" here since it doesn't always work.
40991       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40992       if test -z "$is_absolute_path"; then
40993         # Path to executable is not absolute. Find it.
40994         IFS_save="$IFS"
40995         IFS=:
40996         for p in $PATH; do
40997           if test -f "$p/$path" && test -x "$p/$path"; then
40998             new_path="$p/$path"
40999             break
41000           fi
41001         done
41002         IFS="$IFS_save"
41003       else
41004         # This is an absolute path, we can use it without further modifications.
41005         new_path="$path"
41006       fi
41007 
41008       if test "x$new_path" = x; then
41009         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41010 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41011         has_space=`$ECHO "$complete" | $GREP " "`
41012         if test "x$has_space" != x; then
41013           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41014 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41015         fi
41016         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41017       fi
41018     fi
41019 
41020     # Now join together the path and the arguments once again
41021     if test "x$arguments" != xEOL; then
41022       new_complete="$new_path ${arguments% *}"
41023     else
41024       new_complete="$new_path"
41025     fi
41026 
41027     if test "x$complete" != "x$new_complete"; then
41028       GNM="$new_complete"
41029       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41030 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41031     fi
41032   fi
41033 
41034   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41035     # FIXME: we should unify this with the solaris case above.
41036 
41037 
41038   # Publish this variable in the help.
41039 
41040 
41041   if [ -z "${STRIP+x}" ]; then
41042     # The variable is not set by user, try to locate tool using the code snippet
41043     if test -n "$ac_tool_prefix"; then
41044   for ac_prog in strip
41045   do
41046     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41047 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41049 $as_echo_n "checking for $ac_word... " >&6; }
41050 if ${ac_cv_prog_STRIP+:} false; then :
41051   $as_echo_n "(cached) " >&6
41052 else
41053   if test -n "$STRIP"; then
41054   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41055 else
41056 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41057 for as_dir in $PATH
41058 do
41059   IFS=$as_save_IFS
41060   test -z "$as_dir" && as_dir=.
41061     for ac_exec_ext in '' $ac_executable_extensions; do
41062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41063     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41065     break 2
41066   fi
41067 done
41068   done
41069 IFS=$as_save_IFS
41070 
41071 fi
41072 fi
41073 STRIP=$ac_cv_prog_STRIP
41074 if test -n "$STRIP"; then
41075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41076 $as_echo "$STRIP" >&6; }
41077 else
41078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41079 $as_echo "no" >&6; }
41080 fi
41081 
41082 
41083     test -n "$STRIP" && break
41084   done
41085 fi
41086 if test -z "$STRIP"; then
41087   ac_ct_STRIP=$STRIP
41088   for ac_prog in strip
41089 do
41090   # Extract the first word of "$ac_prog", so it can be a program name with args.
41091 set dummy $ac_prog; ac_word=$2
41092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41093 $as_echo_n "checking for $ac_word... " >&6; }
41094 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41095   $as_echo_n "(cached) " >&6
41096 else
41097   if test -n "$ac_ct_STRIP"; then
41098   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41099 else
41100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41101 for as_dir in $PATH
41102 do
41103   IFS=$as_save_IFS
41104   test -z "$as_dir" && as_dir=.
41105     for ac_exec_ext in '' $ac_executable_extensions; do
41106   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41107     ac_cv_prog_ac_ct_STRIP="$ac_prog"
41108     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41109     break 2
41110   fi
41111 done
41112   done
41113 IFS=$as_save_IFS
41114 
41115 fi
41116 fi
41117 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41118 if test -n "$ac_ct_STRIP"; then
41119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41120 $as_echo "$ac_ct_STRIP" >&6; }
41121 else
41122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41123 $as_echo "no" >&6; }
41124 fi
41125 
41126 
41127   test -n "$ac_ct_STRIP" && break
41128 done
41129 
41130   if test "x$ac_ct_STRIP" = x; then
41131     STRIP=""
41132   else
41133     case $cross_compiling:$ac_tool_warned in
41134 yes:)
41135 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41136 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41137 ac_tool_warned=yes ;;
41138 esac
41139     STRIP=$ac_ct_STRIP
41140   fi
41141 fi
41142 
41143   else
41144     # The variable is set, but is it from the command line or the environment?
41145 
41146     # Try to remove the string !STRIP! from our list.
41147     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41148     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41149       # If it failed, the variable was not from the command line. Ignore it,
41150       # but warn the user (except for BASH, which is always set by the calling BASH).
41151       if test "xSTRIP" != xBASH; then
41152         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41153 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41154       fi
41155       # Try to locate tool using the code snippet
41156       if test -n "$ac_tool_prefix"; then
41157   for ac_prog in strip
41158   do
41159     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41160 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41162 $as_echo_n "checking for $ac_word... " >&6; }
41163 if ${ac_cv_prog_STRIP+:} false; then :
41164   $as_echo_n "(cached) " >&6
41165 else
41166   if test -n "$STRIP"; then
41167   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41168 else
41169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41170 for as_dir in $PATH
41171 do
41172   IFS=$as_save_IFS
41173   test -z "$as_dir" && as_dir=.
41174     for ac_exec_ext in '' $ac_executable_extensions; do
41175   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41176     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41177     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41178     break 2
41179   fi
41180 done
41181   done
41182 IFS=$as_save_IFS
41183 
41184 fi
41185 fi
41186 STRIP=$ac_cv_prog_STRIP
41187 if test -n "$STRIP"; then
41188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41189 $as_echo "$STRIP" >&6; }
41190 else
41191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41192 $as_echo "no" >&6; }
41193 fi
41194 
41195 
41196     test -n "$STRIP" && break
41197   done
41198 fi
41199 if test -z "$STRIP"; then
41200   ac_ct_STRIP=$STRIP
41201   for ac_prog in strip
41202 do
41203   # Extract the first word of "$ac_prog", so it can be a program name with args.
41204 set dummy $ac_prog; ac_word=$2
41205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41206 $as_echo_n "checking for $ac_word... " >&6; }
41207 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41208   $as_echo_n "(cached) " >&6
41209 else
41210   if test -n "$ac_ct_STRIP"; then
41211   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41212 else
41213 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41214 for as_dir in $PATH
41215 do
41216   IFS=$as_save_IFS
41217   test -z "$as_dir" && as_dir=.
41218     for ac_exec_ext in '' $ac_executable_extensions; do
41219   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41220     ac_cv_prog_ac_ct_STRIP="$ac_prog"
41221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41222     break 2
41223   fi
41224 done
41225   done
41226 IFS=$as_save_IFS
41227 
41228 fi
41229 fi
41230 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41231 if test -n "$ac_ct_STRIP"; then
41232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41233 $as_echo "$ac_ct_STRIP" >&6; }
41234 else
41235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41236 $as_echo "no" >&6; }
41237 fi
41238 
41239 
41240   test -n "$ac_ct_STRIP" && break
41241 done
41242 
41243   if test "x$ac_ct_STRIP" = x; then
41244     STRIP=""
41245   else
41246     case $cross_compiling:$ac_tool_warned in
41247 yes:)
41248 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41249 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41250 ac_tool_warned=yes ;;
41251 esac
41252     STRIP=$ac_ct_STRIP
41253   fi
41254 fi
41255 
41256     else
41257       # If it succeeded, then it was overridden by the user. We will use it
41258       # for the tool.
41259 
41260       # First remove it from the list of overridden variables, so we can test
41261       # for unknown variables in the end.
41262       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41263 
41264       # Check if we try to supply an empty value
41265       if test "x$STRIP" = x; then
41266         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41267 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41268         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41269 $as_echo_n "checking for STRIP... " >&6; }
41270         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41271 $as_echo "disabled" >&6; }
41272       else
41273         # Check if the provided tool contains a complete path.
41274         tool_specified="$STRIP"
41275         tool_basename="${tool_specified##*/}"
41276         if test "x$tool_basename" = "x$tool_specified"; then
41277           # A command without a complete path is provided, search $PATH.
41278           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41279 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41280           # Extract the first word of "$tool_basename", so it can be a program name with args.
41281 set dummy $tool_basename; ac_word=$2
41282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41283 $as_echo_n "checking for $ac_word... " >&6; }
41284 if ${ac_cv_path_STRIP+:} false; then :
41285   $as_echo_n "(cached) " >&6
41286 else
41287   case $STRIP in
41288   [\\/]* | ?:[\\/]*)
41289   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41290   ;;
41291   *)
41292   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41293 for as_dir in $PATH
41294 do
41295   IFS=$as_save_IFS
41296   test -z "$as_dir" && as_dir=.
41297     for ac_exec_ext in '' $ac_executable_extensions; do
41298   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41299     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41300     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41301     break 2
41302   fi
41303 done
41304   done
41305 IFS=$as_save_IFS
41306 
41307   ;;
41308 esac
41309 fi
41310 STRIP=$ac_cv_path_STRIP
41311 if test -n "$STRIP"; then
41312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41313 $as_echo "$STRIP" >&6; }
41314 else
41315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41316 $as_echo "no" >&6; }
41317 fi
41318 
41319 
41320           if test "x$STRIP" = x; then
41321             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41322           fi
41323         else
41324           # Otherwise we believe it is a complete path. Use it as it is.
41325           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41326 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41327           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41328 $as_echo_n "checking for STRIP... " >&6; }
41329           if test ! -x "$tool_specified"; then
41330             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41331 $as_echo "not found" >&6; }
41332             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41333           fi
41334           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41335 $as_echo "$tool_specified" >&6; }
41336         fi
41337       fi
41338     fi
41339 
41340   fi
41341 
41342 
41343 
41344   # Only process if variable expands to non-empty
41345 
41346   if test "x$STRIP" != x; then
41347     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41348 
41349   # First separate the path from the arguments. This will split at the first
41350   # space.
41351   complete="$STRIP"
41352   path="${complete%% *}"
41353   tmp="$complete EOL"
41354   arguments="${tmp#* }"
41355 
41356   # Input might be given as Windows format, start by converting to
41357   # unix format.
41358   new_path=`$CYGPATH -u "$path"`
41359 
41360   # Now try to locate executable using which
41361   new_path=`$WHICH "$new_path" 2> /dev/null`
41362   # bat and cmd files are not always considered executable in cygwin causing which
41363   # to not find them
41364   if test "x$new_path" = x \
41365       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41366       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41367     new_path=`$CYGPATH -u "$path"`
41368   fi
41369   if test "x$new_path" = x; then
41370     # Oops. Which didn't find the executable.
41371     # The splitting of arguments from the executable at a space might have been incorrect,
41372     # since paths with space are more likely in Windows. Give it another try with the whole
41373     # argument.
41374     path="$complete"
41375     arguments="EOL"
41376     new_path=`$CYGPATH -u "$path"`
41377     new_path=`$WHICH "$new_path" 2> /dev/null`
41378     # bat and cmd files are not always considered executable in cygwin causing which
41379     # to not find them
41380     if test "x$new_path" = x \
41381         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41382         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41383       new_path=`$CYGPATH -u "$path"`
41384     fi
41385     if test "x$new_path" = x; then
41386       # It's still not found. Now this is an unrecoverable error.
41387       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41388 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41389       has_space=`$ECHO "$complete" | $GREP " "`
41390       if test "x$has_space" != x; then
41391         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41392 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41393       fi
41394       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41395     fi
41396   fi
41397 
41398   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41399   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41400   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41401   # "foo.exe" is OK but "foo" is an error.
41402   #
41403   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41404   # It is also a way to make sure we got the proper file name for the real test later on.
41405   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41406   if test "x$test_shortpath" = x; then
41407     # Short path failed, file does not exist as specified.
41408     # Try adding .exe or .cmd
41409     if test -f "${new_path}.exe"; then
41410       input_to_shortpath="${new_path}.exe"
41411     elif test -f "${new_path}.cmd"; then
41412       input_to_shortpath="${new_path}.cmd"
41413     else
41414       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41415 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41416       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41417 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41418       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41419     fi
41420   else
41421     input_to_shortpath="$new_path"
41422   fi
41423 
41424   # Call helper function which possibly converts this using DOS-style short mode.
41425   # If so, the updated path is stored in $new_path.
41426   new_path="$input_to_shortpath"
41427 
41428   input_path="$input_to_shortpath"
41429   # Check if we need to convert this using DOS-style short mode. If the path
41430   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41431   # take no chances and rewrite it.
41432   # Note: m4 eats our [], so we need to use [ and ] instead.
41433   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41434   if test "x$has_forbidden_chars" != x; then
41435     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41436     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41437     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41438     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41439       # Going to short mode and back again did indeed matter. Since short mode is
41440       # case insensitive, let's make it lowercase to improve readability.
41441       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41442       # Now convert it back to Unix-style (cygpath)
41443       input_path=`$CYGPATH -u "$shortmode_path"`
41444       new_path="$input_path"
41445     fi
41446   fi
41447 
41448   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41449   if test "x$test_cygdrive_prefix" = x; then
41450     # As a simple fix, exclude /usr/bin since it's not a real path.
41451     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41452       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41453       # a path prefixed by /cygdrive for fixpath to work.
41454       new_path="$CYGWIN_ROOT_PATH$input_path"
41455     fi
41456   fi
41457 
41458   # remove trailing .exe if any
41459   new_path="${new_path/%.exe/}"
41460 
41461     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41462 
41463   # First separate the path from the arguments. This will split at the first
41464   # space.
41465   complete="$STRIP"
41466   path="${complete%% *}"
41467   tmp="$complete EOL"
41468   arguments="${tmp#* }"
41469 
41470   # Input might be given as Windows format, start by converting to
41471   # unix format.
41472   new_path="$path"
41473 
41474   windows_path="$new_path"
41475   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41476     unix_path=`$CYGPATH -u "$windows_path"`
41477     new_path="$unix_path"
41478   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41479     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41480     new_path="$unix_path"
41481   fi
41482 
41483 
41484   # Now try to locate executable using which
41485   new_path=`$WHICH "$new_path" 2> /dev/null`
41486 
41487   if test "x$new_path" = x; then
41488     # Oops. Which didn't find the executable.
41489     # The splitting of arguments from the executable at a space might have been incorrect,
41490     # since paths with space are more likely in Windows. Give it another try with the whole
41491     # argument.
41492     path="$complete"
41493     arguments="EOL"
41494     new_path="$path"
41495 
41496   windows_path="$new_path"
41497   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41498     unix_path=`$CYGPATH -u "$windows_path"`
41499     new_path="$unix_path"
41500   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41501     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41502     new_path="$unix_path"
41503   fi
41504 
41505 
41506     new_path=`$WHICH "$new_path" 2> /dev/null`
41507     # bat and cmd files are not always considered executable in MSYS causing which
41508     # to not find them
41509     if test "x$new_path" = x \
41510         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41511         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41512       new_path="$path"
41513 
41514   windows_path="$new_path"
41515   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41516     unix_path=`$CYGPATH -u "$windows_path"`
41517     new_path="$unix_path"
41518   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41519     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41520     new_path="$unix_path"
41521   fi
41522 
41523     fi
41524 
41525     if test "x$new_path" = x; then
41526       # It's still not found. Now this is an unrecoverable error.
41527       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41528 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41529       has_space=`$ECHO "$complete" | $GREP " "`
41530       if test "x$has_space" != x; then
41531         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41532 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41533       fi
41534       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41535     fi
41536   fi
41537 
41538   # Now new_path has a complete unix path to the binary
41539   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41540     # Keep paths in /bin as-is, but remove trailing .exe if any
41541     new_path="${new_path/%.exe/}"
41542     # Do not save /bin paths to all_fixpath_prefixes!
41543   else
41544     # Not in mixed or Windows style, start by that.
41545     new_path=`cmd //c echo $new_path`
41546 
41547   input_path="$new_path"
41548   # Check if we need to convert this using DOS-style short mode. If the path
41549   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41550   # take no chances and rewrite it.
41551   # Note: m4 eats our [], so we need to use [ and ] instead.
41552   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41553   if test "x$has_forbidden_chars" != x; then
41554     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41555     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41556   fi
41557 
41558     # Output is in $new_path
41559 
41560   windows_path="$new_path"
41561   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41562     unix_path=`$CYGPATH -u "$windows_path"`
41563     new_path="$unix_path"
41564   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41565     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41566     new_path="$unix_path"
41567   fi
41568 
41569     # remove trailing .exe if any
41570     new_path="${new_path/%.exe/}"
41571 
41572     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41573     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41574   fi
41575 
41576     else
41577       # We're on a unix platform. Hooray! :)
41578       # First separate the path from the arguments. This will split at the first
41579       # space.
41580       complete="$STRIP"
41581       path="${complete%% *}"
41582       tmp="$complete EOL"
41583       arguments="${tmp#* }"
41584 
41585       # Cannot rely on the command "which" here since it doesn't always work.
41586       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41587       if test -z "$is_absolute_path"; then
41588         # Path to executable is not absolute. Find it.
41589         IFS_save="$IFS"
41590         IFS=:
41591         for p in $PATH; do
41592           if test -f "$p/$path" && test -x "$p/$path"; then
41593             new_path="$p/$path"
41594             break
41595           fi
41596         done
41597         IFS="$IFS_save"
41598       else
41599         # This is an absolute path, we can use it without further modifications.
41600         new_path="$path"
41601       fi
41602 
41603       if test "x$new_path" = x; then
41604         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41605 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41606         has_space=`$ECHO "$complete" | $GREP " "`
41607         if test "x$has_space" != x; then
41608           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41609 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41610         fi
41611         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41612       fi
41613     fi
41614 
41615     # Now join together the path and the arguments once again
41616     if test "x$arguments" != xEOL; then
41617       new_complete="$new_path ${arguments% *}"
41618     else
41619       new_complete="$new_path"
41620     fi
41621 
41622     if test "x$complete" != "x$new_complete"; then
41623       STRIP="$new_complete"
41624       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41625 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41626     fi
41627   fi
41628 
41629     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41630 
41631 
41632   # Publish this variable in the help.
41633 
41634 
41635   if [ -z "${NM+x}" ]; then
41636     # The variable is not set by user, try to locate tool using the code snippet
41637     if test -n "$ac_tool_prefix"; then
41638   for ac_prog in nm gcc-nm
41639   do
41640     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41641 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41643 $as_echo_n "checking for $ac_word... " >&6; }
41644 if ${ac_cv_prog_NM+:} false; then :
41645   $as_echo_n "(cached) " >&6
41646 else
41647   if test -n "$NM"; then
41648   ac_cv_prog_NM="$NM" # Let the user override the test.
41649 else
41650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41651 for as_dir in $PATH
41652 do
41653   IFS=$as_save_IFS
41654   test -z "$as_dir" && as_dir=.
41655     for ac_exec_ext in '' $ac_executable_extensions; do
41656   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41657     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41659     break 2
41660   fi
41661 done
41662   done
41663 IFS=$as_save_IFS
41664 
41665 fi
41666 fi
41667 NM=$ac_cv_prog_NM
41668 if test -n "$NM"; then
41669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41670 $as_echo "$NM" >&6; }
41671 else
41672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41673 $as_echo "no" >&6; }
41674 fi
41675 
41676 
41677     test -n "$NM" && break
41678   done
41679 fi
41680 if test -z "$NM"; then
41681   ac_ct_NM=$NM
41682   for ac_prog in nm gcc-nm
41683 do
41684   # Extract the first word of "$ac_prog", so it can be a program name with args.
41685 set dummy $ac_prog; ac_word=$2
41686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41687 $as_echo_n "checking for $ac_word... " >&6; }
41688 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41689   $as_echo_n "(cached) " >&6
41690 else
41691   if test -n "$ac_ct_NM"; then
41692   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41693 else
41694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41695 for as_dir in $PATH
41696 do
41697   IFS=$as_save_IFS
41698   test -z "$as_dir" && as_dir=.
41699     for ac_exec_ext in '' $ac_executable_extensions; do
41700   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41701     ac_cv_prog_ac_ct_NM="$ac_prog"
41702     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41703     break 2
41704   fi
41705 done
41706   done
41707 IFS=$as_save_IFS
41708 
41709 fi
41710 fi
41711 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41712 if test -n "$ac_ct_NM"; then
41713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41714 $as_echo "$ac_ct_NM" >&6; }
41715 else
41716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41717 $as_echo "no" >&6; }
41718 fi
41719 
41720 
41721   test -n "$ac_ct_NM" && break
41722 done
41723 
41724   if test "x$ac_ct_NM" = x; then
41725     NM=""
41726   else
41727     case $cross_compiling:$ac_tool_warned in
41728 yes:)
41729 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41730 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41731 ac_tool_warned=yes ;;
41732 esac
41733     NM=$ac_ct_NM
41734   fi
41735 fi
41736 
41737   else
41738     # The variable is set, but is it from the command line or the environment?
41739 
41740     # Try to remove the string !NM! from our list.
41741     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41742     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41743       # If it failed, the variable was not from the command line. Ignore it,
41744       # but warn the user (except for BASH, which is always set by the calling BASH).
41745       if test "xNM" != xBASH; then
41746         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41747 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41748       fi
41749       # Try to locate tool using the code snippet
41750       if test -n "$ac_tool_prefix"; then
41751   for ac_prog in nm gcc-nm
41752   do
41753     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41754 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41756 $as_echo_n "checking for $ac_word... " >&6; }
41757 if ${ac_cv_prog_NM+:} false; then :
41758   $as_echo_n "(cached) " >&6
41759 else
41760   if test -n "$NM"; then
41761   ac_cv_prog_NM="$NM" # Let the user override the test.
41762 else
41763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41764 for as_dir in $PATH
41765 do
41766   IFS=$as_save_IFS
41767   test -z "$as_dir" && as_dir=.
41768     for ac_exec_ext in '' $ac_executable_extensions; do
41769   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41770     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41771     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41772     break 2
41773   fi
41774 done
41775   done
41776 IFS=$as_save_IFS
41777 
41778 fi
41779 fi
41780 NM=$ac_cv_prog_NM
41781 if test -n "$NM"; then
41782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41783 $as_echo "$NM" >&6; }
41784 else
41785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41786 $as_echo "no" >&6; }
41787 fi
41788 
41789 
41790     test -n "$NM" && break
41791   done
41792 fi
41793 if test -z "$NM"; then
41794   ac_ct_NM=$NM
41795   for ac_prog in nm gcc-nm
41796 do
41797   # Extract the first word of "$ac_prog", so it can be a program name with args.
41798 set dummy $ac_prog; ac_word=$2
41799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41800 $as_echo_n "checking for $ac_word... " >&6; }
41801 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41802   $as_echo_n "(cached) " >&6
41803 else
41804   if test -n "$ac_ct_NM"; then
41805   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41806 else
41807 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41808 for as_dir in $PATH
41809 do
41810   IFS=$as_save_IFS
41811   test -z "$as_dir" && as_dir=.
41812     for ac_exec_ext in '' $ac_executable_extensions; do
41813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41814     ac_cv_prog_ac_ct_NM="$ac_prog"
41815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41816     break 2
41817   fi
41818 done
41819   done
41820 IFS=$as_save_IFS
41821 
41822 fi
41823 fi
41824 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41825 if test -n "$ac_ct_NM"; then
41826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41827 $as_echo "$ac_ct_NM" >&6; }
41828 else
41829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41830 $as_echo "no" >&6; }
41831 fi
41832 
41833 
41834   test -n "$ac_ct_NM" && break
41835 done
41836 
41837   if test "x$ac_ct_NM" = x; then
41838     NM=""
41839   else
41840     case $cross_compiling:$ac_tool_warned in
41841 yes:)
41842 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41843 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41844 ac_tool_warned=yes ;;
41845 esac
41846     NM=$ac_ct_NM
41847   fi
41848 fi
41849 
41850     else
41851       # If it succeeded, then it was overridden by the user. We will use it
41852       # for the tool.
41853 
41854       # First remove it from the list of overridden variables, so we can test
41855       # for unknown variables in the end.
41856       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41857 
41858       # Check if we try to supply an empty value
41859       if test "x$NM" = x; then
41860         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41861 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41862         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41863 $as_echo_n "checking for NM... " >&6; }
41864         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41865 $as_echo "disabled" >&6; }
41866       else
41867         # Check if the provided tool contains a complete path.
41868         tool_specified="$NM"
41869         tool_basename="${tool_specified##*/}"
41870         if test "x$tool_basename" = "x$tool_specified"; then
41871           # A command without a complete path is provided, search $PATH.
41872           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41873 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41874           # Extract the first word of "$tool_basename", so it can be a program name with args.
41875 set dummy $tool_basename; ac_word=$2
41876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41877 $as_echo_n "checking for $ac_word... " >&6; }
41878 if ${ac_cv_path_NM+:} false; then :
41879   $as_echo_n "(cached) " >&6
41880 else
41881   case $NM in
41882   [\\/]* | ?:[\\/]*)
41883   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41884   ;;
41885   *)
41886   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41887 for as_dir in $PATH
41888 do
41889   IFS=$as_save_IFS
41890   test -z "$as_dir" && as_dir=.
41891     for ac_exec_ext in '' $ac_executable_extensions; do
41892   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41893     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41894     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41895     break 2
41896   fi
41897 done
41898   done
41899 IFS=$as_save_IFS
41900 
41901   ;;
41902 esac
41903 fi
41904 NM=$ac_cv_path_NM
41905 if test -n "$NM"; then
41906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41907 $as_echo "$NM" >&6; }
41908 else
41909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41910 $as_echo "no" >&6; }
41911 fi
41912 
41913 
41914           if test "x$NM" = x; then
41915             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41916           fi
41917         else
41918           # Otherwise we believe it is a complete path. Use it as it is.
41919           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41920 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41921           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41922 $as_echo_n "checking for NM... " >&6; }
41923           if test ! -x "$tool_specified"; then
41924             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41925 $as_echo "not found" >&6; }
41926             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41927           fi
41928           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41929 $as_echo "$tool_specified" >&6; }
41930         fi
41931       fi
41932     fi
41933 
41934   fi
41935 
41936 
41937     else
41938 
41939 
41940   # Publish this variable in the help.
41941 
41942 
41943   if [ -z "${NM+x}" ]; then
41944     # The variable is not set by user, try to locate tool using the code snippet
41945     if test -n "$ac_tool_prefix"; then
41946   for ac_prog in nm
41947   do
41948     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41949 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41951 $as_echo_n "checking for $ac_word... " >&6; }
41952 if ${ac_cv_prog_NM+:} false; then :
41953   $as_echo_n "(cached) " >&6
41954 else
41955   if test -n "$NM"; then
41956   ac_cv_prog_NM="$NM" # Let the user override the test.
41957 else
41958 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41959 for as_dir in $PATH
41960 do
41961   IFS=$as_save_IFS
41962   test -z "$as_dir" && as_dir=.
41963     for ac_exec_ext in '' $ac_executable_extensions; do
41964   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41965     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41966     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41967     break 2
41968   fi
41969 done
41970   done
41971 IFS=$as_save_IFS
41972 
41973 fi
41974 fi
41975 NM=$ac_cv_prog_NM
41976 if test -n "$NM"; then
41977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41978 $as_echo "$NM" >&6; }
41979 else
41980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41981 $as_echo "no" >&6; }
41982 fi
41983 
41984 
41985     test -n "$NM" && break
41986   done
41987 fi
41988 if test -z "$NM"; then
41989   ac_ct_NM=$NM
41990   for ac_prog in nm
41991 do
41992   # Extract the first word of "$ac_prog", so it can be a program name with args.
41993 set dummy $ac_prog; ac_word=$2
41994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41995 $as_echo_n "checking for $ac_word... " >&6; }
41996 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41997   $as_echo_n "(cached) " >&6
41998 else
41999   if test -n "$ac_ct_NM"; then
42000   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42001 else
42002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42003 for as_dir in $PATH
42004 do
42005   IFS=$as_save_IFS
42006   test -z "$as_dir" && as_dir=.
42007     for ac_exec_ext in '' $ac_executable_extensions; do
42008   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42009     ac_cv_prog_ac_ct_NM="$ac_prog"
42010     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42011     break 2
42012   fi
42013 done
42014   done
42015 IFS=$as_save_IFS
42016 
42017 fi
42018 fi
42019 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42020 if test -n "$ac_ct_NM"; then
42021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42022 $as_echo "$ac_ct_NM" >&6; }
42023 else
42024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42025 $as_echo "no" >&6; }
42026 fi
42027 
42028 
42029   test -n "$ac_ct_NM" && break
42030 done
42031 
42032   if test "x$ac_ct_NM" = x; then
42033     NM=""
42034   else
42035     case $cross_compiling:$ac_tool_warned in
42036 yes:)
42037 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42038 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42039 ac_tool_warned=yes ;;
42040 esac
42041     NM=$ac_ct_NM
42042   fi
42043 fi
42044 
42045   else
42046     # The variable is set, but is it from the command line or the environment?
42047 
42048     # Try to remove the string !NM! from our list.
42049     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42050     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42051       # If it failed, the variable was not from the command line. Ignore it,
42052       # but warn the user (except for BASH, which is always set by the calling BASH).
42053       if test "xNM" != xBASH; then
42054         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42055 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42056       fi
42057       # Try to locate tool using the code snippet
42058       if test -n "$ac_tool_prefix"; then
42059   for ac_prog in nm
42060   do
42061     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42062 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42064 $as_echo_n "checking for $ac_word... " >&6; }
42065 if ${ac_cv_prog_NM+:} false; then :
42066   $as_echo_n "(cached) " >&6
42067 else
42068   if test -n "$NM"; then
42069   ac_cv_prog_NM="$NM" # Let the user override the test.
42070 else
42071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42072 for as_dir in $PATH
42073 do
42074   IFS=$as_save_IFS
42075   test -z "$as_dir" && as_dir=.
42076     for ac_exec_ext in '' $ac_executable_extensions; do
42077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42078     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42080     break 2
42081   fi
42082 done
42083   done
42084 IFS=$as_save_IFS
42085 
42086 fi
42087 fi
42088 NM=$ac_cv_prog_NM
42089 if test -n "$NM"; then
42090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42091 $as_echo "$NM" >&6; }
42092 else
42093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42094 $as_echo "no" >&6; }
42095 fi
42096 
42097 
42098     test -n "$NM" && break
42099   done
42100 fi
42101 if test -z "$NM"; then
42102   ac_ct_NM=$NM
42103   for ac_prog in nm
42104 do
42105   # Extract the first word of "$ac_prog", so it can be a program name with args.
42106 set dummy $ac_prog; ac_word=$2
42107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42108 $as_echo_n "checking for $ac_word... " >&6; }
42109 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42110   $as_echo_n "(cached) " >&6
42111 else
42112   if test -n "$ac_ct_NM"; then
42113   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42114 else
42115 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42116 for as_dir in $PATH
42117 do
42118   IFS=$as_save_IFS
42119   test -z "$as_dir" && as_dir=.
42120     for ac_exec_ext in '' $ac_executable_extensions; do
42121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42122     ac_cv_prog_ac_ct_NM="$ac_prog"
42123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42124     break 2
42125   fi
42126 done
42127   done
42128 IFS=$as_save_IFS
42129 
42130 fi
42131 fi
42132 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42133 if test -n "$ac_ct_NM"; then
42134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42135 $as_echo "$ac_ct_NM" >&6; }
42136 else
42137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42138 $as_echo "no" >&6; }
42139 fi
42140 
42141 
42142   test -n "$ac_ct_NM" && break
42143 done
42144 
42145   if test "x$ac_ct_NM" = x; then
42146     NM=""
42147   else
42148     case $cross_compiling:$ac_tool_warned in
42149 yes:)
42150 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42151 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42152 ac_tool_warned=yes ;;
42153 esac
42154     NM=$ac_ct_NM
42155   fi
42156 fi
42157 
42158     else
42159       # If it succeeded, then it was overridden by the user. We will use it
42160       # for the tool.
42161 
42162       # First remove it from the list of overridden variables, so we can test
42163       # for unknown variables in the end.
42164       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42165 
42166       # Check if we try to supply an empty value
42167       if test "x$NM" = x; then
42168         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42169 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42170         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42171 $as_echo_n "checking for NM... " >&6; }
42172         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42173 $as_echo "disabled" >&6; }
42174       else
42175         # Check if the provided tool contains a complete path.
42176         tool_specified="$NM"
42177         tool_basename="${tool_specified##*/}"
42178         if test "x$tool_basename" = "x$tool_specified"; then
42179           # A command without a complete path is provided, search $PATH.
42180           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42181 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42182           # Extract the first word of "$tool_basename", so it can be a program name with args.
42183 set dummy $tool_basename; ac_word=$2
42184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42185 $as_echo_n "checking for $ac_word... " >&6; }
42186 if ${ac_cv_path_NM+:} false; then :
42187   $as_echo_n "(cached) " >&6
42188 else
42189   case $NM in
42190   [\\/]* | ?:[\\/]*)
42191   ac_cv_path_NM="$NM" # Let the user override the test with a path.
42192   ;;
42193   *)
42194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42195 for as_dir in $PATH
42196 do
42197   IFS=$as_save_IFS
42198   test -z "$as_dir" && as_dir=.
42199     for ac_exec_ext in '' $ac_executable_extensions; do
42200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42201     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42203     break 2
42204   fi
42205 done
42206   done
42207 IFS=$as_save_IFS
42208 
42209   ;;
42210 esac
42211 fi
42212 NM=$ac_cv_path_NM
42213 if test -n "$NM"; then
42214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42215 $as_echo "$NM" >&6; }
42216 else
42217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42218 $as_echo "no" >&6; }
42219 fi
42220 
42221 
42222           if test "x$NM" = x; then
42223             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42224           fi
42225         else
42226           # Otherwise we believe it is a complete path. Use it as it is.
42227           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42228 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42229           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42230 $as_echo_n "checking for NM... " >&6; }
42231           if test ! -x "$tool_specified"; then
42232             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42233 $as_echo "not found" >&6; }
42234             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42235           fi
42236           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42237 $as_echo "$tool_specified" >&6; }
42238         fi
42239       fi
42240     fi
42241 
42242   fi
42243 
42244 
42245     fi
42246 
42247   # Only process if variable expands to non-empty
42248 
42249   if test "x$NM" != x; then
42250     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42251 
42252   # First separate the path from the arguments. This will split at the first
42253   # space.
42254   complete="$NM"
42255   path="${complete%% *}"
42256   tmp="$complete EOL"
42257   arguments="${tmp#* }"
42258 
42259   # Input might be given as Windows format, start by converting to
42260   # unix format.
42261   new_path=`$CYGPATH -u "$path"`
42262 
42263   # Now try to locate executable using which
42264   new_path=`$WHICH "$new_path" 2> /dev/null`
42265   # bat and cmd files are not always considered executable in cygwin causing which
42266   # to not find them
42267   if test "x$new_path" = x \
42268       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42269       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42270     new_path=`$CYGPATH -u "$path"`
42271   fi
42272   if test "x$new_path" = x; then
42273     # Oops. Which didn't find the executable.
42274     # The splitting of arguments from the executable at a space might have been incorrect,
42275     # since paths with space are more likely in Windows. Give it another try with the whole
42276     # argument.
42277     path="$complete"
42278     arguments="EOL"
42279     new_path=`$CYGPATH -u "$path"`
42280     new_path=`$WHICH "$new_path" 2> /dev/null`
42281     # bat and cmd files are not always considered executable in cygwin causing which
42282     # to not find them
42283     if test "x$new_path" = x \
42284         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42285         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42286       new_path=`$CYGPATH -u "$path"`
42287     fi
42288     if test "x$new_path" = x; then
42289       # It's still not found. Now this is an unrecoverable error.
42290       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42291 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42292       has_space=`$ECHO "$complete" | $GREP " "`
42293       if test "x$has_space" != x; then
42294         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42295 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42296       fi
42297       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42298     fi
42299   fi
42300 
42301   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42302   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42303   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42304   # "foo.exe" is OK but "foo" is an error.
42305   #
42306   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42307   # It is also a way to make sure we got the proper file name for the real test later on.
42308   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42309   if test "x$test_shortpath" = x; then
42310     # Short path failed, file does not exist as specified.
42311     # Try adding .exe or .cmd
42312     if test -f "${new_path}.exe"; then
42313       input_to_shortpath="${new_path}.exe"
42314     elif test -f "${new_path}.cmd"; then
42315       input_to_shortpath="${new_path}.cmd"
42316     else
42317       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42318 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42319       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42320 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42321       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42322     fi
42323   else
42324     input_to_shortpath="$new_path"
42325   fi
42326 
42327   # Call helper function which possibly converts this using DOS-style short mode.
42328   # If so, the updated path is stored in $new_path.
42329   new_path="$input_to_shortpath"
42330 
42331   input_path="$input_to_shortpath"
42332   # Check if we need to convert this using DOS-style short mode. If the path
42333   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42334   # take no chances and rewrite it.
42335   # Note: m4 eats our [], so we need to use [ and ] instead.
42336   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42337   if test "x$has_forbidden_chars" != x; then
42338     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42339     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42340     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42341     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42342       # Going to short mode and back again did indeed matter. Since short mode is
42343       # case insensitive, let's make it lowercase to improve readability.
42344       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42345       # Now convert it back to Unix-style (cygpath)
42346       input_path=`$CYGPATH -u "$shortmode_path"`
42347       new_path="$input_path"
42348     fi
42349   fi
42350 
42351   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42352   if test "x$test_cygdrive_prefix" = x; then
42353     # As a simple fix, exclude /usr/bin since it's not a real path.
42354     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42355       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42356       # a path prefixed by /cygdrive for fixpath to work.
42357       new_path="$CYGWIN_ROOT_PATH$input_path"
42358     fi
42359   fi
42360 
42361   # remove trailing .exe if any
42362   new_path="${new_path/%.exe/}"
42363 
42364     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42365 
42366   # First separate the path from the arguments. This will split at the first
42367   # space.
42368   complete="$NM"
42369   path="${complete%% *}"
42370   tmp="$complete EOL"
42371   arguments="${tmp#* }"
42372 
42373   # Input might be given as Windows format, start by converting to
42374   # unix format.
42375   new_path="$path"
42376 
42377   windows_path="$new_path"
42378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42379     unix_path=`$CYGPATH -u "$windows_path"`
42380     new_path="$unix_path"
42381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42382     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42383     new_path="$unix_path"
42384   fi
42385 
42386 
42387   # Now try to locate executable using which
42388   new_path=`$WHICH "$new_path" 2> /dev/null`
42389 
42390   if test "x$new_path" = x; then
42391     # Oops. Which didn't find the executable.
42392     # The splitting of arguments from the executable at a space might have been incorrect,
42393     # since paths with space are more likely in Windows. Give it another try with the whole
42394     # argument.
42395     path="$complete"
42396     arguments="EOL"
42397     new_path="$path"
42398 
42399   windows_path="$new_path"
42400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42401     unix_path=`$CYGPATH -u "$windows_path"`
42402     new_path="$unix_path"
42403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42405     new_path="$unix_path"
42406   fi
42407 
42408 
42409     new_path=`$WHICH "$new_path" 2> /dev/null`
42410     # bat and cmd files are not always considered executable in MSYS causing which
42411     # to not find them
42412     if test "x$new_path" = x \
42413         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42414         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42415       new_path="$path"
42416 
42417   windows_path="$new_path"
42418   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42419     unix_path=`$CYGPATH -u "$windows_path"`
42420     new_path="$unix_path"
42421   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42422     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42423     new_path="$unix_path"
42424   fi
42425 
42426     fi
42427 
42428     if test "x$new_path" = x; then
42429       # It's still not found. Now this is an unrecoverable error.
42430       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42431 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42432       has_space=`$ECHO "$complete" | $GREP " "`
42433       if test "x$has_space" != x; then
42434         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42435 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42436       fi
42437       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42438     fi
42439   fi
42440 
42441   # Now new_path has a complete unix path to the binary
42442   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42443     # Keep paths in /bin as-is, but remove trailing .exe if any
42444     new_path="${new_path/%.exe/}"
42445     # Do not save /bin paths to all_fixpath_prefixes!
42446   else
42447     # Not in mixed or Windows style, start by that.
42448     new_path=`cmd //c echo $new_path`
42449 
42450   input_path="$new_path"
42451   # Check if we need to convert this using DOS-style short mode. If the path
42452   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42453   # take no chances and rewrite it.
42454   # Note: m4 eats our [], so we need to use [ and ] instead.
42455   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42456   if test "x$has_forbidden_chars" != x; then
42457     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42458     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42459   fi
42460 
42461     # Output is in $new_path
42462 
42463   windows_path="$new_path"
42464   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42465     unix_path=`$CYGPATH -u "$windows_path"`
42466     new_path="$unix_path"
42467   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42468     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42469     new_path="$unix_path"
42470   fi
42471 
42472     # remove trailing .exe if any
42473     new_path="${new_path/%.exe/}"
42474 
42475     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42476     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42477   fi
42478 
42479     else
42480       # We're on a unix platform. Hooray! :)
42481       # First separate the path from the arguments. This will split at the first
42482       # space.
42483       complete="$NM"
42484       path="${complete%% *}"
42485       tmp="$complete EOL"
42486       arguments="${tmp#* }"
42487 
42488       # Cannot rely on the command "which" here since it doesn't always work.
42489       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42490       if test -z "$is_absolute_path"; then
42491         # Path to executable is not absolute. Find it.
42492         IFS_save="$IFS"
42493         IFS=:
42494         for p in $PATH; do
42495           if test -f "$p/$path" && test -x "$p/$path"; then
42496             new_path="$p/$path"
42497             break
42498           fi
42499         done
42500         IFS="$IFS_save"
42501       else
42502         # This is an absolute path, we can use it without further modifications.
42503         new_path="$path"
42504       fi
42505 
42506       if test "x$new_path" = x; then
42507         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42508 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42509         has_space=`$ECHO "$complete" | $GREP " "`
42510         if test "x$has_space" != x; then
42511           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42512 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42513         fi
42514         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42515       fi
42516     fi
42517 
42518     # Now join together the path and the arguments once again
42519     if test "x$arguments" != xEOL; then
42520       new_complete="$new_path ${arguments% *}"
42521     else
42522       new_complete="$new_path"
42523     fi
42524 
42525     if test "x$complete" != "x$new_complete"; then
42526       NM="$new_complete"
42527       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42528 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42529     fi
42530   fi
42531 
42532     GNM="$NM"
42533 
42534   fi
42535 
42536   # objcopy is used for moving debug symbols to separate files when
42537   # full debug symbols are enabled.
42538   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42539 
42540 
42541   # Publish this variable in the help.
42542 
42543 
42544   if [ -z "${OBJCOPY+x}" ]; then
42545     # The variable is not set by user, try to locate tool using the code snippet
42546     if test -n "$ac_tool_prefix"; then
42547   for ac_prog in gobjcopy objcopy
42548   do
42549     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42550 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42552 $as_echo_n "checking for $ac_word... " >&6; }
42553 if ${ac_cv_prog_OBJCOPY+:} false; then :
42554   $as_echo_n "(cached) " >&6
42555 else
42556   if test -n "$OBJCOPY"; then
42557   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42558 else
42559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42560 for as_dir in $PATH
42561 do
42562   IFS=$as_save_IFS
42563   test -z "$as_dir" && as_dir=.
42564     for ac_exec_ext in '' $ac_executable_extensions; do
42565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42566     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42568     break 2
42569   fi
42570 done
42571   done
42572 IFS=$as_save_IFS
42573 
42574 fi
42575 fi
42576 OBJCOPY=$ac_cv_prog_OBJCOPY
42577 if test -n "$OBJCOPY"; then
42578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42579 $as_echo "$OBJCOPY" >&6; }
42580 else
42581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42582 $as_echo "no" >&6; }
42583 fi
42584 
42585 
42586     test -n "$OBJCOPY" && break
42587   done
42588 fi
42589 if test -z "$OBJCOPY"; then
42590   ac_ct_OBJCOPY=$OBJCOPY
42591   for ac_prog in gobjcopy objcopy
42592 do
42593   # Extract the first word of "$ac_prog", so it can be a program name with args.
42594 set dummy $ac_prog; ac_word=$2
42595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42596 $as_echo_n "checking for $ac_word... " >&6; }
42597 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42598   $as_echo_n "(cached) " >&6
42599 else
42600   if test -n "$ac_ct_OBJCOPY"; then
42601   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42602 else
42603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42604 for as_dir in $PATH
42605 do
42606   IFS=$as_save_IFS
42607   test -z "$as_dir" && as_dir=.
42608     for ac_exec_ext in '' $ac_executable_extensions; do
42609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42610     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42612     break 2
42613   fi
42614 done
42615   done
42616 IFS=$as_save_IFS
42617 
42618 fi
42619 fi
42620 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42621 if test -n "$ac_ct_OBJCOPY"; then
42622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42623 $as_echo "$ac_ct_OBJCOPY" >&6; }
42624 else
42625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42626 $as_echo "no" >&6; }
42627 fi
42628 
42629 
42630   test -n "$ac_ct_OBJCOPY" && break
42631 done
42632 
42633   if test "x$ac_ct_OBJCOPY" = x; then
42634     OBJCOPY=""
42635   else
42636     case $cross_compiling:$ac_tool_warned in
42637 yes:)
42638 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42639 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42640 ac_tool_warned=yes ;;
42641 esac
42642     OBJCOPY=$ac_ct_OBJCOPY
42643   fi
42644 fi
42645 
42646   else
42647     # The variable is set, but is it from the command line or the environment?
42648 
42649     # Try to remove the string !OBJCOPY! from our list.
42650     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42651     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42652       # If it failed, the variable was not from the command line. Ignore it,
42653       # but warn the user (except for BASH, which is always set by the calling BASH).
42654       if test "xOBJCOPY" != xBASH; then
42655         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42656 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42657       fi
42658       # Try to locate tool using the code snippet
42659       if test -n "$ac_tool_prefix"; then
42660   for ac_prog in gobjcopy objcopy
42661   do
42662     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42663 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42665 $as_echo_n "checking for $ac_word... " >&6; }
42666 if ${ac_cv_prog_OBJCOPY+:} false; then :
42667   $as_echo_n "(cached) " >&6
42668 else
42669   if test -n "$OBJCOPY"; then
42670   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42671 else
42672 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42673 for as_dir in $PATH
42674 do
42675   IFS=$as_save_IFS
42676   test -z "$as_dir" && as_dir=.
42677     for ac_exec_ext in '' $ac_executable_extensions; do
42678   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42679     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42680     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42681     break 2
42682   fi
42683 done
42684   done
42685 IFS=$as_save_IFS
42686 
42687 fi
42688 fi
42689 OBJCOPY=$ac_cv_prog_OBJCOPY
42690 if test -n "$OBJCOPY"; then
42691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42692 $as_echo "$OBJCOPY" >&6; }
42693 else
42694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42695 $as_echo "no" >&6; }
42696 fi
42697 
42698 
42699     test -n "$OBJCOPY" && break
42700   done
42701 fi
42702 if test -z "$OBJCOPY"; then
42703   ac_ct_OBJCOPY=$OBJCOPY
42704   for ac_prog in gobjcopy objcopy
42705 do
42706   # Extract the first word of "$ac_prog", so it can be a program name with args.
42707 set dummy $ac_prog; ac_word=$2
42708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42709 $as_echo_n "checking for $ac_word... " >&6; }
42710 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42711   $as_echo_n "(cached) " >&6
42712 else
42713   if test -n "$ac_ct_OBJCOPY"; then
42714   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42715 else
42716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42717 for as_dir in $PATH
42718 do
42719   IFS=$as_save_IFS
42720   test -z "$as_dir" && as_dir=.
42721     for ac_exec_ext in '' $ac_executable_extensions; do
42722   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42723     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42725     break 2
42726   fi
42727 done
42728   done
42729 IFS=$as_save_IFS
42730 
42731 fi
42732 fi
42733 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42734 if test -n "$ac_ct_OBJCOPY"; then
42735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42736 $as_echo "$ac_ct_OBJCOPY" >&6; }
42737 else
42738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42739 $as_echo "no" >&6; }
42740 fi
42741 
42742 
42743   test -n "$ac_ct_OBJCOPY" && break
42744 done
42745 
42746   if test "x$ac_ct_OBJCOPY" = x; then
42747     OBJCOPY=""
42748   else
42749     case $cross_compiling:$ac_tool_warned in
42750 yes:)
42751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42752 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42753 ac_tool_warned=yes ;;
42754 esac
42755     OBJCOPY=$ac_ct_OBJCOPY
42756   fi
42757 fi
42758 
42759     else
42760       # If it succeeded, then it was overridden by the user. We will use it
42761       # for the tool.
42762 
42763       # First remove it from the list of overridden variables, so we can test
42764       # for unknown variables in the end.
42765       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42766 
42767       # Check if we try to supply an empty value
42768       if test "x$OBJCOPY" = x; then
42769         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42770 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42771         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42772 $as_echo_n "checking for OBJCOPY... " >&6; }
42773         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42774 $as_echo "disabled" >&6; }
42775       else
42776         # Check if the provided tool contains a complete path.
42777         tool_specified="$OBJCOPY"
42778         tool_basename="${tool_specified##*/}"
42779         if test "x$tool_basename" = "x$tool_specified"; then
42780           # A command without a complete path is provided, search $PATH.
42781           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42782 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42783           # Extract the first word of "$tool_basename", so it can be a program name with args.
42784 set dummy $tool_basename; ac_word=$2
42785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42786 $as_echo_n "checking for $ac_word... " >&6; }
42787 if ${ac_cv_path_OBJCOPY+:} false; then :
42788   $as_echo_n "(cached) " >&6
42789 else
42790   case $OBJCOPY in
42791   [\\/]* | ?:[\\/]*)
42792   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42793   ;;
42794   *)
42795   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42796 for as_dir in $PATH
42797 do
42798   IFS=$as_save_IFS
42799   test -z "$as_dir" && as_dir=.
42800     for ac_exec_ext in '' $ac_executable_extensions; do
42801   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42802     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42803     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42804     break 2
42805   fi
42806 done
42807   done
42808 IFS=$as_save_IFS
42809 
42810   ;;
42811 esac
42812 fi
42813 OBJCOPY=$ac_cv_path_OBJCOPY
42814 if test -n "$OBJCOPY"; then
42815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42816 $as_echo "$OBJCOPY" >&6; }
42817 else
42818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42819 $as_echo "no" >&6; }
42820 fi
42821 
42822 
42823           if test "x$OBJCOPY" = x; then
42824             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42825           fi
42826         else
42827           # Otherwise we believe it is a complete path. Use it as it is.
42828           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42829 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42830           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42831 $as_echo_n "checking for OBJCOPY... " >&6; }
42832           if test ! -x "$tool_specified"; then
42833             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42834 $as_echo "not found" >&6; }
42835             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42836           fi
42837           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42838 $as_echo "$tool_specified" >&6; }
42839         fi
42840       fi
42841     fi
42842 
42843   fi
42844 
42845 
42846     # Only call fixup if objcopy was found.
42847     if test -n "$OBJCOPY"; then
42848 
42849   # Only process if variable expands to non-empty
42850 
42851   if test "x$OBJCOPY" != x; then
42852     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42853 
42854   # First separate the path from the arguments. This will split at the first
42855   # space.
42856   complete="$OBJCOPY"
42857   path="${complete%% *}"
42858   tmp="$complete EOL"
42859   arguments="${tmp#* }"
42860 
42861   # Input might be given as Windows format, start by converting to
42862   # unix format.
42863   new_path=`$CYGPATH -u "$path"`
42864 
42865   # Now try to locate executable using which
42866   new_path=`$WHICH "$new_path" 2> /dev/null`
42867   # bat and cmd files are not always considered executable in cygwin causing which
42868   # to not find them
42869   if test "x$new_path" = x \
42870       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42871       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42872     new_path=`$CYGPATH -u "$path"`
42873   fi
42874   if test "x$new_path" = x; then
42875     # Oops. Which didn't find the executable.
42876     # The splitting of arguments from the executable at a space might have been incorrect,
42877     # since paths with space are more likely in Windows. Give it another try with the whole
42878     # argument.
42879     path="$complete"
42880     arguments="EOL"
42881     new_path=`$CYGPATH -u "$path"`
42882     new_path=`$WHICH "$new_path" 2> /dev/null`
42883     # bat and cmd files are not always considered executable in cygwin causing which
42884     # to not find them
42885     if test "x$new_path" = x \
42886         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42887         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42888       new_path=`$CYGPATH -u "$path"`
42889     fi
42890     if test "x$new_path" = x; then
42891       # It's still not found. Now this is an unrecoverable error.
42892       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42893 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42894       has_space=`$ECHO "$complete" | $GREP " "`
42895       if test "x$has_space" != x; then
42896         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42897 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42898       fi
42899       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42900     fi
42901   fi
42902 
42903   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42904   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42905   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42906   # "foo.exe" is OK but "foo" is an error.
42907   #
42908   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42909   # It is also a way to make sure we got the proper file name for the real test later on.
42910   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42911   if test "x$test_shortpath" = x; then
42912     # Short path failed, file does not exist as specified.
42913     # Try adding .exe or .cmd
42914     if test -f "${new_path}.exe"; then
42915       input_to_shortpath="${new_path}.exe"
42916     elif test -f "${new_path}.cmd"; then
42917       input_to_shortpath="${new_path}.cmd"
42918     else
42919       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42920 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42921       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42922 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42923       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42924     fi
42925   else
42926     input_to_shortpath="$new_path"
42927   fi
42928 
42929   # Call helper function which possibly converts this using DOS-style short mode.
42930   # If so, the updated path is stored in $new_path.
42931   new_path="$input_to_shortpath"
42932 
42933   input_path="$input_to_shortpath"
42934   # Check if we need to convert this using DOS-style short mode. If the path
42935   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42936   # take no chances and rewrite it.
42937   # Note: m4 eats our [], so we need to use [ and ] instead.
42938   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42939   if test "x$has_forbidden_chars" != x; then
42940     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42941     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42942     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42943     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42944       # Going to short mode and back again did indeed matter. Since short mode is
42945       # case insensitive, let's make it lowercase to improve readability.
42946       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42947       # Now convert it back to Unix-style (cygpath)
42948       input_path=`$CYGPATH -u "$shortmode_path"`
42949       new_path="$input_path"
42950     fi
42951   fi
42952 
42953   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42954   if test "x$test_cygdrive_prefix" = x; then
42955     # As a simple fix, exclude /usr/bin since it's not a real path.
42956     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42957       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42958       # a path prefixed by /cygdrive for fixpath to work.
42959       new_path="$CYGWIN_ROOT_PATH$input_path"
42960     fi
42961   fi
42962 
42963   # remove trailing .exe if any
42964   new_path="${new_path/%.exe/}"
42965 
42966     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42967 
42968   # First separate the path from the arguments. This will split at the first
42969   # space.
42970   complete="$OBJCOPY"
42971   path="${complete%% *}"
42972   tmp="$complete EOL"
42973   arguments="${tmp#* }"
42974 
42975   # Input might be given as Windows format, start by converting to
42976   # unix format.
42977   new_path="$path"
42978 
42979   windows_path="$new_path"
42980   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42981     unix_path=`$CYGPATH -u "$windows_path"`
42982     new_path="$unix_path"
42983   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42984     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42985     new_path="$unix_path"
42986   fi
42987 
42988 
42989   # Now try to locate executable using which
42990   new_path=`$WHICH "$new_path" 2> /dev/null`
42991 
42992   if test "x$new_path" = x; then
42993     # Oops. Which didn't find the executable.
42994     # The splitting of arguments from the executable at a space might have been incorrect,
42995     # since paths with space are more likely in Windows. Give it another try with the whole
42996     # argument.
42997     path="$complete"
42998     arguments="EOL"
42999     new_path="$path"
43000 
43001   windows_path="$new_path"
43002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43003     unix_path=`$CYGPATH -u "$windows_path"`
43004     new_path="$unix_path"
43005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43006     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43007     new_path="$unix_path"
43008   fi
43009 
43010 
43011     new_path=`$WHICH "$new_path" 2> /dev/null`
43012     # bat and cmd files are not always considered executable in MSYS causing which
43013     # to not find them
43014     if test "x$new_path" = x \
43015         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43016         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43017       new_path="$path"
43018 
43019   windows_path="$new_path"
43020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43021     unix_path=`$CYGPATH -u "$windows_path"`
43022     new_path="$unix_path"
43023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43024     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43025     new_path="$unix_path"
43026   fi
43027 
43028     fi
43029 
43030     if test "x$new_path" = x; then
43031       # It's still not found. Now this is an unrecoverable error.
43032       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43033 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43034       has_space=`$ECHO "$complete" | $GREP " "`
43035       if test "x$has_space" != x; then
43036         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43037 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43038       fi
43039       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43040     fi
43041   fi
43042 
43043   # Now new_path has a complete unix path to the binary
43044   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43045     # Keep paths in /bin as-is, but remove trailing .exe if any
43046     new_path="${new_path/%.exe/}"
43047     # Do not save /bin paths to all_fixpath_prefixes!
43048   else
43049     # Not in mixed or Windows style, start by that.
43050     new_path=`cmd //c echo $new_path`
43051 
43052   input_path="$new_path"
43053   # Check if we need to convert this using DOS-style short mode. If the path
43054   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43055   # take no chances and rewrite it.
43056   # Note: m4 eats our [], so we need to use [ and ] instead.
43057   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43058   if test "x$has_forbidden_chars" != x; then
43059     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43060     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43061   fi
43062 
43063     # Output is in $new_path
43064 
43065   windows_path="$new_path"
43066   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43067     unix_path=`$CYGPATH -u "$windows_path"`
43068     new_path="$unix_path"
43069   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43070     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43071     new_path="$unix_path"
43072   fi
43073 
43074     # remove trailing .exe if any
43075     new_path="${new_path/%.exe/}"
43076 
43077     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43078     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43079   fi
43080 
43081     else
43082       # We're on a unix platform. Hooray! :)
43083       # First separate the path from the arguments. This will split at the first
43084       # space.
43085       complete="$OBJCOPY"
43086       path="${complete%% *}"
43087       tmp="$complete EOL"
43088       arguments="${tmp#* }"
43089 
43090       # Cannot rely on the command "which" here since it doesn't always work.
43091       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43092       if test -z "$is_absolute_path"; then
43093         # Path to executable is not absolute. Find it.
43094         IFS_save="$IFS"
43095         IFS=:
43096         for p in $PATH; do
43097           if test -f "$p/$path" && test -x "$p/$path"; then
43098             new_path="$p/$path"
43099             break
43100           fi
43101         done
43102         IFS="$IFS_save"
43103       else
43104         # This is an absolute path, we can use it without further modifications.
43105         new_path="$path"
43106       fi
43107 
43108       if test "x$new_path" = x; then
43109         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43110 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43111         has_space=`$ECHO "$complete" | $GREP " "`
43112         if test "x$has_space" != x; then
43113           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43114 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43115         fi
43116         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43117       fi
43118     fi
43119 
43120     # Now join together the path and the arguments once again
43121     if test "x$arguments" != xEOL; then
43122       new_complete="$new_path ${arguments% *}"
43123     else
43124       new_complete="$new_path"
43125     fi
43126 
43127     if test "x$complete" != "x$new_complete"; then
43128       OBJCOPY="$new_complete"
43129       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43130 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43131     fi
43132   fi
43133 
43134       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43135         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43136         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43137         # - version number is last blank separate word on first line
43138         # - version number formats that have been seen:
43139         #   - <major>.<minor>
43140         #   - <major>.<minor>.<micro>
43141         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43142         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43143          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43144               -e 's/.* //' \
43145               -e '/^[01]\./b bad' \
43146               -e '/^2\./{' \
43147               -e '  s/^2\.//' \
43148               -e '  /^[0-9]$/b bad' \
43149               -e '  /^[0-9]\./b bad' \
43150               -e '  /^1[0-9]$/b bad' \
43151               -e '  /^1[0-9]\./b bad' \
43152               -e '  /^20\./b bad' \
43153               -e '  /^21\.0$/b bad' \
43154               -e '  /^21\.0\./b bad' \
43155               -e '}' \
43156               -e ':good' \
43157               -e 's/.*/VALID_VERSION/p' \
43158               -e 'q' \
43159               -e ':bad' \
43160               -e 's/.*/BAD_VERSION/p' \
43161               -e 'q'`
43162         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43163           OBJCOPY=
43164           { $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
43165 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43166           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43167 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43168           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43169 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43170           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43171 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43172           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43173 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43174         fi
43175       fi
43176     fi
43177   fi
43178 
43179 
43180 
43181   # Publish this variable in the help.
43182 
43183 
43184   if [ -z "${OBJDUMP+x}" ]; then
43185     # The variable is not set by user, try to locate tool using the code snippet
43186     if test -n "$ac_tool_prefix"; then
43187   for ac_prog in gobjdump objdump
43188   do
43189     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43190 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43192 $as_echo_n "checking for $ac_word... " >&6; }
43193 if ${ac_cv_prog_OBJDUMP+:} false; then :
43194   $as_echo_n "(cached) " >&6
43195 else
43196   if test -n "$OBJDUMP"; then
43197   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43198 else
43199 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43200 for as_dir in $PATH
43201 do
43202   IFS=$as_save_IFS
43203   test -z "$as_dir" && as_dir=.
43204     for ac_exec_ext in '' $ac_executable_extensions; do
43205   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43206     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43207     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43208     break 2
43209   fi
43210 done
43211   done
43212 IFS=$as_save_IFS
43213 
43214 fi
43215 fi
43216 OBJDUMP=$ac_cv_prog_OBJDUMP
43217 if test -n "$OBJDUMP"; then
43218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43219 $as_echo "$OBJDUMP" >&6; }
43220 else
43221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43222 $as_echo "no" >&6; }
43223 fi
43224 
43225 
43226     test -n "$OBJDUMP" && break
43227   done
43228 fi
43229 if test -z "$OBJDUMP"; then
43230   ac_ct_OBJDUMP=$OBJDUMP
43231   for ac_prog in gobjdump objdump
43232 do
43233   # Extract the first word of "$ac_prog", so it can be a program name with args.
43234 set dummy $ac_prog; ac_word=$2
43235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43236 $as_echo_n "checking for $ac_word... " >&6; }
43237 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43238   $as_echo_n "(cached) " >&6
43239 else
43240   if test -n "$ac_ct_OBJDUMP"; then
43241   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43242 else
43243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43244 for as_dir in $PATH
43245 do
43246   IFS=$as_save_IFS
43247   test -z "$as_dir" && as_dir=.
43248     for ac_exec_ext in '' $ac_executable_extensions; do
43249   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43250     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43251     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43252     break 2
43253   fi
43254 done
43255   done
43256 IFS=$as_save_IFS
43257 
43258 fi
43259 fi
43260 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43261 if test -n "$ac_ct_OBJDUMP"; then
43262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43263 $as_echo "$ac_ct_OBJDUMP" >&6; }
43264 else
43265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43266 $as_echo "no" >&6; }
43267 fi
43268 
43269 
43270   test -n "$ac_ct_OBJDUMP" && break
43271 done
43272 
43273   if test "x$ac_ct_OBJDUMP" = x; then
43274     OBJDUMP=""
43275   else
43276     case $cross_compiling:$ac_tool_warned in
43277 yes:)
43278 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43279 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43280 ac_tool_warned=yes ;;
43281 esac
43282     OBJDUMP=$ac_ct_OBJDUMP
43283   fi
43284 fi
43285 
43286   else
43287     # The variable is set, but is it from the command line or the environment?
43288 
43289     # Try to remove the string !OBJDUMP! from our list.
43290     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43291     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43292       # If it failed, the variable was not from the command line. Ignore it,
43293       # but warn the user (except for BASH, which is always set by the calling BASH).
43294       if test "xOBJDUMP" != xBASH; then
43295         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43296 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43297       fi
43298       # Try to locate tool using the code snippet
43299       if test -n "$ac_tool_prefix"; then
43300   for ac_prog in gobjdump objdump
43301   do
43302     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43303 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43305 $as_echo_n "checking for $ac_word... " >&6; }
43306 if ${ac_cv_prog_OBJDUMP+:} false; then :
43307   $as_echo_n "(cached) " >&6
43308 else
43309   if test -n "$OBJDUMP"; then
43310   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43311 else
43312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43313 for as_dir in $PATH
43314 do
43315   IFS=$as_save_IFS
43316   test -z "$as_dir" && as_dir=.
43317     for ac_exec_ext in '' $ac_executable_extensions; do
43318   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43319     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43320     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43321     break 2
43322   fi
43323 done
43324   done
43325 IFS=$as_save_IFS
43326 
43327 fi
43328 fi
43329 OBJDUMP=$ac_cv_prog_OBJDUMP
43330 if test -n "$OBJDUMP"; then
43331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43332 $as_echo "$OBJDUMP" >&6; }
43333 else
43334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43335 $as_echo "no" >&6; }
43336 fi
43337 
43338 
43339     test -n "$OBJDUMP" && break
43340   done
43341 fi
43342 if test -z "$OBJDUMP"; then
43343   ac_ct_OBJDUMP=$OBJDUMP
43344   for ac_prog in gobjdump objdump
43345 do
43346   # Extract the first word of "$ac_prog", so it can be a program name with args.
43347 set dummy $ac_prog; ac_word=$2
43348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43349 $as_echo_n "checking for $ac_word... " >&6; }
43350 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43351   $as_echo_n "(cached) " >&6
43352 else
43353   if test -n "$ac_ct_OBJDUMP"; then
43354   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43355 else
43356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43357 for as_dir in $PATH
43358 do
43359   IFS=$as_save_IFS
43360   test -z "$as_dir" && as_dir=.
43361     for ac_exec_ext in '' $ac_executable_extensions; do
43362   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43363     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43364     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43365     break 2
43366   fi
43367 done
43368   done
43369 IFS=$as_save_IFS
43370 
43371 fi
43372 fi
43373 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43374 if test -n "$ac_ct_OBJDUMP"; then
43375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43376 $as_echo "$ac_ct_OBJDUMP" >&6; }
43377 else
43378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43379 $as_echo "no" >&6; }
43380 fi
43381 
43382 
43383   test -n "$ac_ct_OBJDUMP" && break
43384 done
43385 
43386   if test "x$ac_ct_OBJDUMP" = x; then
43387     OBJDUMP=""
43388   else
43389     case $cross_compiling:$ac_tool_warned in
43390 yes:)
43391 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43392 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43393 ac_tool_warned=yes ;;
43394 esac
43395     OBJDUMP=$ac_ct_OBJDUMP
43396   fi
43397 fi
43398 
43399     else
43400       # If it succeeded, then it was overridden by the user. We will use it
43401       # for the tool.
43402 
43403       # First remove it from the list of overridden variables, so we can test
43404       # for unknown variables in the end.
43405       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43406 
43407       # Check if we try to supply an empty value
43408       if test "x$OBJDUMP" = x; then
43409         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43410 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43411         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43412 $as_echo_n "checking for OBJDUMP... " >&6; }
43413         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43414 $as_echo "disabled" >&6; }
43415       else
43416         # Check if the provided tool contains a complete path.
43417         tool_specified="$OBJDUMP"
43418         tool_basename="${tool_specified##*/}"
43419         if test "x$tool_basename" = "x$tool_specified"; then
43420           # A command without a complete path is provided, search $PATH.
43421           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43422 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43423           # Extract the first word of "$tool_basename", so it can be a program name with args.
43424 set dummy $tool_basename; ac_word=$2
43425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43426 $as_echo_n "checking for $ac_word... " >&6; }
43427 if ${ac_cv_path_OBJDUMP+:} false; then :
43428   $as_echo_n "(cached) " >&6
43429 else
43430   case $OBJDUMP in
43431   [\\/]* | ?:[\\/]*)
43432   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43433   ;;
43434   *)
43435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43436 for as_dir in $PATH
43437 do
43438   IFS=$as_save_IFS
43439   test -z "$as_dir" && as_dir=.
43440     for ac_exec_ext in '' $ac_executable_extensions; do
43441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43442     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43444     break 2
43445   fi
43446 done
43447   done
43448 IFS=$as_save_IFS
43449 
43450   ;;
43451 esac
43452 fi
43453 OBJDUMP=$ac_cv_path_OBJDUMP
43454 if test -n "$OBJDUMP"; then
43455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43456 $as_echo "$OBJDUMP" >&6; }
43457 else
43458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43459 $as_echo "no" >&6; }
43460 fi
43461 
43462 
43463           if test "x$OBJDUMP" = x; then
43464             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43465           fi
43466         else
43467           # Otherwise we believe it is a complete path. Use it as it is.
43468           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43469 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43470           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43471 $as_echo_n "checking for OBJDUMP... " >&6; }
43472           if test ! -x "$tool_specified"; then
43473             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43474 $as_echo "not found" >&6; }
43475             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43476           fi
43477           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43478 $as_echo "$tool_specified" >&6; }
43479         fi
43480       fi
43481     fi
43482 
43483   fi
43484 
43485 
43486   if test "x$OBJDUMP" != x; then
43487     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43488     # bails if argument is missing.
43489 
43490   # Only process if variable expands to non-empty
43491 
43492   if test "x$OBJDUMP" != x; then
43493     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43494 
43495   # First separate the path from the arguments. This will split at the first
43496   # space.
43497   complete="$OBJDUMP"
43498   path="${complete%% *}"
43499   tmp="$complete EOL"
43500   arguments="${tmp#* }"
43501 
43502   # Input might be given as Windows format, start by converting to
43503   # unix format.
43504   new_path=`$CYGPATH -u "$path"`
43505 
43506   # Now try to locate executable using which
43507   new_path=`$WHICH "$new_path" 2> /dev/null`
43508   # bat and cmd files are not always considered executable in cygwin causing which
43509   # to not find them
43510   if test "x$new_path" = x \
43511       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43512       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43513     new_path=`$CYGPATH -u "$path"`
43514   fi
43515   if test "x$new_path" = x; then
43516     # Oops. Which didn't find the executable.
43517     # The splitting of arguments from the executable at a space might have been incorrect,
43518     # since paths with space are more likely in Windows. Give it another try with the whole
43519     # argument.
43520     path="$complete"
43521     arguments="EOL"
43522     new_path=`$CYGPATH -u "$path"`
43523     new_path=`$WHICH "$new_path" 2> /dev/null`
43524     # bat and cmd files are not always considered executable in cygwin causing which
43525     # to not find them
43526     if test "x$new_path" = x \
43527         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43528         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43529       new_path=`$CYGPATH -u "$path"`
43530     fi
43531     if test "x$new_path" = x; then
43532       # It's still not found. Now this is an unrecoverable error.
43533       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43534 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43535       has_space=`$ECHO "$complete" | $GREP " "`
43536       if test "x$has_space" != x; then
43537         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43538 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43539       fi
43540       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43541     fi
43542   fi
43543 
43544   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43545   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43546   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43547   # "foo.exe" is OK but "foo" is an error.
43548   #
43549   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43550   # It is also a way to make sure we got the proper file name for the real test later on.
43551   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43552   if test "x$test_shortpath" = x; then
43553     # Short path failed, file does not exist as specified.
43554     # Try adding .exe or .cmd
43555     if test -f "${new_path}.exe"; then
43556       input_to_shortpath="${new_path}.exe"
43557     elif test -f "${new_path}.cmd"; then
43558       input_to_shortpath="${new_path}.cmd"
43559     else
43560       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43561 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43562       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43563 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43564       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43565     fi
43566   else
43567     input_to_shortpath="$new_path"
43568   fi
43569 
43570   # Call helper function which possibly converts this using DOS-style short mode.
43571   # If so, the updated path is stored in $new_path.
43572   new_path="$input_to_shortpath"
43573 
43574   input_path="$input_to_shortpath"
43575   # Check if we need to convert this using DOS-style short mode. If the path
43576   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43577   # take no chances and rewrite it.
43578   # Note: m4 eats our [], so we need to use [ and ] instead.
43579   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43580   if test "x$has_forbidden_chars" != x; then
43581     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43582     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43583     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43584     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43585       # Going to short mode and back again did indeed matter. Since short mode is
43586       # case insensitive, let's make it lowercase to improve readability.
43587       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43588       # Now convert it back to Unix-style (cygpath)
43589       input_path=`$CYGPATH -u "$shortmode_path"`
43590       new_path="$input_path"
43591     fi
43592   fi
43593 
43594   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43595   if test "x$test_cygdrive_prefix" = x; then
43596     # As a simple fix, exclude /usr/bin since it's not a real path.
43597     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43598       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43599       # a path prefixed by /cygdrive for fixpath to work.
43600       new_path="$CYGWIN_ROOT_PATH$input_path"
43601     fi
43602   fi
43603 
43604   # remove trailing .exe if any
43605   new_path="${new_path/%.exe/}"
43606 
43607     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43608 
43609   # First separate the path from the arguments. This will split at the first
43610   # space.
43611   complete="$OBJDUMP"
43612   path="${complete%% *}"
43613   tmp="$complete EOL"
43614   arguments="${tmp#* }"
43615 
43616   # Input might be given as Windows format, start by converting to
43617   # unix format.
43618   new_path="$path"
43619 
43620   windows_path="$new_path"
43621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43622     unix_path=`$CYGPATH -u "$windows_path"`
43623     new_path="$unix_path"
43624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43625     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43626     new_path="$unix_path"
43627   fi
43628 
43629 
43630   # Now try to locate executable using which
43631   new_path=`$WHICH "$new_path" 2> /dev/null`
43632 
43633   if test "x$new_path" = x; then
43634     # Oops. Which didn't find the executable.
43635     # The splitting of arguments from the executable at a space might have been incorrect,
43636     # since paths with space are more likely in Windows. Give it another try with the whole
43637     # argument.
43638     path="$complete"
43639     arguments="EOL"
43640     new_path="$path"
43641 
43642   windows_path="$new_path"
43643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43644     unix_path=`$CYGPATH -u "$windows_path"`
43645     new_path="$unix_path"
43646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43647     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43648     new_path="$unix_path"
43649   fi
43650 
43651 
43652     new_path=`$WHICH "$new_path" 2> /dev/null`
43653     # bat and cmd files are not always considered executable in MSYS causing which
43654     # to not find them
43655     if test "x$new_path" = x \
43656         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43657         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43658       new_path="$path"
43659 
43660   windows_path="$new_path"
43661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43662     unix_path=`$CYGPATH -u "$windows_path"`
43663     new_path="$unix_path"
43664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43665     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43666     new_path="$unix_path"
43667   fi
43668 
43669     fi
43670 
43671     if test "x$new_path" = x; then
43672       # It's still not found. Now this is an unrecoverable error.
43673       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43674 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43675       has_space=`$ECHO "$complete" | $GREP " "`
43676       if test "x$has_space" != x; then
43677         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43678 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43679       fi
43680       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43681     fi
43682   fi
43683 
43684   # Now new_path has a complete unix path to the binary
43685   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43686     # Keep paths in /bin as-is, but remove trailing .exe if any
43687     new_path="${new_path/%.exe/}"
43688     # Do not save /bin paths to all_fixpath_prefixes!
43689   else
43690     # Not in mixed or Windows style, start by that.
43691     new_path=`cmd //c echo $new_path`
43692 
43693   input_path="$new_path"
43694   # Check if we need to convert this using DOS-style short mode. If the path
43695   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43696   # take no chances and rewrite it.
43697   # Note: m4 eats our [], so we need to use [ and ] instead.
43698   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43699   if test "x$has_forbidden_chars" != x; then
43700     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43701     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43702   fi
43703 
43704     # Output is in $new_path
43705 
43706   windows_path="$new_path"
43707   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43708     unix_path=`$CYGPATH -u "$windows_path"`
43709     new_path="$unix_path"
43710   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43711     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43712     new_path="$unix_path"
43713   fi
43714 
43715     # remove trailing .exe if any
43716     new_path="${new_path/%.exe/}"
43717 
43718     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43719     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43720   fi
43721 
43722     else
43723       # We're on a unix platform. Hooray! :)
43724       # First separate the path from the arguments. This will split at the first
43725       # space.
43726       complete="$OBJDUMP"
43727       path="${complete%% *}"
43728       tmp="$complete EOL"
43729       arguments="${tmp#* }"
43730 
43731       # Cannot rely on the command "which" here since it doesn't always work.
43732       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43733       if test -z "$is_absolute_path"; then
43734         # Path to executable is not absolute. Find it.
43735         IFS_save="$IFS"
43736         IFS=:
43737         for p in $PATH; do
43738           if test -f "$p/$path" && test -x "$p/$path"; then
43739             new_path="$p/$path"
43740             break
43741           fi
43742         done
43743         IFS="$IFS_save"
43744       else
43745         # This is an absolute path, we can use it without further modifications.
43746         new_path="$path"
43747       fi
43748 
43749       if test "x$new_path" = x; then
43750         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43751 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43752         has_space=`$ECHO "$complete" | $GREP " "`
43753         if test "x$has_space" != x; then
43754           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43755 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43756         fi
43757         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43758       fi
43759     fi
43760 
43761     # Now join together the path and the arguments once again
43762     if test "x$arguments" != xEOL; then
43763       new_complete="$new_path ${arguments% *}"
43764     else
43765       new_complete="$new_path"
43766     fi
43767 
43768     if test "x$complete" != "x$new_complete"; then
43769       OBJDUMP="$new_complete"
43770       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43771 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43772     fi
43773   fi
43774 
43775   fi
43776 
43777 
43778   # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43779   # to remain in place. Otherwise the compiler will not work in some siutations
43780   # in later configure checks.
43781   if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43782     PATH="$OLD_PATH"
43783   fi
43784 
43785   # Restore the flags to the user specified values.
43786   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43787   CFLAGS="$ORG_CFLAGS"
43788   CXXFLAGS="$ORG_CXXFLAGS"
43789 
43790 
43791 # Finally do some processing after the detection phase
43792 
43793   if test "x$COMPILE_TYPE" = "xcross"; then
43794     # Now we need to find a C/C++ compiler that can build executables for the
43795     # build platform. We can't use the AC_PROG_CC macro, since it can only be
43796     # used once. Also, we need to do this without adding a tools dir to the
43797     # path, otherwise we might pick up cross-compilers which don't use standard
43798     # naming.
43799 
43800     OLDPATH="$PATH"
43801 
43802 
43803 # Check whether --with-build-devkit was given.
43804 if test "${with_build_devkit+set}" = set; then :
43805   withval=$with_build_devkit;
43806 fi
43807 
43808     if test "x$with_build_devkit" = "xyes"; then
43809       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43810     elif test -n "$with_build_devkit"; then
43811       if test ! -d "$with_build_devkit"; then
43812         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43813       else
43814 
43815   # Only process if variable expands to non-empty
43816 
43817   if test "x$with_build_devkit" != x; then
43818     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43819 
43820   # Input might be given as Windows format, start by converting to
43821   # unix format.
43822   path="$with_build_devkit"
43823   new_path=`$CYGPATH -u "$path"`
43824 
43825   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43826   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43827   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43828   # "foo.exe" is OK but "foo" is an error.
43829   #
43830   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43831   # It is also a way to make sure we got the proper file name for the real test later on.
43832   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43833   if test "x$test_shortpath" = x; then
43834     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43835 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43836     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43837   fi
43838 
43839   # Call helper function which possibly converts this using DOS-style short mode.
43840   # If so, the updated path is stored in $new_path.
43841 
43842   input_path="$new_path"
43843   # Check if we need to convert this using DOS-style short mode. If the path
43844   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43845   # take no chances and rewrite it.
43846   # Note: m4 eats our [], so we need to use [ and ] instead.
43847   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43848   if test "x$has_forbidden_chars" != x; then
43849     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43850     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43851     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43852     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43853       # Going to short mode and back again did indeed matter. Since short mode is
43854       # case insensitive, let's make it lowercase to improve readability.
43855       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43856       # Now convert it back to Unix-style (cygpath)
43857       input_path=`$CYGPATH -u "$shortmode_path"`
43858       new_path="$input_path"
43859     fi
43860   fi
43861 
43862   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43863   if test "x$test_cygdrive_prefix" = x; then
43864     # As a simple fix, exclude /usr/bin since it's not a real path.
43865     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43866       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43867       # a path prefixed by /cygdrive for fixpath to work.
43868       new_path="$CYGWIN_ROOT_PATH$input_path"
43869     fi
43870   fi
43871 
43872 
43873   if test "x$path" != "x$new_path"; then
43874     with_build_devkit="$new_path"
43875     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43876 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43877   fi
43878 
43879     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43880 
43881   path="$with_build_devkit"
43882   has_colon=`$ECHO $path | $GREP ^.:`
43883   new_path="$path"
43884   if test "x$has_colon" = x; then
43885     # Not in mixed or Windows style, start by that.
43886     new_path=`cmd //c echo $path`
43887   fi
43888 
43889 
43890   input_path="$new_path"
43891   # Check if we need to convert this using DOS-style short mode. If the path
43892   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43893   # take no chances and rewrite it.
43894   # Note: m4 eats our [], so we need to use [ and ] instead.
43895   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43896   if test "x$has_forbidden_chars" != x; then
43897     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43898     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43899   fi
43900 
43901 
43902   windows_path="$new_path"
43903   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43904     unix_path=`$CYGPATH -u "$windows_path"`
43905     new_path="$unix_path"
43906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43907     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43908     new_path="$unix_path"
43909   fi
43910 
43911   if test "x$path" != "x$new_path"; then
43912     with_build_devkit="$new_path"
43913     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43914 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43915   fi
43916 
43917   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43918   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43919 
43920     else
43921       # We're on a unix platform. Hooray! :)
43922       path="$with_build_devkit"
43923       has_space=`$ECHO "$path" | $GREP " "`
43924       if test "x$has_space" != x; then
43925         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43926 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43927         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43928       fi
43929 
43930       # Use eval to expand a potential ~
43931       eval path="$path"
43932       if test ! -f "$path" && test ! -d "$path"; then
43933         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43934       fi
43935 
43936       if test -d "$path"; then
43937         with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43938       else
43939         dir="`$DIRNAME "$path"`"
43940         base="`$BASENAME "$path"`"
43941         with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43942       fi
43943     fi
43944   fi
43945 
43946         BUILD_DEVKIT_ROOT="$with_build_devkit"
43947         # Check for a meta data info file in the root of the devkit
43948         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43949           # Process devkit.info so that existing devkit variables are not
43950           # modified by this
43951           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43952               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43953               -e "s/\$host/\$build/g" \
43954               $BUILD_DEVKIT_ROOT/devkit.info \
43955               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43956           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43957           # This potentially sets the following:
43958           # A descriptive name of the devkit
43959 
43960   if test "x$BUILD_DEVKIT_NAME" = x; then
43961     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43962   fi
43963 
43964           # Corresponds to --with-extra-path
43965 
43966   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43967     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43968   fi
43969 
43970           # Corresponds to --with-toolchain-path
43971 
43972   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43973     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43974   fi
43975 
43976           # Corresponds to --with-sysroot
43977 
43978   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43979     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43980   fi
43981 
43982           # Skip the Window specific parts
43983         fi
43984 
43985         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43986 $as_echo_n "checking for build platform devkit... " >&6; }
43987         if test "x$BUILD_DEVKIT_NAME" != x; then
43988           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43989 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43990         else
43991           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43992 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43993         fi
43994 
43995         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43996 
43997   if test "x$BUILD_SYSROOT" != "x"; then
43998     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43999       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44000         # Solaris Studio does not have a concept of sysroot. Instead we must
44001         # make sure the default include and lib dirs are appended to each
44002         # compile and link command line. Must also add -I-xbuiltin to enable
44003         # inlining of system functions and intrinsics.
44004         BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44005         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44006             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44007       fi
44008     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44009       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44010       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44011     elif test "x$TOOLCHAIN_TYPE" = xclang; then
44012       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44013       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44014     fi
44015     # Propagate the sysroot args to hotspot
44016     BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44017     BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44018     BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44019     # The global CFLAGS and LDFLAGS variables need these for configure to function
44020     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44021     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44022     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44023     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44024   fi
44025 
44026   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44027     # We also need -iframework<path>/System/Library/Frameworks
44028     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44029     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44030     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44031     # set this here so it doesn't have to be peppered throughout the forest
44032     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44033     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44034   fi
44035 
44036 
44037 
44038 
44039 
44040          # Fallback default of just /bin if DEVKIT_PATH is not defined
44041         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44042           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44043         fi
44044         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44045       fi
44046     fi
44047 
44048     # FIXME: we should list the discovered compilers as an exclude pattern!
44049     # If we do that, we can do this detection before POST_DETECTION, and still
44050     # find the build compilers in the tools dir, if needed.
44051 
44052 
44053 
44054   # Publish this variable in the help.
44055 
44056 
44057   if [ -z "${BUILD_CC+x}" ]; then
44058     # The variable is not set by user, try to locate tool using the code snippet
44059     for ac_prog in cl cc gcc
44060 do
44061   # Extract the first word of "$ac_prog", so it can be a program name with args.
44062 set dummy $ac_prog; ac_word=$2
44063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44064 $as_echo_n "checking for $ac_word... " >&6; }
44065 if ${ac_cv_path_BUILD_CC+:} false; then :
44066   $as_echo_n "(cached) " >&6
44067 else
44068   case $BUILD_CC in
44069   [\\/]* | ?:[\\/]*)
44070   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44071   ;;
44072   *)
44073   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44074 for as_dir in $PATH
44075 do
44076   IFS=$as_save_IFS
44077   test -z "$as_dir" && as_dir=.
44078     for ac_exec_ext in '' $ac_executable_extensions; do
44079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44080     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44082     break 2
44083   fi
44084 done
44085   done
44086 IFS=$as_save_IFS
44087 
44088   ;;
44089 esac
44090 fi
44091 BUILD_CC=$ac_cv_path_BUILD_CC
44092 if test -n "$BUILD_CC"; then
44093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44094 $as_echo "$BUILD_CC" >&6; }
44095 else
44096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44097 $as_echo "no" >&6; }
44098 fi
44099 
44100 
44101   test -n "$BUILD_CC" && break
44102 done
44103 
44104   else
44105     # The variable is set, but is it from the command line or the environment?
44106 
44107     # Try to remove the string !BUILD_CC! from our list.
44108     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44109     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44110       # If it failed, the variable was not from the command line. Ignore it,
44111       # but warn the user (except for BASH, which is always set by the calling BASH).
44112       if test "xBUILD_CC" != xBASH; then
44113         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44114 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44115       fi
44116       # Try to locate tool using the code snippet
44117       for ac_prog in cl cc gcc
44118 do
44119   # Extract the first word of "$ac_prog", so it can be a program name with args.
44120 set dummy $ac_prog; ac_word=$2
44121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44122 $as_echo_n "checking for $ac_word... " >&6; }
44123 if ${ac_cv_path_BUILD_CC+:} false; then :
44124   $as_echo_n "(cached) " >&6
44125 else
44126   case $BUILD_CC in
44127   [\\/]* | ?:[\\/]*)
44128   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44129   ;;
44130   *)
44131   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44132 for as_dir in $PATH
44133 do
44134   IFS=$as_save_IFS
44135   test -z "$as_dir" && as_dir=.
44136     for ac_exec_ext in '' $ac_executable_extensions; do
44137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44138     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44140     break 2
44141   fi
44142 done
44143   done
44144 IFS=$as_save_IFS
44145 
44146   ;;
44147 esac
44148 fi
44149 BUILD_CC=$ac_cv_path_BUILD_CC
44150 if test -n "$BUILD_CC"; then
44151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44152 $as_echo "$BUILD_CC" >&6; }
44153 else
44154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44155 $as_echo "no" >&6; }
44156 fi
44157 
44158 
44159   test -n "$BUILD_CC" && break
44160 done
44161 
44162     else
44163       # If it succeeded, then it was overridden by the user. We will use it
44164       # for the tool.
44165 
44166       # First remove it from the list of overridden variables, so we can test
44167       # for unknown variables in the end.
44168       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44169 
44170       # Check if we try to supply an empty value
44171       if test "x$BUILD_CC" = x; then
44172         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44173 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44174         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44175 $as_echo_n "checking for BUILD_CC... " >&6; }
44176         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44177 $as_echo "disabled" >&6; }
44178       else
44179         # Check if the provided tool contains a complete path.
44180         tool_specified="$BUILD_CC"
44181         tool_basename="${tool_specified##*/}"
44182         if test "x$tool_basename" = "x$tool_specified"; then
44183           # A command without a complete path is provided, search $PATH.
44184           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44185 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44186           # Extract the first word of "$tool_basename", so it can be a program name with args.
44187 set dummy $tool_basename; ac_word=$2
44188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44189 $as_echo_n "checking for $ac_word... " >&6; }
44190 if ${ac_cv_path_BUILD_CC+:} false; then :
44191   $as_echo_n "(cached) " >&6
44192 else
44193   case $BUILD_CC in
44194   [\\/]* | ?:[\\/]*)
44195   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44196   ;;
44197   *)
44198   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44199 for as_dir in $PATH
44200 do
44201   IFS=$as_save_IFS
44202   test -z "$as_dir" && as_dir=.
44203     for ac_exec_ext in '' $ac_executable_extensions; do
44204   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44205     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44206     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44207     break 2
44208   fi
44209 done
44210   done
44211 IFS=$as_save_IFS
44212 
44213   ;;
44214 esac
44215 fi
44216 BUILD_CC=$ac_cv_path_BUILD_CC
44217 if test -n "$BUILD_CC"; then
44218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44219 $as_echo "$BUILD_CC" >&6; }
44220 else
44221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44222 $as_echo "no" >&6; }
44223 fi
44224 
44225 
44226           if test "x$BUILD_CC" = x; then
44227             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44228           fi
44229         else
44230           # Otherwise we believe it is a complete path. Use it as it is.
44231           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44232 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44233           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44234 $as_echo_n "checking for BUILD_CC... " >&6; }
44235           if test ! -x "$tool_specified"; then
44236             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44237 $as_echo "not found" >&6; }
44238             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44239           fi
44240           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44241 $as_echo "$tool_specified" >&6; }
44242         fi
44243       fi
44244     fi
44245 
44246   fi
44247 
44248 
44249 
44250   if test "x$BUILD_CC" = x; then
44251     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44252   fi
44253 
44254 
44255 
44256   # Only process if variable expands to non-empty
44257 
44258   if test "x$BUILD_CC" != x; then
44259     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44260 
44261   # First separate the path from the arguments. This will split at the first
44262   # space.
44263   complete="$BUILD_CC"
44264   path="${complete%% *}"
44265   tmp="$complete EOL"
44266   arguments="${tmp#* }"
44267 
44268   # Input might be given as Windows format, start by converting to
44269   # unix format.
44270   new_path=`$CYGPATH -u "$path"`
44271 
44272   # Now try to locate executable using which
44273   new_path=`$WHICH "$new_path" 2> /dev/null`
44274   # bat and cmd files are not always considered executable in cygwin causing which
44275   # to not find them
44276   if test "x$new_path" = x \
44277       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44278       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44279     new_path=`$CYGPATH -u "$path"`
44280   fi
44281   if test "x$new_path" = x; then
44282     # Oops. Which didn't find the executable.
44283     # The splitting of arguments from the executable at a space might have been incorrect,
44284     # since paths with space are more likely in Windows. Give it another try with the whole
44285     # argument.
44286     path="$complete"
44287     arguments="EOL"
44288     new_path=`$CYGPATH -u "$path"`
44289     new_path=`$WHICH "$new_path" 2> /dev/null`
44290     # bat and cmd files are not always considered executable in cygwin causing which
44291     # to not find them
44292     if test "x$new_path" = x \
44293         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44294         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44295       new_path=`$CYGPATH -u "$path"`
44296     fi
44297     if test "x$new_path" = x; then
44298       # It's still not found. Now this is an unrecoverable error.
44299       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44300 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44301       has_space=`$ECHO "$complete" | $GREP " "`
44302       if test "x$has_space" != x; then
44303         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44304 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44305       fi
44306       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44307     fi
44308   fi
44309 
44310   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44311   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44312   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44313   # "foo.exe" is OK but "foo" is an error.
44314   #
44315   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44316   # It is also a way to make sure we got the proper file name for the real test later on.
44317   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44318   if test "x$test_shortpath" = x; then
44319     # Short path failed, file does not exist as specified.
44320     # Try adding .exe or .cmd
44321     if test -f "${new_path}.exe"; then
44322       input_to_shortpath="${new_path}.exe"
44323     elif test -f "${new_path}.cmd"; then
44324       input_to_shortpath="${new_path}.cmd"
44325     else
44326       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44327 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44328       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44329 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44330       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44331     fi
44332   else
44333     input_to_shortpath="$new_path"
44334   fi
44335 
44336   # Call helper function which possibly converts this using DOS-style short mode.
44337   # If so, the updated path is stored in $new_path.
44338   new_path="$input_to_shortpath"
44339 
44340   input_path="$input_to_shortpath"
44341   # Check if we need to convert this using DOS-style short mode. If the path
44342   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44343   # take no chances and rewrite it.
44344   # Note: m4 eats our [], so we need to use [ and ] instead.
44345   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44346   if test "x$has_forbidden_chars" != x; then
44347     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44348     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44349     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44350     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44351       # Going to short mode and back again did indeed matter. Since short mode is
44352       # case insensitive, let's make it lowercase to improve readability.
44353       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44354       # Now convert it back to Unix-style (cygpath)
44355       input_path=`$CYGPATH -u "$shortmode_path"`
44356       new_path="$input_path"
44357     fi
44358   fi
44359 
44360   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44361   if test "x$test_cygdrive_prefix" = x; then
44362     # As a simple fix, exclude /usr/bin since it's not a real path.
44363     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44364       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44365       # a path prefixed by /cygdrive for fixpath to work.
44366       new_path="$CYGWIN_ROOT_PATH$input_path"
44367     fi
44368   fi
44369 
44370   # remove trailing .exe if any
44371   new_path="${new_path/%.exe/}"
44372 
44373     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44374 
44375   # First separate the path from the arguments. This will split at the first
44376   # space.
44377   complete="$BUILD_CC"
44378   path="${complete%% *}"
44379   tmp="$complete EOL"
44380   arguments="${tmp#* }"
44381 
44382   # Input might be given as Windows format, start by converting to
44383   # unix format.
44384   new_path="$path"
44385 
44386   windows_path="$new_path"
44387   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44388     unix_path=`$CYGPATH -u "$windows_path"`
44389     new_path="$unix_path"
44390   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44391     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44392     new_path="$unix_path"
44393   fi
44394 
44395 
44396   # Now try to locate executable using which
44397   new_path=`$WHICH "$new_path" 2> /dev/null`
44398 
44399   if test "x$new_path" = x; then
44400     # Oops. Which didn't find the executable.
44401     # The splitting of arguments from the executable at a space might have been incorrect,
44402     # since paths with space are more likely in Windows. Give it another try with the whole
44403     # argument.
44404     path="$complete"
44405     arguments="EOL"
44406     new_path="$path"
44407 
44408   windows_path="$new_path"
44409   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44410     unix_path=`$CYGPATH -u "$windows_path"`
44411     new_path="$unix_path"
44412   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44413     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44414     new_path="$unix_path"
44415   fi
44416 
44417 
44418     new_path=`$WHICH "$new_path" 2> /dev/null`
44419     # bat and cmd files are not always considered executable in MSYS causing which
44420     # to not find them
44421     if test "x$new_path" = x \
44422         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44423         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44424       new_path="$path"
44425 
44426   windows_path="$new_path"
44427   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44428     unix_path=`$CYGPATH -u "$windows_path"`
44429     new_path="$unix_path"
44430   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44431     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44432     new_path="$unix_path"
44433   fi
44434 
44435     fi
44436 
44437     if test "x$new_path" = x; then
44438       # It's still not found. Now this is an unrecoverable error.
44439       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44440 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44441       has_space=`$ECHO "$complete" | $GREP " "`
44442       if test "x$has_space" != x; then
44443         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44444 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44445       fi
44446       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44447     fi
44448   fi
44449 
44450   # Now new_path has a complete unix path to the binary
44451   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44452     # Keep paths in /bin as-is, but remove trailing .exe if any
44453     new_path="${new_path/%.exe/}"
44454     # Do not save /bin paths to all_fixpath_prefixes!
44455   else
44456     # Not in mixed or Windows style, start by that.
44457     new_path=`cmd //c echo $new_path`
44458 
44459   input_path="$new_path"
44460   # Check if we need to convert this using DOS-style short mode. If the path
44461   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44462   # take no chances and rewrite it.
44463   # Note: m4 eats our [], so we need to use [ and ] instead.
44464   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44465   if test "x$has_forbidden_chars" != x; then
44466     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44467     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44468   fi
44469 
44470     # Output is in $new_path
44471 
44472   windows_path="$new_path"
44473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44474     unix_path=`$CYGPATH -u "$windows_path"`
44475     new_path="$unix_path"
44476   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44477     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44478     new_path="$unix_path"
44479   fi
44480 
44481     # remove trailing .exe if any
44482     new_path="${new_path/%.exe/}"
44483 
44484     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44485     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44486   fi
44487 
44488     else
44489       # We're on a unix platform. Hooray! :)
44490       # First separate the path from the arguments. This will split at the first
44491       # space.
44492       complete="$BUILD_CC"
44493       path="${complete%% *}"
44494       tmp="$complete EOL"
44495       arguments="${tmp#* }"
44496 
44497       # Cannot rely on the command "which" here since it doesn't always work.
44498       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44499       if test -z "$is_absolute_path"; then
44500         # Path to executable is not absolute. Find it.
44501         IFS_save="$IFS"
44502         IFS=:
44503         for p in $PATH; do
44504           if test -f "$p/$path" && test -x "$p/$path"; then
44505             new_path="$p/$path"
44506             break
44507           fi
44508         done
44509         IFS="$IFS_save"
44510       else
44511         # This is an absolute path, we can use it without further modifications.
44512         new_path="$path"
44513       fi
44514 
44515       if test "x$new_path" = x; then
44516         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44517 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44518         has_space=`$ECHO "$complete" | $GREP " "`
44519         if test "x$has_space" != x; then
44520           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44521 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44522         fi
44523         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44524       fi
44525     fi
44526 
44527     # Now join together the path and the arguments once again
44528     if test "x$arguments" != xEOL; then
44529       new_complete="$new_path ${arguments% *}"
44530     else
44531       new_complete="$new_path"
44532     fi
44533 
44534     if test "x$complete" != "x$new_complete"; then
44535       BUILD_CC="$new_complete"
44536       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44537 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44538     fi
44539   fi
44540 
44541 
44542 
44543 
44544   # Publish this variable in the help.
44545 
44546 
44547   if [ -z "${BUILD_CXX+x}" ]; then
44548     # The variable is not set by user, try to locate tool using the code snippet
44549     for ac_prog in cl CC g++
44550 do
44551   # Extract the first word of "$ac_prog", so it can be a program name with args.
44552 set dummy $ac_prog; ac_word=$2
44553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44554 $as_echo_n "checking for $ac_word... " >&6; }
44555 if ${ac_cv_path_BUILD_CXX+:} false; then :
44556   $as_echo_n "(cached) " >&6
44557 else
44558   case $BUILD_CXX in
44559   [\\/]* | ?:[\\/]*)
44560   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44561   ;;
44562   *)
44563   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44564 for as_dir in $PATH
44565 do
44566   IFS=$as_save_IFS
44567   test -z "$as_dir" && as_dir=.
44568     for ac_exec_ext in '' $ac_executable_extensions; do
44569   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44570     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44571     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44572     break 2
44573   fi
44574 done
44575   done
44576 IFS=$as_save_IFS
44577 
44578   ;;
44579 esac
44580 fi
44581 BUILD_CXX=$ac_cv_path_BUILD_CXX
44582 if test -n "$BUILD_CXX"; then
44583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44584 $as_echo "$BUILD_CXX" >&6; }
44585 else
44586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44587 $as_echo "no" >&6; }
44588 fi
44589 
44590 
44591   test -n "$BUILD_CXX" && break
44592 done
44593 
44594   else
44595     # The variable is set, but is it from the command line or the environment?
44596 
44597     # Try to remove the string !BUILD_CXX! from our list.
44598     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44599     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44600       # If it failed, the variable was not from the command line. Ignore it,
44601       # but warn the user (except for BASH, which is always set by the calling BASH).
44602       if test "xBUILD_CXX" != xBASH; then
44603         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44604 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44605       fi
44606       # Try to locate tool using the code snippet
44607       for ac_prog in cl CC g++
44608 do
44609   # Extract the first word of "$ac_prog", so it can be a program name with args.
44610 set dummy $ac_prog; ac_word=$2
44611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44612 $as_echo_n "checking for $ac_word... " >&6; }
44613 if ${ac_cv_path_BUILD_CXX+:} false; then :
44614   $as_echo_n "(cached) " >&6
44615 else
44616   case $BUILD_CXX in
44617   [\\/]* | ?:[\\/]*)
44618   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44619   ;;
44620   *)
44621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44622 for as_dir in $PATH
44623 do
44624   IFS=$as_save_IFS
44625   test -z "$as_dir" && as_dir=.
44626     for ac_exec_ext in '' $ac_executable_extensions; do
44627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44628     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44630     break 2
44631   fi
44632 done
44633   done
44634 IFS=$as_save_IFS
44635 
44636   ;;
44637 esac
44638 fi
44639 BUILD_CXX=$ac_cv_path_BUILD_CXX
44640 if test -n "$BUILD_CXX"; then
44641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44642 $as_echo "$BUILD_CXX" >&6; }
44643 else
44644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44645 $as_echo "no" >&6; }
44646 fi
44647 
44648 
44649   test -n "$BUILD_CXX" && break
44650 done
44651 
44652     else
44653       # If it succeeded, then it was overridden by the user. We will use it
44654       # for the tool.
44655 
44656       # First remove it from the list of overridden variables, so we can test
44657       # for unknown variables in the end.
44658       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44659 
44660       # Check if we try to supply an empty value
44661       if test "x$BUILD_CXX" = x; then
44662         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44663 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44664         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44665 $as_echo_n "checking for BUILD_CXX... " >&6; }
44666         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44667 $as_echo "disabled" >&6; }
44668       else
44669         # Check if the provided tool contains a complete path.
44670         tool_specified="$BUILD_CXX"
44671         tool_basename="${tool_specified##*/}"
44672         if test "x$tool_basename" = "x$tool_specified"; then
44673           # A command without a complete path is provided, search $PATH.
44674           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44675 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44676           # Extract the first word of "$tool_basename", so it can be a program name with args.
44677 set dummy $tool_basename; ac_word=$2
44678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44679 $as_echo_n "checking for $ac_word... " >&6; }
44680 if ${ac_cv_path_BUILD_CXX+:} false; then :
44681   $as_echo_n "(cached) " >&6
44682 else
44683   case $BUILD_CXX in
44684   [\\/]* | ?:[\\/]*)
44685   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44686   ;;
44687   *)
44688   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44689 for as_dir in $PATH
44690 do
44691   IFS=$as_save_IFS
44692   test -z "$as_dir" && as_dir=.
44693     for ac_exec_ext in '' $ac_executable_extensions; do
44694   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44695     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44697     break 2
44698   fi
44699 done
44700   done
44701 IFS=$as_save_IFS
44702 
44703   ;;
44704 esac
44705 fi
44706 BUILD_CXX=$ac_cv_path_BUILD_CXX
44707 if test -n "$BUILD_CXX"; then
44708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44709 $as_echo "$BUILD_CXX" >&6; }
44710 else
44711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44712 $as_echo "no" >&6; }
44713 fi
44714 
44715 
44716           if test "x$BUILD_CXX" = x; then
44717             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44718           fi
44719         else
44720           # Otherwise we believe it is a complete path. Use it as it is.
44721           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44722 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44723           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44724 $as_echo_n "checking for BUILD_CXX... " >&6; }
44725           if test ! -x "$tool_specified"; then
44726             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44727 $as_echo "not found" >&6; }
44728             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44729           fi
44730           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44731 $as_echo "$tool_specified" >&6; }
44732         fi
44733       fi
44734     fi
44735 
44736   fi
44737 
44738 
44739 
44740   if test "x$BUILD_CXX" = x; then
44741     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44742   fi
44743 
44744 
44745 
44746   # Only process if variable expands to non-empty
44747 
44748   if test "x$BUILD_CXX" != x; then
44749     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44750 
44751   # First separate the path from the arguments. This will split at the first
44752   # space.
44753   complete="$BUILD_CXX"
44754   path="${complete%% *}"
44755   tmp="$complete EOL"
44756   arguments="${tmp#* }"
44757 
44758   # Input might be given as Windows format, start by converting to
44759   # unix format.
44760   new_path=`$CYGPATH -u "$path"`
44761 
44762   # Now try to locate executable using which
44763   new_path=`$WHICH "$new_path" 2> /dev/null`
44764   # bat and cmd files are not always considered executable in cygwin causing which
44765   # to not find them
44766   if test "x$new_path" = x \
44767       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44768       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44769     new_path=`$CYGPATH -u "$path"`
44770   fi
44771   if test "x$new_path" = x; then
44772     # Oops. Which didn't find the executable.
44773     # The splitting of arguments from the executable at a space might have been incorrect,
44774     # since paths with space are more likely in Windows. Give it another try with the whole
44775     # argument.
44776     path="$complete"
44777     arguments="EOL"
44778     new_path=`$CYGPATH -u "$path"`
44779     new_path=`$WHICH "$new_path" 2> /dev/null`
44780     # bat and cmd files are not always considered executable in cygwin causing which
44781     # to not find them
44782     if test "x$new_path" = x \
44783         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44784         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44785       new_path=`$CYGPATH -u "$path"`
44786     fi
44787     if test "x$new_path" = x; then
44788       # It's still not found. Now this is an unrecoverable error.
44789       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44790 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44791       has_space=`$ECHO "$complete" | $GREP " "`
44792       if test "x$has_space" != x; then
44793         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44794 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44795       fi
44796       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44797     fi
44798   fi
44799 
44800   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44801   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44802   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44803   # "foo.exe" is OK but "foo" is an error.
44804   #
44805   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44806   # It is also a way to make sure we got the proper file name for the real test later on.
44807   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44808   if test "x$test_shortpath" = x; then
44809     # Short path failed, file does not exist as specified.
44810     # Try adding .exe or .cmd
44811     if test -f "${new_path}.exe"; then
44812       input_to_shortpath="${new_path}.exe"
44813     elif test -f "${new_path}.cmd"; then
44814       input_to_shortpath="${new_path}.cmd"
44815     else
44816       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44817 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44818       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44819 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44820       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44821     fi
44822   else
44823     input_to_shortpath="$new_path"
44824   fi
44825 
44826   # Call helper function which possibly converts this using DOS-style short mode.
44827   # If so, the updated path is stored in $new_path.
44828   new_path="$input_to_shortpath"
44829 
44830   input_path="$input_to_shortpath"
44831   # Check if we need to convert this using DOS-style short mode. If the path
44832   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44833   # take no chances and rewrite it.
44834   # Note: m4 eats our [], so we need to use [ and ] instead.
44835   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44836   if test "x$has_forbidden_chars" != x; then
44837     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44838     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44839     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44840     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44841       # Going to short mode and back again did indeed matter. Since short mode is
44842       # case insensitive, let's make it lowercase to improve readability.
44843       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44844       # Now convert it back to Unix-style (cygpath)
44845       input_path=`$CYGPATH -u "$shortmode_path"`
44846       new_path="$input_path"
44847     fi
44848   fi
44849 
44850   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44851   if test "x$test_cygdrive_prefix" = x; then
44852     # As a simple fix, exclude /usr/bin since it's not a real path.
44853     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44854       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44855       # a path prefixed by /cygdrive for fixpath to work.
44856       new_path="$CYGWIN_ROOT_PATH$input_path"
44857     fi
44858   fi
44859 
44860   # remove trailing .exe if any
44861   new_path="${new_path/%.exe/}"
44862 
44863     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44864 
44865   # First separate the path from the arguments. This will split at the first
44866   # space.
44867   complete="$BUILD_CXX"
44868   path="${complete%% *}"
44869   tmp="$complete EOL"
44870   arguments="${tmp#* }"
44871 
44872   # Input might be given as Windows format, start by converting to
44873   # unix format.
44874   new_path="$path"
44875 
44876   windows_path="$new_path"
44877   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44878     unix_path=`$CYGPATH -u "$windows_path"`
44879     new_path="$unix_path"
44880   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44881     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44882     new_path="$unix_path"
44883   fi
44884 
44885 
44886   # Now try to locate executable using which
44887   new_path=`$WHICH "$new_path" 2> /dev/null`
44888 
44889   if test "x$new_path" = x; then
44890     # Oops. Which didn't find the executable.
44891     # The splitting of arguments from the executable at a space might have been incorrect,
44892     # since paths with space are more likely in Windows. Give it another try with the whole
44893     # argument.
44894     path="$complete"
44895     arguments="EOL"
44896     new_path="$path"
44897 
44898   windows_path="$new_path"
44899   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44900     unix_path=`$CYGPATH -u "$windows_path"`
44901     new_path="$unix_path"
44902   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44903     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44904     new_path="$unix_path"
44905   fi
44906 
44907 
44908     new_path=`$WHICH "$new_path" 2> /dev/null`
44909     # bat and cmd files are not always considered executable in MSYS causing which
44910     # to not find them
44911     if test "x$new_path" = x \
44912         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44913         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44914       new_path="$path"
44915 
44916   windows_path="$new_path"
44917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44918     unix_path=`$CYGPATH -u "$windows_path"`
44919     new_path="$unix_path"
44920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44922     new_path="$unix_path"
44923   fi
44924 
44925     fi
44926 
44927     if test "x$new_path" = x; then
44928       # It's still not found. Now this is an unrecoverable error.
44929       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44930 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44931       has_space=`$ECHO "$complete" | $GREP " "`
44932       if test "x$has_space" != x; then
44933         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44934 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44935       fi
44936       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44937     fi
44938   fi
44939 
44940   # Now new_path has a complete unix path to the binary
44941   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44942     # Keep paths in /bin as-is, but remove trailing .exe if any
44943     new_path="${new_path/%.exe/}"
44944     # Do not save /bin paths to all_fixpath_prefixes!
44945   else
44946     # Not in mixed or Windows style, start by that.
44947     new_path=`cmd //c echo $new_path`
44948 
44949   input_path="$new_path"
44950   # Check if we need to convert this using DOS-style short mode. If the path
44951   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44952   # take no chances and rewrite it.
44953   # Note: m4 eats our [], so we need to use [ and ] instead.
44954   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44955   if test "x$has_forbidden_chars" != x; then
44956     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44957     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44958   fi
44959 
44960     # Output is in $new_path
44961 
44962   windows_path="$new_path"
44963   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44964     unix_path=`$CYGPATH -u "$windows_path"`
44965     new_path="$unix_path"
44966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44967     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44968     new_path="$unix_path"
44969   fi
44970 
44971     # remove trailing .exe if any
44972     new_path="${new_path/%.exe/}"
44973 
44974     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44975     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44976   fi
44977 
44978     else
44979       # We're on a unix platform. Hooray! :)
44980       # First separate the path from the arguments. This will split at the first
44981       # space.
44982       complete="$BUILD_CXX"
44983       path="${complete%% *}"
44984       tmp="$complete EOL"
44985       arguments="${tmp#* }"
44986 
44987       # Cannot rely on the command "which" here since it doesn't always work.
44988       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44989       if test -z "$is_absolute_path"; then
44990         # Path to executable is not absolute. Find it.
44991         IFS_save="$IFS"
44992         IFS=:
44993         for p in $PATH; do
44994           if test -f "$p/$path" && test -x "$p/$path"; then
44995             new_path="$p/$path"
44996             break
44997           fi
44998         done
44999         IFS="$IFS_save"
45000       else
45001         # This is an absolute path, we can use it without further modifications.
45002         new_path="$path"
45003       fi
45004 
45005       if test "x$new_path" = x; then
45006         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45007 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45008         has_space=`$ECHO "$complete" | $GREP " "`
45009         if test "x$has_space" != x; then
45010           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45011 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45012         fi
45013         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45014       fi
45015     fi
45016 
45017     # Now join together the path and the arguments once again
45018     if test "x$arguments" != xEOL; then
45019       new_complete="$new_path ${arguments% *}"
45020     else
45021       new_complete="$new_path"
45022     fi
45023 
45024     if test "x$complete" != "x$new_complete"; then
45025       BUILD_CXX="$new_complete"
45026       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45027 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45028     fi
45029   fi
45030 
45031 
45032 
45033   # Publish this variable in the help.
45034 
45035 
45036   if [ -z "${BUILD_NM+x}" ]; then
45037     # The variable is not set by user, try to locate tool using the code snippet
45038     for ac_prog in nm gcc-nm
45039 do
45040   # Extract the first word of "$ac_prog", so it can be a program name with args.
45041 set dummy $ac_prog; ac_word=$2
45042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45043 $as_echo_n "checking for $ac_word... " >&6; }
45044 if ${ac_cv_path_BUILD_NM+:} false; then :
45045   $as_echo_n "(cached) " >&6
45046 else
45047   case $BUILD_NM in
45048   [\\/]* | ?:[\\/]*)
45049   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45050   ;;
45051   *)
45052   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45053 for as_dir in $PATH
45054 do
45055   IFS=$as_save_IFS
45056   test -z "$as_dir" && as_dir=.
45057     for ac_exec_ext in '' $ac_executable_extensions; do
45058   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45059     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45060     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45061     break 2
45062   fi
45063 done
45064   done
45065 IFS=$as_save_IFS
45066 
45067   ;;
45068 esac
45069 fi
45070 BUILD_NM=$ac_cv_path_BUILD_NM
45071 if test -n "$BUILD_NM"; then
45072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45073 $as_echo "$BUILD_NM" >&6; }
45074 else
45075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45076 $as_echo "no" >&6; }
45077 fi
45078 
45079 
45080   test -n "$BUILD_NM" && break
45081 done
45082 
45083   else
45084     # The variable is set, but is it from the command line or the environment?
45085 
45086     # Try to remove the string !BUILD_NM! from our list.
45087     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45088     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45089       # If it failed, the variable was not from the command line. Ignore it,
45090       # but warn the user (except for BASH, which is always set by the calling BASH).
45091       if test "xBUILD_NM" != xBASH; then
45092         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45093 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45094       fi
45095       # Try to locate tool using the code snippet
45096       for ac_prog in nm gcc-nm
45097 do
45098   # Extract the first word of "$ac_prog", so it can be a program name with args.
45099 set dummy $ac_prog; ac_word=$2
45100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45101 $as_echo_n "checking for $ac_word... " >&6; }
45102 if ${ac_cv_path_BUILD_NM+:} false; then :
45103   $as_echo_n "(cached) " >&6
45104 else
45105   case $BUILD_NM in
45106   [\\/]* | ?:[\\/]*)
45107   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45108   ;;
45109   *)
45110   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45111 for as_dir in $PATH
45112 do
45113   IFS=$as_save_IFS
45114   test -z "$as_dir" && as_dir=.
45115     for ac_exec_ext in '' $ac_executable_extensions; do
45116   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45117     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45119     break 2
45120   fi
45121 done
45122   done
45123 IFS=$as_save_IFS
45124 
45125   ;;
45126 esac
45127 fi
45128 BUILD_NM=$ac_cv_path_BUILD_NM
45129 if test -n "$BUILD_NM"; then
45130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45131 $as_echo "$BUILD_NM" >&6; }
45132 else
45133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45134 $as_echo "no" >&6; }
45135 fi
45136 
45137 
45138   test -n "$BUILD_NM" && break
45139 done
45140 
45141     else
45142       # If it succeeded, then it was overridden by the user. We will use it
45143       # for the tool.
45144 
45145       # First remove it from the list of overridden variables, so we can test
45146       # for unknown variables in the end.
45147       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45148 
45149       # Check if we try to supply an empty value
45150       if test "x$BUILD_NM" = x; then
45151         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45152 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45153         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45154 $as_echo_n "checking for BUILD_NM... " >&6; }
45155         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45156 $as_echo "disabled" >&6; }
45157       else
45158         # Check if the provided tool contains a complete path.
45159         tool_specified="$BUILD_NM"
45160         tool_basename="${tool_specified##*/}"
45161         if test "x$tool_basename" = "x$tool_specified"; then
45162           # A command without a complete path is provided, search $PATH.
45163           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45164 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45165           # Extract the first word of "$tool_basename", so it can be a program name with args.
45166 set dummy $tool_basename; ac_word=$2
45167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45168 $as_echo_n "checking for $ac_word... " >&6; }
45169 if ${ac_cv_path_BUILD_NM+:} false; then :
45170   $as_echo_n "(cached) " >&6
45171 else
45172   case $BUILD_NM in
45173   [\\/]* | ?:[\\/]*)
45174   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45175   ;;
45176   *)
45177   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45178 for as_dir in $PATH
45179 do
45180   IFS=$as_save_IFS
45181   test -z "$as_dir" && as_dir=.
45182     for ac_exec_ext in '' $ac_executable_extensions; do
45183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45184     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45186     break 2
45187   fi
45188 done
45189   done
45190 IFS=$as_save_IFS
45191 
45192   ;;
45193 esac
45194 fi
45195 BUILD_NM=$ac_cv_path_BUILD_NM
45196 if test -n "$BUILD_NM"; then
45197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45198 $as_echo "$BUILD_NM" >&6; }
45199 else
45200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45201 $as_echo "no" >&6; }
45202 fi
45203 
45204 
45205           if test "x$BUILD_NM" = x; then
45206             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45207           fi
45208         else
45209           # Otherwise we believe it is a complete path. Use it as it is.
45210           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45211 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45212           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45213 $as_echo_n "checking for BUILD_NM... " >&6; }
45214           if test ! -x "$tool_specified"; then
45215             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45216 $as_echo "not found" >&6; }
45217             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45218           fi
45219           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45220 $as_echo "$tool_specified" >&6; }
45221         fi
45222       fi
45223     fi
45224 
45225   fi
45226 
45227 
45228 
45229   # Only process if variable expands to non-empty
45230 
45231   if test "x$BUILD_NM" != x; then
45232     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45233 
45234   # First separate the path from the arguments. This will split at the first
45235   # space.
45236   complete="$BUILD_NM"
45237   path="${complete%% *}"
45238   tmp="$complete EOL"
45239   arguments="${tmp#* }"
45240 
45241   # Input might be given as Windows format, start by converting to
45242   # unix format.
45243   new_path=`$CYGPATH -u "$path"`
45244 
45245   # Now try to locate executable using which
45246   new_path=`$WHICH "$new_path" 2> /dev/null`
45247   # bat and cmd files are not always considered executable in cygwin causing which
45248   # to not find them
45249   if test "x$new_path" = x \
45250       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45251       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45252     new_path=`$CYGPATH -u "$path"`
45253   fi
45254   if test "x$new_path" = x; then
45255     # Oops. Which didn't find the executable.
45256     # The splitting of arguments from the executable at a space might have been incorrect,
45257     # since paths with space are more likely in Windows. Give it another try with the whole
45258     # argument.
45259     path="$complete"
45260     arguments="EOL"
45261     new_path=`$CYGPATH -u "$path"`
45262     new_path=`$WHICH "$new_path" 2> /dev/null`
45263     # bat and cmd files are not always considered executable in cygwin causing which
45264     # to not find them
45265     if test "x$new_path" = x \
45266         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45267         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45268       new_path=`$CYGPATH -u "$path"`
45269     fi
45270     if test "x$new_path" = x; then
45271       # It's still not found. Now this is an unrecoverable error.
45272       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45273 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45274       has_space=`$ECHO "$complete" | $GREP " "`
45275       if test "x$has_space" != x; then
45276         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45277 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45278       fi
45279       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45280     fi
45281   fi
45282 
45283   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45284   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45285   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45286   # "foo.exe" is OK but "foo" is an error.
45287   #
45288   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45289   # It is also a way to make sure we got the proper file name for the real test later on.
45290   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45291   if test "x$test_shortpath" = x; then
45292     # Short path failed, file does not exist as specified.
45293     # Try adding .exe or .cmd
45294     if test -f "${new_path}.exe"; then
45295       input_to_shortpath="${new_path}.exe"
45296     elif test -f "${new_path}.cmd"; then
45297       input_to_shortpath="${new_path}.cmd"
45298     else
45299       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45300 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45301       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45302 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45303       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45304     fi
45305   else
45306     input_to_shortpath="$new_path"
45307   fi
45308 
45309   # Call helper function which possibly converts this using DOS-style short mode.
45310   # If so, the updated path is stored in $new_path.
45311   new_path="$input_to_shortpath"
45312 
45313   input_path="$input_to_shortpath"
45314   # Check if we need to convert this using DOS-style short mode. If the path
45315   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45316   # take no chances and rewrite it.
45317   # Note: m4 eats our [], so we need to use [ and ] instead.
45318   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45319   if test "x$has_forbidden_chars" != x; then
45320     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45321     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45322     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45323     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45324       # Going to short mode and back again did indeed matter. Since short mode is
45325       # case insensitive, let's make it lowercase to improve readability.
45326       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45327       # Now convert it back to Unix-style (cygpath)
45328       input_path=`$CYGPATH -u "$shortmode_path"`
45329       new_path="$input_path"
45330     fi
45331   fi
45332 
45333   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45334   if test "x$test_cygdrive_prefix" = x; then
45335     # As a simple fix, exclude /usr/bin since it's not a real path.
45336     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45337       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45338       # a path prefixed by /cygdrive for fixpath to work.
45339       new_path="$CYGWIN_ROOT_PATH$input_path"
45340     fi
45341   fi
45342 
45343   # remove trailing .exe if any
45344   new_path="${new_path/%.exe/}"
45345 
45346     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45347 
45348   # First separate the path from the arguments. This will split at the first
45349   # space.
45350   complete="$BUILD_NM"
45351   path="${complete%% *}"
45352   tmp="$complete EOL"
45353   arguments="${tmp#* }"
45354 
45355   # Input might be given as Windows format, start by converting to
45356   # unix format.
45357   new_path="$path"
45358 
45359   windows_path="$new_path"
45360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45361     unix_path=`$CYGPATH -u "$windows_path"`
45362     new_path="$unix_path"
45363   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45364     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45365     new_path="$unix_path"
45366   fi
45367 
45368 
45369   # Now try to locate executable using which
45370   new_path=`$WHICH "$new_path" 2> /dev/null`
45371 
45372   if test "x$new_path" = x; then
45373     # Oops. Which didn't find the executable.
45374     # The splitting of arguments from the executable at a space might have been incorrect,
45375     # since paths with space are more likely in Windows. Give it another try with the whole
45376     # argument.
45377     path="$complete"
45378     arguments="EOL"
45379     new_path="$path"
45380 
45381   windows_path="$new_path"
45382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45383     unix_path=`$CYGPATH -u "$windows_path"`
45384     new_path="$unix_path"
45385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45386     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45387     new_path="$unix_path"
45388   fi
45389 
45390 
45391     new_path=`$WHICH "$new_path" 2> /dev/null`
45392     # bat and cmd files are not always considered executable in MSYS causing which
45393     # to not find them
45394     if test "x$new_path" = x \
45395         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45396         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45397       new_path="$path"
45398 
45399   windows_path="$new_path"
45400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45401     unix_path=`$CYGPATH -u "$windows_path"`
45402     new_path="$unix_path"
45403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45405     new_path="$unix_path"
45406   fi
45407 
45408     fi
45409 
45410     if test "x$new_path" = x; then
45411       # It's still not found. Now this is an unrecoverable error.
45412       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45413 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45414       has_space=`$ECHO "$complete" | $GREP " "`
45415       if test "x$has_space" != x; then
45416         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45417 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45418       fi
45419       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45420     fi
45421   fi
45422 
45423   # Now new_path has a complete unix path to the binary
45424   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45425     # Keep paths in /bin as-is, but remove trailing .exe if any
45426     new_path="${new_path/%.exe/}"
45427     # Do not save /bin paths to all_fixpath_prefixes!
45428   else
45429     # Not in mixed or Windows style, start by that.
45430     new_path=`cmd //c echo $new_path`
45431 
45432   input_path="$new_path"
45433   # Check if we need to convert this using DOS-style short mode. If the path
45434   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45435   # take no chances and rewrite it.
45436   # Note: m4 eats our [], so we need to use [ and ] instead.
45437   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45438   if test "x$has_forbidden_chars" != x; then
45439     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45440     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45441   fi
45442 
45443     # Output is in $new_path
45444 
45445   windows_path="$new_path"
45446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45447     unix_path=`$CYGPATH -u "$windows_path"`
45448     new_path="$unix_path"
45449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45450     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45451     new_path="$unix_path"
45452   fi
45453 
45454     # remove trailing .exe if any
45455     new_path="${new_path/%.exe/}"
45456 
45457     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45458     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45459   fi
45460 
45461     else
45462       # We're on a unix platform. Hooray! :)
45463       # First separate the path from the arguments. This will split at the first
45464       # space.
45465       complete="$BUILD_NM"
45466       path="${complete%% *}"
45467       tmp="$complete EOL"
45468       arguments="${tmp#* }"
45469 
45470       # Cannot rely on the command "which" here since it doesn't always work.
45471       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45472       if test -z "$is_absolute_path"; then
45473         # Path to executable is not absolute. Find it.
45474         IFS_save="$IFS"
45475         IFS=:
45476         for p in $PATH; do
45477           if test -f "$p/$path" && test -x "$p/$path"; then
45478             new_path="$p/$path"
45479             break
45480           fi
45481         done
45482         IFS="$IFS_save"
45483       else
45484         # This is an absolute path, we can use it without further modifications.
45485         new_path="$path"
45486       fi
45487 
45488       if test "x$new_path" = x; then
45489         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45490 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45491         has_space=`$ECHO "$complete" | $GREP " "`
45492         if test "x$has_space" != x; then
45493           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45494 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45495         fi
45496         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45497       fi
45498     fi
45499 
45500     # Now join together the path and the arguments once again
45501     if test "x$arguments" != xEOL; then
45502       new_complete="$new_path ${arguments% *}"
45503     else
45504       new_complete="$new_path"
45505     fi
45506 
45507     if test "x$complete" != "x$new_complete"; then
45508       BUILD_NM="$new_complete"
45509       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45510 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45511     fi
45512   fi
45513 
45514 
45515 
45516   # Publish this variable in the help.
45517 
45518 
45519   if [ -z "${BUILD_AR+x}" ]; then
45520     # The variable is not set by user, try to locate tool using the code snippet
45521     for ac_prog in ar gcc-ar
45522 do
45523   # Extract the first word of "$ac_prog", so it can be a program name with args.
45524 set dummy $ac_prog; ac_word=$2
45525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45526 $as_echo_n "checking for $ac_word... " >&6; }
45527 if ${ac_cv_path_BUILD_AR+:} false; then :
45528   $as_echo_n "(cached) " >&6
45529 else
45530   case $BUILD_AR in
45531   [\\/]* | ?:[\\/]*)
45532   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45533   ;;
45534   *)
45535   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45536 for as_dir in $PATH
45537 do
45538   IFS=$as_save_IFS
45539   test -z "$as_dir" && as_dir=.
45540     for ac_exec_ext in '' $ac_executable_extensions; do
45541   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45542     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45543     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45544     break 2
45545   fi
45546 done
45547   done
45548 IFS=$as_save_IFS
45549 
45550   ;;
45551 esac
45552 fi
45553 BUILD_AR=$ac_cv_path_BUILD_AR
45554 if test -n "$BUILD_AR"; then
45555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45556 $as_echo "$BUILD_AR" >&6; }
45557 else
45558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45559 $as_echo "no" >&6; }
45560 fi
45561 
45562 
45563   test -n "$BUILD_AR" && break
45564 done
45565 
45566   else
45567     # The variable is set, but is it from the command line or the environment?
45568 
45569     # Try to remove the string !BUILD_AR! from our list.
45570     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45571     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45572       # If it failed, the variable was not from the command line. Ignore it,
45573       # but warn the user (except for BASH, which is always set by the calling BASH).
45574       if test "xBUILD_AR" != xBASH; then
45575         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45576 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45577       fi
45578       # Try to locate tool using the code snippet
45579       for ac_prog in ar gcc-ar
45580 do
45581   # Extract the first word of "$ac_prog", so it can be a program name with args.
45582 set dummy $ac_prog; ac_word=$2
45583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45584 $as_echo_n "checking for $ac_word... " >&6; }
45585 if ${ac_cv_path_BUILD_AR+:} false; then :
45586   $as_echo_n "(cached) " >&6
45587 else
45588   case $BUILD_AR in
45589   [\\/]* | ?:[\\/]*)
45590   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45591   ;;
45592   *)
45593   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45594 for as_dir in $PATH
45595 do
45596   IFS=$as_save_IFS
45597   test -z "$as_dir" && as_dir=.
45598     for ac_exec_ext in '' $ac_executable_extensions; do
45599   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45600     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45601     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45602     break 2
45603   fi
45604 done
45605   done
45606 IFS=$as_save_IFS
45607 
45608   ;;
45609 esac
45610 fi
45611 BUILD_AR=$ac_cv_path_BUILD_AR
45612 if test -n "$BUILD_AR"; then
45613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45614 $as_echo "$BUILD_AR" >&6; }
45615 else
45616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45617 $as_echo "no" >&6; }
45618 fi
45619 
45620 
45621   test -n "$BUILD_AR" && break
45622 done
45623 
45624     else
45625       # If it succeeded, then it was overridden by the user. We will use it
45626       # for the tool.
45627 
45628       # First remove it from the list of overridden variables, so we can test
45629       # for unknown variables in the end.
45630       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45631 
45632       # Check if we try to supply an empty value
45633       if test "x$BUILD_AR" = x; then
45634         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45635 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45636         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45637 $as_echo_n "checking for BUILD_AR... " >&6; }
45638         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45639 $as_echo "disabled" >&6; }
45640       else
45641         # Check if the provided tool contains a complete path.
45642         tool_specified="$BUILD_AR"
45643         tool_basename="${tool_specified##*/}"
45644         if test "x$tool_basename" = "x$tool_specified"; then
45645           # A command without a complete path is provided, search $PATH.
45646           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45647 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45648           # Extract the first word of "$tool_basename", so it can be a program name with args.
45649 set dummy $tool_basename; ac_word=$2
45650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45651 $as_echo_n "checking for $ac_word... " >&6; }
45652 if ${ac_cv_path_BUILD_AR+:} false; then :
45653   $as_echo_n "(cached) " >&6
45654 else
45655   case $BUILD_AR in
45656   [\\/]* | ?:[\\/]*)
45657   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45658   ;;
45659   *)
45660   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45661 for as_dir in $PATH
45662 do
45663   IFS=$as_save_IFS
45664   test -z "$as_dir" && as_dir=.
45665     for ac_exec_ext in '' $ac_executable_extensions; do
45666   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45667     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45668     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45669     break 2
45670   fi
45671 done
45672   done
45673 IFS=$as_save_IFS
45674 
45675   ;;
45676 esac
45677 fi
45678 BUILD_AR=$ac_cv_path_BUILD_AR
45679 if test -n "$BUILD_AR"; then
45680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45681 $as_echo "$BUILD_AR" >&6; }
45682 else
45683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45684 $as_echo "no" >&6; }
45685 fi
45686 
45687 
45688           if test "x$BUILD_AR" = x; then
45689             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45690           fi
45691         else
45692           # Otherwise we believe it is a complete path. Use it as it is.
45693           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45694 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45695           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45696 $as_echo_n "checking for BUILD_AR... " >&6; }
45697           if test ! -x "$tool_specified"; then
45698             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45699 $as_echo "not found" >&6; }
45700             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45701           fi
45702           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45703 $as_echo "$tool_specified" >&6; }
45704         fi
45705       fi
45706     fi
45707 
45708   fi
45709 
45710 
45711 
45712   # Only process if variable expands to non-empty
45713 
45714   if test "x$BUILD_AR" != x; then
45715     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45716 
45717   # First separate the path from the arguments. This will split at the first
45718   # space.
45719   complete="$BUILD_AR"
45720   path="${complete%% *}"
45721   tmp="$complete EOL"
45722   arguments="${tmp#* }"
45723 
45724   # Input might be given as Windows format, start by converting to
45725   # unix format.
45726   new_path=`$CYGPATH -u "$path"`
45727 
45728   # Now try to locate executable using which
45729   new_path=`$WHICH "$new_path" 2> /dev/null`
45730   # bat and cmd files are not always considered executable in cygwin causing which
45731   # to not find them
45732   if test "x$new_path" = x \
45733       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45734       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45735     new_path=`$CYGPATH -u "$path"`
45736   fi
45737   if test "x$new_path" = x; then
45738     # Oops. Which didn't find the executable.
45739     # The splitting of arguments from the executable at a space might have been incorrect,
45740     # since paths with space are more likely in Windows. Give it another try with the whole
45741     # argument.
45742     path="$complete"
45743     arguments="EOL"
45744     new_path=`$CYGPATH -u "$path"`
45745     new_path=`$WHICH "$new_path" 2> /dev/null`
45746     # bat and cmd files are not always considered executable in cygwin causing which
45747     # to not find them
45748     if test "x$new_path" = x \
45749         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45750         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45751       new_path=`$CYGPATH -u "$path"`
45752     fi
45753     if test "x$new_path" = x; then
45754       # It's still not found. Now this is an unrecoverable error.
45755       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45756 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45757       has_space=`$ECHO "$complete" | $GREP " "`
45758       if test "x$has_space" != x; then
45759         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45760 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45761       fi
45762       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45763     fi
45764   fi
45765 
45766   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45767   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45768   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45769   # "foo.exe" is OK but "foo" is an error.
45770   #
45771   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45772   # It is also a way to make sure we got the proper file name for the real test later on.
45773   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45774   if test "x$test_shortpath" = x; then
45775     # Short path failed, file does not exist as specified.
45776     # Try adding .exe or .cmd
45777     if test -f "${new_path}.exe"; then
45778       input_to_shortpath="${new_path}.exe"
45779     elif test -f "${new_path}.cmd"; then
45780       input_to_shortpath="${new_path}.cmd"
45781     else
45782       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45783 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45784       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45785 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45786       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45787     fi
45788   else
45789     input_to_shortpath="$new_path"
45790   fi
45791 
45792   # Call helper function which possibly converts this using DOS-style short mode.
45793   # If so, the updated path is stored in $new_path.
45794   new_path="$input_to_shortpath"
45795 
45796   input_path="$input_to_shortpath"
45797   # Check if we need to convert this using DOS-style short mode. If the path
45798   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45799   # take no chances and rewrite it.
45800   # Note: m4 eats our [], so we need to use [ and ] instead.
45801   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45802   if test "x$has_forbidden_chars" != x; then
45803     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45804     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45805     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45806     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45807       # Going to short mode and back again did indeed matter. Since short mode is
45808       # case insensitive, let's make it lowercase to improve readability.
45809       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45810       # Now convert it back to Unix-style (cygpath)
45811       input_path=`$CYGPATH -u "$shortmode_path"`
45812       new_path="$input_path"
45813     fi
45814   fi
45815 
45816   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45817   if test "x$test_cygdrive_prefix" = x; then
45818     # As a simple fix, exclude /usr/bin since it's not a real path.
45819     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45820       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45821       # a path prefixed by /cygdrive for fixpath to work.
45822       new_path="$CYGWIN_ROOT_PATH$input_path"
45823     fi
45824   fi
45825 
45826   # remove trailing .exe if any
45827   new_path="${new_path/%.exe/}"
45828 
45829     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45830 
45831   # First separate the path from the arguments. This will split at the first
45832   # space.
45833   complete="$BUILD_AR"
45834   path="${complete%% *}"
45835   tmp="$complete EOL"
45836   arguments="${tmp#* }"
45837 
45838   # Input might be given as Windows format, start by converting to
45839   # unix format.
45840   new_path="$path"
45841 
45842   windows_path="$new_path"
45843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45844     unix_path=`$CYGPATH -u "$windows_path"`
45845     new_path="$unix_path"
45846   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45847     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45848     new_path="$unix_path"
45849   fi
45850 
45851 
45852   # Now try to locate executable using which
45853   new_path=`$WHICH "$new_path" 2> /dev/null`
45854 
45855   if test "x$new_path" = x; then
45856     # Oops. Which didn't find the executable.
45857     # The splitting of arguments from the executable at a space might have been incorrect,
45858     # since paths with space are more likely in Windows. Give it another try with the whole
45859     # argument.
45860     path="$complete"
45861     arguments="EOL"
45862     new_path="$path"
45863 
45864   windows_path="$new_path"
45865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45866     unix_path=`$CYGPATH -u "$windows_path"`
45867     new_path="$unix_path"
45868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45869     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45870     new_path="$unix_path"
45871   fi
45872 
45873 
45874     new_path=`$WHICH "$new_path" 2> /dev/null`
45875     # bat and cmd files are not always considered executable in MSYS causing which
45876     # to not find them
45877     if test "x$new_path" = x \
45878         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45879         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45880       new_path="$path"
45881 
45882   windows_path="$new_path"
45883   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45884     unix_path=`$CYGPATH -u "$windows_path"`
45885     new_path="$unix_path"
45886   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45887     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45888     new_path="$unix_path"
45889   fi
45890 
45891     fi
45892 
45893     if test "x$new_path" = x; then
45894       # It's still not found. Now this is an unrecoverable error.
45895       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45896 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45897       has_space=`$ECHO "$complete" | $GREP " "`
45898       if test "x$has_space" != x; then
45899         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45900 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45901       fi
45902       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45903     fi
45904   fi
45905 
45906   # Now new_path has a complete unix path to the binary
45907   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45908     # Keep paths in /bin as-is, but remove trailing .exe if any
45909     new_path="${new_path/%.exe/}"
45910     # Do not save /bin paths to all_fixpath_prefixes!
45911   else
45912     # Not in mixed or Windows style, start by that.
45913     new_path=`cmd //c echo $new_path`
45914 
45915   input_path="$new_path"
45916   # Check if we need to convert this using DOS-style short mode. If the path
45917   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45918   # take no chances and rewrite it.
45919   # Note: m4 eats our [], so we need to use [ and ] instead.
45920   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45921   if test "x$has_forbidden_chars" != x; then
45922     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45923     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45924   fi
45925 
45926     # Output is in $new_path
45927 
45928   windows_path="$new_path"
45929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45930     unix_path=`$CYGPATH -u "$windows_path"`
45931     new_path="$unix_path"
45932   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45933     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45934     new_path="$unix_path"
45935   fi
45936 
45937     # remove trailing .exe if any
45938     new_path="${new_path/%.exe/}"
45939 
45940     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45941     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45942   fi
45943 
45944     else
45945       # We're on a unix platform. Hooray! :)
45946       # First separate the path from the arguments. This will split at the first
45947       # space.
45948       complete="$BUILD_AR"
45949       path="${complete%% *}"
45950       tmp="$complete EOL"
45951       arguments="${tmp#* }"
45952 
45953       # Cannot rely on the command "which" here since it doesn't always work.
45954       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45955       if test -z "$is_absolute_path"; then
45956         # Path to executable is not absolute. Find it.
45957         IFS_save="$IFS"
45958         IFS=:
45959         for p in $PATH; do
45960           if test -f "$p/$path" && test -x "$p/$path"; then
45961             new_path="$p/$path"
45962             break
45963           fi
45964         done
45965         IFS="$IFS_save"
45966       else
45967         # This is an absolute path, we can use it without further modifications.
45968         new_path="$path"
45969       fi
45970 
45971       if test "x$new_path" = x; then
45972         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45973 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45974         has_space=`$ECHO "$complete" | $GREP " "`
45975         if test "x$has_space" != x; then
45976           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45977 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45978         fi
45979         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45980       fi
45981     fi
45982 
45983     # Now join together the path and the arguments once again
45984     if test "x$arguments" != xEOL; then
45985       new_complete="$new_path ${arguments% *}"
45986     else
45987       new_complete="$new_path"
45988     fi
45989 
45990     if test "x$complete" != "x$new_complete"; then
45991       BUILD_AR="$new_complete"
45992       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45993 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45994     fi
45995   fi
45996 
45997 
45998 
45999   # Publish this variable in the help.
46000 
46001 
46002   if [ -z "${BUILD_OBJCOPY+x}" ]; then
46003     # The variable is not set by user, try to locate tool using the code snippet
46004     for ac_prog in objcopy
46005 do
46006   # Extract the first word of "$ac_prog", so it can be a program name with args.
46007 set dummy $ac_prog; ac_word=$2
46008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46009 $as_echo_n "checking for $ac_word... " >&6; }
46010 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46011   $as_echo_n "(cached) " >&6
46012 else
46013   case $BUILD_OBJCOPY in
46014   [\\/]* | ?:[\\/]*)
46015   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46016   ;;
46017   *)
46018   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46019 for as_dir in $PATH
46020 do
46021   IFS=$as_save_IFS
46022   test -z "$as_dir" && as_dir=.
46023     for ac_exec_ext in '' $ac_executable_extensions; do
46024   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46025     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46026     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46027     break 2
46028   fi
46029 done
46030   done
46031 IFS=$as_save_IFS
46032 
46033   ;;
46034 esac
46035 fi
46036 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46037 if test -n "$BUILD_OBJCOPY"; then
46038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46039 $as_echo "$BUILD_OBJCOPY" >&6; }
46040 else
46041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46042 $as_echo "no" >&6; }
46043 fi
46044 
46045 
46046   test -n "$BUILD_OBJCOPY" && break
46047 done
46048 
46049   else
46050     # The variable is set, but is it from the command line or the environment?
46051 
46052     # Try to remove the string !BUILD_OBJCOPY! from our list.
46053     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46054     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46055       # If it failed, the variable was not from the command line. Ignore it,
46056       # but warn the user (except for BASH, which is always set by the calling BASH).
46057       if test "xBUILD_OBJCOPY" != xBASH; then
46058         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46059 $as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46060       fi
46061       # Try to locate tool using the code snippet
46062       for ac_prog in objcopy
46063 do
46064   # Extract the first word of "$ac_prog", so it can be a program name with args.
46065 set dummy $ac_prog; ac_word=$2
46066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46067 $as_echo_n "checking for $ac_word... " >&6; }
46068 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46069   $as_echo_n "(cached) " >&6
46070 else
46071   case $BUILD_OBJCOPY in
46072   [\\/]* | ?:[\\/]*)
46073   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46074   ;;
46075   *)
46076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46077 for as_dir in $PATH
46078 do
46079   IFS=$as_save_IFS
46080   test -z "$as_dir" && as_dir=.
46081     for ac_exec_ext in '' $ac_executable_extensions; do
46082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46083     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46085     break 2
46086   fi
46087 done
46088   done
46089 IFS=$as_save_IFS
46090 
46091   ;;
46092 esac
46093 fi
46094 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46095 if test -n "$BUILD_OBJCOPY"; then
46096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46097 $as_echo "$BUILD_OBJCOPY" >&6; }
46098 else
46099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46100 $as_echo "no" >&6; }
46101 fi
46102 
46103 
46104   test -n "$BUILD_OBJCOPY" && break
46105 done
46106 
46107     else
46108       # If it succeeded, then it was overridden by the user. We will use it
46109       # for the tool.
46110 
46111       # First remove it from the list of overridden variables, so we can test
46112       # for unknown variables in the end.
46113       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46114 
46115       # Check if we try to supply an empty value
46116       if test "x$BUILD_OBJCOPY" = x; then
46117         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46118 $as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46119         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46120 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46121         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46122 $as_echo "disabled" >&6; }
46123       else
46124         # Check if the provided tool contains a complete path.
46125         tool_specified="$BUILD_OBJCOPY"
46126         tool_basename="${tool_specified##*/}"
46127         if test "x$tool_basename" = "x$tool_specified"; then
46128           # A command without a complete path is provided, search $PATH.
46129           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46130 $as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46131           # Extract the first word of "$tool_basename", so it can be a program name with args.
46132 set dummy $tool_basename; ac_word=$2
46133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46134 $as_echo_n "checking for $ac_word... " >&6; }
46135 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46136   $as_echo_n "(cached) " >&6
46137 else
46138   case $BUILD_OBJCOPY in
46139   [\\/]* | ?:[\\/]*)
46140   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46141   ;;
46142   *)
46143   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46144 for as_dir in $PATH
46145 do
46146   IFS=$as_save_IFS
46147   test -z "$as_dir" && as_dir=.
46148     for ac_exec_ext in '' $ac_executable_extensions; do
46149   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46150     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46151     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46152     break 2
46153   fi
46154 done
46155   done
46156 IFS=$as_save_IFS
46157 
46158   ;;
46159 esac
46160 fi
46161 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46162 if test -n "$BUILD_OBJCOPY"; then
46163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46164 $as_echo "$BUILD_OBJCOPY" >&6; }
46165 else
46166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46167 $as_echo "no" >&6; }
46168 fi
46169 
46170 
46171           if test "x$BUILD_OBJCOPY" = x; then
46172             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46173           fi
46174         else
46175           # Otherwise we believe it is a complete path. Use it as it is.
46176           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46177 $as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46178           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46179 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46180           if test ! -x "$tool_specified"; then
46181             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46182 $as_echo "not found" >&6; }
46183             as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46184           fi
46185           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46186 $as_echo "$tool_specified" >&6; }
46187         fi
46188       fi
46189     fi
46190 
46191   fi
46192 
46193 
46194 
46195   # Only process if variable expands to non-empty
46196 
46197   if test "x$BUILD_OBJCOPY" != x; then
46198     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46199 
46200   # First separate the path from the arguments. This will split at the first
46201   # space.
46202   complete="$BUILD_OBJCOPY"
46203   path="${complete%% *}"
46204   tmp="$complete EOL"
46205   arguments="${tmp#* }"
46206 
46207   # Input might be given as Windows format, start by converting to
46208   # unix format.
46209   new_path=`$CYGPATH -u "$path"`
46210 
46211   # Now try to locate executable using which
46212   new_path=`$WHICH "$new_path" 2> /dev/null`
46213   # bat and cmd files are not always considered executable in cygwin causing which
46214   # to not find them
46215   if test "x$new_path" = x \
46216       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46217       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46218     new_path=`$CYGPATH -u "$path"`
46219   fi
46220   if test "x$new_path" = x; then
46221     # Oops. Which didn't find the executable.
46222     # The splitting of arguments from the executable at a space might have been incorrect,
46223     # since paths with space are more likely in Windows. Give it another try with the whole
46224     # argument.
46225     path="$complete"
46226     arguments="EOL"
46227     new_path=`$CYGPATH -u "$path"`
46228     new_path=`$WHICH "$new_path" 2> /dev/null`
46229     # bat and cmd files are not always considered executable in cygwin causing which
46230     # to not find them
46231     if test "x$new_path" = x \
46232         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46233         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46234       new_path=`$CYGPATH -u "$path"`
46235     fi
46236     if test "x$new_path" = x; then
46237       # It's still not found. Now this is an unrecoverable error.
46238       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46239 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46240       has_space=`$ECHO "$complete" | $GREP " "`
46241       if test "x$has_space" != x; then
46242         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46243 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46244       fi
46245       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46246     fi
46247   fi
46248 
46249   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46250   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46251   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46252   # "foo.exe" is OK but "foo" is an error.
46253   #
46254   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46255   # It is also a way to make sure we got the proper file name for the real test later on.
46256   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46257   if test "x$test_shortpath" = x; then
46258     # Short path failed, file does not exist as specified.
46259     # Try adding .exe or .cmd
46260     if test -f "${new_path}.exe"; then
46261       input_to_shortpath="${new_path}.exe"
46262     elif test -f "${new_path}.cmd"; then
46263       input_to_shortpath="${new_path}.cmd"
46264     else
46265       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46266 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46267       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46268 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46269       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46270     fi
46271   else
46272     input_to_shortpath="$new_path"
46273   fi
46274 
46275   # Call helper function which possibly converts this using DOS-style short mode.
46276   # If so, the updated path is stored in $new_path.
46277   new_path="$input_to_shortpath"
46278 
46279   input_path="$input_to_shortpath"
46280   # Check if we need to convert this using DOS-style short mode. If the path
46281   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46282   # take no chances and rewrite it.
46283   # Note: m4 eats our [], so we need to use [ and ] instead.
46284   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46285   if test "x$has_forbidden_chars" != x; then
46286     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46287     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46288     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46289     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46290       # Going to short mode and back again did indeed matter. Since short mode is
46291       # case insensitive, let's make it lowercase to improve readability.
46292       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46293       # Now convert it back to Unix-style (cygpath)
46294       input_path=`$CYGPATH -u "$shortmode_path"`
46295       new_path="$input_path"
46296     fi
46297   fi
46298 
46299   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46300   if test "x$test_cygdrive_prefix" = x; then
46301     # As a simple fix, exclude /usr/bin since it's not a real path.
46302     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46303       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46304       # a path prefixed by /cygdrive for fixpath to work.
46305       new_path="$CYGWIN_ROOT_PATH$input_path"
46306     fi
46307   fi
46308 
46309   # remove trailing .exe if any
46310   new_path="${new_path/%.exe/}"
46311 
46312     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46313 
46314   # First separate the path from the arguments. This will split at the first
46315   # space.
46316   complete="$BUILD_OBJCOPY"
46317   path="${complete%% *}"
46318   tmp="$complete EOL"
46319   arguments="${tmp#* }"
46320 
46321   # Input might be given as Windows format, start by converting to
46322   # unix format.
46323   new_path="$path"
46324 
46325   windows_path="$new_path"
46326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46327     unix_path=`$CYGPATH -u "$windows_path"`
46328     new_path="$unix_path"
46329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46330     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46331     new_path="$unix_path"
46332   fi
46333 
46334 
46335   # Now try to locate executable using which
46336   new_path=`$WHICH "$new_path" 2> /dev/null`
46337 
46338   if test "x$new_path" = x; then
46339     # Oops. Which didn't find the executable.
46340     # The splitting of arguments from the executable at a space might have been incorrect,
46341     # since paths with space are more likely in Windows. Give it another try with the whole
46342     # argument.
46343     path="$complete"
46344     arguments="EOL"
46345     new_path="$path"
46346 
46347   windows_path="$new_path"
46348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46349     unix_path=`$CYGPATH -u "$windows_path"`
46350     new_path="$unix_path"
46351   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46352     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46353     new_path="$unix_path"
46354   fi
46355 
46356 
46357     new_path=`$WHICH "$new_path" 2> /dev/null`
46358     # bat and cmd files are not always considered executable in MSYS causing which
46359     # to not find them
46360     if test "x$new_path" = x \
46361         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46362         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46363       new_path="$path"
46364 
46365   windows_path="$new_path"
46366   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46367     unix_path=`$CYGPATH -u "$windows_path"`
46368     new_path="$unix_path"
46369   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46370     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46371     new_path="$unix_path"
46372   fi
46373 
46374     fi
46375 
46376     if test "x$new_path" = x; then
46377       # It's still not found. Now this is an unrecoverable error.
46378       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46379 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46380       has_space=`$ECHO "$complete" | $GREP " "`
46381       if test "x$has_space" != x; then
46382         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46383 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46384       fi
46385       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46386     fi
46387   fi
46388 
46389   # Now new_path has a complete unix path to the binary
46390   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46391     # Keep paths in /bin as-is, but remove trailing .exe if any
46392     new_path="${new_path/%.exe/}"
46393     # Do not save /bin paths to all_fixpath_prefixes!
46394   else
46395     # Not in mixed or Windows style, start by that.
46396     new_path=`cmd //c echo $new_path`
46397 
46398   input_path="$new_path"
46399   # Check if we need to convert this using DOS-style short mode. If the path
46400   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46401   # take no chances and rewrite it.
46402   # Note: m4 eats our [], so we need to use [ and ] instead.
46403   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46404   if test "x$has_forbidden_chars" != x; then
46405     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46406     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46407   fi
46408 
46409     # Output is in $new_path
46410 
46411   windows_path="$new_path"
46412   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46413     unix_path=`$CYGPATH -u "$windows_path"`
46414     new_path="$unix_path"
46415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46416     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46417     new_path="$unix_path"
46418   fi
46419 
46420     # remove trailing .exe if any
46421     new_path="${new_path/%.exe/}"
46422 
46423     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46424     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46425   fi
46426 
46427     else
46428       # We're on a unix platform. Hooray! :)
46429       # First separate the path from the arguments. This will split at the first
46430       # space.
46431       complete="$BUILD_OBJCOPY"
46432       path="${complete%% *}"
46433       tmp="$complete EOL"
46434       arguments="${tmp#* }"
46435 
46436       # Cannot rely on the command "which" here since it doesn't always work.
46437       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46438       if test -z "$is_absolute_path"; then
46439         # Path to executable is not absolute. Find it.
46440         IFS_save="$IFS"
46441         IFS=:
46442         for p in $PATH; do
46443           if test -f "$p/$path" && test -x "$p/$path"; then
46444             new_path="$p/$path"
46445             break
46446           fi
46447         done
46448         IFS="$IFS_save"
46449       else
46450         # This is an absolute path, we can use it without further modifications.
46451         new_path="$path"
46452       fi
46453 
46454       if test "x$new_path" = x; then
46455         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46456 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46457         has_space=`$ECHO "$complete" | $GREP " "`
46458         if test "x$has_space" != x; then
46459           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46460 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46461         fi
46462         as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46463       fi
46464     fi
46465 
46466     # Now join together the path and the arguments once again
46467     if test "x$arguments" != xEOL; then
46468       new_complete="$new_path ${arguments% *}"
46469     else
46470       new_complete="$new_path"
46471     fi
46472 
46473     if test "x$complete" != "x$new_complete"; then
46474       BUILD_OBJCOPY="$new_complete"
46475       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46476 $as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46477     fi
46478   fi
46479 
46480 
46481 
46482   # Publish this variable in the help.
46483 
46484 
46485   if [ -z "${BUILD_STRIP+x}" ]; then
46486     # The variable is not set by user, try to locate tool using the code snippet
46487     for ac_prog in strip
46488 do
46489   # Extract the first word of "$ac_prog", so it can be a program name with args.
46490 set dummy $ac_prog; ac_word=$2
46491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46492 $as_echo_n "checking for $ac_word... " >&6; }
46493 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46494   $as_echo_n "(cached) " >&6
46495 else
46496   case $BUILD_STRIP in
46497   [\\/]* | ?:[\\/]*)
46498   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46499   ;;
46500   *)
46501   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46502 for as_dir in $PATH
46503 do
46504   IFS=$as_save_IFS
46505   test -z "$as_dir" && as_dir=.
46506     for ac_exec_ext in '' $ac_executable_extensions; do
46507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46508     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46510     break 2
46511   fi
46512 done
46513   done
46514 IFS=$as_save_IFS
46515 
46516   ;;
46517 esac
46518 fi
46519 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46520 if test -n "$BUILD_STRIP"; then
46521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46522 $as_echo "$BUILD_STRIP" >&6; }
46523 else
46524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46525 $as_echo "no" >&6; }
46526 fi
46527 
46528 
46529   test -n "$BUILD_STRIP" && break
46530 done
46531 
46532   else
46533     # The variable is set, but is it from the command line or the environment?
46534 
46535     # Try to remove the string !BUILD_STRIP! from our list.
46536     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46537     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46538       # If it failed, the variable was not from the command line. Ignore it,
46539       # but warn the user (except for BASH, which is always set by the calling BASH).
46540       if test "xBUILD_STRIP" != xBASH; then
46541         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46542 $as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46543       fi
46544       # Try to locate tool using the code snippet
46545       for ac_prog in strip
46546 do
46547   # Extract the first word of "$ac_prog", so it can be a program name with args.
46548 set dummy $ac_prog; ac_word=$2
46549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46550 $as_echo_n "checking for $ac_word... " >&6; }
46551 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46552   $as_echo_n "(cached) " >&6
46553 else
46554   case $BUILD_STRIP in
46555   [\\/]* | ?:[\\/]*)
46556   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46557   ;;
46558   *)
46559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46560 for as_dir in $PATH
46561 do
46562   IFS=$as_save_IFS
46563   test -z "$as_dir" && as_dir=.
46564     for ac_exec_ext in '' $ac_executable_extensions; do
46565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46566     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46568     break 2
46569   fi
46570 done
46571   done
46572 IFS=$as_save_IFS
46573 
46574   ;;
46575 esac
46576 fi
46577 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46578 if test -n "$BUILD_STRIP"; then
46579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46580 $as_echo "$BUILD_STRIP" >&6; }
46581 else
46582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46583 $as_echo "no" >&6; }
46584 fi
46585 
46586 
46587   test -n "$BUILD_STRIP" && break
46588 done
46589 
46590     else
46591       # If it succeeded, then it was overridden by the user. We will use it
46592       # for the tool.
46593 
46594       # First remove it from the list of overridden variables, so we can test
46595       # for unknown variables in the end.
46596       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46597 
46598       # Check if we try to supply an empty value
46599       if test "x$BUILD_STRIP" = x; then
46600         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46601 $as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46602         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46603 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46604         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46605 $as_echo "disabled" >&6; }
46606       else
46607         # Check if the provided tool contains a complete path.
46608         tool_specified="$BUILD_STRIP"
46609         tool_basename="${tool_specified##*/}"
46610         if test "x$tool_basename" = "x$tool_specified"; then
46611           # A command without a complete path is provided, search $PATH.
46612           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46613 $as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46614           # Extract the first word of "$tool_basename", so it can be a program name with args.
46615 set dummy $tool_basename; ac_word=$2
46616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46617 $as_echo_n "checking for $ac_word... " >&6; }
46618 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46619   $as_echo_n "(cached) " >&6
46620 else
46621   case $BUILD_STRIP in
46622   [\\/]* | ?:[\\/]*)
46623   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46624   ;;
46625   *)
46626   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46627 for as_dir in $PATH
46628 do
46629   IFS=$as_save_IFS
46630   test -z "$as_dir" && as_dir=.
46631     for ac_exec_ext in '' $ac_executable_extensions; do
46632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46633     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46635     break 2
46636   fi
46637 done
46638   done
46639 IFS=$as_save_IFS
46640 
46641   ;;
46642 esac
46643 fi
46644 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46645 if test -n "$BUILD_STRIP"; then
46646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46647 $as_echo "$BUILD_STRIP" >&6; }
46648 else
46649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46650 $as_echo "no" >&6; }
46651 fi
46652 
46653 
46654           if test "x$BUILD_STRIP" = x; then
46655             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46656           fi
46657         else
46658           # Otherwise we believe it is a complete path. Use it as it is.
46659           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46660 $as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46661           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46662 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46663           if test ! -x "$tool_specified"; then
46664             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46665 $as_echo "not found" >&6; }
46666             as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46667           fi
46668           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46669 $as_echo "$tool_specified" >&6; }
46670         fi
46671       fi
46672     fi
46673 
46674   fi
46675 
46676 
46677 
46678   # Only process if variable expands to non-empty
46679 
46680   if test "x$BUILD_STRIP" != x; then
46681     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46682 
46683   # First separate the path from the arguments. This will split at the first
46684   # space.
46685   complete="$BUILD_STRIP"
46686   path="${complete%% *}"
46687   tmp="$complete EOL"
46688   arguments="${tmp#* }"
46689 
46690   # Input might be given as Windows format, start by converting to
46691   # unix format.
46692   new_path=`$CYGPATH -u "$path"`
46693 
46694   # Now try to locate executable using which
46695   new_path=`$WHICH "$new_path" 2> /dev/null`
46696   # bat and cmd files are not always considered executable in cygwin causing which
46697   # to not find them
46698   if test "x$new_path" = x \
46699       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46700       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46701     new_path=`$CYGPATH -u "$path"`
46702   fi
46703   if test "x$new_path" = x; then
46704     # Oops. Which didn't find the executable.
46705     # The splitting of arguments from the executable at a space might have been incorrect,
46706     # since paths with space are more likely in Windows. Give it another try with the whole
46707     # argument.
46708     path="$complete"
46709     arguments="EOL"
46710     new_path=`$CYGPATH -u "$path"`
46711     new_path=`$WHICH "$new_path" 2> /dev/null`
46712     # bat and cmd files are not always considered executable in cygwin causing which
46713     # to not find them
46714     if test "x$new_path" = x \
46715         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46716         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46717       new_path=`$CYGPATH -u "$path"`
46718     fi
46719     if test "x$new_path" = x; then
46720       # It's still not found. Now this is an unrecoverable error.
46721       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46722 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46723       has_space=`$ECHO "$complete" | $GREP " "`
46724       if test "x$has_space" != x; then
46725         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46726 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46727       fi
46728       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46729     fi
46730   fi
46731 
46732   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46733   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46734   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46735   # "foo.exe" is OK but "foo" is an error.
46736   #
46737   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46738   # It is also a way to make sure we got the proper file name for the real test later on.
46739   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46740   if test "x$test_shortpath" = x; then
46741     # Short path failed, file does not exist as specified.
46742     # Try adding .exe or .cmd
46743     if test -f "${new_path}.exe"; then
46744       input_to_shortpath="${new_path}.exe"
46745     elif test -f "${new_path}.cmd"; then
46746       input_to_shortpath="${new_path}.cmd"
46747     else
46748       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46749 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46750       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46751 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46752       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46753     fi
46754   else
46755     input_to_shortpath="$new_path"
46756   fi
46757 
46758   # Call helper function which possibly converts this using DOS-style short mode.
46759   # If so, the updated path is stored in $new_path.
46760   new_path="$input_to_shortpath"
46761 
46762   input_path="$input_to_shortpath"
46763   # Check if we need to convert this using DOS-style short mode. If the path
46764   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46765   # take no chances and rewrite it.
46766   # Note: m4 eats our [], so we need to use [ and ] instead.
46767   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46768   if test "x$has_forbidden_chars" != x; then
46769     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46770     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46771     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46772     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46773       # Going to short mode and back again did indeed matter. Since short mode is
46774       # case insensitive, let's make it lowercase to improve readability.
46775       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46776       # Now convert it back to Unix-style (cygpath)
46777       input_path=`$CYGPATH -u "$shortmode_path"`
46778       new_path="$input_path"
46779     fi
46780   fi
46781 
46782   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46783   if test "x$test_cygdrive_prefix" = x; then
46784     # As a simple fix, exclude /usr/bin since it's not a real path.
46785     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46786       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46787       # a path prefixed by /cygdrive for fixpath to work.
46788       new_path="$CYGWIN_ROOT_PATH$input_path"
46789     fi
46790   fi
46791 
46792   # remove trailing .exe if any
46793   new_path="${new_path/%.exe/}"
46794 
46795     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46796 
46797   # First separate the path from the arguments. This will split at the first
46798   # space.
46799   complete="$BUILD_STRIP"
46800   path="${complete%% *}"
46801   tmp="$complete EOL"
46802   arguments="${tmp#* }"
46803 
46804   # Input might be given as Windows format, start by converting to
46805   # unix format.
46806   new_path="$path"
46807 
46808   windows_path="$new_path"
46809   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46810     unix_path=`$CYGPATH -u "$windows_path"`
46811     new_path="$unix_path"
46812   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46813     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46814     new_path="$unix_path"
46815   fi
46816 
46817 
46818   # Now try to locate executable using which
46819   new_path=`$WHICH "$new_path" 2> /dev/null`
46820 
46821   if test "x$new_path" = x; then
46822     # Oops. Which didn't find the executable.
46823     # The splitting of arguments from the executable at a space might have been incorrect,
46824     # since paths with space are more likely in Windows. Give it another try with the whole
46825     # argument.
46826     path="$complete"
46827     arguments="EOL"
46828     new_path="$path"
46829 
46830   windows_path="$new_path"
46831   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46832     unix_path=`$CYGPATH -u "$windows_path"`
46833     new_path="$unix_path"
46834   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46835     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46836     new_path="$unix_path"
46837   fi
46838 
46839 
46840     new_path=`$WHICH "$new_path" 2> /dev/null`
46841     # bat and cmd files are not always considered executable in MSYS causing which
46842     # to not find them
46843     if test "x$new_path" = x \
46844         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46845         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46846       new_path="$path"
46847 
46848   windows_path="$new_path"
46849   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46850     unix_path=`$CYGPATH -u "$windows_path"`
46851     new_path="$unix_path"
46852   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46853     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46854     new_path="$unix_path"
46855   fi
46856 
46857     fi
46858 
46859     if test "x$new_path" = x; then
46860       # It's still not found. Now this is an unrecoverable error.
46861       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46862 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46863       has_space=`$ECHO "$complete" | $GREP " "`
46864       if test "x$has_space" != x; then
46865         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46866 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46867       fi
46868       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46869     fi
46870   fi
46871 
46872   # Now new_path has a complete unix path to the binary
46873   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46874     # Keep paths in /bin as-is, but remove trailing .exe if any
46875     new_path="${new_path/%.exe/}"
46876     # Do not save /bin paths to all_fixpath_prefixes!
46877   else
46878     # Not in mixed or Windows style, start by that.
46879     new_path=`cmd //c echo $new_path`
46880 
46881   input_path="$new_path"
46882   # Check if we need to convert this using DOS-style short mode. If the path
46883   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46884   # take no chances and rewrite it.
46885   # Note: m4 eats our [], so we need to use [ and ] instead.
46886   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46887   if test "x$has_forbidden_chars" != x; then
46888     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46889     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46890   fi
46891 
46892     # Output is in $new_path
46893 
46894   windows_path="$new_path"
46895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46896     unix_path=`$CYGPATH -u "$windows_path"`
46897     new_path="$unix_path"
46898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46899     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46900     new_path="$unix_path"
46901   fi
46902 
46903     # remove trailing .exe if any
46904     new_path="${new_path/%.exe/}"
46905 
46906     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46907     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46908   fi
46909 
46910     else
46911       # We're on a unix platform. Hooray! :)
46912       # First separate the path from the arguments. This will split at the first
46913       # space.
46914       complete="$BUILD_STRIP"
46915       path="${complete%% *}"
46916       tmp="$complete EOL"
46917       arguments="${tmp#* }"
46918 
46919       # Cannot rely on the command "which" here since it doesn't always work.
46920       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46921       if test -z "$is_absolute_path"; then
46922         # Path to executable is not absolute. Find it.
46923         IFS_save="$IFS"
46924         IFS=:
46925         for p in $PATH; do
46926           if test -f "$p/$path" && test -x "$p/$path"; then
46927             new_path="$p/$path"
46928             break
46929           fi
46930         done
46931         IFS="$IFS_save"
46932       else
46933         # This is an absolute path, we can use it without further modifications.
46934         new_path="$path"
46935       fi
46936 
46937       if test "x$new_path" = x; then
46938         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46939 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46940         has_space=`$ECHO "$complete" | $GREP " "`
46941         if test "x$has_space" != x; then
46942           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46943 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46944         fi
46945         as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46946       fi
46947     fi
46948 
46949     # Now join together the path and the arguments once again
46950     if test "x$arguments" != xEOL; then
46951       new_complete="$new_path ${arguments% *}"
46952     else
46953       new_complete="$new_path"
46954     fi
46955 
46956     if test "x$complete" != "x$new_complete"; then
46957       BUILD_STRIP="$new_complete"
46958       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46959 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46960     fi
46961   fi
46962 
46963     # Assume the C compiler is the assembler
46964     BUILD_AS="$BUILD_CC -c"
46965     # Just like for the target compiler, use the compiler as linker
46966     BUILD_LD="$BUILD_CC"
46967     BUILD_LDCXX="$BUILD_CXX"
46968 
46969     PATH="$OLDPATH"
46970 
46971 
46972   COMPILER=$BUILD_CC
46973   COMPILER_NAME=BuildC
46974 
46975   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46976     # cc -V output typically looks like
46977     #     cc: Sun C 5.12 Linux_i386 2011/11/16
46978     # or
46979     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
46980     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46981     # Check that this is likely to be the Solaris Studio cc.
46982     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
46983     if test $? -ne 0; then
46984       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46985       { $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
46986 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46987       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46988 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46989       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46990 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46991       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46992     fi
46993     # Remove usage instructions (if present), and
46994     # collapse compiler output into a single line
46995     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46996         $SED -e 's/ *[Uu]sage:.*//'`
46997     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46998         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46999   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47000     # xlc -qversion output typically looks like
47001     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47002     #     Version: 11.01.0000.0015
47003     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47004     # Check that this is likely to be the IBM XL C compiler.
47005     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47006     if test $? -ne 0; then
47007       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47008       { $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
47009 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47010       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47011 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47012       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47013 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47014       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47015     fi
47016     # Collapse compiler output into a single line
47017     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47018     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47019         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47020   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47021     # There is no specific version flag, but all output starts with a version string.
47022     # First line typically looks something like:
47023     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47024     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47025     # Check that this is likely to be Microsoft CL.EXE.
47026     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47027     if test $? -ne 0; then
47028       { $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
47029 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47030       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47031 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47032       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47033     fi
47034     # Collapse compiler output into a single line
47035     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47036     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47037         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47038   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47039     # gcc --version output typically looks like
47040     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47041     #     Copyright (C) 2013 Free Software Foundation, Inc.
47042     #     This is free software; see the source for copying conditions.  There is NO
47043     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47044     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47045     # Check that this is likely to be GCC.
47046     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47047     if test $? -ne 0; then
47048       { $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
47049 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47050       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47051 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47052       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47053     fi
47054     # Remove Copyright and legalese from version string, and
47055     # collapse into a single line
47056     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47057         $SED -e 's/ *Copyright .*//'`
47058     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47059         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47060   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47061     # clang --version output typically looks like
47062     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47063     #    clang version 3.3 (tags/RELEASE_33/final)
47064     # or
47065     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47066     #    Target: x86_64-pc-linux-gnu
47067     #    Thread model: posix
47068     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47069     # Check that this is likely to be clang
47070     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47071     if test $? -ne 0; then
47072       { $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
47073 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47074       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47075 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47076       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47077     fi
47078     # Collapse compiler output into a single line
47079     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47080     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47081         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47082   else
47083       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47084   fi
47085   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47086   BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47087   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47088   BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47089 
47090   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47091 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47092 
47093 
47094   COMPILER=$BUILD_CXX
47095   COMPILER_NAME=BuildC++
47096 
47097   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47098     # cc -V output typically looks like
47099     #     cc: Sun C 5.12 Linux_i386 2011/11/16
47100     # or
47101     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47102     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47103     # Check that this is likely to be the Solaris Studio cc.
47104     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47105     if test $? -ne 0; then
47106       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47107       { $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
47108 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47109       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47110 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47111       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47112 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47113       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47114     fi
47115     # Remove usage instructions (if present), and
47116     # collapse compiler output into a single line
47117     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47118         $SED -e 's/ *[Uu]sage:.*//'`
47119     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47120         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47121   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47122     # xlc -qversion output typically looks like
47123     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47124     #     Version: 11.01.0000.0015
47125     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47126     # Check that this is likely to be the IBM XL C compiler.
47127     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47128     if test $? -ne 0; then
47129       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47130       { $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
47131 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47132       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47133 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47134       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47135 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47136       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47137     fi
47138     # Collapse compiler output into a single line
47139     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47140     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47141         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47142   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47143     # There is no specific version flag, but all output starts with a version string.
47144     # First line typically looks something like:
47145     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47146     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47147     # Check that this is likely to be Microsoft CL.EXE.
47148     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47149     if test $? -ne 0; then
47150       { $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
47151 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47152       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47153 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47154       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47155     fi
47156     # Collapse compiler output into a single line
47157     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47158     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47159         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47160   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47161     # gcc --version output typically looks like
47162     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47163     #     Copyright (C) 2013 Free Software Foundation, Inc.
47164     #     This is free software; see the source for copying conditions.  There is NO
47165     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47166     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47167     # Check that this is likely to be GCC.
47168     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47169     if test $? -ne 0; then
47170       { $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
47171 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47172       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47173 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47174       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47175     fi
47176     # Remove Copyright and legalese from version string, and
47177     # collapse into a single line
47178     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47179         $SED -e 's/ *Copyright .*//'`
47180     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47181         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47182   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47183     # clang --version output typically looks like
47184     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47185     #    clang version 3.3 (tags/RELEASE_33/final)
47186     # or
47187     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47188     #    Target: x86_64-pc-linux-gnu
47189     #    Thread model: posix
47190     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47191     # Check that this is likely to be clang
47192     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47193     if test $? -ne 0; then
47194       { $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
47195 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47196       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47197 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47198       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47199     fi
47200     # Collapse compiler output into a single line
47201     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47202     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47203         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47204   else
47205       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47206   fi
47207   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47208   BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47209   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47210   BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47211 
47212   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47213 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47214 
47215 
47216   if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47217     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
47218 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47219     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47220 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47221   fi
47222 
47223   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47224   if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47225     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47226 $as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47227   fi
47228 
47229   if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47230     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47231 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47232   fi
47233 
47234   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47235 
47236   else
47237     # If we are not cross compiling, use the normal target compilers for
47238     # building the build platform executables.
47239     BUILD_CC="$CC"
47240     BUILD_CXX="$CXX"
47241     BUILD_LD="$LD"
47242     BUILD_LDCXX="$LDCXX"
47243     BUILD_NM="$NM"
47244     BUILD_AS="$AS"
47245     BUILD_OBJCOPY="$OBJCOPY"
47246     BUILD_STRIP="$STRIP"
47247     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47248     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47249     BUILD_AR="$AR"
47250 
47251 
47252   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47253     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47254 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47255     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47256 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47257   fi
47258 
47259   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47260   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47261     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47262 $as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47263   fi
47264 
47265   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47266     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47267 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47268   fi
47269 
47270   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47271 
47272   fi
47273 
47274 
47275 
47276 
47277 
47278 
47279 
47280 
47281 
47282 
47283 
47284 
47285 
47286 
47287   # The package path is used only on macosx?
47288   # FIXME: clean this up, and/or move it elsewhere.
47289   PACKAGE_PATH=/opt/local
47290 
47291 
47292   # Check for extra potential brokenness.
47293   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47294     # On Windows, double-check that we got the right compiler.
47295     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47296     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47297     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47298       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47299         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
47300       fi
47301     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47302       if test "x$COMPILER_CPU_TEST" != "xx64"; then
47303         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47304       fi
47305     fi
47306   fi
47307 
47308   if test "x$TOOLCHAIN_TYPE" = xgcc; then
47309     # If this is a --hash-style=gnu system, use --hash-style=both, why?
47310     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47311     # This is later checked when setting flags.
47312 
47313     # "-Og" suppported for GCC 4.8 and later
47314     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47315 
47316 
47317 
47318 
47319 
47320 
47321 
47322 
47323 
47324 
47325 
47326 
47327 
47328 
47329 
47330 
47331 
47332 
47333 
47334 
47335 
47336 
47337 
47338 
47339 
47340 
47341 
47342 
47343 
47344 
47345 
47346 
47347 
47348 
47349 
47350 
47351 
47352 
47353 
47354 
47355 
47356 
47357 
47358 
47359 
47360 
47361 
47362     # Execute function body
47363 
47364 
47365 
47366 
47367 
47368 
47369 
47370 
47371 
47372 
47373 
47374 
47375 
47376 
47377 
47378 
47379 
47380 
47381 
47382 
47383 
47384 
47385 
47386 
47387 
47388 
47389 
47390 
47391 
47392 
47393 
47394 
47395 
47396 
47397 
47398 
47399 
47400 
47401 
47402 
47403 
47404 
47405 
47406 
47407 
47408 
47409 
47410 
47411     # Execute function body
47412 
47413   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47414 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47415   supports=yes
47416 
47417   saved_cflags="$CFLAGS"
47418   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47419   ac_ext=c
47420 ac_cpp='$CPP $CPPFLAGS'
47421 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47422 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47423 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47424 
47425   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47426 /* end confdefs.h.  */
47427 int i;
47428 _ACEOF
47429 if ac_fn_c_try_compile "$LINENO"; then :
47430 
47431 else
47432   supports=no
47433 fi
47434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47435   ac_ext=cpp
47436 ac_cpp='$CXXCPP $CPPFLAGS'
47437 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47438 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47439 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47440 
47441   CFLAGS="$saved_cflags"
47442 
47443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47444 $as_echo "$supports" >&6; }
47445   if test "x$supports" = "xyes" ; then
47446     :
47447     C_COMP_SUPPORTS="yes"
47448   else
47449     :
47450     C_COMP_SUPPORTS="no"
47451   fi
47452 
47453 
47454 
47455 
47456 
47457 
47458 
47459 
47460 
47461 
47462 
47463 
47464 
47465 
47466 
47467 
47468 
47469 
47470 
47471 
47472 
47473 
47474 
47475 
47476 
47477 
47478 
47479 
47480 
47481 
47482 
47483 
47484 
47485 
47486 
47487 
47488 
47489 
47490 
47491 
47492 
47493 
47494 
47495 
47496 
47497 
47498 
47499 
47500 
47501 
47502 
47503 
47504 
47505 
47506 
47507 
47508 
47509 
47510 
47511     # Execute function body
47512 
47513   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47514 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47515   supports=yes
47516 
47517   saved_cxxflags="$CXXFLAGS"
47518   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47519   ac_ext=cpp
47520 ac_cpp='$CXXCPP $CPPFLAGS'
47521 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47522 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47523 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47524 
47525   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47526 /* end confdefs.h.  */
47527 int i;
47528 _ACEOF
47529 if ac_fn_cxx_try_compile "$LINENO"; then :
47530 
47531 else
47532   supports=no
47533 fi
47534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47535   ac_ext=cpp
47536 ac_cpp='$CXXCPP $CPPFLAGS'
47537 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47538 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47539 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47540 
47541   CXXFLAGS="$saved_cxxflags"
47542 
47543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47544 $as_echo "$supports" >&6; }
47545   if test "x$supports" = "xyes" ; then
47546     :
47547     CXX_COMP_SUPPORTS="yes"
47548   else
47549     :
47550     CXX_COMP_SUPPORTS="no"
47551   fi
47552 
47553 
47554 
47555 
47556 
47557 
47558 
47559 
47560 
47561 
47562 
47563 
47564 
47565   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47566 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47567   supports=no
47568   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47569 
47570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47571 $as_echo "$supports" >&6; }
47572   if test "x$supports" = "xyes" ; then
47573     :
47574     HAS_CFLAG_OPTIMIZE_DEBUG=true
47575   else
47576     :
47577     HAS_CFLAG_OPTIMIZE_DEBUG=false
47578   fi
47579 
47580 
47581 
47582 
47583 
47584 
47585 
47586     # "-z relro" supported in GNU binutils 2.17 and later
47587     LINKER_RELRO_FLAG="-Wl,-z,relro"
47588 
47589 
47590 
47591 
47592 
47593 
47594 
47595 
47596 
47597 
47598 
47599 
47600 
47601 
47602 
47603 
47604 
47605 
47606 
47607 
47608 
47609 
47610 
47611 
47612 
47613 
47614 
47615 
47616 
47617 
47618 
47619 
47620 
47621 
47622 
47623 
47624 
47625 
47626 
47627 
47628 
47629 
47630 
47631 
47632 
47633 
47634 
47635     # Execute function body
47636 
47637   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47638 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47639   supports=yes
47640 
47641   saved_ldflags="$LDFLAGS"
47642   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47643   ac_ext=c
47644 ac_cpp='$CPP $CPPFLAGS'
47645 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47646 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47647 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47648 
47649   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47650 /* end confdefs.h.  */
47651 
47652 int
47653 main ()
47654 {
47655 
47656   ;
47657   return 0;
47658 }
47659 _ACEOF
47660 if ac_fn_c_try_link "$LINENO"; then :
47661 
47662 else
47663   supports=no
47664 fi
47665 rm -f core conftest.err conftest.$ac_objext \
47666     conftest$ac_exeext conftest.$ac_ext
47667   ac_ext=cpp
47668 ac_cpp='$CXXCPP $CPPFLAGS'
47669 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47670 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47671 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47672 
47673   LDFLAGS="$saved_ldflags"
47674 
47675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47676 $as_echo "$supports" >&6; }
47677   if test "x$supports" = "xyes" ; then
47678     :
47679     HAS_LINKER_RELRO=true
47680   else
47681     :
47682     HAS_LINKER_RELRO=false
47683   fi
47684 
47685 
47686 
47687 
47688 
47689 
47690 
47691 
47692 
47693 
47694 
47695 
47696 
47697     # "-z now" supported in GNU binutils 2.11 and later
47698     LINKER_NOW_FLAG="-Wl,-z,now"
47699 
47700 
47701 
47702 
47703 
47704 
47705 
47706 
47707 
47708 
47709 
47710 
47711 
47712 
47713 
47714 
47715 
47716 
47717 
47718 
47719 
47720 
47721 
47722 
47723 
47724 
47725 
47726 
47727 
47728 
47729 
47730 
47731 
47732 
47733 
47734 
47735 
47736 
47737 
47738 
47739 
47740 
47741 
47742 
47743 
47744 
47745 
47746     # Execute function body
47747 
47748   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47749 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47750   supports=yes
47751 
47752   saved_ldflags="$LDFLAGS"
47753   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47754   ac_ext=c
47755 ac_cpp='$CPP $CPPFLAGS'
47756 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47757 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47758 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47759 
47760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47761 /* end confdefs.h.  */
47762 
47763 int
47764 main ()
47765 {
47766 
47767   ;
47768   return 0;
47769 }
47770 _ACEOF
47771 if ac_fn_c_try_link "$LINENO"; then :
47772 
47773 else
47774   supports=no
47775 fi
47776 rm -f core conftest.err conftest.$ac_objext \
47777     conftest$ac_exeext conftest.$ac_ext
47778   ac_ext=cpp
47779 ac_cpp='$CXXCPP $CPPFLAGS'
47780 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47781 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47782 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47783 
47784   LDFLAGS="$saved_ldflags"
47785 
47786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47787 $as_echo "$supports" >&6; }
47788   if test "x$supports" = "xyes" ; then
47789     :
47790     HAS_LINKER_NOW=true
47791   else
47792     :
47793     HAS_LINKER_NOW=false
47794   fi
47795 
47796 
47797 
47798 
47799 
47800 
47801 
47802 
47803 
47804 
47805 
47806 
47807   fi
47808 
47809   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47810   # in executable.'
47811   USING_BROKEN_SUSE_LD=no
47812   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47813     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47814 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47815     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47816     $ECHO "int main() { }" > main.c
47817     if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47818       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47819 $as_echo "no" >&6; }
47820       USING_BROKEN_SUSE_LD=no
47821     else
47822       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47823 $as_echo "yes" >&6; }
47824       USING_BROKEN_SUSE_LD=yes
47825     fi
47826     $RM version-script.map main.c a.out
47827   fi
47828 
47829 
47830   # Setup hotspot lecagy names for toolchains
47831   HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47832   if test "x$TOOLCHAIN_TYPE" = xclang; then
47833     HOTSPOT_TOOLCHAIN_TYPE=gcc
47834   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47835     HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47836   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47837     HOTSPOT_TOOLCHAIN_TYPE=visCPP
47838   fi
47839 
47840 
47841 
47842 # Setup the JTReg Regression Test Harness.
47843 
47844 
47845 # Check whether --with-jtreg was given.
47846 if test "${with_jtreg+set}" = set; then :
47847   withval=$with_jtreg;
47848 else
47849   with_jtreg=no
47850 fi
47851 
47852 
47853   if test "x$with_jtreg" = xno; then
47854     # jtreg disabled
47855     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47856 $as_echo_n "checking for jtreg... " >&6; }
47857     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47858 $as_echo "no" >&6; }
47859   else
47860     if test "x$with_jtreg" != xyes; then
47861       # with path specified.
47862       JT_HOME="$with_jtreg"
47863     fi
47864 
47865     if test "x$JT_HOME" != x; then
47866       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47867 $as_echo_n "checking for jtreg... " >&6; }
47868 
47869       # use JT_HOME enviroment var.
47870 
47871   # Only process if variable expands to non-empty
47872 
47873   if test "x$JT_HOME" != x; then
47874     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47875 
47876   # Input might be given as Windows format, start by converting to
47877   # unix format.
47878   path="$JT_HOME"
47879   new_path=`$CYGPATH -u "$path"`
47880 
47881   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47882   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47883   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47884   # "foo.exe" is OK but "foo" is an error.
47885   #
47886   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47887   # It is also a way to make sure we got the proper file name for the real test later on.
47888   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47889   if test "x$test_shortpath" = x; then
47890     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47891 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47892     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47893   fi
47894 
47895   # Call helper function which possibly converts this using DOS-style short mode.
47896   # If so, the updated path is stored in $new_path.
47897 
47898   input_path="$new_path"
47899   # Check if we need to convert this using DOS-style short mode. If the path
47900   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47901   # take no chances and rewrite it.
47902   # Note: m4 eats our [], so we need to use [ and ] instead.
47903   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47904   if test "x$has_forbidden_chars" != x; then
47905     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47906     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47907     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47908     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47909       # Going to short mode and back again did indeed matter. Since short mode is
47910       # case insensitive, let's make it lowercase to improve readability.
47911       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47912       # Now convert it back to Unix-style (cygpath)
47913       input_path=`$CYGPATH -u "$shortmode_path"`
47914       new_path="$input_path"
47915     fi
47916   fi
47917 
47918   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47919   if test "x$test_cygdrive_prefix" = x; then
47920     # As a simple fix, exclude /usr/bin since it's not a real path.
47921     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47922       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47923       # a path prefixed by /cygdrive for fixpath to work.
47924       new_path="$CYGWIN_ROOT_PATH$input_path"
47925     fi
47926   fi
47927 
47928 
47929   if test "x$path" != "x$new_path"; then
47930     JT_HOME="$new_path"
47931     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47932 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47933   fi
47934 
47935     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47936 
47937   path="$JT_HOME"
47938   has_colon=`$ECHO $path | $GREP ^.:`
47939   new_path="$path"
47940   if test "x$has_colon" = x; then
47941     # Not in mixed or Windows style, start by that.
47942     new_path=`cmd //c echo $path`
47943   fi
47944 
47945 
47946   input_path="$new_path"
47947   # Check if we need to convert this using DOS-style short mode. If the path
47948   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47949   # take no chances and rewrite it.
47950   # Note: m4 eats our [], so we need to use [ and ] instead.
47951   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47952   if test "x$has_forbidden_chars" != x; then
47953     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47954     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47955   fi
47956 
47957 
47958   windows_path="$new_path"
47959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47960     unix_path=`$CYGPATH -u "$windows_path"`
47961     new_path="$unix_path"
47962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47963     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47964     new_path="$unix_path"
47965   fi
47966 
47967   if test "x$path" != "x$new_path"; then
47968     JT_HOME="$new_path"
47969     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47970 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47971   fi
47972 
47973   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47974   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47975 
47976     else
47977       # We're on a unix platform. Hooray! :)
47978       path="$JT_HOME"
47979       has_space=`$ECHO "$path" | $GREP " "`
47980       if test "x$has_space" != x; then
47981         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47982 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47983         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47984       fi
47985 
47986       # Use eval to expand a potential ~
47987       eval path="$path"
47988       if test ! -f "$path" && test ! -d "$path"; then
47989         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47990       fi
47991 
47992       if test -d "$path"; then
47993         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47994       else
47995         dir="`$DIRNAME "$path"`"
47996         base="`$BASENAME "$path"`"
47997         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47998       fi
47999     fi
48000   fi
48001 
48002 
48003       # jtreg win32 script works for everybody
48004       JTREGEXE="$JT_HOME/bin/jtreg"
48005 
48006       if test ! -f "$JTREGEXE"; then
48007         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48008       fi
48009 
48010       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48011 $as_echo "$JTREGEXE" >&6; }
48012     else
48013       # try to find jtreg on path
48014 
48015 
48016 
48017   # Publish this variable in the help.
48018 
48019 
48020   if [ -z "${JTREGEXE+x}" ]; then
48021     # The variable is not set by user, try to locate tool using the code snippet
48022     for ac_prog in jtreg
48023 do
48024   # Extract the first word of "$ac_prog", so it can be a program name with args.
48025 set dummy $ac_prog; ac_word=$2
48026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48027 $as_echo_n "checking for $ac_word... " >&6; }
48028 if ${ac_cv_path_JTREGEXE+:} false; then :
48029   $as_echo_n "(cached) " >&6
48030 else
48031   case $JTREGEXE in
48032   [\\/]* | ?:[\\/]*)
48033   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48034   ;;
48035   *)
48036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48037 for as_dir in $PATH
48038 do
48039   IFS=$as_save_IFS
48040   test -z "$as_dir" && as_dir=.
48041     for ac_exec_ext in '' $ac_executable_extensions; do
48042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48043     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48045     break 2
48046   fi
48047 done
48048   done
48049 IFS=$as_save_IFS
48050 
48051   ;;
48052 esac
48053 fi
48054 JTREGEXE=$ac_cv_path_JTREGEXE
48055 if test -n "$JTREGEXE"; then
48056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48057 $as_echo "$JTREGEXE" >&6; }
48058 else
48059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48060 $as_echo "no" >&6; }
48061 fi
48062 
48063 
48064   test -n "$JTREGEXE" && break
48065 done
48066 
48067   else
48068     # The variable is set, but is it from the command line or the environment?
48069 
48070     # Try to remove the string !JTREGEXE! from our list.
48071     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48072     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48073       # If it failed, the variable was not from the command line. Ignore it,
48074       # but warn the user (except for BASH, which is always set by the calling BASH).
48075       if test "xJTREGEXE" != xBASH; then
48076         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48077 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48078       fi
48079       # Try to locate tool using the code snippet
48080       for ac_prog in jtreg
48081 do
48082   # Extract the first word of "$ac_prog", so it can be a program name with args.
48083 set dummy $ac_prog; ac_word=$2
48084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48085 $as_echo_n "checking for $ac_word... " >&6; }
48086 if ${ac_cv_path_JTREGEXE+:} false; then :
48087   $as_echo_n "(cached) " >&6
48088 else
48089   case $JTREGEXE in
48090   [\\/]* | ?:[\\/]*)
48091   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48092   ;;
48093   *)
48094   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48095 for as_dir in $PATH
48096 do
48097   IFS=$as_save_IFS
48098   test -z "$as_dir" && as_dir=.
48099     for ac_exec_ext in '' $ac_executable_extensions; do
48100   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48101     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48102     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48103     break 2
48104   fi
48105 done
48106   done
48107 IFS=$as_save_IFS
48108 
48109   ;;
48110 esac
48111 fi
48112 JTREGEXE=$ac_cv_path_JTREGEXE
48113 if test -n "$JTREGEXE"; then
48114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48115 $as_echo "$JTREGEXE" >&6; }
48116 else
48117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48118 $as_echo "no" >&6; }
48119 fi
48120 
48121 
48122   test -n "$JTREGEXE" && break
48123 done
48124 
48125     else
48126       # If it succeeded, then it was overridden by the user. We will use it
48127       # for the tool.
48128 
48129       # First remove it from the list of overridden variables, so we can test
48130       # for unknown variables in the end.
48131       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48132 
48133       # Check if we try to supply an empty value
48134       if test "x$JTREGEXE" = x; then
48135         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48136 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48137         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48138 $as_echo_n "checking for JTREGEXE... " >&6; }
48139         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48140 $as_echo "disabled" >&6; }
48141       else
48142         # Check if the provided tool contains a complete path.
48143         tool_specified="$JTREGEXE"
48144         tool_basename="${tool_specified##*/}"
48145         if test "x$tool_basename" = "x$tool_specified"; then
48146           # A command without a complete path is provided, search $PATH.
48147           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48148 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48149           # Extract the first word of "$tool_basename", so it can be a program name with args.
48150 set dummy $tool_basename; ac_word=$2
48151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48152 $as_echo_n "checking for $ac_word... " >&6; }
48153 if ${ac_cv_path_JTREGEXE+:} false; then :
48154   $as_echo_n "(cached) " >&6
48155 else
48156   case $JTREGEXE in
48157   [\\/]* | ?:[\\/]*)
48158   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48159   ;;
48160   *)
48161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48162 for as_dir in $PATH
48163 do
48164   IFS=$as_save_IFS
48165   test -z "$as_dir" && as_dir=.
48166     for ac_exec_ext in '' $ac_executable_extensions; do
48167   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48168     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48170     break 2
48171   fi
48172 done
48173   done
48174 IFS=$as_save_IFS
48175 
48176   ;;
48177 esac
48178 fi
48179 JTREGEXE=$ac_cv_path_JTREGEXE
48180 if test -n "$JTREGEXE"; then
48181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48182 $as_echo "$JTREGEXE" >&6; }
48183 else
48184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48185 $as_echo "no" >&6; }
48186 fi
48187 
48188 
48189           if test "x$JTREGEXE" = x; then
48190             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48191           fi
48192         else
48193           # Otherwise we believe it is a complete path. Use it as it is.
48194           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48195 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48196           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48197 $as_echo_n "checking for JTREGEXE... " >&6; }
48198           if test ! -x "$tool_specified"; then
48199             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48200 $as_echo "not found" >&6; }
48201             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48202           fi
48203           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48204 $as_echo "$tool_specified" >&6; }
48205         fi
48206       fi
48207     fi
48208 
48209   fi
48210 
48211 
48212 
48213   if test "x$JTREGEXE" = x; then
48214     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48215   fi
48216 
48217 
48218       JT_HOME="`$DIRNAME $JTREGEXE`"
48219     fi
48220   fi
48221 
48222 
48223 
48224 
48225 
48226 
48227   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48228   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48229   # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48230   #                              commands produced by the link step (currently AIX only)
48231   if test "x$TOOLCHAIN_TYPE" = xxlc; then
48232     COMPILER_TARGET_BITS_FLAG="-q"
48233     COMPILER_COMMAND_FILE_FLAG="-f"
48234     COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48235   else
48236     COMPILER_TARGET_BITS_FLAG="-m"
48237     COMPILER_COMMAND_FILE_FLAG="@"
48238     COMPILER_BINDCMD_FILE_FLAG=""
48239 
48240     # The solstudio linker does not support @-files.
48241     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48242       COMPILER_COMMAND_FILE_FLAG=
48243     fi
48244 
48245     # Check if @file is supported by gcc
48246     if test "x$TOOLCHAIN_TYPE" = xgcc; then
48247       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48248 $as_echo_n "checking if @file is supported by gcc... " >&6; }
48249       # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48250       $ECHO "" "--version" > command.file
48251       if $CXX @command.file 2>&5 >&5; then
48252         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48253 $as_echo "yes" >&6; }
48254         COMPILER_COMMAND_FILE_FLAG="@"
48255       else
48256         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48257 $as_echo "no" >&6; }
48258         COMPILER_COMMAND_FILE_FLAG=
48259       fi
48260       $RM command.file
48261     fi
48262   fi
48263 
48264 
48265 
48266 
48267   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48268   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48269     ARFLAGS="-r"
48270   elif test "x$OPENJDK_TARGET_OS" = xaix; then
48271     ARFLAGS="-X64"
48272   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48273     # lib.exe is used as AR to create static libraries.
48274     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48275   else
48276     ARFLAGS=""
48277   fi
48278 
48279 
48280   ## Setup strip.
48281   # FIXME: should this really be per platform, or should it be per toolchain type?
48282   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48283   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48284   if test "x$OPENJDK_TARGET_OS" = xlinux; then
48285     STRIPFLAGS="-g"
48286   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48287     STRIPFLAGS="-x"
48288   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48289     STRIPFLAGS="-S"
48290   elif test "x$OPENJDK_TARGET_OS" = xaix; then
48291     STRIPFLAGS="-X32_64"
48292   fi
48293 
48294 
48295 
48296   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48297     CC_OUT_OPTION=-Fo
48298     EXE_OUT_OPTION=-out:
48299     LD_OUT_OPTION=-out:
48300     AR_OUT_OPTION=-out:
48301   else
48302     # The option used to specify the target .o,.a or .so file.
48303     # When compiling, how to specify the to be created object file.
48304     CC_OUT_OPTION='-o$(SPACE)'
48305     # When linking, how to specify the to be created executable.
48306     EXE_OUT_OPTION='-o$(SPACE)'
48307     # When linking, how to specify the to be created dynamically linkable library.
48308     LD_OUT_OPTION='-o$(SPACE)'
48309     # When archiving, how to specify the to be create static archive for object files.
48310     AR_OUT_OPTION='rcs$(SPACE)'
48311   fi
48312 
48313 
48314 
48315 
48316 
48317   # On Windows, we need to set RC flags.
48318   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48319     RC_FLAGS="-nologo -l0x409"
48320     JVM_RCFLAGS="-nologo"
48321     if test "x$DEBUG_LEVEL" = xrelease; then
48322       RC_FLAGS="$RC_FLAGS -DNDEBUG"
48323       JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48324     fi
48325 
48326     # The version variables used to create RC_FLAGS may be overridden
48327     # in a custom configure script, or possibly the command line.
48328     # Let those variables be expanded at make time in spec.gmk.
48329     # The \$ are escaped to the shell, and the $(...) variables
48330     # are evaluated by make.
48331     RC_FLAGS="$RC_FLAGS \
48332         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48333         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48334         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48335         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48336         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48337         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48338         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48339 
48340     JVM_RCFLAGS="$JVM_RCFLAGS \
48341         -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48342         -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48343         -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48344         -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48345         -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48346         -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48347         -D\"HS_FNAME=jvm.dll\" \
48348         -D\"HS_INTERNAL_NAME=jvm\""
48349   fi
48350 
48351 
48352 
48353   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48354     # silence copyright notice and other headers.
48355     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48356   fi
48357 
48358 
48359 # Now we can test some aspects on the target using configure macros.
48360 
48361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48362 $as_echo_n "checking for ANSI C header files... " >&6; }
48363 if ${ac_cv_header_stdc+:} false; then :
48364   $as_echo_n "(cached) " >&6
48365 else
48366   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48367 /* end confdefs.h.  */
48368 #include <stdlib.h>
48369 #include <stdarg.h>
48370 #include <string.h>
48371 #include <float.h>
48372 
48373 int
48374 main ()
48375 {
48376 
48377   ;
48378   return 0;
48379 }
48380 _ACEOF
48381 if ac_fn_cxx_try_compile "$LINENO"; then :
48382   ac_cv_header_stdc=yes
48383 else
48384   ac_cv_header_stdc=no
48385 fi
48386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48387 
48388 if test $ac_cv_header_stdc = yes; then
48389   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48390   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48391 /* end confdefs.h.  */
48392 #include <string.h>
48393 
48394 _ACEOF
48395 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48396   $EGREP "memchr" >/dev/null 2>&1; then :
48397 
48398 else
48399   ac_cv_header_stdc=no
48400 fi
48401 rm -f conftest*
48402 
48403 fi
48404 
48405 if test $ac_cv_header_stdc = yes; then
48406   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48407   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48408 /* end confdefs.h.  */
48409 #include <stdlib.h>
48410 
48411 _ACEOF
48412 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48413   $EGREP "free" >/dev/null 2>&1; then :
48414 
48415 else
48416   ac_cv_header_stdc=no
48417 fi
48418 rm -f conftest*
48419 
48420 fi
48421 
48422 if test $ac_cv_header_stdc = yes; then
48423   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48424   if test "$cross_compiling" = yes; then :
48425   :
48426 else
48427   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48428 /* end confdefs.h.  */
48429 #include <ctype.h>
48430 #include <stdlib.h>
48431 #if ((' ' & 0x0FF) == 0x020)
48432 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48433 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48434 #else
48435 # define ISLOWER(c) \
48436                    (('a' <= (c) && (c) <= 'i') \
48437                      || ('j' <= (c) && (c) <= 'r') \
48438                      || ('s' <= (c) && (c) <= 'z'))
48439 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48440 #endif
48441 
48442 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48443 int
48444 main ()
48445 {
48446   int i;
48447   for (i = 0; i < 256; i++)
48448     if (XOR (islower (i), ISLOWER (i))
48449         || toupper (i) != TOUPPER (i))
48450       return 2;
48451   return 0;
48452 }
48453 _ACEOF
48454 if ac_fn_cxx_try_run "$LINENO"; then :
48455 
48456 else
48457   ac_cv_header_stdc=no
48458 fi
48459 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48460   conftest.$ac_objext conftest.beam conftest.$ac_ext
48461 fi
48462 
48463 fi
48464 fi
48465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48466 $as_echo "$ac_cv_header_stdc" >&6; }
48467 if test $ac_cv_header_stdc = yes; then
48468 
48469 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
48470 
48471 fi
48472 
48473 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
48474 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48475                   inttypes.h stdint.h unistd.h
48476 do :
48477   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48478 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48479 "
48480 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48481   cat >>confdefs.h <<_ACEOF
48482 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48483 _ACEOF
48484 
48485 fi
48486 
48487 done
48488 
48489 
48490 
48491   ###############################################################################
48492   #
48493   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48494   # (The JVM can use 32 or 64 bit Java pointers but that decision
48495   # is made at runtime.)
48496   #
48497 
48498   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48499     # Always specify -m flag on Solaris
48500     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48501 
48502   # When we add flags to the "official" CFLAGS etc, we need to
48503   # keep track of these additions in ADDED_CFLAGS etc. These
48504   # will later be checked to make sure only controlled additions
48505   # have been made to CFLAGS etc.
48506   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48507   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48508   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48509 
48510   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48511   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48512   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48513 
48514   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48515   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48516   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48517 
48518   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48519   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48520   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48521 
48522   elif test "x$COMPILE_TYPE" = xreduced; then
48523     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48524       # Specify -m if running reduced on unix platforms
48525 
48526   # When we add flags to the "official" CFLAGS etc, we need to
48527   # keep track of these additions in ADDED_CFLAGS etc. These
48528   # will later be checked to make sure only controlled additions
48529   # have been made to CFLAGS etc.
48530   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48531   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48532   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48533 
48534   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48535   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48536   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48537 
48538   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48539   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48540   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48541 
48542   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48543   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48544   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48545 
48546     fi
48547   fi
48548   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48549     JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48550     JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48551     JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48552   fi
48553 
48554   # Make compilation sanity check
48555   for ac_header in stdio.h
48556 do :
48557   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48558 if test "x$ac_cv_header_stdio_h" = xyes; then :
48559   cat >>confdefs.h <<_ACEOF
48560 #define HAVE_STDIO_H 1
48561 _ACEOF
48562 
48563 else
48564 
48565     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48566 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48567     if test "x$COMPILE_TYPE" = xreduced; then
48568 
48569   # Print a helpful message on how to acquire the necessary build dependency.
48570   # reduced is the help tag: freetype, cups, alsa etc
48571   MISSING_DEPENDENCY=reduced
48572 
48573   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48574     cygwin_help $MISSING_DEPENDENCY
48575   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48576     msys_help $MISSING_DEPENDENCY
48577   else
48578     PKGHANDLER_COMMAND=
48579 
48580     case $PKGHANDLER in
48581       apt-get)
48582         apt_help     $MISSING_DEPENDENCY ;;
48583       yum)
48584         yum_help     $MISSING_DEPENDENCY ;;
48585       port)
48586         port_help    $MISSING_DEPENDENCY ;;
48587       pkgutil)
48588         pkgutil_help $MISSING_DEPENDENCY ;;
48589       pkgadd)
48590         pkgadd_help  $MISSING_DEPENDENCY ;;
48591     esac
48592 
48593     if test "x$PKGHANDLER_COMMAND" != x; then
48594       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48595     fi
48596   fi
48597 
48598       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48599 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48600     elif test "x$COMPILE_TYPE" = xcross; then
48601       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48602 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48603     fi
48604     as_fn_error $? "Cannot continue." "$LINENO" 5
48605 
48606 fi
48607 
48608 done
48609 
48610 
48611   # The cast to long int works around a bug in the HP C Compiler
48612 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48613 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48614 # This bug is HP SR number 8606223364.
48615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48616 $as_echo_n "checking size of int *... " >&6; }
48617 if ${ac_cv_sizeof_int_p+:} false; then :
48618   $as_echo_n "(cached) " >&6
48619 else
48620   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48621 
48622 else
48623   if test "$ac_cv_type_int_p" = yes; then
48624      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48625 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48626 as_fn_error 77 "cannot compute sizeof (int *)
48627 See \`config.log' for more details" "$LINENO" 5; }
48628    else
48629      ac_cv_sizeof_int_p=0
48630    fi
48631 fi
48632 
48633 fi
48634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48635 $as_echo "$ac_cv_sizeof_int_p" >&6; }
48636 
48637 
48638 
48639 cat >>confdefs.h <<_ACEOF
48640 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
48641 _ACEOF
48642 
48643 
48644 
48645   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48646   if test "x$ac_cv_sizeof_int_p" = x; then
48647     # The test failed, lets stick to the assumed value.
48648     { $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
48649 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48650   else
48651     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48652 
48653     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48654       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48655       # Let's try to implicitely set the compilers target architecture and retry the test
48656       { $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
48657 $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;}
48658       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48659 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48660 
48661   # When we add flags to the "official" CFLAGS etc, we need to
48662   # keep track of these additions in ADDED_CFLAGS etc. These
48663   # will later be checked to make sure only controlled additions
48664   # have been made to CFLAGS etc.
48665   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48666   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48667   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48668 
48669   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48670   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48671   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48672 
48673   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48674   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48675   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48676 
48677   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48678   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48679   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48680 
48681 
48682       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48683       unset ac_cv_sizeof_int_p
48684       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48685       cat >>confdefs.h <<_ACEOF
48686 #undef SIZEOF_INT_P
48687 _ACEOF
48688 
48689       # The cast to long int works around a bug in the HP C Compiler
48690 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48691 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48692 # This bug is HP SR number 8606223364.
48693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48694 $as_echo_n "checking size of int *... " >&6; }
48695 if ${ac_cv_sizeof_int_p+:} false; then :
48696   $as_echo_n "(cached) " >&6
48697 else
48698   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48699 
48700 else
48701   if test "$ac_cv_type_int_p" = yes; then
48702      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48703 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48704 as_fn_error 77 "cannot compute sizeof (int *)
48705 See \`config.log' for more details" "$LINENO" 5; }
48706    else
48707      ac_cv_sizeof_int_p=0
48708    fi
48709 fi
48710 
48711 fi
48712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48713 $as_echo "$ac_cv_sizeof_int_p" >&6; }
48714 
48715 
48716 
48717 cat >>confdefs.h <<_ACEOF
48718 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
48719 _ACEOF
48720 
48721 
48722 
48723       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48724 
48725       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48726         { $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
48727 $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;}
48728         if test "x$COMPILE_TYPE" = xreduced; then
48729 
48730   # Print a helpful message on how to acquire the necessary build dependency.
48731   # reduced is the help tag: freetype, cups, alsa etc
48732   MISSING_DEPENDENCY=reduced
48733 
48734   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48735     cygwin_help $MISSING_DEPENDENCY
48736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48737     msys_help $MISSING_DEPENDENCY
48738   else
48739     PKGHANDLER_COMMAND=
48740 
48741     case $PKGHANDLER in
48742       apt-get)
48743         apt_help     $MISSING_DEPENDENCY ;;
48744       yum)
48745         yum_help     $MISSING_DEPENDENCY ;;
48746       port)
48747         port_help    $MISSING_DEPENDENCY ;;
48748       pkgutil)
48749         pkgutil_help $MISSING_DEPENDENCY ;;
48750       pkgadd)
48751         pkgadd_help  $MISSING_DEPENDENCY ;;
48752     esac
48753 
48754     if test "x$PKGHANDLER_COMMAND" != x; then
48755       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48756     fi
48757   fi
48758 
48759           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48760 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48761         elif test "x$COMPILE_TYPE" = xcross; then
48762           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48763 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48764         fi
48765         as_fn_error $? "Cannot continue." "$LINENO" 5
48766       fi
48767     fi
48768   fi
48769 
48770   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48771 $as_echo_n "checking for target address size... " >&6; }
48772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48773 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48774 
48775 
48776   ###############################################################################
48777   #
48778   # Is the target little of big endian?
48779   #
48780    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48781 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48782 if ${ac_cv_c_bigendian+:} false; then :
48783   $as_echo_n "(cached) " >&6
48784 else
48785   ac_cv_c_bigendian=unknown
48786     # See if we're dealing with a universal compiler.
48787     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48788 /* end confdefs.h.  */
48789 #ifndef __APPLE_CC__
48790                not a universal capable compiler
48791              #endif
48792              typedef int dummy;
48793 
48794 _ACEOF
48795 if ac_fn_cxx_try_compile "$LINENO"; then :
48796 
48797         # Check for potential -arch flags.  It is not universal unless
48798         # there are at least two -arch flags with different values.
48799         ac_arch=
48800         ac_prev=
48801         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48802          if test -n "$ac_prev"; then
48803            case $ac_word in
48804              i?86 | x86_64 | ppc | ppc64)
48805                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48806                  ac_arch=$ac_word
48807                else
48808                  ac_cv_c_bigendian=universal
48809                  break
48810                fi
48811                ;;
48812            esac
48813            ac_prev=
48814          elif test "x$ac_word" = "x-arch"; then
48815            ac_prev=arch
48816          fi
48817        done
48818 fi
48819 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48820     if test $ac_cv_c_bigendian = unknown; then
48821       # See if sys/param.h defines the BYTE_ORDER macro.
48822       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48823 /* end confdefs.h.  */
48824 #include <sys/types.h>
48825              #include <sys/param.h>
48826 
48827 int
48828 main ()
48829 {
48830 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48831                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48832                      && LITTLE_ENDIAN)
48833               bogus endian macros
48834              #endif
48835 
48836   ;
48837   return 0;
48838 }
48839 _ACEOF
48840 if ac_fn_cxx_try_compile "$LINENO"; then :
48841   # It does; now see whether it defined to BIG_ENDIAN or not.
48842          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48843 /* end confdefs.h.  */
48844 #include <sys/types.h>
48845                 #include <sys/param.h>
48846 
48847 int
48848 main ()
48849 {
48850 #if BYTE_ORDER != BIG_ENDIAN
48851                  not big endian
48852                 #endif
48853 
48854   ;
48855   return 0;
48856 }
48857 _ACEOF
48858 if ac_fn_cxx_try_compile "$LINENO"; then :
48859   ac_cv_c_bigendian=yes
48860 else
48861   ac_cv_c_bigendian=no
48862 fi
48863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48864 fi
48865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48866     fi
48867     if test $ac_cv_c_bigendian = unknown; then
48868       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48869       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48870 /* end confdefs.h.  */
48871 #include <limits.h>
48872 
48873 int
48874 main ()
48875 {
48876 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48877               bogus endian macros
48878              #endif
48879 
48880   ;
48881   return 0;
48882 }
48883 _ACEOF
48884 if ac_fn_cxx_try_compile "$LINENO"; then :
48885   # It does; now see whether it defined to _BIG_ENDIAN or not.
48886          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48887 /* end confdefs.h.  */
48888 #include <limits.h>
48889 
48890 int
48891 main ()
48892 {
48893 #ifndef _BIG_ENDIAN
48894                  not big endian
48895                 #endif
48896 
48897   ;
48898   return 0;
48899 }
48900 _ACEOF
48901 if ac_fn_cxx_try_compile "$LINENO"; then :
48902   ac_cv_c_bigendian=yes
48903 else
48904   ac_cv_c_bigendian=no
48905 fi
48906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48907 fi
48908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48909     fi
48910     if test $ac_cv_c_bigendian = unknown; then
48911       # Compile a test program.
48912       if test "$cross_compiling" = yes; then :
48913   # Try to guess by grepping values from an object file.
48914          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48915 /* end confdefs.h.  */
48916 short int ascii_mm[] =
48917                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48918                 short int ascii_ii[] =
48919                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48920                 int use_ascii (int i) {
48921                   return ascii_mm[i] + ascii_ii[i];
48922                 }
48923                 short int ebcdic_ii[] =
48924                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48925                 short int ebcdic_mm[] =
48926                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48927                 int use_ebcdic (int i) {
48928                   return ebcdic_mm[i] + ebcdic_ii[i];
48929                 }
48930                 extern int foo;
48931 
48932 int
48933 main ()
48934 {
48935 return use_ascii (foo) == use_ebcdic (foo);
48936   ;
48937   return 0;
48938 }
48939 _ACEOF
48940 if ac_fn_cxx_try_compile "$LINENO"; then :
48941   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48942               ac_cv_c_bigendian=yes
48943             fi
48944             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48945               if test "$ac_cv_c_bigendian" = unknown; then
48946                 ac_cv_c_bigendian=no
48947               else
48948                 # finding both strings is unlikely to happen, but who knows?
48949                 ac_cv_c_bigendian=unknown
48950               fi
48951             fi
48952 fi
48953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48954 else
48955   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48956 /* end confdefs.h.  */
48957 $ac_includes_default
48958 int
48959 main ()
48960 {
48961 
48962              /* Are we little or big endian?  From Harbison&Steele.  */
48963              union
48964              {
48965                long int l;
48966                char c[sizeof (long int)];
48967              } u;
48968              u.l = 1;
48969              return u.c[sizeof (long int) - 1] == 1;
48970 
48971   ;
48972   return 0;
48973 }
48974 _ACEOF
48975 if ac_fn_cxx_try_run "$LINENO"; then :
48976   ac_cv_c_bigendian=no
48977 else
48978   ac_cv_c_bigendian=yes
48979 fi
48980 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48981   conftest.$ac_objext conftest.beam conftest.$ac_ext
48982 fi
48983 
48984     fi
48985 fi
48986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48987 $as_echo "$ac_cv_c_bigendian" >&6; }
48988  case $ac_cv_c_bigendian in #(
48989    yes)
48990      ENDIAN="big";; #(
48991    no)
48992      ENDIAN="little" ;; #(
48993    universal)
48994      ENDIAN="universal_endianness"
48995      ;; #(
48996    *)
48997      ENDIAN="unknown" ;;
48998  esac
48999 
49000 
49001   if test "x$ENDIAN" = xuniversal_endianness; then
49002     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49003   fi
49004   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49005     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
49006   fi
49007 
49008 
49009 # Configure flags for the tools
49010 
49011   ###############################################################################
49012   #
49013   # How to compile shared libraries.
49014   #
49015 
49016   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49017     PICFLAG="-fPIC"
49018     C_FLAG_REORDER=''
49019     CXX_FLAG_REORDER=''
49020 
49021     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49022       # Linking is different on MacOSX
49023       if test "x$STATIC_BUILD" = xtrue; then
49024         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49025       else
49026         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49027         JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49028       fi
49029       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49030       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49031       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49032       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49033     else
49034       # Default works for linux, might work on other platforms as well.
49035       SHARED_LIBRARY_FLAGS='-shared'
49036       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49037       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49038       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49039       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49040     fi
49041   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49042     C_FLAG_REORDER=''
49043     CXX_FLAG_REORDER=''
49044 
49045     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49046       # Linking is different on MacOSX
49047       PICFLAG=''
49048       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49049       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49050       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49051       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49052       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49053 
49054       if test "x$STATIC_BUILD" = xfalse; then
49055         JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49056       fi
49057     else
49058       # Default works for linux, might work on other platforms as well.
49059       PICFLAG='-fPIC'
49060       SHARED_LIBRARY_FLAGS='-shared'
49061       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49062       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49063       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49064       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49065     fi
49066   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49067     if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49068       PICFLAG="-xcode=pic32"
49069     else
49070       PICFLAG="-KPIC"
49071     fi
49072     C_FLAG_REORDER='-xF'
49073     CXX_FLAG_REORDER='-xF'
49074     SHARED_LIBRARY_FLAGS="-G"
49075     SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49076     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49077     SET_SHARED_LIBRARY_NAME='-h $1'
49078     SET_SHARED_LIBRARY_MAPFILE='-M$1'
49079   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49080     # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49081     # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49082     # will have to patch this single instruction with a call to some out-of-order code which
49083     # does the load from the TOC. This is of course slow. But in that case we also would have
49084     # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49085     # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49086     # can be patched directly by the linker and does not require a jump to out-of-order code.
49087     # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49088     # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49089     # loads for accessing a global variable). But there are rumors that this may be seen as a
49090     # 'performance feature' because of improved code locality of the symbols used in a
49091     # compilation unit.
49092     PICFLAG="-qpic"
49093     JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49094     C_FLAG_REORDER=''
49095     CXX_FLAG_REORDER=''
49096     SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49097     SET_EXECUTABLE_ORIGIN=""
49098     SET_SHARED_LIBRARY_ORIGIN=''
49099     SET_SHARED_LIBRARY_NAME=''
49100     SET_SHARED_LIBRARY_MAPFILE=''
49101   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49102     PICFLAG=""
49103     C_FLAG_REORDER=''
49104     CXX_FLAG_REORDER=''
49105     SHARED_LIBRARY_FLAGS="-dll"
49106     SET_EXECUTABLE_ORIGIN=''
49107     SET_SHARED_LIBRARY_ORIGIN=''
49108     SET_SHARED_LIBRARY_NAME=''
49109     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49110   fi
49111 
49112 
49113 
49114 
49115 
49116 
49117 
49118 
49119 
49120   # The (cross) compiler is now configured, we can now test capabilities
49121   # of the target platform.
49122 
49123 
49124 
49125   ###############################################################################
49126   #
49127   # Setup the opt flags for different compilers
49128   # and different operating systems.
49129   #
49130 
49131   # FIXME: this was indirectly the old default, but just inherited.
49132   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49133   #   C_FLAG_DEPS="-MMD -MF"
49134   # fi
49135 
49136   # Generate make dependency files
49137   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49138     C_FLAG_DEPS="-MMD -MF"
49139   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49140     C_FLAG_DEPS="-MMD -MF"
49141   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49142     C_FLAG_DEPS="-xMMD -xMF"
49143   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49144     C_FLAG_DEPS="-qmakedep=gcc -MF"
49145   fi
49146   CXX_FLAG_DEPS="$C_FLAG_DEPS"
49147 
49148 
49149 
49150   # Debug symbols
49151   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49152     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49153       # reduce from default "-g2" option to save space
49154       CFLAGS_DEBUG_SYMBOLS="-g1"
49155       CXXFLAGS_DEBUG_SYMBOLS="-g1"
49156     else
49157       CFLAGS_DEBUG_SYMBOLS="-g"
49158       CXXFLAGS_DEBUG_SYMBOLS="-g"
49159     fi
49160   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49161     CFLAGS_DEBUG_SYMBOLS="-g"
49162     CXXFLAGS_DEBUG_SYMBOLS="-g"
49163   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49164     CFLAGS_DEBUG_SYMBOLS="-g -xs"
49165     # -g0 enables debug symbols without disabling inlining.
49166     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49167   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49168     CFLAGS_DEBUG_SYMBOLS="-g"
49169     CXXFLAGS_DEBUG_SYMBOLS="-g"
49170   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49171     CFLAGS_DEBUG_SYMBOLS="-Zi"
49172     CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49173   fi
49174 
49175 
49176 
49177   # Debug symbols for JVM_CFLAGS
49178   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49179     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49180     if test "x$DEBUG_LEVEL" = xslowdebug; then
49181       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49182     else
49183       # -g0 does not disable inlining, which -g does.
49184       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49185     fi
49186   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49187     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49188   else
49189     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49190   fi
49191 
49192 
49193   # bounds, memory and behavior checking options
49194   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49195     case $DEBUG_LEVEL in
49196     release )
49197       # no adjustment
49198       ;;
49199     fastdebug )
49200       # no adjustment
49201       ;;
49202     slowdebug )
49203       # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49204       # get's added conditionally on whether we produce debug symbols or not.
49205       # This is most likely not really correct.
49206 
49207       # Add runtime stack smashing and undefined behavior checks.
49208       # Not all versions of gcc support -fstack-protector
49209       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49210 
49211 
49212 
49213 
49214 
49215 
49216 
49217 
49218 
49219 
49220 
49221 
49222 
49223 
49224 
49225 
49226 
49227 
49228 
49229 
49230 
49231 
49232 
49233 
49234 
49235 
49236 
49237 
49238 
49239 
49240 
49241 
49242 
49243 
49244 
49245 
49246 
49247 
49248 
49249 
49250 
49251 
49252     # Execute function body
49253 
49254 
49255 
49256 
49257 
49258 
49259 
49260 
49261 
49262 
49263 
49264 
49265 
49266 
49267 
49268 
49269 
49270 
49271 
49272 
49273 
49274 
49275 
49276 
49277 
49278 
49279 
49280 
49281 
49282 
49283 
49284 
49285 
49286 
49287 
49288 
49289 
49290 
49291 
49292 
49293 
49294 
49295 
49296 
49297 
49298 
49299 
49300 
49301     # Execute function body
49302 
49303   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49304 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49305   supports=yes
49306 
49307   saved_cflags="$CFLAGS"
49308   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49309   ac_ext=c
49310 ac_cpp='$CPP $CPPFLAGS'
49311 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49312 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49313 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49314 
49315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49316 /* end confdefs.h.  */
49317 int i;
49318 _ACEOF
49319 if ac_fn_c_try_compile "$LINENO"; then :
49320 
49321 else
49322   supports=no
49323 fi
49324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49325   ac_ext=cpp
49326 ac_cpp='$CXXCPP $CPPFLAGS'
49327 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49328 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49329 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49330 
49331   CFLAGS="$saved_cflags"
49332 
49333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49334 $as_echo "$supports" >&6; }
49335   if test "x$supports" = "xyes" ; then
49336     :
49337     C_COMP_SUPPORTS="yes"
49338   else
49339     :
49340     C_COMP_SUPPORTS="no"
49341   fi
49342 
49343 
49344 
49345 
49346 
49347 
49348 
49349 
49350 
49351 
49352 
49353 
49354 
49355 
49356 
49357 
49358 
49359 
49360 
49361 
49362 
49363 
49364 
49365 
49366 
49367 
49368 
49369 
49370 
49371 
49372 
49373 
49374 
49375 
49376 
49377 
49378 
49379 
49380 
49381 
49382 
49383 
49384 
49385 
49386 
49387 
49388 
49389 
49390 
49391 
49392 
49393 
49394 
49395 
49396 
49397 
49398 
49399 
49400 
49401     # Execute function body
49402 
49403   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49404 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49405   supports=yes
49406 
49407   saved_cxxflags="$CXXFLAGS"
49408   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49409   ac_ext=cpp
49410 ac_cpp='$CXXCPP $CPPFLAGS'
49411 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49412 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49413 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49414 
49415   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49416 /* end confdefs.h.  */
49417 int i;
49418 _ACEOF
49419 if ac_fn_cxx_try_compile "$LINENO"; then :
49420 
49421 else
49422   supports=no
49423 fi
49424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49425   ac_ext=cpp
49426 ac_cpp='$CXXCPP $CPPFLAGS'
49427 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49428 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49429 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49430 
49431   CXXFLAGS="$saved_cxxflags"
49432 
49433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49434 $as_echo "$supports" >&6; }
49435   if test "x$supports" = "xyes" ; then
49436     :
49437     CXX_COMP_SUPPORTS="yes"
49438   else
49439     :
49440     CXX_COMP_SUPPORTS="no"
49441   fi
49442 
49443 
49444 
49445 
49446 
49447 
49448 
49449 
49450 
49451 
49452 
49453 
49454 
49455   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49456 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49457   supports=no
49458   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49459 
49460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49461 $as_echo "$supports" >&6; }
49462   if test "x$supports" = "xyes" ; then
49463     :
49464 
49465   else
49466     :
49467     STACK_PROTECTOR_CFLAG=""
49468   fi
49469 
49470 
49471 
49472 
49473 
49474 
49475 
49476       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49477       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49478       if test "x$STACK_PROTECTOR_CFLAG" != x; then
49479         JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49480       fi
49481       ;;
49482     esac
49483   fi
49484 
49485   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49486     if test "x$DEBUG_LEVEL" != xrelease; then
49487       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49488         JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49489       fi
49490     fi
49491   fi
49492 
49493   # Optimization levels
49494   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49495     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49496 
49497     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49498       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49499       C_O_FLAG_HIGHEST_JVM="-xO4"
49500       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49501       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49502       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49503       C_O_FLAG_DEBUG="-xregs=no%frameptr"
49504       C_O_FLAG_DEBUG_JVM=""
49505       C_O_FLAG_NONE="-xregs=no%frameptr"
49506       CXX_O_FLAG_HIGHEST_JVM="-xO4"
49507       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49508       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49509       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49510       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49511       CXX_O_FLAG_DEBUG_JVM=""
49512       CXX_O_FLAG_NONE="-xregs=no%frameptr"
49513       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49514         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49515         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49516       fi
49517     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49518       C_O_FLAG_HIGHEST_JVM="-xO4"
49519       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49520       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49521       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49522       C_O_FLAG_DEBUG=""
49523       C_O_FLAG_DEBUG_JVM=""
49524       C_O_FLAG_NONE=""
49525       CXX_O_FLAG_HIGHEST_JVM="-xO4"
49526       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49527       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49528       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49529       CXX_O_FLAG_DEBUG=""
49530       CXX_O_FLAG_DEBUG_JVM=""
49531       CXX_O_FLAG_NONE=""
49532     fi
49533   else
49534     # The remaining toolchains share opt flags between CC and CXX;
49535     # setup for C and duplicate afterwards.
49536     if test "x$TOOLCHAIN_TYPE" = xgcc; then
49537       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49538         # On MacOSX we optimize for size, something
49539         # we should do for all platforms?
49540         C_O_FLAG_HIGHEST_JVM="-Os"
49541         C_O_FLAG_HIGHEST="-Os"
49542         C_O_FLAG_HI="-Os"
49543         C_O_FLAG_NORM="-Os"
49544         C_O_FLAG_SIZE="-Os"
49545       else
49546         C_O_FLAG_HIGHEST_JVM="-O3"
49547         C_O_FLAG_HIGHEST="-O3"
49548         C_O_FLAG_HI="-O3"
49549         C_O_FLAG_NORM="-O2"
49550         C_O_FLAG_SIZE="-Os"
49551       fi
49552       C_O_FLAG_DEBUG="-O0"
49553       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49554         C_O_FLAG_DEBUG_JVM=""
49555       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49556         C_O_FLAG_DEBUG_JVM="-O0"
49557       fi
49558       C_O_FLAG_NONE="-O0"
49559     elif test "x$TOOLCHAIN_TYPE" = xclang; then
49560       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49561         # On MacOSX we optimize for size, something
49562         # we should do for all platforms?
49563         C_O_FLAG_HIGHEST_JVM="-Os"
49564         C_O_FLAG_HIGHEST="-Os"
49565         C_O_FLAG_HI="-Os"
49566         C_O_FLAG_NORM="-Os"
49567         C_O_FLAG_SIZE="-Os"
49568       else
49569         C_O_FLAG_HIGHEST_JVM="-O3"
49570         C_O_FLAG_HIGHEST="-O3"
49571         C_O_FLAG_HI="-O3"
49572         C_O_FLAG_NORM="-O2"
49573         C_O_FLAG_SIZE="-Os"
49574       fi
49575       C_O_FLAG_DEBUG="-O0"
49576       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49577         C_O_FLAG_DEBUG_JVM=""
49578       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49579         C_O_FLAG_DEBUG_JVM="-O0"
49580       fi
49581       C_O_FLAG_NONE="-O0"
49582     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49583       C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49584       C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49585       C_O_FLAG_HI="-O3 -qinline -qinlglue"
49586       C_O_FLAG_NORM="-O2"
49587       C_O_FLAG_DEBUG="-qnoopt"
49588       # FIXME: Value below not verified.
49589       C_O_FLAG_DEBUG_JVM=""
49590       C_O_FLAG_NONE="-qnoopt"
49591     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49592       C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49593       C_O_FLAG_HIGHEST="-O2"
49594       C_O_FLAG_HI="-O1"
49595       C_O_FLAG_NORM="-O1"
49596       C_O_FLAG_DEBUG="-Od"
49597       C_O_FLAG_DEBUG_JVM=""
49598       C_O_FLAG_NONE="-Od"
49599       C_O_FLAG_SIZE="-Os"
49600     fi
49601     CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49602     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49603     CXX_O_FLAG_HI="$C_O_FLAG_HI"
49604     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49605     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49606     CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49607     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49608     CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49609   fi
49610 
49611   # Adjust optimization flags according to debug level.
49612   case $DEBUG_LEVEL in
49613     release )
49614       # no adjustment
49615       ;;
49616     fastdebug )
49617       # Not quite so much optimization
49618       C_O_FLAG_HI="$C_O_FLAG_NORM"
49619       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49620       ;;
49621     slowdebug )
49622       # Disable optimization
49623       C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49624       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49625       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49626       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49627       C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49628       CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49629       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49630       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49631       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49632       CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49633       ;;
49634   esac
49635 
49636 
49637 
49638 
49639 
49640 
49641 
49642 
49643 
49644 
49645 
49646 
49647 
49648 
49649 
49650 
49651 
49652 
49653 
49654   # Special extras...
49655   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49656     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49657       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49658       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49659     fi
49660     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49661     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49662   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49663     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49664     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49665   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49666     CXXSTD_CXXFLAG="-std=gnu++98"
49667 
49668 
49669 
49670 
49671 
49672 
49673 
49674 
49675 
49676 
49677 
49678 
49679 
49680 
49681 
49682 
49683 
49684 
49685 
49686 
49687 
49688 
49689 
49690 
49691 
49692 
49693 
49694 
49695 
49696 
49697 
49698 
49699 
49700 
49701 
49702 
49703 
49704 
49705 
49706 
49707 
49708 
49709     # Execute function body
49710 
49711   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49712 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49713   supports=yes
49714 
49715   saved_cxxflags="$CXXFLAGS"
49716   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49717   ac_ext=cpp
49718 ac_cpp='$CXXCPP $CPPFLAGS'
49719 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49720 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49721 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49722 
49723   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49724 /* end confdefs.h.  */
49725 int i;
49726 _ACEOF
49727 if ac_fn_cxx_try_compile "$LINENO"; then :
49728 
49729 else
49730   supports=no
49731 fi
49732 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49733   ac_ext=cpp
49734 ac_cpp='$CXXCPP $CPPFLAGS'
49735 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49736 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49737 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49738 
49739   CXXFLAGS="$saved_cxxflags"
49740 
49741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49742 $as_echo "$supports" >&6; }
49743   if test "x$supports" = "xyes" ; then
49744     :
49745 
49746   else
49747     :
49748     CXXSTD_CXXFLAG=""
49749   fi
49750 
49751 
49752 
49753 
49754 
49755 
49756 
49757 
49758 
49759 
49760 
49761 
49762     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49763     JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49764 
49765   fi
49766   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49767     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49768     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49769   fi
49770 
49771   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49772     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49773     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49774   fi
49775 
49776   CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49777   CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49778   LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49779 
49780   ###############################################################################
49781   #
49782   # Now setup the CFLAGS and LDFLAGS for the JDK build.
49783   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49784   #
49785 
49786   # Setup compiler/platform specific flags into
49787   #    CFLAGS_JDK    - C Compiler flags
49788   #    CXXFLAGS_JDK  - C++ Compiler flags
49789   #    COMMON_CCXXFLAGS_JDK - common to C and C++
49790   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49791     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49792     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49793     JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49794     if test "x$OPENJDK_TARGET_CPU" = xx86; then
49795       # Force compatibility with i586 on 32 bit intel platforms.
49796       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49797       JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49798     fi
49799     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49800         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49801     case $OPENJDK_TARGET_CPU_ARCH in
49802       arm )
49803         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49804         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49805         ;;
49806       ppc )
49807         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49808         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49809         ;;
49810       s390 )
49811         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49812         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49813         ;;
49814       * )
49815         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49816         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49817         ;;
49818     esac
49819 
49820 
49821 
49822 
49823 
49824 
49825 
49826 
49827 
49828 
49829 
49830 
49831 
49832 
49833 
49834 
49835 
49836 
49837 
49838 
49839 
49840 
49841 
49842 
49843 
49844 
49845 
49846 
49847 
49848 
49849 
49850 
49851 
49852 
49853 
49854 
49855 
49856 
49857 
49858 
49859 
49860 
49861 
49862 
49863 
49864 
49865 
49866 
49867 
49868 
49869 
49870 
49871 
49872 
49873     # Execute function body
49874 
49875   # Need to assign to a variable since m4 is blocked from modifying parts in [].
49876   REFERENCE_VERSION=6
49877 
49878   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
49879     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
49880   fi
49881 
49882   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49883     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49884   fi
49885 
49886   # Version comparison method inspired by http://stackoverflow.com/a/24067243
49887   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
49888 
49889   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49890     :
49891 
49892   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49893   # runs afoul of the more aggressive versions of these optimisations.
49894   # Notably, value range propagation now assumes that the this pointer of C++
49895   # member functions is non-null.
49896   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49897         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49898         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49899 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49900   CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49901   JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49902 
49903   else
49904     :
49905 
49906   fi
49907 
49908 
49909 
49910 
49911 
49912 
49913 
49914 
49915 
49916 
49917 
49918 
49919 
49920 
49921   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49922     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49923 
49924     # Restrict the debug information created by Clang to avoid
49925     # too big object files and speed the build up a little bit
49926     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49927     JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49928     if test "x$OPENJDK_TARGET_OS" = xlinux; then
49929       if test "x$OPENJDK_TARGET_CPU" = xx86; then
49930         # Force compatibility with i586 on 32 bit intel platforms.
49931         COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49932         JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49933       fi
49934       JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49935       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49936           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49937       case $OPENJDK_TARGET_CPU_ARCH in
49938         ppc )
49939           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49940           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49941           ;;
49942         * )
49943           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49944           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49945           ;;
49946       esac
49947     fi
49948   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49949     JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49950     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49951     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49952       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49953     fi
49954 
49955     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49956     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49957   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49958     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49959     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49960     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49961   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49962     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49963         -MD -Zc:wchar_t- -W3 -wd4800 \
49964         -DWIN32_LEAN_AND_MEAN \
49965         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49966         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49967         -DWIN32 -DIAL"
49968     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49969       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49970     else
49971       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49972     fi
49973     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49974     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49975     # studio.
49976     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49977       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49978       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49979       JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49980     fi
49981   fi
49982 
49983   ###############################################################################
49984 
49985   # Adjust flags according to debug level.
49986   case $DEBUG_LEVEL in
49987     fastdebug | slowdebug )
49988       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49989       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49990       ;;
49991     release )
49992       ;;
49993     * )
49994       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49995       ;;
49996   esac
49997 
49998   # Set some common defines. These works for all compilers, but assume
49999   # -D is universally accepted.
50000 
50001   # Setup endianness
50002   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50003     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50004     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50005     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50006     #   Note: -Dmacro         is the same as    #define macro 1
50007     #         -Dmacro=        is the same as    #define macro
50008     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50009       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50010     else
50011       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50012     fi
50013   else
50014     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50015     # are defined in the system?
50016     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50017       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50018     else
50019       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50020     fi
50021   fi
50022 
50023   # Setup target OS define. Use OS target name but in upper case.
50024   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50025   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50026 
50027   # Setup target CPU
50028   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50029       $OPENJDK_TARGET_ADD_LP64 \
50030       -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50031 
50032   # Setup debug/release defines
50033   if test "x$DEBUG_LEVEL" = xrelease; then
50034     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50035     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50036       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50037     fi
50038   else
50039     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50040   fi
50041 
50042   # Set some additional per-OS defines.
50043   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50044     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50045     JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50046         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50047   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50048     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50049     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50050         -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50051   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50052     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50053     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50054     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50055     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50056         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50057         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50058         -fno-omit-frame-pointer"
50059   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50060     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50061     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50062     JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50063         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50064         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50065   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50066     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50067   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50068     JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50069     JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50070   fi
50071 
50072   # Set some additional per-CPU defines.
50073   if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50074     JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50075   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50076     JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50077   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50078     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50079       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50080       # fixes `relocation truncated to fit' error for gcc 4.1.
50081       JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50082       # Use ppc64 instructions, but schedule for power5
50083       JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50084     elif test "x$OPENJDK_TARGET_OS" = xaix; then
50085       JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50086     fi
50087   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50088     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50089       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50090       # Little endian machine uses ELFv2 ABI.
50091       JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50092       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50093       JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50094     fi
50095   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50096     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50097       JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50098     fi
50099   fi
50100 
50101   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50102     JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50103   fi
50104 
50105   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50106     if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50107       # Solaris does not have _LP64=1 in the old build.
50108       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50109       JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50110     fi
50111   fi
50112 
50113   # Set JVM_CFLAGS warning handling
50114   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50115     JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50116         -Wunused-value -Woverloaded-virtual"
50117 
50118     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50119 
50120 
50121 
50122 
50123 
50124 
50125 
50126 
50127 
50128 
50129 
50130 
50131 
50132 
50133 
50134 
50135 
50136 
50137 
50138 
50139 
50140 
50141 
50142 
50143 
50144 
50145 
50146 
50147 
50148 
50149 
50150 
50151 
50152 
50153 
50154 
50155 
50156 
50157 
50158 
50159 
50160 
50161 
50162 
50163 
50164 
50165 
50166 
50167 
50168 
50169 
50170 
50171 
50172 
50173     # Execute function body
50174 
50175   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50176   REFERENCE_VERSION=4.8
50177 
50178   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50179     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50180   fi
50181 
50182   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50183     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50184   fi
50185 
50186   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50187   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50188 
50189   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50190     :
50191 
50192             # These flags either do not work or give spurious warnings prior to gcc 4.8.
50193             JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50194 
50195 
50196   else
50197     :
50198 
50199   fi
50200 
50201 
50202 
50203 
50204 
50205 
50206 
50207 
50208 
50209 
50210 
50211 
50212 
50213 
50214     fi
50215     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50216       # Non-zero builds have stricter warnings
50217       JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50218     else
50219       if test "x$TOOLCHAIN_TYPE" = xclang; then
50220         # Some versions of llvm do not like -Wundef
50221         JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50222       fi
50223     fi
50224   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50225     JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50226         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50227   fi
50228 
50229   # Additional macosx handling
50230   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50231     # Setting these parameters makes it an error to link to macosx APIs that are
50232     # newer than the given OS version and makes the linked binaries compatible
50233     # even if built on a newer version of the OS.
50234     # The expected format is X.Y.Z
50235     MACOSX_VERSION_MIN=10.7.0
50236 
50237 
50238     # The macro takes the version with no dots, ex: 1070
50239     # Let the flags variables get resolved in make for easier override on make
50240     # command line.
50241     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50242     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50243   fi
50244 
50245   # Setup some hard coded includes
50246   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50247       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50248       -I${JDK_TOPDIR}/src/java.base/share/native/include \
50249       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50250       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50251       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50252       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50253 
50254   # The shared libraries are compiled using the picflag.
50255   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50256       $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50257   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50258       $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50259 
50260   # Executable flags
50261   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50262   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50263 
50264 
50265 
50266 
50267 
50268 
50269   # Setup LDFLAGS et al.
50270   #
50271 
50272   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50273     LDFLAGS_MICROSOFT="-nologo -opt:ref"
50274     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50275     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50276     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50277       LDFLAGS_SAFESH="-safeseh"
50278       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50279       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50280       # NOTE: Old build added -machine. Probably not needed.
50281       JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50282     else
50283       JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50284     fi
50285   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50286       JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50287       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50288         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50289         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50290     fi
50291   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50292     # If this is a --hash-style=gnu system, use --hash-style=both, why?
50293     # We have previously set HAS_GNU_HASH if this is the case
50294     if test -n "$HAS_GNU_HASH"; then
50295       LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50296       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50297       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50298     fi
50299       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50300         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50301     fi
50302     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50303       # And since we now know that the linker is gnu, then add -z defs, to forbid
50304       # undefined symbols in object files.
50305       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50306       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50307       JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50308       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50309       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50310       if test "x$OPENJDK_TARGET_CPU" = xx86; then
50311         JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50312       fi
50313       case $DEBUG_LEVEL in
50314         release )
50315           # tell linker to optimize libraries.
50316           # Should this be supplied to the OSS linker as well?
50317           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50318           LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50319           JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50320           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50321             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50322           fi
50323           ;;
50324         slowdebug )
50325           # Hotspot always let the linker optimize
50326           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50327           if test "x$HAS_LINKER_NOW" = "xtrue"; then
50328             # do relocations at load
50329             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50330             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50331             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50332           fi
50333           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50334             # mark relocations read only
50335             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50336             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50337             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50338           fi
50339           ;;
50340         fastdebug )
50341           # Hotspot always let the linker optimize
50342           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50343           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50344             # mark relocations read only
50345             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50346             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50347             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50348           fi
50349           ;;
50350         * )
50351           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50352           ;;
50353         esac
50354     fi
50355   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50356     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50357     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50358     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50359     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50360     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50361     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50362       JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50363     fi
50364   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50365     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50366     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50367     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50368   fi
50369 
50370   # Customize LDFLAGS for executables
50371 
50372   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50373 
50374   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50375     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50376       LDFLAGS_STACK_SIZE=1048576
50377     else
50378       LDFLAGS_STACK_SIZE=327680
50379     fi
50380     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50381   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50382     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50383   fi
50384 
50385   LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50386 
50387   # Customize LDFLAGS for libs
50388   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50389 
50390   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50391   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50392     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50393         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50394     JDKLIB_LIBS=""
50395   else
50396     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50397         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
50398 
50399     if test "xTARGET" = "xTARGET"; then
50400       # On some platforms (mac) the linker warns about non existing -L dirs.
50401       # For any of the variants server, client or minimal, the dir matches the
50402       # variant name. The "main" variant should be used for linking. For the
50403       # rest, the dir is just server.
50404       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50405           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50406         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50407             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
50408       else
50409         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50410             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50411       fi
50412     elif test "xTARGET" = "xBUILD"; then
50413       # When building a buildjdk, it's always only the server variant
50414       JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50415           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50416     fi
50417 
50418     JDKLIB_LIBS="-ljava -ljvm"
50419     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50420       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50421     fi
50422 
50423   fi
50424 
50425 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50426 
50427   # Set JVM_LIBS (per os)
50428   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50429     JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50430   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50431     # FIXME: This hard-coded path is not really proper.
50432     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50433       SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50434     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50435       SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50436     fi
50437     JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50438         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50439   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50440     JVM_LIBS="$JVM_LIBS -lm"
50441   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50442     JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50443   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50444     JVM_LIBS="$JVM_LIBS -lm"
50445   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50446     JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50447         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50448         wsock32.lib winmm.lib version.lib psapi.lib"
50449     fi
50450 
50451   # Set JVM_ASFLAGS
50452   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50453     if test "x$OPENJDK_TARGET_CPU" = xx86; then
50454       JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50455     fi
50456   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50457     JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50458   fi
50459 
50460   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50461 
50462 
50463 
50464 
50465 
50466 
50467 
50468 
50469 
50470 
50471 
50472 
50473 
50474 
50475 
50476   # Special extras...
50477   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50478     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50479       OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50480       OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50481     fi
50482     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50483     OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50484   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50485     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50486     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50487   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50488     OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50489 
50490 
50491 
50492 
50493 
50494 
50495 
50496 
50497 
50498 
50499 
50500 
50501 
50502 
50503 
50504 
50505 
50506 
50507 
50508 
50509 
50510 
50511 
50512 
50513 
50514 
50515 
50516 
50517 
50518 
50519 
50520 
50521 
50522 
50523 
50524 
50525 
50526 
50527 
50528 
50529 
50530 
50531     # Execute function body
50532 
50533   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50534 $as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50535   supports=yes
50536 
50537   saved_cxxflags="$CXXFLAGS"
50538   CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50539   ac_ext=cpp
50540 ac_cpp='$CXXCPP $CPPFLAGS'
50541 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50542 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50543 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50544 
50545   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50546 /* end confdefs.h.  */
50547 int i;
50548 _ACEOF
50549 if ac_fn_cxx_try_compile "$LINENO"; then :
50550 
50551 else
50552   supports=no
50553 fi
50554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50555   ac_ext=cpp
50556 ac_cpp='$CXXCPP $CPPFLAGS'
50557 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50558 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50559 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50560 
50561   CXXFLAGS="$saved_cxxflags"
50562 
50563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50564 $as_echo "$supports" >&6; }
50565   if test "x$supports" = "xyes" ; then
50566     :
50567 
50568   else
50569     :
50570     OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50571   fi
50572 
50573 
50574 
50575 
50576 
50577 
50578 
50579 
50580 
50581 
50582 
50583 
50584     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50585     OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50586 
50587   fi
50588   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50589     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50590     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50591   fi
50592 
50593   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50594     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50595     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50596   fi
50597 
50598   OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50599   OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50600   OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50601 
50602   ###############################################################################
50603   #
50604   # Now setup the CFLAGS and LDFLAGS for the JDK build.
50605   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50606   #
50607 
50608   # Setup compiler/platform specific flags into
50609   #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50610   #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50611   #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50612   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50613     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50614     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50615     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50616     if test "x$OPENJDK_BUILD_CPU" = xx86; then
50617       # Force compatibility with i586 on 32 bit intel platforms.
50618       OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50619       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50620     fi
50621     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50622         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50623     case $OPENJDK_BUILD_CPU_ARCH in
50624       arm )
50625         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50626         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50627         ;;
50628       ppc )
50629         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50630         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50631         ;;
50632       s390 )
50633         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50634         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50635         ;;
50636       * )
50637         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50638         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50639         ;;
50640     esac
50641 
50642 
50643 
50644 
50645 
50646 
50647 
50648 
50649 
50650 
50651 
50652 
50653 
50654 
50655 
50656 
50657 
50658 
50659 
50660 
50661 
50662 
50663 
50664 
50665 
50666 
50667 
50668 
50669 
50670 
50671 
50672 
50673 
50674 
50675 
50676 
50677 
50678 
50679 
50680 
50681 
50682 
50683 
50684 
50685 
50686 
50687 
50688 
50689 
50690 
50691 
50692 
50693 
50694 
50695     # Execute function body
50696 
50697   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50698   REFERENCE_VERSION=6
50699 
50700   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50701     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50702   fi
50703 
50704   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50705     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50706   fi
50707 
50708   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50709   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50710 
50711   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50712     :
50713 
50714   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50715   # runs afoul of the more aggressive versions of these optimisations.
50716   # Notably, value range propagation now assumes that the this pointer of C++
50717   # member functions is non-null.
50718   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50719         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50720         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50721 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50722   OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50723   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50724 
50725   else
50726     :
50727 
50728   fi
50729 
50730 
50731 
50732 
50733 
50734 
50735 
50736 
50737 
50738 
50739 
50740 
50741 
50742 
50743   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50744     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50745 
50746     # Restrict the debug information created by Clang to avoid
50747     # too big object files and speed the build up a little bit
50748     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50749     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50750     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50751       if test "x$OPENJDK_BUILD_CPU" = xx86; then
50752         # Force compatibility with i586 on 32 bit intel platforms.
50753         OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50754         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50755       fi
50756       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50757       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50758           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50759       case $OPENJDK_BUILD_CPU_ARCH in
50760         ppc )
50761           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50762           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50763           ;;
50764         * )
50765           OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50766           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50767           ;;
50768       esac
50769     fi
50770   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50771     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50772     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50773     if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50774       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50775     fi
50776 
50777     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50778     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50779   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50780     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50781     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50782     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50783   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50784     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50785         -MD -Zc:wchar_t- -W3 -wd4800 \
50786         -DWIN32_LEAN_AND_MEAN \
50787         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50788         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50789         -DWIN32 -DIAL"
50790     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50791       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50792     else
50793       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50794     fi
50795     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50796     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50797     # studio.
50798     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50799       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50800       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50801       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50802     fi
50803   fi
50804 
50805   ###############################################################################
50806 
50807   # Adjust flags according to debug level.
50808   case $DEBUG_LEVEL in
50809     fastdebug | slowdebug )
50810       OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50811       OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50812       ;;
50813     release )
50814       ;;
50815     * )
50816       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50817       ;;
50818   esac
50819 
50820   # Set some common defines. These works for all compilers, but assume
50821   # -D is universally accepted.
50822 
50823   # Setup endianness
50824   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50825     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50826     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50827     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50828     #   Note: -Dmacro         is the same as    #define macro 1
50829     #         -Dmacro=        is the same as    #define macro
50830     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50831       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50832     else
50833       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50834     fi
50835   else
50836     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50837     # are defined in the system?
50838     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50839       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50840     else
50841       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50842     fi
50843   fi
50844 
50845   # Setup target OS define. Use OS target name but in upper case.
50846   OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50847   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50848 
50849   # Setup target CPU
50850   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50851       $OPENJDK_BUILD_ADD_LP64 \
50852       -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50853 
50854   # Setup debug/release defines
50855   if test "x$DEBUG_LEVEL" = xrelease; then
50856     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50857     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50858       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50859     fi
50860   else
50861     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50862   fi
50863 
50864   # Set some additional per-OS defines.
50865   if test "x$OPENJDK_BUILD_OS" = xlinux; then
50866     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50867     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50868         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50869   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50870     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50871     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50872         -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50873   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50874     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50875     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50876     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50877     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50878         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50879         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50880         -fno-omit-frame-pointer"
50881   elif test "x$OPENJDK_BUILD_OS" = xaix; then
50882     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50883     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50884     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50885         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50886         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50887   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50888     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50889   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50890     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50891     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50892   fi
50893 
50894   # Set some additional per-CPU defines.
50895   if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50896     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50897   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50898     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50899   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50900     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50901       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50902       # fixes `relocation truncated to fit' error for gcc 4.1.
50903       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50904       # Use ppc64 instructions, but schedule for power5
50905       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50906     elif test "x$OPENJDK_BUILD_OS" = xaix; then
50907       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50908     fi
50909   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50910     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50911       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50912       # Little endian machine uses ELFv2 ABI.
50913       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50914       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50915       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
50916     fi
50917   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
50918     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50919       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
50920     fi
50921   fi
50922 
50923   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50924     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50925   fi
50926 
50927   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50928     if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50929       # Solaris does not have _LP64=1 in the old build.
50930       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50931       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50932     fi
50933   fi
50934 
50935   # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50936   if test "x$OPENJDK_BUILD_OS" = xlinux; then
50937     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50938         -Wunused-value -Woverloaded-virtual"
50939 
50940     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50941 
50942 
50943 
50944 
50945 
50946 
50947 
50948 
50949 
50950 
50951 
50952 
50953 
50954 
50955 
50956 
50957 
50958 
50959 
50960 
50961 
50962 
50963 
50964 
50965 
50966 
50967 
50968 
50969 
50970 
50971 
50972 
50973 
50974 
50975 
50976 
50977 
50978 
50979 
50980 
50981 
50982 
50983 
50984 
50985 
50986 
50987 
50988 
50989 
50990 
50991 
50992 
50993 
50994 
50995     # Execute function body
50996 
50997   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50998   REFERENCE_VERSION=4.8
50999 
51000   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51001     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51002   fi
51003 
51004   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51005     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51006   fi
51007 
51008   # Version comparison method inspired by http://stackoverflow.com/a/24067243
51009   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51010 
51011   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51012     :
51013 
51014             # These flags either do not work or give spurious warnings prior to gcc 4.8.
51015             OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51016 
51017 
51018   else
51019     :
51020 
51021   fi
51022 
51023 
51024 
51025 
51026 
51027 
51028 
51029 
51030 
51031 
51032 
51033 
51034 
51035 
51036     fi
51037     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51038       # Non-zero builds have stricter warnings
51039       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51040     else
51041       if test "x$TOOLCHAIN_TYPE" = xclang; then
51042         # Some versions of llvm do not like -Wundef
51043         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51044       fi
51045     fi
51046   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51047     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51048         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51049   fi
51050 
51051   # Additional macosx handling
51052   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51053     # Setting these parameters makes it an error to link to macosx APIs that are
51054     # newer than the given OS version and makes the linked binaries compatible
51055     # even if built on a newer version of the OS.
51056     # The expected format is X.Y.Z
51057     MACOSX_VERSION_MIN=10.7.0
51058 
51059 
51060     # The macro takes the version with no dots, ex: 1070
51061     # Let the flags variables get resolved in make for easier override on make
51062     # command line.
51063     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51064     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51065   fi
51066 
51067   # Setup some hard coded includes
51068   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51069       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51070       -I${JDK_TOPDIR}/src/java.base/share/native/include \
51071       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51072       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51073       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51074       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51075 
51076   # The shared libraries are compiled using the picflag.
51077   OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51078       $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51079   OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51080       $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51081 
51082   # Executable flags
51083   OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51084   OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51085 
51086 
51087 
51088 
51089 
51090 
51091   # Setup LDFLAGS et al.
51092   #
51093 
51094   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51095     LDFLAGS_MICROSOFT="-nologo -opt:ref"
51096     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51097     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51098     if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51099       LDFLAGS_SAFESH="-safeseh"
51100       OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51101       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51102       # NOTE: Old build added -machine. Probably not needed.
51103       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51104     else
51105       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51106     fi
51107   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51108       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51109       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51110         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51111         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51112     fi
51113   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51114     # If this is a --hash-style=gnu system, use --hash-style=both, why?
51115     # We have previously set HAS_GNU_HASH if this is the case
51116     if test -n "$HAS_GNU_HASH"; then
51117       OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51118       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51119       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51120     fi
51121       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51122         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51123     fi
51124     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51125       # And since we now know that the linker is gnu, then add -z defs, to forbid
51126       # undefined symbols in object files.
51127       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51128       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51129       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51130       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51131       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51132       if test "x$OPENJDK_BUILD_CPU" = xx86; then
51133         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51134       fi
51135       case $DEBUG_LEVEL in
51136         release )
51137           # tell linker to optimize libraries.
51138           # Should this be supplied to the OSS linker as well?
51139           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51140           OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51141           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51142           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51143             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51144           fi
51145           ;;
51146         slowdebug )
51147           # Hotspot always let the linker optimize
51148           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51149           if test "x$HAS_LINKER_NOW" = "xtrue"; then
51150             # do relocations at load
51151             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51152             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51153             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51154           fi
51155           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51156             # mark relocations read only
51157             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51158             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51159             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51160           fi
51161           ;;
51162         fastdebug )
51163           # Hotspot always let the linker optimize
51164           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51165           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51166             # mark relocations read only
51167             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51168             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51169             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51170           fi
51171           ;;
51172         * )
51173           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51174           ;;
51175         esac
51176     fi
51177   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51178     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51179     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51180     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51181     OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51182     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51183     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51184       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51185     fi
51186   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51187     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51188     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51189     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51190   fi
51191 
51192   # Customize LDFLAGS for executables
51193 
51194   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51195 
51196   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51197     if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51198       LDFLAGS_STACK_SIZE=1048576
51199     else
51200       LDFLAGS_STACK_SIZE=327680
51201     fi
51202     OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51203   elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51204     OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51205   fi
51206 
51207   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51208 
51209   # Customize LDFLAGS for libs
51210   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51211 
51212   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51213   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51214     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51215         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51216     OPENJDK_BUILD_JDKLIB_LIBS=""
51217   else
51218     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51219         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51220 
51221     if test "xBUILD" = "xTARGET"; then
51222       # On some platforms (mac) the linker warns about non existing -L dirs.
51223       # For any of the variants server, client or minimal, the dir matches the
51224       # variant name. The "main" variant should be used for linking. For the
51225       # rest, the dir is just server.
51226       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51227           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51228         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51229             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51230       else
51231         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51232             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51233       fi
51234     elif test "xBUILD" = "xBUILD"; then
51235       # When building a buildjdk, it's always only the server variant
51236       OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51237           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51238     fi
51239 
51240     OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51241     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51242       OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51243     fi
51244 
51245   fi
51246 
51247 OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51248 
51249   # Set OPENJDK_BUILD_JVM_LIBS (per os)
51250   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51251     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51252   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51253     # FIXME: This hard-coded path is not really proper.
51254     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51255       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51256     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51257       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51258     fi
51259     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51260         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51261   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51262     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51263   elif test "x$OPENJDK_BUILD_OS" = xaix; then
51264     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51265   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51266     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51267   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51268     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51269         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51270         wsock32.lib winmm.lib version.lib psapi.lib"
51271     fi
51272 
51273   # Set OPENJDK_BUILD_JVM_ASFLAGS
51274   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51275     if test "x$OPENJDK_BUILD_CPU" = xx86; then
51276       OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51277     fi
51278   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51279     OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51280   fi
51281 
51282   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51283 
51284 
51285 
51286 
51287 
51288 
51289 
51290 
51291 
51292 
51293 
51294 
51295 
51296 
51297 
51298   # Tests are only ever compiled for TARGET
51299   # Flags for compiling test libraries
51300   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51301   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51302 
51303   # Flags for compiling test executables
51304   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51305   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51306 
51307 
51308 
51309 
51310 
51311 
51312   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51313   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51314 
51315 
51316 
51317 
51318 
51319 
51320   # Some Zero and Shark settings.
51321   # ZERO_ARCHFLAG tells the compiler which mode to build for
51322   case "${OPENJDK_TARGET_CPU}" in
51323     s390)
51324       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51325       ;;
51326     *)
51327       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51328   esac
51329 
51330 
51331 
51332 
51333 
51334 
51335 
51336 
51337 
51338 
51339 
51340 
51341 
51342 
51343 
51344 
51345 
51346 
51347 
51348 
51349 
51350 
51351 
51352 
51353 
51354 
51355 
51356 
51357 
51358 
51359 
51360 
51361 
51362 
51363 
51364 
51365 
51366 
51367 
51368 
51369 
51370 
51371     # Execute function body
51372 
51373 
51374 
51375 
51376 
51377 
51378 
51379 
51380 
51381 
51382 
51383 
51384 
51385 
51386 
51387 
51388 
51389 
51390 
51391 
51392 
51393 
51394 
51395 
51396 
51397 
51398 
51399 
51400 
51401 
51402 
51403 
51404 
51405 
51406 
51407 
51408 
51409 
51410 
51411 
51412 
51413 
51414 
51415 
51416 
51417 
51418 
51419 
51420     # Execute function body
51421 
51422   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51423 $as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51424   supports=yes
51425 
51426   saved_cflags="$CFLAGS"
51427   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51428   ac_ext=c
51429 ac_cpp='$CPP $CPPFLAGS'
51430 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51431 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51432 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51433 
51434   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51435 /* end confdefs.h.  */
51436 int i;
51437 _ACEOF
51438 if ac_fn_c_try_compile "$LINENO"; then :
51439 
51440 else
51441   supports=no
51442 fi
51443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51444   ac_ext=cpp
51445 ac_cpp='$CXXCPP $CPPFLAGS'
51446 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51447 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51448 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51449 
51450   CFLAGS="$saved_cflags"
51451 
51452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51453 $as_echo "$supports" >&6; }
51454   if test "x$supports" = "xyes" ; then
51455     :
51456     C_COMP_SUPPORTS="yes"
51457   else
51458     :
51459     C_COMP_SUPPORTS="no"
51460   fi
51461 
51462 
51463 
51464 
51465 
51466 
51467 
51468 
51469 
51470 
51471 
51472 
51473 
51474 
51475 
51476 
51477 
51478 
51479 
51480 
51481 
51482 
51483 
51484 
51485 
51486 
51487 
51488 
51489 
51490 
51491 
51492 
51493 
51494 
51495 
51496 
51497 
51498 
51499 
51500 
51501 
51502 
51503 
51504 
51505 
51506 
51507 
51508 
51509 
51510 
51511 
51512 
51513 
51514 
51515 
51516 
51517 
51518 
51519 
51520     # Execute function body
51521 
51522   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51523 $as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51524   supports=yes
51525 
51526   saved_cxxflags="$CXXFLAGS"
51527   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51528   ac_ext=cpp
51529 ac_cpp='$CXXCPP $CPPFLAGS'
51530 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51531 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51532 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51533 
51534   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51535 /* end confdefs.h.  */
51536 int i;
51537 _ACEOF
51538 if ac_fn_cxx_try_compile "$LINENO"; then :
51539 
51540 else
51541   supports=no
51542 fi
51543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51544   ac_ext=cpp
51545 ac_cpp='$CXXCPP $CPPFLAGS'
51546 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51547 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51548 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51549 
51550   CXXFLAGS="$saved_cxxflags"
51551 
51552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51553 $as_echo "$supports" >&6; }
51554   if test "x$supports" = "xyes" ; then
51555     :
51556     CXX_COMP_SUPPORTS="yes"
51557   else
51558     :
51559     CXX_COMP_SUPPORTS="no"
51560   fi
51561 
51562 
51563 
51564 
51565 
51566 
51567 
51568 
51569 
51570 
51571 
51572 
51573 
51574   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51575 $as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51576   supports=no
51577   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51578 
51579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51580 $as_echo "$supports" >&6; }
51581   if test "x$supports" = "xyes" ; then
51582     :
51583 
51584   else
51585     :
51586     ZERO_ARCHFLAG=""
51587   fi
51588 
51589 
51590 
51591 
51592 
51593 
51594 
51595 
51596   # Check that the compiler supports -mX (or -qX on AIX) flags
51597   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51598 
51599 
51600 
51601 
51602 
51603 
51604 
51605 
51606 
51607 
51608 
51609 
51610 
51611 
51612 
51613 
51614 
51615 
51616 
51617 
51618 
51619 
51620 
51621 
51622 
51623 
51624 
51625 
51626 
51627 
51628 
51629 
51630 
51631 
51632 
51633 
51634 
51635 
51636 
51637 
51638 
51639 
51640 
51641 
51642 
51643 
51644 
51645     # Execute function body
51646 
51647 
51648 
51649 
51650 
51651 
51652 
51653 
51654 
51655 
51656 
51657 
51658 
51659 
51660 
51661 
51662 
51663 
51664 
51665 
51666 
51667 
51668 
51669 
51670 
51671 
51672 
51673 
51674 
51675 
51676 
51677 
51678 
51679 
51680 
51681 
51682 
51683 
51684 
51685 
51686 
51687 
51688 
51689 
51690 
51691 
51692 
51693 
51694     # Execute function body
51695 
51696   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51697 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51698   supports=yes
51699 
51700   saved_cflags="$CFLAGS"
51701   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51702   ac_ext=c
51703 ac_cpp='$CPP $CPPFLAGS'
51704 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51705 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51706 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51707 
51708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51709 /* end confdefs.h.  */
51710 int i;
51711 _ACEOF
51712 if ac_fn_c_try_compile "$LINENO"; then :
51713 
51714 else
51715   supports=no
51716 fi
51717 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51718   ac_ext=cpp
51719 ac_cpp='$CXXCPP $CPPFLAGS'
51720 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51721 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51722 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51723 
51724   CFLAGS="$saved_cflags"
51725 
51726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51727 $as_echo "$supports" >&6; }
51728   if test "x$supports" = "xyes" ; then
51729     :
51730     C_COMP_SUPPORTS="yes"
51731   else
51732     :
51733     C_COMP_SUPPORTS="no"
51734   fi
51735 
51736 
51737 
51738 
51739 
51740 
51741 
51742 
51743 
51744 
51745 
51746 
51747 
51748 
51749 
51750 
51751 
51752 
51753 
51754 
51755 
51756 
51757 
51758 
51759 
51760 
51761 
51762 
51763 
51764 
51765 
51766 
51767 
51768 
51769 
51770 
51771 
51772 
51773 
51774 
51775 
51776 
51777 
51778 
51779 
51780 
51781 
51782 
51783 
51784 
51785 
51786 
51787 
51788 
51789 
51790 
51791 
51792 
51793 
51794     # Execute function body
51795 
51796   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51797 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51798   supports=yes
51799 
51800   saved_cxxflags="$CXXFLAGS"
51801   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51802   ac_ext=cpp
51803 ac_cpp='$CXXCPP $CPPFLAGS'
51804 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51805 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51806 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51807 
51808   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51809 /* end confdefs.h.  */
51810 int i;
51811 _ACEOF
51812 if ac_fn_cxx_try_compile "$LINENO"; then :
51813 
51814 else
51815   supports=no
51816 fi
51817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51818   ac_ext=cpp
51819 ac_cpp='$CXXCPP $CPPFLAGS'
51820 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51821 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51822 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51823 
51824   CXXFLAGS="$saved_cxxflags"
51825 
51826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51827 $as_echo "$supports" >&6; }
51828   if test "x$supports" = "xyes" ; then
51829     :
51830     CXX_COMP_SUPPORTS="yes"
51831   else
51832     :
51833     CXX_COMP_SUPPORTS="no"
51834   fi
51835 
51836 
51837 
51838 
51839 
51840 
51841 
51842 
51843 
51844 
51845 
51846 
51847 
51848   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51849 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51850   supports=no
51851   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51852 
51853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51854 $as_echo "$supports" >&6; }
51855   if test "x$supports" = "xyes" ; then
51856     :
51857     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51858   else
51859     :
51860     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51861   fi
51862 
51863 
51864 
51865 
51866 
51867 
51868 
51869 
51870   # Check whether --enable-warnings-as-errors was given.
51871 if test "${enable_warnings_as_errors+set}" = set; then :
51872   enableval=$enable_warnings_as_errors;
51873 fi
51874 
51875 
51876   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51877 $as_echo_n "checking if native warnings are errors... " >&6; }
51878   if test "x$enable_warnings_as_errors" = "xyes"; then
51879     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
51880 $as_echo "yes (explicitly set)" >&6; }
51881     WARNINGS_AS_ERRORS=true
51882   elif test "x$enable_warnings_as_errors" = "xno"; then
51883     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51884 $as_echo "no" >&6; }
51885     WARNINGS_AS_ERRORS=false
51886   elif test "x$enable_warnings_as_errors" = "x"; then
51887     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51888 $as_echo "yes (default)" >&6; }
51889     WARNINGS_AS_ERRORS=true
51890   else
51891     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51892   fi
51893 
51894   if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51895     # Set legacy hotspot variable
51896     HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51897   else
51898     HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51899   fi
51900 
51901 
51902 
51903 
51904   case "${TOOLCHAIN_TYPE}" in
51905     microsoft)
51906       DISABLE_WARNING_PREFIX="-wd"
51907       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51908       ;;
51909     solstudio)
51910       DISABLE_WARNING_PREFIX="-erroff="
51911       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51912       ;;
51913     gcc)
51914       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51915 
51916 
51917 
51918 
51919 
51920 
51921 
51922 
51923 
51924 
51925 
51926 
51927 
51928 
51929 
51930 
51931 
51932 
51933 
51934 
51935 
51936 
51937 
51938 
51939 
51940 
51941 
51942 
51943 
51944 
51945 
51946 
51947 
51948 
51949 
51950 
51951 
51952 
51953 
51954 
51955 
51956 
51957 
51958 
51959 
51960 
51961 
51962     # Execute function body
51963 
51964 
51965 
51966 
51967 
51968 
51969 
51970 
51971 
51972 
51973 
51974 
51975 
51976 
51977 
51978 
51979 
51980 
51981 
51982 
51983 
51984 
51985 
51986 
51987 
51988 
51989 
51990 
51991 
51992 
51993 
51994 
51995 
51996 
51997 
51998 
51999 
52000 
52001 
52002 
52003 
52004 
52005 
52006 
52007 
52008 
52009 
52010 
52011     # Execute function body
52012 
52013   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52014 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52015   supports=yes
52016 
52017   saved_cflags="$CFLAGS"
52018   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52019   ac_ext=c
52020 ac_cpp='$CPP $CPPFLAGS'
52021 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52022 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52023 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52024 
52025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52026 /* end confdefs.h.  */
52027 int i;
52028 _ACEOF
52029 if ac_fn_c_try_compile "$LINENO"; then :
52030 
52031 else
52032   supports=no
52033 fi
52034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52035   ac_ext=cpp
52036 ac_cpp='$CXXCPP $CPPFLAGS'
52037 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52038 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52039 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52040 
52041   CFLAGS="$saved_cflags"
52042 
52043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52044 $as_echo "$supports" >&6; }
52045   if test "x$supports" = "xyes" ; then
52046     :
52047     C_COMP_SUPPORTS="yes"
52048   else
52049     :
52050     C_COMP_SUPPORTS="no"
52051   fi
52052 
52053 
52054 
52055 
52056 
52057 
52058 
52059 
52060 
52061 
52062 
52063 
52064 
52065 
52066 
52067 
52068 
52069 
52070 
52071 
52072 
52073 
52074 
52075 
52076 
52077 
52078 
52079 
52080 
52081 
52082 
52083 
52084 
52085 
52086 
52087 
52088 
52089 
52090 
52091 
52092 
52093 
52094 
52095 
52096 
52097 
52098 
52099 
52100 
52101 
52102 
52103 
52104 
52105 
52106 
52107 
52108 
52109 
52110 
52111     # Execute function body
52112 
52113   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52114 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52115   supports=yes
52116 
52117   saved_cxxflags="$CXXFLAGS"
52118   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52119   ac_ext=cpp
52120 ac_cpp='$CXXCPP $CPPFLAGS'
52121 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52122 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52123 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52124 
52125   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52126 /* end confdefs.h.  */
52127 int i;
52128 _ACEOF
52129 if ac_fn_cxx_try_compile "$LINENO"; then :
52130 
52131 else
52132   supports=no
52133 fi
52134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52135   ac_ext=cpp
52136 ac_cpp='$CXXCPP $CPPFLAGS'
52137 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52138 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52139 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52140 
52141   CXXFLAGS="$saved_cxxflags"
52142 
52143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52144 $as_echo "$supports" >&6; }
52145   if test "x$supports" = "xyes" ; then
52146     :
52147     CXX_COMP_SUPPORTS="yes"
52148   else
52149     :
52150     CXX_COMP_SUPPORTS="no"
52151   fi
52152 
52153 
52154 
52155 
52156 
52157 
52158 
52159 
52160 
52161 
52162 
52163 
52164 
52165   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52166 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52167   supports=no
52168   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52169 
52170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52171 $as_echo "$supports" >&6; }
52172   if test "x$supports" = "xyes" ; then
52173     :
52174     GCC_CAN_DISABLE_WARNINGS=true
52175   else
52176     :
52177     GCC_CAN_DISABLE_WARNINGS=false
52178 
52179   fi
52180 
52181 
52182 
52183 
52184 
52185 
52186       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52187         DISABLE_WARNING_PREFIX="-Wno-"
52188       else
52189         DISABLE_WARNING_PREFIX=
52190       fi
52191       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52192       # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52193       # CFLAGS since any target specific flags will likely not work with the
52194       # build compiler
52195       CC_OLD="$CC"
52196       CXX_OLD="$CXX"
52197       CC="$BUILD_CC"
52198       CXX="$BUILD_CXX"
52199       CFLAGS_OLD="$CFLAGS"
52200       CFLAGS=""
52201 
52202 
52203 
52204 
52205 
52206 
52207 
52208 
52209 
52210 
52211 
52212 
52213 
52214 
52215 
52216 
52217 
52218 
52219 
52220 
52221 
52222 
52223 
52224 
52225 
52226 
52227 
52228 
52229 
52230 
52231 
52232 
52233 
52234 
52235 
52236 
52237 
52238 
52239 
52240 
52241 
52242 
52243 
52244 
52245 
52246 
52247 
52248     # Execute function body
52249 
52250 
52251 
52252 
52253 
52254 
52255 
52256 
52257 
52258 
52259 
52260 
52261 
52262 
52263 
52264 
52265 
52266 
52267 
52268 
52269 
52270 
52271 
52272 
52273 
52274 
52275 
52276 
52277 
52278 
52279 
52280 
52281 
52282 
52283 
52284 
52285 
52286 
52287 
52288 
52289 
52290 
52291 
52292 
52293 
52294 
52295 
52296 
52297     # Execute function body
52298 
52299   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52300 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52301   supports=yes
52302 
52303   saved_cflags="$CFLAGS"
52304   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52305   ac_ext=c
52306 ac_cpp='$CPP $CPPFLAGS'
52307 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52308 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52309 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52310 
52311   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52312 /* end confdefs.h.  */
52313 int i;
52314 _ACEOF
52315 if ac_fn_c_try_compile "$LINENO"; then :
52316 
52317 else
52318   supports=no
52319 fi
52320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52321   ac_ext=cpp
52322 ac_cpp='$CXXCPP $CPPFLAGS'
52323 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52324 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52325 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52326 
52327   CFLAGS="$saved_cflags"
52328 
52329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52330 $as_echo "$supports" >&6; }
52331   if test "x$supports" = "xyes" ; then
52332     :
52333     C_COMP_SUPPORTS="yes"
52334   else
52335     :
52336     C_COMP_SUPPORTS="no"
52337   fi
52338 
52339 
52340 
52341 
52342 
52343 
52344 
52345 
52346 
52347 
52348 
52349 
52350 
52351 
52352 
52353 
52354 
52355 
52356 
52357 
52358 
52359 
52360 
52361 
52362 
52363 
52364 
52365 
52366 
52367 
52368 
52369 
52370 
52371 
52372 
52373 
52374 
52375 
52376 
52377 
52378 
52379 
52380 
52381 
52382 
52383 
52384 
52385 
52386 
52387 
52388 
52389 
52390 
52391 
52392 
52393 
52394 
52395 
52396 
52397     # Execute function body
52398 
52399   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52400 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52401   supports=yes
52402 
52403   saved_cxxflags="$CXXFLAGS"
52404   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52405   ac_ext=cpp
52406 ac_cpp='$CXXCPP $CPPFLAGS'
52407 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52408 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52409 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52410 
52411   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52412 /* end confdefs.h.  */
52413 int i;
52414 _ACEOF
52415 if ac_fn_cxx_try_compile "$LINENO"; then :
52416 
52417 else
52418   supports=no
52419 fi
52420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52421   ac_ext=cpp
52422 ac_cpp='$CXXCPP $CPPFLAGS'
52423 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52424 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52425 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52426 
52427   CXXFLAGS="$saved_cxxflags"
52428 
52429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52430 $as_echo "$supports" >&6; }
52431   if test "x$supports" = "xyes" ; then
52432     :
52433     CXX_COMP_SUPPORTS="yes"
52434   else
52435     :
52436     CXX_COMP_SUPPORTS="no"
52437   fi
52438 
52439 
52440 
52441 
52442 
52443 
52444 
52445 
52446 
52447 
52448 
52449 
52450 
52451   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52452 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52453   supports=no
52454   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52455 
52456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52457 $as_echo "$supports" >&6; }
52458   if test "x$supports" = "xyes" ; then
52459     :
52460     BUILD_CC_CAN_DISABLE_WARNINGS=true
52461   else
52462     :
52463     BUILD_CC_CAN_DISABLE_WARNINGS=false
52464 
52465   fi
52466 
52467 
52468 
52469 
52470 
52471 
52472       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52473         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52474       else
52475         BUILD_CC_DISABLE_WARNING_PREFIX=
52476       fi
52477       CC="$CC_OLD"
52478       CXX="$CXX_OLD"
52479       CFLAGS="$CFLAGS_OLD"
52480       ;;
52481     clang)
52482       DISABLE_WARNING_PREFIX="-Wno-"
52483       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52484       ;;
52485     xlc)
52486       DISABLE_WARNING_PREFIX="-qsuppress="
52487       CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52488       ;;
52489   esac
52490 
52491 
52492 
52493 
52494 
52495 # Setup debug symbols (need objcopy from the toolchain for that)
52496 
52497   #
52498   # NATIVE_DEBUG_SYMBOLS
52499   # This must be done after the toolchain is setup, since we're looking at objcopy.
52500   #
52501   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52502 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
52503 
52504 # Check whether --with-native-debug-symbols was given.
52505 if test "${with_native_debug_symbols+set}" = set; then :
52506   withval=$with_native_debug_symbols;
52507         if test "x$OPENJDK_TARGET_OS" = xaix; then
52508           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52509             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52510           fi
52511         fi
52512 
52513 else
52514 
52515         if test "x$OPENJDK_TARGET_OS" = xaix; then
52516           # AIX doesn't support 'zipped' so use 'internal' as default
52517           with_native_debug_symbols="internal"
52518         else
52519           if test "x$STATIC_BUILD" = xtrue; then
52520             with_native_debug_symbols="none"
52521           else
52522             with_native_debug_symbols="zipped"
52523           fi
52524         fi
52525 
52526 fi
52527 
52528   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52530 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52531 
52532   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52533 
52534     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52535       if test "x$OBJCOPY" = x; then
52536         # enabling of enable-debug-symbols and can't find objcopy
52537         # this is an error
52538         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52539       fi
52540     fi
52541 
52542     COMPILE_WITH_DEBUG_SYMBOLS=true
52543     COPY_DEBUG_SYMBOLS=true
52544     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52545   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52546     COMPILE_WITH_DEBUG_SYMBOLS=false
52547     COPY_DEBUG_SYMBOLS=false
52548     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52549   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52550     COMPILE_WITH_DEBUG_SYMBOLS=true
52551     COPY_DEBUG_SYMBOLS=false
52552     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52553   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52554 
52555     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52556       if test "x$OBJCOPY" = x; then
52557         # enabling of enable-debug-symbols and can't find objcopy
52558         # this is an error
52559         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52560       fi
52561     fi
52562 
52563     COMPILE_WITH_DEBUG_SYMBOLS=true
52564     COPY_DEBUG_SYMBOLS=true
52565     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52566   else
52567     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52568   fi
52569 
52570   # --enable-debug-symbols is deprecated.
52571   # Please use --with-native-debug-symbols=[internal,external,zipped] .
52572 
52573   # Check whether --enable-debug-symbols was given.
52574 if test "${enable_debug_symbols+set}" = set; then :
52575   enableval=$enable_debug_symbols;
52576 fi
52577 
52578   if test "x$enable_debug_symbols" != x; then
52579     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52580 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52581 
52582     if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52583       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52584 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52585     fi
52586 
52587   fi
52588 
52589 
52590   # --enable-zip-debug-info is deprecated.
52591   # Please use --with-native-debug-symbols=zipped .
52592 
52593   # Check whether --enable-zip-debug-info was given.
52594 if test "${enable_zip_debug_info+set}" = set; then :
52595   enableval=$enable_zip_debug_info;
52596 fi
52597 
52598   if test "x$enable_zip_debug_info" != x; then
52599     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52600 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52601 
52602     if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52603       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52604 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52605     fi
52606 
52607   fi
52608 
52609 
52610 
52611 
52612 
52613 
52614 
52615   # Check whether --enable-native-coverage was given.
52616 if test "${enable_native_coverage+set}" = set; then :
52617   enableval=$enable_native_coverage;
52618 fi
52619 
52620   GCOV_ENABLED="false"
52621   if test "x$enable_native_coverage" = "xyes"; then
52622     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52623       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52624 $as_echo_n "checking if native coverage is enabled... " >&6; }
52625       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52626 $as_echo "yes" >&6; }
52627       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52628       GCOV_LDFLAGS="-fprofile-arcs"
52629       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52630       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52631       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52632       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52633       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52634       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52635       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52636       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52637       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52638       GCOV_ENABLED="true"
52639     else
52640       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52641     fi
52642   elif test "x$enable_native_coverage" = "xno"; then
52643     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52644 $as_echo_n "checking if native coverage is enabled... " >&6; }
52645     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52646 $as_echo "no" >&6; }
52647   elif test "x$enable_native_coverage" != "x"; then
52648     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52649   fi
52650 
52651 
52652 
52653 
52654 # Need toolchain to setup dtrace
52655 
52656   # Test for dtrace dependencies
52657   # Check whether --enable-dtrace was given.
52658 if test "${enable_dtrace+set}" = set; then :
52659   enableval=$enable_dtrace;
52660 fi
52661 
52662 
52663   DTRACE_DEP_MISSING=false
52664 
52665   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52666 $as_echo_n "checking for dtrace tool... " >&6; }
52667   if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52668     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52669 $as_echo "$DTRACE" >&6; }
52670   else
52671     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52672 $as_echo "not found, cannot build dtrace" >&6; }
52673     DTRACE_DEP_MISSING=true
52674   fi
52675 
52676   for ac_header in sys/sdt.h
52677 do :
52678   ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52679 if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52680   cat >>confdefs.h <<_ACEOF
52681 #define HAVE_SYS_SDT_H 1
52682 _ACEOF
52683  DTRACE_HEADERS_OK=yes
52684 else
52685   DTRACE_HEADERS_OK=no
52686 fi
52687 
52688 done
52689 
52690   if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52691     DTRACE_DEP_MISSING=true
52692   fi
52693 
52694   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52695 $as_echo_n "checking if dtrace should be built... " >&6; }
52696   if test "x$enable_dtrace" = "xyes"; then
52697     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52698       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52699 $as_echo "no, missing dependencies" >&6; }
52700 
52701   # Print a helpful message on how to acquire the necessary build dependency.
52702   # dtrace is the help tag: freetype, cups, alsa etc
52703   MISSING_DEPENDENCY=dtrace
52704 
52705   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52706     cygwin_help $MISSING_DEPENDENCY
52707   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52708     msys_help $MISSING_DEPENDENCY
52709   else
52710     PKGHANDLER_COMMAND=
52711 
52712     case $PKGHANDLER in
52713       apt-get)
52714         apt_help     $MISSING_DEPENDENCY ;;
52715       yum)
52716         yum_help     $MISSING_DEPENDENCY ;;
52717       port)
52718         port_help    $MISSING_DEPENDENCY ;;
52719       pkgutil)
52720         pkgutil_help $MISSING_DEPENDENCY ;;
52721       pkgadd)
52722         pkgadd_help  $MISSING_DEPENDENCY ;;
52723     esac
52724 
52725     if test "x$PKGHANDLER_COMMAND" != x; then
52726       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52727     fi
52728   fi
52729 
52730       as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52731     else
52732       INCLUDE_DTRACE=true
52733       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52734 $as_echo "yes, forced" >&6; }
52735     fi
52736   elif test "x$enable_dtrace" = "xno"; then
52737     INCLUDE_DTRACE=false
52738     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52739 $as_echo "no, forced" >&6; }
52740   elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52741     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52742       INCLUDE_DTRACE=false
52743       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52744 $as_echo "no, missing dependencies" >&6; }
52745     else
52746       INCLUDE_DTRACE=true
52747       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52748 $as_echo "yes, dependencies present" >&6; }
52749     fi
52750   else
52751     as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52752   fi
52753 
52754 
52755 
52756   # Check whether --enable-aot was given.
52757 if test "${enable_aot+set}" = set; then :
52758   enableval=$enable_aot;
52759 fi
52760 
52761 
52762   if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
52763     ENABLE_AOT="true"
52764   elif test "x$enable_aot" = "xyes"; then
52765     ENABLE_AOT="true"
52766   elif test "x$enable_aot" = "xno"; then
52767     ENABLE_AOT="false"
52768     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
52769 $as_echo_n "checking if aot should be enabled... " >&6; }
52770     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52771 $as_echo "no, forced" >&6; }
52772   else
52773     as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
52774   fi
52775 
52776   if test "x$ENABLE_AOT" = "xtrue"; then
52777     # Only enable AOT on linux-X64.
52778     if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
52779       if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
52780         if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then
52781           ENABLE_AOT="true"
52782         else
52783           ENABLE_AOT="false"
52784           if test "x$enable_aot" = "xyes"; then
52785             as_fn_error $? "Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
52786           fi
52787         fi
52788       else
52789         ENABLE_AOT="false"
52790         if test "x$enable_aot" = "xyes"; then
52791           as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
52792         fi
52793       fi
52794     else
52795       ENABLE_AOT="false"
52796       if test "x$enable_aot" = "xyes"; then
52797         as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
52798       fi
52799     fi
52800   fi
52801 
52802 
52803 
52804 
52805   # Check whether --enable-hotspot-gtest was given.
52806 if test "${enable_hotspot_gtest+set}" = set; then :
52807   enableval=$enable_hotspot_gtest;
52808 fi
52809 
52810 
52811   if test -e "$HOTSPOT_TOPDIR/test/native"; then
52812     GTEST_DIR_EXISTS="true"
52813   else
52814     GTEST_DIR_EXISTS="false"
52815   fi
52816 
52817   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52818 $as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52819   if test "x$enable_hotspot_gtest" = "xyes"; then
52820     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52821       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52822 $as_echo "yes, forced" >&6; }
52823       BUILD_GTEST="true"
52824     else
52825       as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52826     fi
52827   elif test "x$enable_hotspot_gtest" = "xno"; then
52828     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52829 $as_echo "no, forced" >&6; }
52830     BUILD_GTEST="false"
52831   elif test "x$enable_hotspot_gtest" = "x"; then
52832     if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52833       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52834 $as_echo "yes" >&6; }
52835       BUILD_GTEST="true"
52836     else
52837       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52838 $as_echo "no" >&6; }
52839       BUILD_GTEST="false"
52840     fi
52841   else
52842     as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52843   fi
52844 
52845 
52846 
52847 
52848 ###############################################################################
52849 #
52850 # Check dependencies for external and internal libraries.
52851 #
52852 ###############################################################################
52853 
52854 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52855 
52856   # When using cygwin or msys, we need a wrapper binary that renames
52857   # /cygdrive/c/ arguments into c:/ arguments and peeks into
52858   # @files and rewrites these too! This wrapper binary is
52859   # called fixpath.
52860   FIXPATH=
52861   if test "x$OPENJDK_BUILD_OS" = xwindows; then
52862     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52863 $as_echo_n "checking if fixpath can be created... " >&6; }
52864     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52865     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52866     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52867     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52868       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52869       FIXPATH="$FIXPATH_BIN -c"
52870     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52871       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52872       # @ was chosen as separator to minimize risk of other tools messing around with it
52873       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52874           | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52875       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52876       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52877     fi
52878     FIXPATH_SRC_W="$FIXPATH_SRC"
52879     FIXPATH_BIN_W="$FIXPATH_BIN"
52880 
52881   unix_path="$FIXPATH_SRC_W"
52882   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52883     windows_path=`$CYGPATH -m "$unix_path"`
52884     FIXPATH_SRC_W="$windows_path"
52885   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52886     windows_path=`cmd //c echo $unix_path`
52887     FIXPATH_SRC_W="$windows_path"
52888   fi
52889 
52890 
52891   unix_path="$FIXPATH_BIN_W"
52892   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52893     windows_path=`$CYGPATH -m "$unix_path"`
52894     FIXPATH_BIN_W="$windows_path"
52895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52896     windows_path=`cmd //c echo $unix_path`
52897     FIXPATH_BIN_W="$windows_path"
52898   fi
52899 
52900     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52901     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52902     cd $FIXPATH_DIR
52903     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52904     cd $CURDIR
52905 
52906     if test ! -x $FIXPATH_BIN; then
52907       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52908 $as_echo "no" >&6; }
52909       cat $FIXPATH_DIR/fixpath1.log
52910       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52911     fi
52912     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52913 $as_echo "yes" >&6; }
52914     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52915 $as_echo_n "checking if fixpath.exe works... " >&6; }
52916     cd $FIXPATH_DIR
52917     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52918         > $FIXPATH_DIR/fixpath2.log 2>&1
52919     cd $CURDIR
52920     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52921       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52922 $as_echo "no" >&6; }
52923       cat $FIXPATH_DIR/fixpath2.log
52924       as_fn_error $? "fixpath did not work!" "$LINENO" 5
52925     fi
52926     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52927 $as_echo "yes" >&6; }
52928 
52929     FIXPATH_DETACH_FLAG="--detach"
52930   fi
52931 
52932 
52933 
52934 
52935 
52936 
52937   # Check if X11 is needed
52938   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52939     # No X11 support on windows or macosx
52940     NEEDS_LIB_X11=false
52941   else
52942     # All other instances need X11, even if building headless only, libawt still
52943     # needs X11 headers.
52944     NEEDS_LIB_X11=true
52945   fi
52946 
52947   # Check if cups is needed
52948   if test "x$OPENJDK_TARGET_OS" = xwindows; then
52949     # Windows have a separate print system
52950     NEEDS_LIB_CUPS=false
52951   else
52952     NEEDS_LIB_CUPS=true
52953   fi
52954 
52955   # A custom hook may have set this already
52956   if test "x$NEEDS_LIB_FREETYPE" = "x"; then
52957     NEEDS_LIB_FREETYPE=true
52958   fi
52959 
52960   # Check if alsa is needed
52961   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52962     NEEDS_LIB_ALSA=true
52963   else
52964     NEEDS_LIB_ALSA=false
52965   fi
52966 
52967   # Check if ffi is needed
52968   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52969     NEEDS_LIB_FFI=true
52970   else
52971     NEEDS_LIB_FFI=false
52972   fi
52973 
52974 
52975   # statically link libstdc++ before C++ ABI is stablized on Linux unless
52976   # dynamic build is configured on command line.
52977 
52978 # Check whether --with-stdc++lib was given.
52979 if test "${with_stdc__lib+set}" = set; then :
52980   withval=$with_stdc__lib;
52981         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
52982                 && test "x$with_stdc__lib" != xdefault; then
52983           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
52984         fi
52985 
52986 else
52987   with_stdc__lib=default
52988 
52989 fi
52990 
52991 
52992   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52993     # Test if stdc++ can be linked statically.
52994     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
52995 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
52996     STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
52997     ac_ext=cpp
52998 ac_cpp='$CXXCPP $CPPFLAGS'
52999 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53000 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53001 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53002 
53003     OLD_LIBS="$LIBS"
53004     LIBS="$STATIC_STDCXX_FLAGS"
53005     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53006 /* end confdefs.h.  */
53007 
53008 int
53009 main ()
53010 {
53011 return 0;
53012   ;
53013   return 0;
53014 }
53015 _ACEOF
53016 if ac_fn_cxx_try_link "$LINENO"; then :
53017   has_static_libstdcxx=yes
53018 else
53019   has_static_libstdcxx=no
53020 fi
53021 rm -f core conftest.err conftest.$ac_objext \
53022     conftest$ac_exeext conftest.$ac_ext
53023     LIBS="$OLD_LIBS"
53024     ac_ext=cpp
53025 ac_cpp='$CXXCPP $CPPFLAGS'
53026 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53027 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53028 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53029 
53030     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53031 $as_echo "$has_static_libstdcxx" >&6; }
53032 
53033     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53034       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53035     fi
53036 
53037     # If dynamic was requested, it's available since it would fail above otherwise.
53038     # If dynamic wasn't requested, go with static unless it isn't available.
53039     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53040 $as_echo_n "checking how to link with libstdc++... " >&6; }
53041     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53042         ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53043       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53044 $as_echo "dynamic" >&6; }
53045     else
53046       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53047       JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53048       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53049       # just use the same setting as for the TARGET toolchain.
53050       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53051       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53052 $as_echo "static" >&6; }
53053     fi
53054   fi
53055 
53056   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53057   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53058     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53059   fi
53060 
53061 
53062 
53063   # Setup Windows runtime dlls
53064   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53065 
53066 
53067 # Check whether --with-msvcr-dll was given.
53068 if test "${with_msvcr_dll+set}" = set; then :
53069   withval=$with_msvcr_dll;
53070 fi
53071 
53072 
53073   if test "x$with_msvcr_dll" != x; then
53074     # If given explicitly by user, do not probe. If not present, fail directly.
53075 
53076   DLL_NAME="$MSVCR_NAME"
53077   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53078   METHOD="--with-msvcr-dll"
53079   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53080     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53081 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53082 
53083     # Need to check if the found msvcr is correct architecture
53084     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53085 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53086     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53087     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53088       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53089       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53090       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53091         CORRECT_MSVCR_ARCH="PE32 executable"
53092       else
53093         CORRECT_MSVCR_ARCH="PE32+ executable"
53094       fi
53095     else
53096       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53097         CORRECT_MSVCR_ARCH=386
53098       else
53099         CORRECT_MSVCR_ARCH=x86-64
53100       fi
53101     fi
53102     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53103       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53104 $as_echo "ok" >&6; }
53105       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53106 
53107   # Only process if variable expands to non-empty
53108 
53109   if test "x$MSVC_DLL" != x; then
53110     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53111 
53112   # Input might be given as Windows format, start by converting to
53113   # unix format.
53114   path="$MSVC_DLL"
53115   new_path=`$CYGPATH -u "$path"`
53116 
53117   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53118   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53119   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53120   # "foo.exe" is OK but "foo" is an error.
53121   #
53122   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53123   # It is also a way to make sure we got the proper file name for the real test later on.
53124   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53125   if test "x$test_shortpath" = x; then
53126     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53127 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53128     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53129   fi
53130 
53131   # Call helper function which possibly converts this using DOS-style short mode.
53132   # If so, the updated path is stored in $new_path.
53133 
53134   input_path="$new_path"
53135   # Check if we need to convert this using DOS-style short mode. If the path
53136   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53137   # take no chances and rewrite it.
53138   # Note: m4 eats our [], so we need to use [ and ] instead.
53139   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53140   if test "x$has_forbidden_chars" != x; then
53141     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53142     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53143     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53144     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53145       # Going to short mode and back again did indeed matter. Since short mode is
53146       # case insensitive, let's make it lowercase to improve readability.
53147       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53148       # Now convert it back to Unix-style (cygpath)
53149       input_path=`$CYGPATH -u "$shortmode_path"`
53150       new_path="$input_path"
53151     fi
53152   fi
53153 
53154   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53155   if test "x$test_cygdrive_prefix" = x; then
53156     # As a simple fix, exclude /usr/bin since it's not a real path.
53157     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53158       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53159       # a path prefixed by /cygdrive for fixpath to work.
53160       new_path="$CYGWIN_ROOT_PATH$input_path"
53161     fi
53162   fi
53163 
53164 
53165   if test "x$path" != "x$new_path"; then
53166     MSVC_DLL="$new_path"
53167     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53168 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53169   fi
53170 
53171     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53172 
53173   path="$MSVC_DLL"
53174   has_colon=`$ECHO $path | $GREP ^.:`
53175   new_path="$path"
53176   if test "x$has_colon" = x; then
53177     # Not in mixed or Windows style, start by that.
53178     new_path=`cmd //c echo $path`
53179   fi
53180 
53181 
53182   input_path="$new_path"
53183   # Check if we need to convert this using DOS-style short mode. If the path
53184   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53185   # take no chances and rewrite it.
53186   # Note: m4 eats our [], so we need to use [ and ] instead.
53187   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53188   if test "x$has_forbidden_chars" != x; then
53189     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53190     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53191   fi
53192 
53193 
53194   windows_path="$new_path"
53195   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53196     unix_path=`$CYGPATH -u "$windows_path"`
53197     new_path="$unix_path"
53198   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53199     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53200     new_path="$unix_path"
53201   fi
53202 
53203   if test "x$path" != "x$new_path"; then
53204     MSVC_DLL="$new_path"
53205     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53206 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53207   fi
53208 
53209   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53210   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53211 
53212     else
53213       # We're on a unix platform. Hooray! :)
53214       path="$MSVC_DLL"
53215       has_space=`$ECHO "$path" | $GREP " "`
53216       if test "x$has_space" != x; then
53217         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53218 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53219         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53220       fi
53221 
53222       # Use eval to expand a potential ~
53223       eval path="$path"
53224       if test ! -f "$path" && test ! -d "$path"; then
53225         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53226       fi
53227 
53228       if test -d "$path"; then
53229         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53230       else
53231         dir="`$DIRNAME "$path"`"
53232         base="`$BASENAME "$path"`"
53233         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53234       fi
53235     fi
53236   fi
53237 
53238       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53239 $as_echo_n "checking for $DLL_NAME... " >&6; }
53240       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53241 $as_echo "$MSVC_DLL" >&6; }
53242     else
53243       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53244 $as_echo "incorrect, ignoring" >&6; }
53245       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53246 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53247     fi
53248   fi
53249 
53250     if test "x$MSVC_DLL" = x; then
53251       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53252     fi
53253     MSVCR_DLL="$MSVC_DLL"
53254   elif test "x$DEVKIT_MSVCR_DLL" != x; then
53255 
53256   DLL_NAME="$MSVCR_NAME"
53257   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53258   METHOD="devkit"
53259   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53260     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53261 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53262 
53263     # Need to check if the found msvcr is correct architecture
53264     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53265 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53266     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53267     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53268       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53269       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53270       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53271         CORRECT_MSVCR_ARCH="PE32 executable"
53272       else
53273         CORRECT_MSVCR_ARCH="PE32+ executable"
53274       fi
53275     else
53276       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53277         CORRECT_MSVCR_ARCH=386
53278       else
53279         CORRECT_MSVCR_ARCH=x86-64
53280       fi
53281     fi
53282     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53283       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53284 $as_echo "ok" >&6; }
53285       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53286 
53287   # Only process if variable expands to non-empty
53288 
53289   if test "x$MSVC_DLL" != x; then
53290     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53291 
53292   # Input might be given as Windows format, start by converting to
53293   # unix format.
53294   path="$MSVC_DLL"
53295   new_path=`$CYGPATH -u "$path"`
53296 
53297   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53298   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53299   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53300   # "foo.exe" is OK but "foo" is an error.
53301   #
53302   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53303   # It is also a way to make sure we got the proper file name for the real test later on.
53304   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53305   if test "x$test_shortpath" = x; then
53306     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53307 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53308     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53309   fi
53310 
53311   # Call helper function which possibly converts this using DOS-style short mode.
53312   # If so, the updated path is stored in $new_path.
53313 
53314   input_path="$new_path"
53315   # Check if we need to convert this using DOS-style short mode. If the path
53316   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53317   # take no chances and rewrite it.
53318   # Note: m4 eats our [], so we need to use [ and ] instead.
53319   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53320   if test "x$has_forbidden_chars" != x; then
53321     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53322     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53323     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53324     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53325       # Going to short mode and back again did indeed matter. Since short mode is
53326       # case insensitive, let's make it lowercase to improve readability.
53327       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53328       # Now convert it back to Unix-style (cygpath)
53329       input_path=`$CYGPATH -u "$shortmode_path"`
53330       new_path="$input_path"
53331     fi
53332   fi
53333 
53334   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53335   if test "x$test_cygdrive_prefix" = x; then
53336     # As a simple fix, exclude /usr/bin since it's not a real path.
53337     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53338       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53339       # a path prefixed by /cygdrive for fixpath to work.
53340       new_path="$CYGWIN_ROOT_PATH$input_path"
53341     fi
53342   fi
53343 
53344 
53345   if test "x$path" != "x$new_path"; then
53346     MSVC_DLL="$new_path"
53347     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53348 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53349   fi
53350 
53351     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53352 
53353   path="$MSVC_DLL"
53354   has_colon=`$ECHO $path | $GREP ^.:`
53355   new_path="$path"
53356   if test "x$has_colon" = x; then
53357     # Not in mixed or Windows style, start by that.
53358     new_path=`cmd //c echo $path`
53359   fi
53360 
53361 
53362   input_path="$new_path"
53363   # Check if we need to convert this using DOS-style short mode. If the path
53364   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53365   # take no chances and rewrite it.
53366   # Note: m4 eats our [], so we need to use [ and ] instead.
53367   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53368   if test "x$has_forbidden_chars" != x; then
53369     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53370     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53371   fi
53372 
53373 
53374   windows_path="$new_path"
53375   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53376     unix_path=`$CYGPATH -u "$windows_path"`
53377     new_path="$unix_path"
53378   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53379     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53380     new_path="$unix_path"
53381   fi
53382 
53383   if test "x$path" != "x$new_path"; then
53384     MSVC_DLL="$new_path"
53385     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53386 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53387   fi
53388 
53389   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53390   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53391 
53392     else
53393       # We're on a unix platform. Hooray! :)
53394       path="$MSVC_DLL"
53395       has_space=`$ECHO "$path" | $GREP " "`
53396       if test "x$has_space" != x; then
53397         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53398 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53399         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53400       fi
53401 
53402       # Use eval to expand a potential ~
53403       eval path="$path"
53404       if test ! -f "$path" && test ! -d "$path"; then
53405         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53406       fi
53407 
53408       if test -d "$path"; then
53409         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53410       else
53411         dir="`$DIRNAME "$path"`"
53412         base="`$BASENAME "$path"`"
53413         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53414       fi
53415     fi
53416   fi
53417 
53418       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53419 $as_echo_n "checking for $DLL_NAME... " >&6; }
53420       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53421 $as_echo "$MSVC_DLL" >&6; }
53422     else
53423       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53424 $as_echo "incorrect, ignoring" >&6; }
53425       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53426 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53427     fi
53428   fi
53429 
53430     if test "x$MSVC_DLL" = x; then
53431       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53432     fi
53433     MSVCR_DLL="$MSVC_DLL"
53434   else
53435 
53436   DLL_NAME="${MSVCR_NAME}"
53437   MSVC_DLL=
53438 
53439   if test "x$MSVC_DLL" = x; then
53440     # Probe: Using well-known location from Visual Studio 10.0
53441     if test "x$VCINSTALLDIR" != x; then
53442       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53443 
53444   windows_path="$CYGWIN_VC_INSTALL_DIR"
53445   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53446     unix_path=`$CYGPATH -u "$windows_path"`
53447     CYGWIN_VC_INSTALL_DIR="$unix_path"
53448   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53449     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53450     CYGWIN_VC_INSTALL_DIR="$unix_path"
53451   fi
53452 
53453       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53454         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53455       else
53456         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53457       fi
53458       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53459 
53460   DLL_NAME="$DLL_NAME"
53461   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53462   METHOD="well-known location in VCINSTALLDIR"
53463   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53464     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53465 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53466 
53467     # Need to check if the found msvcr is correct architecture
53468     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53469 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53470     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53471     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53472       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53473       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53474       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53475         CORRECT_MSVCR_ARCH="PE32 executable"
53476       else
53477         CORRECT_MSVCR_ARCH="PE32+ executable"
53478       fi
53479     else
53480       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53481         CORRECT_MSVCR_ARCH=386
53482       else
53483         CORRECT_MSVCR_ARCH=x86-64
53484       fi
53485     fi
53486     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53487       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53488 $as_echo "ok" >&6; }
53489       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53490 
53491   # Only process if variable expands to non-empty
53492 
53493   if test "x$MSVC_DLL" != x; then
53494     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53495 
53496   # Input might be given as Windows format, start by converting to
53497   # unix format.
53498   path="$MSVC_DLL"
53499   new_path=`$CYGPATH -u "$path"`
53500 
53501   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53502   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53503   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53504   # "foo.exe" is OK but "foo" is an error.
53505   #
53506   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53507   # It is also a way to make sure we got the proper file name for the real test later on.
53508   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53509   if test "x$test_shortpath" = x; then
53510     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53511 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53512     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53513   fi
53514 
53515   # Call helper function which possibly converts this using DOS-style short mode.
53516   # If so, the updated path is stored in $new_path.
53517 
53518   input_path="$new_path"
53519   # Check if we need to convert this using DOS-style short mode. If the path
53520   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53521   # take no chances and rewrite it.
53522   # Note: m4 eats our [], so we need to use [ and ] instead.
53523   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53524   if test "x$has_forbidden_chars" != x; then
53525     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53526     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53527     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53528     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53529       # Going to short mode and back again did indeed matter. Since short mode is
53530       # case insensitive, let's make it lowercase to improve readability.
53531       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53532       # Now convert it back to Unix-style (cygpath)
53533       input_path=`$CYGPATH -u "$shortmode_path"`
53534       new_path="$input_path"
53535     fi
53536   fi
53537 
53538   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53539   if test "x$test_cygdrive_prefix" = x; then
53540     # As a simple fix, exclude /usr/bin since it's not a real path.
53541     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53542       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53543       # a path prefixed by /cygdrive for fixpath to work.
53544       new_path="$CYGWIN_ROOT_PATH$input_path"
53545     fi
53546   fi
53547 
53548 
53549   if test "x$path" != "x$new_path"; then
53550     MSVC_DLL="$new_path"
53551     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53552 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53553   fi
53554 
53555     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53556 
53557   path="$MSVC_DLL"
53558   has_colon=`$ECHO $path | $GREP ^.:`
53559   new_path="$path"
53560   if test "x$has_colon" = x; then
53561     # Not in mixed or Windows style, start by that.
53562     new_path=`cmd //c echo $path`
53563   fi
53564 
53565 
53566   input_path="$new_path"
53567   # Check if we need to convert this using DOS-style short mode. If the path
53568   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53569   # take no chances and rewrite it.
53570   # Note: m4 eats our [], so we need to use [ and ] instead.
53571   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53572   if test "x$has_forbidden_chars" != x; then
53573     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53574     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53575   fi
53576 
53577 
53578   windows_path="$new_path"
53579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53580     unix_path=`$CYGPATH -u "$windows_path"`
53581     new_path="$unix_path"
53582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53584     new_path="$unix_path"
53585   fi
53586 
53587   if test "x$path" != "x$new_path"; then
53588     MSVC_DLL="$new_path"
53589     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53590 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53591   fi
53592 
53593   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53594   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53595 
53596     else
53597       # We're on a unix platform. Hooray! :)
53598       path="$MSVC_DLL"
53599       has_space=`$ECHO "$path" | $GREP " "`
53600       if test "x$has_space" != x; then
53601         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53602 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53603         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53604       fi
53605 
53606       # Use eval to expand a potential ~
53607       eval path="$path"
53608       if test ! -f "$path" && test ! -d "$path"; then
53609         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53610       fi
53611 
53612       if test -d "$path"; then
53613         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53614       else
53615         dir="`$DIRNAME "$path"`"
53616         base="`$BASENAME "$path"`"
53617         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53618       fi
53619     fi
53620   fi
53621 
53622       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53623 $as_echo_n "checking for $DLL_NAME... " >&6; }
53624       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53625 $as_echo "$MSVC_DLL" >&6; }
53626     else
53627       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53628 $as_echo "incorrect, ignoring" >&6; }
53629       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53630 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53631     fi
53632   fi
53633 
53634     fi
53635   fi
53636 
53637   if test "x$MSVC_DLL" = x; then
53638     # Probe: Check in the Boot JDK directory.
53639     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53640 
53641   DLL_NAME="$DLL_NAME"
53642   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53643   METHOD="well-known location in Boot JDK"
53644   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53645     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53646 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53647 
53648     # Need to check if the found msvcr is correct architecture
53649     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53650 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53651     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53652     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53653       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53654       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53655       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53656         CORRECT_MSVCR_ARCH="PE32 executable"
53657       else
53658         CORRECT_MSVCR_ARCH="PE32+ executable"
53659       fi
53660     else
53661       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53662         CORRECT_MSVCR_ARCH=386
53663       else
53664         CORRECT_MSVCR_ARCH=x86-64
53665       fi
53666     fi
53667     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53668       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53669 $as_echo "ok" >&6; }
53670       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53671 
53672   # Only process if variable expands to non-empty
53673 
53674   if test "x$MSVC_DLL" != x; then
53675     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53676 
53677   # Input might be given as Windows format, start by converting to
53678   # unix format.
53679   path="$MSVC_DLL"
53680   new_path=`$CYGPATH -u "$path"`
53681 
53682   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53683   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53684   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53685   # "foo.exe" is OK but "foo" is an error.
53686   #
53687   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53688   # It is also a way to make sure we got the proper file name for the real test later on.
53689   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53690   if test "x$test_shortpath" = x; then
53691     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53692 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53693     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53694   fi
53695 
53696   # Call helper function which possibly converts this using DOS-style short mode.
53697   # If so, the updated path is stored in $new_path.
53698 
53699   input_path="$new_path"
53700   # Check if we need to convert this using DOS-style short mode. If the path
53701   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53702   # take no chances and rewrite it.
53703   # Note: m4 eats our [], so we need to use [ and ] instead.
53704   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53705   if test "x$has_forbidden_chars" != x; then
53706     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53707     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53708     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53709     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53710       # Going to short mode and back again did indeed matter. Since short mode is
53711       # case insensitive, let's make it lowercase to improve readability.
53712       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53713       # Now convert it back to Unix-style (cygpath)
53714       input_path=`$CYGPATH -u "$shortmode_path"`
53715       new_path="$input_path"
53716     fi
53717   fi
53718 
53719   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53720   if test "x$test_cygdrive_prefix" = x; then
53721     # As a simple fix, exclude /usr/bin since it's not a real path.
53722     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53723       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53724       # a path prefixed by /cygdrive for fixpath to work.
53725       new_path="$CYGWIN_ROOT_PATH$input_path"
53726     fi
53727   fi
53728 
53729 
53730   if test "x$path" != "x$new_path"; then
53731     MSVC_DLL="$new_path"
53732     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53733 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53734   fi
53735 
53736     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53737 
53738   path="$MSVC_DLL"
53739   has_colon=`$ECHO $path | $GREP ^.:`
53740   new_path="$path"
53741   if test "x$has_colon" = x; then
53742     # Not in mixed or Windows style, start by that.
53743     new_path=`cmd //c echo $path`
53744   fi
53745 
53746 
53747   input_path="$new_path"
53748   # Check if we need to convert this using DOS-style short mode. If the path
53749   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53750   # take no chances and rewrite it.
53751   # Note: m4 eats our [], so we need to use [ and ] instead.
53752   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53753   if test "x$has_forbidden_chars" != x; then
53754     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53755     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53756   fi
53757 
53758 
53759   windows_path="$new_path"
53760   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53761     unix_path=`$CYGPATH -u "$windows_path"`
53762     new_path="$unix_path"
53763   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53764     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53765     new_path="$unix_path"
53766   fi
53767 
53768   if test "x$path" != "x$new_path"; then
53769     MSVC_DLL="$new_path"
53770     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53771 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53772   fi
53773 
53774   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53775   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53776 
53777     else
53778       # We're on a unix platform. Hooray! :)
53779       path="$MSVC_DLL"
53780       has_space=`$ECHO "$path" | $GREP " "`
53781       if test "x$has_space" != x; then
53782         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53783 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53784         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53785       fi
53786 
53787       # Use eval to expand a potential ~
53788       eval path="$path"
53789       if test ! -f "$path" && test ! -d "$path"; then
53790         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53791       fi
53792 
53793       if test -d "$path"; then
53794         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53795       else
53796         dir="`$DIRNAME "$path"`"
53797         base="`$BASENAME "$path"`"
53798         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53799       fi
53800     fi
53801   fi
53802 
53803       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53804 $as_echo_n "checking for $DLL_NAME... " >&6; }
53805       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53806 $as_echo "$MSVC_DLL" >&6; }
53807     else
53808       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53809 $as_echo "incorrect, ignoring" >&6; }
53810       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53811 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53812     fi
53813   fi
53814 
53815   fi
53816 
53817   if test "x$MSVC_DLL" = x; then
53818     # Probe: Look in the Windows system32 directory
53819     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53820 
53821   windows_path="$CYGWIN_SYSTEMROOT"
53822   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53823     unix_path=`$CYGPATH -u "$windows_path"`
53824     CYGWIN_SYSTEMROOT="$unix_path"
53825   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53826     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53827     CYGWIN_SYSTEMROOT="$unix_path"
53828   fi
53829 
53830     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53831 
53832   DLL_NAME="$DLL_NAME"
53833   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53834   METHOD="well-known location in SYSTEMROOT"
53835   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53836     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53837 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53838 
53839     # Need to check if the found msvcr is correct architecture
53840     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53841 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53842     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53843     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53844       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53845       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53846       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53847         CORRECT_MSVCR_ARCH="PE32 executable"
53848       else
53849         CORRECT_MSVCR_ARCH="PE32+ executable"
53850       fi
53851     else
53852       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53853         CORRECT_MSVCR_ARCH=386
53854       else
53855         CORRECT_MSVCR_ARCH=x86-64
53856       fi
53857     fi
53858     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53859       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53860 $as_echo "ok" >&6; }
53861       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53862 
53863   # Only process if variable expands to non-empty
53864 
53865   if test "x$MSVC_DLL" != x; then
53866     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53867 
53868   # Input might be given as Windows format, start by converting to
53869   # unix format.
53870   path="$MSVC_DLL"
53871   new_path=`$CYGPATH -u "$path"`
53872 
53873   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53874   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53875   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53876   # "foo.exe" is OK but "foo" is an error.
53877   #
53878   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53879   # It is also a way to make sure we got the proper file name for the real test later on.
53880   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53881   if test "x$test_shortpath" = x; then
53882     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53883 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53884     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53885   fi
53886 
53887   # Call helper function which possibly converts this using DOS-style short mode.
53888   # If so, the updated path is stored in $new_path.
53889 
53890   input_path="$new_path"
53891   # Check if we need to convert this using DOS-style short mode. If the path
53892   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53893   # take no chances and rewrite it.
53894   # Note: m4 eats our [], so we need to use [ and ] instead.
53895   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53896   if test "x$has_forbidden_chars" != x; then
53897     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53898     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53899     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53900     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53901       # Going to short mode and back again did indeed matter. Since short mode is
53902       # case insensitive, let's make it lowercase to improve readability.
53903       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53904       # Now convert it back to Unix-style (cygpath)
53905       input_path=`$CYGPATH -u "$shortmode_path"`
53906       new_path="$input_path"
53907     fi
53908   fi
53909 
53910   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53911   if test "x$test_cygdrive_prefix" = x; then
53912     # As a simple fix, exclude /usr/bin since it's not a real path.
53913     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53914       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53915       # a path prefixed by /cygdrive for fixpath to work.
53916       new_path="$CYGWIN_ROOT_PATH$input_path"
53917     fi
53918   fi
53919 
53920 
53921   if test "x$path" != "x$new_path"; then
53922     MSVC_DLL="$new_path"
53923     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53924 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53925   fi
53926 
53927     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53928 
53929   path="$MSVC_DLL"
53930   has_colon=`$ECHO $path | $GREP ^.:`
53931   new_path="$path"
53932   if test "x$has_colon" = x; then
53933     # Not in mixed or Windows style, start by that.
53934     new_path=`cmd //c echo $path`
53935   fi
53936 
53937 
53938   input_path="$new_path"
53939   # Check if we need to convert this using DOS-style short mode. If the path
53940   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53941   # take no chances and rewrite it.
53942   # Note: m4 eats our [], so we need to use [ and ] instead.
53943   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53944   if test "x$has_forbidden_chars" != x; then
53945     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53946     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53947   fi
53948 
53949 
53950   windows_path="$new_path"
53951   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53952     unix_path=`$CYGPATH -u "$windows_path"`
53953     new_path="$unix_path"
53954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53955     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53956     new_path="$unix_path"
53957   fi
53958 
53959   if test "x$path" != "x$new_path"; then
53960     MSVC_DLL="$new_path"
53961     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53962 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53963   fi
53964 
53965   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53966   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53967 
53968     else
53969       # We're on a unix platform. Hooray! :)
53970       path="$MSVC_DLL"
53971       has_space=`$ECHO "$path" | $GREP " "`
53972       if test "x$has_space" != x; then
53973         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53974 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53975         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53976       fi
53977 
53978       # Use eval to expand a potential ~
53979       eval path="$path"
53980       if test ! -f "$path" && test ! -d "$path"; then
53981         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53982       fi
53983 
53984       if test -d "$path"; then
53985         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53986       else
53987         dir="`$DIRNAME "$path"`"
53988         base="`$BASENAME "$path"`"
53989         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53990       fi
53991     fi
53992   fi
53993 
53994       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53995 $as_echo_n "checking for $DLL_NAME... " >&6; }
53996       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53997 $as_echo "$MSVC_DLL" >&6; }
53998     else
53999       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54000 $as_echo "incorrect, ignoring" >&6; }
54001       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54002 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54003     fi
54004   fi
54005 
54006   fi
54007 
54008   if test "x$MSVC_DLL" = x; then
54009     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54010     if test "x$VS100COMNTOOLS" != x; then
54011       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54012 
54013   windows_path="$CYGWIN_VS_TOOLS_DIR"
54014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54015     unix_path=`$CYGPATH -u "$windows_path"`
54016     CYGWIN_VS_TOOLS_DIR="$unix_path"
54017   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54018     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54019     CYGWIN_VS_TOOLS_DIR="$unix_path"
54020   fi
54021 
54022       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54023         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54024             | $GREP -i /x64/ | $HEAD --lines 1`
54025       else
54026         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54027             | $GREP -i /x86/ | $HEAD --lines 1`
54028       fi
54029 
54030   DLL_NAME="$DLL_NAME"
54031   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54032   METHOD="search of VS100COMNTOOLS"
54033   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54034     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54035 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54036 
54037     # Need to check if the found msvcr is correct architecture
54038     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54039 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54040     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54041     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54042       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54043       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54044       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54045         CORRECT_MSVCR_ARCH="PE32 executable"
54046       else
54047         CORRECT_MSVCR_ARCH="PE32+ executable"
54048       fi
54049     else
54050       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54051         CORRECT_MSVCR_ARCH=386
54052       else
54053         CORRECT_MSVCR_ARCH=x86-64
54054       fi
54055     fi
54056     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54057       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54058 $as_echo "ok" >&6; }
54059       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54060 
54061   # Only process if variable expands to non-empty
54062 
54063   if test "x$MSVC_DLL" != x; then
54064     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54065 
54066   # Input might be given as Windows format, start by converting to
54067   # unix format.
54068   path="$MSVC_DLL"
54069   new_path=`$CYGPATH -u "$path"`
54070 
54071   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54072   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54073   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54074   # "foo.exe" is OK but "foo" is an error.
54075   #
54076   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54077   # It is also a way to make sure we got the proper file name for the real test later on.
54078   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54079   if test "x$test_shortpath" = x; then
54080     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54081 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54082     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54083   fi
54084 
54085   # Call helper function which possibly converts this using DOS-style short mode.
54086   # If so, the updated path is stored in $new_path.
54087 
54088   input_path="$new_path"
54089   # Check if we need to convert this using DOS-style short mode. If the path
54090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54091   # take no chances and rewrite it.
54092   # Note: m4 eats our [], so we need to use [ and ] instead.
54093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54094   if test "x$has_forbidden_chars" != x; then
54095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54096     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54097     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54098     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54099       # Going to short mode and back again did indeed matter. Since short mode is
54100       # case insensitive, let's make it lowercase to improve readability.
54101       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54102       # Now convert it back to Unix-style (cygpath)
54103       input_path=`$CYGPATH -u "$shortmode_path"`
54104       new_path="$input_path"
54105     fi
54106   fi
54107 
54108   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54109   if test "x$test_cygdrive_prefix" = x; then
54110     # As a simple fix, exclude /usr/bin since it's not a real path.
54111     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54112       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54113       # a path prefixed by /cygdrive for fixpath to work.
54114       new_path="$CYGWIN_ROOT_PATH$input_path"
54115     fi
54116   fi
54117 
54118 
54119   if test "x$path" != "x$new_path"; then
54120     MSVC_DLL="$new_path"
54121     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54122 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54123   fi
54124 
54125     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54126 
54127   path="$MSVC_DLL"
54128   has_colon=`$ECHO $path | $GREP ^.:`
54129   new_path="$path"
54130   if test "x$has_colon" = x; then
54131     # Not in mixed or Windows style, start by that.
54132     new_path=`cmd //c echo $path`
54133   fi
54134 
54135 
54136   input_path="$new_path"
54137   # Check if we need to convert this using DOS-style short mode. If the path
54138   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54139   # take no chances and rewrite it.
54140   # Note: m4 eats our [], so we need to use [ and ] instead.
54141   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54142   if test "x$has_forbidden_chars" != x; then
54143     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54144     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54145   fi
54146 
54147 
54148   windows_path="$new_path"
54149   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54150     unix_path=`$CYGPATH -u "$windows_path"`
54151     new_path="$unix_path"
54152   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54153     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54154     new_path="$unix_path"
54155   fi
54156 
54157   if test "x$path" != "x$new_path"; then
54158     MSVC_DLL="$new_path"
54159     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54160 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54161   fi
54162 
54163   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54164   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54165 
54166     else
54167       # We're on a unix platform. Hooray! :)
54168       path="$MSVC_DLL"
54169       has_space=`$ECHO "$path" | $GREP " "`
54170       if test "x$has_space" != x; then
54171         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54172 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54173         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54174       fi
54175 
54176       # Use eval to expand a potential ~
54177       eval path="$path"
54178       if test ! -f "$path" && test ! -d "$path"; then
54179         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54180       fi
54181 
54182       if test -d "$path"; then
54183         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54184       else
54185         dir="`$DIRNAME "$path"`"
54186         base="`$BASENAME "$path"`"
54187         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54188       fi
54189     fi
54190   fi
54191 
54192       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54193 $as_echo_n "checking for $DLL_NAME... " >&6; }
54194       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54195 $as_echo "$MSVC_DLL" >&6; }
54196     else
54197       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54198 $as_echo "incorrect, ignoring" >&6; }
54199       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54200 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54201     fi
54202   fi
54203 
54204     fi
54205   fi
54206 
54207   if test "x$MSVC_DLL" = x; then
54208     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54209     # (This was the original behaviour; kept since it might turn something up)
54210     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54211       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54212         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54213             | $GREP x64 | $HEAD --lines 1`
54214       else
54215         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54216             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54217         if test "x$POSSIBLE_MSVC_DLL" = x; then
54218           # We're grasping at straws now...
54219           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54220               | $HEAD --lines 1`
54221         fi
54222       fi
54223 
54224 
54225   DLL_NAME="$DLL_NAME"
54226   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54227   METHOD="search of VCINSTALLDIR"
54228   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54229     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54230 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54231 
54232     # Need to check if the found msvcr is correct architecture
54233     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54234 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54235     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54236     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54237       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54238       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54239       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54240         CORRECT_MSVCR_ARCH="PE32 executable"
54241       else
54242         CORRECT_MSVCR_ARCH="PE32+ executable"
54243       fi
54244     else
54245       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54246         CORRECT_MSVCR_ARCH=386
54247       else
54248         CORRECT_MSVCR_ARCH=x86-64
54249       fi
54250     fi
54251     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54252       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54253 $as_echo "ok" >&6; }
54254       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54255 
54256   # Only process if variable expands to non-empty
54257 
54258   if test "x$MSVC_DLL" != x; then
54259     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54260 
54261   # Input might be given as Windows format, start by converting to
54262   # unix format.
54263   path="$MSVC_DLL"
54264   new_path=`$CYGPATH -u "$path"`
54265 
54266   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54267   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54268   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54269   # "foo.exe" is OK but "foo" is an error.
54270   #
54271   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54272   # It is also a way to make sure we got the proper file name for the real test later on.
54273   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54274   if test "x$test_shortpath" = x; then
54275     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54276 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54277     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54278   fi
54279 
54280   # Call helper function which possibly converts this using DOS-style short mode.
54281   # If so, the updated path is stored in $new_path.
54282 
54283   input_path="$new_path"
54284   # Check if we need to convert this using DOS-style short mode. If the path
54285   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54286   # take no chances and rewrite it.
54287   # Note: m4 eats our [], so we need to use [ and ] instead.
54288   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54289   if test "x$has_forbidden_chars" != x; then
54290     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54291     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54292     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54293     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54294       # Going to short mode and back again did indeed matter. Since short mode is
54295       # case insensitive, let's make it lowercase to improve readability.
54296       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54297       # Now convert it back to Unix-style (cygpath)
54298       input_path=`$CYGPATH -u "$shortmode_path"`
54299       new_path="$input_path"
54300     fi
54301   fi
54302 
54303   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54304   if test "x$test_cygdrive_prefix" = x; then
54305     # As a simple fix, exclude /usr/bin since it's not a real path.
54306     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54307       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54308       # a path prefixed by /cygdrive for fixpath to work.
54309       new_path="$CYGWIN_ROOT_PATH$input_path"
54310     fi
54311   fi
54312 
54313 
54314   if test "x$path" != "x$new_path"; then
54315     MSVC_DLL="$new_path"
54316     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54317 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54318   fi
54319 
54320     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54321 
54322   path="$MSVC_DLL"
54323   has_colon=`$ECHO $path | $GREP ^.:`
54324   new_path="$path"
54325   if test "x$has_colon" = x; then
54326     # Not in mixed or Windows style, start by that.
54327     new_path=`cmd //c echo $path`
54328   fi
54329 
54330 
54331   input_path="$new_path"
54332   # Check if we need to convert this using DOS-style short mode. If the path
54333   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54334   # take no chances and rewrite it.
54335   # Note: m4 eats our [], so we need to use [ and ] instead.
54336   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54337   if test "x$has_forbidden_chars" != x; then
54338     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54339     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54340   fi
54341 
54342 
54343   windows_path="$new_path"
54344   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54345     unix_path=`$CYGPATH -u "$windows_path"`
54346     new_path="$unix_path"
54347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54348     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54349     new_path="$unix_path"
54350   fi
54351 
54352   if test "x$path" != "x$new_path"; then
54353     MSVC_DLL="$new_path"
54354     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54355 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54356   fi
54357 
54358   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54359   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54360 
54361     else
54362       # We're on a unix platform. Hooray! :)
54363       path="$MSVC_DLL"
54364       has_space=`$ECHO "$path" | $GREP " "`
54365       if test "x$has_space" != x; then
54366         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54367 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54368         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54369       fi
54370 
54371       # Use eval to expand a potential ~
54372       eval path="$path"
54373       if test ! -f "$path" && test ! -d "$path"; then
54374         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54375       fi
54376 
54377       if test -d "$path"; then
54378         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54379       else
54380         dir="`$DIRNAME "$path"`"
54381         base="`$BASENAME "$path"`"
54382         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54383       fi
54384     fi
54385   fi
54386 
54387       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54388 $as_echo_n "checking for $DLL_NAME... " >&6; }
54389       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54390 $as_echo "$MSVC_DLL" >&6; }
54391     else
54392       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54393 $as_echo "incorrect, ignoring" >&6; }
54394       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54395 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54396     fi
54397   fi
54398 
54399     fi
54400   fi
54401 
54402   if test "x$MSVC_DLL" = x; then
54403     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54404 $as_echo_n "checking for $DLL_NAME... " >&6; }
54405     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54406 $as_echo "no" >&6; }
54407     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54408   fi
54409 
54410     MSVCR_DLL="$MSVC_DLL"
54411   fi
54412 
54413 
54414 
54415 # Check whether --with-msvcp-dll was given.
54416 if test "${with_msvcp_dll+set}" = set; then :
54417   withval=$with_msvcp_dll;
54418 fi
54419 
54420 
54421   if test "x$MSVCP_NAME" != "x"; then
54422     if test "x$with_msvcp_dll" != x; then
54423       # If given explicitly by user, do not probe. If not present, fail directly.
54424 
54425   DLL_NAME="$MSVCP_NAME"
54426   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54427   METHOD="--with-msvcp-dll"
54428   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54429     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54430 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54431 
54432     # Need to check if the found msvcr is correct architecture
54433     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54434 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54435     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54436     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54437       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54438       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54439       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54440         CORRECT_MSVCR_ARCH="PE32 executable"
54441       else
54442         CORRECT_MSVCR_ARCH="PE32+ executable"
54443       fi
54444     else
54445       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54446         CORRECT_MSVCR_ARCH=386
54447       else
54448         CORRECT_MSVCR_ARCH=x86-64
54449       fi
54450     fi
54451     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54452       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54453 $as_echo "ok" >&6; }
54454       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54455 
54456   # Only process if variable expands to non-empty
54457 
54458   if test "x$MSVC_DLL" != x; then
54459     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54460 
54461   # Input might be given as Windows format, start by converting to
54462   # unix format.
54463   path="$MSVC_DLL"
54464   new_path=`$CYGPATH -u "$path"`
54465 
54466   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54467   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54468   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54469   # "foo.exe" is OK but "foo" is an error.
54470   #
54471   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54472   # It is also a way to make sure we got the proper file name for the real test later on.
54473   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54474   if test "x$test_shortpath" = x; then
54475     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54476 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54477     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54478   fi
54479 
54480   # Call helper function which possibly converts this using DOS-style short mode.
54481   # If so, the updated path is stored in $new_path.
54482 
54483   input_path="$new_path"
54484   # Check if we need to convert this using DOS-style short mode. If the path
54485   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54486   # take no chances and rewrite it.
54487   # Note: m4 eats our [], so we need to use [ and ] instead.
54488   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54489   if test "x$has_forbidden_chars" != x; then
54490     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54491     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54492     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54493     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54494       # Going to short mode and back again did indeed matter. Since short mode is
54495       # case insensitive, let's make it lowercase to improve readability.
54496       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54497       # Now convert it back to Unix-style (cygpath)
54498       input_path=`$CYGPATH -u "$shortmode_path"`
54499       new_path="$input_path"
54500     fi
54501   fi
54502 
54503   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54504   if test "x$test_cygdrive_prefix" = x; then
54505     # As a simple fix, exclude /usr/bin since it's not a real path.
54506     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54507       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54508       # a path prefixed by /cygdrive for fixpath to work.
54509       new_path="$CYGWIN_ROOT_PATH$input_path"
54510     fi
54511   fi
54512 
54513 
54514   if test "x$path" != "x$new_path"; then
54515     MSVC_DLL="$new_path"
54516     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54517 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54518   fi
54519 
54520     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54521 
54522   path="$MSVC_DLL"
54523   has_colon=`$ECHO $path | $GREP ^.:`
54524   new_path="$path"
54525   if test "x$has_colon" = x; then
54526     # Not in mixed or Windows style, start by that.
54527     new_path=`cmd //c echo $path`
54528   fi
54529 
54530 
54531   input_path="$new_path"
54532   # Check if we need to convert this using DOS-style short mode. If the path
54533   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54534   # take no chances and rewrite it.
54535   # Note: m4 eats our [], so we need to use [ and ] instead.
54536   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54537   if test "x$has_forbidden_chars" != x; then
54538     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54539     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54540   fi
54541 
54542 
54543   windows_path="$new_path"
54544   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54545     unix_path=`$CYGPATH -u "$windows_path"`
54546     new_path="$unix_path"
54547   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54548     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54549     new_path="$unix_path"
54550   fi
54551 
54552   if test "x$path" != "x$new_path"; then
54553     MSVC_DLL="$new_path"
54554     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54555 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54556   fi
54557 
54558   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54559   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54560 
54561     else
54562       # We're on a unix platform. Hooray! :)
54563       path="$MSVC_DLL"
54564       has_space=`$ECHO "$path" | $GREP " "`
54565       if test "x$has_space" != x; then
54566         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54567 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54568         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54569       fi
54570 
54571       # Use eval to expand a potential ~
54572       eval path="$path"
54573       if test ! -f "$path" && test ! -d "$path"; then
54574         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54575       fi
54576 
54577       if test -d "$path"; then
54578         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54579       else
54580         dir="`$DIRNAME "$path"`"
54581         base="`$BASENAME "$path"`"
54582         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54583       fi
54584     fi
54585   fi
54586 
54587       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54588 $as_echo_n "checking for $DLL_NAME... " >&6; }
54589       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54590 $as_echo "$MSVC_DLL" >&6; }
54591     else
54592       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54593 $as_echo "incorrect, ignoring" >&6; }
54594       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54595 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54596     fi
54597   fi
54598 
54599       if test "x$MSVC_DLL" = x; then
54600         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54601       fi
54602       MSVCP_DLL="$MSVC_DLL"
54603     elif test "x$DEVKIT_MSVCP_DLL" != x; then
54604 
54605   DLL_NAME="$MSVCP_NAME"
54606   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54607   METHOD="devkit"
54608   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54609     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54610 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54611 
54612     # Need to check if the found msvcr is correct architecture
54613     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54614 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54615     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54616     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54617       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54618       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54619       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54620         CORRECT_MSVCR_ARCH="PE32 executable"
54621       else
54622         CORRECT_MSVCR_ARCH="PE32+ executable"
54623       fi
54624     else
54625       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54626         CORRECT_MSVCR_ARCH=386
54627       else
54628         CORRECT_MSVCR_ARCH=x86-64
54629       fi
54630     fi
54631     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54632       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54633 $as_echo "ok" >&6; }
54634       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54635 
54636   # Only process if variable expands to non-empty
54637 
54638   if test "x$MSVC_DLL" != x; then
54639     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54640 
54641   # Input might be given as Windows format, start by converting to
54642   # unix format.
54643   path="$MSVC_DLL"
54644   new_path=`$CYGPATH -u "$path"`
54645 
54646   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54647   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54648   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54649   # "foo.exe" is OK but "foo" is an error.
54650   #
54651   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54652   # It is also a way to make sure we got the proper file name for the real test later on.
54653   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54654   if test "x$test_shortpath" = x; then
54655     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54656 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54657     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54658   fi
54659 
54660   # Call helper function which possibly converts this using DOS-style short mode.
54661   # If so, the updated path is stored in $new_path.
54662 
54663   input_path="$new_path"
54664   # Check if we need to convert this using DOS-style short mode. If the path
54665   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54666   # take no chances and rewrite it.
54667   # Note: m4 eats our [], so we need to use [ and ] instead.
54668   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54669   if test "x$has_forbidden_chars" != x; then
54670     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54671     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54672     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54673     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54674       # Going to short mode and back again did indeed matter. Since short mode is
54675       # case insensitive, let's make it lowercase to improve readability.
54676       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54677       # Now convert it back to Unix-style (cygpath)
54678       input_path=`$CYGPATH -u "$shortmode_path"`
54679       new_path="$input_path"
54680     fi
54681   fi
54682 
54683   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54684   if test "x$test_cygdrive_prefix" = x; then
54685     # As a simple fix, exclude /usr/bin since it's not a real path.
54686     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54687       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54688       # a path prefixed by /cygdrive for fixpath to work.
54689       new_path="$CYGWIN_ROOT_PATH$input_path"
54690     fi
54691   fi
54692 
54693 
54694   if test "x$path" != "x$new_path"; then
54695     MSVC_DLL="$new_path"
54696     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54697 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54698   fi
54699 
54700     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54701 
54702   path="$MSVC_DLL"
54703   has_colon=`$ECHO $path | $GREP ^.:`
54704   new_path="$path"
54705   if test "x$has_colon" = x; then
54706     # Not in mixed or Windows style, start by that.
54707     new_path=`cmd //c echo $path`
54708   fi
54709 
54710 
54711   input_path="$new_path"
54712   # Check if we need to convert this using DOS-style short mode. If the path
54713   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54714   # take no chances and rewrite it.
54715   # Note: m4 eats our [], so we need to use [ and ] instead.
54716   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54717   if test "x$has_forbidden_chars" != x; then
54718     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54719     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54720   fi
54721 
54722 
54723   windows_path="$new_path"
54724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54725     unix_path=`$CYGPATH -u "$windows_path"`
54726     new_path="$unix_path"
54727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54729     new_path="$unix_path"
54730   fi
54731 
54732   if test "x$path" != "x$new_path"; then
54733     MSVC_DLL="$new_path"
54734     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54735 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54736   fi
54737 
54738   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54739   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54740 
54741     else
54742       # We're on a unix platform. Hooray! :)
54743       path="$MSVC_DLL"
54744       has_space=`$ECHO "$path" | $GREP " "`
54745       if test "x$has_space" != x; then
54746         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54747 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54748         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54749       fi
54750 
54751       # Use eval to expand a potential ~
54752       eval path="$path"
54753       if test ! -f "$path" && test ! -d "$path"; then
54754         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54755       fi
54756 
54757       if test -d "$path"; then
54758         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54759       else
54760         dir="`$DIRNAME "$path"`"
54761         base="`$BASENAME "$path"`"
54762         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54763       fi
54764     fi
54765   fi
54766 
54767       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54768 $as_echo_n "checking for $DLL_NAME... " >&6; }
54769       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54770 $as_echo "$MSVC_DLL" >&6; }
54771     else
54772       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54773 $as_echo "incorrect, ignoring" >&6; }
54774       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54775 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54776     fi
54777   fi
54778 
54779       if test "x$MSVC_DLL" = x; then
54780         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54781       fi
54782       MSVCP_DLL="$MSVC_DLL"
54783     else
54784 
54785   DLL_NAME="${MSVCP_NAME}"
54786   MSVC_DLL=
54787 
54788   if test "x$MSVC_DLL" = x; then
54789     # Probe: Using well-known location from Visual Studio 10.0
54790     if test "x$VCINSTALLDIR" != x; then
54791       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54792 
54793   windows_path="$CYGWIN_VC_INSTALL_DIR"
54794   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54795     unix_path=`$CYGPATH -u "$windows_path"`
54796     CYGWIN_VC_INSTALL_DIR="$unix_path"
54797   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54798     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54799     CYGWIN_VC_INSTALL_DIR="$unix_path"
54800   fi
54801 
54802       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54803         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54804       else
54805         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54806       fi
54807       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54808 
54809   DLL_NAME="$DLL_NAME"
54810   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54811   METHOD="well-known location in VCINSTALLDIR"
54812   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54813     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54814 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54815 
54816     # Need to check if the found msvcr is correct architecture
54817     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54818 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54819     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54820     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54821       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54822       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54823       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54824         CORRECT_MSVCR_ARCH="PE32 executable"
54825       else
54826         CORRECT_MSVCR_ARCH="PE32+ executable"
54827       fi
54828     else
54829       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54830         CORRECT_MSVCR_ARCH=386
54831       else
54832         CORRECT_MSVCR_ARCH=x86-64
54833       fi
54834     fi
54835     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54836       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54837 $as_echo "ok" >&6; }
54838       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54839 
54840   # Only process if variable expands to non-empty
54841 
54842   if test "x$MSVC_DLL" != x; then
54843     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54844 
54845   # Input might be given as Windows format, start by converting to
54846   # unix format.
54847   path="$MSVC_DLL"
54848   new_path=`$CYGPATH -u "$path"`
54849 
54850   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54851   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54852   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54853   # "foo.exe" is OK but "foo" is an error.
54854   #
54855   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54856   # It is also a way to make sure we got the proper file name for the real test later on.
54857   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54858   if test "x$test_shortpath" = x; then
54859     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54860 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54861     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54862   fi
54863 
54864   # Call helper function which possibly converts this using DOS-style short mode.
54865   # If so, the updated path is stored in $new_path.
54866 
54867   input_path="$new_path"
54868   # Check if we need to convert this using DOS-style short mode. If the path
54869   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54870   # take no chances and rewrite it.
54871   # Note: m4 eats our [], so we need to use [ and ] instead.
54872   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54873   if test "x$has_forbidden_chars" != x; then
54874     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54875     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54876     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54877     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54878       # Going to short mode and back again did indeed matter. Since short mode is
54879       # case insensitive, let's make it lowercase to improve readability.
54880       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54881       # Now convert it back to Unix-style (cygpath)
54882       input_path=`$CYGPATH -u "$shortmode_path"`
54883       new_path="$input_path"
54884     fi
54885   fi
54886 
54887   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54888   if test "x$test_cygdrive_prefix" = x; then
54889     # As a simple fix, exclude /usr/bin since it's not a real path.
54890     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54891       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54892       # a path prefixed by /cygdrive for fixpath to work.
54893       new_path="$CYGWIN_ROOT_PATH$input_path"
54894     fi
54895   fi
54896 
54897 
54898   if test "x$path" != "x$new_path"; then
54899     MSVC_DLL="$new_path"
54900     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54901 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54902   fi
54903 
54904     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54905 
54906   path="$MSVC_DLL"
54907   has_colon=`$ECHO $path | $GREP ^.:`
54908   new_path="$path"
54909   if test "x$has_colon" = x; then
54910     # Not in mixed or Windows style, start by that.
54911     new_path=`cmd //c echo $path`
54912   fi
54913 
54914 
54915   input_path="$new_path"
54916   # Check if we need to convert this using DOS-style short mode. If the path
54917   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54918   # take no chances and rewrite it.
54919   # Note: m4 eats our [], so we need to use [ and ] instead.
54920   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54921   if test "x$has_forbidden_chars" != x; then
54922     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54923     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54924   fi
54925 
54926 
54927   windows_path="$new_path"
54928   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54929     unix_path=`$CYGPATH -u "$windows_path"`
54930     new_path="$unix_path"
54931   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54932     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54933     new_path="$unix_path"
54934   fi
54935 
54936   if test "x$path" != "x$new_path"; then
54937     MSVC_DLL="$new_path"
54938     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54939 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54940   fi
54941 
54942   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54943   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54944 
54945     else
54946       # We're on a unix platform. Hooray! :)
54947       path="$MSVC_DLL"
54948       has_space=`$ECHO "$path" | $GREP " "`
54949       if test "x$has_space" != x; then
54950         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54951 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54952         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54953       fi
54954 
54955       # Use eval to expand a potential ~
54956       eval path="$path"
54957       if test ! -f "$path" && test ! -d "$path"; then
54958         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54959       fi
54960 
54961       if test -d "$path"; then
54962         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54963       else
54964         dir="`$DIRNAME "$path"`"
54965         base="`$BASENAME "$path"`"
54966         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54967       fi
54968     fi
54969   fi
54970 
54971       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54972 $as_echo_n "checking for $DLL_NAME... " >&6; }
54973       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54974 $as_echo "$MSVC_DLL" >&6; }
54975     else
54976       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54977 $as_echo "incorrect, ignoring" >&6; }
54978       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54979 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54980     fi
54981   fi
54982 
54983     fi
54984   fi
54985 
54986   if test "x$MSVC_DLL" = x; then
54987     # Probe: Check in the Boot JDK directory.
54988     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54989 
54990   DLL_NAME="$DLL_NAME"
54991   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54992   METHOD="well-known location in Boot JDK"
54993   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54994     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54995 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54996 
54997     # Need to check if the found msvcr is correct architecture
54998     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54999 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55000     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55001     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55002       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55003       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55004       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55005         CORRECT_MSVCR_ARCH="PE32 executable"
55006       else
55007         CORRECT_MSVCR_ARCH="PE32+ executable"
55008       fi
55009     else
55010       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55011         CORRECT_MSVCR_ARCH=386
55012       else
55013         CORRECT_MSVCR_ARCH=x86-64
55014       fi
55015     fi
55016     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55017       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55018 $as_echo "ok" >&6; }
55019       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55020 
55021   # Only process if variable expands to non-empty
55022 
55023   if test "x$MSVC_DLL" != x; then
55024     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55025 
55026   # Input might be given as Windows format, start by converting to
55027   # unix format.
55028   path="$MSVC_DLL"
55029   new_path=`$CYGPATH -u "$path"`
55030 
55031   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55032   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55033   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55034   # "foo.exe" is OK but "foo" is an error.
55035   #
55036   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55037   # It is also a way to make sure we got the proper file name for the real test later on.
55038   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55039   if test "x$test_shortpath" = x; then
55040     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55041 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55042     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55043   fi
55044 
55045   # Call helper function which possibly converts this using DOS-style short mode.
55046   # If so, the updated path is stored in $new_path.
55047 
55048   input_path="$new_path"
55049   # Check if we need to convert this using DOS-style short mode. If the path
55050   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55051   # take no chances and rewrite it.
55052   # Note: m4 eats our [], so we need to use [ and ] instead.
55053   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55054   if test "x$has_forbidden_chars" != x; then
55055     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55056     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55057     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55058     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55059       # Going to short mode and back again did indeed matter. Since short mode is
55060       # case insensitive, let's make it lowercase to improve readability.
55061       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55062       # Now convert it back to Unix-style (cygpath)
55063       input_path=`$CYGPATH -u "$shortmode_path"`
55064       new_path="$input_path"
55065     fi
55066   fi
55067 
55068   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55069   if test "x$test_cygdrive_prefix" = x; then
55070     # As a simple fix, exclude /usr/bin since it's not a real path.
55071     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55072       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55073       # a path prefixed by /cygdrive for fixpath to work.
55074       new_path="$CYGWIN_ROOT_PATH$input_path"
55075     fi
55076   fi
55077 
55078 
55079   if test "x$path" != "x$new_path"; then
55080     MSVC_DLL="$new_path"
55081     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55082 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55083   fi
55084 
55085     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55086 
55087   path="$MSVC_DLL"
55088   has_colon=`$ECHO $path | $GREP ^.:`
55089   new_path="$path"
55090   if test "x$has_colon" = x; then
55091     # Not in mixed or Windows style, start by that.
55092     new_path=`cmd //c echo $path`
55093   fi
55094 
55095 
55096   input_path="$new_path"
55097   # Check if we need to convert this using DOS-style short mode. If the path
55098   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55099   # take no chances and rewrite it.
55100   # Note: m4 eats our [], so we need to use [ and ] instead.
55101   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55102   if test "x$has_forbidden_chars" != x; then
55103     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55104     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55105   fi
55106 
55107 
55108   windows_path="$new_path"
55109   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55110     unix_path=`$CYGPATH -u "$windows_path"`
55111     new_path="$unix_path"
55112   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55113     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55114     new_path="$unix_path"
55115   fi
55116 
55117   if test "x$path" != "x$new_path"; then
55118     MSVC_DLL="$new_path"
55119     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55120 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55121   fi
55122 
55123   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55124   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55125 
55126     else
55127       # We're on a unix platform. Hooray! :)
55128       path="$MSVC_DLL"
55129       has_space=`$ECHO "$path" | $GREP " "`
55130       if test "x$has_space" != x; then
55131         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55132 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55133         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55134       fi
55135 
55136       # Use eval to expand a potential ~
55137       eval path="$path"
55138       if test ! -f "$path" && test ! -d "$path"; then
55139         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55140       fi
55141 
55142       if test -d "$path"; then
55143         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55144       else
55145         dir="`$DIRNAME "$path"`"
55146         base="`$BASENAME "$path"`"
55147         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55148       fi
55149     fi
55150   fi
55151 
55152       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55153 $as_echo_n "checking for $DLL_NAME... " >&6; }
55154       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55155 $as_echo "$MSVC_DLL" >&6; }
55156     else
55157       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55158 $as_echo "incorrect, ignoring" >&6; }
55159       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55160 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55161     fi
55162   fi
55163 
55164   fi
55165 
55166   if test "x$MSVC_DLL" = x; then
55167     # Probe: Look in the Windows system32 directory
55168     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55169 
55170   windows_path="$CYGWIN_SYSTEMROOT"
55171   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55172     unix_path=`$CYGPATH -u "$windows_path"`
55173     CYGWIN_SYSTEMROOT="$unix_path"
55174   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55175     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55176     CYGWIN_SYSTEMROOT="$unix_path"
55177   fi
55178 
55179     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55180 
55181   DLL_NAME="$DLL_NAME"
55182   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55183   METHOD="well-known location in SYSTEMROOT"
55184   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55185     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55186 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55187 
55188     # Need to check if the found msvcr is correct architecture
55189     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55190 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55191     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55192     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55193       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55194       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55195       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55196         CORRECT_MSVCR_ARCH="PE32 executable"
55197       else
55198         CORRECT_MSVCR_ARCH="PE32+ executable"
55199       fi
55200     else
55201       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55202         CORRECT_MSVCR_ARCH=386
55203       else
55204         CORRECT_MSVCR_ARCH=x86-64
55205       fi
55206     fi
55207     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55208       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55209 $as_echo "ok" >&6; }
55210       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55211 
55212   # Only process if variable expands to non-empty
55213 
55214   if test "x$MSVC_DLL" != x; then
55215     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55216 
55217   # Input might be given as Windows format, start by converting to
55218   # unix format.
55219   path="$MSVC_DLL"
55220   new_path=`$CYGPATH -u "$path"`
55221 
55222   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55223   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55224   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55225   # "foo.exe" is OK but "foo" is an error.
55226   #
55227   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55228   # It is also a way to make sure we got the proper file name for the real test later on.
55229   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55230   if test "x$test_shortpath" = x; then
55231     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55232 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55233     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55234   fi
55235 
55236   # Call helper function which possibly converts this using DOS-style short mode.
55237   # If so, the updated path is stored in $new_path.
55238 
55239   input_path="$new_path"
55240   # Check if we need to convert this using DOS-style short mode. If the path
55241   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55242   # take no chances and rewrite it.
55243   # Note: m4 eats our [], so we need to use [ and ] instead.
55244   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55245   if test "x$has_forbidden_chars" != x; then
55246     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55247     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55248     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55249     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55250       # Going to short mode and back again did indeed matter. Since short mode is
55251       # case insensitive, let's make it lowercase to improve readability.
55252       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55253       # Now convert it back to Unix-style (cygpath)
55254       input_path=`$CYGPATH -u "$shortmode_path"`
55255       new_path="$input_path"
55256     fi
55257   fi
55258 
55259   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55260   if test "x$test_cygdrive_prefix" = x; then
55261     # As a simple fix, exclude /usr/bin since it's not a real path.
55262     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55263       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55264       # a path prefixed by /cygdrive for fixpath to work.
55265       new_path="$CYGWIN_ROOT_PATH$input_path"
55266     fi
55267   fi
55268 
55269 
55270   if test "x$path" != "x$new_path"; then
55271     MSVC_DLL="$new_path"
55272     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55273 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55274   fi
55275 
55276     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55277 
55278   path="$MSVC_DLL"
55279   has_colon=`$ECHO $path | $GREP ^.:`
55280   new_path="$path"
55281   if test "x$has_colon" = x; then
55282     # Not in mixed or Windows style, start by that.
55283     new_path=`cmd //c echo $path`
55284   fi
55285 
55286 
55287   input_path="$new_path"
55288   # Check if we need to convert this using DOS-style short mode. If the path
55289   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55290   # take no chances and rewrite it.
55291   # Note: m4 eats our [], so we need to use [ and ] instead.
55292   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55293   if test "x$has_forbidden_chars" != x; then
55294     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55295     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55296   fi
55297 
55298 
55299   windows_path="$new_path"
55300   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55301     unix_path=`$CYGPATH -u "$windows_path"`
55302     new_path="$unix_path"
55303   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55304     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55305     new_path="$unix_path"
55306   fi
55307 
55308   if test "x$path" != "x$new_path"; then
55309     MSVC_DLL="$new_path"
55310     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55311 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55312   fi
55313 
55314   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55315   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55316 
55317     else
55318       # We're on a unix platform. Hooray! :)
55319       path="$MSVC_DLL"
55320       has_space=`$ECHO "$path" | $GREP " "`
55321       if test "x$has_space" != x; then
55322         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55323 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55324         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55325       fi
55326 
55327       # Use eval to expand a potential ~
55328       eval path="$path"
55329       if test ! -f "$path" && test ! -d "$path"; then
55330         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55331       fi
55332 
55333       if test -d "$path"; then
55334         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55335       else
55336         dir="`$DIRNAME "$path"`"
55337         base="`$BASENAME "$path"`"
55338         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55339       fi
55340     fi
55341   fi
55342 
55343       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55344 $as_echo_n "checking for $DLL_NAME... " >&6; }
55345       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55346 $as_echo "$MSVC_DLL" >&6; }
55347     else
55348       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55349 $as_echo "incorrect, ignoring" >&6; }
55350       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55351 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55352     fi
55353   fi
55354 
55355   fi
55356 
55357   if test "x$MSVC_DLL" = x; then
55358     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55359     if test "x$VS100COMNTOOLS" != x; then
55360       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55361 
55362   windows_path="$CYGWIN_VS_TOOLS_DIR"
55363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55364     unix_path=`$CYGPATH -u "$windows_path"`
55365     CYGWIN_VS_TOOLS_DIR="$unix_path"
55366   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55367     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55368     CYGWIN_VS_TOOLS_DIR="$unix_path"
55369   fi
55370 
55371       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55372         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55373             | $GREP -i /x64/ | $HEAD --lines 1`
55374       else
55375         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55376             | $GREP -i /x86/ | $HEAD --lines 1`
55377       fi
55378 
55379   DLL_NAME="$DLL_NAME"
55380   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55381   METHOD="search of VS100COMNTOOLS"
55382   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55383     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55384 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55385 
55386     # Need to check if the found msvcr is correct architecture
55387     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55388 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55389     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55390     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55391       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55392       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55393       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55394         CORRECT_MSVCR_ARCH="PE32 executable"
55395       else
55396         CORRECT_MSVCR_ARCH="PE32+ executable"
55397       fi
55398     else
55399       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55400         CORRECT_MSVCR_ARCH=386
55401       else
55402         CORRECT_MSVCR_ARCH=x86-64
55403       fi
55404     fi
55405     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55406       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55407 $as_echo "ok" >&6; }
55408       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55409 
55410   # Only process if variable expands to non-empty
55411 
55412   if test "x$MSVC_DLL" != x; then
55413     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55414 
55415   # Input might be given as Windows format, start by converting to
55416   # unix format.
55417   path="$MSVC_DLL"
55418   new_path=`$CYGPATH -u "$path"`
55419 
55420   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55421   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55422   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55423   # "foo.exe" is OK but "foo" is an error.
55424   #
55425   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55426   # It is also a way to make sure we got the proper file name for the real test later on.
55427   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55428   if test "x$test_shortpath" = x; then
55429     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55430 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55431     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55432   fi
55433 
55434   # Call helper function which possibly converts this using DOS-style short mode.
55435   # If so, the updated path is stored in $new_path.
55436 
55437   input_path="$new_path"
55438   # Check if we need to convert this using DOS-style short mode. If the path
55439   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55440   # take no chances and rewrite it.
55441   # Note: m4 eats our [], so we need to use [ and ] instead.
55442   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55443   if test "x$has_forbidden_chars" != x; then
55444     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55445     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55446     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55447     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55448       # Going to short mode and back again did indeed matter. Since short mode is
55449       # case insensitive, let's make it lowercase to improve readability.
55450       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55451       # Now convert it back to Unix-style (cygpath)
55452       input_path=`$CYGPATH -u "$shortmode_path"`
55453       new_path="$input_path"
55454     fi
55455   fi
55456 
55457   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55458   if test "x$test_cygdrive_prefix" = x; then
55459     # As a simple fix, exclude /usr/bin since it's not a real path.
55460     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55461       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55462       # a path prefixed by /cygdrive for fixpath to work.
55463       new_path="$CYGWIN_ROOT_PATH$input_path"
55464     fi
55465   fi
55466 
55467 
55468   if test "x$path" != "x$new_path"; then
55469     MSVC_DLL="$new_path"
55470     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55471 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55472   fi
55473 
55474     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55475 
55476   path="$MSVC_DLL"
55477   has_colon=`$ECHO $path | $GREP ^.:`
55478   new_path="$path"
55479   if test "x$has_colon" = x; then
55480     # Not in mixed or Windows style, start by that.
55481     new_path=`cmd //c echo $path`
55482   fi
55483 
55484 
55485   input_path="$new_path"
55486   # Check if we need to convert this using DOS-style short mode. If the path
55487   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55488   # take no chances and rewrite it.
55489   # Note: m4 eats our [], so we need to use [ and ] instead.
55490   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55491   if test "x$has_forbidden_chars" != x; then
55492     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55493     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55494   fi
55495 
55496 
55497   windows_path="$new_path"
55498   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55499     unix_path=`$CYGPATH -u "$windows_path"`
55500     new_path="$unix_path"
55501   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55502     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55503     new_path="$unix_path"
55504   fi
55505 
55506   if test "x$path" != "x$new_path"; then
55507     MSVC_DLL="$new_path"
55508     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55509 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55510   fi
55511 
55512   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55513   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55514 
55515     else
55516       # We're on a unix platform. Hooray! :)
55517       path="$MSVC_DLL"
55518       has_space=`$ECHO "$path" | $GREP " "`
55519       if test "x$has_space" != x; then
55520         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55521 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55522         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55523       fi
55524 
55525       # Use eval to expand a potential ~
55526       eval path="$path"
55527       if test ! -f "$path" && test ! -d "$path"; then
55528         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55529       fi
55530 
55531       if test -d "$path"; then
55532         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55533       else
55534         dir="`$DIRNAME "$path"`"
55535         base="`$BASENAME "$path"`"
55536         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55537       fi
55538     fi
55539   fi
55540 
55541       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55542 $as_echo_n "checking for $DLL_NAME... " >&6; }
55543       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55544 $as_echo "$MSVC_DLL" >&6; }
55545     else
55546       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55547 $as_echo "incorrect, ignoring" >&6; }
55548       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55549 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55550     fi
55551   fi
55552 
55553     fi
55554   fi
55555 
55556   if test "x$MSVC_DLL" = x; then
55557     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55558     # (This was the original behaviour; kept since it might turn something up)
55559     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55560       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55561         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55562             | $GREP x64 | $HEAD --lines 1`
55563       else
55564         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55565             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55566         if test "x$POSSIBLE_MSVC_DLL" = x; then
55567           # We're grasping at straws now...
55568           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55569               | $HEAD --lines 1`
55570         fi
55571       fi
55572 
55573 
55574   DLL_NAME="$DLL_NAME"
55575   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55576   METHOD="search of VCINSTALLDIR"
55577   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55578     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55579 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55580 
55581     # Need to check if the found msvcr is correct architecture
55582     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55583 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55584     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55585     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55586       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55587       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55588       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55589         CORRECT_MSVCR_ARCH="PE32 executable"
55590       else
55591         CORRECT_MSVCR_ARCH="PE32+ executable"
55592       fi
55593     else
55594       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55595         CORRECT_MSVCR_ARCH=386
55596       else
55597         CORRECT_MSVCR_ARCH=x86-64
55598       fi
55599     fi
55600     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55601       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55602 $as_echo "ok" >&6; }
55603       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55604 
55605   # Only process if variable expands to non-empty
55606 
55607   if test "x$MSVC_DLL" != x; then
55608     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55609 
55610   # Input might be given as Windows format, start by converting to
55611   # unix format.
55612   path="$MSVC_DLL"
55613   new_path=`$CYGPATH -u "$path"`
55614 
55615   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55616   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55617   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55618   # "foo.exe" is OK but "foo" is an error.
55619   #
55620   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55621   # It is also a way to make sure we got the proper file name for the real test later on.
55622   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55623   if test "x$test_shortpath" = x; then
55624     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55625 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55626     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55627   fi
55628 
55629   # Call helper function which possibly converts this using DOS-style short mode.
55630   # If so, the updated path is stored in $new_path.
55631 
55632   input_path="$new_path"
55633   # Check if we need to convert this using DOS-style short mode. If the path
55634   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55635   # take no chances and rewrite it.
55636   # Note: m4 eats our [], so we need to use [ and ] instead.
55637   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55638   if test "x$has_forbidden_chars" != x; then
55639     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55640     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55641     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55642     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55643       # Going to short mode and back again did indeed matter. Since short mode is
55644       # case insensitive, let's make it lowercase to improve readability.
55645       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55646       # Now convert it back to Unix-style (cygpath)
55647       input_path=`$CYGPATH -u "$shortmode_path"`
55648       new_path="$input_path"
55649     fi
55650   fi
55651 
55652   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55653   if test "x$test_cygdrive_prefix" = x; then
55654     # As a simple fix, exclude /usr/bin since it's not a real path.
55655     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55656       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55657       # a path prefixed by /cygdrive for fixpath to work.
55658       new_path="$CYGWIN_ROOT_PATH$input_path"
55659     fi
55660   fi
55661 
55662 
55663   if test "x$path" != "x$new_path"; then
55664     MSVC_DLL="$new_path"
55665     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55666 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55667   fi
55668 
55669     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55670 
55671   path="$MSVC_DLL"
55672   has_colon=`$ECHO $path | $GREP ^.:`
55673   new_path="$path"
55674   if test "x$has_colon" = x; then
55675     # Not in mixed or Windows style, start by that.
55676     new_path=`cmd //c echo $path`
55677   fi
55678 
55679 
55680   input_path="$new_path"
55681   # Check if we need to convert this using DOS-style short mode. If the path
55682   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55683   # take no chances and rewrite it.
55684   # Note: m4 eats our [], so we need to use [ and ] instead.
55685   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55686   if test "x$has_forbidden_chars" != x; then
55687     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55688     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55689   fi
55690 
55691 
55692   windows_path="$new_path"
55693   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55694     unix_path=`$CYGPATH -u "$windows_path"`
55695     new_path="$unix_path"
55696   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55697     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55698     new_path="$unix_path"
55699   fi
55700 
55701   if test "x$path" != "x$new_path"; then
55702     MSVC_DLL="$new_path"
55703     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55704 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55705   fi
55706 
55707   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55708   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55709 
55710     else
55711       # We're on a unix platform. Hooray! :)
55712       path="$MSVC_DLL"
55713       has_space=`$ECHO "$path" | $GREP " "`
55714       if test "x$has_space" != x; then
55715         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55716 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55717         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55718       fi
55719 
55720       # Use eval to expand a potential ~
55721       eval path="$path"
55722       if test ! -f "$path" && test ! -d "$path"; then
55723         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55724       fi
55725 
55726       if test -d "$path"; then
55727         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55728       else
55729         dir="`$DIRNAME "$path"`"
55730         base="`$BASENAME "$path"`"
55731         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55732       fi
55733     fi
55734   fi
55735 
55736       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55737 $as_echo_n "checking for $DLL_NAME... " >&6; }
55738       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55739 $as_echo "$MSVC_DLL" >&6; }
55740     else
55741       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55742 $as_echo "incorrect, ignoring" >&6; }
55743       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55744 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55745     fi
55746   fi
55747 
55748     fi
55749   fi
55750 
55751   if test "x$MSVC_DLL" = x; then
55752     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55753 $as_echo_n "checking for $DLL_NAME... " >&6; }
55754     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55755 $as_echo "no" >&6; }
55756     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55757   fi
55758 
55759       MSVCP_DLL="$MSVC_DLL"
55760     fi
55761 
55762   fi
55763 
55764   fi
55765 
55766 
55767   if test "x$NEEDS_LIB_X11" = xfalse; then
55768     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55769       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55770 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55771     fi
55772     X_CFLAGS=
55773     X_LIBS=
55774   else
55775 
55776     if test "x${with_x}" = xno; then
55777       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55778     fi
55779 
55780     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55781       # The user has specified a X11 base directory. Use it for includes and
55782       # libraries, unless explicitly overridden.
55783       if test "x$x_includes" = xNONE; then
55784         x_includes="${with_x}/include"
55785       fi
55786       if test "x$x_libraries" = xNONE; then
55787         x_libraries="${with_x}/lib"
55788       fi
55789     else
55790       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55791       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55792       # --x-libraries for the sysroot, if that seems to be correct.
55793       if test "x$SYSROOT" != "x"; then
55794         if test "x$x_includes" = xNONE; then
55795           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55796             x_includes="$SYSROOT/usr/X11R6/include"
55797           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55798             x_includes="$SYSROOT/usr/include"
55799           fi
55800         fi
55801         if test "x$x_libraries" = xNONE; then
55802           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55803             x_libraries="$SYSROOT/usr/X11R6/lib"
55804           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55805             x_libraries="$SYSROOT/usr/lib64"
55806           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55807             x_libraries="$SYSROOT/usr/lib"
55808           fi
55809         fi
55810       fi
55811     fi
55812 
55813     # Now let autoconf do it's magic
55814     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55815 $as_echo_n "checking for X... " >&6; }
55816 
55817 
55818 # Check whether --with-x was given.
55819 if test "${with_x+set}" = set; then :
55820   withval=$with_x;
55821 fi
55822 
55823 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55824 if test "x$with_x" = xno; then
55825   # The user explicitly disabled X.
55826   have_x=disabled
55827 else
55828   case $x_includes,$x_libraries in #(
55829     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55830     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55831   $as_echo_n "(cached) " >&6
55832 else
55833   # One or both of the vars are not set, and there is no cached value.
55834 ac_x_includes=no ac_x_libraries=no
55835 rm -f -r conftest.dir
55836 if mkdir conftest.dir; then
55837   cd conftest.dir
55838   cat >Imakefile <<'_ACEOF'
55839 incroot:
55840         @echo incroot='${INCROOT}'
55841 usrlibdir:
55842         @echo usrlibdir='${USRLIBDIR}'
55843 libdir:
55844         @echo libdir='${LIBDIR}'
55845 _ACEOF
55846   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55847     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55848     for ac_var in incroot usrlibdir libdir; do
55849       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55850     done
55851     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55852     for ac_extension in a so sl dylib la dll; do
55853       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55854          test -f "$ac_im_libdir/libX11.$ac_extension"; then
55855         ac_im_usrlibdir=$ac_im_libdir; break
55856       fi
55857     done
55858     # Screen out bogus values from the imake configuration.  They are
55859     # bogus both because they are the default anyway, and because
55860     # using them would break gcc on systems where it needs fixed includes.
55861     case $ac_im_incroot in
55862         /usr/include) ac_x_includes= ;;
55863         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55864     esac
55865     case $ac_im_usrlibdir in
55866         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
55867         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55868     esac
55869   fi
55870   cd ..
55871   rm -f -r conftest.dir
55872 fi
55873 
55874 # Standard set of common directories for X headers.
55875 # Check X11 before X11Rn because it is often a symlink to the current release.
55876 ac_x_header_dirs='
55877 /usr/X11/include
55878 /usr/X11R7/include
55879 /usr/X11R6/include
55880 /usr/X11R5/include
55881 /usr/X11R4/include
55882 
55883 /usr/include/X11
55884 /usr/include/X11R7
55885 /usr/include/X11R6
55886 /usr/include/X11R5
55887 /usr/include/X11R4
55888 
55889 /usr/local/X11/include
55890 /usr/local/X11R7/include
55891 /usr/local/X11R6/include
55892 /usr/local/X11R5/include
55893 /usr/local/X11R4/include
55894 
55895 /usr/local/include/X11
55896 /usr/local/include/X11R7
55897 /usr/local/include/X11R6
55898 /usr/local/include/X11R5
55899 /usr/local/include/X11R4
55900 
55901 /usr/X386/include
55902 /usr/x386/include
55903 /usr/XFree86/include/X11
55904 
55905 /usr/include
55906 /usr/local/include
55907 /usr/unsupported/include
55908 /usr/athena/include
55909 /usr/local/x11r5/include
55910 /usr/lpp/Xamples/include
55911 
55912 /usr/openwin/include
55913 /usr/openwin/share/include'
55914 
55915 if test "$ac_x_includes" = no; then
55916   # Guess where to find include files, by looking for Xlib.h.
55917   # First, try using that file with no special directory specified.
55918   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55919 /* end confdefs.h.  */
55920 #include <X11/Xlib.h>
55921 _ACEOF
55922 if ac_fn_cxx_try_cpp "$LINENO"; then :
55923   # We can compile using X headers with no special include directory.
55924 ac_x_includes=
55925 else
55926   for ac_dir in $ac_x_header_dirs; do
55927   if test -r "$ac_dir/X11/Xlib.h"; then
55928     ac_x_includes=$ac_dir
55929     break
55930   fi
55931 done
55932 fi
55933 rm -f conftest.err conftest.i conftest.$ac_ext
55934 fi # $ac_x_includes = no
55935 
55936 if test "$ac_x_libraries" = no; then
55937   # Check for the libraries.
55938   # See if we find them without any special options.
55939   # Don't add to $LIBS permanently.
55940   ac_save_LIBS=$LIBS
55941   LIBS="-lX11 $LIBS"
55942   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55943 /* end confdefs.h.  */
55944 #include <X11/Xlib.h>
55945 int
55946 main ()
55947 {
55948 XrmInitialize ()
55949   ;
55950   return 0;
55951 }
55952 _ACEOF
55953 if ac_fn_cxx_try_link "$LINENO"; then :
55954   LIBS=$ac_save_LIBS
55955 # We can link X programs with no special library path.
55956 ac_x_libraries=
55957 else
55958   LIBS=$ac_save_LIBS
55959 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
55960 do
55961   # Don't even attempt the hair of trying to link an X program!
55962   for ac_extension in a so sl dylib la dll; do
55963     if test -r "$ac_dir/libX11.$ac_extension"; then
55964       ac_x_libraries=$ac_dir
55965       break 2
55966     fi
55967   done
55968 done
55969 fi
55970 rm -f core conftest.err conftest.$ac_objext \
55971     conftest$ac_exeext conftest.$ac_ext
55972 fi # $ac_x_libraries = no
55973 
55974 case $ac_x_includes,$ac_x_libraries in #(
55975   no,* | *,no | *\'*)
55976     # Didn't find X, or a directory has "'" in its name.
55977     ac_cv_have_x="have_x=no";; #(
55978   *)
55979     # Record where we found X for the cache.
55980     ac_cv_have_x="have_x=yes\
55981         ac_x_includes='$ac_x_includes'\
55982         ac_x_libraries='$ac_x_libraries'"
55983 esac
55984 fi
55985 ;; #(
55986     *) have_x=yes;;
55987   esac
55988   eval "$ac_cv_have_x"
55989 fi # $with_x != no
55990 
55991 if test "$have_x" != yes; then
55992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
55993 $as_echo "$have_x" >&6; }
55994   no_x=yes
55995 else
55996   # If each of the values was on the command line, it overrides each guess.
55997   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
55998   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
55999   # Update the cache value to reflect the command line values.
56000   ac_cv_have_x="have_x=yes\
56001         ac_x_includes='$x_includes'\
56002         ac_x_libraries='$x_libraries'"
56003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56004 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56005 fi
56006 
56007     if test "$no_x" = yes; then
56008   # Not all programs may use this symbol, but it does not hurt to define it.
56009 
56010 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56011 
56012   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56013 else
56014   if test -n "$x_includes"; then
56015     X_CFLAGS="$X_CFLAGS -I$x_includes"
56016   fi
56017 
56018   # It would also be nice to do this for all -L options, not just this one.
56019   if test -n "$x_libraries"; then
56020     X_LIBS="$X_LIBS -L$x_libraries"
56021     # For Solaris; some versions of Sun CC require a space after -R and
56022     # others require no space.  Words are not sufficient . . . .
56023     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56024 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
56025     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56026     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56027     ac_cxx_werror_flag=yes
56028     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56029 /* end confdefs.h.  */
56030 
56031 int
56032 main ()
56033 {
56034 
56035   ;
56036   return 0;
56037 }
56038 _ACEOF
56039 if ac_fn_cxx_try_link "$LINENO"; then :
56040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56041 $as_echo "no" >&6; }
56042        X_LIBS="$X_LIBS -R$x_libraries"
56043 else
56044   LIBS="$ac_xsave_LIBS -R $x_libraries"
56045        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56046 /* end confdefs.h.  */
56047 
56048 int
56049 main ()
56050 {
56051 
56052   ;
56053   return 0;
56054 }
56055 _ACEOF
56056 if ac_fn_cxx_try_link "$LINENO"; then :
56057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56058 $as_echo "yes" >&6; }
56059           X_LIBS="$X_LIBS -R $x_libraries"
56060 else
56061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56062 $as_echo "neither works" >&6; }
56063 fi
56064 rm -f core conftest.err conftest.$ac_objext \
56065     conftest$ac_exeext conftest.$ac_ext
56066 fi
56067 rm -f core conftest.err conftest.$ac_objext \
56068     conftest$ac_exeext conftest.$ac_ext
56069     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56070     LIBS=$ac_xsave_LIBS
56071   fi
56072 
56073   # Check for system-dependent libraries X programs must link with.
56074   # Do this before checking for the system-independent R6 libraries
56075   # (-lICE), since we may need -lsocket or whatever for X linking.
56076 
56077   if test "$ISC" = yes; then
56078     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56079   else
56080     # Martyn Johnson says this is needed for Ultrix, if the X
56081     # libraries were built with DECnet support.  And Karl Berry says
56082     # the Alpha needs dnet_stub (dnet does not exist).
56083     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56084     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56085 /* end confdefs.h.  */
56086 
56087 /* Override any GCC internal prototype to avoid an error.
56088    Use char because int might match the return type of a GCC
56089    builtin and then its argument prototype would still apply.  */
56090 #ifdef __cplusplus
56091 extern "C"
56092 #endif
56093 char XOpenDisplay ();
56094 int
56095 main ()
56096 {
56097 return XOpenDisplay ();
56098   ;
56099   return 0;
56100 }
56101 _ACEOF
56102 if ac_fn_cxx_try_link "$LINENO"; then :
56103 
56104 else
56105   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56106 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56107 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56108   $as_echo_n "(cached) " >&6
56109 else
56110   ac_check_lib_save_LIBS=$LIBS
56111 LIBS="-ldnet  $LIBS"
56112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56113 /* end confdefs.h.  */
56114 
56115 /* Override any GCC internal prototype to avoid an error.
56116    Use char because int might match the return type of a GCC
56117    builtin and then its argument prototype would still apply.  */
56118 #ifdef __cplusplus
56119 extern "C"
56120 #endif
56121 char dnet_ntoa ();
56122 int
56123 main ()
56124 {
56125 return dnet_ntoa ();
56126   ;
56127   return 0;
56128 }
56129 _ACEOF
56130 if ac_fn_cxx_try_link "$LINENO"; then :
56131   ac_cv_lib_dnet_dnet_ntoa=yes
56132 else
56133   ac_cv_lib_dnet_dnet_ntoa=no
56134 fi
56135 rm -f core conftest.err conftest.$ac_objext \
56136     conftest$ac_exeext conftest.$ac_ext
56137 LIBS=$ac_check_lib_save_LIBS
56138 fi
56139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56140 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56141 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56142   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56143 fi
56144 
56145     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56146       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56147 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56148 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56149   $as_echo_n "(cached) " >&6
56150 else
56151   ac_check_lib_save_LIBS=$LIBS
56152 LIBS="-ldnet_stub  $LIBS"
56153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56154 /* end confdefs.h.  */
56155 
56156 /* Override any GCC internal prototype to avoid an error.
56157    Use char because int might match the return type of a GCC
56158    builtin and then its argument prototype would still apply.  */
56159 #ifdef __cplusplus
56160 extern "C"
56161 #endif
56162 char dnet_ntoa ();
56163 int
56164 main ()
56165 {
56166 return dnet_ntoa ();
56167   ;
56168   return 0;
56169 }
56170 _ACEOF
56171 if ac_fn_cxx_try_link "$LINENO"; then :
56172   ac_cv_lib_dnet_stub_dnet_ntoa=yes
56173 else
56174   ac_cv_lib_dnet_stub_dnet_ntoa=no
56175 fi
56176 rm -f core conftest.err conftest.$ac_objext \
56177     conftest$ac_exeext conftest.$ac_ext
56178 LIBS=$ac_check_lib_save_LIBS
56179 fi
56180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56181 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56182 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56183   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56184 fi
56185 
56186     fi
56187 fi
56188 rm -f core conftest.err conftest.$ac_objext \
56189     conftest$ac_exeext conftest.$ac_ext
56190     LIBS="$ac_xsave_LIBS"
56191 
56192     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56193     # to get the SysV transport functions.
56194     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56195     # needs -lnsl.
56196     # The nsl library prevents programs from opening the X display
56197     # on Irix 5.2, according to T.E. Dickey.
56198     # The functions gethostbyname, getservbyname, and inet_addr are
56199     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56200     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56201 if test "x$ac_cv_func_gethostbyname" = xyes; then :
56202 
56203 fi
56204 
56205     if test $ac_cv_func_gethostbyname = no; then
56206       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56207 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56208 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56209   $as_echo_n "(cached) " >&6
56210 else
56211   ac_check_lib_save_LIBS=$LIBS
56212 LIBS="-lnsl  $LIBS"
56213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56214 /* end confdefs.h.  */
56215 
56216 /* Override any GCC internal prototype to avoid an error.
56217    Use char because int might match the return type of a GCC
56218    builtin and then its argument prototype would still apply.  */
56219 #ifdef __cplusplus
56220 extern "C"
56221 #endif
56222 char gethostbyname ();
56223 int
56224 main ()
56225 {
56226 return gethostbyname ();
56227   ;
56228   return 0;
56229 }
56230 _ACEOF
56231 if ac_fn_cxx_try_link "$LINENO"; then :
56232   ac_cv_lib_nsl_gethostbyname=yes
56233 else
56234   ac_cv_lib_nsl_gethostbyname=no
56235 fi
56236 rm -f core conftest.err conftest.$ac_objext \
56237     conftest$ac_exeext conftest.$ac_ext
56238 LIBS=$ac_check_lib_save_LIBS
56239 fi
56240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56241 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56242 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56243   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56244 fi
56245 
56246       if test $ac_cv_lib_nsl_gethostbyname = no; then
56247         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56248 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56249 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56250   $as_echo_n "(cached) " >&6
56251 else
56252   ac_check_lib_save_LIBS=$LIBS
56253 LIBS="-lbsd  $LIBS"
56254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56255 /* end confdefs.h.  */
56256 
56257 /* Override any GCC internal prototype to avoid an error.
56258    Use char because int might match the return type of a GCC
56259    builtin and then its argument prototype would still apply.  */
56260 #ifdef __cplusplus
56261 extern "C"
56262 #endif
56263 char gethostbyname ();
56264 int
56265 main ()
56266 {
56267 return gethostbyname ();
56268   ;
56269   return 0;
56270 }
56271 _ACEOF
56272 if ac_fn_cxx_try_link "$LINENO"; then :
56273   ac_cv_lib_bsd_gethostbyname=yes
56274 else
56275   ac_cv_lib_bsd_gethostbyname=no
56276 fi
56277 rm -f core conftest.err conftest.$ac_objext \
56278     conftest$ac_exeext conftest.$ac_ext
56279 LIBS=$ac_check_lib_save_LIBS
56280 fi
56281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56282 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56283 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56284   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56285 fi
56286 
56287       fi
56288     fi
56289 
56290     # lieder@skyler.mavd.honeywell.com says without -lsocket,
56291     # socket/setsockopt and other routines are undefined under SCO ODT
56292     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56293     # on later versions), says Simon Leinen: it contains gethostby*
56294     # variants that don't use the name server (or something).  -lsocket
56295     # must be given before -lnsl if both are needed.  We assume that
56296     # if connect needs -lnsl, so does gethostbyname.
56297     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56298 if test "x$ac_cv_func_connect" = xyes; then :
56299 
56300 fi
56301 
56302     if test $ac_cv_func_connect = no; then
56303       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56304 $as_echo_n "checking for connect in -lsocket... " >&6; }
56305 if ${ac_cv_lib_socket_connect+:} false; then :
56306   $as_echo_n "(cached) " >&6
56307 else
56308   ac_check_lib_save_LIBS=$LIBS
56309 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56311 /* end confdefs.h.  */
56312 
56313 /* Override any GCC internal prototype to avoid an error.
56314    Use char because int might match the return type of a GCC
56315    builtin and then its argument prototype would still apply.  */
56316 #ifdef __cplusplus
56317 extern "C"
56318 #endif
56319 char connect ();
56320 int
56321 main ()
56322 {
56323 return connect ();
56324   ;
56325   return 0;
56326 }
56327 _ACEOF
56328 if ac_fn_cxx_try_link "$LINENO"; then :
56329   ac_cv_lib_socket_connect=yes
56330 else
56331   ac_cv_lib_socket_connect=no
56332 fi
56333 rm -f core conftest.err conftest.$ac_objext \
56334     conftest$ac_exeext conftest.$ac_ext
56335 LIBS=$ac_check_lib_save_LIBS
56336 fi
56337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56338 $as_echo "$ac_cv_lib_socket_connect" >&6; }
56339 if test "x$ac_cv_lib_socket_connect" = xyes; then :
56340   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56341 fi
56342 
56343     fi
56344 
56345     # Guillermo Gomez says -lposix is necessary on A/UX.
56346     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56347 if test "x$ac_cv_func_remove" = xyes; then :
56348 
56349 fi
56350 
56351     if test $ac_cv_func_remove = no; then
56352       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56353 $as_echo_n "checking for remove in -lposix... " >&6; }
56354 if ${ac_cv_lib_posix_remove+:} false; then :
56355   $as_echo_n "(cached) " >&6
56356 else
56357   ac_check_lib_save_LIBS=$LIBS
56358 LIBS="-lposix  $LIBS"
56359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56360 /* end confdefs.h.  */
56361 
56362 /* Override any GCC internal prototype to avoid an error.
56363    Use char because int might match the return type of a GCC
56364    builtin and then its argument prototype would still apply.  */
56365 #ifdef __cplusplus
56366 extern "C"
56367 #endif
56368 char remove ();
56369 int
56370 main ()
56371 {
56372 return remove ();
56373   ;
56374   return 0;
56375 }
56376 _ACEOF
56377 if ac_fn_cxx_try_link "$LINENO"; then :
56378   ac_cv_lib_posix_remove=yes
56379 else
56380   ac_cv_lib_posix_remove=no
56381 fi
56382 rm -f core conftest.err conftest.$ac_objext \
56383     conftest$ac_exeext conftest.$ac_ext
56384 LIBS=$ac_check_lib_save_LIBS
56385 fi
56386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56387 $as_echo "$ac_cv_lib_posix_remove" >&6; }
56388 if test "x$ac_cv_lib_posix_remove" = xyes; then :
56389   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56390 fi
56391 
56392     fi
56393 
56394     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56395     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56396 if test "x$ac_cv_func_shmat" = xyes; then :
56397 
56398 fi
56399 
56400     if test $ac_cv_func_shmat = no; then
56401       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56402 $as_echo_n "checking for shmat in -lipc... " >&6; }
56403 if ${ac_cv_lib_ipc_shmat+:} false; then :
56404   $as_echo_n "(cached) " >&6
56405 else
56406   ac_check_lib_save_LIBS=$LIBS
56407 LIBS="-lipc  $LIBS"
56408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56409 /* end confdefs.h.  */
56410 
56411 /* Override any GCC internal prototype to avoid an error.
56412    Use char because int might match the return type of a GCC
56413    builtin and then its argument prototype would still apply.  */
56414 #ifdef __cplusplus
56415 extern "C"
56416 #endif
56417 char shmat ();
56418 int
56419 main ()
56420 {
56421 return shmat ();
56422   ;
56423   return 0;
56424 }
56425 _ACEOF
56426 if ac_fn_cxx_try_link "$LINENO"; then :
56427   ac_cv_lib_ipc_shmat=yes
56428 else
56429   ac_cv_lib_ipc_shmat=no
56430 fi
56431 rm -f core conftest.err conftest.$ac_objext \
56432     conftest$ac_exeext conftest.$ac_ext
56433 LIBS=$ac_check_lib_save_LIBS
56434 fi
56435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56436 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56437 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56438   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56439 fi
56440 
56441     fi
56442   fi
56443 
56444   # Check for libraries that X11R6 Xt/Xaw programs need.
56445   ac_save_LDFLAGS=$LDFLAGS
56446   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56447   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56448   # check for ICE first), but we must link in the order -lSM -lICE or
56449   # we get undefined symbols.  So assume we have SM if we have ICE.
56450   # These have to be linked with before -lX11, unlike the other
56451   # libraries we check for below, so use a different variable.
56452   # John Interrante, Karl Berry
56453   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56454 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56455 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56456   $as_echo_n "(cached) " >&6
56457 else
56458   ac_check_lib_save_LIBS=$LIBS
56459 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56461 /* end confdefs.h.  */
56462 
56463 /* Override any GCC internal prototype to avoid an error.
56464    Use char because int might match the return type of a GCC
56465    builtin and then its argument prototype would still apply.  */
56466 #ifdef __cplusplus
56467 extern "C"
56468 #endif
56469 char IceConnectionNumber ();
56470 int
56471 main ()
56472 {
56473 return IceConnectionNumber ();
56474   ;
56475   return 0;
56476 }
56477 _ACEOF
56478 if ac_fn_cxx_try_link "$LINENO"; then :
56479   ac_cv_lib_ICE_IceConnectionNumber=yes
56480 else
56481   ac_cv_lib_ICE_IceConnectionNumber=no
56482 fi
56483 rm -f core conftest.err conftest.$ac_objext \
56484     conftest$ac_exeext conftest.$ac_ext
56485 LIBS=$ac_check_lib_save_LIBS
56486 fi
56487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56488 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56489 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56490   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56491 fi
56492 
56493   LDFLAGS=$ac_save_LDFLAGS
56494 
56495 fi
56496 
56497 
56498     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56499     # this doesn't make sense so we remove it.
56500     if test "x$COMPILE_TYPE" = xcross; then
56501       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56502     fi
56503 
56504     if test "x$no_x" = xyes; then
56505 
56506   # Print a helpful message on how to acquire the necessary build dependency.
56507   # x11 is the help tag: freetype, cups, alsa etc
56508   MISSING_DEPENDENCY=x11
56509 
56510   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56511     cygwin_help $MISSING_DEPENDENCY
56512   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56513     msys_help $MISSING_DEPENDENCY
56514   else
56515     PKGHANDLER_COMMAND=
56516 
56517     case $PKGHANDLER in
56518       apt-get)
56519         apt_help     $MISSING_DEPENDENCY ;;
56520       yum)
56521         yum_help     $MISSING_DEPENDENCY ;;
56522       port)
56523         port_help    $MISSING_DEPENDENCY ;;
56524       pkgutil)
56525         pkgutil_help $MISSING_DEPENDENCY ;;
56526       pkgadd)
56527         pkgadd_help  $MISSING_DEPENDENCY ;;
56528     esac
56529 
56530     if test "x$PKGHANDLER_COMMAND" != x; then
56531       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56532     fi
56533   fi
56534 
56535       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56536     fi
56537 
56538     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56539       OPENWIN_HOME="/usr/openwin"
56540       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56541       X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56542           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56543     fi
56544 
56545     ac_ext=c
56546 ac_cpp='$CPP $CPPFLAGS'
56547 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56548 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56549 ac_compiler_gnu=$ac_cv_c_compiler_gnu
56550 
56551     OLD_CFLAGS="$CFLAGS"
56552     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56553 
56554     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56555     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56556 do :
56557   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56558 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56559           # include <X11/Xlib.h>
56560           # include <X11/Xutil.h>
56561 
56562 
56563 "
56564 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56565   cat >>confdefs.h <<_ACEOF
56566 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56567 _ACEOF
56568  X11_HEADERS_OK=yes
56569 else
56570   X11_HEADERS_OK=no; break
56571 fi
56572 
56573 done
56574 
56575 
56576     if test "x$X11_HEADERS_OK" = xno; then
56577 
56578   # Print a helpful message on how to acquire the necessary build dependency.
56579   # x11 is the help tag: freetype, cups, alsa etc
56580   MISSING_DEPENDENCY=x11
56581 
56582   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56583     cygwin_help $MISSING_DEPENDENCY
56584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56585     msys_help $MISSING_DEPENDENCY
56586   else
56587     PKGHANDLER_COMMAND=
56588 
56589     case $PKGHANDLER in
56590       apt-get)
56591         apt_help     $MISSING_DEPENDENCY ;;
56592       yum)
56593         yum_help     $MISSING_DEPENDENCY ;;
56594       port)
56595         port_help    $MISSING_DEPENDENCY ;;
56596       pkgutil)
56597         pkgutil_help $MISSING_DEPENDENCY ;;
56598       pkgadd)
56599         pkgadd_help  $MISSING_DEPENDENCY ;;
56600     esac
56601 
56602     if test "x$PKGHANDLER_COMMAND" != x; then
56603       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56604     fi
56605   fi
56606 
56607       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56608     fi
56609 
56610     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56611     # defined in libawt_xawt.
56612     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56613 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56614     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56615 /* end confdefs.h.  */
56616 #include <X11/extensions/Xrender.h>
56617 int
56618 main ()
56619 {
56620 XLinearGradient x;
56621   ;
56622   return 0;
56623 }
56624 _ACEOF
56625 if ac_fn_c_try_compile "$LINENO"; then :
56626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56627 $as_echo "yes" >&6; }
56628 else
56629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56630 $as_echo "no" >&6; }
56631          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56632 fi
56633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56634 
56635     CFLAGS="$OLD_CFLAGS"
56636     ac_ext=cpp
56637 ac_cpp='$CXXCPP $CPPFLAGS'
56638 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56639 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56640 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56641 
56642   fi # NEEDS_LIB_X11
56643 
56644 
56645 
56646 
56647 
56648 
56649 # Check whether --with-cups was given.
56650 if test "${with_cups+set}" = set; then :
56651   withval=$with_cups;
56652 fi
56653 
56654 
56655 # Check whether --with-cups-include was given.
56656 if test "${with_cups_include+set}" = set; then :
56657   withval=$with_cups_include;
56658 fi
56659 
56660 
56661   if test "x$NEEDS_LIB_CUPS" = xfalse; then
56662     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56663         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56664       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56665 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56666     fi
56667     CUPS_CFLAGS=
56668   else
56669     CUPS_FOUND=no
56670 
56671     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56672       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56673     fi
56674 
56675     if test "x${with_cups}" != x; then
56676       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56677 $as_echo_n "checking for cups headers... " >&6; }
56678       if test -s "${with_cups}/include/cups/cups.h"; then
56679         CUPS_CFLAGS="-I${with_cups}/include"
56680         CUPS_FOUND=yes
56681         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56682 $as_echo "$CUPS_FOUND" >&6; }
56683       else
56684         as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56685       fi
56686     fi
56687     if test "x${with_cups_include}" != x; then
56688       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56689 $as_echo_n "checking for cups headers... " >&6; }
56690       if test -s "${with_cups_include}/cups/cups.h"; then
56691         CUPS_CFLAGS="-I${with_cups_include}"
56692         CUPS_FOUND=yes
56693         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56694 $as_echo "$CUPS_FOUND" >&6; }
56695       else
56696         as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56697       fi
56698     fi
56699     if test "x$CUPS_FOUND" = xno; then
56700       # Are the cups headers installed in the default /usr/include location?
56701       for ac_header in cups/cups.h cups/ppd.h
56702 do :
56703   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56704 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56705 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56706   cat >>confdefs.h <<_ACEOF
56707 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56708 _ACEOF
56709 
56710           CUPS_FOUND=yes
56711           CUPS_CFLAGS=
56712           DEFAULT_CUPS=yes
56713 
56714 fi
56715 
56716 done
56717 
56718     fi
56719     if test "x$CUPS_FOUND" = xno; then
56720 
56721   # Print a helpful message on how to acquire the necessary build dependency.
56722   # cups is the help tag: freetype, cups, alsa etc
56723   MISSING_DEPENDENCY=cups
56724 
56725   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56726     cygwin_help $MISSING_DEPENDENCY
56727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56728     msys_help $MISSING_DEPENDENCY
56729   else
56730     PKGHANDLER_COMMAND=
56731 
56732     case $PKGHANDLER in
56733       apt-get)
56734         apt_help     $MISSING_DEPENDENCY ;;
56735       yum)
56736         yum_help     $MISSING_DEPENDENCY ;;
56737       port)
56738         port_help    $MISSING_DEPENDENCY ;;
56739       pkgutil)
56740         pkgutil_help $MISSING_DEPENDENCY ;;
56741       pkgadd)
56742         pkgadd_help  $MISSING_DEPENDENCY ;;
56743     esac
56744 
56745     if test "x$PKGHANDLER_COMMAND" != x; then
56746       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56747     fi
56748   fi
56749 
56750       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56751     fi
56752   fi
56753 
56754 
56755 
56756 
56757 
56758 # Check whether --with-freetype was given.
56759 if test "${with_freetype+set}" = set; then :
56760   withval=$with_freetype;
56761 fi
56762 
56763 
56764 # Check whether --with-freetype-include was given.
56765 if test "${with_freetype_include+set}" = set; then :
56766   withval=$with_freetype_include;
56767 fi
56768 
56769 
56770 # Check whether --with-freetype-lib was given.
56771 if test "${with_freetype_lib+set}" = set; then :
56772   withval=$with_freetype_lib;
56773 fi
56774 
56775 
56776 # Check whether --with-freetype-src was given.
56777 if test "${with_freetype_src+set}" = set; then :
56778   withval=$with_freetype_src;
56779 fi
56780 
56781   # Check whether --enable-freetype-bundling was given.
56782 if test "${enable_freetype_bundling+set}" = set; then :
56783   enableval=$enable_freetype_bundling;
56784 fi
56785 
56786 
56787   # Need to specify explicitly since it needs to be overridden on some versions of macosx
56788   FREETYPE_BASE_NAME=freetype
56789   FREETYPE_CFLAGS=
56790   FREETYPE_LIBS=
56791   FREETYPE_BUNDLE_LIB_PATH=
56792 
56793   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56794     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56795         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56796         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56797         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56798       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56799 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56800     fi
56801     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56802       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56803 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56804     fi
56805   else
56806     # freetype is needed to build; go get it!
56807 
56808     BUNDLE_FREETYPE="$enable_freetype_bundling"
56809 
56810     if  test "x$with_freetype_src" != x; then
56811       if test "x$OPENJDK_TARGET_OS" = xwindows; then
56812         # Try to build freetype if --with-freetype-src was given on Windows
56813 
56814   FREETYPE_SRC_PATH="$with_freetype_src"
56815   BUILD_FREETYPE=yes
56816 
56817   # Check if the freetype sources are acessible..
56818   if ! test -d $FREETYPE_SRC_PATH; then
56819     { $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
56820 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56821     BUILD_FREETYPE=no
56822   fi
56823   # ..and contain a vc2010 project file
56824   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56825   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56826     { $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
56827 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56828     BUILD_FREETYPE=no
56829   fi
56830   # Now check if configure found a version of 'msbuild.exe'
56831   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56832     { $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
56833 $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;}
56834     BUILD_FREETYPE=no
56835   fi
56836 
56837   # Ready to go..
56838   if test "x$BUILD_FREETYPE" = xyes; then
56839     # msbuild requires trailing slashes for output directories
56840     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56841     freetype_lib_path_unix="$freetype_lib_path"
56842     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56843 
56844   unix_path="$vcxproj_path"
56845   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56846     windows_path=`$CYGPATH -m "$unix_path"`
56847     vcxproj_path="$windows_path"
56848   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56849     windows_path=`cmd //c echo $unix_path`
56850     vcxproj_path="$windows_path"
56851   fi
56852 
56853 
56854   unix_path="$freetype_lib_path"
56855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56856     windows_path=`$CYGPATH -m "$unix_path"`
56857     freetype_lib_path="$windows_path"
56858   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56859     windows_path=`cmd //c echo $unix_path`
56860     freetype_lib_path="$windows_path"
56861   fi
56862 
56863 
56864   unix_path="$freetype_obj_path"
56865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56866     windows_path=`$CYGPATH -m "$unix_path"`
56867     freetype_obj_path="$windows_path"
56868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56869     windows_path=`cmd //c echo $unix_path`
56870     freetype_obj_path="$windows_path"
56871   fi
56872 
56873     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56874       freetype_platform=x64
56875     else
56876       freetype_platform=win32
56877     fi
56878 
56879     # The original freetype project file is for VS 2010 (i.e. 'v100'),
56880     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56881     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56882     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56883     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56884 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56885 
56886     # First we try to build the freetype.dll
56887     $ECHO -e "@echo off\n"\
56888         "$MSBUILD $vcxproj_path "\
56889         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56890         "/p:Configuration=\"Release Multithreaded\" "\
56891         "/p:Platform=$freetype_platform "\
56892         "/p:ConfigurationType=DynamicLibrary "\
56893         "/p:TargetName=freetype "\
56894         "/p:OutDir=\"$freetype_lib_path\" "\
56895         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56896     cmd /c freetype.bat
56897 
56898     if test -s "$freetype_lib_path_unix/freetype.dll"; then
56899       # If that succeeds we also build freetype.lib
56900       $ECHO -e "@echo off\n"\
56901           "$MSBUILD $vcxproj_path "\
56902           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56903           "/p:Configuration=\"Release Multithreaded\" "\
56904           "/p:Platform=$freetype_platform "\
56905           "/p:ConfigurationType=StaticLibrary "\
56906           "/p:TargetName=freetype "\
56907           "/p:OutDir=\"$freetype_lib_path\" "\
56908           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56909       cmd /c freetype.bat
56910 
56911       if test -s "$freetype_lib_path_unix/freetype.lib"; then
56912         # Once we build both, lib and dll, set freetype lib and include path appropriately
56913         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56914         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56915         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56916 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56917       else
56918         BUILD_FREETYPE=no
56919       fi
56920     else
56921       BUILD_FREETYPE=no
56922     fi
56923   fi
56924 
56925         if test "x$BUILD_FREETYPE" = xyes; then
56926           # Okay, we built it. Check that it works.
56927 
56928   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56929   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56930   METHOD="--with-freetype-src"
56931 
56932   # Let's start with an optimistic view of the world :-)
56933   FOUND_FREETYPE=yes
56934 
56935   # First look for the canonical freetype main include file ft2build.h.
56936   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56937     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56938     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56939     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56940       # Fail.
56941       FOUND_FREETYPE=no
56942     fi
56943   fi
56944 
56945   if test "x$FOUND_FREETYPE" = xyes; then
56946     # Include file found, let's continue the sanity check.
56947     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56948 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56949 
56950     # Reset to default value
56951     FREETYPE_BASE_NAME=freetype
56952     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56953     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56954       if test "x$OPENJDK_TARGET_OS" = xmacosx \
56955           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56956         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56957         # for the .6 version explicitly.
56958         FREETYPE_BASE_NAME=freetype.6
56959         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56960         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56961 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56962       else
56963         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56964 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56965         FOUND_FREETYPE=no
56966       fi
56967     else
56968       if test "x$OPENJDK_TARGET_OS" = xwindows; then
56969         # On Windows, we will need both .lib and .dll file.
56970         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56971           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56972 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56973           FOUND_FREETYPE=no
56974         fi
56975       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56976           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56977         # Found lib in isa dir, use that instead.
56978         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56979         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56980 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56981       fi
56982     fi
56983   fi
56984 
56985   if test "x$FOUND_FREETYPE" = xyes; then
56986 
56987   # Only process if variable expands to non-empty
56988 
56989   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56990     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56991 
56992   # Input might be given as Windows format, start by converting to
56993   # unix format.
56994   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56995   new_path=`$CYGPATH -u "$path"`
56996 
56997   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56998   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56999   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57000   # "foo.exe" is OK but "foo" is an error.
57001   #
57002   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57003   # It is also a way to make sure we got the proper file name for the real test later on.
57004   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57005   if test "x$test_shortpath" = x; then
57006     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57007 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57008     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57009   fi
57010 
57011   # Call helper function which possibly converts this using DOS-style short mode.
57012   # If so, the updated path is stored in $new_path.
57013 
57014   input_path="$new_path"
57015   # Check if we need to convert this using DOS-style short mode. If the path
57016   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57017   # take no chances and rewrite it.
57018   # Note: m4 eats our [], so we need to use [ and ] instead.
57019   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57020   if test "x$has_forbidden_chars" != x; then
57021     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57022     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57023     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57024     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57025       # Going to short mode and back again did indeed matter. Since short mode is
57026       # case insensitive, let's make it lowercase to improve readability.
57027       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57028       # Now convert it back to Unix-style (cygpath)
57029       input_path=`$CYGPATH -u "$shortmode_path"`
57030       new_path="$input_path"
57031     fi
57032   fi
57033 
57034   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57035   if test "x$test_cygdrive_prefix" = x; then
57036     # As a simple fix, exclude /usr/bin since it's not a real path.
57037     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57038       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57039       # a path prefixed by /cygdrive for fixpath to work.
57040       new_path="$CYGWIN_ROOT_PATH$input_path"
57041     fi
57042   fi
57043 
57044 
57045   if test "x$path" != "x$new_path"; then
57046     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57047     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57048 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57049   fi
57050 
57051     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57052 
57053   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57054   has_colon=`$ECHO $path | $GREP ^.:`
57055   new_path="$path"
57056   if test "x$has_colon" = x; then
57057     # Not in mixed or Windows style, start by that.
57058     new_path=`cmd //c echo $path`
57059   fi
57060 
57061 
57062   input_path="$new_path"
57063   # Check if we need to convert this using DOS-style short mode. If the path
57064   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57065   # take no chances and rewrite it.
57066   # Note: m4 eats our [], so we need to use [ and ] instead.
57067   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57068   if test "x$has_forbidden_chars" != x; then
57069     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57070     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57071   fi
57072 
57073 
57074   windows_path="$new_path"
57075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57076     unix_path=`$CYGPATH -u "$windows_path"`
57077     new_path="$unix_path"
57078   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57079     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57080     new_path="$unix_path"
57081   fi
57082 
57083   if test "x$path" != "x$new_path"; then
57084     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57085     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57086 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57087   fi
57088 
57089   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57090   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57091 
57092     else
57093       # We're on a unix platform. Hooray! :)
57094       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57095       has_space=`$ECHO "$path" | $GREP " "`
57096       if test "x$has_space" != x; then
57097         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57098 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57099         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57100       fi
57101 
57102       # Use eval to expand a potential ~
57103       eval path="$path"
57104       if test ! -f "$path" && test ! -d "$path"; then
57105         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57106       fi
57107 
57108       if test -d "$path"; then
57109         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57110       else
57111         dir="`$DIRNAME "$path"`"
57112         base="`$BASENAME "$path"`"
57113         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57114       fi
57115     fi
57116   fi
57117 
57118 
57119   # Only process if variable expands to non-empty
57120 
57121   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57122     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57123 
57124   # Input might be given as Windows format, start by converting to
57125   # unix format.
57126   path="$POTENTIAL_FREETYPE_LIB_PATH"
57127   new_path=`$CYGPATH -u "$path"`
57128 
57129   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57130   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57131   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57132   # "foo.exe" is OK but "foo" is an error.
57133   #
57134   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57135   # It is also a way to make sure we got the proper file name for the real test later on.
57136   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57137   if test "x$test_shortpath" = x; then
57138     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57139 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57140     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57141   fi
57142 
57143   # Call helper function which possibly converts this using DOS-style short mode.
57144   # If so, the updated path is stored in $new_path.
57145 
57146   input_path="$new_path"
57147   # Check if we need to convert this using DOS-style short mode. If the path
57148   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57149   # take no chances and rewrite it.
57150   # Note: m4 eats our [], so we need to use [ and ] instead.
57151   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57152   if test "x$has_forbidden_chars" != x; then
57153     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57154     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57155     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57156     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57157       # Going to short mode and back again did indeed matter. Since short mode is
57158       # case insensitive, let's make it lowercase to improve readability.
57159       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57160       # Now convert it back to Unix-style (cygpath)
57161       input_path=`$CYGPATH -u "$shortmode_path"`
57162       new_path="$input_path"
57163     fi
57164   fi
57165 
57166   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57167   if test "x$test_cygdrive_prefix" = x; then
57168     # As a simple fix, exclude /usr/bin since it's not a real path.
57169     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57170       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57171       # a path prefixed by /cygdrive for fixpath to work.
57172       new_path="$CYGWIN_ROOT_PATH$input_path"
57173     fi
57174   fi
57175 
57176 
57177   if test "x$path" != "x$new_path"; then
57178     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57179     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57180 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57181   fi
57182 
57183     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57184 
57185   path="$POTENTIAL_FREETYPE_LIB_PATH"
57186   has_colon=`$ECHO $path | $GREP ^.:`
57187   new_path="$path"
57188   if test "x$has_colon" = x; then
57189     # Not in mixed or Windows style, start by that.
57190     new_path=`cmd //c echo $path`
57191   fi
57192 
57193 
57194   input_path="$new_path"
57195   # Check if we need to convert this using DOS-style short mode. If the path
57196   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57197   # take no chances and rewrite it.
57198   # Note: m4 eats our [], so we need to use [ and ] instead.
57199   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57200   if test "x$has_forbidden_chars" != x; then
57201     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57202     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57203   fi
57204 
57205 
57206   windows_path="$new_path"
57207   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57208     unix_path=`$CYGPATH -u "$windows_path"`
57209     new_path="$unix_path"
57210   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57211     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57212     new_path="$unix_path"
57213   fi
57214 
57215   if test "x$path" != "x$new_path"; then
57216     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57217     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57218 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57219   fi
57220 
57221   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57222   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57223 
57224     else
57225       # We're on a unix platform. Hooray! :)
57226       path="$POTENTIAL_FREETYPE_LIB_PATH"
57227       has_space=`$ECHO "$path" | $GREP " "`
57228       if test "x$has_space" != x; then
57229         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57230 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57231         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57232       fi
57233 
57234       # Use eval to expand a potential ~
57235       eval path="$path"
57236       if test ! -f "$path" && test ! -d "$path"; then
57237         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57238       fi
57239 
57240       if test -d "$path"; then
57241         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57242       else
57243         dir="`$DIRNAME "$path"`"
57244         base="`$BASENAME "$path"`"
57245         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57246       fi
57247     fi
57248   fi
57249 
57250 
57251     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57252     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57253 $as_echo_n "checking for freetype includes... " >&6; }
57254     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57255 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57256     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57257     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57258 $as_echo_n "checking for freetype libraries... " >&6; }
57259     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57260 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57261   fi
57262 
57263           if test "x$FOUND_FREETYPE" != xyes; then
57264             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57265           fi
57266         else
57267           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57268 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57269           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57270         fi
57271       else
57272         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57273 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57274       fi
57275     fi
57276 
57277     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57278       # User has specified settings
57279 
57280       if test "x$BUNDLE_FREETYPE" = x; then
57281         # If not specified, default is to bundle freetype
57282         BUNDLE_FREETYPE=yes
57283       fi
57284 
57285       if test "x$with_freetype" != x; then
57286         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57287         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57288       fi
57289 
57290       # Allow --with-freetype-lib and --with-freetype-include to override
57291       if test "x$with_freetype_include" != x; then
57292         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57293       fi
57294       if test "x$with_freetype_lib" != x; then
57295         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57296       fi
57297 
57298       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57299         # Okay, we got it. Check that it works.
57300 
57301   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57302   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57303   METHOD="--with-freetype"
57304 
57305   # Let's start with an optimistic view of the world :-)
57306   FOUND_FREETYPE=yes
57307 
57308   # First look for the canonical freetype main include file ft2build.h.
57309   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57310     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57311     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57312     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57313       # Fail.
57314       FOUND_FREETYPE=no
57315     fi
57316   fi
57317 
57318   if test "x$FOUND_FREETYPE" = xyes; then
57319     # Include file found, let's continue the sanity check.
57320     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57321 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57322 
57323     # Reset to default value
57324     FREETYPE_BASE_NAME=freetype
57325     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57326     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57327       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57328           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57329         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57330         # for the .6 version explicitly.
57331         FREETYPE_BASE_NAME=freetype.6
57332         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57333         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57334 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57335       else
57336         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57337 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57338         FOUND_FREETYPE=no
57339       fi
57340     else
57341       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57342         # On Windows, we will need both .lib and .dll file.
57343         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57344           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57345 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57346           FOUND_FREETYPE=no
57347         fi
57348       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57349           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57350         # Found lib in isa dir, use that instead.
57351         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57352         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57353 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57354       fi
57355     fi
57356   fi
57357 
57358   if test "x$FOUND_FREETYPE" = xyes; then
57359 
57360   # Only process if variable expands to non-empty
57361 
57362   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57363     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57364 
57365   # Input might be given as Windows format, start by converting to
57366   # unix format.
57367   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57368   new_path=`$CYGPATH -u "$path"`
57369 
57370   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57371   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57372   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57373   # "foo.exe" is OK but "foo" is an error.
57374   #
57375   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57376   # It is also a way to make sure we got the proper file name for the real test later on.
57377   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57378   if test "x$test_shortpath" = x; then
57379     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57380 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57381     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57382   fi
57383 
57384   # Call helper function which possibly converts this using DOS-style short mode.
57385   # If so, the updated path is stored in $new_path.
57386 
57387   input_path="$new_path"
57388   # Check if we need to convert this using DOS-style short mode. If the path
57389   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57390   # take no chances and rewrite it.
57391   # Note: m4 eats our [], so we need to use [ and ] instead.
57392   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57393   if test "x$has_forbidden_chars" != x; then
57394     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57395     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57396     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57397     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57398       # Going to short mode and back again did indeed matter. Since short mode is
57399       # case insensitive, let's make it lowercase to improve readability.
57400       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57401       # Now convert it back to Unix-style (cygpath)
57402       input_path=`$CYGPATH -u "$shortmode_path"`
57403       new_path="$input_path"
57404     fi
57405   fi
57406 
57407   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57408   if test "x$test_cygdrive_prefix" = x; then
57409     # As a simple fix, exclude /usr/bin since it's not a real path.
57410     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57411       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57412       # a path prefixed by /cygdrive for fixpath to work.
57413       new_path="$CYGWIN_ROOT_PATH$input_path"
57414     fi
57415   fi
57416 
57417 
57418   if test "x$path" != "x$new_path"; then
57419     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57420     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57421 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57422   fi
57423 
57424     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57425 
57426   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57427   has_colon=`$ECHO $path | $GREP ^.:`
57428   new_path="$path"
57429   if test "x$has_colon" = x; then
57430     # Not in mixed or Windows style, start by that.
57431     new_path=`cmd //c echo $path`
57432   fi
57433 
57434 
57435   input_path="$new_path"
57436   # Check if we need to convert this using DOS-style short mode. If the path
57437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57438   # take no chances and rewrite it.
57439   # Note: m4 eats our [], so we need to use [ and ] instead.
57440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57441   if test "x$has_forbidden_chars" != x; then
57442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57443     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57444   fi
57445 
57446 
57447   windows_path="$new_path"
57448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57449     unix_path=`$CYGPATH -u "$windows_path"`
57450     new_path="$unix_path"
57451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57452     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57453     new_path="$unix_path"
57454   fi
57455 
57456   if test "x$path" != "x$new_path"; then
57457     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57458     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57459 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57460   fi
57461 
57462   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57463   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57464 
57465     else
57466       # We're on a unix platform. Hooray! :)
57467       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57468       has_space=`$ECHO "$path" | $GREP " "`
57469       if test "x$has_space" != x; then
57470         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57471 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57472         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57473       fi
57474 
57475       # Use eval to expand a potential ~
57476       eval path="$path"
57477       if test ! -f "$path" && test ! -d "$path"; then
57478         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57479       fi
57480 
57481       if test -d "$path"; then
57482         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57483       else
57484         dir="`$DIRNAME "$path"`"
57485         base="`$BASENAME "$path"`"
57486         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57487       fi
57488     fi
57489   fi
57490 
57491 
57492   # Only process if variable expands to non-empty
57493 
57494   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57495     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57496 
57497   # Input might be given as Windows format, start by converting to
57498   # unix format.
57499   path="$POTENTIAL_FREETYPE_LIB_PATH"
57500   new_path=`$CYGPATH -u "$path"`
57501 
57502   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57503   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57504   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57505   # "foo.exe" is OK but "foo" is an error.
57506   #
57507   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57508   # It is also a way to make sure we got the proper file name for the real test later on.
57509   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57510   if test "x$test_shortpath" = x; then
57511     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57512 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57513     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57514   fi
57515 
57516   # Call helper function which possibly converts this using DOS-style short mode.
57517   # If so, the updated path is stored in $new_path.
57518 
57519   input_path="$new_path"
57520   # Check if we need to convert this using DOS-style short mode. If the path
57521   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57522   # take no chances and rewrite it.
57523   # Note: m4 eats our [], so we need to use [ and ] instead.
57524   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57525   if test "x$has_forbidden_chars" != x; then
57526     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57527     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57528     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57529     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57530       # Going to short mode and back again did indeed matter. Since short mode is
57531       # case insensitive, let's make it lowercase to improve readability.
57532       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57533       # Now convert it back to Unix-style (cygpath)
57534       input_path=`$CYGPATH -u "$shortmode_path"`
57535       new_path="$input_path"
57536     fi
57537   fi
57538 
57539   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57540   if test "x$test_cygdrive_prefix" = x; then
57541     # As a simple fix, exclude /usr/bin since it's not a real path.
57542     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57543       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57544       # a path prefixed by /cygdrive for fixpath to work.
57545       new_path="$CYGWIN_ROOT_PATH$input_path"
57546     fi
57547   fi
57548 
57549 
57550   if test "x$path" != "x$new_path"; then
57551     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57552     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57553 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57554   fi
57555 
57556     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57557 
57558   path="$POTENTIAL_FREETYPE_LIB_PATH"
57559   has_colon=`$ECHO $path | $GREP ^.:`
57560   new_path="$path"
57561   if test "x$has_colon" = x; then
57562     # Not in mixed or Windows style, start by that.
57563     new_path=`cmd //c echo $path`
57564   fi
57565 
57566 
57567   input_path="$new_path"
57568   # Check if we need to convert this using DOS-style short mode. If the path
57569   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57570   # take no chances and rewrite it.
57571   # Note: m4 eats our [], so we need to use [ and ] instead.
57572   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57573   if test "x$has_forbidden_chars" != x; then
57574     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57575     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57576   fi
57577 
57578 
57579   windows_path="$new_path"
57580   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57581     unix_path=`$CYGPATH -u "$windows_path"`
57582     new_path="$unix_path"
57583   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57584     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57585     new_path="$unix_path"
57586   fi
57587 
57588   if test "x$path" != "x$new_path"; then
57589     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57590     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57591 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57592   fi
57593 
57594   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57595   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57596 
57597     else
57598       # We're on a unix platform. Hooray! :)
57599       path="$POTENTIAL_FREETYPE_LIB_PATH"
57600       has_space=`$ECHO "$path" | $GREP " "`
57601       if test "x$has_space" != x; then
57602         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57603 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57604         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57605       fi
57606 
57607       # Use eval to expand a potential ~
57608       eval path="$path"
57609       if test ! -f "$path" && test ! -d "$path"; then
57610         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57611       fi
57612 
57613       if test -d "$path"; then
57614         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57615       else
57616         dir="`$DIRNAME "$path"`"
57617         base="`$BASENAME "$path"`"
57618         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57619       fi
57620     fi
57621   fi
57622 
57623 
57624     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57625     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57626 $as_echo_n "checking for freetype includes... " >&6; }
57627     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57628 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57629     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57630     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57631 $as_echo_n "checking for freetype libraries... " >&6; }
57632     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57633 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57634   fi
57635 
57636         if test "x$FOUND_FREETYPE" != xyes; then
57637           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57638         fi
57639       else
57640         # User specified only one of lib or include. This is an error.
57641         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57642           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57643 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57644           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57645         else
57646           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57647 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57648           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57649         fi
57650       fi
57651     else
57652       # User did not specify settings, but we need freetype. Try to locate it.
57653 
57654       if test "x$BUNDLE_FREETYPE" = x; then
57655         # If not specified, default is to bundle freetype only on windows
57656         if test "x$OPENJDK_TARGET_OS" = xwindows; then
57657           BUNDLE_FREETYPE=yes
57658         else
57659           BUNDLE_FREETYPE=no
57660         fi
57661       fi
57662 
57663       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57664       if test "x$SYSROOT" = x; then
57665         if test "x$FOUND_FREETYPE" != xyes; then
57666           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57667           if test "x$PKG_CONFIG" != x; then
57668 
57669 pkg_failed=no
57670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57671 $as_echo_n "checking for FREETYPE... " >&6; }
57672 
57673 if test -n "$FREETYPE_CFLAGS"; then
57674     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57675  elif test -n "$PKG_CONFIG"; then
57676     if test -n "$PKG_CONFIG" && \
57677     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57678   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57679   ac_status=$?
57680   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57681   test $ac_status = 0; }; then
57682   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57683 else
57684   pkg_failed=yes
57685 fi
57686  else
57687     pkg_failed=untried
57688 fi
57689 if test -n "$FREETYPE_LIBS"; then
57690     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57691  elif test -n "$PKG_CONFIG"; then
57692     if test -n "$PKG_CONFIG" && \
57693     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57694   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57695   ac_status=$?
57696   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57697   test $ac_status = 0; }; then
57698   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57699 else
57700   pkg_failed=yes
57701 fi
57702  else
57703     pkg_failed=untried
57704 fi
57705 
57706 
57707 
57708 if test $pkg_failed = yes; then
57709 
57710 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57711         _pkg_short_errors_supported=yes
57712 else
57713         _pkg_short_errors_supported=no
57714 fi
57715         if test $_pkg_short_errors_supported = yes; then
57716                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57717         else
57718                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57719         fi
57720         # Put the nasty error message in config.log where it belongs
57721         echo "$FREETYPE_PKG_ERRORS" >&5
57722 
57723         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57724 $as_echo "no" >&6; }
57725                 FOUND_FREETYPE=no
57726 elif test $pkg_failed = untried; then
57727         FOUND_FREETYPE=no
57728 else
57729         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57730         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57731         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57732 $as_echo "yes" >&6; }
57733         FOUND_FREETYPE=yes
57734 fi
57735             if test "x$FOUND_FREETYPE" = xyes; then
57736               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57737               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57738               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57739               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57740                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57741               fi
57742               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57743               if test "x$BUNDLE_FREETYPE" = xyes; then
57744                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57745 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57746                 FOUND_FREETYPE=no
57747               else
57748                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57749 $as_echo_n "checking for freetype... " >&6; }
57750                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57751 $as_echo "yes (using pkg-config)" >&6; }
57752               fi
57753             fi
57754           fi
57755         fi
57756       fi
57757 
57758       if test "x$FOUND_FREETYPE" != xyes; then
57759         # Check in well-known locations
57760         if test "x$OPENJDK_TARGET_OS" = xwindows; then
57761           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57762 
57763   windows_path="$FREETYPE_BASE_DIR"
57764   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57765     unix_path=`$CYGPATH -u "$windows_path"`
57766     FREETYPE_BASE_DIR="$unix_path"
57767   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57768     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57769     FREETYPE_BASE_DIR="$unix_path"
57770   fi
57771 
57772 
57773   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57774   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57775   METHOD="well-known location"
57776 
57777   # Let's start with an optimistic view of the world :-)
57778   FOUND_FREETYPE=yes
57779 
57780   # First look for the canonical freetype main include file ft2build.h.
57781   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57782     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57783     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57784     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57785       # Fail.
57786       FOUND_FREETYPE=no
57787     fi
57788   fi
57789 
57790   if test "x$FOUND_FREETYPE" = xyes; then
57791     # Include file found, let's continue the sanity check.
57792     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57793 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57794 
57795     # Reset to default value
57796     FREETYPE_BASE_NAME=freetype
57797     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57798     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57799       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57800           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57801         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57802         # for the .6 version explicitly.
57803         FREETYPE_BASE_NAME=freetype.6
57804         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57805         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57806 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57807       else
57808         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57809 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57810         FOUND_FREETYPE=no
57811       fi
57812     else
57813       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57814         # On Windows, we will need both .lib and .dll file.
57815         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57816           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57817 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57818           FOUND_FREETYPE=no
57819         fi
57820       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57821           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57822         # Found lib in isa dir, use that instead.
57823         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57824         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57825 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57826       fi
57827     fi
57828   fi
57829 
57830   if test "x$FOUND_FREETYPE" = xyes; then
57831 
57832   # Only process if variable expands to non-empty
57833 
57834   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57835     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57836 
57837   # Input might be given as Windows format, start by converting to
57838   # unix format.
57839   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57840   new_path=`$CYGPATH -u "$path"`
57841 
57842   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57843   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57844   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57845   # "foo.exe" is OK but "foo" is an error.
57846   #
57847   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57848   # It is also a way to make sure we got the proper file name for the real test later on.
57849   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57850   if test "x$test_shortpath" = x; then
57851     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57852 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57853     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57854   fi
57855 
57856   # Call helper function which possibly converts this using DOS-style short mode.
57857   # If so, the updated path is stored in $new_path.
57858 
57859   input_path="$new_path"
57860   # Check if we need to convert this using DOS-style short mode. If the path
57861   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57862   # take no chances and rewrite it.
57863   # Note: m4 eats our [], so we need to use [ and ] instead.
57864   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57865   if test "x$has_forbidden_chars" != x; then
57866     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57867     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57868     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57869     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57870       # Going to short mode and back again did indeed matter. Since short mode is
57871       # case insensitive, let's make it lowercase to improve readability.
57872       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57873       # Now convert it back to Unix-style (cygpath)
57874       input_path=`$CYGPATH -u "$shortmode_path"`
57875       new_path="$input_path"
57876     fi
57877   fi
57878 
57879   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57880   if test "x$test_cygdrive_prefix" = x; then
57881     # As a simple fix, exclude /usr/bin since it's not a real path.
57882     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57883       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57884       # a path prefixed by /cygdrive for fixpath to work.
57885       new_path="$CYGWIN_ROOT_PATH$input_path"
57886     fi
57887   fi
57888 
57889 
57890   if test "x$path" != "x$new_path"; then
57891     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57892     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57893 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57894   fi
57895 
57896     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57897 
57898   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57899   has_colon=`$ECHO $path | $GREP ^.:`
57900   new_path="$path"
57901   if test "x$has_colon" = x; then
57902     # Not in mixed or Windows style, start by that.
57903     new_path=`cmd //c echo $path`
57904   fi
57905 
57906 
57907   input_path="$new_path"
57908   # Check if we need to convert this using DOS-style short mode. If the path
57909   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57910   # take no chances and rewrite it.
57911   # Note: m4 eats our [], so we need to use [ and ] instead.
57912   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57913   if test "x$has_forbidden_chars" != x; then
57914     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57915     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57916   fi
57917 
57918 
57919   windows_path="$new_path"
57920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57921     unix_path=`$CYGPATH -u "$windows_path"`
57922     new_path="$unix_path"
57923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57924     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57925     new_path="$unix_path"
57926   fi
57927 
57928   if test "x$path" != "x$new_path"; then
57929     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57930     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57931 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57932   fi
57933 
57934   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57935   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57936 
57937     else
57938       # We're on a unix platform. Hooray! :)
57939       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57940       has_space=`$ECHO "$path" | $GREP " "`
57941       if test "x$has_space" != x; then
57942         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57943 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57944         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57945       fi
57946 
57947       # Use eval to expand a potential ~
57948       eval path="$path"
57949       if test ! -f "$path" && test ! -d "$path"; then
57950         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57951       fi
57952 
57953       if test -d "$path"; then
57954         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57955       else
57956         dir="`$DIRNAME "$path"`"
57957         base="`$BASENAME "$path"`"
57958         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57959       fi
57960     fi
57961   fi
57962 
57963 
57964   # Only process if variable expands to non-empty
57965 
57966   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57967     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57968 
57969   # Input might be given as Windows format, start by converting to
57970   # unix format.
57971   path="$POTENTIAL_FREETYPE_LIB_PATH"
57972   new_path=`$CYGPATH -u "$path"`
57973 
57974   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57975   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57976   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57977   # "foo.exe" is OK but "foo" is an error.
57978   #
57979   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57980   # It is also a way to make sure we got the proper file name for the real test later on.
57981   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57982   if test "x$test_shortpath" = x; then
57983     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57984 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57985     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57986   fi
57987 
57988   # Call helper function which possibly converts this using DOS-style short mode.
57989   # If so, the updated path is stored in $new_path.
57990 
57991   input_path="$new_path"
57992   # Check if we need to convert this using DOS-style short mode. If the path
57993   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57994   # take no chances and rewrite it.
57995   # Note: m4 eats our [], so we need to use [ and ] instead.
57996   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57997   if test "x$has_forbidden_chars" != x; then
57998     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57999     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58000     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58001     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58002       # Going to short mode and back again did indeed matter. Since short mode is
58003       # case insensitive, let's make it lowercase to improve readability.
58004       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58005       # Now convert it back to Unix-style (cygpath)
58006       input_path=`$CYGPATH -u "$shortmode_path"`
58007       new_path="$input_path"
58008     fi
58009   fi
58010 
58011   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58012   if test "x$test_cygdrive_prefix" = x; then
58013     # As a simple fix, exclude /usr/bin since it's not a real path.
58014     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58015       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58016       # a path prefixed by /cygdrive for fixpath to work.
58017       new_path="$CYGWIN_ROOT_PATH$input_path"
58018     fi
58019   fi
58020 
58021 
58022   if test "x$path" != "x$new_path"; then
58023     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58024     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58025 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58026   fi
58027 
58028     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58029 
58030   path="$POTENTIAL_FREETYPE_LIB_PATH"
58031   has_colon=`$ECHO $path | $GREP ^.:`
58032   new_path="$path"
58033   if test "x$has_colon" = x; then
58034     # Not in mixed or Windows style, start by that.
58035     new_path=`cmd //c echo $path`
58036   fi
58037 
58038 
58039   input_path="$new_path"
58040   # Check if we need to convert this using DOS-style short mode. If the path
58041   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58042   # take no chances and rewrite it.
58043   # Note: m4 eats our [], so we need to use [ and ] instead.
58044   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58045   if test "x$has_forbidden_chars" != x; then
58046     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58047     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58048   fi
58049 
58050 
58051   windows_path="$new_path"
58052   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58053     unix_path=`$CYGPATH -u "$windows_path"`
58054     new_path="$unix_path"
58055   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58056     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58057     new_path="$unix_path"
58058   fi
58059 
58060   if test "x$path" != "x$new_path"; then
58061     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58062     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58063 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58064   fi
58065 
58066   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58067   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58068 
58069     else
58070       # We're on a unix platform. Hooray! :)
58071       path="$POTENTIAL_FREETYPE_LIB_PATH"
58072       has_space=`$ECHO "$path" | $GREP " "`
58073       if test "x$has_space" != x; then
58074         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58075 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58076         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58077       fi
58078 
58079       # Use eval to expand a potential ~
58080       eval path="$path"
58081       if test ! -f "$path" && test ! -d "$path"; then
58082         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58083       fi
58084 
58085       if test -d "$path"; then
58086         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58087       else
58088         dir="`$DIRNAME "$path"`"
58089         base="`$BASENAME "$path"`"
58090         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58091       fi
58092     fi
58093   fi
58094 
58095 
58096     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58097     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58098 $as_echo_n "checking for freetype includes... " >&6; }
58099     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58100 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58101     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58102     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58103 $as_echo_n "checking for freetype libraries... " >&6; }
58104     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58105 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58106   fi
58107 
58108           if test "x$FOUND_FREETYPE" != xyes; then
58109             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58110 
58111   windows_path="$FREETYPE_BASE_DIR"
58112   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58113     unix_path=`$CYGPATH -u "$windows_path"`
58114     FREETYPE_BASE_DIR="$unix_path"
58115   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58116     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58117     FREETYPE_BASE_DIR="$unix_path"
58118   fi
58119 
58120 
58121   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58122   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58123   METHOD="well-known location"
58124 
58125   # Let's start with an optimistic view of the world :-)
58126   FOUND_FREETYPE=yes
58127 
58128   # First look for the canonical freetype main include file ft2build.h.
58129   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58130     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58131     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58132     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58133       # Fail.
58134       FOUND_FREETYPE=no
58135     fi
58136   fi
58137 
58138   if test "x$FOUND_FREETYPE" = xyes; then
58139     # Include file found, let's continue the sanity check.
58140     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58141 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58142 
58143     # Reset to default value
58144     FREETYPE_BASE_NAME=freetype
58145     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58146     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58147       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58148           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58149         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58150         # for the .6 version explicitly.
58151         FREETYPE_BASE_NAME=freetype.6
58152         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58153         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58154 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58155       else
58156         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58157 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58158         FOUND_FREETYPE=no
58159       fi
58160     else
58161       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58162         # On Windows, we will need both .lib and .dll file.
58163         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58164           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58165 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58166           FOUND_FREETYPE=no
58167         fi
58168       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58169           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58170         # Found lib in isa dir, use that instead.
58171         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58172         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58173 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58174       fi
58175     fi
58176   fi
58177 
58178   if test "x$FOUND_FREETYPE" = xyes; then
58179 
58180   # Only process if variable expands to non-empty
58181 
58182   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58183     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58184 
58185   # Input might be given as Windows format, start by converting to
58186   # unix format.
58187   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58188   new_path=`$CYGPATH -u "$path"`
58189 
58190   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58191   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58192   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58193   # "foo.exe" is OK but "foo" is an error.
58194   #
58195   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58196   # It is also a way to make sure we got the proper file name for the real test later on.
58197   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58198   if test "x$test_shortpath" = x; then
58199     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58200 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58201     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58202   fi
58203 
58204   # Call helper function which possibly converts this using DOS-style short mode.
58205   # If so, the updated path is stored in $new_path.
58206 
58207   input_path="$new_path"
58208   # Check if we need to convert this using DOS-style short mode. If the path
58209   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58210   # take no chances and rewrite it.
58211   # Note: m4 eats our [], so we need to use [ and ] instead.
58212   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58213   if test "x$has_forbidden_chars" != x; then
58214     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58215     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58216     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58217     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58218       # Going to short mode and back again did indeed matter. Since short mode is
58219       # case insensitive, let's make it lowercase to improve readability.
58220       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58221       # Now convert it back to Unix-style (cygpath)
58222       input_path=`$CYGPATH -u "$shortmode_path"`
58223       new_path="$input_path"
58224     fi
58225   fi
58226 
58227   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58228   if test "x$test_cygdrive_prefix" = x; then
58229     # As a simple fix, exclude /usr/bin since it's not a real path.
58230     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58231       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58232       # a path prefixed by /cygdrive for fixpath to work.
58233       new_path="$CYGWIN_ROOT_PATH$input_path"
58234     fi
58235   fi
58236 
58237 
58238   if test "x$path" != "x$new_path"; then
58239     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58240     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58241 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58242   fi
58243 
58244     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58245 
58246   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58247   has_colon=`$ECHO $path | $GREP ^.:`
58248   new_path="$path"
58249   if test "x$has_colon" = x; then
58250     # Not in mixed or Windows style, start by that.
58251     new_path=`cmd //c echo $path`
58252   fi
58253 
58254 
58255   input_path="$new_path"
58256   # Check if we need to convert this using DOS-style short mode. If the path
58257   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58258   # take no chances and rewrite it.
58259   # Note: m4 eats our [], so we need to use [ and ] instead.
58260   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58261   if test "x$has_forbidden_chars" != x; then
58262     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58263     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58264   fi
58265 
58266 
58267   windows_path="$new_path"
58268   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58269     unix_path=`$CYGPATH -u "$windows_path"`
58270     new_path="$unix_path"
58271   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58272     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58273     new_path="$unix_path"
58274   fi
58275 
58276   if test "x$path" != "x$new_path"; then
58277     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58278     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58279 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58280   fi
58281 
58282   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58283   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58284 
58285     else
58286       # We're on a unix platform. Hooray! :)
58287       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58288       has_space=`$ECHO "$path" | $GREP " "`
58289       if test "x$has_space" != x; then
58290         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58291 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58292         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58293       fi
58294 
58295       # Use eval to expand a potential ~
58296       eval path="$path"
58297       if test ! -f "$path" && test ! -d "$path"; then
58298         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58299       fi
58300 
58301       if test -d "$path"; then
58302         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58303       else
58304         dir="`$DIRNAME "$path"`"
58305         base="`$BASENAME "$path"`"
58306         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58307       fi
58308     fi
58309   fi
58310 
58311 
58312   # Only process if variable expands to non-empty
58313 
58314   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58315     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58316 
58317   # Input might be given as Windows format, start by converting to
58318   # unix format.
58319   path="$POTENTIAL_FREETYPE_LIB_PATH"
58320   new_path=`$CYGPATH -u "$path"`
58321 
58322   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58323   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58324   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58325   # "foo.exe" is OK but "foo" is an error.
58326   #
58327   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58328   # It is also a way to make sure we got the proper file name for the real test later on.
58329   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58330   if test "x$test_shortpath" = x; then
58331     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58332 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58333     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58334   fi
58335 
58336   # Call helper function which possibly converts this using DOS-style short mode.
58337   # If so, the updated path is stored in $new_path.
58338 
58339   input_path="$new_path"
58340   # Check if we need to convert this using DOS-style short mode. If the path
58341   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58342   # take no chances and rewrite it.
58343   # Note: m4 eats our [], so we need to use [ and ] instead.
58344   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58345   if test "x$has_forbidden_chars" != x; then
58346     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58347     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58348     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58349     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58350       # Going to short mode and back again did indeed matter. Since short mode is
58351       # case insensitive, let's make it lowercase to improve readability.
58352       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58353       # Now convert it back to Unix-style (cygpath)
58354       input_path=`$CYGPATH -u "$shortmode_path"`
58355       new_path="$input_path"
58356     fi
58357   fi
58358 
58359   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58360   if test "x$test_cygdrive_prefix" = x; then
58361     # As a simple fix, exclude /usr/bin since it's not a real path.
58362     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58363       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58364       # a path prefixed by /cygdrive for fixpath to work.
58365       new_path="$CYGWIN_ROOT_PATH$input_path"
58366     fi
58367   fi
58368 
58369 
58370   if test "x$path" != "x$new_path"; then
58371     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58372     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58373 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58374   fi
58375 
58376     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58377 
58378   path="$POTENTIAL_FREETYPE_LIB_PATH"
58379   has_colon=`$ECHO $path | $GREP ^.:`
58380   new_path="$path"
58381   if test "x$has_colon" = x; then
58382     # Not in mixed or Windows style, start by that.
58383     new_path=`cmd //c echo $path`
58384   fi
58385 
58386 
58387   input_path="$new_path"
58388   # Check if we need to convert this using DOS-style short mode. If the path
58389   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58390   # take no chances and rewrite it.
58391   # Note: m4 eats our [], so we need to use [ and ] instead.
58392   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58393   if test "x$has_forbidden_chars" != x; then
58394     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58395     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58396   fi
58397 
58398 
58399   windows_path="$new_path"
58400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58401     unix_path=`$CYGPATH -u "$windows_path"`
58402     new_path="$unix_path"
58403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58405     new_path="$unix_path"
58406   fi
58407 
58408   if test "x$path" != "x$new_path"; then
58409     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58410     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58411 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58412   fi
58413 
58414   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58415   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58416 
58417     else
58418       # We're on a unix platform. Hooray! :)
58419       path="$POTENTIAL_FREETYPE_LIB_PATH"
58420       has_space=`$ECHO "$path" | $GREP " "`
58421       if test "x$has_space" != x; then
58422         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58423 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58424         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58425       fi
58426 
58427       # Use eval to expand a potential ~
58428       eval path="$path"
58429       if test ! -f "$path" && test ! -d "$path"; then
58430         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58431       fi
58432 
58433       if test -d "$path"; then
58434         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58435       else
58436         dir="`$DIRNAME "$path"`"
58437         base="`$BASENAME "$path"`"
58438         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58439       fi
58440     fi
58441   fi
58442 
58443 
58444     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58445     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58446 $as_echo_n "checking for freetype includes... " >&6; }
58447     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58448 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58449     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58450     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58451 $as_echo_n "checking for freetype libraries... " >&6; }
58452     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58453 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58454   fi
58455 
58456           fi
58457           if test "x$FOUND_FREETYPE" != xyes; then
58458             FREETYPE_BASE_DIR="$HOME/freetype"
58459 
58460   windows_path="$FREETYPE_BASE_DIR"
58461   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58462     unix_path=`$CYGPATH -u "$windows_path"`
58463     FREETYPE_BASE_DIR="$unix_path"
58464   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58465     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58466     FREETYPE_BASE_DIR="$unix_path"
58467   fi
58468 
58469             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58470 
58471   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58472   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58473   METHOD="well-known location"
58474 
58475   # Let's start with an optimistic view of the world :-)
58476   FOUND_FREETYPE=yes
58477 
58478   # First look for the canonical freetype main include file ft2build.h.
58479   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58480     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58481     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58482     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58483       # Fail.
58484       FOUND_FREETYPE=no
58485     fi
58486   fi
58487 
58488   if test "x$FOUND_FREETYPE" = xyes; then
58489     # Include file found, let's continue the sanity check.
58490     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58491 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58492 
58493     # Reset to default value
58494     FREETYPE_BASE_NAME=freetype
58495     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58496     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58497       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58498           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58499         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58500         # for the .6 version explicitly.
58501         FREETYPE_BASE_NAME=freetype.6
58502         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58503         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58504 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58505       else
58506         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58507 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58508         FOUND_FREETYPE=no
58509       fi
58510     else
58511       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58512         # On Windows, we will need both .lib and .dll file.
58513         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58514           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58515 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58516           FOUND_FREETYPE=no
58517         fi
58518       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58519           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58520         # Found lib in isa dir, use that instead.
58521         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58522         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58523 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58524       fi
58525     fi
58526   fi
58527 
58528   if test "x$FOUND_FREETYPE" = xyes; then
58529 
58530   # Only process if variable expands to non-empty
58531 
58532   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58533     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58534 
58535   # Input might be given as Windows format, start by converting to
58536   # unix format.
58537   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58538   new_path=`$CYGPATH -u "$path"`
58539 
58540   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58541   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58542   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58543   # "foo.exe" is OK but "foo" is an error.
58544   #
58545   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58546   # It is also a way to make sure we got the proper file name for the real test later on.
58547   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58548   if test "x$test_shortpath" = x; then
58549     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58550 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58551     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58552   fi
58553 
58554   # Call helper function which possibly converts this using DOS-style short mode.
58555   # If so, the updated path is stored in $new_path.
58556 
58557   input_path="$new_path"
58558   # Check if we need to convert this using DOS-style short mode. If the path
58559   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58560   # take no chances and rewrite it.
58561   # Note: m4 eats our [], so we need to use [ and ] instead.
58562   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58563   if test "x$has_forbidden_chars" != x; then
58564     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58565     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58566     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58567     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58568       # Going to short mode and back again did indeed matter. Since short mode is
58569       # case insensitive, let's make it lowercase to improve readability.
58570       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58571       # Now convert it back to Unix-style (cygpath)
58572       input_path=`$CYGPATH -u "$shortmode_path"`
58573       new_path="$input_path"
58574     fi
58575   fi
58576 
58577   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58578   if test "x$test_cygdrive_prefix" = x; then
58579     # As a simple fix, exclude /usr/bin since it's not a real path.
58580     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58581       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58582       # a path prefixed by /cygdrive for fixpath to work.
58583       new_path="$CYGWIN_ROOT_PATH$input_path"
58584     fi
58585   fi
58586 
58587 
58588   if test "x$path" != "x$new_path"; then
58589     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58590     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58591 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58592   fi
58593 
58594     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58595 
58596   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58597   has_colon=`$ECHO $path | $GREP ^.:`
58598   new_path="$path"
58599   if test "x$has_colon" = x; then
58600     # Not in mixed or Windows style, start by that.
58601     new_path=`cmd //c echo $path`
58602   fi
58603 
58604 
58605   input_path="$new_path"
58606   # Check if we need to convert this using DOS-style short mode. If the path
58607   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58608   # take no chances and rewrite it.
58609   # Note: m4 eats our [], so we need to use [ and ] instead.
58610   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58611   if test "x$has_forbidden_chars" != x; then
58612     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58613     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58614   fi
58615 
58616 
58617   windows_path="$new_path"
58618   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58619     unix_path=`$CYGPATH -u "$windows_path"`
58620     new_path="$unix_path"
58621   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58622     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58623     new_path="$unix_path"
58624   fi
58625 
58626   if test "x$path" != "x$new_path"; then
58627     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58628     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58629 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58630   fi
58631 
58632   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58633   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58634 
58635     else
58636       # We're on a unix platform. Hooray! :)
58637       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58638       has_space=`$ECHO "$path" | $GREP " "`
58639       if test "x$has_space" != x; then
58640         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58641 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58642         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58643       fi
58644 
58645       # Use eval to expand a potential ~
58646       eval path="$path"
58647       if test ! -f "$path" && test ! -d "$path"; then
58648         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58649       fi
58650 
58651       if test -d "$path"; then
58652         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58653       else
58654         dir="`$DIRNAME "$path"`"
58655         base="`$BASENAME "$path"`"
58656         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58657       fi
58658     fi
58659   fi
58660 
58661 
58662   # Only process if variable expands to non-empty
58663 
58664   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58665     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58666 
58667   # Input might be given as Windows format, start by converting to
58668   # unix format.
58669   path="$POTENTIAL_FREETYPE_LIB_PATH"
58670   new_path=`$CYGPATH -u "$path"`
58671 
58672   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58673   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58674   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58675   # "foo.exe" is OK but "foo" is an error.
58676   #
58677   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58678   # It is also a way to make sure we got the proper file name for the real test later on.
58679   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58680   if test "x$test_shortpath" = x; then
58681     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58682 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58683     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58684   fi
58685 
58686   # Call helper function which possibly converts this using DOS-style short mode.
58687   # If so, the updated path is stored in $new_path.
58688 
58689   input_path="$new_path"
58690   # Check if we need to convert this using DOS-style short mode. If the path
58691   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58692   # take no chances and rewrite it.
58693   # Note: m4 eats our [], so we need to use [ and ] instead.
58694   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58695   if test "x$has_forbidden_chars" != x; then
58696     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58697     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58698     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58699     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58700       # Going to short mode and back again did indeed matter. Since short mode is
58701       # case insensitive, let's make it lowercase to improve readability.
58702       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58703       # Now convert it back to Unix-style (cygpath)
58704       input_path=`$CYGPATH -u "$shortmode_path"`
58705       new_path="$input_path"
58706     fi
58707   fi
58708 
58709   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58710   if test "x$test_cygdrive_prefix" = x; then
58711     # As a simple fix, exclude /usr/bin since it's not a real path.
58712     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58713       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58714       # a path prefixed by /cygdrive for fixpath to work.
58715       new_path="$CYGWIN_ROOT_PATH$input_path"
58716     fi
58717   fi
58718 
58719 
58720   if test "x$path" != "x$new_path"; then
58721     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58722     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58723 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58724   fi
58725 
58726     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58727 
58728   path="$POTENTIAL_FREETYPE_LIB_PATH"
58729   has_colon=`$ECHO $path | $GREP ^.:`
58730   new_path="$path"
58731   if test "x$has_colon" = x; then
58732     # Not in mixed or Windows style, start by that.
58733     new_path=`cmd //c echo $path`
58734   fi
58735 
58736 
58737   input_path="$new_path"
58738   # Check if we need to convert this using DOS-style short mode. If the path
58739   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58740   # take no chances and rewrite it.
58741   # Note: m4 eats our [], so we need to use [ and ] instead.
58742   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58743   if test "x$has_forbidden_chars" != x; then
58744     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58745     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58746   fi
58747 
58748 
58749   windows_path="$new_path"
58750   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58751     unix_path=`$CYGPATH -u "$windows_path"`
58752     new_path="$unix_path"
58753   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58754     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58755     new_path="$unix_path"
58756   fi
58757 
58758   if test "x$path" != "x$new_path"; then
58759     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58760     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58761 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58762   fi
58763 
58764   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58765   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58766 
58767     else
58768       # We're on a unix platform. Hooray! :)
58769       path="$POTENTIAL_FREETYPE_LIB_PATH"
58770       has_space=`$ECHO "$path" | $GREP " "`
58771       if test "x$has_space" != x; then
58772         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58773 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58774         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58775       fi
58776 
58777       # Use eval to expand a potential ~
58778       eval path="$path"
58779       if test ! -f "$path" && test ! -d "$path"; then
58780         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58781       fi
58782 
58783       if test -d "$path"; then
58784         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58785       else
58786         dir="`$DIRNAME "$path"`"
58787         base="`$BASENAME "$path"`"
58788         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58789       fi
58790     fi
58791   fi
58792 
58793 
58794     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58795     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58796 $as_echo_n "checking for freetype includes... " >&6; }
58797     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58798 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58799     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58800     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58801 $as_echo_n "checking for freetype libraries... " >&6; }
58802     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58803 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58804   fi
58805 
58806             else
58807 
58808   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58809   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58810   METHOD="well-known location"
58811 
58812   # Let's start with an optimistic view of the world :-)
58813   FOUND_FREETYPE=yes
58814 
58815   # First look for the canonical freetype main include file ft2build.h.
58816   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58817     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58818     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58819     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58820       # Fail.
58821       FOUND_FREETYPE=no
58822     fi
58823   fi
58824 
58825   if test "x$FOUND_FREETYPE" = xyes; then
58826     # Include file found, let's continue the sanity check.
58827     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58828 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58829 
58830     # Reset to default value
58831     FREETYPE_BASE_NAME=freetype
58832     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58833     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58834       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58835           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58836         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58837         # for the .6 version explicitly.
58838         FREETYPE_BASE_NAME=freetype.6
58839         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58840         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58841 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58842       else
58843         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58844 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58845         FOUND_FREETYPE=no
58846       fi
58847     else
58848       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58849         # On Windows, we will need both .lib and .dll file.
58850         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58851           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58852 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58853           FOUND_FREETYPE=no
58854         fi
58855       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58856           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58857         # Found lib in isa dir, use that instead.
58858         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58859         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58860 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58861       fi
58862     fi
58863   fi
58864 
58865   if test "x$FOUND_FREETYPE" = xyes; then
58866 
58867   # Only process if variable expands to non-empty
58868 
58869   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58870     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58871 
58872   # Input might be given as Windows format, start by converting to
58873   # unix format.
58874   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58875   new_path=`$CYGPATH -u "$path"`
58876 
58877   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58878   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58879   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58880   # "foo.exe" is OK but "foo" is an error.
58881   #
58882   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58883   # It is also a way to make sure we got the proper file name for the real test later on.
58884   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58885   if test "x$test_shortpath" = x; then
58886     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58887 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58888     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58889   fi
58890 
58891   # Call helper function which possibly converts this using DOS-style short mode.
58892   # If so, the updated path is stored in $new_path.
58893 
58894   input_path="$new_path"
58895   # Check if we need to convert this using DOS-style short mode. If the path
58896   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58897   # take no chances and rewrite it.
58898   # Note: m4 eats our [], so we need to use [ and ] instead.
58899   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58900   if test "x$has_forbidden_chars" != x; then
58901     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58902     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58903     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58904     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58905       # Going to short mode and back again did indeed matter. Since short mode is
58906       # case insensitive, let's make it lowercase to improve readability.
58907       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58908       # Now convert it back to Unix-style (cygpath)
58909       input_path=`$CYGPATH -u "$shortmode_path"`
58910       new_path="$input_path"
58911     fi
58912   fi
58913 
58914   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58915   if test "x$test_cygdrive_prefix" = x; then
58916     # As a simple fix, exclude /usr/bin since it's not a real path.
58917     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58918       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58919       # a path prefixed by /cygdrive for fixpath to work.
58920       new_path="$CYGWIN_ROOT_PATH$input_path"
58921     fi
58922   fi
58923 
58924 
58925   if test "x$path" != "x$new_path"; then
58926     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58927     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58928 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58929   fi
58930 
58931     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58932 
58933   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58934   has_colon=`$ECHO $path | $GREP ^.:`
58935   new_path="$path"
58936   if test "x$has_colon" = x; then
58937     # Not in mixed or Windows style, start by that.
58938     new_path=`cmd //c echo $path`
58939   fi
58940 
58941 
58942   input_path="$new_path"
58943   # Check if we need to convert this using DOS-style short mode. If the path
58944   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58945   # take no chances and rewrite it.
58946   # Note: m4 eats our [], so we need to use [ and ] instead.
58947   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58948   if test "x$has_forbidden_chars" != x; then
58949     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58950     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58951   fi
58952 
58953 
58954   windows_path="$new_path"
58955   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58956     unix_path=`$CYGPATH -u "$windows_path"`
58957     new_path="$unix_path"
58958   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58959     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58960     new_path="$unix_path"
58961   fi
58962 
58963   if test "x$path" != "x$new_path"; then
58964     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58965     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58966 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58967   fi
58968 
58969   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58970   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58971 
58972     else
58973       # We're on a unix platform. Hooray! :)
58974       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58975       has_space=`$ECHO "$path" | $GREP " "`
58976       if test "x$has_space" != x; then
58977         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58978 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58979         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58980       fi
58981 
58982       # Use eval to expand a potential ~
58983       eval path="$path"
58984       if test ! -f "$path" && test ! -d "$path"; then
58985         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58986       fi
58987 
58988       if test -d "$path"; then
58989         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58990       else
58991         dir="`$DIRNAME "$path"`"
58992         base="`$BASENAME "$path"`"
58993         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58994       fi
58995     fi
58996   fi
58997 
58998 
58999   # Only process if variable expands to non-empty
59000 
59001   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59002     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59003 
59004   # Input might be given as Windows format, start by converting to
59005   # unix format.
59006   path="$POTENTIAL_FREETYPE_LIB_PATH"
59007   new_path=`$CYGPATH -u "$path"`
59008 
59009   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59010   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59011   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59012   # "foo.exe" is OK but "foo" is an error.
59013   #
59014   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59015   # It is also a way to make sure we got the proper file name for the real test later on.
59016   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59017   if test "x$test_shortpath" = x; then
59018     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59019 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59020     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59021   fi
59022 
59023   # Call helper function which possibly converts this using DOS-style short mode.
59024   # If so, the updated path is stored in $new_path.
59025 
59026   input_path="$new_path"
59027   # Check if we need to convert this using DOS-style short mode. If the path
59028   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59029   # take no chances and rewrite it.
59030   # Note: m4 eats our [], so we need to use [ and ] instead.
59031   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59032   if test "x$has_forbidden_chars" != x; then
59033     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59034     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59035     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59036     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59037       # Going to short mode and back again did indeed matter. Since short mode is
59038       # case insensitive, let's make it lowercase to improve readability.
59039       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59040       # Now convert it back to Unix-style (cygpath)
59041       input_path=`$CYGPATH -u "$shortmode_path"`
59042       new_path="$input_path"
59043     fi
59044   fi
59045 
59046   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59047   if test "x$test_cygdrive_prefix" = x; then
59048     # As a simple fix, exclude /usr/bin since it's not a real path.
59049     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59050       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59051       # a path prefixed by /cygdrive for fixpath to work.
59052       new_path="$CYGWIN_ROOT_PATH$input_path"
59053     fi
59054   fi
59055 
59056 
59057   if test "x$path" != "x$new_path"; then
59058     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59059     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59060 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59061   fi
59062 
59063     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59064 
59065   path="$POTENTIAL_FREETYPE_LIB_PATH"
59066   has_colon=`$ECHO $path | $GREP ^.:`
59067   new_path="$path"
59068   if test "x$has_colon" = x; then
59069     # Not in mixed or Windows style, start by that.
59070     new_path=`cmd //c echo $path`
59071   fi
59072 
59073 
59074   input_path="$new_path"
59075   # Check if we need to convert this using DOS-style short mode. If the path
59076   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59077   # take no chances and rewrite it.
59078   # Note: m4 eats our [], so we need to use [ and ] instead.
59079   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59080   if test "x$has_forbidden_chars" != x; then
59081     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59082     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59083   fi
59084 
59085 
59086   windows_path="$new_path"
59087   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59088     unix_path=`$CYGPATH -u "$windows_path"`
59089     new_path="$unix_path"
59090   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59091     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59092     new_path="$unix_path"
59093   fi
59094 
59095   if test "x$path" != "x$new_path"; then
59096     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59097     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59098 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59099   fi
59100 
59101   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59102   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59103 
59104     else
59105       # We're on a unix platform. Hooray! :)
59106       path="$POTENTIAL_FREETYPE_LIB_PATH"
59107       has_space=`$ECHO "$path" | $GREP " "`
59108       if test "x$has_space" != x; then
59109         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59110 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59111         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59112       fi
59113 
59114       # Use eval to expand a potential ~
59115       eval path="$path"
59116       if test ! -f "$path" && test ! -d "$path"; then
59117         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59118       fi
59119 
59120       if test -d "$path"; then
59121         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59122       else
59123         dir="`$DIRNAME "$path"`"
59124         base="`$BASENAME "$path"`"
59125         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59126       fi
59127     fi
59128   fi
59129 
59130 
59131     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59132     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59133 $as_echo_n "checking for freetype includes... " >&6; }
59134     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59135 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59136     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59137     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59138 $as_echo_n "checking for freetype libraries... " >&6; }
59139     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59140 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59141   fi
59142 
59143             fi
59144             if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59145                 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59146               # Source is available, as a last resort try to build freetype in default location
59147 
59148   FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59149   BUILD_FREETYPE=yes
59150 
59151   # Check if the freetype sources are acessible..
59152   if ! test -d $FREETYPE_SRC_PATH; then
59153     { $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
59154 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59155     BUILD_FREETYPE=no
59156   fi
59157   # ..and contain a vc2010 project file
59158   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59159   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59160     { $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
59161 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59162     BUILD_FREETYPE=no
59163   fi
59164   # Now check if configure found a version of 'msbuild.exe'
59165   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59166     { $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
59167 $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;}
59168     BUILD_FREETYPE=no
59169   fi
59170 
59171   # Ready to go..
59172   if test "x$BUILD_FREETYPE" = xyes; then
59173     # msbuild requires trailing slashes for output directories
59174     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59175     freetype_lib_path_unix="$freetype_lib_path"
59176     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59177 
59178   unix_path="$vcxproj_path"
59179   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59180     windows_path=`$CYGPATH -m "$unix_path"`
59181     vcxproj_path="$windows_path"
59182   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59183     windows_path=`cmd //c echo $unix_path`
59184     vcxproj_path="$windows_path"
59185   fi
59186 
59187 
59188   unix_path="$freetype_lib_path"
59189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59190     windows_path=`$CYGPATH -m "$unix_path"`
59191     freetype_lib_path="$windows_path"
59192   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59193     windows_path=`cmd //c echo $unix_path`
59194     freetype_lib_path="$windows_path"
59195   fi
59196 
59197 
59198   unix_path="$freetype_obj_path"
59199   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59200     windows_path=`$CYGPATH -m "$unix_path"`
59201     freetype_obj_path="$windows_path"
59202   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59203     windows_path=`cmd //c echo $unix_path`
59204     freetype_obj_path="$windows_path"
59205   fi
59206 
59207     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59208       freetype_platform=x64
59209     else
59210       freetype_platform=win32
59211     fi
59212 
59213     # The original freetype project file is for VS 2010 (i.e. 'v100'),
59214     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59215     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59216     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59217     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59218 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59219 
59220     # First we try to build the freetype.dll
59221     $ECHO -e "@echo off\n"\
59222         "$MSBUILD $vcxproj_path "\
59223         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59224         "/p:Configuration=\"Release Multithreaded\" "\
59225         "/p:Platform=$freetype_platform "\
59226         "/p:ConfigurationType=DynamicLibrary "\
59227         "/p:TargetName=freetype "\
59228         "/p:OutDir=\"$freetype_lib_path\" "\
59229         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59230     cmd /c freetype.bat
59231 
59232     if test -s "$freetype_lib_path_unix/freetype.dll"; then
59233       # If that succeeds we also build freetype.lib
59234       $ECHO -e "@echo off\n"\
59235           "$MSBUILD $vcxproj_path "\
59236           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59237           "/p:Configuration=\"Release Multithreaded\" "\
59238           "/p:Platform=$freetype_platform "\
59239           "/p:ConfigurationType=StaticLibrary "\
59240           "/p:TargetName=freetype "\
59241           "/p:OutDir=\"$freetype_lib_path\" "\
59242           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59243       cmd /c freetype.bat
59244 
59245       if test -s "$freetype_lib_path_unix/freetype.lib"; then
59246         # Once we build both, lib and dll, set freetype lib and include path appropriately
59247         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59248         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59249         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59250 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59251       else
59252         BUILD_FREETYPE=no
59253       fi
59254     else
59255       BUILD_FREETYPE=no
59256     fi
59257   fi
59258 
59259               if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59260 
59261   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59262   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59263   METHOD="well-known location"
59264 
59265   # Let's start with an optimistic view of the world :-)
59266   FOUND_FREETYPE=yes
59267 
59268   # First look for the canonical freetype main include file ft2build.h.
59269   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59270     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59271     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59272     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59273       # Fail.
59274       FOUND_FREETYPE=no
59275     fi
59276   fi
59277 
59278   if test "x$FOUND_FREETYPE" = xyes; then
59279     # Include file found, let's continue the sanity check.
59280     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59281 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59282 
59283     # Reset to default value
59284     FREETYPE_BASE_NAME=freetype
59285     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59286     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59287       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59288           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59289         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59290         # for the .6 version explicitly.
59291         FREETYPE_BASE_NAME=freetype.6
59292         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59293         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59294 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59295       else
59296         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59297 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59298         FOUND_FREETYPE=no
59299       fi
59300     else
59301       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59302         # On Windows, we will need both .lib and .dll file.
59303         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59304           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59305 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59306           FOUND_FREETYPE=no
59307         fi
59308       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59309           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59310         # Found lib in isa dir, use that instead.
59311         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59312         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59313 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59314       fi
59315     fi
59316   fi
59317 
59318   if test "x$FOUND_FREETYPE" = xyes; then
59319 
59320   # Only process if variable expands to non-empty
59321 
59322   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59323     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59324 
59325   # Input might be given as Windows format, start by converting to
59326   # unix format.
59327   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59328   new_path=`$CYGPATH -u "$path"`
59329 
59330   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59331   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59332   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59333   # "foo.exe" is OK but "foo" is an error.
59334   #
59335   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59336   # It is also a way to make sure we got the proper file name for the real test later on.
59337   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59338   if test "x$test_shortpath" = x; then
59339     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59340 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59341     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59342   fi
59343 
59344   # Call helper function which possibly converts this using DOS-style short mode.
59345   # If so, the updated path is stored in $new_path.
59346 
59347   input_path="$new_path"
59348   # Check if we need to convert this using DOS-style short mode. If the path
59349   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59350   # take no chances and rewrite it.
59351   # Note: m4 eats our [], so we need to use [ and ] instead.
59352   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59353   if test "x$has_forbidden_chars" != x; then
59354     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59355     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59356     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59357     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59358       # Going to short mode and back again did indeed matter. Since short mode is
59359       # case insensitive, let's make it lowercase to improve readability.
59360       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59361       # Now convert it back to Unix-style (cygpath)
59362       input_path=`$CYGPATH -u "$shortmode_path"`
59363       new_path="$input_path"
59364     fi
59365   fi
59366 
59367   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59368   if test "x$test_cygdrive_prefix" = x; then
59369     # As a simple fix, exclude /usr/bin since it's not a real path.
59370     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59371       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59372       # a path prefixed by /cygdrive for fixpath to work.
59373       new_path="$CYGWIN_ROOT_PATH$input_path"
59374     fi
59375   fi
59376 
59377 
59378   if test "x$path" != "x$new_path"; then
59379     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59380     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59381 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59382   fi
59383 
59384     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59385 
59386   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59387   has_colon=`$ECHO $path | $GREP ^.:`
59388   new_path="$path"
59389   if test "x$has_colon" = x; then
59390     # Not in mixed or Windows style, start by that.
59391     new_path=`cmd //c echo $path`
59392   fi
59393 
59394 
59395   input_path="$new_path"
59396   # Check if we need to convert this using DOS-style short mode. If the path
59397   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59398   # take no chances and rewrite it.
59399   # Note: m4 eats our [], so we need to use [ and ] instead.
59400   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59401   if test "x$has_forbidden_chars" != x; then
59402     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59403     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59404   fi
59405 
59406 
59407   windows_path="$new_path"
59408   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59409     unix_path=`$CYGPATH -u "$windows_path"`
59410     new_path="$unix_path"
59411   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59412     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59413     new_path="$unix_path"
59414   fi
59415 
59416   if test "x$path" != "x$new_path"; then
59417     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59418     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59419 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59420   fi
59421 
59422   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59423   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59424 
59425     else
59426       # We're on a unix platform. Hooray! :)
59427       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59428       has_space=`$ECHO "$path" | $GREP " "`
59429       if test "x$has_space" != x; then
59430         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59431 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59432         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59433       fi
59434 
59435       # Use eval to expand a potential ~
59436       eval path="$path"
59437       if test ! -f "$path" && test ! -d "$path"; then
59438         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59439       fi
59440 
59441       if test -d "$path"; then
59442         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59443       else
59444         dir="`$DIRNAME "$path"`"
59445         base="`$BASENAME "$path"`"
59446         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59447       fi
59448     fi
59449   fi
59450 
59451 
59452   # Only process if variable expands to non-empty
59453 
59454   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59455     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59456 
59457   # Input might be given as Windows format, start by converting to
59458   # unix format.
59459   path="$POTENTIAL_FREETYPE_LIB_PATH"
59460   new_path=`$CYGPATH -u "$path"`
59461 
59462   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59463   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59464   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59465   # "foo.exe" is OK but "foo" is an error.
59466   #
59467   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59468   # It is also a way to make sure we got the proper file name for the real test later on.
59469   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59470   if test "x$test_shortpath" = x; then
59471     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59472 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59473     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59474   fi
59475 
59476   # Call helper function which possibly converts this using DOS-style short mode.
59477   # If so, the updated path is stored in $new_path.
59478 
59479   input_path="$new_path"
59480   # Check if we need to convert this using DOS-style short mode. If the path
59481   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59482   # take no chances and rewrite it.
59483   # Note: m4 eats our [], so we need to use [ and ] instead.
59484   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59485   if test "x$has_forbidden_chars" != x; then
59486     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59487     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59488     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59489     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59490       # Going to short mode and back again did indeed matter. Since short mode is
59491       # case insensitive, let's make it lowercase to improve readability.
59492       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59493       # Now convert it back to Unix-style (cygpath)
59494       input_path=`$CYGPATH -u "$shortmode_path"`
59495       new_path="$input_path"
59496     fi
59497   fi
59498 
59499   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59500   if test "x$test_cygdrive_prefix" = x; then
59501     # As a simple fix, exclude /usr/bin since it's not a real path.
59502     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59503       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59504       # a path prefixed by /cygdrive for fixpath to work.
59505       new_path="$CYGWIN_ROOT_PATH$input_path"
59506     fi
59507   fi
59508 
59509 
59510   if test "x$path" != "x$new_path"; then
59511     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59512     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59513 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59514   fi
59515 
59516     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59517 
59518   path="$POTENTIAL_FREETYPE_LIB_PATH"
59519   has_colon=`$ECHO $path | $GREP ^.:`
59520   new_path="$path"
59521   if test "x$has_colon" = x; then
59522     # Not in mixed or Windows style, start by that.
59523     new_path=`cmd //c echo $path`
59524   fi
59525 
59526 
59527   input_path="$new_path"
59528   # Check if we need to convert this using DOS-style short mode. If the path
59529   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59530   # take no chances and rewrite it.
59531   # Note: m4 eats our [], so we need to use [ and ] instead.
59532   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59533   if test "x$has_forbidden_chars" != x; then
59534     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59535     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59536   fi
59537 
59538 
59539   windows_path="$new_path"
59540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59541     unix_path=`$CYGPATH -u "$windows_path"`
59542     new_path="$unix_path"
59543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59544     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59545     new_path="$unix_path"
59546   fi
59547 
59548   if test "x$path" != "x$new_path"; then
59549     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59550     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59551 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59552   fi
59553 
59554   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59555   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59556 
59557     else
59558       # We're on a unix platform. Hooray! :)
59559       path="$POTENTIAL_FREETYPE_LIB_PATH"
59560       has_space=`$ECHO "$path" | $GREP " "`
59561       if test "x$has_space" != x; then
59562         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59563 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59564         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59565       fi
59566 
59567       # Use eval to expand a potential ~
59568       eval path="$path"
59569       if test ! -f "$path" && test ! -d "$path"; then
59570         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59571       fi
59572 
59573       if test -d "$path"; then
59574         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59575       else
59576         dir="`$DIRNAME "$path"`"
59577         base="`$BASENAME "$path"`"
59578         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59579       fi
59580     fi
59581   fi
59582 
59583 
59584     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59585     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59586 $as_echo_n "checking for freetype includes... " >&6; }
59587     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59588 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59589     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59590     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59591 $as_echo_n "checking for freetype libraries... " >&6; }
59592     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59593 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59594   fi
59595 
59596               else
59597 
59598   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59599   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59600   METHOD="well-known location"
59601 
59602   # Let's start with an optimistic view of the world :-)
59603   FOUND_FREETYPE=yes
59604 
59605   # First look for the canonical freetype main include file ft2build.h.
59606   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59607     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59608     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59609     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59610       # Fail.
59611       FOUND_FREETYPE=no
59612     fi
59613   fi
59614 
59615   if test "x$FOUND_FREETYPE" = xyes; then
59616     # Include file found, let's continue the sanity check.
59617     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59618 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59619 
59620     # Reset to default value
59621     FREETYPE_BASE_NAME=freetype
59622     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59623     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59624       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59625           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59626         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59627         # for the .6 version explicitly.
59628         FREETYPE_BASE_NAME=freetype.6
59629         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59630         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59631 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59632       else
59633         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59634 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59635         FOUND_FREETYPE=no
59636       fi
59637     else
59638       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59639         # On Windows, we will need both .lib and .dll file.
59640         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59641           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59642 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59643           FOUND_FREETYPE=no
59644         fi
59645       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59646           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59647         # Found lib in isa dir, use that instead.
59648         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59649         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59650 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59651       fi
59652     fi
59653   fi
59654 
59655   if test "x$FOUND_FREETYPE" = xyes; then
59656 
59657   # Only process if variable expands to non-empty
59658 
59659   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59660     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59661 
59662   # Input might be given as Windows format, start by converting to
59663   # unix format.
59664   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59665   new_path=`$CYGPATH -u "$path"`
59666 
59667   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59668   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59669   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59670   # "foo.exe" is OK but "foo" is an error.
59671   #
59672   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59673   # It is also a way to make sure we got the proper file name for the real test later on.
59674   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59675   if test "x$test_shortpath" = x; then
59676     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59677 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59678     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59679   fi
59680 
59681   # Call helper function which possibly converts this using DOS-style short mode.
59682   # If so, the updated path is stored in $new_path.
59683 
59684   input_path="$new_path"
59685   # Check if we need to convert this using DOS-style short mode. If the path
59686   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59687   # take no chances and rewrite it.
59688   # Note: m4 eats our [], so we need to use [ and ] instead.
59689   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59690   if test "x$has_forbidden_chars" != x; then
59691     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59692     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59693     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59694     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59695       # Going to short mode and back again did indeed matter. Since short mode is
59696       # case insensitive, let's make it lowercase to improve readability.
59697       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59698       # Now convert it back to Unix-style (cygpath)
59699       input_path=`$CYGPATH -u "$shortmode_path"`
59700       new_path="$input_path"
59701     fi
59702   fi
59703 
59704   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59705   if test "x$test_cygdrive_prefix" = x; then
59706     # As a simple fix, exclude /usr/bin since it's not a real path.
59707     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59708       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59709       # a path prefixed by /cygdrive for fixpath to work.
59710       new_path="$CYGWIN_ROOT_PATH$input_path"
59711     fi
59712   fi
59713 
59714 
59715   if test "x$path" != "x$new_path"; then
59716     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59717     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59718 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59719   fi
59720 
59721     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59722 
59723   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59724   has_colon=`$ECHO $path | $GREP ^.:`
59725   new_path="$path"
59726   if test "x$has_colon" = x; then
59727     # Not in mixed or Windows style, start by that.
59728     new_path=`cmd //c echo $path`
59729   fi
59730 
59731 
59732   input_path="$new_path"
59733   # Check if we need to convert this using DOS-style short mode. If the path
59734   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59735   # take no chances and rewrite it.
59736   # Note: m4 eats our [], so we need to use [ and ] instead.
59737   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59738   if test "x$has_forbidden_chars" != x; then
59739     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59740     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59741   fi
59742 
59743 
59744   windows_path="$new_path"
59745   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59746     unix_path=`$CYGPATH -u "$windows_path"`
59747     new_path="$unix_path"
59748   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59749     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59750     new_path="$unix_path"
59751   fi
59752 
59753   if test "x$path" != "x$new_path"; then
59754     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59755     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59756 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59757   fi
59758 
59759   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59760   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59761 
59762     else
59763       # We're on a unix platform. Hooray! :)
59764       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59765       has_space=`$ECHO "$path" | $GREP " "`
59766       if test "x$has_space" != x; then
59767         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59768 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59769         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59770       fi
59771 
59772       # Use eval to expand a potential ~
59773       eval path="$path"
59774       if test ! -f "$path" && test ! -d "$path"; then
59775         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59776       fi
59777 
59778       if test -d "$path"; then
59779         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59780       else
59781         dir="`$DIRNAME "$path"`"
59782         base="`$BASENAME "$path"`"
59783         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59784       fi
59785     fi
59786   fi
59787 
59788 
59789   # Only process if variable expands to non-empty
59790 
59791   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59792     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59793 
59794   # Input might be given as Windows format, start by converting to
59795   # unix format.
59796   path="$POTENTIAL_FREETYPE_LIB_PATH"
59797   new_path=`$CYGPATH -u "$path"`
59798 
59799   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59800   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59801   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59802   # "foo.exe" is OK but "foo" is an error.
59803   #
59804   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59805   # It is also a way to make sure we got the proper file name for the real test later on.
59806   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59807   if test "x$test_shortpath" = x; then
59808     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59809 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59810     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59811   fi
59812 
59813   # Call helper function which possibly converts this using DOS-style short mode.
59814   # If so, the updated path is stored in $new_path.
59815 
59816   input_path="$new_path"
59817   # Check if we need to convert this using DOS-style short mode. If the path
59818   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59819   # take no chances and rewrite it.
59820   # Note: m4 eats our [], so we need to use [ and ] instead.
59821   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59822   if test "x$has_forbidden_chars" != x; then
59823     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59824     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59825     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59826     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59827       # Going to short mode and back again did indeed matter. Since short mode is
59828       # case insensitive, let's make it lowercase to improve readability.
59829       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59830       # Now convert it back to Unix-style (cygpath)
59831       input_path=`$CYGPATH -u "$shortmode_path"`
59832       new_path="$input_path"
59833     fi
59834   fi
59835 
59836   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59837   if test "x$test_cygdrive_prefix" = x; then
59838     # As a simple fix, exclude /usr/bin since it's not a real path.
59839     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59840       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59841       # a path prefixed by /cygdrive for fixpath to work.
59842       new_path="$CYGWIN_ROOT_PATH$input_path"
59843     fi
59844   fi
59845 
59846 
59847   if test "x$path" != "x$new_path"; then
59848     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59849     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59850 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59851   fi
59852 
59853     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59854 
59855   path="$POTENTIAL_FREETYPE_LIB_PATH"
59856   has_colon=`$ECHO $path | $GREP ^.:`
59857   new_path="$path"
59858   if test "x$has_colon" = x; then
59859     # Not in mixed or Windows style, start by that.
59860     new_path=`cmd //c echo $path`
59861   fi
59862 
59863 
59864   input_path="$new_path"
59865   # Check if we need to convert this using DOS-style short mode. If the path
59866   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59867   # take no chances and rewrite it.
59868   # Note: m4 eats our [], so we need to use [ and ] instead.
59869   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59870   if test "x$has_forbidden_chars" != x; then
59871     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59872     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59873   fi
59874 
59875 
59876   windows_path="$new_path"
59877   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59878     unix_path=`$CYGPATH -u "$windows_path"`
59879     new_path="$unix_path"
59880   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59881     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59882     new_path="$unix_path"
59883   fi
59884 
59885   if test "x$path" != "x$new_path"; then
59886     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59887     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59888 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59889   fi
59890 
59891   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59892   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59893 
59894     else
59895       # We're on a unix platform. Hooray! :)
59896       path="$POTENTIAL_FREETYPE_LIB_PATH"
59897       has_space=`$ECHO "$path" | $GREP " "`
59898       if test "x$has_space" != x; then
59899         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59900 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59901         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59902       fi
59903 
59904       # Use eval to expand a potential ~
59905       eval path="$path"
59906       if test ! -f "$path" && test ! -d "$path"; then
59907         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59908       fi
59909 
59910       if test -d "$path"; then
59911         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59912       else
59913         dir="`$DIRNAME "$path"`"
59914         base="`$BASENAME "$path"`"
59915         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59916       fi
59917     fi
59918   fi
59919 
59920 
59921     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59922     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59923 $as_echo_n "checking for freetype includes... " >&6; }
59924     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59925 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59926     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59927     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59928 $as_echo_n "checking for freetype libraries... " >&6; }
59929     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59930 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59931   fi
59932 
59933               fi
59934             fi
59935           fi
59936         else
59937           FREETYPE_BASE_DIR="$SYSROOT/usr"
59938 
59939   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59940   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59941   METHOD="well-known location"
59942 
59943   # Let's start with an optimistic view of the world :-)
59944   FOUND_FREETYPE=yes
59945 
59946   # First look for the canonical freetype main include file ft2build.h.
59947   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59948     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59949     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59950     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59951       # Fail.
59952       FOUND_FREETYPE=no
59953     fi
59954   fi
59955 
59956   if test "x$FOUND_FREETYPE" = xyes; then
59957     # Include file found, let's continue the sanity check.
59958     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59959 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59960 
59961     # Reset to default value
59962     FREETYPE_BASE_NAME=freetype
59963     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59964     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59965       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59966           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59967         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59968         # for the .6 version explicitly.
59969         FREETYPE_BASE_NAME=freetype.6
59970         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59971         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59972 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59973       else
59974         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59975 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59976         FOUND_FREETYPE=no
59977       fi
59978     else
59979       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59980         # On Windows, we will need both .lib and .dll file.
59981         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59982           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59983 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59984           FOUND_FREETYPE=no
59985         fi
59986       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59987           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59988         # Found lib in isa dir, use that instead.
59989         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59990         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59991 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59992       fi
59993     fi
59994   fi
59995 
59996   if test "x$FOUND_FREETYPE" = xyes; then
59997 
59998   # Only process if variable expands to non-empty
59999 
60000   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60001     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60002 
60003   # Input might be given as Windows format, start by converting to
60004   # unix format.
60005   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60006   new_path=`$CYGPATH -u "$path"`
60007 
60008   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60009   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60010   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60011   # "foo.exe" is OK but "foo" is an error.
60012   #
60013   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60014   # It is also a way to make sure we got the proper file name for the real test later on.
60015   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60016   if test "x$test_shortpath" = x; then
60017     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60018 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60019     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60020   fi
60021 
60022   # Call helper function which possibly converts this using DOS-style short mode.
60023   # If so, the updated path is stored in $new_path.
60024 
60025   input_path="$new_path"
60026   # Check if we need to convert this using DOS-style short mode. If the path
60027   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60028   # take no chances and rewrite it.
60029   # Note: m4 eats our [], so we need to use [ and ] instead.
60030   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60031   if test "x$has_forbidden_chars" != x; then
60032     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60033     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60034     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60035     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60036       # Going to short mode and back again did indeed matter. Since short mode is
60037       # case insensitive, let's make it lowercase to improve readability.
60038       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60039       # Now convert it back to Unix-style (cygpath)
60040       input_path=`$CYGPATH -u "$shortmode_path"`
60041       new_path="$input_path"
60042     fi
60043   fi
60044 
60045   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60046   if test "x$test_cygdrive_prefix" = x; then
60047     # As a simple fix, exclude /usr/bin since it's not a real path.
60048     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60049       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60050       # a path prefixed by /cygdrive for fixpath to work.
60051       new_path="$CYGWIN_ROOT_PATH$input_path"
60052     fi
60053   fi
60054 
60055 
60056   if test "x$path" != "x$new_path"; then
60057     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60058     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60059 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60060   fi
60061 
60062     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60063 
60064   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60065   has_colon=`$ECHO $path | $GREP ^.:`
60066   new_path="$path"
60067   if test "x$has_colon" = x; then
60068     # Not in mixed or Windows style, start by that.
60069     new_path=`cmd //c echo $path`
60070   fi
60071 
60072 
60073   input_path="$new_path"
60074   # Check if we need to convert this using DOS-style short mode. If the path
60075   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60076   # take no chances and rewrite it.
60077   # Note: m4 eats our [], so we need to use [ and ] instead.
60078   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60079   if test "x$has_forbidden_chars" != x; then
60080     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60081     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60082   fi
60083 
60084 
60085   windows_path="$new_path"
60086   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60087     unix_path=`$CYGPATH -u "$windows_path"`
60088     new_path="$unix_path"
60089   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60090     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60091     new_path="$unix_path"
60092   fi
60093 
60094   if test "x$path" != "x$new_path"; then
60095     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60096     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60097 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60098   fi
60099 
60100   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60101   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60102 
60103     else
60104       # We're on a unix platform. Hooray! :)
60105       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60106       has_space=`$ECHO "$path" | $GREP " "`
60107       if test "x$has_space" != x; then
60108         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60109 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60110         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60111       fi
60112 
60113       # Use eval to expand a potential ~
60114       eval path="$path"
60115       if test ! -f "$path" && test ! -d "$path"; then
60116         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60117       fi
60118 
60119       if test -d "$path"; then
60120         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60121       else
60122         dir="`$DIRNAME "$path"`"
60123         base="`$BASENAME "$path"`"
60124         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60125       fi
60126     fi
60127   fi
60128 
60129 
60130   # Only process if variable expands to non-empty
60131 
60132   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60133     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60134 
60135   # Input might be given as Windows format, start by converting to
60136   # unix format.
60137   path="$POTENTIAL_FREETYPE_LIB_PATH"
60138   new_path=`$CYGPATH -u "$path"`
60139 
60140   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60141   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60142   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60143   # "foo.exe" is OK but "foo" is an error.
60144   #
60145   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60146   # It is also a way to make sure we got the proper file name for the real test later on.
60147   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60148   if test "x$test_shortpath" = x; then
60149     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60150 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60151     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60152   fi
60153 
60154   # Call helper function which possibly converts this using DOS-style short mode.
60155   # If so, the updated path is stored in $new_path.
60156 
60157   input_path="$new_path"
60158   # Check if we need to convert this using DOS-style short mode. If the path
60159   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60160   # take no chances and rewrite it.
60161   # Note: m4 eats our [], so we need to use [ and ] instead.
60162   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60163   if test "x$has_forbidden_chars" != x; then
60164     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60165     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60166     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60167     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60168       # Going to short mode and back again did indeed matter. Since short mode is
60169       # case insensitive, let's make it lowercase to improve readability.
60170       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60171       # Now convert it back to Unix-style (cygpath)
60172       input_path=`$CYGPATH -u "$shortmode_path"`
60173       new_path="$input_path"
60174     fi
60175   fi
60176 
60177   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60178   if test "x$test_cygdrive_prefix" = x; then
60179     # As a simple fix, exclude /usr/bin since it's not a real path.
60180     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60181       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60182       # a path prefixed by /cygdrive for fixpath to work.
60183       new_path="$CYGWIN_ROOT_PATH$input_path"
60184     fi
60185   fi
60186 
60187 
60188   if test "x$path" != "x$new_path"; then
60189     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60190     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60191 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60192   fi
60193 
60194     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60195 
60196   path="$POTENTIAL_FREETYPE_LIB_PATH"
60197   has_colon=`$ECHO $path | $GREP ^.:`
60198   new_path="$path"
60199   if test "x$has_colon" = x; then
60200     # Not in mixed or Windows style, start by that.
60201     new_path=`cmd //c echo $path`
60202   fi
60203 
60204 
60205   input_path="$new_path"
60206   # Check if we need to convert this using DOS-style short mode. If the path
60207   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60208   # take no chances and rewrite it.
60209   # Note: m4 eats our [], so we need to use [ and ] instead.
60210   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60211   if test "x$has_forbidden_chars" != x; then
60212     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60213     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60214   fi
60215 
60216 
60217   windows_path="$new_path"
60218   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60219     unix_path=`$CYGPATH -u "$windows_path"`
60220     new_path="$unix_path"
60221   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60222     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60223     new_path="$unix_path"
60224   fi
60225 
60226   if test "x$path" != "x$new_path"; then
60227     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60228     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60229 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60230   fi
60231 
60232   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60233   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60234 
60235     else
60236       # We're on a unix platform. Hooray! :)
60237       path="$POTENTIAL_FREETYPE_LIB_PATH"
60238       has_space=`$ECHO "$path" | $GREP " "`
60239       if test "x$has_space" != x; then
60240         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60241 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60242         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60243       fi
60244 
60245       # Use eval to expand a potential ~
60246       eval path="$path"
60247       if test ! -f "$path" && test ! -d "$path"; then
60248         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60249       fi
60250 
60251       if test -d "$path"; then
60252         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60253       else
60254         dir="`$DIRNAME "$path"`"
60255         base="`$BASENAME "$path"`"
60256         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60257       fi
60258     fi
60259   fi
60260 
60261 
60262     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60263     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60264 $as_echo_n "checking for freetype includes... " >&6; }
60265     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60266 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60267     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60268     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60269 $as_echo_n "checking for freetype libraries... " >&6; }
60270     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60271 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60272   fi
60273 
60274 
60275           if test "x$FOUND_FREETYPE" != xyes; then
60276             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60277 
60278   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60279   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60280   METHOD="well-known location"
60281 
60282   # Let's start with an optimistic view of the world :-)
60283   FOUND_FREETYPE=yes
60284 
60285   # First look for the canonical freetype main include file ft2build.h.
60286   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60287     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60288     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60289     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60290       # Fail.
60291       FOUND_FREETYPE=no
60292     fi
60293   fi
60294 
60295   if test "x$FOUND_FREETYPE" = xyes; then
60296     # Include file found, let's continue the sanity check.
60297     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60298 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60299 
60300     # Reset to default value
60301     FREETYPE_BASE_NAME=freetype
60302     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60303     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60304       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60305           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60306         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60307         # for the .6 version explicitly.
60308         FREETYPE_BASE_NAME=freetype.6
60309         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60310         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60311 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60312       else
60313         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60314 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60315         FOUND_FREETYPE=no
60316       fi
60317     else
60318       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60319         # On Windows, we will need both .lib and .dll file.
60320         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60321           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60322 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60323           FOUND_FREETYPE=no
60324         fi
60325       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60326           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60327         # Found lib in isa dir, use that instead.
60328         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60329         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60330 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60331       fi
60332     fi
60333   fi
60334 
60335   if test "x$FOUND_FREETYPE" = xyes; then
60336 
60337   # Only process if variable expands to non-empty
60338 
60339   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60340     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60341 
60342   # Input might be given as Windows format, start by converting to
60343   # unix format.
60344   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60345   new_path=`$CYGPATH -u "$path"`
60346 
60347   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60348   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60349   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60350   # "foo.exe" is OK but "foo" is an error.
60351   #
60352   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60353   # It is also a way to make sure we got the proper file name for the real test later on.
60354   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60355   if test "x$test_shortpath" = x; then
60356     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60357 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60358     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60359   fi
60360 
60361   # Call helper function which possibly converts this using DOS-style short mode.
60362   # If so, the updated path is stored in $new_path.
60363 
60364   input_path="$new_path"
60365   # Check if we need to convert this using DOS-style short mode. If the path
60366   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60367   # take no chances and rewrite it.
60368   # Note: m4 eats our [], so we need to use [ and ] instead.
60369   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60370   if test "x$has_forbidden_chars" != x; then
60371     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60372     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60373     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60374     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60375       # Going to short mode and back again did indeed matter. Since short mode is
60376       # case insensitive, let's make it lowercase to improve readability.
60377       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60378       # Now convert it back to Unix-style (cygpath)
60379       input_path=`$CYGPATH -u "$shortmode_path"`
60380       new_path="$input_path"
60381     fi
60382   fi
60383 
60384   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60385   if test "x$test_cygdrive_prefix" = x; then
60386     # As a simple fix, exclude /usr/bin since it's not a real path.
60387     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60388       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60389       # a path prefixed by /cygdrive for fixpath to work.
60390       new_path="$CYGWIN_ROOT_PATH$input_path"
60391     fi
60392   fi
60393 
60394 
60395   if test "x$path" != "x$new_path"; then
60396     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60397     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60398 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60399   fi
60400 
60401     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60402 
60403   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60404   has_colon=`$ECHO $path | $GREP ^.:`
60405   new_path="$path"
60406   if test "x$has_colon" = x; then
60407     # Not in mixed or Windows style, start by that.
60408     new_path=`cmd //c echo $path`
60409   fi
60410 
60411 
60412   input_path="$new_path"
60413   # Check if we need to convert this using DOS-style short mode. If the path
60414   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60415   # take no chances and rewrite it.
60416   # Note: m4 eats our [], so we need to use [ and ] instead.
60417   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60418   if test "x$has_forbidden_chars" != x; then
60419     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60420     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60421   fi
60422 
60423 
60424   windows_path="$new_path"
60425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60426     unix_path=`$CYGPATH -u "$windows_path"`
60427     new_path="$unix_path"
60428   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60429     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60430     new_path="$unix_path"
60431   fi
60432 
60433   if test "x$path" != "x$new_path"; then
60434     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60435     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60436 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60437   fi
60438 
60439   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60440   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60441 
60442     else
60443       # We're on a unix platform. Hooray! :)
60444       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60445       has_space=`$ECHO "$path" | $GREP " "`
60446       if test "x$has_space" != x; then
60447         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60448 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60449         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60450       fi
60451 
60452       # Use eval to expand a potential ~
60453       eval path="$path"
60454       if test ! -f "$path" && test ! -d "$path"; then
60455         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60456       fi
60457 
60458       if test -d "$path"; then
60459         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60460       else
60461         dir="`$DIRNAME "$path"`"
60462         base="`$BASENAME "$path"`"
60463         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60464       fi
60465     fi
60466   fi
60467 
60468 
60469   # Only process if variable expands to non-empty
60470 
60471   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60472     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60473 
60474   # Input might be given as Windows format, start by converting to
60475   # unix format.
60476   path="$POTENTIAL_FREETYPE_LIB_PATH"
60477   new_path=`$CYGPATH -u "$path"`
60478 
60479   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60480   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60481   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60482   # "foo.exe" is OK but "foo" is an error.
60483   #
60484   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60485   # It is also a way to make sure we got the proper file name for the real test later on.
60486   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60487   if test "x$test_shortpath" = x; then
60488     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60489 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60490     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60491   fi
60492 
60493   # Call helper function which possibly converts this using DOS-style short mode.
60494   # If so, the updated path is stored in $new_path.
60495 
60496   input_path="$new_path"
60497   # Check if we need to convert this using DOS-style short mode. If the path
60498   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60499   # take no chances and rewrite it.
60500   # Note: m4 eats our [], so we need to use [ and ] instead.
60501   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60502   if test "x$has_forbidden_chars" != x; then
60503     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60504     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60505     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60506     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60507       # Going to short mode and back again did indeed matter. Since short mode is
60508       # case insensitive, let's make it lowercase to improve readability.
60509       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60510       # Now convert it back to Unix-style (cygpath)
60511       input_path=`$CYGPATH -u "$shortmode_path"`
60512       new_path="$input_path"
60513     fi
60514   fi
60515 
60516   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60517   if test "x$test_cygdrive_prefix" = x; then
60518     # As a simple fix, exclude /usr/bin since it's not a real path.
60519     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60520       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60521       # a path prefixed by /cygdrive for fixpath to work.
60522       new_path="$CYGWIN_ROOT_PATH$input_path"
60523     fi
60524   fi
60525 
60526 
60527   if test "x$path" != "x$new_path"; then
60528     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60529     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60530 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60531   fi
60532 
60533     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60534 
60535   path="$POTENTIAL_FREETYPE_LIB_PATH"
60536   has_colon=`$ECHO $path | $GREP ^.:`
60537   new_path="$path"
60538   if test "x$has_colon" = x; then
60539     # Not in mixed or Windows style, start by that.
60540     new_path=`cmd //c echo $path`
60541   fi
60542 
60543 
60544   input_path="$new_path"
60545   # Check if we need to convert this using DOS-style short mode. If the path
60546   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60547   # take no chances and rewrite it.
60548   # Note: m4 eats our [], so we need to use [ and ] instead.
60549   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60550   if test "x$has_forbidden_chars" != x; then
60551     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60552     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60553   fi
60554 
60555 
60556   windows_path="$new_path"
60557   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60558     unix_path=`$CYGPATH -u "$windows_path"`
60559     new_path="$unix_path"
60560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60561     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60562     new_path="$unix_path"
60563   fi
60564 
60565   if test "x$path" != "x$new_path"; then
60566     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60567     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60568 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60569   fi
60570 
60571   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60572   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60573 
60574     else
60575       # We're on a unix platform. Hooray! :)
60576       path="$POTENTIAL_FREETYPE_LIB_PATH"
60577       has_space=`$ECHO "$path" | $GREP " "`
60578       if test "x$has_space" != x; then
60579         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60580 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60581         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60582       fi
60583 
60584       # Use eval to expand a potential ~
60585       eval path="$path"
60586       if test ! -f "$path" && test ! -d "$path"; then
60587         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60588       fi
60589 
60590       if test -d "$path"; then
60591         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60592       else
60593         dir="`$DIRNAME "$path"`"
60594         base="`$BASENAME "$path"`"
60595         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60596       fi
60597     fi
60598   fi
60599 
60600 
60601     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60602     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60603 $as_echo_n "checking for freetype includes... " >&6; }
60604     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60605 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60606     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60607     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60608 $as_echo_n "checking for freetype libraries... " >&6; }
60609     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60610 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60611   fi
60612 
60613           fi
60614 
60615           if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60616             if test "x$FOUND_FREETYPE" != xyes; then
60617               # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60618               FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60619 
60620   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60621   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60622   METHOD="well-known location"
60623 
60624   # Let's start with an optimistic view of the world :-)
60625   FOUND_FREETYPE=yes
60626 
60627   # First look for the canonical freetype main include file ft2build.h.
60628   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60629     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60630     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60631     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60632       # Fail.
60633       FOUND_FREETYPE=no
60634     fi
60635   fi
60636 
60637   if test "x$FOUND_FREETYPE" = xyes; then
60638     # Include file found, let's continue the sanity check.
60639     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60640 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60641 
60642     # Reset to default value
60643     FREETYPE_BASE_NAME=freetype
60644     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60645     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60646       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60647           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60648         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60649         # for the .6 version explicitly.
60650         FREETYPE_BASE_NAME=freetype.6
60651         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60652         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60653 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60654       else
60655         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60656 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60657         FOUND_FREETYPE=no
60658       fi
60659     else
60660       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60661         # On Windows, we will need both .lib and .dll file.
60662         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60663           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60664 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60665           FOUND_FREETYPE=no
60666         fi
60667       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60668           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60669         # Found lib in isa dir, use that instead.
60670         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60671         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60672 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60673       fi
60674     fi
60675   fi
60676 
60677   if test "x$FOUND_FREETYPE" = xyes; then
60678 
60679   # Only process if variable expands to non-empty
60680 
60681   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60682     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60683 
60684   # Input might be given as Windows format, start by converting to
60685   # unix format.
60686   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60687   new_path=`$CYGPATH -u "$path"`
60688 
60689   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60690   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60691   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60692   # "foo.exe" is OK but "foo" is an error.
60693   #
60694   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60695   # It is also a way to make sure we got the proper file name for the real test later on.
60696   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60697   if test "x$test_shortpath" = x; then
60698     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60699 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60700     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60701   fi
60702 
60703   # Call helper function which possibly converts this using DOS-style short mode.
60704   # If so, the updated path is stored in $new_path.
60705 
60706   input_path="$new_path"
60707   # Check if we need to convert this using DOS-style short mode. If the path
60708   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60709   # take no chances and rewrite it.
60710   # Note: m4 eats our [], so we need to use [ and ] instead.
60711   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60712   if test "x$has_forbidden_chars" != x; then
60713     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60714     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60715     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60716     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60717       # Going to short mode and back again did indeed matter. Since short mode is
60718       # case insensitive, let's make it lowercase to improve readability.
60719       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60720       # Now convert it back to Unix-style (cygpath)
60721       input_path=`$CYGPATH -u "$shortmode_path"`
60722       new_path="$input_path"
60723     fi
60724   fi
60725 
60726   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60727   if test "x$test_cygdrive_prefix" = x; then
60728     # As a simple fix, exclude /usr/bin since it's not a real path.
60729     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60730       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60731       # a path prefixed by /cygdrive for fixpath to work.
60732       new_path="$CYGWIN_ROOT_PATH$input_path"
60733     fi
60734   fi
60735 
60736 
60737   if test "x$path" != "x$new_path"; then
60738     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60739     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60740 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60741   fi
60742 
60743     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60744 
60745   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60746   has_colon=`$ECHO $path | $GREP ^.:`
60747   new_path="$path"
60748   if test "x$has_colon" = x; then
60749     # Not in mixed or Windows style, start by that.
60750     new_path=`cmd //c echo $path`
60751   fi
60752 
60753 
60754   input_path="$new_path"
60755   # Check if we need to convert this using DOS-style short mode. If the path
60756   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60757   # take no chances and rewrite it.
60758   # Note: m4 eats our [], so we need to use [ and ] instead.
60759   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60760   if test "x$has_forbidden_chars" != x; then
60761     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60762     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60763   fi
60764 
60765 
60766   windows_path="$new_path"
60767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60768     unix_path=`$CYGPATH -u "$windows_path"`
60769     new_path="$unix_path"
60770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60771     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60772     new_path="$unix_path"
60773   fi
60774 
60775   if test "x$path" != "x$new_path"; then
60776     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60777     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60778 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60779   fi
60780 
60781   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60782   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60783 
60784     else
60785       # We're on a unix platform. Hooray! :)
60786       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60787       has_space=`$ECHO "$path" | $GREP " "`
60788       if test "x$has_space" != x; then
60789         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60790 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60791         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60792       fi
60793 
60794       # Use eval to expand a potential ~
60795       eval path="$path"
60796       if test ! -f "$path" && test ! -d "$path"; then
60797         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60798       fi
60799 
60800       if test -d "$path"; then
60801         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60802       else
60803         dir="`$DIRNAME "$path"`"
60804         base="`$BASENAME "$path"`"
60805         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60806       fi
60807     fi
60808   fi
60809 
60810 
60811   # Only process if variable expands to non-empty
60812 
60813   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60814     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60815 
60816   # Input might be given as Windows format, start by converting to
60817   # unix format.
60818   path="$POTENTIAL_FREETYPE_LIB_PATH"
60819   new_path=`$CYGPATH -u "$path"`
60820 
60821   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60822   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60823   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60824   # "foo.exe" is OK but "foo" is an error.
60825   #
60826   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60827   # It is also a way to make sure we got the proper file name for the real test later on.
60828   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60829   if test "x$test_shortpath" = x; then
60830     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60831 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60832     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60833   fi
60834 
60835   # Call helper function which possibly converts this using DOS-style short mode.
60836   # If so, the updated path is stored in $new_path.
60837 
60838   input_path="$new_path"
60839   # Check if we need to convert this using DOS-style short mode. If the path
60840   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60841   # take no chances and rewrite it.
60842   # Note: m4 eats our [], so we need to use [ and ] instead.
60843   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60844   if test "x$has_forbidden_chars" != x; then
60845     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60846     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60847     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60848     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60849       # Going to short mode and back again did indeed matter. Since short mode is
60850       # case insensitive, let's make it lowercase to improve readability.
60851       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60852       # Now convert it back to Unix-style (cygpath)
60853       input_path=`$CYGPATH -u "$shortmode_path"`
60854       new_path="$input_path"
60855     fi
60856   fi
60857 
60858   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60859   if test "x$test_cygdrive_prefix" = x; then
60860     # As a simple fix, exclude /usr/bin since it's not a real path.
60861     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60862       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60863       # a path prefixed by /cygdrive for fixpath to work.
60864       new_path="$CYGWIN_ROOT_PATH$input_path"
60865     fi
60866   fi
60867 
60868 
60869   if test "x$path" != "x$new_path"; then
60870     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60871     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60872 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60873   fi
60874 
60875     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60876 
60877   path="$POTENTIAL_FREETYPE_LIB_PATH"
60878   has_colon=`$ECHO $path | $GREP ^.:`
60879   new_path="$path"
60880   if test "x$has_colon" = x; then
60881     # Not in mixed or Windows style, start by that.
60882     new_path=`cmd //c echo $path`
60883   fi
60884 
60885 
60886   input_path="$new_path"
60887   # Check if we need to convert this using DOS-style short mode. If the path
60888   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60889   # take no chances and rewrite it.
60890   # Note: m4 eats our [], so we need to use [ and ] instead.
60891   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60892   if test "x$has_forbidden_chars" != x; then
60893     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60894     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60895   fi
60896 
60897 
60898   windows_path="$new_path"
60899   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60900     unix_path=`$CYGPATH -u "$windows_path"`
60901     new_path="$unix_path"
60902   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60903     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60904     new_path="$unix_path"
60905   fi
60906 
60907   if test "x$path" != "x$new_path"; then
60908     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60909     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60910 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60911   fi
60912 
60913   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60914   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60915 
60916     else
60917       # We're on a unix platform. Hooray! :)
60918       path="$POTENTIAL_FREETYPE_LIB_PATH"
60919       has_space=`$ECHO "$path" | $GREP " "`
60920       if test "x$has_space" != x; then
60921         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60922 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60923         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60924       fi
60925 
60926       # Use eval to expand a potential ~
60927       eval path="$path"
60928       if test ! -f "$path" && test ! -d "$path"; then
60929         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60930       fi
60931 
60932       if test -d "$path"; then
60933         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60934       else
60935         dir="`$DIRNAME "$path"`"
60936         base="`$BASENAME "$path"`"
60937         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60938       fi
60939     fi
60940   fi
60941 
60942 
60943     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60944     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60945 $as_echo_n "checking for freetype includes... " >&6; }
60946     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60947 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60948     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60949     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60950 $as_echo_n "checking for freetype libraries... " >&6; }
60951     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60952 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60953   fi
60954 
60955             fi
60956           fi
60957 
60958           if test "x$FOUND_FREETYPE" != xyes; then
60959             FREETYPE_BASE_DIR="$SYSROOT/usr"
60960             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60961 
60962   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60963   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
60964   METHOD="well-known location"
60965 
60966   # Let's start with an optimistic view of the world :-)
60967   FOUND_FREETYPE=yes
60968 
60969   # First look for the canonical freetype main include file ft2build.h.
60970   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60971     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60972     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60973     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60974       # Fail.
60975       FOUND_FREETYPE=no
60976     fi
60977   fi
60978 
60979   if test "x$FOUND_FREETYPE" = xyes; then
60980     # Include file found, let's continue the sanity check.
60981     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60982 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60983 
60984     # Reset to default value
60985     FREETYPE_BASE_NAME=freetype
60986     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60987     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60988       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60989           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60990         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60991         # for the .6 version explicitly.
60992         FREETYPE_BASE_NAME=freetype.6
60993         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60994         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60995 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60996       else
60997         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60998 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60999         FOUND_FREETYPE=no
61000       fi
61001     else
61002       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61003         # On Windows, we will need both .lib and .dll file.
61004         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61005           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61006 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61007           FOUND_FREETYPE=no
61008         fi
61009       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61010           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61011         # Found lib in isa dir, use that instead.
61012         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61013         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61014 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61015       fi
61016     fi
61017   fi
61018 
61019   if test "x$FOUND_FREETYPE" = xyes; then
61020 
61021   # Only process if variable expands to non-empty
61022 
61023   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61024     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61025 
61026   # Input might be given as Windows format, start by converting to
61027   # unix format.
61028   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61029   new_path=`$CYGPATH -u "$path"`
61030 
61031   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61032   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61033   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61034   # "foo.exe" is OK but "foo" is an error.
61035   #
61036   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61037   # It is also a way to make sure we got the proper file name for the real test later on.
61038   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61039   if test "x$test_shortpath" = x; then
61040     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61041 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61042     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61043   fi
61044 
61045   # Call helper function which possibly converts this using DOS-style short mode.
61046   # If so, the updated path is stored in $new_path.
61047 
61048   input_path="$new_path"
61049   # Check if we need to convert this using DOS-style short mode. If the path
61050   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61051   # take no chances and rewrite it.
61052   # Note: m4 eats our [], so we need to use [ and ] instead.
61053   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61054   if test "x$has_forbidden_chars" != x; then
61055     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61056     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61057     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61058     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61059       # Going to short mode and back again did indeed matter. Since short mode is
61060       # case insensitive, let's make it lowercase to improve readability.
61061       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61062       # Now convert it back to Unix-style (cygpath)
61063       input_path=`$CYGPATH -u "$shortmode_path"`
61064       new_path="$input_path"
61065     fi
61066   fi
61067 
61068   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61069   if test "x$test_cygdrive_prefix" = x; then
61070     # As a simple fix, exclude /usr/bin since it's not a real path.
61071     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61072       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61073       # a path prefixed by /cygdrive for fixpath to work.
61074       new_path="$CYGWIN_ROOT_PATH$input_path"
61075     fi
61076   fi
61077 
61078 
61079   if test "x$path" != "x$new_path"; then
61080     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61081     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61082 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61083   fi
61084 
61085     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61086 
61087   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61088   has_colon=`$ECHO $path | $GREP ^.:`
61089   new_path="$path"
61090   if test "x$has_colon" = x; then
61091     # Not in mixed or Windows style, start by that.
61092     new_path=`cmd //c echo $path`
61093   fi
61094 
61095 
61096   input_path="$new_path"
61097   # Check if we need to convert this using DOS-style short mode. If the path
61098   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61099   # take no chances and rewrite it.
61100   # Note: m4 eats our [], so we need to use [ and ] instead.
61101   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61102   if test "x$has_forbidden_chars" != x; then
61103     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61104     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61105   fi
61106 
61107 
61108   windows_path="$new_path"
61109   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61110     unix_path=`$CYGPATH -u "$windows_path"`
61111     new_path="$unix_path"
61112   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61113     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61114     new_path="$unix_path"
61115   fi
61116 
61117   if test "x$path" != "x$new_path"; then
61118     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61119     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61120 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61121   fi
61122 
61123   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61124   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61125 
61126     else
61127       # We're on a unix platform. Hooray! :)
61128       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61129       has_space=`$ECHO "$path" | $GREP " "`
61130       if test "x$has_space" != x; then
61131         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61132 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61133         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61134       fi
61135 
61136       # Use eval to expand a potential ~
61137       eval path="$path"
61138       if test ! -f "$path" && test ! -d "$path"; then
61139         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61140       fi
61141 
61142       if test -d "$path"; then
61143         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61144       else
61145         dir="`$DIRNAME "$path"`"
61146         base="`$BASENAME "$path"`"
61147         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61148       fi
61149     fi
61150   fi
61151 
61152 
61153   # Only process if variable expands to non-empty
61154 
61155   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61156     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61157 
61158   # Input might be given as Windows format, start by converting to
61159   # unix format.
61160   path="$POTENTIAL_FREETYPE_LIB_PATH"
61161   new_path=`$CYGPATH -u "$path"`
61162 
61163   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61164   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61165   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61166   # "foo.exe" is OK but "foo" is an error.
61167   #
61168   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61169   # It is also a way to make sure we got the proper file name for the real test later on.
61170   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61171   if test "x$test_shortpath" = x; then
61172     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61173 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61174     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61175   fi
61176 
61177   # Call helper function which possibly converts this using DOS-style short mode.
61178   # If so, the updated path is stored in $new_path.
61179 
61180   input_path="$new_path"
61181   # Check if we need to convert this using DOS-style short mode. If the path
61182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61183   # take no chances and rewrite it.
61184   # Note: m4 eats our [], so we need to use [ and ] instead.
61185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61186   if test "x$has_forbidden_chars" != x; then
61187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61188     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61189     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61190     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61191       # Going to short mode and back again did indeed matter. Since short mode is
61192       # case insensitive, let's make it lowercase to improve readability.
61193       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61194       # Now convert it back to Unix-style (cygpath)
61195       input_path=`$CYGPATH -u "$shortmode_path"`
61196       new_path="$input_path"
61197     fi
61198   fi
61199 
61200   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61201   if test "x$test_cygdrive_prefix" = x; then
61202     # As a simple fix, exclude /usr/bin since it's not a real path.
61203     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61204       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61205       # a path prefixed by /cygdrive for fixpath to work.
61206       new_path="$CYGWIN_ROOT_PATH$input_path"
61207     fi
61208   fi
61209 
61210 
61211   if test "x$path" != "x$new_path"; then
61212     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61213     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61214 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61215   fi
61216 
61217     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61218 
61219   path="$POTENTIAL_FREETYPE_LIB_PATH"
61220   has_colon=`$ECHO $path | $GREP ^.:`
61221   new_path="$path"
61222   if test "x$has_colon" = x; then
61223     # Not in mixed or Windows style, start by that.
61224     new_path=`cmd //c echo $path`
61225   fi
61226 
61227 
61228   input_path="$new_path"
61229   # Check if we need to convert this using DOS-style short mode. If the path
61230   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61231   # take no chances and rewrite it.
61232   # Note: m4 eats our [], so we need to use [ and ] instead.
61233   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61234   if test "x$has_forbidden_chars" != x; then
61235     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61236     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61237   fi
61238 
61239 
61240   windows_path="$new_path"
61241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61242     unix_path=`$CYGPATH -u "$windows_path"`
61243     new_path="$unix_path"
61244   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61245     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61246     new_path="$unix_path"
61247   fi
61248 
61249   if test "x$path" != "x$new_path"; then
61250     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61251     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61252 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61253   fi
61254 
61255   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61256   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61257 
61258     else
61259       # We're on a unix platform. Hooray! :)
61260       path="$POTENTIAL_FREETYPE_LIB_PATH"
61261       has_space=`$ECHO "$path" | $GREP " "`
61262       if test "x$has_space" != x; then
61263         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61264 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61265         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61266       fi
61267 
61268       # Use eval to expand a potential ~
61269       eval path="$path"
61270       if test ! -f "$path" && test ! -d "$path"; then
61271         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61272       fi
61273 
61274       if test -d "$path"; then
61275         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61276       else
61277         dir="`$DIRNAME "$path"`"
61278         base="`$BASENAME "$path"`"
61279         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61280       fi
61281     fi
61282   fi
61283 
61284 
61285     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61286     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61287 $as_echo_n "checking for freetype includes... " >&6; }
61288     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61289 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61290     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61291     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61292 $as_echo_n "checking for freetype libraries... " >&6; }
61293     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61294 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61295   fi
61296 
61297             else
61298 
61299   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61300   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61301   METHOD="well-known location"
61302 
61303   # Let's start with an optimistic view of the world :-)
61304   FOUND_FREETYPE=yes
61305 
61306   # First look for the canonical freetype main include file ft2build.h.
61307   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61308     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61309     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61310     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61311       # Fail.
61312       FOUND_FREETYPE=no
61313     fi
61314   fi
61315 
61316   if test "x$FOUND_FREETYPE" = xyes; then
61317     # Include file found, let's continue the sanity check.
61318     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61319 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61320 
61321     # Reset to default value
61322     FREETYPE_BASE_NAME=freetype
61323     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61324     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61325       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61326           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61327         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61328         # for the .6 version explicitly.
61329         FREETYPE_BASE_NAME=freetype.6
61330         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61331         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61332 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61333       else
61334         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61335 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61336         FOUND_FREETYPE=no
61337       fi
61338     else
61339       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61340         # On Windows, we will need both .lib and .dll file.
61341         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61342           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61343 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61344           FOUND_FREETYPE=no
61345         fi
61346       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61347           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61348         # Found lib in isa dir, use that instead.
61349         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61350         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61351 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61352       fi
61353     fi
61354   fi
61355 
61356   if test "x$FOUND_FREETYPE" = xyes; then
61357 
61358   # Only process if variable expands to non-empty
61359 
61360   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61361     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61362 
61363   # Input might be given as Windows format, start by converting to
61364   # unix format.
61365   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61366   new_path=`$CYGPATH -u "$path"`
61367 
61368   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61369   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61370   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61371   # "foo.exe" is OK but "foo" is an error.
61372   #
61373   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61374   # It is also a way to make sure we got the proper file name for the real test later on.
61375   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61376   if test "x$test_shortpath" = x; then
61377     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61378 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61379     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61380   fi
61381 
61382   # Call helper function which possibly converts this using DOS-style short mode.
61383   # If so, the updated path is stored in $new_path.
61384 
61385   input_path="$new_path"
61386   # Check if we need to convert this using DOS-style short mode. If the path
61387   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61388   # take no chances and rewrite it.
61389   # Note: m4 eats our [], so we need to use [ and ] instead.
61390   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61391   if test "x$has_forbidden_chars" != x; then
61392     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61393     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61394     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61395     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61396       # Going to short mode and back again did indeed matter. Since short mode is
61397       # case insensitive, let's make it lowercase to improve readability.
61398       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61399       # Now convert it back to Unix-style (cygpath)
61400       input_path=`$CYGPATH -u "$shortmode_path"`
61401       new_path="$input_path"
61402     fi
61403   fi
61404 
61405   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61406   if test "x$test_cygdrive_prefix" = x; then
61407     # As a simple fix, exclude /usr/bin since it's not a real path.
61408     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61409       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61410       # a path prefixed by /cygdrive for fixpath to work.
61411       new_path="$CYGWIN_ROOT_PATH$input_path"
61412     fi
61413   fi
61414 
61415 
61416   if test "x$path" != "x$new_path"; then
61417     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61418     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61419 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61420   fi
61421 
61422     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61423 
61424   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61425   has_colon=`$ECHO $path | $GREP ^.:`
61426   new_path="$path"
61427   if test "x$has_colon" = x; then
61428     # Not in mixed or Windows style, start by that.
61429     new_path=`cmd //c echo $path`
61430   fi
61431 
61432 
61433   input_path="$new_path"
61434   # Check if we need to convert this using DOS-style short mode. If the path
61435   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61436   # take no chances and rewrite it.
61437   # Note: m4 eats our [], so we need to use [ and ] instead.
61438   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61439   if test "x$has_forbidden_chars" != x; then
61440     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61441     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61442   fi
61443 
61444 
61445   windows_path="$new_path"
61446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61447     unix_path=`$CYGPATH -u "$windows_path"`
61448     new_path="$unix_path"
61449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61450     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61451     new_path="$unix_path"
61452   fi
61453 
61454   if test "x$path" != "x$new_path"; then
61455     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61456     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61457 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61458   fi
61459 
61460   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61461   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61462 
61463     else
61464       # We're on a unix platform. Hooray! :)
61465       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61466       has_space=`$ECHO "$path" | $GREP " "`
61467       if test "x$has_space" != x; then
61468         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61469 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61470         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61471       fi
61472 
61473       # Use eval to expand a potential ~
61474       eval path="$path"
61475       if test ! -f "$path" && test ! -d "$path"; then
61476         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61477       fi
61478 
61479       if test -d "$path"; then
61480         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61481       else
61482         dir="`$DIRNAME "$path"`"
61483         base="`$BASENAME "$path"`"
61484         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61485       fi
61486     fi
61487   fi
61488 
61489 
61490   # Only process if variable expands to non-empty
61491 
61492   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61493     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61494 
61495   # Input might be given as Windows format, start by converting to
61496   # unix format.
61497   path="$POTENTIAL_FREETYPE_LIB_PATH"
61498   new_path=`$CYGPATH -u "$path"`
61499 
61500   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61501   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61502   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61503   # "foo.exe" is OK but "foo" is an error.
61504   #
61505   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61506   # It is also a way to make sure we got the proper file name for the real test later on.
61507   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61508   if test "x$test_shortpath" = x; then
61509     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61510 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61511     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61512   fi
61513 
61514   # Call helper function which possibly converts this using DOS-style short mode.
61515   # If so, the updated path is stored in $new_path.
61516 
61517   input_path="$new_path"
61518   # Check if we need to convert this using DOS-style short mode. If the path
61519   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61520   # take no chances and rewrite it.
61521   # Note: m4 eats our [], so we need to use [ and ] instead.
61522   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61523   if test "x$has_forbidden_chars" != x; then
61524     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61525     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61526     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61527     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61528       # Going to short mode and back again did indeed matter. Since short mode is
61529       # case insensitive, let's make it lowercase to improve readability.
61530       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61531       # Now convert it back to Unix-style (cygpath)
61532       input_path=`$CYGPATH -u "$shortmode_path"`
61533       new_path="$input_path"
61534     fi
61535   fi
61536 
61537   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61538   if test "x$test_cygdrive_prefix" = x; then
61539     # As a simple fix, exclude /usr/bin since it's not a real path.
61540     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61541       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61542       # a path prefixed by /cygdrive for fixpath to work.
61543       new_path="$CYGWIN_ROOT_PATH$input_path"
61544     fi
61545   fi
61546 
61547 
61548   if test "x$path" != "x$new_path"; then
61549     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61550     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61551 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61552   fi
61553 
61554     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61555 
61556   path="$POTENTIAL_FREETYPE_LIB_PATH"
61557   has_colon=`$ECHO $path | $GREP ^.:`
61558   new_path="$path"
61559   if test "x$has_colon" = x; then
61560     # Not in mixed or Windows style, start by that.
61561     new_path=`cmd //c echo $path`
61562   fi
61563 
61564 
61565   input_path="$new_path"
61566   # Check if we need to convert this using DOS-style short mode. If the path
61567   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61568   # take no chances and rewrite it.
61569   # Note: m4 eats our [], so we need to use [ and ] instead.
61570   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61571   if test "x$has_forbidden_chars" != x; then
61572     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61573     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61574   fi
61575 
61576 
61577   windows_path="$new_path"
61578   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61579     unix_path=`$CYGPATH -u "$windows_path"`
61580     new_path="$unix_path"
61581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61582     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61583     new_path="$unix_path"
61584   fi
61585 
61586   if test "x$path" != "x$new_path"; then
61587     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61588     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61589 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61590   fi
61591 
61592   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61593   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61594 
61595     else
61596       # We're on a unix platform. Hooray! :)
61597       path="$POTENTIAL_FREETYPE_LIB_PATH"
61598       has_space=`$ECHO "$path" | $GREP " "`
61599       if test "x$has_space" != x; then
61600         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61601 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61602         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61603       fi
61604 
61605       # Use eval to expand a potential ~
61606       eval path="$path"
61607       if test ! -f "$path" && test ! -d "$path"; then
61608         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61609       fi
61610 
61611       if test -d "$path"; then
61612         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61613       else
61614         dir="`$DIRNAME "$path"`"
61615         base="`$BASENAME "$path"`"
61616         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61617       fi
61618     fi
61619   fi
61620 
61621 
61622     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61623     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61624 $as_echo_n "checking for freetype includes... " >&6; }
61625     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61626 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61627     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61628     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61629 $as_echo_n "checking for freetype libraries... " >&6; }
61630     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61631 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61632   fi
61633 
61634               if test "x$FOUND_FREETYPE" != xyes; then
61635 
61636   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61637   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61638   METHOD="well-known location"
61639 
61640   # Let's start with an optimistic view of the world :-)
61641   FOUND_FREETYPE=yes
61642 
61643   # First look for the canonical freetype main include file ft2build.h.
61644   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61645     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61646     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61647     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61648       # Fail.
61649       FOUND_FREETYPE=no
61650     fi
61651   fi
61652 
61653   if test "x$FOUND_FREETYPE" = xyes; then
61654     # Include file found, let's continue the sanity check.
61655     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61656 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61657 
61658     # Reset to default value
61659     FREETYPE_BASE_NAME=freetype
61660     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61661     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61662       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61663           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61664         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61665         # for the .6 version explicitly.
61666         FREETYPE_BASE_NAME=freetype.6
61667         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61668         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61669 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61670       else
61671         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61672 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61673         FOUND_FREETYPE=no
61674       fi
61675     else
61676       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61677         # On Windows, we will need both .lib and .dll file.
61678         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61679           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61680 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61681           FOUND_FREETYPE=no
61682         fi
61683       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61684           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61685         # Found lib in isa dir, use that instead.
61686         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61687         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61688 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61689       fi
61690     fi
61691   fi
61692 
61693   if test "x$FOUND_FREETYPE" = xyes; then
61694 
61695   # Only process if variable expands to non-empty
61696 
61697   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61698     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61699 
61700   # Input might be given as Windows format, start by converting to
61701   # unix format.
61702   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61703   new_path=`$CYGPATH -u "$path"`
61704 
61705   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61706   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61707   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61708   # "foo.exe" is OK but "foo" is an error.
61709   #
61710   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61711   # It is also a way to make sure we got the proper file name for the real test later on.
61712   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61713   if test "x$test_shortpath" = x; then
61714     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61715 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61716     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61717   fi
61718 
61719   # Call helper function which possibly converts this using DOS-style short mode.
61720   # If so, the updated path is stored in $new_path.
61721 
61722   input_path="$new_path"
61723   # Check if we need to convert this using DOS-style short mode. If the path
61724   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61725   # take no chances and rewrite it.
61726   # Note: m4 eats our [], so we need to use [ and ] instead.
61727   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61728   if test "x$has_forbidden_chars" != x; then
61729     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61730     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61731     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61732     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61733       # Going to short mode and back again did indeed matter. Since short mode is
61734       # case insensitive, let's make it lowercase to improve readability.
61735       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61736       # Now convert it back to Unix-style (cygpath)
61737       input_path=`$CYGPATH -u "$shortmode_path"`
61738       new_path="$input_path"
61739     fi
61740   fi
61741 
61742   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61743   if test "x$test_cygdrive_prefix" = x; then
61744     # As a simple fix, exclude /usr/bin since it's not a real path.
61745     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61746       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61747       # a path prefixed by /cygdrive for fixpath to work.
61748       new_path="$CYGWIN_ROOT_PATH$input_path"
61749     fi
61750   fi
61751 
61752 
61753   if test "x$path" != "x$new_path"; then
61754     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61755     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61756 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61757   fi
61758 
61759     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61760 
61761   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61762   has_colon=`$ECHO $path | $GREP ^.:`
61763   new_path="$path"
61764   if test "x$has_colon" = x; then
61765     # Not in mixed or Windows style, start by that.
61766     new_path=`cmd //c echo $path`
61767   fi
61768 
61769 
61770   input_path="$new_path"
61771   # Check if we need to convert this using DOS-style short mode. If the path
61772   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61773   # take no chances and rewrite it.
61774   # Note: m4 eats our [], so we need to use [ and ] instead.
61775   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61776   if test "x$has_forbidden_chars" != x; then
61777     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61778     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61779   fi
61780 
61781 
61782   windows_path="$new_path"
61783   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61784     unix_path=`$CYGPATH -u "$windows_path"`
61785     new_path="$unix_path"
61786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61787     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61788     new_path="$unix_path"
61789   fi
61790 
61791   if test "x$path" != "x$new_path"; then
61792     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61793     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61794 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61795   fi
61796 
61797   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61798   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61799 
61800     else
61801       # We're on a unix platform. Hooray! :)
61802       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61803       has_space=`$ECHO "$path" | $GREP " "`
61804       if test "x$has_space" != x; then
61805         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61806 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61807         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61808       fi
61809 
61810       # Use eval to expand a potential ~
61811       eval path="$path"
61812       if test ! -f "$path" && test ! -d "$path"; then
61813         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61814       fi
61815 
61816       if test -d "$path"; then
61817         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61818       else
61819         dir="`$DIRNAME "$path"`"
61820         base="`$BASENAME "$path"`"
61821         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61822       fi
61823     fi
61824   fi
61825 
61826 
61827   # Only process if variable expands to non-empty
61828 
61829   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61830     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61831 
61832   # Input might be given as Windows format, start by converting to
61833   # unix format.
61834   path="$POTENTIAL_FREETYPE_LIB_PATH"
61835   new_path=`$CYGPATH -u "$path"`
61836 
61837   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61838   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61839   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61840   # "foo.exe" is OK but "foo" is an error.
61841   #
61842   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61843   # It is also a way to make sure we got the proper file name for the real test later on.
61844   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61845   if test "x$test_shortpath" = x; then
61846     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61847 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61848     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61849   fi
61850 
61851   # Call helper function which possibly converts this using DOS-style short mode.
61852   # If so, the updated path is stored in $new_path.
61853 
61854   input_path="$new_path"
61855   # Check if we need to convert this using DOS-style short mode. If the path
61856   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61857   # take no chances and rewrite it.
61858   # Note: m4 eats our [], so we need to use [ and ] instead.
61859   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61860   if test "x$has_forbidden_chars" != x; then
61861     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61862     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61863     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61864     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61865       # Going to short mode and back again did indeed matter. Since short mode is
61866       # case insensitive, let's make it lowercase to improve readability.
61867       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61868       # Now convert it back to Unix-style (cygpath)
61869       input_path=`$CYGPATH -u "$shortmode_path"`
61870       new_path="$input_path"
61871     fi
61872   fi
61873 
61874   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61875   if test "x$test_cygdrive_prefix" = x; then
61876     # As a simple fix, exclude /usr/bin since it's not a real path.
61877     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61878       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61879       # a path prefixed by /cygdrive for fixpath to work.
61880       new_path="$CYGWIN_ROOT_PATH$input_path"
61881     fi
61882   fi
61883 
61884 
61885   if test "x$path" != "x$new_path"; then
61886     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61887     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61888 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61889   fi
61890 
61891     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61892 
61893   path="$POTENTIAL_FREETYPE_LIB_PATH"
61894   has_colon=`$ECHO $path | $GREP ^.:`
61895   new_path="$path"
61896   if test "x$has_colon" = x; then
61897     # Not in mixed or Windows style, start by that.
61898     new_path=`cmd //c echo $path`
61899   fi
61900 
61901 
61902   input_path="$new_path"
61903   # Check if we need to convert this using DOS-style short mode. If the path
61904   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61905   # take no chances and rewrite it.
61906   # Note: m4 eats our [], so we need to use [ and ] instead.
61907   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61908   if test "x$has_forbidden_chars" != x; then
61909     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61910     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61911   fi
61912 
61913 
61914   windows_path="$new_path"
61915   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61916     unix_path=`$CYGPATH -u "$windows_path"`
61917     new_path="$unix_path"
61918   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61919     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61920     new_path="$unix_path"
61921   fi
61922 
61923   if test "x$path" != "x$new_path"; then
61924     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61925     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61926 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61927   fi
61928 
61929   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61930   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61931 
61932     else
61933       # We're on a unix platform. Hooray! :)
61934       path="$POTENTIAL_FREETYPE_LIB_PATH"
61935       has_space=`$ECHO "$path" | $GREP " "`
61936       if test "x$has_space" != x; then
61937         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61938 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61939         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61940       fi
61941 
61942       # Use eval to expand a potential ~
61943       eval path="$path"
61944       if test ! -f "$path" && test ! -d "$path"; then
61945         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61946       fi
61947 
61948       if test -d "$path"; then
61949         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61950       else
61951         dir="`$DIRNAME "$path"`"
61952         base="`$BASENAME "$path"`"
61953         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61954       fi
61955     fi
61956   fi
61957 
61958 
61959     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61960     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61961 $as_echo_n "checking for freetype includes... " >&6; }
61962     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61963 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61964     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61965     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61966 $as_echo_n "checking for freetype libraries... " >&6; }
61967     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61968 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61969   fi
61970 
61971               fi
61972             fi
61973           fi
61974         fi
61975       fi # end check in well-known locations
61976 
61977       if test "x$FOUND_FREETYPE" != xyes; then
61978 
61979   # Print a helpful message on how to acquire the necessary build dependency.
61980   # freetype is the help tag: freetype, cups, alsa etc
61981   MISSING_DEPENDENCY=freetype
61982 
61983   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61984     cygwin_help $MISSING_DEPENDENCY
61985   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61986     msys_help $MISSING_DEPENDENCY
61987   else
61988     PKGHANDLER_COMMAND=
61989 
61990     case $PKGHANDLER in
61991       apt-get)
61992         apt_help     $MISSING_DEPENDENCY ;;
61993       yum)
61994         yum_help     $MISSING_DEPENDENCY ;;
61995       port)
61996         port_help    $MISSING_DEPENDENCY ;;
61997       pkgutil)
61998         pkgutil_help $MISSING_DEPENDENCY ;;
61999       pkgadd)
62000         pkgadd_help  $MISSING_DEPENDENCY ;;
62001     esac
62002 
62003     if test "x$PKGHANDLER_COMMAND" != x; then
62004       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62005     fi
62006   fi
62007 
62008         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62009       fi
62010     fi # end user specified settings
62011 
62012     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62013     if test "x$FREETYPE_CFLAGS" = x; then
62014 
62015   # Only process if variable expands to non-empty
62016 
62017   if test "x$FREETYPE_INCLUDE_PATH" != x; then
62018     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62019 
62020   # Input might be given as Windows format, start by converting to
62021   # unix format.
62022   path="$FREETYPE_INCLUDE_PATH"
62023   new_path=`$CYGPATH -u "$path"`
62024 
62025   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62026   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62027   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62028   # "foo.exe" is OK but "foo" is an error.
62029   #
62030   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62031   # It is also a way to make sure we got the proper file name for the real test later on.
62032   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62033   if test "x$test_shortpath" = x; then
62034     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62035 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62036     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62037   fi
62038 
62039   # Call helper function which possibly converts this using DOS-style short mode.
62040   # If so, the updated path is stored in $new_path.
62041 
62042   input_path="$new_path"
62043   # Check if we need to convert this using DOS-style short mode. If the path
62044   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62045   # take no chances and rewrite it.
62046   # Note: m4 eats our [], so we need to use [ and ] instead.
62047   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62048   if test "x$has_forbidden_chars" != x; then
62049     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62050     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62051     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62052     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62053       # Going to short mode and back again did indeed matter. Since short mode is
62054       # case insensitive, let's make it lowercase to improve readability.
62055       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62056       # Now convert it back to Unix-style (cygpath)
62057       input_path=`$CYGPATH -u "$shortmode_path"`
62058       new_path="$input_path"
62059     fi
62060   fi
62061 
62062   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62063   if test "x$test_cygdrive_prefix" = x; then
62064     # As a simple fix, exclude /usr/bin since it's not a real path.
62065     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62066       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62067       # a path prefixed by /cygdrive for fixpath to work.
62068       new_path="$CYGWIN_ROOT_PATH$input_path"
62069     fi
62070   fi
62071 
62072 
62073   if test "x$path" != "x$new_path"; then
62074     FREETYPE_INCLUDE_PATH="$new_path"
62075     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62076 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62077   fi
62078 
62079     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62080 
62081   path="$FREETYPE_INCLUDE_PATH"
62082   has_colon=`$ECHO $path | $GREP ^.:`
62083   new_path="$path"
62084   if test "x$has_colon" = x; then
62085     # Not in mixed or Windows style, start by that.
62086     new_path=`cmd //c echo $path`
62087   fi
62088 
62089 
62090   input_path="$new_path"
62091   # Check if we need to convert this using DOS-style short mode. If the path
62092   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62093   # take no chances and rewrite it.
62094   # Note: m4 eats our [], so we need to use [ and ] instead.
62095   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62096   if test "x$has_forbidden_chars" != x; then
62097     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62098     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62099   fi
62100 
62101 
62102   windows_path="$new_path"
62103   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62104     unix_path=`$CYGPATH -u "$windows_path"`
62105     new_path="$unix_path"
62106   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62107     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62108     new_path="$unix_path"
62109   fi
62110 
62111   if test "x$path" != "x$new_path"; then
62112     FREETYPE_INCLUDE_PATH="$new_path"
62113     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62114 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62115   fi
62116 
62117   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62118   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62119 
62120     else
62121       # We're on a unix platform. Hooray! :)
62122       path="$FREETYPE_INCLUDE_PATH"
62123       has_space=`$ECHO "$path" | $GREP " "`
62124       if test "x$has_space" != x; then
62125         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62126 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62127         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62128       fi
62129 
62130       # Use eval to expand a potential ~
62131       eval path="$path"
62132       if test ! -f "$path" && test ! -d "$path"; then
62133         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62134       fi
62135 
62136       if test -d "$path"; then
62137         FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62138       else
62139         dir="`$DIRNAME "$path"`"
62140         base="`$BASENAME "$path"`"
62141         FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62142       fi
62143     fi
62144   fi
62145 
62146       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62147         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62148       else
62149         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62150       fi
62151     fi
62152 
62153     if test "x$FREETYPE_LIBS" = x; then
62154 
62155   # Only process if variable expands to non-empty
62156 
62157   if test "x$FREETYPE_LIB_PATH" != x; then
62158     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62159 
62160   # Input might be given as Windows format, start by converting to
62161   # unix format.
62162   path="$FREETYPE_LIB_PATH"
62163   new_path=`$CYGPATH -u "$path"`
62164 
62165   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62166   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62167   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62168   # "foo.exe" is OK but "foo" is an error.
62169   #
62170   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62171   # It is also a way to make sure we got the proper file name for the real test later on.
62172   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62173   if test "x$test_shortpath" = x; then
62174     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62175 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62176     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62177   fi
62178 
62179   # Call helper function which possibly converts this using DOS-style short mode.
62180   # If so, the updated path is stored in $new_path.
62181 
62182   input_path="$new_path"
62183   # Check if we need to convert this using DOS-style short mode. If the path
62184   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62185   # take no chances and rewrite it.
62186   # Note: m4 eats our [], so we need to use [ and ] instead.
62187   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62188   if test "x$has_forbidden_chars" != x; then
62189     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62190     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62191     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62192     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62193       # Going to short mode and back again did indeed matter. Since short mode is
62194       # case insensitive, let's make it lowercase to improve readability.
62195       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62196       # Now convert it back to Unix-style (cygpath)
62197       input_path=`$CYGPATH -u "$shortmode_path"`
62198       new_path="$input_path"
62199     fi
62200   fi
62201 
62202   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62203   if test "x$test_cygdrive_prefix" = x; then
62204     # As a simple fix, exclude /usr/bin since it's not a real path.
62205     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62206       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62207       # a path prefixed by /cygdrive for fixpath to work.
62208       new_path="$CYGWIN_ROOT_PATH$input_path"
62209     fi
62210   fi
62211 
62212 
62213   if test "x$path" != "x$new_path"; then
62214     FREETYPE_LIB_PATH="$new_path"
62215     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62216 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62217   fi
62218 
62219     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62220 
62221   path="$FREETYPE_LIB_PATH"
62222   has_colon=`$ECHO $path | $GREP ^.:`
62223   new_path="$path"
62224   if test "x$has_colon" = x; then
62225     # Not in mixed or Windows style, start by that.
62226     new_path=`cmd //c echo $path`
62227   fi
62228 
62229 
62230   input_path="$new_path"
62231   # Check if we need to convert this using DOS-style short mode. If the path
62232   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62233   # take no chances and rewrite it.
62234   # Note: m4 eats our [], so we need to use [ and ] instead.
62235   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62236   if test "x$has_forbidden_chars" != x; then
62237     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62238     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62239   fi
62240 
62241 
62242   windows_path="$new_path"
62243   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62244     unix_path=`$CYGPATH -u "$windows_path"`
62245     new_path="$unix_path"
62246   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62247     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62248     new_path="$unix_path"
62249   fi
62250 
62251   if test "x$path" != "x$new_path"; then
62252     FREETYPE_LIB_PATH="$new_path"
62253     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62254 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62255   fi
62256 
62257   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62258   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62259 
62260     else
62261       # We're on a unix platform. Hooray! :)
62262       path="$FREETYPE_LIB_PATH"
62263       has_space=`$ECHO "$path" | $GREP " "`
62264       if test "x$has_space" != x; then
62265         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62266 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62267         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62268       fi
62269 
62270       # Use eval to expand a potential ~
62271       eval path="$path"
62272       if test ! -f "$path" && test ! -d "$path"; then
62273         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62274       fi
62275 
62276       if test -d "$path"; then
62277         FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62278       else
62279         dir="`$DIRNAME "$path"`"
62280         base="`$BASENAME "$path"`"
62281         FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62282       fi
62283     fi
62284   fi
62285 
62286       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62287         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62288       else
62289         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62290       fi
62291     fi
62292 
62293     # Try to compile it
62294     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62295 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
62296     ac_ext=cpp
62297 ac_cpp='$CXXCPP $CPPFLAGS'
62298 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62299 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62300 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62301 
62302     PREV_CXXCFLAGS="$CXXFLAGS"
62303     PREV_LIBS="$LIBS"
62304     PREV_CXX="$CXX"
62305     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62306     LIBS="$LIBS $FREETYPE_LIBS"
62307     CXX="$FIXPATH $CXX"
62308     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62309 /* end confdefs.h.  */
62310 
62311           #include<ft2build.h>
62312           #include FT_FREETYPE_H
62313           int main () {
62314             FT_Init_FreeType(NULL);
62315             return 0;
62316           }
62317 
62318 _ACEOF
62319 if ac_fn_cxx_try_link "$LINENO"; then :
62320 
62321           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62322 $as_echo "yes" >&6; }
62323 
62324 else
62325 
62326           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62327 $as_echo "no" >&6; }
62328           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62329 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62330           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62331 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62332 
62333 
62334   # Print a helpful message on how to acquire the necessary build dependency.
62335   # freetype is the help tag: freetype, cups, alsa etc
62336   MISSING_DEPENDENCY=freetype
62337 
62338   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62339     cygwin_help $MISSING_DEPENDENCY
62340   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62341     msys_help $MISSING_DEPENDENCY
62342   else
62343     PKGHANDLER_COMMAND=
62344 
62345     case $PKGHANDLER in
62346       apt-get)
62347         apt_help     $MISSING_DEPENDENCY ;;
62348       yum)
62349         yum_help     $MISSING_DEPENDENCY ;;
62350       port)
62351         port_help    $MISSING_DEPENDENCY ;;
62352       pkgutil)
62353         pkgutil_help $MISSING_DEPENDENCY ;;
62354       pkgadd)
62355         pkgadd_help  $MISSING_DEPENDENCY ;;
62356     esac
62357 
62358     if test "x$PKGHANDLER_COMMAND" != x; then
62359       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62360     fi
62361   fi
62362 
62363 
62364           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62365 
62366 
62367 fi
62368 rm -f core conftest.err conftest.$ac_objext \
62369     conftest$ac_exeext conftest.$ac_ext
62370     CXXCFLAGS="$PREV_CXXFLAGS"
62371     LIBS="$PREV_LIBS"
62372     CXX="$PREV_CXX"
62373     ac_ext=cpp
62374 ac_cpp='$CXXCPP $CPPFLAGS'
62375 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62376 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62377 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62378 
62379 
62380     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62381 $as_echo_n "checking if we should bundle freetype... " >&6; }
62382     if test "x$BUNDLE_FREETYPE" = xyes; then
62383       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62384     fi
62385     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62386 $as_echo "$BUNDLE_FREETYPE" >&6; }
62387 
62388   fi # end freetype needed
62389 
62390 
62391 
62392 
62393 
62394 
62395 
62396 # Check whether --with-alsa was given.
62397 if test "${with_alsa+set}" = set; then :
62398   withval=$with_alsa;
62399 fi
62400 
62401 
62402 # Check whether --with-alsa-include was given.
62403 if test "${with_alsa_include+set}" = set; then :
62404   withval=$with_alsa_include;
62405 fi
62406 
62407 
62408 # Check whether --with-alsa-lib was given.
62409 if test "${with_alsa_lib+set}" = set; then :
62410   withval=$with_alsa_lib;
62411 fi
62412 
62413 
62414   if test "x$NEEDS_LIB_ALSA" = xfalse; then
62415     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62416         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62417         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62418       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62419 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62420     fi
62421     ALSA_CFLAGS=
62422     ALSA_LIBS=
62423   else
62424     ALSA_FOUND=no
62425 
62426     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62427       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62428     fi
62429 
62430     if test "x${with_alsa}" != x; then
62431       ALSA_LIBS="-L${with_alsa}/lib -lasound"
62432       ALSA_CFLAGS="-I${with_alsa}/include"
62433       ALSA_FOUND=yes
62434     fi
62435     if test "x${with_alsa_include}" != x; then
62436       ALSA_CFLAGS="-I${with_alsa_include}"
62437       ALSA_FOUND=yes
62438     fi
62439     if test "x${with_alsa_lib}" != x; then
62440       ALSA_LIBS="-L${with_alsa_lib} -lasound"
62441       ALSA_FOUND=yes
62442     fi
62443     # Do not try pkg-config if we have a sysroot set.
62444     if test "x$SYSROOT" = x; then
62445       if test "x$ALSA_FOUND" = xno; then
62446 
62447 pkg_failed=no
62448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62449 $as_echo_n "checking for ALSA... " >&6; }
62450 
62451 if test -n "$ALSA_CFLAGS"; then
62452     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62453  elif test -n "$PKG_CONFIG"; then
62454     if test -n "$PKG_CONFIG" && \
62455     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62456   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62457   ac_status=$?
62458   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62459   test $ac_status = 0; }; then
62460   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62461 else
62462   pkg_failed=yes
62463 fi
62464  else
62465     pkg_failed=untried
62466 fi
62467 if test -n "$ALSA_LIBS"; then
62468     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62469  elif test -n "$PKG_CONFIG"; then
62470     if test -n "$PKG_CONFIG" && \
62471     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62472   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62473   ac_status=$?
62474   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62475   test $ac_status = 0; }; then
62476   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62477 else
62478   pkg_failed=yes
62479 fi
62480  else
62481     pkg_failed=untried
62482 fi
62483 
62484 
62485 
62486 if test $pkg_failed = yes; then
62487 
62488 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62489         _pkg_short_errors_supported=yes
62490 else
62491         _pkg_short_errors_supported=no
62492 fi
62493         if test $_pkg_short_errors_supported = yes; then
62494                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62495         else
62496                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62497         fi
62498         # Put the nasty error message in config.log where it belongs
62499         echo "$ALSA_PKG_ERRORS" >&5
62500 
62501         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62502 $as_echo "no" >&6; }
62503                 ALSA_FOUND=no
62504 elif test $pkg_failed = untried; then
62505         ALSA_FOUND=no
62506 else
62507         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62508         ALSA_LIBS=$pkg_cv_ALSA_LIBS
62509         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62510 $as_echo "yes" >&6; }
62511         ALSA_FOUND=yes
62512 fi
62513       fi
62514     fi
62515     if test "x$ALSA_FOUND" = xno; then
62516       for ac_header in alsa/asoundlib.h
62517 do :
62518   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62519 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62520   cat >>confdefs.h <<_ACEOF
62521 #define HAVE_ALSA_ASOUNDLIB_H 1
62522 _ACEOF
62523 
62524             ALSA_FOUND=yes
62525             ALSA_CFLAGS=-Iignoreme
62526             ALSA_LIBS=-lasound
62527             DEFAULT_ALSA=yes
62528 
62529 else
62530   ALSA_FOUND=no
62531 
62532 fi
62533 
62534 done
62535 
62536     fi
62537     if test "x$ALSA_FOUND" = xno; then
62538 
62539   # Print a helpful message on how to acquire the necessary build dependency.
62540   # alsa is the help tag: freetype, cups, alsa etc
62541   MISSING_DEPENDENCY=alsa
62542 
62543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62544     cygwin_help $MISSING_DEPENDENCY
62545   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62546     msys_help $MISSING_DEPENDENCY
62547   else
62548     PKGHANDLER_COMMAND=
62549 
62550     case $PKGHANDLER in
62551       apt-get)
62552         apt_help     $MISSING_DEPENDENCY ;;
62553       yum)
62554         yum_help     $MISSING_DEPENDENCY ;;
62555       port)
62556         port_help    $MISSING_DEPENDENCY ;;
62557       pkgutil)
62558         pkgutil_help $MISSING_DEPENDENCY ;;
62559       pkgadd)
62560         pkgadd_help  $MISSING_DEPENDENCY ;;
62561     esac
62562 
62563     if test "x$PKGHANDLER_COMMAND" != x; then
62564       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62565     fi
62566   fi
62567 
62568       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62569     fi
62570   fi
62571 
62572 
62573 
62574 
62575 
62576 
62577 # Check whether --with-libffi was given.
62578 if test "${with_libffi+set}" = set; then :
62579   withval=$with_libffi;
62580 fi
62581 
62582 
62583 # Check whether --with-libffi-include was given.
62584 if test "${with_libffi_include+set}" = set; then :
62585   withval=$with_libffi_include;
62586 fi
62587 
62588 
62589 # Check whether --with-libffi-lib was given.
62590 if test "${with_libffi_lib+set}" = set; then :
62591   withval=$with_libffi_lib;
62592 fi
62593 
62594   # Check whether --enable-libffi-bundling was given.
62595 if test "${enable_libffi_bundling+set}" = set; then :
62596   enableval=$enable_libffi_bundling;
62597 fi
62598 
62599 
62600   if test "x$NEEDS_LIB_FFI" = xfalse; then
62601     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62602         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62603         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62604       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62605 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62606     fi
62607     LIBFFI_CFLAGS=
62608     LIBFFI_LIBS=
62609   else
62610     LIBFFI_FOUND=no
62611 
62612     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62613       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62614     fi
62615 
62616     if test "x${with_libffi}" != x; then
62617       LIBFFI_LIB_PATH="${with_libffi}/lib"
62618       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62619       LIBFFI_CFLAGS="-I${with_libffi}/include"
62620       LIBFFI_FOUND=yes
62621     fi
62622     if test "x${with_libffi_include}" != x; then
62623       LIBFFI_CFLAGS="-I${with_libffi_include}"
62624       LIBFFI_FOUND=yes
62625     fi
62626     if test "x${with_libffi_lib}" != x; then
62627       LIBFFI_LIB_PATH="${with_libffi_lib}"
62628       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62629       LIBFFI_FOUND=yes
62630     fi
62631     # Do not try pkg-config if we have a sysroot set.
62632     if test "x$SYSROOT" = x; then
62633       if test "x$LIBFFI_FOUND" = xno; then
62634         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62635 
62636 pkg_failed=no
62637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62638 $as_echo_n "checking for LIBFFI... " >&6; }
62639 
62640 if test -n "$LIBFFI_CFLAGS"; then
62641     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62642  elif test -n "$PKG_CONFIG"; then
62643     if test -n "$PKG_CONFIG" && \
62644     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62645   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62646   ac_status=$?
62647   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62648   test $ac_status = 0; }; then
62649   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62650 else
62651   pkg_failed=yes
62652 fi
62653  else
62654     pkg_failed=untried
62655 fi
62656 if test -n "$LIBFFI_LIBS"; then
62657     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62658  elif test -n "$PKG_CONFIG"; then
62659     if test -n "$PKG_CONFIG" && \
62660     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62661   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62662   ac_status=$?
62663   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62664   test $ac_status = 0; }; then
62665   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62666 else
62667   pkg_failed=yes
62668 fi
62669  else
62670     pkg_failed=untried
62671 fi
62672 
62673 
62674 
62675 if test $pkg_failed = yes; then
62676 
62677 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62678         _pkg_short_errors_supported=yes
62679 else
62680         _pkg_short_errors_supported=no
62681 fi
62682         if test $_pkg_short_errors_supported = yes; then
62683                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62684         else
62685                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62686         fi
62687         # Put the nasty error message in config.log where it belongs
62688         echo "$LIBFFI_PKG_ERRORS" >&5
62689 
62690         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62691 $as_echo "no" >&6; }
62692                 LIBFFI_FOUND=no
62693 elif test $pkg_failed = untried; then
62694         LIBFFI_FOUND=no
62695 else
62696         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62697         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62698         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62699 $as_echo "yes" >&6; }
62700         LIBFFI_FOUND=yes
62701 fi
62702       fi
62703     fi
62704     if test "x$LIBFFI_FOUND" = xno; then
62705       for ac_header in ffi.h
62706 do :
62707   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62708 if test "x$ac_cv_header_ffi_h" = xyes; then :
62709   cat >>confdefs.h <<_ACEOF
62710 #define HAVE_FFI_H 1
62711 _ACEOF
62712 
62713             LIBFFI_FOUND=yes
62714             LIBFFI_CFLAGS=
62715             LIBFFI_LIBS=-lffi
62716 
62717 else
62718   LIBFFI_FOUND=no
62719 
62720 fi
62721 
62722 done
62723 
62724     fi
62725     if test "x$LIBFFI_FOUND" = xno; then
62726 
62727   # Print a helpful message on how to acquire the necessary build dependency.
62728   # ffi is the help tag: freetype, cups, alsa etc
62729   MISSING_DEPENDENCY=ffi
62730 
62731   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62732     cygwin_help $MISSING_DEPENDENCY
62733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62734     msys_help $MISSING_DEPENDENCY
62735   else
62736     PKGHANDLER_COMMAND=
62737 
62738     case $PKGHANDLER in
62739       apt-get)
62740         apt_help     $MISSING_DEPENDENCY ;;
62741       yum)
62742         yum_help     $MISSING_DEPENDENCY ;;
62743       port)
62744         port_help    $MISSING_DEPENDENCY ;;
62745       pkgutil)
62746         pkgutil_help $MISSING_DEPENDENCY ;;
62747       pkgadd)
62748         pkgadd_help  $MISSING_DEPENDENCY ;;
62749     esac
62750 
62751     if test "x$PKGHANDLER_COMMAND" != x; then
62752       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62753     fi
62754   fi
62755 
62756       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62757     fi
62758 
62759     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62760 $as_echo_n "checking if libffi works... " >&6; }
62761     ac_ext=c
62762 ac_cpp='$CPP $CPPFLAGS'
62763 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62764 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62765 ac_compiler_gnu=$ac_cv_c_compiler_gnu
62766 
62767     OLD_CFLAGS="$CFLAGS"
62768     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62769     OLD_LIBS="$LIBS"
62770     LIBS="$LIBS $LIBFFI_LIBS"
62771     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62772 /* end confdefs.h.  */
62773 #include <ffi.h>
62774 int
62775 main ()
62776 {
62777 
62778           ffi_call(NULL, NULL, NULL, NULL);
62779           return 0;
62780 
62781   ;
62782   return 0;
62783 }
62784 _ACEOF
62785 if ac_fn_c_try_link "$LINENO"; then :
62786   LIBFFI_WORKS=yes
62787 else
62788   LIBFFI_WORKS=no
62789 
62790 fi
62791 rm -f core conftest.err conftest.$ac_objext \
62792     conftest$ac_exeext conftest.$ac_ext
62793     CFLAGS="$OLD_CFLAGS"
62794     LIBS="$OLD_LIBS"
62795     ac_ext=cpp
62796 ac_cpp='$CXXCPP $CPPFLAGS'
62797 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62798 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62799 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62800 
62801     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62802 $as_echo "$LIBFFI_WORKS" >&6; }
62803 
62804     if test "x$LIBFFI_WORKS" = xno; then
62805 
62806   # Print a helpful message on how to acquire the necessary build dependency.
62807   # ffi is the help tag: freetype, cups, alsa etc
62808   MISSING_DEPENDENCY=ffi
62809 
62810   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62811     cygwin_help $MISSING_DEPENDENCY
62812   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62813     msys_help $MISSING_DEPENDENCY
62814   else
62815     PKGHANDLER_COMMAND=
62816 
62817     case $PKGHANDLER in
62818       apt-get)
62819         apt_help     $MISSING_DEPENDENCY ;;
62820       yum)
62821         yum_help     $MISSING_DEPENDENCY ;;
62822       port)
62823         port_help    $MISSING_DEPENDENCY ;;
62824       pkgutil)
62825         pkgutil_help $MISSING_DEPENDENCY ;;
62826       pkgadd)
62827         pkgadd_help  $MISSING_DEPENDENCY ;;
62828     esac
62829 
62830     if test "x$PKGHANDLER_COMMAND" != x; then
62831       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62832     fi
62833   fi
62834 
62835       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62836     fi
62837 
62838     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
62839 $as_echo_n "checking if libffi should be bundled... " >&6; }
62840     if test "x$enable_libffi_bundling" = "x"; then
62841       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62842 $as_echo "no" >&6; }
62843       ENABLE_LIBFFI_BUNDLING=false
62844     elif  test "x$enable_libffi_bundling" = "xno"; then
62845       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
62846 $as_echo "no, forced" >&6; }
62847       ENABLE_LIBFFI_BUNDLING=false
62848     elif  test "x$enable_libffi_bundling" = "xyes"; then
62849       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
62850 $as_echo "yes, forced" >&6; }
62851       ENABLE_LIBFFI_BUNDLING=true
62852     else
62853       as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
62854     fi
62855 
62856     # Find the libffi.so.X to bundle
62857     if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
62858       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
62859 $as_echo_n "checking for libffi lib file location... " >&6; }
62860       if test "x${LIBFFI_LIB_PATH}" != x; then
62861         if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
62862           LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
62863         else
62864           as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
62865         fi
62866       else
62867         # If we don't have an explicit path, look in a few obvious places
62868         if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
62869           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
62870             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
62871           elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
62872             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
62873           else
62874             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
62875           fi
62876         elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
62877           if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
62878             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
62879           elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
62880             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
62881           else
62882             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
62883           fi
62884         else
62885           # Fallback on the default /usr/lib dir
62886           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
62887             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
62888           else
62889             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
62890           fi
62891         fi
62892       fi
62893       # Make sure the wildcard is evaluated
62894       LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
62895       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
62896 $as_echo "${LIBFFI_LIB_FILE}" >&6; }
62897     fi
62898   fi
62899 
62900 
62901 
62902 
62903 
62904 
62905 
62906   if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62907     # Extract the first word of "llvm-config", so it can be a program name with args.
62908 set dummy llvm-config; ac_word=$2
62909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62910 $as_echo_n "checking for $ac_word... " >&6; }
62911 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62912   $as_echo_n "(cached) " >&6
62913 else
62914   if test -n "$LLVM_CONFIG"; then
62915   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62916 else
62917 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62918 for as_dir in $PATH
62919 do
62920   IFS=$as_save_IFS
62921   test -z "$as_dir" && as_dir=.
62922     for ac_exec_ext in '' $ac_executable_extensions; do
62923   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62924     ac_cv_prog_LLVM_CONFIG="llvm-config"
62925     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62926     break 2
62927   fi
62928 done
62929   done
62930 IFS=$as_save_IFS
62931 
62932 fi
62933 fi
62934 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62935 if test -n "$LLVM_CONFIG"; then
62936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62937 $as_echo "$LLVM_CONFIG" >&6; }
62938 else
62939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62940 $as_echo "no" >&6; }
62941 fi
62942 
62943 
62944 
62945     if test "x$LLVM_CONFIG" != xllvm-config; then
62946       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
62947     fi
62948 
62949     llvm_components="jit mcjit engine nativecodegen native"
62950     unset LLVM_CFLAGS
62951     for flag in $("$LLVM_CONFIG" --cxxflags); do
62952       if echo "${flag}" | grep -q '^-[ID]'; then
62953         if test "${flag}" != "-D_DEBUG" ; then
62954           if test "${LLVM_CFLAGS}" != "" ; then
62955             LLVM_CFLAGS="${LLVM_CFLAGS} "
62956           fi
62957           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
62958         fi
62959       fi
62960     done
62961     llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
62962     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
62963 
62964     unset LLVM_LDFLAGS
62965     for flag in $("${LLVM_CONFIG}" --ldflags); do
62966       if echo "${flag}" | grep -q '^-L'; then
62967         if test "${LLVM_LDFLAGS}" != ""; then
62968           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
62969         fi
62970         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
62971       fi
62972     done
62973 
62974     unset LLVM_LIBS
62975     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
62976       if echo "${flag}" | grep -q '^-l'; then
62977         if test "${LLVM_LIBS}" != ""; then
62978           LLVM_LIBS="${LLVM_LIBS} "
62979         fi
62980         LLVM_LIBS="${LLVM_LIBS}${flag}"
62981       fi
62982     done
62983 
62984     # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
62985     # always properly detect -ltinfo
62986     LLVM_LIBS="${LLVM_LIBS} -ltinfo"
62987 
62988 
62989 
62990 
62991   fi
62992 
62993 
62994 
62995 # Check whether --with-libjpeg was given.
62996 if test "${with_libjpeg+set}" = set; then :
62997   withval=$with_libjpeg;
62998 fi
62999 
63000 
63001   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63002 $as_echo_n "checking for which libjpeg to use... " >&6; }
63003   # default is bundled
63004   DEFAULT_LIBJPEG=bundled
63005   # if user didn't specify, use DEFAULT_LIBJPEG
63006   if test "x${with_libjpeg}" = "x"; then
63007     with_libjpeg=${DEFAULT_LIBJPEG}
63008   fi
63009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63010 $as_echo "${with_libjpeg}" >&6; }
63011 
63012   if test "x${with_libjpeg}" = "xbundled"; then
63013     USE_EXTERNAL_LIBJPEG=false
63014   elif test "x${with_libjpeg}" = "xsystem"; then
63015     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63016 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63017 
63018 else
63019    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63020 fi
63021 
63022 
63023     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63024 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63025 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63026   $as_echo_n "(cached) " >&6
63027 else
63028   ac_check_lib_save_LIBS=$LIBS
63029 LIBS="-ljpeg  $LIBS"
63030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63031 /* end confdefs.h.  */
63032 
63033 /* Override any GCC internal prototype to avoid an error.
63034    Use char because int might match the return type of a GCC
63035    builtin and then its argument prototype would still apply.  */
63036 #ifdef __cplusplus
63037 extern "C"
63038 #endif
63039 char jpeg_CreateDecompress ();
63040 int
63041 main ()
63042 {
63043 return jpeg_CreateDecompress ();
63044   ;
63045   return 0;
63046 }
63047 _ACEOF
63048 if ac_fn_cxx_try_link "$LINENO"; then :
63049   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63050 else
63051   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63052 fi
63053 rm -f core conftest.err conftest.$ac_objext \
63054     conftest$ac_exeext conftest.$ac_ext
63055 LIBS=$ac_check_lib_save_LIBS
63056 fi
63057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63058 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63059 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63060   cat >>confdefs.h <<_ACEOF
63061 #define HAVE_LIBJPEG 1
63062 _ACEOF
63063 
63064   LIBS="-ljpeg $LIBS"
63065 
63066 else
63067    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63068 fi
63069 
63070 
63071     USE_EXTERNAL_LIBJPEG=true
63072   else
63073     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63074   fi
63075 
63076 
63077 
63078 
63079 
63080 # Check whether --with-giflib was given.
63081 if test "${with_giflib+set}" = set; then :
63082   withval=$with_giflib;
63083 fi
63084 
63085 
63086   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63087 $as_echo_n "checking for which giflib to use... " >&6; }
63088   # default is bundled
63089   DEFAULT_GIFLIB=bundled
63090   # if user didn't specify, use DEFAULT_GIFLIB
63091   if test "x${with_giflib}" = "x"; then
63092     with_giflib=${DEFAULT_GIFLIB}
63093   fi
63094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63095 $as_echo "${with_giflib}" >&6; }
63096 
63097   if test "x${with_giflib}" = "xbundled"; then
63098     USE_EXTERNAL_LIBGIF=false
63099   elif test "x${with_giflib}" = "xsystem"; then
63100     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63101 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63102 
63103 else
63104    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63105 fi
63106 
63107 
63108     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63109 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63110 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63111   $as_echo_n "(cached) " >&6
63112 else
63113   ac_check_lib_save_LIBS=$LIBS
63114 LIBS="-lgif  $LIBS"
63115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63116 /* end confdefs.h.  */
63117 
63118 /* Override any GCC internal prototype to avoid an error.
63119    Use char because int might match the return type of a GCC
63120    builtin and then its argument prototype would still apply.  */
63121 #ifdef __cplusplus
63122 extern "C"
63123 #endif
63124 char DGifGetCode ();
63125 int
63126 main ()
63127 {
63128 return DGifGetCode ();
63129   ;
63130   return 0;
63131 }
63132 _ACEOF
63133 if ac_fn_cxx_try_link "$LINENO"; then :
63134   ac_cv_lib_gif_DGifGetCode=yes
63135 else
63136   ac_cv_lib_gif_DGifGetCode=no
63137 fi
63138 rm -f core conftest.err conftest.$ac_objext \
63139     conftest$ac_exeext conftest.$ac_ext
63140 LIBS=$ac_check_lib_save_LIBS
63141 fi
63142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63143 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63144 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63145   cat >>confdefs.h <<_ACEOF
63146 #define HAVE_LIBGIF 1
63147 _ACEOF
63148 
63149   LIBS="-lgif $LIBS"
63150 
63151 else
63152    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63153 fi
63154 
63155 
63156     USE_EXTERNAL_LIBGIF=true
63157   else
63158     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63159   fi
63160 
63161 
63162 
63163 
63164 
63165 # Check whether --with-libpng was given.
63166 if test "${with_libpng+set}" = set; then :
63167   withval=$with_libpng;
63168 fi
63169 
63170 
63171   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63172 $as_echo_n "checking for which libpng to use... " >&6; }
63173 
63174   # default is bundled
63175   DEFAULT_LIBPNG=bundled
63176   # if user didn't specify, use DEFAULT_LIBPNG
63177   if test "x${with_libpng}" = "x"; then
63178       with_libpng=${DEFAULT_LIBPNG}
63179   fi
63180 
63181   if test "x${with_libpng}" = "xbundled"; then
63182       USE_EXTERNAL_LIBPNG=false
63183       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63184 $as_echo "bundled" >&6; }
63185   elif test "x${with_libpng}" = "xsystem"; then
63186 
63187 pkg_failed=no
63188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63189 $as_echo_n "checking for PNG... " >&6; }
63190 
63191 if test -n "$PNG_CFLAGS"; then
63192     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63193  elif test -n "$PKG_CONFIG"; then
63194     if test -n "$PKG_CONFIG" && \
63195     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63196   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63197   ac_status=$?
63198   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63199   test $ac_status = 0; }; then
63200   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63201 else
63202   pkg_failed=yes
63203 fi
63204  else
63205     pkg_failed=untried
63206 fi
63207 if test -n "$PNG_LIBS"; then
63208     pkg_cv_PNG_LIBS="$PNG_LIBS"
63209  elif test -n "$PKG_CONFIG"; then
63210     if test -n "$PKG_CONFIG" && \
63211     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63212   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63213   ac_status=$?
63214   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63215   test $ac_status = 0; }; then
63216   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63217 else
63218   pkg_failed=yes
63219 fi
63220  else
63221     pkg_failed=untried
63222 fi
63223 
63224 
63225 
63226 if test $pkg_failed = yes; then
63227 
63228 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63229         _pkg_short_errors_supported=yes
63230 else
63231         _pkg_short_errors_supported=no
63232 fi
63233         if test $_pkg_short_errors_supported = yes; then
63234                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63235         else
63236                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63237         fi
63238         # Put the nasty error message in config.log where it belongs
63239         echo "$PNG_PKG_ERRORS" >&5
63240 
63241         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63242 $as_echo "no" >&6; }
63243                  LIBPNG_FOUND=no
63244 elif test $pkg_failed = untried; then
63245          LIBPNG_FOUND=no
63246 else
63247         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63248         PNG_LIBS=$pkg_cv_PNG_LIBS
63249         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63250 $as_echo "yes" >&6; }
63251          LIBPNG_FOUND=yes
63252 fi
63253       if test "x${LIBPNG_FOUND}" = "xyes"; then
63254           USE_EXTERNAL_LIBPNG=true
63255           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63256 $as_echo "system" >&6; }
63257       else
63258           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63259 $as_echo "system not found" >&6; }
63260           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63261       fi
63262   else
63263       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63264   fi
63265 
63266 
63267 
63268 
63269 
63270 # Check whether --with-zlib was given.
63271 if test "${with_zlib+set}" = set; then :
63272   withval=$with_zlib;
63273 fi
63274 
63275 
63276   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63277 $as_echo_n "checking for compress in -lz... " >&6; }
63278 if ${ac_cv_lib_z_compress+:} false; then :
63279   $as_echo_n "(cached) " >&6
63280 else
63281   ac_check_lib_save_LIBS=$LIBS
63282 LIBS="-lz  $LIBS"
63283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63284 /* end confdefs.h.  */
63285 
63286 /* Override any GCC internal prototype to avoid an error.
63287    Use char because int might match the return type of a GCC
63288    builtin and then its argument prototype would still apply.  */
63289 #ifdef __cplusplus
63290 extern "C"
63291 #endif
63292 char compress ();
63293 int
63294 main ()
63295 {
63296 return compress ();
63297   ;
63298   return 0;
63299 }
63300 _ACEOF
63301 if ac_fn_cxx_try_link "$LINENO"; then :
63302   ac_cv_lib_z_compress=yes
63303 else
63304   ac_cv_lib_z_compress=no
63305 fi
63306 rm -f core conftest.err conftest.$ac_objext \
63307     conftest$ac_exeext conftest.$ac_ext
63308 LIBS=$ac_check_lib_save_LIBS
63309 fi
63310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63311 $as_echo "$ac_cv_lib_z_compress" >&6; }
63312 if test "x$ac_cv_lib_z_compress" = xyes; then :
63313    ZLIB_FOUND=yes
63314 else
63315    ZLIB_FOUND=no
63316 fi
63317 
63318 
63319   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63320 $as_echo_n "checking for which zlib to use... " >&6; }
63321 
63322   DEFAULT_ZLIB=system
63323   if test "x$OPENJDK_TARGET_OS" = xwindows; then
63324     # On windows default is bundled...on others default is system
63325     DEFAULT_ZLIB=bundled
63326   fi
63327 
63328   if test "x${ZLIB_FOUND}" != "xyes"; then
63329     # If we don't find any system...set default to bundled
63330     DEFAULT_ZLIB=bundled
63331   fi
63332 
63333   # If user didn't specify, use DEFAULT_ZLIB
63334   if test "x${with_zlib}" = "x"; then
63335     with_zlib=${DEFAULT_ZLIB}
63336   fi
63337 
63338   if test "x${with_zlib}" = "xbundled"; then
63339     USE_EXTERNAL_LIBZ=false
63340     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63341 $as_echo "bundled" >&6; }
63342   elif test "x${with_zlib}" = "xsystem"; then
63343     if test "x${ZLIB_FOUND}" = "xyes"; then
63344       USE_EXTERNAL_LIBZ=true
63345       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63346 $as_echo "system" >&6; }
63347     else
63348       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63349 $as_echo "system not found" >&6; }
63350       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63351     fi
63352   else
63353     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63354   fi
63355 
63356 
63357 
63358 
63359 
63360 # Check whether --with-lcms was given.
63361 if test "${with_lcms+set}" = set; then :
63362   withval=$with_lcms;
63363 fi
63364 
63365 
63366   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63367 $as_echo_n "checking for which lcms to use... " >&6; }
63368 
63369   DEFAULT_LCMS=bundled
63370   # If user didn't specify, use DEFAULT_LCMS
63371   if test "x${with_lcms}" = "x"; then
63372       with_lcms=${DEFAULT_LCMS}
63373   fi
63374 
63375   if test "x${with_lcms}" = "xbundled"; then
63376     USE_EXTERNAL_LCMS=false
63377     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63378 $as_echo "bundled" >&6; }
63379   elif test "x${with_lcms}" = "xsystem"; then
63380     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63381 $as_echo "system" >&6; }
63382 
63383 pkg_failed=no
63384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63385 $as_echo_n "checking for LCMS... " >&6; }
63386 
63387 if test -n "$LCMS_CFLAGS"; then
63388     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63389  elif test -n "$PKG_CONFIG"; then
63390     if test -n "$PKG_CONFIG" && \
63391     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63392   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63393   ac_status=$?
63394   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63395   test $ac_status = 0; }; then
63396   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63397 else
63398   pkg_failed=yes
63399 fi
63400  else
63401     pkg_failed=untried
63402 fi
63403 if test -n "$LCMS_LIBS"; then
63404     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63405  elif test -n "$PKG_CONFIG"; then
63406     if test -n "$PKG_CONFIG" && \
63407     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63408   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63409   ac_status=$?
63410   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63411   test $ac_status = 0; }; then
63412   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63413 else
63414   pkg_failed=yes
63415 fi
63416  else
63417     pkg_failed=untried
63418 fi
63419 
63420 
63421 
63422 if test $pkg_failed = yes; then
63423 
63424 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63425         _pkg_short_errors_supported=yes
63426 else
63427         _pkg_short_errors_supported=no
63428 fi
63429         if test $_pkg_short_errors_supported = yes; then
63430                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63431         else
63432                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63433         fi
63434         # Put the nasty error message in config.log where it belongs
63435         echo "$LCMS_PKG_ERRORS" >&5
63436 
63437         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63438 $as_echo "no" >&6; }
63439                 LCMS_FOUND=no
63440 elif test $pkg_failed = untried; then
63441         LCMS_FOUND=no
63442 else
63443         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63444         LCMS_LIBS=$pkg_cv_LCMS_LIBS
63445         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63446 $as_echo "yes" >&6; }
63447         LCMS_FOUND=yes
63448 fi
63449     if test "x${LCMS_FOUND}" = "xyes"; then
63450       USE_EXTERNAL_LCMS=true
63451     else
63452       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63453     fi
63454   else
63455     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63456   fi
63457 
63458 
63459 
63460 
63461 
63462 
63463 
63464 
63465 
63466 
63467 
63468   # Setup libm (the maths library)
63469   if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63470     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63471 $as_echo_n "checking for cos in -lm... " >&6; }
63472 if ${ac_cv_lib_m_cos+:} false; then :
63473   $as_echo_n "(cached) " >&6
63474 else
63475   ac_check_lib_save_LIBS=$LIBS
63476 LIBS="-lm  $LIBS"
63477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63478 /* end confdefs.h.  */
63479 
63480 /* Override any GCC internal prototype to avoid an error.
63481    Use char because int might match the return type of a GCC
63482    builtin and then its argument prototype would still apply.  */
63483 #ifdef __cplusplus
63484 extern "C"
63485 #endif
63486 char cos ();
63487 int
63488 main ()
63489 {
63490 return cos ();
63491   ;
63492   return 0;
63493 }
63494 _ACEOF
63495 if ac_fn_cxx_try_link "$LINENO"; then :
63496   ac_cv_lib_m_cos=yes
63497 else
63498   ac_cv_lib_m_cos=no
63499 fi
63500 rm -f core conftest.err conftest.$ac_objext \
63501     conftest$ac_exeext conftest.$ac_ext
63502 LIBS=$ac_check_lib_save_LIBS
63503 fi
63504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63505 $as_echo "$ac_cv_lib_m_cos" >&6; }
63506 if test "x$ac_cv_lib_m_cos" = xyes; then :
63507   cat >>confdefs.h <<_ACEOF
63508 #define HAVE_LIBM 1
63509 _ACEOF
63510 
63511   LIBS="-lm $LIBS"
63512 
63513 else
63514 
63515         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63516 $as_echo "$as_me: Maths library was not found" >&6;}
63517 
63518 fi
63519 
63520     LIBM="-lm"
63521   else
63522     LIBM=""
63523   fi
63524 
63525 
63526   # Setup libdl (for dynamic library loading)
63527   save_LIBS="$LIBS"
63528   LIBS=""
63529   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63530 $as_echo_n "checking for dlopen in -ldl... " >&6; }
63531 if ${ac_cv_lib_dl_dlopen+:} false; then :
63532   $as_echo_n "(cached) " >&6
63533 else
63534   ac_check_lib_save_LIBS=$LIBS
63535 LIBS="-ldl  $LIBS"
63536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63537 /* end confdefs.h.  */
63538 
63539 /* Override any GCC internal prototype to avoid an error.
63540    Use char because int might match the return type of a GCC
63541    builtin and then its argument prototype would still apply.  */
63542 #ifdef __cplusplus
63543 extern "C"
63544 #endif
63545 char dlopen ();
63546 int
63547 main ()
63548 {
63549 return dlopen ();
63550   ;
63551   return 0;
63552 }
63553 _ACEOF
63554 if ac_fn_cxx_try_link "$LINENO"; then :
63555   ac_cv_lib_dl_dlopen=yes
63556 else
63557   ac_cv_lib_dl_dlopen=no
63558 fi
63559 rm -f core conftest.err conftest.$ac_objext \
63560     conftest$ac_exeext conftest.$ac_ext
63561 LIBS=$ac_check_lib_save_LIBS
63562 fi
63563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63564 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63565 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63566   cat >>confdefs.h <<_ACEOF
63567 #define HAVE_LIBDL 1
63568 _ACEOF
63569 
63570   LIBS="-ldl $LIBS"
63571 
63572 fi
63573 
63574   LIBDL="$LIBS"
63575 
63576   LIBS="$save_LIBS"
63577 
63578   # Deprecated libraries, keep the flags for backwards compatibility
63579   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63580 
63581 
63582 # Check whether --with-dxsdk was given.
63583 if test "${with_dxsdk+set}" = set; then :
63584   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63585 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63586 fi
63587 
63588 
63589 
63590 
63591 # Check whether --with-dxsdk-lib was given.
63592 if test "${with_dxsdk_lib+set}" = set; then :
63593   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63594 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63595 fi
63596 
63597 
63598 
63599 
63600 # Check whether --with-dxsdk-include was given.
63601 if test "${with_dxsdk_include+set}" = set; then :
63602   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63603 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63604 fi
63605 
63606 
63607   fi
63608 
63609   # Control if libzip can use mmap. Available for purposes of overriding.
63610   LIBZIP_CAN_USE_MMAP=true
63611 
63612 
63613 
63614   if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63615     # Find the root of the Solaris Studio installation from the compiler path
63616     SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63617     STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63618     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63619 $as_echo_n "checking for libstlport.so.1... " >&6; }
63620     if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63621       # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63622       STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63623     fi
63624     if test -f "$STLPORT_LIB"; then
63625       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63626 $as_echo "yes, $STLPORT_LIB" >&6; }
63627 
63628   # Only process if variable expands to non-empty
63629 
63630   if test "x$STLPORT_LIB" != x; then
63631     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63632 
63633   # Input might be given as Windows format, start by converting to
63634   # unix format.
63635   path="$STLPORT_LIB"
63636   new_path=`$CYGPATH -u "$path"`
63637 
63638   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63639   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63640   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63641   # "foo.exe" is OK but "foo" is an error.
63642   #
63643   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63644   # It is also a way to make sure we got the proper file name for the real test later on.
63645   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63646   if test "x$test_shortpath" = x; then
63647     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63648 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63649     as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63650   fi
63651 
63652   # Call helper function which possibly converts this using DOS-style short mode.
63653   # If so, the updated path is stored in $new_path.
63654 
63655   input_path="$new_path"
63656   # Check if we need to convert this using DOS-style short mode. If the path
63657   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63658   # take no chances and rewrite it.
63659   # Note: m4 eats our [], so we need to use [ and ] instead.
63660   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63661   if test "x$has_forbidden_chars" != x; then
63662     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63663     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63664     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63665     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63666       # Going to short mode and back again did indeed matter. Since short mode is
63667       # case insensitive, let's make it lowercase to improve readability.
63668       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63669       # Now convert it back to Unix-style (cygpath)
63670       input_path=`$CYGPATH -u "$shortmode_path"`
63671       new_path="$input_path"
63672     fi
63673   fi
63674 
63675   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63676   if test "x$test_cygdrive_prefix" = x; then
63677     # As a simple fix, exclude /usr/bin since it's not a real path.
63678     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63679       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63680       # a path prefixed by /cygdrive for fixpath to work.
63681       new_path="$CYGWIN_ROOT_PATH$input_path"
63682     fi
63683   fi
63684 
63685 
63686   if test "x$path" != "x$new_path"; then
63687     STLPORT_LIB="$new_path"
63688     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63689 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63690   fi
63691 
63692     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63693 
63694   path="$STLPORT_LIB"
63695   has_colon=`$ECHO $path | $GREP ^.:`
63696   new_path="$path"
63697   if test "x$has_colon" = x; then
63698     # Not in mixed or Windows style, start by that.
63699     new_path=`cmd //c echo $path`
63700   fi
63701 
63702 
63703   input_path="$new_path"
63704   # Check if we need to convert this using DOS-style short mode. If the path
63705   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63706   # take no chances and rewrite it.
63707   # Note: m4 eats our [], so we need to use [ and ] instead.
63708   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63709   if test "x$has_forbidden_chars" != x; then
63710     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63711     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63712   fi
63713 
63714 
63715   windows_path="$new_path"
63716   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63717     unix_path=`$CYGPATH -u "$windows_path"`
63718     new_path="$unix_path"
63719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63720     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63721     new_path="$unix_path"
63722   fi
63723 
63724   if test "x$path" != "x$new_path"; then
63725     STLPORT_LIB="$new_path"
63726     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63727 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63728   fi
63729 
63730   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63731   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63732 
63733     else
63734       # We're on a unix platform. Hooray! :)
63735       path="$STLPORT_LIB"
63736       has_space=`$ECHO "$path" | $GREP " "`
63737       if test "x$has_space" != x; then
63738         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63739 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63740         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63741       fi
63742 
63743       # Use eval to expand a potential ~
63744       eval path="$path"
63745       if test ! -f "$path" && test ! -d "$path"; then
63746         as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63747       fi
63748 
63749       if test -d "$path"; then
63750         STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63751       else
63752         dir="`$DIRNAME "$path"`"
63753         base="`$BASENAME "$path"`"
63754         STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63755       fi
63756     fi
63757   fi
63758 
63759     else
63760       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63761 $as_echo "no, not found at $STLPORT_LIB" >&6; }
63762       as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63763     fi
63764 
63765   fi
63766 
63767 
63768 
63769 # Check whether --with-libelf was given.
63770 if test "${with_libelf+set}" = set; then :
63771   withval=$with_libelf;
63772 fi
63773 
63774 
63775 # Check whether --with-libelf-include was given.
63776 if test "${with_libelf_include+set}" = set; then :
63777   withval=$with_libelf_include;
63778 fi
63779 
63780 
63781 # Check whether --with-libelf-lib was given.
63782 if test "${with_libelf_lib+set}" = set; then :
63783   withval=$with_libelf_lib;
63784 fi
63785 
63786 
63787   if test "x$ENABLE_AOT" = xfalse; then
63788     if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
63789         (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
63790         (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
63791       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
63792 $as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
63793     fi
63794     LIBELF_CFLAGS=
63795     LIBELF_LIBS=
63796   else
63797     LIBELF_FOUND=no
63798 
63799     if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
63800       ENABLE_AOT="false"
63801       if test "x${enable_aot}" = xyes; then
63802         as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
63803       fi
63804     else
63805       if test "x${with_libelf}" != x; then
63806         ELF_LIBS="-L${with_libelf}/lib -lelf"
63807         ELF_CFLAGS="-I${with_libelf}/include"
63808         LIBELF_FOUND=yes
63809       fi
63810       if test "x${with_libelf_include}" != x; then
63811         ELF_CFLAGS="-I${with_libelf_include}"
63812         LIBELF_FOUND=yes
63813       fi
63814       if test "x${with_libelf_lib}" != x; then
63815         ELF_LIBS="-L${with_libelf_lib} -lelf"
63816         LIBELF_FOUND=yes
63817       fi
63818       # Do not try pkg-config if we have a sysroot set.
63819       if test "x$SYSROOT" = x; then
63820         if test "x$LIBELF_FOUND" = xno; then
63821           # Figure out ELF_CFLAGS and ELF_LIBS
63822 
63823 pkg_failed=no
63824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
63825 $as_echo_n "checking for ELF... " >&6; }
63826 
63827 if test -n "$ELF_CFLAGS"; then
63828     pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
63829  elif test -n "$PKG_CONFIG"; then
63830     if test -n "$PKG_CONFIG" && \
63831     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
63832   ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
63833   ac_status=$?
63834   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63835   test $ac_status = 0; }; then
63836   pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
63837 else
63838   pkg_failed=yes
63839 fi
63840  else
63841     pkg_failed=untried
63842 fi
63843 if test -n "$ELF_LIBS"; then
63844     pkg_cv_ELF_LIBS="$ELF_LIBS"
63845  elif test -n "$PKG_CONFIG"; then
63846     if test -n "$PKG_CONFIG" && \
63847     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
63848   ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
63849   ac_status=$?
63850   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63851   test $ac_status = 0; }; then
63852   pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
63853 else
63854   pkg_failed=yes
63855 fi
63856  else
63857     pkg_failed=untried
63858 fi
63859 
63860 
63861 
63862 if test $pkg_failed = yes; then
63863 
63864 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63865         _pkg_short_errors_supported=yes
63866 else
63867         _pkg_short_errors_supported=no
63868 fi
63869         if test $_pkg_short_errors_supported = yes; then
63870                 ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
63871         else
63872                 ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
63873         fi
63874         # Put the nasty error message in config.log where it belongs
63875         echo "$ELF_PKG_ERRORS" >&5
63876 
63877         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63878 $as_echo "no" >&6; }
63879                 LIBELF_FOUND=no
63880 elif test $pkg_failed = untried; then
63881         LIBELF_FOUND=no
63882 else
63883         ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
63884         ELF_LIBS=$pkg_cv_ELF_LIBS
63885         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63886 $as_echo "yes" >&6; }
63887         LIBELF_FOUND=yes
63888 fi
63889         fi
63890       fi
63891       if test "x$LIBELF_FOUND" = xno; then
63892         for ac_header in libelf.h
63893 do :
63894   ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
63895 if test "x$ac_cv_header_libelf_h" = xyes; then :
63896   cat >>confdefs.h <<_ACEOF
63897 #define HAVE_LIBELF_H 1
63898 _ACEOF
63899 
63900               LIBELF_FOUND=yes
63901               ELF_CFLAGS=
63902               ELF_LIBS=-lelf
63903 
63904 else
63905   LIBELF_FOUND=no
63906 
63907 fi
63908 
63909 done
63910 
63911       fi
63912       if test "x$LIBELF_FOUND" = xno; then
63913         ENABLE_AOT="false"
63914 
63915   # Print a helpful message on how to acquire the necessary build dependency.
63916   # elf is the help tag: freetype, cups, alsa etc
63917   MISSING_DEPENDENCY=elf
63918 
63919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63920     cygwin_help $MISSING_DEPENDENCY
63921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63922     msys_help $MISSING_DEPENDENCY
63923   else
63924     PKGHANDLER_COMMAND=
63925 
63926     case $PKGHANDLER in
63927       apt-get)
63928         apt_help     $MISSING_DEPENDENCY ;;
63929       yum)
63930         yum_help     $MISSING_DEPENDENCY ;;
63931       port)
63932         port_help    $MISSING_DEPENDENCY ;;
63933       pkgutil)
63934         pkgutil_help $MISSING_DEPENDENCY ;;
63935       pkgadd)
63936         pkgadd_help  $MISSING_DEPENDENCY ;;
63937     esac
63938 
63939     if test "x$PKGHANDLER_COMMAND" != x; then
63940       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63941     fi
63942   fi
63943 
63944         if test "x${enable_aot}" = xyes; then
63945           as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
63946         else
63947           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
63948 $as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
63949         fi
63950       else
63951         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
63952 $as_echo_n "checking if libelf works... " >&6; }
63953         ac_ext=c
63954 ac_cpp='$CPP $CPPFLAGS'
63955 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63956 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63957 ac_compiler_gnu=$ac_cv_c_compiler_gnu
63958 
63959         OLD_CFLAGS="$CFLAGS"
63960         CFLAGS="$CFLAGS $ELF_CFLAGS"
63961         OLD_LIBS="$LIBS"
63962         LIBS="$LIBS $ELF_LIBS"
63963         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63964 /* end confdefs.h.  */
63965 #include <libelf.h>
63966 int
63967 main ()
63968 {
63969 
63970               elf_version(0);
63971               return 0;
63972 
63973   ;
63974   return 0;
63975 }
63976 _ACEOF
63977 if ac_fn_c_try_link "$LINENO"; then :
63978   LIBELF_WORKS=yes
63979 else
63980   LIBELF_WORKS=no
63981 
63982 fi
63983 rm -f core conftest.err conftest.$ac_objext \
63984     conftest$ac_exeext conftest.$ac_ext
63985         CFLAGS="$OLD_CFLAGS"
63986         LIBS="$OLD_LIBS"
63987         ac_ext=cpp
63988 ac_cpp='$CXXCPP $CPPFLAGS'
63989 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63990 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63991 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63992 
63993         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
63994 $as_echo "$LIBELF_WORKS" >&6; }
63995 
63996         if test "x$LIBELF_WORKS" = xno; then
63997           ENABLE_AOT="false"
63998 
63999   # Print a helpful message on how to acquire the necessary build dependency.
64000   # elf is the help tag: freetype, cups, alsa etc
64001   MISSING_DEPENDENCY=elf
64002 
64003   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64004     cygwin_help $MISSING_DEPENDENCY
64005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64006     msys_help $MISSING_DEPENDENCY
64007   else
64008     PKGHANDLER_COMMAND=
64009 
64010     case $PKGHANDLER in
64011       apt-get)
64012         apt_help     $MISSING_DEPENDENCY ;;
64013       yum)
64014         yum_help     $MISSING_DEPENDENCY ;;
64015       port)
64016         port_help    $MISSING_DEPENDENCY ;;
64017       pkgutil)
64018         pkgutil_help $MISSING_DEPENDENCY ;;
64019       pkgadd)
64020         pkgadd_help  $MISSING_DEPENDENCY ;;
64021     esac
64022 
64023     if test "x$PKGHANDLER_COMMAND" != x; then
64024       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64025     fi
64026   fi
64027 
64028           if test "x$enable_aot" = "xyes"; then
64029             as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64030           else
64031             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
64032 $as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
64033           fi
64034         fi
64035       fi
64036     fi
64037   fi
64038 
64039 
64040 
64041 
64042 
64043 
64044 
64045 
64046 
64047 
64048 
64049 
64050 
64051 
64052 
64053 
64054 
64055 
64056 # Hotspot setup depends on lib checks (AOT needs libelf).
64057 
64058 
64059   # The user can in some cases supply additional jvm features. For the custom
64060   # variant, this defines the entire variant.
64061 
64062 # Check whether --with-jvm-features was given.
64063 if test "${with_jvm_features+set}" = set; then :
64064   withval=$with_jvm_features;
64065 fi
64066 
64067   if test "x$with_jvm_features" != x; then
64068     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64069 $as_echo_n "checking additional JVM features... " >&6; }
64070     JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64071     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64072 $as_echo "$JVM_FEATURES" >&6; }
64073   fi
64074 
64075   # Verify that dependencies are met for explicitly set features.
64076   if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64077     as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64078   fi
64079 
64080   if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64081     as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64082   fi
64083 
64084   if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64085     as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64086   fi
64087 
64088   if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64089     as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64090   fi
64091 
64092   if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64093     as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64094   fi
64095 
64096   # Turn on additional features based on other parts of configure
64097   if test "x$INCLUDE_DTRACE" = "xtrue"; then
64098     JVM_FEATURES="$JVM_FEATURES dtrace"
64099   else
64100     if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64101       as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64102     fi
64103   fi
64104 
64105   if test "x$STATIC_BUILD" = "xtrue"; then
64106     JVM_FEATURES="$JVM_FEATURES static-build"
64107   else
64108     if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64109       as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64110     fi
64111   fi
64112 
64113   if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64114     if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64115       as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64116     fi
64117   fi
64118 
64119   if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64120     if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
64121       as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
64122     fi
64123   fi
64124 
64125   # Only enable jvmci on x86_64, sparcv9 and aarch64.
64126   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
64127      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
64128      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
64129     JVM_FEATURES_jvmci="jvmci"
64130   else
64131     JVM_FEATURES_jvmci=""
64132   fi
64133 
64134   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.vm.compiler should be built" >&5
64135 $as_echo_n "checking if jdk.vm.compiler should be built... " >&6; }
64136   if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
64137     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64138 $as_echo "yes, forced" >&6; }
64139     if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
64140       as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
64141     fi
64142     INCLUDE_GRAAL="true"
64143   else
64144     # By default enable graal build where AOT is available
64145     if test "x$ENABLE_AOT" = "xtrue"; then
64146       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64147 $as_echo "yes" >&6; }
64148       JVM_FEATURES_graal="graal"
64149       INCLUDE_GRAAL="true"
64150     else
64151       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64152 $as_echo "no" >&6; }
64153       JVM_FEATURES_graal=""
64154       INCLUDE_GRAAL="false"
64155     fi
64156   fi
64157 
64158 
64159 
64160   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
64161 $as_echo_n "checking if aot should be enabled... " >&6; }
64162   if test "x$ENABLE_AOT" = "xtrue"; then
64163     if test "x$enable_aot" = "xyes"; then
64164       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64165 $as_echo "yes, forced" >&6; }
64166     else
64167       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64168 $as_echo "yes" >&6; }
64169     fi
64170     JVM_FEATURES_aot="aot"
64171   else
64172     if test "x$enable_aot" = "xno"; then
64173       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64174 $as_echo "no, forced" >&6; }
64175     else
64176       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64177 $as_echo "no" >&6; }
64178     fi
64179     JVM_FEATURES_aot=""
64180   fi
64181 
64182   # All variants but minimal (and custom) get these features
64183   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
64184 
64185   # Enable features depending on variant.
64186   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
64187   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
64188   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
64189   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
64190   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
64191   JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
64192   JVM_FEATURES_custom="$JVM_FEATURES"
64193 
64194 
64195 
64196 
64197 
64198 
64199 
64200 
64201 
64202   # Used for verification of Makefiles by check-jvm-feature
64203 
64204 
64205   # We don't support --with-jvm-interpreter anymore, use zero instead.
64206 
64207 
64208 # Check whether --with-jvm-interpreter was given.
64209 if test "${with_jvm_interpreter+set}" = set; then :
64210   withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
64211 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
64212 fi
64213 
64214 
64215 
64216 
64217 ###############################################################################
64218 #
64219 # We need to do some final tweaking, when everything else is done.
64220 #
64221 ###############################################################################
64222 
64223 
64224   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64225 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64226 
64227   if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64228     ENABLE_INTREE_EC=yes
64229     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64230 $as_echo "yes" >&6; }
64231   else
64232     ENABLE_INTREE_EC=no
64233     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64234 $as_echo "no" >&6; }
64235   fi
64236 
64237 
64238 
64239 
64240   # Check whether --enable-jtreg-failure-handler was given.
64241 if test "${enable_jtreg_failure_handler+set}" = set; then :
64242   enableval=$enable_jtreg_failure_handler;
64243 fi
64244 
64245 
64246   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64247 $as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64248 
64249   if test "x$enable_jtreg_failure_handler" = "xyes"; then
64250     if test "x$JT_HOME" = "x"; then
64251       as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64252     else
64253       BUILD_FAILURE_HANDLER=true
64254       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64255 $as_echo "yes, forced" >&6; }
64256     fi
64257   elif test "x$enable_jtreg_failure_handler" = "xno"; then
64258     BUILD_FAILURE_HANDLER=false
64259     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64260 $as_echo "no, forced" >&6; }
64261   elif test "x$enable_jtreg_failure_handler" = "xauto" \
64262       || test "x$enable_jtreg_failure_handler" = "x"; then
64263     if test "x$JT_HOME" = "x"; then
64264       BUILD_FAILURE_HANDLER=false
64265       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64266 $as_echo "no, missing jtreg" >&6; }
64267     else
64268       BUILD_FAILURE_HANDLER=true
64269       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64270 $as_echo "yes, jtreg present" >&6; }
64271     fi
64272   else
64273     as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64274   fi
64275 
64276 
64277 
64278 
64279   # Check whether --enable-generate-classlist was given.
64280 if test "${enable_generate_classlist+set}" = set; then :
64281   enableval=$enable_generate_classlist;
64282 fi
64283 
64284 
64285   # Check if it's likely that it's possible to generate the classlist. Depending
64286   # on exact jvm configuration it could be possible anyway.
64287   if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64288     ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64289   else
64290     ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64291   fi
64292 
64293   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64294 $as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64295   if test "x$enable_generate_classlist" = "xyes"; then
64296     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64297 $as_echo "yes, forced" >&6; }
64298     ENABLE_GENERATE_CLASSLIST="true"
64299     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64300       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64301 $as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64302     fi
64303   elif test "x$enable_generate_classlist" = "xno"; then
64304     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64305 $as_echo "no, forced" >&6; }
64306     ENABLE_GENERATE_CLASSLIST="false"
64307   elif test "x$enable_generate_classlist" = "x"; then
64308     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64309       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64310 $as_echo "yes" >&6; }
64311       ENABLE_GENERATE_CLASSLIST="true"
64312     else
64313       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64314 $as_echo "no" >&6; }
64315       ENABLE_GENERATE_CLASSLIST="false"
64316     fi
64317   else
64318     as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64319   fi
64320 
64321 
64322 
64323 
64324 ###############################################################################
64325 #
64326 # Configure parts of the build that only affect the build performance,
64327 # not the result.
64328 #
64329 ###############################################################################
64330 
64331 
64332   # How many cores do we have on this build system?
64333 
64334 # Check whether --with-num-cores was given.
64335 if test "${with_num_cores+set}" = set; then :
64336   withval=$with_num_cores;
64337 fi
64338 
64339   if test "x$with_num_cores" = x; then
64340     # The number of cores were not specified, try to probe them.
64341 
64342   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64343 $as_echo_n "checking for number of cores... " >&6; }
64344   NUM_CORES=1
64345   FOUND_CORES=no
64346 
64347   if test -f /proc/cpuinfo; then
64348     # Looks like a Linux (or cygwin) system
64349     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64350     FOUND_CORES=yes
64351   elif test -x /usr/sbin/psrinfo; then
64352     # Looks like a Solaris system
64353     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64354     FOUND_CORES=yes
64355   elif test -x /usr/sbin/sysctl; then
64356     # Looks like a MacOSX system
64357     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64358     FOUND_CORES=yes
64359   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64360     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64361     FOUND_CORES=yes
64362   elif test -n "$NUMBER_OF_PROCESSORS"; then
64363     # On windows, look in the env
64364     NUM_CORES=$NUMBER_OF_PROCESSORS
64365     FOUND_CORES=yes
64366   fi
64367 
64368   if test "x$FOUND_CORES" = xyes; then
64369     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64370 $as_echo "$NUM_CORES" >&6; }
64371   else
64372     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64373 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
64374     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64375 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64376   fi
64377 
64378   else
64379     NUM_CORES=$with_num_cores
64380   fi
64381 
64382 
64383 
64384   # How much memory do we have on this build system?
64385 
64386 # Check whether --with-memory-size was given.
64387 if test "${with_memory_size+set}" = set; then :
64388   withval=$with_memory_size;
64389 fi
64390 
64391   if test "x$with_memory_size" = x; then
64392     # The memory size was not specified, try to probe it.
64393 
64394   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64395 $as_echo_n "checking for memory size... " >&6; }
64396   # Default to 1024 MB
64397   MEMORY_SIZE=1024
64398   FOUND_MEM=no
64399 
64400   if test -f /proc/meminfo; then
64401     # Looks like a Linux (or cygwin) system
64402     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64403     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64404     FOUND_MEM=yes
64405   elif test -x /usr/sbin/prtconf; then
64406     # Looks like a Solaris or AIX system
64407     MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64408     FOUND_MEM=yes
64409   elif test -x /usr/sbin/sysctl; then
64410     # Looks like a MacOSX system
64411     MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64412     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64413     FOUND_MEM=yes
64414   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64415     # Windows, but without cygwin
64416     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64417     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64418     FOUND_MEM=yes
64419   fi
64420 
64421   if test "x$FOUND_MEM" = xyes; then
64422     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64423 $as_echo "$MEMORY_SIZE MB" >&6; }
64424   else
64425     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64426 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64427     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64428 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64429   fi
64430 
64431   else
64432     MEMORY_SIZE=$with_memory_size
64433   fi
64434 
64435 
64436 
64437   # Provide a decent default number of parallel jobs for make depending on
64438   # number of cores, amount of memory and machine architecture.
64439 
64440 # Check whether --with-jobs was given.
64441 if test "${with_jobs+set}" = set; then :
64442   withval=$with_jobs;
64443 fi
64444 
64445   if test "x$with_jobs" = x; then
64446     # Number of jobs was not specified, calculate.
64447     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64448 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64449     # Approximate memory in GB.
64450     memory_gb=`expr $MEMORY_SIZE / 1024`
64451     # Pick the lowest of memory in gb and number of cores.
64452     if test "$memory_gb" -lt "$NUM_CORES"; then
64453       JOBS="$memory_gb"
64454     else
64455       JOBS="$NUM_CORES"
64456     fi
64457     if test "$JOBS" -eq "0"; then
64458       JOBS=1
64459     fi
64460     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64461 $as_echo "$JOBS" >&6; }
64462   else
64463     JOBS=$with_jobs
64464   fi
64465 
64466 
64467 
64468   # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64469 
64470 # Check whether --with-test-jobs was given.
64471 if test "${with_test_jobs+set}" = set; then :
64472   withval=$with_test_jobs;
64473 fi
64474 
64475   if test "x$with_test_jobs" = x; then
64476       TEST_JOBS=0
64477   else
64478       TEST_JOBS=$with_test_jobs
64479   fi
64480 
64481 
64482 
64483 # Setup arguments for the boot jdk (after cores and memory have been setup)
64484 
64485   ##############################################################################
64486   #
64487   # Specify jvm options for anything that is run with the Boot JDK.
64488   # Not all JVM:s accept the same arguments on the command line.
64489   #
64490 
64491 # Check whether --with-boot-jdk-jvmargs was given.
64492 if test "${with_boot_jdk_jvmargs+set}" = set; then :
64493   withval=$with_boot_jdk_jvmargs;
64494 fi
64495 
64496 
64497   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64498 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
64499 
64500   # Disable special log output when a debug build is used as Boot JDK...
64501 
64502   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64503   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64504   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64505   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64506   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64507   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64508     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64509     JVM_ARG_OK=true
64510   else
64511     $ECHO "Arg failed:" >&5
64512     $ECHO "$OUTPUT" >&5
64513     JVM_ARG_OK=false
64514   fi
64515 
64516 
64517   # Force en-US environment
64518 
64519   $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64520   $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64521   OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64522   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64523   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64524   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64525     boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64526     JVM_ARG_OK=true
64527   else
64528     $ECHO "Arg failed:" >&5
64529     $ECHO "$OUTPUT" >&5
64530     JVM_ARG_OK=false
64531   fi
64532 
64533 
64534   # Apply user provided options.
64535 
64536   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64537   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64538   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64539   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64540   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64541   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64542     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64543     JVM_ARG_OK=true
64544   else
64545     $ECHO "Arg failed:" >&5
64546     $ECHO "$OUTPUT" >&5
64547     JVM_ARG_OK=false
64548   fi
64549 
64550 
64551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64552 $as_echo "$boot_jdk_jvmargs" >&6; }
64553 
64554   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64555   JAVA_FLAGS=$boot_jdk_jvmargs
64556 
64557 
64558 
64559   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64560 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64561 
64562   # Starting amount of heap memory.
64563 
64564   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64565   $ECHO "Command: $JAVA -Xms64M -version" >&5
64566   OUTPUT=`$JAVA -Xms64M -version 2>&1`
64567   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64568   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64569   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64570     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64571     JVM_ARG_OK=true
64572   else
64573     $ECHO "Arg failed:" >&5
64574     $ECHO "$OUTPUT" >&5
64575     JVM_ARG_OK=false
64576   fi
64577 
64578   BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64579 
64580   # Maximum amount of heap memory and stack size.
64581   JVM_HEAP_LIMIT_32="1024"
64582   # Running a 64 bit JVM allows for and requires a bigger heap
64583   JVM_HEAP_LIMIT_64="1600"
64584   STACK_SIZE_32=768
64585   STACK_SIZE_64=1536
64586   JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64587   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64588     JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64589   fi
64590   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64591     JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64592   fi
64593   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64594     JVM_HEAP_LIMIT_32=512
64595     JVM_HEAP_LIMIT_64=512
64596   fi
64597 
64598   if test "x$BOOT_JDK_BITS" = "x32"; then
64599     STACK_SIZE=$STACK_SIZE_32
64600     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64601   else
64602     STACK_SIZE=$STACK_SIZE_64
64603     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64604   fi
64605 
64606   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64607   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64608   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64609   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64610   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64611   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64612     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64613     JVM_ARG_OK=true
64614   else
64615     $ECHO "Arg failed:" >&5
64616     $ECHO "$OUTPUT" >&5
64617     JVM_ARG_OK=false
64618   fi
64619 
64620 
64621   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64622   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64623   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64624   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64625   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64626   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64627     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64628     JVM_ARG_OK=true
64629   else
64630     $ECHO "Arg failed:" >&5
64631     $ECHO "$OUTPUT" >&5
64632     JVM_ARG_OK=false
64633   fi
64634 
64635 
64636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64637 $as_echo "$boot_jdk_jvmargs_big" >&6; }
64638 
64639   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64640 
64641 
64642   if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64643     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64644     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64645   else
64646     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64647     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64648   fi
64649   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64650   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64651   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64652 $as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64654 $as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64655 
64656 
64657   # By default, the main javac compilations use big
64658   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64659 
64660 
64661   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64662 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64663 
64664   # Use serial gc for small short lived tools if possible
64665 
64666   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64667   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64668   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64669   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64670   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64671   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64672     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64673     JVM_ARG_OK=true
64674   else
64675     $ECHO "Arg failed:" >&5
64676     $ECHO "$OUTPUT" >&5
64677     JVM_ARG_OK=false
64678   fi
64679 
64680 
64681   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64682   $ECHO "Command: $JAVA -Xms32M -version" >&5
64683   OUTPUT=`$JAVA -Xms32M -version 2>&1`
64684   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64685   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64686   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64687     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64688     JVM_ARG_OK=true
64689   else
64690     $ECHO "Arg failed:" >&5
64691     $ECHO "$OUTPUT" >&5
64692     JVM_ARG_OK=false
64693   fi
64694 
64695 
64696   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64697   $ECHO "Command: $JAVA -Xmx512M -version" >&5
64698   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64699   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64700   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64701   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64702     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64703     JVM_ARG_OK=true
64704   else
64705     $ECHO "Arg failed:" >&5
64706     $ECHO "$OUTPUT" >&5
64707     JVM_ARG_OK=false
64708   fi
64709 
64710 
64711   $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64712   $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64713   OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64714   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64715   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64716   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64717     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64718     JVM_ARG_OK=true
64719   else
64720     $ECHO "Arg failed:" >&5
64721     $ECHO "$OUTPUT" >&5
64722     JVM_ARG_OK=false
64723   fi
64724 
64725 
64726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64727 $as_echo "$boot_jdk_jvmargs_small" >&6; }
64728 
64729   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64730 
64731 
64732   JAVA_TOOL_FLAGS_SMALL=""
64733   for f in $JAVA_FLAGS_SMALL; do
64734     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64735   done
64736 
64737 
64738 
64739 # Setup smart javac (after cores and memory have been setup)
64740 
64741 
64742 # Check whether --with-sjavac-server-java was given.
64743 if test "${with_sjavac_server_java+set}" = set; then :
64744   withval=$with_sjavac_server_java;
64745 fi
64746 
64747 
64748   if test "x$with_sjavac_server_java" != x; then
64749     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64750     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64751     if test "x$FOUND_VERSION" = x; then
64752       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64753     fi
64754   else
64755     SJAVAC_SERVER_JAVA="$JAVA"
64756   fi
64757 
64758 
64759   if test "$MEMORY_SIZE" -gt "3000"; then
64760 
64761   $ECHO "Check if jvm arg is ok: -d64" >&5
64762   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64763   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64764   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64765   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64766   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64767     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64768     JVM_ARG_OK=true
64769   else
64770     $ECHO "Arg failed:" >&5
64771     $ECHO "$OUTPUT" >&5
64772     JVM_ARG_OK=false
64773   fi
64774 
64775     if test "$JVM_ARG_OK" = true; then
64776       JVM_64BIT=true
64777       JVM_ARG_OK=false
64778     fi
64779   fi
64780 
64781   MX_VALUE=`expr $MEMORY_SIZE / 2`
64782   if test "$JVM_64BIT" = true; then
64783     # Set ms lower than mx since more than one instance of the server might
64784     # get launched at the same time before they figure out which instance won.
64785     MS_VALUE=512
64786     if test "$MX_VALUE" -gt "2048"; then
64787       MX_VALUE=2048
64788     fi
64789   else
64790     MS_VALUE=256
64791     if test "$MX_VALUE" -gt "1500"; then
64792       MX_VALUE=1500
64793     fi
64794   fi
64795   if test "$MX_VALUE" -lt "512"; then
64796     MX_VALUE=512
64797   fi
64798 
64799   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64800   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64801   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64802   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64803   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64804   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64805     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64806     JVM_ARG_OK=true
64807   else
64808     $ECHO "Arg failed:" >&5
64809     $ECHO "$OUTPUT" >&5
64810     JVM_ARG_OK=false
64811   fi
64812 
64813 
64814 
64815   # Check whether --enable-sjavac was given.
64816 if test "${enable_sjavac+set}" = set; then :
64817   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64818 else
64819   ENABLE_SJAVAC="no"
64820 fi
64821 
64822   if test "x$JVM_ARG_OK" = "xfalse"; then
64823     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64824 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64825     ENABLE_SJAVAC="no"
64826   fi
64827   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64828 $as_echo_n "checking whether to use sjavac... " >&6; }
64829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64830 $as_echo "$ENABLE_SJAVAC" >&6; }
64831 
64832 
64833   # Check whether --enable-javac-server was given.
64834 if test "${enable_javac_server+set}" = set; then :
64835   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64836 else
64837   ENABLE_JAVAC_SERVER="yes"
64838 fi
64839 
64840   if test "x$JVM_ARG_OK" = "xfalse"; then
64841     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64842 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64843     ENABLE_JAVAC_SERVER="no"
64844   fi
64845   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64846 $as_echo_n "checking whether to use javac server... " >&6; }
64847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64848 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64849 
64850 
64851   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64852     # When using a server javac, the small client instances do not need much
64853     # resources.
64854     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64855   fi
64856 
64857 
64858 # Setup use of icecc if requested
64859 
64860   # Check whether --enable-icecc was given.
64861 if test "${enable_icecc+set}" = set; then :
64862   enableval=$enable_icecc;
64863 fi
64864 
64865 
64866   if test "x${enable_icecc}" = "xyes"; then
64867 
64868 
64869 
64870   # Publish this variable in the help.
64871 
64872 
64873   if [ -z "${ICECC_CMD+x}" ]; then
64874     # The variable is not set by user, try to locate tool using the code snippet
64875     for ac_prog in icecc
64876 do
64877   # Extract the first word of "$ac_prog", so it can be a program name with args.
64878 set dummy $ac_prog; ac_word=$2
64879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64880 $as_echo_n "checking for $ac_word... " >&6; }
64881 if ${ac_cv_path_ICECC_CMD+:} false; then :
64882   $as_echo_n "(cached) " >&6
64883 else
64884   case $ICECC_CMD in
64885   [\\/]* | ?:[\\/]*)
64886   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64887   ;;
64888   *)
64889   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64890 for as_dir in $PATH
64891 do
64892   IFS=$as_save_IFS
64893   test -z "$as_dir" && as_dir=.
64894     for ac_exec_ext in '' $ac_executable_extensions; do
64895   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64896     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64897     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64898     break 2
64899   fi
64900 done
64901   done
64902 IFS=$as_save_IFS
64903 
64904   ;;
64905 esac
64906 fi
64907 ICECC_CMD=$ac_cv_path_ICECC_CMD
64908 if test -n "$ICECC_CMD"; then
64909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64910 $as_echo "$ICECC_CMD" >&6; }
64911 else
64912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64913 $as_echo "no" >&6; }
64914 fi
64915 
64916 
64917   test -n "$ICECC_CMD" && break
64918 done
64919 
64920   else
64921     # The variable is set, but is it from the command line or the environment?
64922 
64923     # Try to remove the string !ICECC_CMD! from our list.
64924     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64925     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64926       # If it failed, the variable was not from the command line. Ignore it,
64927       # but warn the user (except for BASH, which is always set by the calling BASH).
64928       if test "xICECC_CMD" != xBASH; then
64929         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64930 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64931       fi
64932       # Try to locate tool using the code snippet
64933       for ac_prog in icecc
64934 do
64935   # Extract the first word of "$ac_prog", so it can be a program name with args.
64936 set dummy $ac_prog; ac_word=$2
64937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64938 $as_echo_n "checking for $ac_word... " >&6; }
64939 if ${ac_cv_path_ICECC_CMD+:} false; then :
64940   $as_echo_n "(cached) " >&6
64941 else
64942   case $ICECC_CMD in
64943   [\\/]* | ?:[\\/]*)
64944   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64945   ;;
64946   *)
64947   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64948 for as_dir in $PATH
64949 do
64950   IFS=$as_save_IFS
64951   test -z "$as_dir" && as_dir=.
64952     for ac_exec_ext in '' $ac_executable_extensions; do
64953   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64954     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64955     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64956     break 2
64957   fi
64958 done
64959   done
64960 IFS=$as_save_IFS
64961 
64962   ;;
64963 esac
64964 fi
64965 ICECC_CMD=$ac_cv_path_ICECC_CMD
64966 if test -n "$ICECC_CMD"; then
64967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64968 $as_echo "$ICECC_CMD" >&6; }
64969 else
64970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64971 $as_echo "no" >&6; }
64972 fi
64973 
64974 
64975   test -n "$ICECC_CMD" && break
64976 done
64977 
64978     else
64979       # If it succeeded, then it was overridden by the user. We will use it
64980       # for the tool.
64981 
64982       # First remove it from the list of overridden variables, so we can test
64983       # for unknown variables in the end.
64984       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64985 
64986       # Check if we try to supply an empty value
64987       if test "x$ICECC_CMD" = x; then
64988         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64989 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64990         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64991 $as_echo_n "checking for ICECC_CMD... " >&6; }
64992         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64993 $as_echo "disabled" >&6; }
64994       else
64995         # Check if the provided tool contains a complete path.
64996         tool_specified="$ICECC_CMD"
64997         tool_basename="${tool_specified##*/}"
64998         if test "x$tool_basename" = "x$tool_specified"; then
64999           # A command without a complete path is provided, search $PATH.
65000           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65001 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65002           # Extract the first word of "$tool_basename", so it can be a program name with args.
65003 set dummy $tool_basename; ac_word=$2
65004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65005 $as_echo_n "checking for $ac_word... " >&6; }
65006 if ${ac_cv_path_ICECC_CMD+:} false; then :
65007   $as_echo_n "(cached) " >&6
65008 else
65009   case $ICECC_CMD in
65010   [\\/]* | ?:[\\/]*)
65011   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65012   ;;
65013   *)
65014   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65015 for as_dir in $PATH
65016 do
65017   IFS=$as_save_IFS
65018   test -z "$as_dir" && as_dir=.
65019     for ac_exec_ext in '' $ac_executable_extensions; do
65020   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65021     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65022     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65023     break 2
65024   fi
65025 done
65026   done
65027 IFS=$as_save_IFS
65028 
65029   ;;
65030 esac
65031 fi
65032 ICECC_CMD=$ac_cv_path_ICECC_CMD
65033 if test -n "$ICECC_CMD"; then
65034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65035 $as_echo "$ICECC_CMD" >&6; }
65036 else
65037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65038 $as_echo "no" >&6; }
65039 fi
65040 
65041 
65042           if test "x$ICECC_CMD" = x; then
65043             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65044           fi
65045         else
65046           # Otherwise we believe it is a complete path. Use it as it is.
65047           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65048 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65049           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65050 $as_echo_n "checking for ICECC_CMD... " >&6; }
65051           if test ! -x "$tool_specified"; then
65052             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65053 $as_echo "not found" >&6; }
65054             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65055           fi
65056           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65057 $as_echo "$tool_specified" >&6; }
65058         fi
65059       fi
65060     fi
65061 
65062   fi
65063 
65064 
65065 
65066   if test "x$ICECC_CMD" = x; then
65067     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65068   fi
65069 
65070 
65071     old_path="$PATH"
65072 
65073     # Look for icecc-create-env in some known places
65074     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65075 
65076 
65077 
65078   # Publish this variable in the help.
65079 
65080 
65081   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65082     # The variable is not set by user, try to locate tool using the code snippet
65083     for ac_prog in icecc-create-env
65084 do
65085   # Extract the first word of "$ac_prog", so it can be a program name with args.
65086 set dummy $ac_prog; ac_word=$2
65087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65088 $as_echo_n "checking for $ac_word... " >&6; }
65089 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65090   $as_echo_n "(cached) " >&6
65091 else
65092   case $ICECC_CREATE_ENV in
65093   [\\/]* | ?:[\\/]*)
65094   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65095   ;;
65096   *)
65097   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65098 for as_dir in $PATH
65099 do
65100   IFS=$as_save_IFS
65101   test -z "$as_dir" && as_dir=.
65102     for ac_exec_ext in '' $ac_executable_extensions; do
65103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65104     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65106     break 2
65107   fi
65108 done
65109   done
65110 IFS=$as_save_IFS
65111 
65112   ;;
65113 esac
65114 fi
65115 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65116 if test -n "$ICECC_CREATE_ENV"; then
65117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65118 $as_echo "$ICECC_CREATE_ENV" >&6; }
65119 else
65120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65121 $as_echo "no" >&6; }
65122 fi
65123 
65124 
65125   test -n "$ICECC_CREATE_ENV" && break
65126 done
65127 
65128   else
65129     # The variable is set, but is it from the command line or the environment?
65130 
65131     # Try to remove the string !ICECC_CREATE_ENV! from our list.
65132     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65133     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65134       # If it failed, the variable was not from the command line. Ignore it,
65135       # but warn the user (except for BASH, which is always set by the calling BASH).
65136       if test "xICECC_CREATE_ENV" != xBASH; then
65137         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65138 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65139       fi
65140       # Try to locate tool using the code snippet
65141       for ac_prog in icecc-create-env
65142 do
65143   # Extract the first word of "$ac_prog", so it can be a program name with args.
65144 set dummy $ac_prog; ac_word=$2
65145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65146 $as_echo_n "checking for $ac_word... " >&6; }
65147 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65148   $as_echo_n "(cached) " >&6
65149 else
65150   case $ICECC_CREATE_ENV in
65151   [\\/]* | ?:[\\/]*)
65152   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65153   ;;
65154   *)
65155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65156 for as_dir in $PATH
65157 do
65158   IFS=$as_save_IFS
65159   test -z "$as_dir" && as_dir=.
65160     for ac_exec_ext in '' $ac_executable_extensions; do
65161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65162     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65164     break 2
65165   fi
65166 done
65167   done
65168 IFS=$as_save_IFS
65169 
65170   ;;
65171 esac
65172 fi
65173 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65174 if test -n "$ICECC_CREATE_ENV"; then
65175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65176 $as_echo "$ICECC_CREATE_ENV" >&6; }
65177 else
65178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65179 $as_echo "no" >&6; }
65180 fi
65181 
65182 
65183   test -n "$ICECC_CREATE_ENV" && break
65184 done
65185 
65186     else
65187       # If it succeeded, then it was overridden by the user. We will use it
65188       # for the tool.
65189 
65190       # First remove it from the list of overridden variables, so we can test
65191       # for unknown variables in the end.
65192       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65193 
65194       # Check if we try to supply an empty value
65195       if test "x$ICECC_CREATE_ENV" = x; then
65196         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65197 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65198         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65199 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65200         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65201 $as_echo "disabled" >&6; }
65202       else
65203         # Check if the provided tool contains a complete path.
65204         tool_specified="$ICECC_CREATE_ENV"
65205         tool_basename="${tool_specified##*/}"
65206         if test "x$tool_basename" = "x$tool_specified"; then
65207           # A command without a complete path is provided, search $PATH.
65208           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65209 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65210           # Extract the first word of "$tool_basename", so it can be a program name with args.
65211 set dummy $tool_basename; ac_word=$2
65212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65213 $as_echo_n "checking for $ac_word... " >&6; }
65214 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65215   $as_echo_n "(cached) " >&6
65216 else
65217   case $ICECC_CREATE_ENV in
65218   [\\/]* | ?:[\\/]*)
65219   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65220   ;;
65221   *)
65222   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65223 for as_dir in $PATH
65224 do
65225   IFS=$as_save_IFS
65226   test -z "$as_dir" && as_dir=.
65227     for ac_exec_ext in '' $ac_executable_extensions; do
65228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65229     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65231     break 2
65232   fi
65233 done
65234   done
65235 IFS=$as_save_IFS
65236 
65237   ;;
65238 esac
65239 fi
65240 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65241 if test -n "$ICECC_CREATE_ENV"; then
65242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65243 $as_echo "$ICECC_CREATE_ENV" >&6; }
65244 else
65245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65246 $as_echo "no" >&6; }
65247 fi
65248 
65249 
65250           if test "x$ICECC_CREATE_ENV" = x; then
65251             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65252           fi
65253         else
65254           # Otherwise we believe it is a complete path. Use it as it is.
65255           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65256 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65257           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65258 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65259           if test ! -x "$tool_specified"; then
65260             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65261 $as_echo "not found" >&6; }
65262             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65263           fi
65264           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65265 $as_echo "$tool_specified" >&6; }
65266         fi
65267       fi
65268     fi
65269 
65270   fi
65271 
65272 
65273 
65274   if test "x$ICECC_CREATE_ENV" = x; then
65275     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65276   fi
65277 
65278 
65279     # Use icecc-create-env to create a minimal compilation environment that can
65280     # be sent to the other hosts in the icecream cluster.
65281     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65282     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65283     # Older versions of icecc does not have the --gcc parameter
65284     if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65285       icecc_gcc_arg="--gcc"
65286     fi
65287     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65288 
65289   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65290       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65291           ${icecc_create_env_log} 2>&1 )
65292   if test "$?" != "0"; then
65293     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65294 $as_echo "$as_me: icecc-create-env output:" >&6;}
65295     cat \
65296           ${icecc_create_env_log}
65297     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65298   fi
65299 
65300     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65301       # For clang, the icecc compilerwrapper is needed. It usually resides next
65302       # to icecc-create-env.
65303 
65304 
65305 
65306   # Publish this variable in the help.
65307 
65308 
65309   if [ -z "${ICECC_WRAPPER+x}" ]; then
65310     # The variable is not set by user, try to locate tool using the code snippet
65311     for ac_prog in compilerwrapper
65312 do
65313   # Extract the first word of "$ac_prog", so it can be a program name with args.
65314 set dummy $ac_prog; ac_word=$2
65315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65316 $as_echo_n "checking for $ac_word... " >&6; }
65317 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65318   $as_echo_n "(cached) " >&6
65319 else
65320   case $ICECC_WRAPPER in
65321   [\\/]* | ?:[\\/]*)
65322   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65323   ;;
65324   *)
65325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65326 for as_dir in $PATH
65327 do
65328   IFS=$as_save_IFS
65329   test -z "$as_dir" && as_dir=.
65330     for ac_exec_ext in '' $ac_executable_extensions; do
65331   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65332     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65334     break 2
65335   fi
65336 done
65337   done
65338 IFS=$as_save_IFS
65339 
65340   ;;
65341 esac
65342 fi
65343 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65344 if test -n "$ICECC_WRAPPER"; then
65345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65346 $as_echo "$ICECC_WRAPPER" >&6; }
65347 else
65348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65349 $as_echo "no" >&6; }
65350 fi
65351 
65352 
65353   test -n "$ICECC_WRAPPER" && break
65354 done
65355 
65356   else
65357     # The variable is set, but is it from the command line or the environment?
65358 
65359     # Try to remove the string !ICECC_WRAPPER! from our list.
65360     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65361     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65362       # If it failed, the variable was not from the command line. Ignore it,
65363       # but warn the user (except for BASH, which is always set by the calling BASH).
65364       if test "xICECC_WRAPPER" != xBASH; then
65365         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65366 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65367       fi
65368       # Try to locate tool using the code snippet
65369       for ac_prog in compilerwrapper
65370 do
65371   # Extract the first word of "$ac_prog", so it can be a program name with args.
65372 set dummy $ac_prog; ac_word=$2
65373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65374 $as_echo_n "checking for $ac_word... " >&6; }
65375 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65376   $as_echo_n "(cached) " >&6
65377 else
65378   case $ICECC_WRAPPER in
65379   [\\/]* | ?:[\\/]*)
65380   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65381   ;;
65382   *)
65383   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65384 for as_dir in $PATH
65385 do
65386   IFS=$as_save_IFS
65387   test -z "$as_dir" && as_dir=.
65388     for ac_exec_ext in '' $ac_executable_extensions; do
65389   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65390     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65391     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65392     break 2
65393   fi
65394 done
65395   done
65396 IFS=$as_save_IFS
65397 
65398   ;;
65399 esac
65400 fi
65401 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65402 if test -n "$ICECC_WRAPPER"; then
65403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65404 $as_echo "$ICECC_WRAPPER" >&6; }
65405 else
65406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65407 $as_echo "no" >&6; }
65408 fi
65409 
65410 
65411   test -n "$ICECC_WRAPPER" && break
65412 done
65413 
65414     else
65415       # If it succeeded, then it was overridden by the user. We will use it
65416       # for the tool.
65417 
65418       # First remove it from the list of overridden variables, so we can test
65419       # for unknown variables in the end.
65420       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65421 
65422       # Check if we try to supply an empty value
65423       if test "x$ICECC_WRAPPER" = x; then
65424         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65425 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65426         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65427 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65428         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65429 $as_echo "disabled" >&6; }
65430       else
65431         # Check if the provided tool contains a complete path.
65432         tool_specified="$ICECC_WRAPPER"
65433         tool_basename="${tool_specified##*/}"
65434         if test "x$tool_basename" = "x$tool_specified"; then
65435           # A command without a complete path is provided, search $PATH.
65436           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65437 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65438           # Extract the first word of "$tool_basename", so it can be a program name with args.
65439 set dummy $tool_basename; ac_word=$2
65440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65441 $as_echo_n "checking for $ac_word... " >&6; }
65442 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65443   $as_echo_n "(cached) " >&6
65444 else
65445   case $ICECC_WRAPPER in
65446   [\\/]* | ?:[\\/]*)
65447   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65448   ;;
65449   *)
65450   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65451 for as_dir in $PATH
65452 do
65453   IFS=$as_save_IFS
65454   test -z "$as_dir" && as_dir=.
65455     for ac_exec_ext in '' $ac_executable_extensions; do
65456   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65457     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65459     break 2
65460   fi
65461 done
65462   done
65463 IFS=$as_save_IFS
65464 
65465   ;;
65466 esac
65467 fi
65468 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65469 if test -n "$ICECC_WRAPPER"; then
65470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65471 $as_echo "$ICECC_WRAPPER" >&6; }
65472 else
65473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65474 $as_echo "no" >&6; }
65475 fi
65476 
65477 
65478           if test "x$ICECC_WRAPPER" = x; then
65479             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65480           fi
65481         else
65482           # Otherwise we believe it is a complete path. Use it as it is.
65483           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65484 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65485           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65486 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65487           if test ! -x "$tool_specified"; then
65488             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65489 $as_echo "not found" >&6; }
65490             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65491           fi
65492           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65493 $as_echo "$tool_specified" >&6; }
65494         fi
65495       fi
65496     fi
65497 
65498   fi
65499 
65500 
65501 
65502   if test "x$ICECC_WRAPPER" = x; then
65503     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65504   fi
65505 
65506 
65507 
65508   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65509       && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65510   if test "$?" != "0"; then
65511     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65512 $as_echo "$as_me: icecc-create-env output:" >&6;}
65513     cat ${icecc_create_env_log}
65514     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65515   fi
65516 
65517     else
65518       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65519     fi
65520     PATH="$old_path"
65521     # The bundle with the compiler gets a name based on checksums. Parse log file
65522     # to find it.
65523     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65524     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65525     if test ! -f ${ICECC_ENV_BUNDLE}; then
65526       as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65527     fi
65528     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65529 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65530     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65531 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65532     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65533 
65534     if test "x${COMPILE_TYPE}" = "xcross"; then
65535       # If cross compiling, create a separate env package for the build compiler
65536       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65537       icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65538       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65539 
65540   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65541       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65542             ${icecc_create_env_log_build} 2>&1 )
65543   if test "$?" != "0"; then
65544     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65545 $as_echo "$as_me: icecc-create-env output:" >&6;}
65546     cat \
65547             ${icecc_create_env_log_build}
65548     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65549   fi
65550 
65551       elif test "x${BUILD_CC##*/}" = "xclang"; then
65552 
65553   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65554       && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65555   if test "$?" != "0"; then
65556     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65557 $as_echo "$as_me: icecc-create-env output:" >&6;}
65558     cat ${icecc_create_env_log_build}
65559     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65560   fi
65561 
65562       else
65563         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65564       fi
65565       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65566       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65567       if test ! -f ${ICECC_ENV_BUNDLE}; then
65568         as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65569       fi
65570       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65571 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65572       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65573 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65574       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65575           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65576     else
65577       BUILD_ICECC="${ICECC}"
65578     fi
65579 
65580 
65581   fi
65582 
65583 
65584 # Can the C/C++ compiler use precompiled headers?
65585 
65586 
65587   ###############################################################################
65588   #
65589   # Can the C/C++ compiler use precompiled headers?
65590   #
65591   # Check whether --enable-precompiled-headers was given.
65592 if test "${enable_precompiled_headers+set}" = set; then :
65593   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65594 else
65595   ENABLE_PRECOMPH=yes
65596 fi
65597 
65598 
65599   USE_PRECOMPILED_HEADER=1
65600   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65601 $as_echo_n "checking If precompiled header is enabled... " >&6; }
65602   if test "x$ENABLE_PRECOMPH" = xno; then
65603     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65604 $as_echo "no, forced" >&6; }
65605     USE_PRECOMPILED_HEADER=0
65606   elif test "x$ICECC" != "x"; then
65607     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65608 $as_echo "no, does not work effectively with icecc" >&6; }
65609     USE_PRECOMPILED_HEADER=0
65610   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65611     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65612 $as_echo "no, does not work with Solaris Studio" >&6; }
65613     USE_PRECOMPILED_HEADER=0
65614   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65615     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65616 $as_echo "no, does not work with xlc" >&6; }
65617     USE_PRECOMPILED_HEADER=0
65618   else
65619     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65620 $as_echo "yes" >&6; }
65621   fi
65622 
65623   if test "x$ENABLE_PRECOMPH" = xyes; then
65624     # Check that the compiler actually supports precomp headers.
65625     if test "x$TOOLCHAIN_TYPE" = xgcc; then
65626       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65627 $as_echo_n "checking that precompiled headers work... " >&6; }
65628       echo "int alfa();" > conftest.h
65629       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65630       if test ! -f conftest.hpp.gch; then
65631         USE_PRECOMPILED_HEADER=0
65632         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65633 $as_echo "no" >&6; }
65634       else
65635         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65636 $as_echo "yes" >&6; }
65637       fi
65638       $RM conftest.h conftest.hpp.gch
65639     fi
65640   fi
65641 
65642 
65643 
65644 
65645 # Setup use of ccache, if available
65646 
65647   # Check whether --enable-ccache was given.
65648 if test "${enable_ccache+set}" = set; then :
65649   enableval=$enable_ccache;
65650 fi
65651 
65652 
65653   CCACHE_STATUS=
65654   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65655 $as_echo_n "checking is ccache enabled... " >&6; }
65656   if test "x$enable_ccache" = xyes; then
65657     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65658       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65659 $as_echo "yes" >&6; }
65660       OLD_PATH="$PATH"
65661       if test "x$TOOLCHAIN_PATH" != x; then
65662         PATH=$TOOLCHAIN_PATH:$PATH
65663       fi
65664 
65665 
65666 
65667   # Publish this variable in the help.
65668 
65669 
65670   if [ -z "${CCACHE+x}" ]; then
65671     # The variable is not set by user, try to locate tool using the code snippet
65672     for ac_prog in ccache
65673 do
65674   # Extract the first word of "$ac_prog", so it can be a program name with args.
65675 set dummy $ac_prog; ac_word=$2
65676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65677 $as_echo_n "checking for $ac_word... " >&6; }
65678 if ${ac_cv_path_CCACHE+:} false; then :
65679   $as_echo_n "(cached) " >&6
65680 else
65681   case $CCACHE in
65682   [\\/]* | ?:[\\/]*)
65683   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65684   ;;
65685   *)
65686   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65687 for as_dir in $PATH
65688 do
65689   IFS=$as_save_IFS
65690   test -z "$as_dir" && as_dir=.
65691     for ac_exec_ext in '' $ac_executable_extensions; do
65692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65693     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65695     break 2
65696   fi
65697 done
65698   done
65699 IFS=$as_save_IFS
65700 
65701   ;;
65702 esac
65703 fi
65704 CCACHE=$ac_cv_path_CCACHE
65705 if test -n "$CCACHE"; then
65706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65707 $as_echo "$CCACHE" >&6; }
65708 else
65709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65710 $as_echo "no" >&6; }
65711 fi
65712 
65713 
65714   test -n "$CCACHE" && break
65715 done
65716 
65717   else
65718     # The variable is set, but is it from the command line or the environment?
65719 
65720     # Try to remove the string !CCACHE! from our list.
65721     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65722     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65723       # If it failed, the variable was not from the command line. Ignore it,
65724       # but warn the user (except for BASH, which is always set by the calling BASH).
65725       if test "xCCACHE" != xBASH; then
65726         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65727 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65728       fi
65729       # Try to locate tool using the code snippet
65730       for ac_prog in ccache
65731 do
65732   # Extract the first word of "$ac_prog", so it can be a program name with args.
65733 set dummy $ac_prog; ac_word=$2
65734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65735 $as_echo_n "checking for $ac_word... " >&6; }
65736 if ${ac_cv_path_CCACHE+:} false; then :
65737   $as_echo_n "(cached) " >&6
65738 else
65739   case $CCACHE in
65740   [\\/]* | ?:[\\/]*)
65741   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65742   ;;
65743   *)
65744   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65745 for as_dir in $PATH
65746 do
65747   IFS=$as_save_IFS
65748   test -z "$as_dir" && as_dir=.
65749     for ac_exec_ext in '' $ac_executable_extensions; do
65750   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65751     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65752     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65753     break 2
65754   fi
65755 done
65756   done
65757 IFS=$as_save_IFS
65758 
65759   ;;
65760 esac
65761 fi
65762 CCACHE=$ac_cv_path_CCACHE
65763 if test -n "$CCACHE"; then
65764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65765 $as_echo "$CCACHE" >&6; }
65766 else
65767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65768 $as_echo "no" >&6; }
65769 fi
65770 
65771 
65772   test -n "$CCACHE" && break
65773 done
65774 
65775     else
65776       # If it succeeded, then it was overridden by the user. We will use it
65777       # for the tool.
65778 
65779       # First remove it from the list of overridden variables, so we can test
65780       # for unknown variables in the end.
65781       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65782 
65783       # Check if we try to supply an empty value
65784       if test "x$CCACHE" = x; then
65785         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65786 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65787         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65788 $as_echo_n "checking for CCACHE... " >&6; }
65789         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65790 $as_echo "disabled" >&6; }
65791       else
65792         # Check if the provided tool contains a complete path.
65793         tool_specified="$CCACHE"
65794         tool_basename="${tool_specified##*/}"
65795         if test "x$tool_basename" = "x$tool_specified"; then
65796           # A command without a complete path is provided, search $PATH.
65797           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65798 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65799           # Extract the first word of "$tool_basename", so it can be a program name with args.
65800 set dummy $tool_basename; ac_word=$2
65801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65802 $as_echo_n "checking for $ac_word... " >&6; }
65803 if ${ac_cv_path_CCACHE+:} false; then :
65804   $as_echo_n "(cached) " >&6
65805 else
65806   case $CCACHE in
65807   [\\/]* | ?:[\\/]*)
65808   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65809   ;;
65810   *)
65811   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65812 for as_dir in $PATH
65813 do
65814   IFS=$as_save_IFS
65815   test -z "$as_dir" && as_dir=.
65816     for ac_exec_ext in '' $ac_executable_extensions; do
65817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65818     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65820     break 2
65821   fi
65822 done
65823   done
65824 IFS=$as_save_IFS
65825 
65826   ;;
65827 esac
65828 fi
65829 CCACHE=$ac_cv_path_CCACHE
65830 if test -n "$CCACHE"; then
65831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65832 $as_echo "$CCACHE" >&6; }
65833 else
65834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65835 $as_echo "no" >&6; }
65836 fi
65837 
65838 
65839           if test "x$CCACHE" = x; then
65840             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65841           fi
65842         else
65843           # Otherwise we believe it is a complete path. Use it as it is.
65844           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65845 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65846           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65847 $as_echo_n "checking for CCACHE... " >&6; }
65848           if test ! -x "$tool_specified"; then
65849             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65850 $as_echo "not found" >&6; }
65851             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65852           fi
65853           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65854 $as_echo "$tool_specified" >&6; }
65855         fi
65856       fi
65857     fi
65858 
65859   fi
65860 
65861 
65862 
65863   if test "x$CCACHE" = x; then
65864     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65865   fi
65866 
65867 
65868       PATH="$OLD_PATH"
65869       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65870       CCACHE_STATUS="Active ($CCACHE_VERSION)"
65871     else
65872       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65873 $as_echo "no" >&6; }
65874       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65875 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65876     fi
65877   elif test "x$enable_ccache" = xno; then
65878     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65879 $as_echo "no, explicitly disabled" >&6; }
65880     CCACHE_STATUS="Disabled"
65881   elif test "x$enable_ccache" = x; then
65882     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65883 $as_echo "no" >&6; }
65884   else
65885     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65886 $as_echo "unknown" >&6; }
65887     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65888   fi
65889 
65890 
65891 
65892 # Check whether --with-ccache-dir was given.
65893 if test "${with_ccache_dir+set}" = set; then :
65894   withval=$with_ccache_dir;
65895 fi
65896 
65897 
65898   if test "x$with_ccache_dir" != x; then
65899     # When using a non home ccache directory, assume the use is to share ccache files
65900     # with other users. Thus change the umask.
65901     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65902     if test "x$CCACHE" = x; then
65903       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65904 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65905     fi
65906   fi
65907 
65908   if test "x$CCACHE" != x; then
65909 
65910   if test "x$CCACHE" != x; then
65911     if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
65912       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65913           $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
65914       if test "x$HAS_BAD_CCACHE" != "x"; then
65915         as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
65916       fi
65917     fi
65918     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65919       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65920           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65921       if test "x$HAS_BAD_CCACHE" != "x"; then
65922         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65923       fi
65924       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65925 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65926       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65927       PUSHED_FLAGS="$CXXFLAGS"
65928       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65929       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65930 /* end confdefs.h.  */
65931 
65932 int
65933 main ()
65934 {
65935 
65936   ;
65937   return 0;
65938 }
65939 _ACEOF
65940 if ac_fn_cxx_try_compile "$LINENO"; then :
65941   CC_KNOWS_CCACHE_TRICK=yes
65942 else
65943   CC_KNOWS_CCACHE_TRICK=no
65944 fi
65945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65946       CXXFLAGS="$PUSHED_FLAGS"
65947       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65948         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65949 $as_echo "yes" >&6; }
65950         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65951 
65952         CCACHE_SLOPPINESS=pch_defines,time_macros
65953       else
65954         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65955 $as_echo "no" >&6; }
65956         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65957       fi
65958     fi
65959 
65960     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65961         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65962 
65963     if test "x$SET_CCACHE_DIR" != x; then
65964       mkdir -p $CCACHE_DIR > /dev/null 2>&1
65965       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65966     fi
65967   fi
65968 
65969   fi
65970 
65971 
65972 ###############################################################################
65973 #
65974 # And now the finish...
65975 #
65976 ###############################################################################
65977 
65978 # Check for some common pitfalls
65979 
65980   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65981     file_to_test="$SRC_ROOT/LICENSE"
65982     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65983       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
65984     fi
65985   fi
65986 
65987 
65988   # Did user specify any unknown variables?
65989 
65990   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65991     # Replace the separating ! with spaces before presenting for end user.
65992     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65993     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65994 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65995   fi
65996 
65997 
65998   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65999 $as_echo_n "checking if build directory is on local disk... " >&6; }
66000 
66001   # df -l lists only local disks; if the given directory is not found then
66002   # a non-zero exit code is given
66003   if test "x$DF" = x; then
66004     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66005       # msys does not have df; use Windows "net use" instead.
66006       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66007       if test "x$IS_NETWORK_DISK" = x; then
66008         OUTPUT_DIR_IS_LOCAL="yes"
66009       else
66010         OUTPUT_DIR_IS_LOCAL="no"
66011       fi
66012     else
66013       # No df here, say it's local
66014       OUTPUT_DIR_IS_LOCAL="yes"
66015     fi
66016   else
66017     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66018       OUTPUT_DIR_IS_LOCAL="yes"
66019     else
66020       OUTPUT_DIR_IS_LOCAL="no"
66021     fi
66022   fi
66023 
66024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66025 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66026 
66027 
66028 
66029   # Check if the user has any old-style ALT_ variables set.
66030   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66031 
66032   # Before generating output files, test if they exist. If they do, this is a reconfigure.
66033   # Since we can't properly handle the dependencies for this, warn the user about the situation
66034   if test -e $OUTPUT_ROOT/spec.gmk; then
66035     IS_RECONFIGURE=yes
66036   else
66037     IS_RECONFIGURE=no
66038   fi
66039 
66040 
66041 # At the end, call the custom hook. (Dummy macro if no custom sources available)
66042 
66043 
66044 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66045 
66046   # Keep feature lists sorted and free of duplicates
66047   JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66048   JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66049   JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66050   JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66051   JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66052   JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66053   JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66054 
66055   # Validate features
66056   for variant in $JVM_VARIANTS; do
66057     { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66058 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66059     features_var_name=JVM_FEATURES_$variant
66060     JVM_FEATURES_TO_TEST=${!features_var_name}
66061     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66062 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66063     NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66064     STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66065     INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66066     if test "x$INVALID_FEATURES" != x; then
66067       as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66068     fi
66069   done
66070 
66071 
66072 # We're messing a bit with internal autoconf variables to put the config.status
66073 # in the output directory instead of the current directory.
66074 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66075 
66076 # Create the actual output files. Now the main work of configure is done.
66077 cat >confcache <<\_ACEOF
66078 # This file is a shell script that caches the results of configure
66079 # tests run on this system so they can be shared between configure
66080 # scripts and configure runs, see configure's option --config-cache.
66081 # It is not useful on other systems.  If it contains results you don't
66082 # want to keep, you may remove or edit it.
66083 #
66084 # config.status only pays attention to the cache file if you give it
66085 # the --recheck option to rerun configure.
66086 #
66087 # `ac_cv_env_foo' variables (set or unset) will be overridden when
66088 # loading this file, other *unset* `ac_cv_foo' will be assigned the
66089 # following values.
66090 
66091 _ACEOF
66092 
66093 # The following way of writing the cache mishandles newlines in values,
66094 # but we know of no workaround that is simple, portable, and efficient.
66095 # So, we kill variables containing newlines.
66096 # Ultrix sh set writes to stderr and can't be redirected directly,
66097 # and sets the high bit in the cache file unless we assign to the vars.
66098 (
66099   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66100     eval ac_val=\$$ac_var
66101     case $ac_val in #(
66102     *${as_nl}*)
66103       case $ac_var in #(
66104       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66105 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66106       esac
66107       case $ac_var in #(
66108       _ | IFS | as_nl) ;; #(
66109       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66110       *) { eval $ac_var=; unset $ac_var;} ;;
66111       esac ;;
66112     esac
66113   done
66114 
66115   (set) 2>&1 |
66116     case $as_nl`(ac_space=' '; set) 2>&1` in #(
66117     *${as_nl}ac_space=\ *)
66118       # `set' does not quote correctly, so add quotes: double-quote
66119       # substitution turns \\\\ into \\, and sed turns \\ into \.
66120       sed -n \
66121         "s/'/'\\\\''/g;
66122           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66123       ;; #(
66124     *)
66125       # `set' quotes correctly as required by POSIX, so do not add quotes.
66126       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66127       ;;
66128     esac |
66129     sort
66130 ) |
66131   sed '
66132      /^ac_cv_env_/b end
66133      t clear
66134      :clear
66135      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66136      t end
66137      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66138      :end' >>confcache
66139 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66140   if test -w "$cache_file"; then
66141     if test "x$cache_file" != "x/dev/null"; then
66142       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66143 $as_echo "$as_me: updating cache $cache_file" >&6;}
66144       if test ! -f "$cache_file" || test -h "$cache_file"; then
66145         cat confcache >"$cache_file"
66146       else
66147         case $cache_file in #(
66148         */* | ?:*)
66149           mv -f confcache "$cache_file"$$ &&
66150           mv -f "$cache_file"$$ "$cache_file" ;; #(
66151         *)
66152           mv -f confcache "$cache_file" ;;
66153         esac
66154       fi
66155     fi
66156   else
66157     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66158 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66159   fi
66160 fi
66161 rm -f confcache
66162 
66163 test "x$prefix" = xNONE && prefix=$ac_default_prefix
66164 # Let make expand exec_prefix.
66165 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66166 
66167 # Transform confdefs.h into DEFS.
66168 # Protect against shell expansion while executing Makefile rules.
66169 # Protect against Makefile macro expansion.
66170 #
66171 # If the first sed substitution is executed (which looks for macros that
66172 # take arguments), then branch to the quote section.  Otherwise,
66173 # look for a macro that doesn't take arguments.
66174 ac_script='
66175 :mline
66176 /\\$/{
66177  N
66178  s,\\\n,,
66179  b mline
66180 }
66181 t clear
66182 :clear
66183 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
66184 t quote
66185 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
66186 t quote
66187 b any
66188 :quote
66189 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66190 s/\[/\\&/g
66191 s/\]/\\&/g
66192 s/\$/$$/g
66193 H
66194 :any
66195 ${
66196         g
66197         s/^\n//
66198         s/\n/ /g
66199         p
66200 }
66201 '
66202 DEFS=`sed -n "$ac_script" confdefs.h`
66203 
66204 
66205 ac_libobjs=
66206 ac_ltlibobjs=
66207 U=
66208 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66209   # 1. Remove the extension, and $U if already installed.
66210   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66211   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66212   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66213   #    will be set to the directory where LIBOBJS objects are built.
66214   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66215   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66216 done
66217 LIBOBJS=$ac_libobjs
66218 
66219 LTLIBOBJS=$ac_ltlibobjs
66220 
66221 
66222 
66223 : "${CONFIG_STATUS=./config.status}"
66224 ac_write_fail=0
66225 ac_clean_files_save=$ac_clean_files
66226 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66227 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66228 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66229 as_write_fail=0
66230 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66231 #! $SHELL
66232 # Generated by $as_me.
66233 # Run this file to recreate the current configuration.
66234 # Compiler output produced by configure, useful for debugging
66235 # configure, is in config.log if it exists.
66236 
66237 debug=false
66238 ac_cs_recheck=false
66239 ac_cs_silent=false
66240 
66241 SHELL=\${CONFIG_SHELL-$SHELL}
66242 export SHELL
66243 _ASEOF
66244 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66245 ## -------------------- ##
66246 ## M4sh Initialization. ##
66247 ## -------------------- ##
66248 
66249 # Be more Bourne compatible
66250 DUALCASE=1; export DUALCASE # for MKS sh
66251 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66252   emulate sh
66253   NULLCMD=:
66254   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66255   # is contrary to our usage.  Disable this feature.
66256   alias -g '${1+"$@"}'='"$@"'
66257   setopt NO_GLOB_SUBST
66258 else
66259   case `(set -o) 2>/dev/null` in #(
66260   *posix*) :
66261     set -o posix ;; #(
66262   *) :
66263      ;;
66264 esac
66265 fi
66266 
66267 
66268 as_nl='
66269 '
66270 export as_nl
66271 # Printing a long string crashes Solaris 7 /usr/bin/printf.
66272 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66273 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66274 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66275 # Prefer a ksh shell builtin over an external printf program on Solaris,
66276 # but without wasting forks for bash or zsh.
66277 if test -z "$BASH_VERSION$ZSH_VERSION" \
66278     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66279   as_echo='print -r --'
66280   as_echo_n='print -rn --'
66281 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66282   as_echo='printf %s\n'
66283   as_echo_n='printf %s'
66284 else
66285   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66286     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66287     as_echo_n='/usr/ucb/echo -n'
66288   else
66289     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66290     as_echo_n_body='eval
66291       arg=$1;
66292       case $arg in #(
66293       *"$as_nl"*)
66294         expr "X$arg" : "X\\(.*\\)$as_nl";
66295         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66296       esac;
66297       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66298     '
66299     export as_echo_n_body
66300     as_echo_n='sh -c $as_echo_n_body as_echo'
66301   fi
66302   export as_echo_body
66303   as_echo='sh -c $as_echo_body as_echo'
66304 fi
66305 
66306 # The user is always right.
66307 if test "${PATH_SEPARATOR+set}" != set; then
66308   PATH_SEPARATOR=:
66309   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66310     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66311       PATH_SEPARATOR=';'
66312   }
66313 fi
66314 
66315 
66316 # IFS
66317 # We need space, tab and new line, in precisely that order.  Quoting is
66318 # there to prevent editors from complaining about space-tab.
66319 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
66320 # splitting by setting IFS to empty value.)
66321 IFS=" ""        $as_nl"
66322 
66323 # Find who we are.  Look in the path if we contain no directory separator.
66324 as_myself=
66325 case $0 in #((
66326   *[\\/]* ) as_myself=$0 ;;
66327   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66328 for as_dir in $PATH
66329 do
66330   IFS=$as_save_IFS
66331   test -z "$as_dir" && as_dir=.
66332     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66333   done
66334 IFS=$as_save_IFS
66335 
66336      ;;
66337 esac
66338 # We did not find ourselves, most probably we were run as `sh COMMAND'
66339 # in which case we are not to be found in the path.
66340 if test "x$as_myself" = x; then
66341   as_myself=$0
66342 fi
66343 if test ! -f "$as_myself"; then
66344   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66345   exit 1
66346 fi
66347 
66348 # Unset variables that we do not need and which cause bugs (e.g. in
66349 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66350 # suppresses any "Segmentation fault" message there.  '((' could
66351 # trigger a bug in pdksh 5.2.14.
66352 for as_var in BASH_ENV ENV MAIL MAILPATH
66353 do eval test x\${$as_var+set} = xset \
66354   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66355 done
66356 PS1='$ '
66357 PS2='> '
66358 PS4='+ '
66359 
66360 # NLS nuisances.
66361 LC_ALL=C
66362 export LC_ALL
66363 LANGUAGE=C
66364 export LANGUAGE
66365 
66366 # CDPATH.
66367 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66368 
66369 
66370 # as_fn_error STATUS ERROR [LINENO LOG_FD]
66371 # ----------------------------------------
66372 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66373 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66374 # script with STATUS, using 1 if that was 0.
66375 as_fn_error ()
66376 {
66377   as_status=$1; test $as_status -eq 0 && as_status=1
66378   if test "$4"; then
66379     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66380     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66381   fi
66382   $as_echo "$as_me: error: $2" >&2
66383   as_fn_exit $as_status
66384 } # as_fn_error
66385 
66386 
66387 # as_fn_set_status STATUS
66388 # -----------------------
66389 # Set $? to STATUS, without forking.
66390 as_fn_set_status ()
66391 {
66392   return $1
66393 } # as_fn_set_status
66394 
66395 # as_fn_exit STATUS
66396 # -----------------
66397 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66398 as_fn_exit ()
66399 {
66400   set +e
66401   as_fn_set_status $1
66402   exit $1
66403 } # as_fn_exit
66404 
66405 # as_fn_unset VAR
66406 # ---------------
66407 # Portably unset VAR.
66408 as_fn_unset ()
66409 {
66410   { eval $1=; unset $1;}
66411 }
66412 as_unset=as_fn_unset
66413 # as_fn_append VAR VALUE
66414 # ----------------------
66415 # Append the text in VALUE to the end of the definition contained in VAR. Take
66416 # advantage of any shell optimizations that allow amortized linear growth over
66417 # repeated appends, instead of the typical quadratic growth present in naive
66418 # implementations.
66419 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66420   eval 'as_fn_append ()
66421   {
66422     eval $1+=\$2
66423   }'
66424 else
66425   as_fn_append ()
66426   {
66427     eval $1=\$$1\$2
66428   }
66429 fi # as_fn_append
66430 
66431 # as_fn_arith ARG...
66432 # ------------------
66433 # Perform arithmetic evaluation on the ARGs, and store the result in the
66434 # global $as_val. Take advantage of shells that can avoid forks. The arguments
66435 # must be portable across $(()) and expr.
66436 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66437   eval 'as_fn_arith ()
66438   {
66439     as_val=$(( $* ))
66440   }'
66441 else
66442   as_fn_arith ()
66443   {
66444     as_val=`expr "$@" || test $? -eq 1`
66445   }
66446 fi # as_fn_arith
66447 
66448 
66449 if expr a : '\(a\)' >/dev/null 2>&1 &&
66450    test "X`expr 00001 : '.*\(...\)'`" = X001; then
66451   as_expr=expr
66452 else
66453   as_expr=false
66454 fi
66455 
66456 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66457   as_basename=basename
66458 else
66459   as_basename=false
66460 fi
66461 
66462 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66463   as_dirname=dirname
66464 else
66465   as_dirname=false
66466 fi
66467 
66468 as_me=`$as_basename -- "$0" ||
66469 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66470          X"$0" : 'X\(//\)$' \| \
66471          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66472 $as_echo X/"$0" |
66473     sed '/^.*\/\([^/][^/]*\)\/*$/{
66474             s//\1/
66475             q
66476           }
66477           /^X\/\(\/\/\)$/{
66478             s//\1/
66479             q
66480           }
66481           /^X\/\(\/\).*/{
66482             s//\1/
66483             q
66484           }
66485           s/.*/./; q'`
66486 
66487 # Avoid depending upon Character Ranges.
66488 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66489 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66490 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66491 as_cr_digits='0123456789'
66492 as_cr_alnum=$as_cr_Letters$as_cr_digits
66493 
66494 ECHO_C= ECHO_N= ECHO_T=
66495 case `echo -n x` in #(((((
66496 -n*)
66497   case `echo 'xy\c'` in
66498   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
66499   xy)  ECHO_C='\c';;
66500   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66501        ECHO_T=' ';;
66502   esac;;
66503 *)
66504   ECHO_N='-n';;
66505 esac
66506 
66507 rm -f conf$$ conf$$.exe conf$$.file
66508 if test -d conf$$.dir; then
66509   rm -f conf$$.dir/conf$$.file
66510 else
66511   rm -f conf$$.dir
66512   mkdir conf$$.dir 2>/dev/null
66513 fi
66514 if (echo >conf$$.file) 2>/dev/null; then
66515   if ln -s conf$$.file conf$$ 2>/dev/null; then
66516     as_ln_s='ln -s'
66517     # ... but there are two gotchas:
66518     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66519     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66520     # In both cases, we have to default to `cp -pR'.
66521     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66522       as_ln_s='cp -pR'
66523   elif ln conf$$.file conf$$ 2>/dev/null; then
66524     as_ln_s=ln
66525   else
66526     as_ln_s='cp -pR'
66527   fi
66528 else
66529   as_ln_s='cp -pR'
66530 fi
66531 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66532 rmdir conf$$.dir 2>/dev/null
66533 
66534 
66535 # as_fn_mkdir_p
66536 # -------------
66537 # Create "$as_dir" as a directory, including parents if necessary.
66538 as_fn_mkdir_p ()
66539 {
66540 
66541   case $as_dir in #(
66542   -*) as_dir=./$as_dir;;
66543   esac
66544   test -d "$as_dir" || eval $as_mkdir_p || {
66545     as_dirs=
66546     while :; do
66547       case $as_dir in #(
66548       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66549       *) as_qdir=$as_dir;;
66550       esac
66551       as_dirs="'$as_qdir' $as_dirs"
66552       as_dir=`$as_dirname -- "$as_dir" ||
66553 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66554          X"$as_dir" : 'X\(//\)[^/]' \| \
66555          X"$as_dir" : 'X\(//\)$' \| \
66556          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66557 $as_echo X"$as_dir" |
66558     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66559             s//\1/
66560             q
66561           }
66562           /^X\(\/\/\)[^/].*/{
66563             s//\1/
66564             q
66565           }
66566           /^X\(\/\/\)$/{
66567             s//\1/
66568             q
66569           }
66570           /^X\(\/\).*/{
66571             s//\1/
66572             q
66573           }
66574           s/.*/./; q'`
66575       test -d "$as_dir" && break
66576     done
66577     test -z "$as_dirs" || eval "mkdir $as_dirs"
66578   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66579 
66580 
66581 } # as_fn_mkdir_p
66582 if mkdir -p . 2>/dev/null; then
66583   as_mkdir_p='mkdir -p "$as_dir"'
66584 else
66585   test -d ./-p && rmdir ./-p
66586   as_mkdir_p=false
66587 fi
66588 
66589 
66590 # as_fn_executable_p FILE
66591 # -----------------------
66592 # Test if FILE is an executable regular file.
66593 as_fn_executable_p ()
66594 {
66595   test -f "$1" && test -x "$1"
66596 } # as_fn_executable_p
66597 as_test_x='test -x'
66598 as_executable_p=as_fn_executable_p
66599 
66600 # Sed expression to map a string onto a valid CPP name.
66601 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66602 
66603 # Sed expression to map a string onto a valid variable name.
66604 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66605 
66606 
66607 exec 6>&1
66608 ## ----------------------------------- ##
66609 ## Main body of $CONFIG_STATUS script. ##
66610 ## ----------------------------------- ##
66611 _ASEOF
66612 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66613 
66614 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66615 # Save the log message, to keep $0 and so on meaningful, and to
66616 # report actual input values of CONFIG_FILES etc. instead of their
66617 # values after options handling.
66618 ac_log="
66619 This file was extended by OpenJDK $as_me jdk9, which was
66620 generated by GNU Autoconf 2.69.  Invocation command line was
66621 
66622   CONFIG_FILES    = $CONFIG_FILES
66623   CONFIG_HEADERS  = $CONFIG_HEADERS
66624   CONFIG_LINKS    = $CONFIG_LINKS
66625   CONFIG_COMMANDS = $CONFIG_COMMANDS
66626   $ $0 $@
66627 
66628 on `(hostname || uname -n) 2>/dev/null | sed 1q`
66629 "
66630 
66631 _ACEOF
66632 
66633 case $ac_config_files in *"
66634 "*) set x $ac_config_files; shift; ac_config_files=$*;;
66635 esac
66636 
66637 
66638 
66639 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66640 # Files that config.status was made for.
66641 config_files="$ac_config_files"
66642 
66643 _ACEOF
66644 
66645 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66646 ac_cs_usage="\
66647 \`$as_me' instantiates files and other configuration actions
66648 from templates according to the current configuration.  Unless the files
66649 and actions are specified as TAGs, all are instantiated by default.
66650 
66651 Usage: $0 [OPTION]... [TAG]...
66652 
66653   -h, --help       print this help, then exit
66654   -V, --version    print version number and configuration settings, then exit
66655       --config     print configuration, then exit
66656   -q, --quiet, --silent
66657                    do not print progress messages
66658   -d, --debug      don't remove temporary files
66659       --recheck    update $as_me by reconfiguring in the same conditions
66660       --file=FILE[:TEMPLATE]
66661                    instantiate the configuration file FILE
66662 
66663 Configuration files:
66664 $config_files
66665 
66666 Report bugs to <build-dev@openjdk.java.net>.
66667 OpenJDK home page: <http://openjdk.java.net>."
66668 
66669 _ACEOF
66670 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66671 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66672 ac_cs_version="\\
66673 OpenJDK config.status jdk9
66674 configured by $0, generated by GNU Autoconf 2.69,
66675   with options \\"\$ac_cs_config\\"
66676 
66677 Copyright (C) 2012 Free Software Foundation, Inc.
66678 This config.status script is free software; the Free Software Foundation
66679 gives unlimited permission to copy, distribute and modify it."
66680 
66681 ac_pwd='$ac_pwd'
66682 srcdir='$srcdir'
66683 AWK='$AWK'
66684 test -n "\$AWK" || AWK=awk
66685 _ACEOF
66686 
66687 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66688 # The default lists apply if the user does not specify any file.
66689 ac_need_defaults=:
66690 while test $# != 0
66691 do
66692   case $1 in
66693   --*=?*)
66694     ac_option=`expr "X$1" : 'X\([^=]*\)='`
66695     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66696     ac_shift=:
66697     ;;
66698   --*=)
66699     ac_option=`expr "X$1" : 'X\([^=]*\)='`
66700     ac_optarg=
66701     ac_shift=:
66702     ;;
66703   *)
66704     ac_option=$1
66705     ac_optarg=$2
66706     ac_shift=shift
66707     ;;
66708   esac
66709 
66710   case $ac_option in
66711   # Handling of the options.
66712   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66713     ac_cs_recheck=: ;;
66714   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66715     $as_echo "$ac_cs_version"; exit ;;
66716   --config | --confi | --conf | --con | --co | --c )
66717     $as_echo "$ac_cs_config"; exit ;;
66718   --debug | --debu | --deb | --de | --d | -d )
66719     debug=: ;;
66720   --file | --fil | --fi | --f )
66721     $ac_shift
66722     case $ac_optarg in
66723     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66724     '') as_fn_error $? "missing file argument" ;;
66725     esac
66726     as_fn_append CONFIG_FILES " '$ac_optarg'"
66727     ac_need_defaults=false;;
66728   --he | --h |  --help | --hel | -h )
66729     $as_echo "$ac_cs_usage"; exit ;;
66730   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66731   | -silent | --silent | --silen | --sile | --sil | --si | --s)
66732     ac_cs_silent=: ;;
66733 
66734   # This is an error.
66735   -*) as_fn_error $? "unrecognized option: \`$1'
66736 Try \`$0 --help' for more information." ;;
66737 
66738   *) as_fn_append ac_config_targets " $1"
66739      ac_need_defaults=false ;;
66740 
66741   esac
66742   shift
66743 done
66744 
66745 ac_configure_extra_args=
66746 
66747 if $ac_cs_silent; then
66748   exec 6>/dev/null
66749   ac_configure_extra_args="$ac_configure_extra_args --silent"
66750 fi
66751 
66752 _ACEOF
66753 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66754 if \$ac_cs_recheck; then
66755   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66756   shift
66757   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66758   CONFIG_SHELL='$SHELL'
66759   export CONFIG_SHELL
66760   exec "\$@"
66761 fi
66762 
66763 _ACEOF
66764 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66765 exec 5>>config.log
66766 {
66767   echo
66768   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66769 ## Running $as_me. ##
66770 _ASBOX
66771   $as_echo "$ac_log"
66772 } >&5
66773 
66774 _ACEOF
66775 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66776 _ACEOF
66777 
66778 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66779 
66780 # Handling of arguments.
66781 for ac_config_target in $ac_config_targets
66782 do
66783   case $ac_config_target in
66784     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66785     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66786     "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66787     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66788     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66789 
66790   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66791   esac
66792 done
66793 
66794 
66795 # If the user did not use the arguments to specify the items to instantiate,
66796 # then the envvar interface is used.  Set only those that are not.
66797 # We use the long form for the default assignment because of an extremely
66798 # bizarre bug on SunOS 4.1.3.
66799 if $ac_need_defaults; then
66800   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66801 fi
66802 
66803 # Have a temporary directory for convenience.  Make it in the build tree
66804 # simply because there is no reason against having it here, and in addition,
66805 # creating and moving files from /tmp can sometimes cause problems.
66806 # Hook for its removal unless debugging.
66807 # Note that there is a small window in which the directory will not be cleaned:
66808 # after its creation but before its name has been assigned to `$tmp'.
66809 $debug ||
66810 {
66811   tmp= ac_tmp=
66812   trap 'exit_status=$?
66813   : "${ac_tmp:=$tmp}"
66814   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66815 ' 0
66816   trap 'as_fn_exit 1' 1 2 13 15
66817 }
66818 # Create a (secure) tmp directory for tmp files.
66819 
66820 {
66821   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66822   test -d "$tmp"
66823 }  ||
66824 {
66825   tmp=./conf$$-$RANDOM
66826   (umask 077 && mkdir "$tmp")
66827 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66828 ac_tmp=$tmp
66829 
66830 # Set up the scripts for CONFIG_FILES section.
66831 # No need to generate them if there are no CONFIG_FILES.
66832 # This happens for instance with `./config.status config.h'.
66833 if test -n "$CONFIG_FILES"; then
66834 
66835 
66836 ac_cr=`echo X | tr X '\015'`
66837 # On cygwin, bash can eat \r inside `` if the user requested igncr.
66838 # But we know of no other shell where ac_cr would be empty at this
66839 # point, so we can use a bashism as a fallback.
66840 if test "x$ac_cr" = x; then
66841   eval ac_cr=\$\'\\r\'
66842 fi
66843 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66844 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66845   ac_cs_awk_cr='\\r'
66846 else
66847   ac_cs_awk_cr=$ac_cr
66848 fi
66849 
66850 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66851 _ACEOF
66852 
66853 
66854 {
66855   echo "cat >conf$$subs.awk <<_ACEOF" &&
66856   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66857   echo "_ACEOF"
66858 } >conf$$subs.sh ||
66859   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66860 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66861 ac_delim='%!_!# '
66862 for ac_last_try in false false false false false :; do
66863   . ./conf$$subs.sh ||
66864     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66865 
66866   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66867   if test $ac_delim_n = $ac_delim_num; then
66868     break
66869   elif $ac_last_try; then
66870     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66871   else
66872     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66873   fi
66874 done
66875 rm -f conf$$subs.sh
66876 
66877 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66878 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66879 _ACEOF
66880 sed -n '
66881 h
66882 s/^/S["/; s/!.*/"]=/
66883 p
66884 g
66885 s/^[^!]*!//
66886 :repl
66887 t repl
66888 s/'"$ac_delim"'$//
66889 t delim
66890 :nl
66891 h
66892 s/\(.\{148\}\)..*/\1/
66893 t more1
66894 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66895 p
66896 n
66897 b repl
66898 :more1
66899 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66900 p
66901 g
66902 s/.\{148\}//
66903 t nl
66904 :delim
66905 h
66906 s/\(.\{148\}\)..*/\1/
66907 t more2
66908 s/["\\]/\\&/g; s/^/"/; s/$/"/
66909 p
66910 b
66911 :more2
66912 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66913 p
66914 g
66915 s/.\{148\}//
66916 t delim
66917 ' <conf$$subs.awk | sed '
66918 /^[^""]/{
66919   N
66920   s/\n//
66921 }
66922 ' >>$CONFIG_STATUS || ac_write_fail=1
66923 rm -f conf$$subs.awk
66924 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66925 _ACAWK
66926 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66927   for (key in S) S_is_set[key] = 1
66928   FS = ""
66929 
66930 }
66931 {
66932   line = $ 0
66933   nfields = split(line, field, "@")
66934   substed = 0
66935   len = length(field[1])
66936   for (i = 2; i < nfields; i++) {
66937     key = field[i]
66938     keylen = length(key)
66939     if (S_is_set[key]) {
66940       value = S[key]
66941       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66942       len += length(value) + length(field[++i])
66943       substed = 1
66944     } else
66945       len += 1 + keylen
66946   }
66947 
66948   print line
66949 }
66950 
66951 _ACAWK
66952 _ACEOF
66953 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66954 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66955   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66956 else
66957   cat
66958 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66959   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66960 _ACEOF
66961 
66962 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66963 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66964 # trailing colons and then remove the whole line if VPATH becomes empty
66965 # (actually we leave an empty line to preserve line numbers).
66966 if test "x$srcdir" = x.; then
66967   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
66968 h
66969 s///
66970 s/^/:/
66971 s/[      ]*$/:/
66972 s/:\$(srcdir):/:/g
66973 s/:\${srcdir}:/:/g
66974 s/:@srcdir@:/:/g
66975 s/^:*//
66976 s/:*$//
66977 x
66978 s/\(=[   ]*\).*/\1/
66979 G
66980 s/\n//
66981 s/^[^=]*=[       ]*$//
66982 }'
66983 fi
66984 
66985 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66986 fi # test -n "$CONFIG_FILES"
66987 
66988 
66989 eval set X "  :F $CONFIG_FILES      "
66990 shift
66991 for ac_tag
66992 do
66993   case $ac_tag in
66994   :[FHLC]) ac_mode=$ac_tag; continue;;
66995   esac
66996   case $ac_mode$ac_tag in
66997   :[FHL]*:*);;
66998   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66999   :[FH]-) ac_tag=-:-;;
67000   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67001   esac
67002   ac_save_IFS=$IFS
67003   IFS=:
67004   set x $ac_tag
67005   IFS=$ac_save_IFS
67006   shift
67007   ac_file=$1
67008   shift
67009 
67010   case $ac_mode in
67011   :L) ac_source=$1;;
67012   :[FH])
67013     ac_file_inputs=
67014     for ac_f
67015     do
67016       case $ac_f in
67017       -) ac_f="$ac_tmp/stdin";;
67018       *) # Look for the file first in the build tree, then in the source tree
67019          # (if the path is not absolute).  The absolute path cannot be DOS-style,
67020          # because $ac_f cannot contain `:'.
67021          test -f "$ac_f" ||
67022            case $ac_f in
67023            [\\/$]*) false;;
67024            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67025            esac ||
67026            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67027       esac
67028       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67029       as_fn_append ac_file_inputs " '$ac_f'"
67030     done
67031 
67032     # Let's still pretend it is `configure' which instantiates (i.e., don't
67033     # use $as_me), people would be surprised to read:
67034     #    /* config.h.  Generated by config.status.  */
67035     configure_input='Generated from '`
67036           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67037         `' by configure.'
67038     if test x"$ac_file" != x-; then
67039       configure_input="$ac_file.  $configure_input"
67040       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67041 $as_echo "$as_me: creating $ac_file" >&6;}
67042     fi
67043     # Neutralize special characters interpreted by sed in replacement strings.
67044     case $configure_input in #(
67045     *\&* | *\|* | *\\* )
67046        ac_sed_conf_input=`$as_echo "$configure_input" |
67047        sed 's/[\\\\&|]/\\\\&/g'`;; #(
67048     *) ac_sed_conf_input=$configure_input;;
67049     esac
67050 
67051     case $ac_tag in
67052     *:-:* | *:-) cat >"$ac_tmp/stdin" \
67053       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67054     esac
67055     ;;
67056   esac
67057 
67058   ac_dir=`$as_dirname -- "$ac_file" ||
67059 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67060          X"$ac_file" : 'X\(//\)[^/]' \| \
67061          X"$ac_file" : 'X\(//\)$' \| \
67062          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67063 $as_echo X"$ac_file" |
67064     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67065             s//\1/
67066             q
67067           }
67068           /^X\(\/\/\)[^/].*/{
67069             s//\1/
67070             q
67071           }
67072           /^X\(\/\/\)$/{
67073             s//\1/
67074             q
67075           }
67076           /^X\(\/\).*/{
67077             s//\1/
67078             q
67079           }
67080           s/.*/./; q'`
67081   as_dir="$ac_dir"; as_fn_mkdir_p
67082   ac_builddir=.
67083 
67084 case "$ac_dir" in
67085 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67086 *)
67087   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67088   # A ".." for each directory in $ac_dir_suffix.
67089   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67090   case $ac_top_builddir_sub in
67091   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67092   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67093   esac ;;
67094 esac
67095 ac_abs_top_builddir=$ac_pwd
67096 ac_abs_builddir=$ac_pwd$ac_dir_suffix
67097 # for backward compatibility:
67098 ac_top_builddir=$ac_top_build_prefix
67099 
67100 case $srcdir in
67101   .)  # We are building in place.
67102     ac_srcdir=.
67103     ac_top_srcdir=$ac_top_builddir_sub
67104     ac_abs_top_srcdir=$ac_pwd ;;
67105   [\\/]* | ?:[\\/]* )  # Absolute name.
67106     ac_srcdir=$srcdir$ac_dir_suffix;
67107     ac_top_srcdir=$srcdir
67108     ac_abs_top_srcdir=$srcdir ;;
67109   *) # Relative name.
67110     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67111     ac_top_srcdir=$ac_top_build_prefix$srcdir
67112     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67113 esac
67114 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67115 
67116 
67117   case $ac_mode in
67118   :F)
67119   #
67120   # CONFIG_FILE
67121   #
67122 
67123 _ACEOF
67124 
67125 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67126 # If the template does not know about datarootdir, expand it.
67127 # FIXME: This hack should be removed a few years after 2.60.
67128 ac_datarootdir_hack=; ac_datarootdir_seen=
67129 ac_sed_dataroot='
67130 /datarootdir/ {
67131   p
67132   q
67133 }
67134 /@datadir@/p
67135 /@docdir@/p
67136 /@infodir@/p
67137 /@localedir@/p
67138 /@mandir@/p'
67139 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67140 *datarootdir*) ac_datarootdir_seen=yes;;
67141 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67142   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67143 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67144 _ACEOF
67145 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67146   ac_datarootdir_hack='
67147   s&@datadir@&$datadir&g
67148   s&@docdir@&$docdir&g
67149   s&@infodir@&$infodir&g
67150   s&@localedir@&$localedir&g
67151   s&@mandir@&$mandir&g
67152   s&\\\${datarootdir}&$datarootdir&g' ;;
67153 esac
67154 _ACEOF
67155 
67156 # Neutralize VPATH when `$srcdir' = `.'.
67157 # Shell code in configure.ac might set extrasub.
67158 # FIXME: do we really want to maintain this feature?
67159 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67160 ac_sed_extra="$ac_vpsub
67161 $extrasub
67162 _ACEOF
67163 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67164 :t
67165 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67166 s|@configure_input@|$ac_sed_conf_input|;t t
67167 s&@top_builddir@&$ac_top_builddir_sub&;t t
67168 s&@top_build_prefix@&$ac_top_build_prefix&;t t
67169 s&@srcdir@&$ac_srcdir&;t t
67170 s&@abs_srcdir@&$ac_abs_srcdir&;t t
67171 s&@top_srcdir@&$ac_top_srcdir&;t t
67172 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67173 s&@builddir@&$ac_builddir&;t t
67174 s&@abs_builddir@&$ac_abs_builddir&;t t
67175 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67176 $ac_datarootdir_hack
67177 "
67178 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67179   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67180 
67181 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67182   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67183   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
67184       "$ac_tmp/out"`; test -z "$ac_out"; } &&
67185   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67186 which seems to be undefined.  Please make sure it is defined" >&5
67187 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67188 which seems to be undefined.  Please make sure it is defined" >&2;}
67189 
67190   rm -f "$ac_tmp/stdin"
67191   case $ac_file in
67192   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67193   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67194   esac \
67195   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67196  ;;
67197 
67198 
67199 
67200   esac
67201 
67202 done # for ac_tag
67203 
67204 
67205 as_fn_exit 0
67206 _ACEOF
67207 ac_clean_files=$ac_clean_files_save
67208 
67209 test $ac_write_fail = 0 ||
67210   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67211 
67212 
67213 # configure is writing to config.log, and then calls config.status.
67214 # config.status does its own redirection, appending to config.log.
67215 # Unfortunately, on DOS this fails, as config.log is still kept open
67216 # by configure, so config.status won't be able to write to it; its
67217 # output is simply discarded.  So we exec the FD to /dev/null,
67218 # effectively closing config.log, so it can be properly (re)opened and
67219 # appended to by config.status.  When coming back to configure, we
67220 # need to make the FD available again.
67221 if test "$no_create" != yes; then
67222   ac_cs_success=:
67223   ac_config_status_args=
67224   test "$silent" = yes &&
67225     ac_config_status_args="$ac_config_status_args --quiet"
67226   exec 5>/dev/null
67227   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67228   exec 5>>config.log
67229   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67230   # would make configure fail if this is the last instruction.
67231   $ac_cs_success || as_fn_exit 1
67232 fi
67233 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67234   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67235 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67236 fi
67237 
67238 
67239 # After AC_OUTPUT, we need to do final work
67240 
67241 
67242   # Try to move config.log (generated by autoconf) to the configure-support directory.
67243   if test -e ./config.log; then
67244     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67245   fi
67246 
67247   # Rotate our log file (configure.log)
67248   if test -e "$OUTPUT_ROOT/configure.log.old"; then
67249     $RM -f "$OUTPUT_ROOT/configure.log.old"
67250   fi
67251   if test -e "$OUTPUT_ROOT/configure.log"; then
67252     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67253   fi
67254 
67255   # Move configure.log from current directory to the build output root
67256   if test -e ./configure.log; then
67257     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67258   fi
67259 
67260   # Make the compare script executable
67261   $CHMOD +x $OUTPUT_ROOT/compare.sh
67262 
67263 
67264 # Finally output some useful information to the user
67265 
67266   # Finally output some useful information to the user
67267 
67268   printf "\n"
67269   printf "====================================================\n"
67270   if test "x$no_create" != "xyes"; then
67271     if test "x$IS_RECONFIGURE" != "xyes"; then
67272       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67273     else
67274       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67275     fi
67276   else
67277     if test "x$IS_RECONFIGURE" != "xyes"; then
67278       printf "A configuration has been successfully checked but not created\n"
67279     else
67280       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67281     fi
67282   fi
67283   if test "x$CONFIGURE_COMMAND_LINE" != x; then
67284     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67285   else
67286     printf "using default settings.\n"
67287   fi
67288 
67289   printf "\n"
67290   printf "Configuration summary:\n"
67291   printf "* Debug level:    $DEBUG_LEVEL\n"
67292   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67293   printf "* JDK variant:    $JDK_VARIANT\n"
67294   printf "* JVM variants:   $JVM_VARIANTS\n"
67295   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67296   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67297 
67298   printf "\n"
67299   printf "Tools summary:\n"
67300   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67301     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67302   fi
67303   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67304   if test "x$TOOLCHAIN_VERSION" != "x"; then
67305     print_version=" $TOOLCHAIN_VERSION"
67306   fi
67307   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67308   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67309   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67310 
67311   printf "\n"
67312   printf "Build performance summary:\n"
67313   printf "* Cores to use:   $JOBS\n"
67314   printf "* Memory limit:   $MEMORY_SIZE MB\n"
67315   if test "x$CCACHE_STATUS" != "x"; then
67316     printf "* ccache status:  $CCACHE_STATUS\n"
67317   fi
67318   printf "\n"
67319 
67320   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67321     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67322     printf "will result in longer build times.\n"
67323     printf "\n"
67324   fi
67325 
67326   if test "x$FOUND_ALT_VARIABLES" != "x"; then
67327     printf "WARNING: You have old-style ALT_ environment variables set.\n"
67328     printf "These are not respected, and will be ignored. It is recommended\n"
67329     printf "that you clean your environment. The following variables are set:\n"
67330     printf "$FOUND_ALT_VARIABLES\n"
67331     printf "\n"
67332   fi
67333 
67334   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67335     printf "WARNING: Your build output directory is not on a local disk.\n"
67336     printf "This will severely degrade build performance!\n"
67337     printf "It is recommended that you create an output directory on a local disk,\n"
67338     printf "and run the configure script again from that directory.\n"
67339     printf "\n"
67340   fi
67341 
67342   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67343     printf "WARNING: The result of this configuration has overridden an older\n"
67344     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67345     printf "proper build. Failure to do so might result in strange build problems.\n"
67346     printf "\n"
67347   fi
67348 
67349   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67350     printf "WARNING: The result of this configuration was not saved.\n"
67351     printf "You should run without '--no-create | -n' to create the configuration.\n"
67352     printf "\n"
67353   fi
67354 
67355 
67356 
67357   # Locate config.log.
67358   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67359     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67360   elif test -e "./config.log"; then
67361     CONFIG_LOG_PATH="."
67362   fi
67363 
67364   if test -e "$CONFIG_LOG_PATH/config.log"; then
67365     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67366     if test $? -eq 0; then
67367       printf "The following warnings were produced. Repeated here for convenience:\n"
67368       # We must quote sed expression (using []) to stop m4 from eating the [].
67369       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67370       printf "\n"
67371     fi
67372   fi
67373