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 STLPORT_LIB
 658 LIBZIP_CAN_USE_MMAP
 659 LIBDL
 660 LIBM
 661 USE_EXTERNAL_LCMS
 662 LCMS_LIBS
 663 LCMS_CFLAGS
 664 USE_EXTERNAL_LIBZ
 665 USE_EXTERNAL_LIBPNG
 666 PNG_LIBS
 667 PNG_CFLAGS
 668 USE_EXTERNAL_LIBGIF
 669 USE_EXTERNAL_LIBJPEG
 670 LLVM_LIBS
 671 LLVM_LDFLAGS
 672 LLVM_CFLAGS
 673 LLVM_CONFIG
 674 LIBFFI_BUNDLE_LIB_PATH
 675 LIBFFI_LIBS
 676 LIBFFI_CFLAGS
 677 ALSA_LIBS
 678 ALSA_CFLAGS
 679 FREETYPE_BUNDLE_LIB_PATH
 680 FREETYPE_LIBS
 681 FREETYPE_CFLAGS
 682 CUPS_CFLAGS
 683 X_EXTRA_LIBS
 684 X_LIBS
 685 X_PRE_LIBS
 686 X_CFLAGS
 687 XMKMF
 688 MSVCP_DLL
 689 MSVCR_DLL
 690 LIBCXX
 691 STATIC_CXX_SETTING
 692 FIXPATH_DETACH_FLAG
 693 FIXPATH
 694 BUILD_GTEST
 695 VALID_JVM_FEATURES
 696 JVM_FEATURES_custom
 697 JVM_FEATURES_zeroshark
 698 JVM_FEATURES_zero
 699 JVM_FEATURES_minimal
 700 JVM_FEATURES_core
 701 JVM_FEATURES_client
 702 JVM_FEATURES_server
 703 INCLUDE_DTRACE
 704 GCOV_ENABLED
 705 STRIP_POLICY
 706 DEBUG_BINARIES
 707 ZIP_EXTERNAL_DEBUG_SYMBOLS
 708 COPY_DEBUG_SYMBOLS
 709 COMPILE_WITH_DEBUG_SYMBOLS
 710 CFLAGS_WARNINGS_ARE_ERRORS
 711 BUILD_CC_DISABLE_WARNING_PREFIX
 712 DISABLE_WARNING_PREFIX
 713 HOTSPOT_SET_WARNINGS_AS_ERRORS
 714 WARNINGS_AS_ERRORS
 715 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 716 ZERO_ARCHFLAG
 717 LDFLAGS_TESTEXE
 718 LDFLAGS_TESTLIB
 719 CXXFLAGS_TESTEXE
 720 CXXFLAGS_TESTLIB
 721 CFLAGS_TESTEXE
 722 CFLAGS_TESTLIB
 723 OPENJDK_BUILD_JVM_LIBS
 724 OPENJDK_BUILD_JVM_ASFLAGS
 725 OPENJDK_BUILD_JVM_LDFLAGS
 726 OPENJDK_BUILD_JVM_CFLAGS
 727 OPENJDK_BUILD_LDFLAGS_HASH_STYLE
 728 OPENJDK_BUILD_LDFLAGS_CXX_JDK
 729 OPENJDK_BUILD_JDKEXE_LIBS
 730 OPENJDK_BUILD_JDKLIB_LIBS
 731 OPENJDK_BUILD_LDFLAGS_JDKEXE
 732 OPENJDK_BUILD_LDFLAGS_JDKLIB
 733 OPENJDK_BUILD_CXXFLAGS_JDKEXE
 734 OPENJDK_BUILD_CXXFLAGS_JDKLIB
 735 OPENJDK_BUILD_CFLAGS_JDKEXE
 736 OPENJDK_BUILD_CFLAGS_JDKLIB
 737 OPENJDK_BUILD_CXXSTD_CXXFLAG
 738 JVM_LIBS
 739 JVM_ASFLAGS
 740 JVM_LDFLAGS
 741 JVM_CFLAGS
 742 LDFLAGS_HASH_STYLE
 743 LDFLAGS_CXX_JDK
 744 JDKEXE_LIBS
 745 JDKLIB_LIBS
 746 LDFLAGS_JDKEXE
 747 LDFLAGS_JDKLIB
 748 CXXFLAGS_JDKEXE
 749 CXXFLAGS_JDKLIB
 750 CFLAGS_JDKEXE
 751 CFLAGS_JDKLIB
 752 MACOSX_VERSION_MIN
 753 CXXSTD_CXXFLAG
 754 CXX_O_FLAG_SIZE
 755 CXX_O_FLAG_NONE
 756 CXX_O_FLAG_DEBUG
 757 CXX_O_FLAG_NORM
 758 CXX_O_FLAG_HI
 759 CXX_O_FLAG_HIGHEST
 760 CXX_O_FLAG_HIGHEST_JVM
 761 C_O_FLAG_SIZE
 762 C_O_FLAG_NONE
 763 C_O_FLAG_DEBUG
 764 C_O_FLAG_NORM
 765 C_O_FLAG_HI
 766 C_O_FLAG_HIGHEST
 767 C_O_FLAG_HIGHEST_JVM
 768 JVM_CFLAGS_SYMBOLS
 769 CXXFLAGS_DEBUG_SYMBOLS
 770 CFLAGS_DEBUG_SYMBOLS
 771 CXX_FLAG_DEPS
 772 C_FLAG_DEPS
 773 SHARED_LIBRARY_FLAGS
 774 SET_SHARED_LIBRARY_MAPFILE
 775 SET_SHARED_LIBRARY_NAME
 776 BUILD_SET_SHARED_LIBRARY_ORIGIN
 777 BUILD_SET_EXECUTABLE_ORIGIN
 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 USE_CLANG
 799 HOTSPOT_LD
 800 HOTSPOT_CXX
 801 HOTSPOT_RC
 802 HOTSPOT_MT
 803 BUILD_AS
 804 BUILD_LDCXX
 805 BUILD_LD
 806 BUILD_STRIP
 807 BUILD_OBJCOPY
 808 BUILD_AR
 809 BUILD_NM
 810 BUILD_CXX
 811 BUILD_CC
 812 BUILD_SYSROOT_LDFLAGS
 813 BUILD_SYSROOT_CFLAGS
 814 ac_ct_OBJDUMP
 815 OBJDUMP
 816 ac_ct_OBJCOPY
 817 OBJCOPY
 818 ac_ct_NM
 819 ac_ct_STRIP
 820 GNM
 821 NM
 822 STRIP
 823 MSBUILD
 824 DUMPBIN
 825 RC
 826 MT
 827 LIPO
 828 ac_ct_AR
 829 AR
 830 AS
 831 LDCXX
 832 LD
 833 CXXCPP
 834 CPP
 835 CXX_VERSION_NUMBER
 836 CC_VERSION_NUMBER
 837 ac_ct_CXX
 838 CXXFLAGS
 839 CXX
 840 TOOLCHAIN_PATH_CXX
 841 POTENTIAL_CXX
 842 OBJEXT
 843 EXEEXT
 844 ac_ct_CC
 845 CPPFLAGS
 846 LDFLAGS
 847 CFLAGS
 848 CC
 849 TOOLCHAIN_PATH_CC
 850 POTENTIAL_CC
 851 TOOLCHAIN_VERSION
 852 VS_LIB
 853 VS_INCLUDE
 854 VS_PATH
 855 CYGWIN_LINK
 856 SYSROOT_LDFLAGS
 857 SYSROOT_CFLAGS
 858 EXTRA_LDFLAGS
 859 EXTRA_CXXFLAGS
 860 EXTRA_CFLAGS
 861 LEGACY_EXTRA_LDFLAGS
 862 LEGACY_EXTRA_CXXFLAGS
 863 LEGACY_EXTRA_CFLAGS
 864 EXE_SUFFIX
 865 OBJ_SUFFIX
 866 STATIC_LIBRARY
 867 BUILD_SHARED_LIBRARY
 868 BUILD_SHARED_LIBRARY_SUFFIX
 869 SHARED_LIBRARY
 870 STATIC_LIBRARY_SUFFIX
 871 SHARED_LIBRARY_SUFFIX
 872 LIBRARY_PREFIX
 873 TOOLCHAIN_NAME
 874 TOOLCHAIN_TYPE
 875 STATIC_BUILD
 876 IMPORT_MODULES_MAKE
 877 IMPORT_MODULES_SRC
 878 IMPORT_MODULES_CONF
 879 IMPORT_MODULES_LIBS
 880 IMPORT_MODULES_CMDS
 881 IMPORT_MODULES_CLASSES
 882 BUILD_HOTSPOT
 883 HOTSPOT_DIST
 884 BUILD_OUTPUT
 885 JDK_TOPDIR
 886 NASHORN_TOPDIR
 887 HOTSPOT_TOPDIR
 888 JAXWS_TOPDIR
 889 JAXP_TOPDIR
 890 CORBA_TOPDIR
 891 LANGTOOLS_TOPDIR
 892 EXTERNAL_BUILDJDK
 893 BUILD_JDK
 894 CREATE_BUILDJDK
 895 JLINK
 896 JMOD
 897 BOOT_JDK_BITS
 898 JAVAC_FLAGS
 899 BOOT_JDK_MODULAR
 900 BOOT_JDK_SOURCETARGET
 901 JARSIGNER
 902 JAR
 903 JAVAH
 904 JAVAC
 905 JAVA
 906 BOOT_JDK
 907 JAVA_CHECK
 908 JAVAC_CHECK
 909 VERSION_IS_GA
 910 VERSION_SHORT
 911 VERSION_STRING
 912 VERSION_NUMBER_FOUR_POSITIONS
 913 VERSION_NUMBER
 914 VERSION_OPT
 915 VERSION_BUILD
 916 VERSION_PRE
 917 VERSION_PATCH
 918 VERSION_SECURITY
 919 VERSION_MINOR
 920 VERSION_MAJOR
 921 MACOSX_BUNDLE_ID_BASE
 922 MACOSX_BUNDLE_NAME_BASE
 923 HOTSPOT_VM_DISTRO
 924 COMPANY_NAME
 925 JDK_RC_PLATFORM_NAME
 926 PRODUCT_SUFFIX
 927 PRODUCT_NAME
 928 LAUNCHER_NAME
 929 JLINK_KEEP_PACKAGED_MODULES
 930 COPYRIGHT_YEAR
 931 COMPRESS_JARS
 932 INCLUDE_SA
 933 UNLIMITED_CRYPTO
 934 CACERTS_FILE
 935 BUILD_HEADLESS
 936 SUPPORT_HEADFUL
 937 SUPPORT_HEADLESS
 938 DEFAULT_MAKE_TARGET
 939 OS_VERSION_MICRO
 940 OS_VERSION_MINOR
 941 OS_VERSION_MAJOR
 942 PKG_CONFIG
 943 BASH_ARGS
 944 SETFILE
 945 CODESIGN
 946 XATTR
 947 DSYMUTIL
 948 IS_GNU_TIME
 949 PATCH
 950 DTRACE
 951 TIME
 952 STAT
 953 HG
 954 READELF
 955 OTOOL
 956 LDD
 957 ZIP
 958 UNZIP
 959 TAR_SUPPORTS_TRANSFORM
 960 TAR_INCLUDE_PARAM
 961 TAR_CREATE_EXTRA_PARAM
 962 TAR_TYPE
 963 FIND_DELETE
 964 OUTPUT_SYNC
 965 OUTPUT_SYNC_SUPPORTED
 966 CHECK_TOOLSDIR_MAKE
 967 CHECK_TOOLSDIR_GMAKE
 968 CHECK_MAKE
 969 CHECK_GMAKE
 970 MAKE
 971 PKGHANDLER
 972 CONFIGURESUPPORT_OUTPUTDIR
 973 OUTPUT_ROOT
 974 CONF_NAME
 975 SPEC
 976 SDKROOT
 977 XCODEBUILD
 978 VALID_JVM_VARIANTS
 979 JVM_VARIANTS
 980 DEBUG_LEVEL
 981 HOTSPOT_DEBUG_LEVEL
 982 JDK_VARIANT
 983 USERNAME
 984 CANONICAL_TOPDIR
 985 ORIGINAL_TOPDIR
 986 TOPDIR
 987 PATH_SEP
 988 ZERO_ARCHDEF
 989 HOTSPOT_BUILD_CPU_DEFINE
 990 HOTSPOT_BUILD_CPU_ARCH
 991 HOTSPOT_BUILD_CPU
 992 HOTSPOT_BUILD_OS_TYPE
 993 HOTSPOT_BUILD_OS
 994 OPENJDK_BUILD_BUNDLE_PLATFORM
 995 OPENJDK_BUILD_CPU_BUNDLE
 996 OPENJDK_BUILD_OS_BUNDLE
 997 OPENJDK_BUILD_OS_EXPORT_DIR
 998 OPENJDK_BUILD_CPU_JLI_CFLAGS
 999 OPENJDK_BUILD_CPU_OSARCH
1000 OPENJDK_BUILD_CPU_ISADIR
1001 OPENJDK_BUILD_CPU_LIBDIR
1002 OPENJDK_BUILD_CPU_LEGACY_LIB
1003 OPENJDK_BUILD_CPU_LEGACY
1004 HOTSPOT_TARGET_CPU_DEFINE
1005 HOTSPOT_TARGET_CPU_ARCH
1006 HOTSPOT_TARGET_CPU
1007 HOTSPOT_TARGET_OS_TYPE
1008 HOTSPOT_TARGET_OS
1009 DEFINE_CROSS_COMPILE_ARCH
1010 LP64
1011 OPENJDK_TARGET_BUNDLE_PLATFORM
1012 OPENJDK_TARGET_CPU_BUNDLE
1013 OPENJDK_TARGET_OS_BUNDLE
1014 OPENJDK_TARGET_OS_EXPORT_DIR
1015 OPENJDK_TARGET_CPU_JLI_CFLAGS
1016 OPENJDK_TARGET_CPU_OSARCH
1017 OPENJDK_TARGET_CPU_ISADIR
1018 OPENJDK_TARGET_CPU_LIBDIR
1019 OPENJDK_TARGET_CPU_LEGACY_LIB
1020 OPENJDK_TARGET_CPU_LEGACY
1021 REQUIRED_OS_VERSION
1022 REQUIRED_OS_NAME
1023 COMPILE_TYPE
1024 OPENJDK_TARGET_CPU_ENDIAN
1025 OPENJDK_TARGET_CPU_BITS
1026 OPENJDK_TARGET_CPU_ARCH
1027 OPENJDK_TARGET_CPU
1028 OPENJDK_TARGET_OS_ENV
1029 OPENJDK_TARGET_OS_TYPE
1030 OPENJDK_TARGET_OS
1031 OPENJDK_BUILD_CPU_ENDIAN
1032 OPENJDK_BUILD_CPU_BITS
1033 OPENJDK_BUILD_CPU_ARCH
1034 OPENJDK_BUILD_CPU
1035 OPENJDK_BUILD_OS_ENV
1036 OPENJDK_BUILD_OS_TYPE
1037 OPENJDK_BUILD_OS
1038 OPENJDK_BUILD_AUTOCONF_NAME
1039 OPENJDK_TARGET_AUTOCONF_NAME
1040 target_os
1041 target_vendor
1042 target_cpu
1043 target
1044 host_os
1045 host_vendor
1046 host_cpu
1047 host
1048 build_os
1049 build_vendor
1050 build_cpu
1051 build
1052 NICE
1053 CPIO
1054 DF
1055 READLINK
1056 CYGPATH
1057 SED
1058 FGREP
1059 EGREP
1060 GREP
1061 AWK
1062 XARGS
1063 WHICH
1064 WC
1065 UNIQ
1066 UNAME
1067 TR
1068 TOUCH
1069 TEE
1070 TAR
1071 TAIL
1072 SORT
1073 SH
1074 RMDIR
1075 RM
1076 PRINTF
1077 NAWK
1078 MV
1079 MKTEMP
1080 MKDIR
1081 LS
1082 LN
1083 GZIP
1084 GUNZIP
1085 HEAD
1086 FIND
1087 FILE
1088 EXPR
1089 ECHO
1090 DIRNAME
1091 DIFF
1092 DATE
1093 CUT
1094 CP
1095 COMM
1096 CMP
1097 CHMOD
1098 CAT
1099 BASH
1100 BASENAME
1101 DATE_WHEN_CONFIGURED
1102 ORIGINAL_PATH
1103 CONFIGURE_COMMAND_LINE
1104 target_alias
1105 host_alias
1106 build_alias
1107 LIBS
1108 ECHO_T
1109 ECHO_N
1110 ECHO_C
1111 DEFS
1112 mandir
1113 localedir
1114 libdir
1115 psdir
1116 pdfdir
1117 dvidir
1118 htmldir
1119 infodir
1120 docdir
1121 oldincludedir
1122 includedir
1123 localstatedir
1124 sharedstatedir
1125 sysconfdir
1126 datadir
1127 datarootdir
1128 libexecdir
1129 sbindir
1130 bindir
1131 program_transform_name
1132 prefix
1133 exec_prefix
1134 PACKAGE_URL
1135 PACKAGE_BUGREPORT
1136 PACKAGE_STRING
1137 PACKAGE_VERSION
1138 PACKAGE_TARNAME
1139 PACKAGE_NAME
1140 PATH_SEPARATOR
1141 SHELL'
1142 ac_subst_files=''
1143 ac_user_opts='
1144 enable_option_checking
1145 with_target_bits
1146 enable_openjdk_only
1147 with_custom_make_dir
1148 with_jdk_variant
1149 enable_debug
1150 with_debug_level
1151 with_jvm_variants
1152 with_devkit
1153 with_sys_root
1154 with_sysroot
1155 with_tools_dir
1156 with_toolchain_path
1157 with_extra_path
1158 with_sdk_name
1159 with_conf_name
1160 with_output_sync
1161 with_default_make_target
1162 enable_headful
1163 with_cacerts_file
1164 enable_unlimited_crypto
1165 with_copyright_year
1166 enable_keep_packaged_modules
1167 with_milestone
1168 with_update_version
1169 with_user_release_suffix
1170 with_build_number
1171 with_version_string
1172 with_version_pre
1173 with_version_opt
1174 with_version_build
1175 with_version_major
1176 with_version_minor
1177 with_version_security
1178 with_version_patch
1179 with_boot_jdk
1180 with_build_jdk
1181 with_add_source_root
1182 with_override_source_root
1183 with_adds_and_overrides
1184 with_override_langtools
1185 with_override_corba
1186 with_override_jaxp
1187 with_override_jaxws
1188 with_override_hotspot
1189 with_override_nashorn
1190 with_override_jdk
1191 with_import_hotspot
1192 with_import_modules
1193 enable_static_build
1194 with_toolchain_type
1195 with_extra_cflags
1196 with_extra_cxxflags
1197 with_extra_ldflags
1198 with_toolchain_version
1199 with_build_devkit
1200 with_jtreg
1201 enable_warnings_as_errors
1202 with_native_debug_symbols
1203 enable_debug_symbols
1204 enable_zip_debug_info
1205 enable_native_coverage
1206 enable_dtrace
1207 with_jvm_features
1208 with_jvm_interpreter
1209 enable_hotspot_gtest
1210 with_stdc__lib
1211 with_msvcr_dll
1212 with_msvcp_dll
1213 with_x
1214 with_cups
1215 with_cups_include
1216 with_freetype
1217 with_freetype_include
1218 with_freetype_lib
1219 with_freetype_src
1220 enable_freetype_bundling
1221 with_alsa
1222 with_alsa_include
1223 with_alsa_lib
1224 with_libffi
1225 with_libffi_include
1226 with_libffi_lib
1227 enable_libffi_bundling
1228 with_libjpeg
1229 with_giflib
1230 with_libpng
1231 with_zlib
1232 with_lcms
1233 with_dxsdk
1234 with_dxsdk_lib
1235 with_dxsdk_include
1236 enable_jtreg_failure_handler
1237 enable_generate_classlist
1238 with_num_cores
1239 with_memory_size
1240 with_jobs
1241 with_test_jobs
1242 with_boot_jdk_jvmargs
1243 with_sjavac_server_java
1244 enable_sjavac
1245 enable_javac_server
1246 enable_icecc
1247 enable_precompiled_headers
1248 enable_ccache
1249 with_ccache_dir
1250 '
1251       ac_precious_vars='build_alias
1252 host_alias
1253 target_alias
1254 BASENAME
1255 BASH
1256 CAT
1257 CHMOD
1258 CMP
1259 COMM
1260 CP
1261 CUT
1262 DATE
1263 DIFF
1264 DIRNAME
1265 ECHO
1266 EXPR
1267 FILE
1268 FIND
1269 HEAD
1270 GUNZIP
1271 GZIP
1272 LN
1273 LS
1274 MKDIR
1275 MKTEMP
1276 MV
1277 NAWK
1278 PRINTF
1279 RM
1280 RMDIR
1281 SH
1282 SORT
1283 TAIL
1284 TAR
1285 TEE
1286 TOUCH
1287 TR
1288 UNAME
1289 UNIQ
1290 WC
1291 WHICH
1292 XARGS
1293 AWK
1294 GREP
1295 EGREP
1296 FGREP
1297 SED
1298 CYGPATH
1299 READLINK
1300 DF
1301 CPIO
1302 NICE
1303 MAKE
1304 UNZIP
1305 ZIP
1306 LDD
1307 OTOOL
1308 READELF
1309 HG
1310 STAT
1311 TIME
1312 DTRACE
1313 PATCH
1314 DSYMUTIL
1315 XATTR
1316 CODESIGN
1317 SETFILE
1318 PKG_CONFIG
1319 JAVA
1320 JAVAC
1321 JAVAH
1322 JAR
1323 JARSIGNER
1324 CC
1325 CFLAGS
1326 LDFLAGS
1327 LIBS
1328 CPPFLAGS
1329 CXX
1330 CXXFLAGS
1331 CCC
1332 CPP
1333 CXXCPP
1334 AS
1335 AR
1336 LIPO
1337 STRIP
1338 NM
1339 GNM
1340 OBJCOPY
1341 OBJDUMP
1342 BUILD_CC
1343 BUILD_CXX
1344 BUILD_NM
1345 BUILD_AR
1346 BUILD_OBJCOPY
1347 BUILD_STRIP
1348 JTREGEXE
1349 XMKMF
1350 FREETYPE_CFLAGS
1351 FREETYPE_LIBS
1352 ALSA_CFLAGS
1353 ALSA_LIBS
1354 LIBFFI_CFLAGS
1355 LIBFFI_LIBS
1356 PNG_CFLAGS
1357 PNG_LIBS
1358 LCMS_CFLAGS
1359 LCMS_LIBS
1360 ICECC_CMD
1361 ICECC_CREATE_ENV
1362 ICECC_WRAPPER
1363 CCACHE'
1364 
1365 
1366 # Initialize some variables set by options.
1367 ac_init_help=
1368 ac_init_version=false
1369 ac_unrecognized_opts=
1370 ac_unrecognized_sep=
1371 # The variables have the same names as the options, with
1372 # dashes changed to underlines.
1373 cache_file=/dev/null
1374 exec_prefix=NONE
1375 no_create=
1376 no_recursion=
1377 prefix=NONE
1378 program_prefix=NONE
1379 program_suffix=NONE
1380 program_transform_name=s,x,x,
1381 silent=
1382 site=
1383 srcdir=
1384 verbose=
1385 x_includes=NONE
1386 x_libraries=NONE
1387 
1388 # Installation directory options.
1389 # These are left unexpanded so users can "make install exec_prefix=/foo"
1390 # and all the variables that are supposed to be based on exec_prefix
1391 # by default will actually change.
1392 # Use braces instead of parens because sh, perl, etc. also accept them.
1393 # (The list follows the same order as the GNU Coding Standards.)
1394 bindir='${exec_prefix}/bin'
1395 sbindir='${exec_prefix}/sbin'
1396 libexecdir='${exec_prefix}/libexec'
1397 datarootdir='${prefix}/share'
1398 datadir='${datarootdir}'
1399 sysconfdir='${prefix}/etc'
1400 sharedstatedir='${prefix}/com'
1401 localstatedir='${prefix}/var'
1402 includedir='${prefix}/include'
1403 oldincludedir='/usr/include'
1404 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1405 infodir='${datarootdir}/info'
1406 htmldir='${docdir}'
1407 dvidir='${docdir}'
1408 pdfdir='${docdir}'
1409 psdir='${docdir}'
1410 libdir='${exec_prefix}/lib'
1411 localedir='${datarootdir}/locale'
1412 mandir='${datarootdir}/man'
1413 
1414 ac_prev=
1415 ac_dashdash=
1416 for ac_option
1417 do
1418   # If the previous option needs an argument, assign it.
1419   if test -n "$ac_prev"; then
1420     eval $ac_prev=\$ac_option
1421     ac_prev=
1422     continue
1423   fi
1424 
1425   case $ac_option in
1426   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1427   *=)   ac_optarg= ;;
1428   *)    ac_optarg=yes ;;
1429   esac
1430 
1431   # Accept the important Cygnus configure options, so we can diagnose typos.
1432 
1433   case $ac_dashdash$ac_option in
1434   --)
1435     ac_dashdash=yes ;;
1436 
1437   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1438     ac_prev=bindir ;;
1439   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1440     bindir=$ac_optarg ;;
1441 
1442   -build | --build | --buil | --bui | --bu)
1443     ac_prev=build_alias ;;
1444   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1445     build_alias=$ac_optarg ;;
1446 
1447   -cache-file | --cache-file | --cache-fil | --cache-fi \
1448   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1449     ac_prev=cache_file ;;
1450   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1451   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1452     cache_file=$ac_optarg ;;
1453 
1454   --config-cache | -C)
1455     cache_file=config.cache ;;
1456 
1457   -datadir | --datadir | --datadi | --datad)
1458     ac_prev=datadir ;;
1459   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1460     datadir=$ac_optarg ;;
1461 
1462   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1463   | --dataroo | --dataro | --datar)
1464     ac_prev=datarootdir ;;
1465   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1466   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1467     datarootdir=$ac_optarg ;;
1468 
1469   -disable-* | --disable-*)
1470     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1471     # Reject names that are not valid shell variable names.
1472     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1473       as_fn_error $? "invalid feature name: $ac_useropt"
1474     ac_useropt_orig=$ac_useropt
1475     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1476     case $ac_user_opts in
1477       *"
1478 "enable_$ac_useropt"
1479 "*) ;;
1480       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1481          ac_unrecognized_sep=', ';;
1482     esac
1483     eval enable_$ac_useropt=no ;;
1484 
1485   -docdir | --docdir | --docdi | --doc | --do)
1486     ac_prev=docdir ;;
1487   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1488     docdir=$ac_optarg ;;
1489 
1490   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1491     ac_prev=dvidir ;;
1492   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1493     dvidir=$ac_optarg ;;
1494 
1495   -enable-* | --enable-*)
1496     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1497     # Reject names that are not valid shell variable names.
1498     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1499       as_fn_error $? "invalid feature name: $ac_useropt"
1500     ac_useropt_orig=$ac_useropt
1501     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1502     case $ac_user_opts in
1503       *"
1504 "enable_$ac_useropt"
1505 "*) ;;
1506       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1507          ac_unrecognized_sep=', ';;
1508     esac
1509     eval enable_$ac_useropt=\$ac_optarg ;;
1510 
1511   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1512   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1513   | --exec | --exe | --ex)
1514     ac_prev=exec_prefix ;;
1515   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1516   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1517   | --exec=* | --exe=* | --ex=*)
1518     exec_prefix=$ac_optarg ;;
1519 
1520   -gas | --gas | --ga | --g)
1521     # Obsolete; use --with-gas.
1522     with_gas=yes ;;
1523 
1524   -help | --help | --hel | --he | -h)
1525     ac_init_help=long ;;
1526   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1527     ac_init_help=recursive ;;
1528   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1529     ac_init_help=short ;;
1530 
1531   -host | --host | --hos | --ho)
1532     ac_prev=host_alias ;;
1533   -host=* | --host=* | --hos=* | --ho=*)
1534     host_alias=$ac_optarg ;;
1535 
1536   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1537     ac_prev=htmldir ;;
1538   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1539   | --ht=*)
1540     htmldir=$ac_optarg ;;
1541 
1542   -includedir | --includedir | --includedi | --included | --include \
1543   | --includ | --inclu | --incl | --inc)
1544     ac_prev=includedir ;;
1545   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1546   | --includ=* | --inclu=* | --incl=* | --inc=*)
1547     includedir=$ac_optarg ;;
1548 
1549   -infodir | --infodir | --infodi | --infod | --info | --inf)
1550     ac_prev=infodir ;;
1551   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1552     infodir=$ac_optarg ;;
1553 
1554   -libdir | --libdir | --libdi | --libd)
1555     ac_prev=libdir ;;
1556   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1557     libdir=$ac_optarg ;;
1558 
1559   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1560   | --libexe | --libex | --libe)
1561     ac_prev=libexecdir ;;
1562   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1563   | --libexe=* | --libex=* | --libe=*)
1564     libexecdir=$ac_optarg ;;
1565 
1566   -localedir | --localedir | --localedi | --localed | --locale)
1567     ac_prev=localedir ;;
1568   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1569     localedir=$ac_optarg ;;
1570 
1571   -localstatedir | --localstatedir | --localstatedi | --localstated \
1572   | --localstate | --localstat | --localsta | --localst | --locals)
1573     ac_prev=localstatedir ;;
1574   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1575   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1576     localstatedir=$ac_optarg ;;
1577 
1578   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1579     ac_prev=mandir ;;
1580   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1581     mandir=$ac_optarg ;;
1582 
1583   -nfp | --nfp | --nf)
1584     # Obsolete; use --without-fp.
1585     with_fp=no ;;
1586 
1587   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1588   | --no-cr | --no-c | -n)
1589     no_create=yes ;;
1590 
1591   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1592   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1593     no_recursion=yes ;;
1594 
1595   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1596   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1597   | --oldin | --oldi | --old | --ol | --o)
1598     ac_prev=oldincludedir ;;
1599   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1600   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1601   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1602     oldincludedir=$ac_optarg ;;
1603 
1604   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1605     ac_prev=prefix ;;
1606   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1607     prefix=$ac_optarg ;;
1608 
1609   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1610   | --program-pre | --program-pr | --program-p)
1611     ac_prev=program_prefix ;;
1612   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1613   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1614     program_prefix=$ac_optarg ;;
1615 
1616   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1617   | --program-suf | --program-su | --program-s)
1618     ac_prev=program_suffix ;;
1619   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1620   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1621     program_suffix=$ac_optarg ;;
1622 
1623   -program-transform-name | --program-transform-name \
1624   | --program-transform-nam | --program-transform-na \
1625   | --program-transform-n | --program-transform- \
1626   | --program-transform | --program-transfor \
1627   | --program-transfo | --program-transf \
1628   | --program-trans | --program-tran \
1629   | --progr-tra | --program-tr | --program-t)
1630     ac_prev=program_transform_name ;;
1631   -program-transform-name=* | --program-transform-name=* \
1632   | --program-transform-nam=* | --program-transform-na=* \
1633   | --program-transform-n=* | --program-transform-=* \
1634   | --program-transform=* | --program-transfor=* \
1635   | --program-transfo=* | --program-transf=* \
1636   | --program-trans=* | --program-tran=* \
1637   | --progr-tra=* | --program-tr=* | --program-t=*)
1638     program_transform_name=$ac_optarg ;;
1639 
1640   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1641     ac_prev=pdfdir ;;
1642   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1643     pdfdir=$ac_optarg ;;
1644 
1645   -psdir | --psdir | --psdi | --psd | --ps)
1646     ac_prev=psdir ;;
1647   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1648     psdir=$ac_optarg ;;
1649 
1650   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1651   | -silent | --silent | --silen | --sile | --sil)
1652     silent=yes ;;
1653 
1654   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1655     ac_prev=sbindir ;;
1656   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1657   | --sbi=* | --sb=*)
1658     sbindir=$ac_optarg ;;
1659 
1660   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1661   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1662   | --sharedst | --shareds | --shared | --share | --shar \
1663   | --sha | --sh)
1664     ac_prev=sharedstatedir ;;
1665   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1666   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1667   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1668   | --sha=* | --sh=*)
1669     sharedstatedir=$ac_optarg ;;
1670 
1671   -site | --site | --sit)
1672     ac_prev=site ;;
1673   -site=* | --site=* | --sit=*)
1674     site=$ac_optarg ;;
1675 
1676   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1677     ac_prev=srcdir ;;
1678   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1679     srcdir=$ac_optarg ;;
1680 
1681   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1682   | --syscon | --sysco | --sysc | --sys | --sy)
1683     ac_prev=sysconfdir ;;
1684   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1685   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1686     sysconfdir=$ac_optarg ;;
1687 
1688   -target | --target | --targe | --targ | --tar | --ta | --t)
1689     ac_prev=target_alias ;;
1690   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1691     target_alias=$ac_optarg ;;
1692 
1693   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1694     verbose=yes ;;
1695 
1696   -version | --version | --versio | --versi | --vers | -V)
1697     ac_init_version=: ;;
1698 
1699   -with-* | --with-*)
1700     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1701     # Reject names that are not valid shell variable names.
1702     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1703       as_fn_error $? "invalid package name: $ac_useropt"
1704     ac_useropt_orig=$ac_useropt
1705     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1706     case $ac_user_opts in
1707       *"
1708 "with_$ac_useropt"
1709 "*) ;;
1710       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1711          ac_unrecognized_sep=', ';;
1712     esac
1713     eval with_$ac_useropt=\$ac_optarg ;;
1714 
1715   -without-* | --without-*)
1716     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1717     # Reject names that are not valid shell variable names.
1718     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1719       as_fn_error $? "invalid package name: $ac_useropt"
1720     ac_useropt_orig=$ac_useropt
1721     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1722     case $ac_user_opts in
1723       *"
1724 "with_$ac_useropt"
1725 "*) ;;
1726       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1727          ac_unrecognized_sep=', ';;
1728     esac
1729     eval with_$ac_useropt=no ;;
1730 
1731   --x)
1732     # Obsolete; use --with-x.
1733     with_x=yes ;;
1734 
1735   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1736   | --x-incl | --x-inc | --x-in | --x-i)
1737     ac_prev=x_includes ;;
1738   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1739   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1740     x_includes=$ac_optarg ;;
1741 
1742   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1743   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1744     ac_prev=x_libraries ;;
1745   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1746   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1747     x_libraries=$ac_optarg ;;
1748 
1749   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1750 Try \`$0 --help' for more information"
1751     ;;
1752 
1753   *=*)
1754     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1755     # Reject names that are not valid shell variable names.
1756     case $ac_envvar in #(
1757       '' | [0-9]* | *[!_$as_cr_alnum]* )
1758       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1759     esac
1760     eval $ac_envvar=\$ac_optarg
1761     export $ac_envvar ;;
1762 
1763   *)
1764     # FIXME: should be removed in autoconf 3.0.
1765     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1766     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1767       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1768     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1769     ;;
1770 
1771   esac
1772 done
1773 
1774 if test -n "$ac_prev"; then
1775   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1776   as_fn_error $? "missing argument to $ac_option"
1777 fi
1778 
1779 if test -n "$ac_unrecognized_opts"; then
1780   case $enable_option_checking in
1781     no) ;;
1782     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1783     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1784   esac
1785 fi
1786 
1787 # Check all directory arguments for consistency.
1788 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1789                 datadir sysconfdir sharedstatedir localstatedir includedir \
1790                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1791                 libdir localedir mandir
1792 do
1793   eval ac_val=\$$ac_var
1794   # Remove trailing slashes.
1795   case $ac_val in
1796     */ )
1797       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1798       eval $ac_var=\$ac_val;;
1799   esac
1800   # Be sure to have absolute directory names.
1801   case $ac_val in
1802     [\\/$]* | ?:[\\/]* )  continue;;
1803     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1804   esac
1805   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1806 done
1807 
1808 # There might be people who depend on the old broken behavior: `$host'
1809 # used to hold the argument of --host etc.
1810 # FIXME: To remove some day.
1811 build=$build_alias
1812 host=$host_alias
1813 target=$target_alias
1814 
1815 # FIXME: To remove some day.
1816 if test "x$host_alias" != x; then
1817   if test "x$build_alias" = x; then
1818     cross_compiling=maybe
1819   elif test "x$build_alias" != "x$host_alias"; then
1820     cross_compiling=yes
1821   fi
1822 fi
1823 
1824 ac_tool_prefix=
1825 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1826 
1827 test "$silent" = yes && exec 6>/dev/null
1828 
1829 
1830 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1831 ac_ls_di=`ls -di .` &&
1832 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1833   as_fn_error $? "working directory cannot be determined"
1834 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1835   as_fn_error $? "pwd does not report name of working directory"
1836 
1837 
1838 # Find the source files, if location was not specified.
1839 if test -z "$srcdir"; then
1840   ac_srcdir_defaulted=yes
1841   # Try the directory containing this script, then the parent directory.
1842   ac_confdir=`$as_dirname -- "$as_myself" ||
1843 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1844          X"$as_myself" : 'X\(//\)[^/]' \| \
1845          X"$as_myself" : 'X\(//\)$' \| \
1846          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1847 $as_echo X"$as_myself" |
1848     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1849             s//\1/
1850             q
1851           }
1852           /^X\(\/\/\)[^/].*/{
1853             s//\1/
1854             q
1855           }
1856           /^X\(\/\/\)$/{
1857             s//\1/
1858             q
1859           }
1860           /^X\(\/\).*/{
1861             s//\1/
1862             q
1863           }
1864           s/.*/./; q'`
1865   srcdir=$ac_confdir
1866   if test ! -r "$srcdir/$ac_unique_file"; then
1867     srcdir=..
1868   fi
1869 else
1870   ac_srcdir_defaulted=no
1871 fi
1872 if test ! -r "$srcdir/$ac_unique_file"; then
1873   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1874   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1875 fi
1876 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1877 ac_abs_confdir=`(
1878         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1879         pwd)`
1880 # When building in place, set srcdir=.
1881 if test "$ac_abs_confdir" = "$ac_pwd"; then
1882   srcdir=.
1883 fi
1884 # Remove unnecessary trailing slashes from srcdir.
1885 # Double slashes in file names in object file debugging info
1886 # mess up M-x gdb in Emacs.
1887 case $srcdir in
1888 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1889 esac
1890 for ac_var in $ac_precious_vars; do
1891   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1892   eval ac_env_${ac_var}_value=\$${ac_var}
1893   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1894   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1895 done
1896 
1897 #
1898 # Report the --help message.
1899 #
1900 if test "$ac_init_help" = "long"; then
1901   # Omit some internal or obsolete options to make the list less imposing.
1902   # This message is too long to be a string in the A/UX 3.1 sh.
1903   cat <<_ACEOF
1904 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1905 
1906 Usage: $0 [OPTION]... [VAR=VALUE]...
1907 
1908 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1909 VAR=VALUE.  See below for descriptions of some of the useful variables.
1910 
1911 Defaults for the options are specified in brackets.
1912 
1913 Configuration:
1914   -h, --help              display this help and exit
1915       --help=short        display options specific to this package
1916       --help=recursive    display the short help of all the included packages
1917   -V, --version           display version information and exit
1918   -q, --quiet, --silent   do not print \`checking ...' messages
1919       --cache-file=FILE   cache test results in FILE [disabled]
1920   -C, --config-cache      alias for \`--cache-file=config.cache'
1921   -n, --no-create         do not create output files
1922       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1923 
1924 Installation directories:
1925   --prefix=PREFIX         install architecture-independent files in PREFIX
1926                           [$ac_default_prefix]
1927   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1928                           [PREFIX]
1929 
1930 By default, \`make install' will install all the files in
1931 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1932 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1933 for instance \`--prefix=\$HOME'.
1934 
1935 For better control, use the options below.
1936 
1937 Fine tuning of the installation directories:
1938   --bindir=DIR            user executables [EPREFIX/bin]
1939   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1940   --libexecdir=DIR        program executables [EPREFIX/libexec]
1941   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1942   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1943   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1944   --libdir=DIR            object code libraries [EPREFIX/lib]
1945   --includedir=DIR        C header files [PREFIX/include]
1946   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1947   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1948   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1949   --infodir=DIR           info documentation [DATAROOTDIR/info]
1950   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1951   --mandir=DIR            man documentation [DATAROOTDIR/man]
1952   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1953   --htmldir=DIR           html documentation [DOCDIR]
1954   --dvidir=DIR            dvi documentation [DOCDIR]
1955   --pdfdir=DIR            pdf documentation [DOCDIR]
1956   --psdir=DIR             ps documentation [DOCDIR]
1957 _ACEOF
1958 
1959   cat <<\_ACEOF
1960 
1961 X features:
1962   --x-includes=DIR    X include files are in DIR
1963   --x-libraries=DIR   X library files are in DIR
1964 
1965 System types:
1966   --build=BUILD     configure for building on BUILD [guessed]
1967   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1968   --target=TARGET   configure for building compilers for TARGET [HOST]
1969 _ACEOF
1970 fi
1971 
1972 if test -n "$ac_init_help"; then
1973   case $ac_init_help in
1974      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1975    esac
1976   cat <<\_ACEOF
1977 
1978 Optional Features:
1979   --disable-option-checking  ignore unrecognized --enable/--with options
1980   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1981   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1982   --enable-openjdk-only   suppress building custom source even if present
1983                           [disabled]
1984   --enable-debug          set the debug level to fastdebug (shorthand for
1985                           --with-debug-level=fastdebug) [disabled]
1986   --disable-headful       disable building headful support (graphical UI
1987                           support) [enabled]
1988   --enable-unlimited-crypto
1989                           Enable unlimited crypto policy [disabled]
1990   --disable-keep-packaged-modules
1991                           Do not keep packaged modules in jdk image [enable]
1992   --enable-static-build   enable static library build [disabled]
1993   --disable-warnings-as-errors
1994                           do not consider native warnings to be an error
1995                           [enabled]
1996   --enable-debug-symbols  Deprecated. Option is kept for backwards
1997                           compatibility and is ignored
1998   --enable-zip-debug-info Deprecated. Option is kept for backwards
1999                           compatibility and is ignored
2000   --enable-native-coverage
2001                           enable native compilation with code coverage
2002                           data[disabled]
2003   --enable-dtrace[=yes/no/auto]
2004                           enable dtrace. Default is auto, where dtrace is
2005                           enabled if all dependencies are present.
2006   --disable-hotspot-gtest Disables building of the Hotspot unit tests
2007   --disable-freetype-bundling
2008                           disable bundling of the freetype library with the
2009                           build result [enabled on Windows or when using
2010                           --with-freetype, disabled otherwise]
2011   --disable-libffi-bundling
2012                           disable bundling of the libffi library with the
2013                           build result [enabled on Android Zero, disabled
2014                           otherwise]
2015   --enable-jtreg-failure-handler
2016                           forces build of the jtreg failure handler to be
2017                           enabled, missing dependencies become fatal errors.
2018                           Default is auto, where the failure handler is built
2019                           if all dependencies are present and otherwise just
2020                           disabled.
2021   --disable-generate-classlist
2022                           forces enabling or disabling of the generation of a
2023                           CDS classlist at build time. Default is to generate
2024                           it when either the server or client JVMs are built.
2025   --enable-sjavac         use sjavac to do fast incremental compiles
2026                           [disabled]
2027   --disable-javac-server  disable javac server [enabled]
2028   --enable-icecc          enable distribted compilation of native code using
2029                           icecc/icecream [disabled]
2030   --disable-precompiled-headers
2031                           disable using precompiled headers when compiling C++
2032                           [enabled]
2033   --enable-ccache         enable using ccache to speed up recompilations
2034                           [disabled]
2035 
2036 Optional Packages:
2037   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2038   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2039   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2040                           support it), e.g. --with-target-bits=32 [guessed]
2041   --with-custom-make-dir  Deprecated. Option is kept for backwards
2042                           compatibility and is ignored
2043   --with-jdk-variant      JDK variant to build (normal) [normal]
2044   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2045                           optimized) [release]
2046   --with-jvm-variants     JVM variants (separated by commas) to build
2047                           (server,client,minimal,core,zero,zeroshark,custom)
2048                           [server]
2049   --with-devkit           use this devkit for compilers, tools and resources
2050   --with-sys-root         alias for --with-sysroot for backwards compatability
2051   --with-sysroot          use this directory as sysroot
2052   --with-tools-dir        alias for --with-toolchain-path for backwards
2053                           compatibility
2054   --with-toolchain-path   prepend these directories when searching for
2055                           toolchain binaries (compilers etc)
2056   --with-extra-path       prepend these directories to the default path
2057   --with-sdk-name         use the platform SDK of the given name. [macosx]
2058   --with-conf-name        use this as the name of the configuration [generated
2059                           from important configuration options]
2060   --with-output-sync      set make output sync type if supported by make.
2061                           [recurse]
2062   --with-default-make-target
2063                           set the default make target [exploded-image]
2064   --with-cacerts-file     specify alternative cacerts file
2065   --with-copyright-year   Set copyright year value for build [current year]
2066   --with-milestone        Deprecated. Option is kept for backwards
2067                           compatibility and is ignored
2068   --with-update-version   Deprecated. Option is kept for backwards
2069                           compatibility and is ignored
2070   --with-user-release-suffix
2071                           Deprecated. Option is kept for backwards
2072                           compatibility and is ignored
2073   --with-build-number     Deprecated. Option is kept for backwards
2074                           compatibility and is ignored
2075   --with-version-string   Set version string [calculated]
2076   --with-version-pre      Set the base part of the version 'PRE' field
2077                           (pre-release identifier) ['internal']
2078   --with-version-opt      Set version 'OPT' field (build metadata)
2079                           [<timestamp>.<user>.<dirname>]
2080   --with-version-build    Set version 'BUILD' field (build number) [not
2081                           specified]
2082   --with-version-major    Set version 'MAJOR' field (first number) [current
2083                           source value]
2084   --with-version-minor    Set version 'MINOR' field (second number) [current
2085                           source value]
2086   --with-version-security Set version 'SECURITY' field (third number) [current
2087                           source value]
2088   --with-version-patch    Set version 'PATCH' field (fourth number) [not
2089                           specified]
2090   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2091   --with-build-jdk        path to JDK of same version as is being built[the
2092                           newly built JDK]
2093   --with-add-source-root  Deprecated. Option is kept for backwards
2094                           compatibility and is ignored
2095   --with-override-source-root
2096                           Deprecated. Option is kept for backwards
2097                           compatibility and is ignored
2098   --with-adds-and-overrides
2099                           Deprecated. Option is kept for backwards
2100                           compatibility and is ignored
2101   --with-override-langtools
2102                           Deprecated. Option is kept for backwards
2103                           compatibility and is ignored
2104   --with-override-corba   Deprecated. Option is kept for backwards
2105                           compatibility and is ignored
2106   --with-override-jaxp    Deprecated. Option is kept for backwards
2107                           compatibility and is ignored
2108   --with-override-jaxws   Deprecated. Option is kept for backwards
2109                           compatibility and is ignored
2110   --with-override-hotspot Deprecated. Option is kept for backwards
2111                           compatibility and is ignored
2112   --with-override-nashorn Deprecated. Option is kept for backwards
2113                           compatibility and is ignored
2114   --with-override-jdk     Deprecated. Option is kept for backwards
2115                           compatibility and is ignored
2116   --with-import-hotspot   import hotspot binaries from this jdk image or
2117                           hotspot build dist dir instead of building from
2118                           source
2119   --with-import-modules   import a set of prebuilt modules either as a zip
2120                           file or an exploded directory
2121   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2122                           to show possible values [platform dependent]
2123   --with-extra-cflags     extra flags to be used when compiling jdk c-files
2124   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2125   --with-extra-ldflags    extra flags to be used when linking jdk
2126   --with-toolchain-version
2127                           the version of the toolchain to look for, use
2128                           '--help' to show possible values [platform
2129                           dependent]
2130   --with-build-devkit     Devkit to use for the build platform toolchain
2131   --with-jtreg            Regression Test Harness [probed]
2132   --with-native-debug-symbols
2133                           set the native debug symbol configuration (none,
2134                           internal, external, zipped) [varying]
2135   --with-jvm-features     additional JVM features to enable (separated by
2136                           comma), use '--help' to show possible values [none]
2137   --with-jvm-interpreter  Deprecated. Option is kept for backwards
2138                           compatibility and is ignored
2139   --with-stdc++lib=<static>,<dynamic>,<default>
2140                           force linking of the C++ runtime on Linux to either
2141                           static or dynamic, default is static with dynamic as
2142                           fallback
2143   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2144                           (Windows only) [probed]
2145   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2146                           (Windows only) [probed]
2147   --with-x                use the X Window System
2148   --with-cups             specify prefix directory for the cups package
2149                           (expecting the headers under PATH/include)
2150   --with-cups-include     specify directory for the cups include files
2151   --with-freetype         specify prefix directory for the freetype package
2152                           (expecting the libraries under PATH/lib and the
2153                           headers under PATH/include)
2154   --with-freetype-include specify directory for the freetype include files
2155   --with-freetype-lib     specify directory for the freetype library
2156   --with-freetype-src     specify directory with freetype sources to
2157                           automatically build the library (experimental,
2158                           Windows-only)
2159   --with-alsa             specify prefix directory for the alsa package
2160                           (expecting the libraries under PATH/lib and the
2161                           headers under PATH/include)
2162   --with-alsa-include     specify directory for the alsa include files
2163   --with-alsa-lib         specify directory for the alsa library
2164   --with-libffi           specify prefix directory for the libffi package
2165                           (expecting the libraries under PATH/lib and the
2166                           headers under PATH/include)
2167   --with-libffi-include   specify directory for the libffi include files
2168   --with-libffi-lib       specify directory for the libffi library
2169   --with-libjpeg          use libjpeg from build system or OpenJDK source
2170                           (system, bundled) [bundled]
2171   --with-giflib           use giflib from build system or OpenJDK source
2172                           (system, bundled) [bundled]
2173   --with-libpng           use libpng from build system or OpenJDK source
2174                           (system, bundled) [bundled]
2175   --with-zlib             use zlib from build system or OpenJDK source
2176                           (system, bundled) [bundled]
2177   --with-lcms             use lcms2 from build system or OpenJDK source
2178                           (system, bundled) [bundled]
2179   --with-dxsdk            Deprecated. Option is kept for backwards
2180                           compatibility and is ignored
2181   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2182                           compatibility and is ignored
2183   --with-dxsdk-include    Deprecated. Option is kept for backwards
2184                           compatibility and is ignored
2185   --with-num-cores        number of cores in the build system, e.g.
2186                           --with-num-cores=8 [probed]
2187   --with-memory-size      memory (in MB) available in the build system, e.g.
2188                           --with-memory-size=1024 [probed]
2189   --with-jobs             number of parallel jobs to let make run [calculated
2190                           based on cores and memory]
2191   --with-test-jobs        number of parallel tests jobs to run [based on build
2192                           jobs]
2193   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2194                           invocations of boot JDK, overriding the default
2195                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2196                           -enableassertions"
2197   --with-sjavac-server-java
2198                           use this java binary for running the sjavac
2199                           background server [Boot JDK java]
2200   --with-ccache-dir       where to store ccache files [~/.ccache]
2201 
2202 Some influential environment variables:
2203   BASENAME    Override default value for BASENAME
2204   BASH        Override default value for BASH
2205   CAT         Override default value for CAT
2206   CHMOD       Override default value for CHMOD
2207   CMP         Override default value for CMP
2208   COMM        Override default value for COMM
2209   CP          Override default value for CP
2210   CUT         Override default value for CUT
2211   DATE        Override default value for DATE
2212   DIFF        Override default value for DIFF
2213   DIRNAME     Override default value for DIRNAME
2214   ECHO        Override default value for ECHO
2215   EXPR        Override default value for EXPR
2216   FILE        Override default value for FILE
2217   FIND        Override default value for FIND
2218   HEAD        Override default value for HEAD
2219   GUNZIP      Override default value for GUNZIP
2220   GZIP        Override default value for GZIP
2221   LN          Override default value for LN
2222   LS          Override default value for LS
2223   MKDIR       Override default value for MKDIR
2224   MKTEMP      Override default value for MKTEMP
2225   MV          Override default value for MV
2226   NAWK        Override default value for NAWK
2227   PRINTF      Override default value for PRINTF
2228   RM          Override default value for RM
2229   RMDIR       Override default value for RMDIR
2230   SH          Override default value for SH
2231   SORT        Override default value for SORT
2232   TAIL        Override default value for TAIL
2233   TAR         Override default value for TAR
2234   TEE         Override default value for TEE
2235   TOUCH       Override default value for TOUCH
2236   TR          Override default value for TR
2237   UNAME       Override default value for UNAME
2238   UNIQ        Override default value for UNIQ
2239   WC          Override default value for WC
2240   WHICH       Override default value for WHICH
2241   XARGS       Override default value for XARGS
2242   AWK         Override default value for AWK
2243   GREP        Override default value for GREP
2244   EGREP       Override default value for EGREP
2245   FGREP       Override default value for FGREP
2246   SED         Override default value for SED
2247   CYGPATH     Override default value for CYGPATH
2248   READLINK    Override default value for READLINK
2249   DF          Override default value for DF
2250   CPIO        Override default value for CPIO
2251   NICE        Override default value for NICE
2252   MAKE        Override default value for MAKE
2253   UNZIP       Override default value for UNZIP
2254   ZIP         Override default value for ZIP
2255   LDD         Override default value for LDD
2256   OTOOL       Override default value for OTOOL
2257   READELF     Override default value for READELF
2258   HG          Override default value for HG
2259   STAT        Override default value for STAT
2260   TIME        Override default value for TIME
2261   DTRACE      Override default value for DTRACE
2262   PATCH       Override default value for PATCH
2263   DSYMUTIL    Override default value for DSYMUTIL
2264   XATTR       Override default value for XATTR
2265   CODESIGN    Override default value for CODESIGN
2266   SETFILE     Override default value for SETFILE
2267   PKG_CONFIG  path to pkg-config utility
2268   JAVA        Override default value for JAVA
2269   JAVAC       Override default value for JAVAC
2270   JAVAH       Override default value for JAVAH
2271   JAR         Override default value for JAR
2272   JARSIGNER   Override default value for JARSIGNER
2273   CC          C compiler command
2274   CFLAGS      C compiler flags
2275   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2276               nonstandard directory <lib dir>
2277   LIBS        libraries to pass to the linker, e.g. -l<library>
2278   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2279               you have headers in a nonstandard directory <include dir>
2280   CXX         C++ compiler command
2281   CXXFLAGS    C++ compiler flags
2282   CPP         C preprocessor
2283   CXXCPP      C++ preprocessor
2284   AS          Override default value for AS
2285   AR          Override default value for AR
2286   LIPO        Override default value for LIPO
2287   STRIP       Override default value for STRIP
2288   NM          Override default value for NM
2289   GNM         Override default value for GNM
2290   OBJCOPY     Override default value for OBJCOPY
2291   OBJDUMP     Override default value for OBJDUMP
2292   BUILD_CC    Override default value for BUILD_CC
2293   BUILD_CXX   Override default value for BUILD_CXX
2294   BUILD_NM    Override default value for BUILD_NM
2295   BUILD_AR    Override default value for BUILD_AR
2296   BUILD_OBJCOPY
2297               Override default value for BUILD_OBJCOPY
2298   BUILD_STRIP Override default value for BUILD_STRIP
2299   JTREGEXE    Override default value for JTREGEXE
2300   XMKMF       Path to xmkmf, Makefile generator for X Window System
2301   FREETYPE_CFLAGS
2302               C compiler flags for FREETYPE, overriding pkg-config
2303   FREETYPE_LIBS
2304               linker flags for FREETYPE, overriding pkg-config
2305   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2306   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2307   LIBFFI_CFLAGS
2308               C compiler flags for LIBFFI, overriding pkg-config
2309   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2310   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2311   PNG_LIBS    linker flags for PNG, overriding pkg-config
2312   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2313   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2314   ICECC_CMD   Override default value for ICECC_CMD
2315   ICECC_CREATE_ENV
2316               Override default value for ICECC_CREATE_ENV
2317   ICECC_WRAPPER
2318               Override default value for ICECC_WRAPPER
2319   CCACHE      Override default value for CCACHE
2320 
2321 Use these variables to override the choices made by `configure' or to help
2322 it to find libraries and programs with nonstandard names/locations.
2323 
2324 Report bugs to <build-dev@openjdk.java.net>.
2325 OpenJDK home page: <http://openjdk.java.net>.
2326 _ACEOF
2327 ac_status=$?
2328 fi
2329 
2330 if test "$ac_init_help" = "recursive"; then
2331   # If there are subdirs, report their specific --help.
2332   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2333     test -d "$ac_dir" ||
2334       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2335       continue
2336     ac_builddir=.
2337 
2338 case "$ac_dir" in
2339 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2340 *)
2341   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2342   # A ".." for each directory in $ac_dir_suffix.
2343   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2344   case $ac_top_builddir_sub in
2345   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2346   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2347   esac ;;
2348 esac
2349 ac_abs_top_builddir=$ac_pwd
2350 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2351 # for backward compatibility:
2352 ac_top_builddir=$ac_top_build_prefix
2353 
2354 case $srcdir in
2355   .)  # We are building in place.
2356     ac_srcdir=.
2357     ac_top_srcdir=$ac_top_builddir_sub
2358     ac_abs_top_srcdir=$ac_pwd ;;
2359   [\\/]* | ?:[\\/]* )  # Absolute name.
2360     ac_srcdir=$srcdir$ac_dir_suffix;
2361     ac_top_srcdir=$srcdir
2362     ac_abs_top_srcdir=$srcdir ;;
2363   *) # Relative name.
2364     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2365     ac_top_srcdir=$ac_top_build_prefix$srcdir
2366     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2367 esac
2368 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2369 
2370     cd "$ac_dir" || { ac_status=$?; continue; }
2371     # Check for guested configure.
2372     if test -f "$ac_srcdir/configure.gnu"; then
2373       echo &&
2374       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2375     elif test -f "$ac_srcdir/configure"; then
2376       echo &&
2377       $SHELL "$ac_srcdir/configure" --help=recursive
2378     else
2379       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2380     fi || ac_status=$?
2381     cd "$ac_pwd" || { ac_status=$?; break; }
2382   done
2383 fi
2384 
2385 test -n "$ac_init_help" && exit $ac_status
2386 if $ac_init_version; then
2387   cat <<\_ACEOF
2388 OpenJDK configure jdk9
2389 generated by GNU Autoconf 2.69
2390 
2391 Copyright (C) 2012 Free Software Foundation, Inc.
2392 This configure script is free software; the Free Software Foundation
2393 gives unlimited permission to copy, distribute and modify it.
2394 _ACEOF
2395   exit
2396 fi
2397 
2398 ## ------------------------ ##
2399 ## Autoconf initialization. ##
2400 ## ------------------------ ##
2401 
2402 # ac_fn_c_try_compile LINENO
2403 # --------------------------
2404 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2405 ac_fn_c_try_compile ()
2406 {
2407   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2408   rm -f conftest.$ac_objext
2409   if { { ac_try="$ac_compile"
2410 case "(($ac_try" in
2411   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2412   *) ac_try_echo=$ac_try;;
2413 esac
2414 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2415 $as_echo "$ac_try_echo"; } >&5
2416   (eval "$ac_compile") 2>conftest.err
2417   ac_status=$?
2418   if test -s conftest.err; then
2419     grep -v '^ *+' conftest.err >conftest.er1
2420     cat conftest.er1 >&5
2421     mv -f conftest.er1 conftest.err
2422   fi
2423   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2424   test $ac_status = 0; } && {
2425          test -z "$ac_c_werror_flag" ||
2426          test ! -s conftest.err
2427        } && test -s conftest.$ac_objext; then :
2428   ac_retval=0
2429 else
2430   $as_echo "$as_me: failed program was:" >&5
2431 sed 's/^/| /' conftest.$ac_ext >&5
2432 
2433         ac_retval=1
2434 fi
2435   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2436   as_fn_set_status $ac_retval
2437 
2438 } # ac_fn_c_try_compile
2439 
2440 # ac_fn_cxx_try_compile LINENO
2441 # ----------------------------
2442 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2443 ac_fn_cxx_try_compile ()
2444 {
2445   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2446   rm -f conftest.$ac_objext
2447   if { { ac_try="$ac_compile"
2448 case "(($ac_try" in
2449   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2450   *) ac_try_echo=$ac_try;;
2451 esac
2452 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2453 $as_echo "$ac_try_echo"; } >&5
2454   (eval "$ac_compile") 2>conftest.err
2455   ac_status=$?
2456   if test -s conftest.err; then
2457     grep -v '^ *+' conftest.err >conftest.er1
2458     cat conftest.er1 >&5
2459     mv -f conftest.er1 conftest.err
2460   fi
2461   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2462   test $ac_status = 0; } && {
2463          test -z "$ac_cxx_werror_flag" ||
2464          test ! -s conftest.err
2465        } && test -s conftest.$ac_objext; then :
2466   ac_retval=0
2467 else
2468   $as_echo "$as_me: failed program was:" >&5
2469 sed 's/^/| /' conftest.$ac_ext >&5
2470 
2471         ac_retval=1
2472 fi
2473   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2474   as_fn_set_status $ac_retval
2475 
2476 } # ac_fn_cxx_try_compile
2477 
2478 # ac_fn_c_try_cpp LINENO
2479 # ----------------------
2480 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2481 ac_fn_c_try_cpp ()
2482 {
2483   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2484   if { { ac_try="$ac_cpp conftest.$ac_ext"
2485 case "(($ac_try" in
2486   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2487   *) ac_try_echo=$ac_try;;
2488 esac
2489 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2490 $as_echo "$ac_try_echo"; } >&5
2491   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2492   ac_status=$?
2493   if test -s conftest.err; then
2494     grep -v '^ *+' conftest.err >conftest.er1
2495     cat conftest.er1 >&5
2496     mv -f conftest.er1 conftest.err
2497   fi
2498   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2499   test $ac_status = 0; } > conftest.i && {
2500          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2501          test ! -s conftest.err
2502        }; then :
2503   ac_retval=0
2504 else
2505   $as_echo "$as_me: failed program was:" >&5
2506 sed 's/^/| /' conftest.$ac_ext >&5
2507 
2508     ac_retval=1
2509 fi
2510   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2511   as_fn_set_status $ac_retval
2512 
2513 } # ac_fn_c_try_cpp
2514 
2515 # ac_fn_cxx_try_cpp LINENO
2516 # ------------------------
2517 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2518 ac_fn_cxx_try_cpp ()
2519 {
2520   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2521   if { { ac_try="$ac_cpp conftest.$ac_ext"
2522 case "(($ac_try" in
2523   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2524   *) ac_try_echo=$ac_try;;
2525 esac
2526 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2527 $as_echo "$ac_try_echo"; } >&5
2528   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2529   ac_status=$?
2530   if test -s conftest.err; then
2531     grep -v '^ *+' conftest.err >conftest.er1
2532     cat conftest.er1 >&5
2533     mv -f conftest.er1 conftest.err
2534   fi
2535   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2536   test $ac_status = 0; } > conftest.i && {
2537          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2538          test ! -s conftest.err
2539        }; then :
2540   ac_retval=0
2541 else
2542   $as_echo "$as_me: failed program was:" >&5
2543 sed 's/^/| /' conftest.$ac_ext >&5
2544 
2545     ac_retval=1
2546 fi
2547   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2548   as_fn_set_status $ac_retval
2549 
2550 } # ac_fn_cxx_try_cpp
2551 
2552 # ac_fn_c_try_link LINENO
2553 # -----------------------
2554 # Try to link conftest.$ac_ext, and return whether this succeeded.
2555 ac_fn_c_try_link ()
2556 {
2557   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2558   rm -f conftest.$ac_objext conftest$ac_exeext
2559   if { { ac_try="$ac_link"
2560 case "(($ac_try" in
2561   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2562   *) ac_try_echo=$ac_try;;
2563 esac
2564 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2565 $as_echo "$ac_try_echo"; } >&5
2566   (eval "$ac_link") 2>conftest.err
2567   ac_status=$?
2568   if test -s conftest.err; then
2569     grep -v '^ *+' conftest.err >conftest.er1
2570     cat conftest.er1 >&5
2571     mv -f conftest.er1 conftest.err
2572   fi
2573   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2574   test $ac_status = 0; } && {
2575          test -z "$ac_c_werror_flag" ||
2576          test ! -s conftest.err
2577        } && test -s conftest$ac_exeext && {
2578          test "$cross_compiling" = yes ||
2579          test -x conftest$ac_exeext
2580        }; then :
2581   ac_retval=0
2582 else
2583   $as_echo "$as_me: failed program was:" >&5
2584 sed 's/^/| /' conftest.$ac_ext >&5
2585 
2586         ac_retval=1
2587 fi
2588   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2589   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2590   # interfere with the next link command; also delete a directory that is
2591   # left behind by Apple's compiler.  We do this before executing the actions.
2592   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2593   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2594   as_fn_set_status $ac_retval
2595 
2596 } # ac_fn_c_try_link
2597 
2598 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2599 # ---------------------------------------------------------
2600 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2601 # the include files in INCLUDES and setting the cache variable VAR
2602 # accordingly.
2603 ac_fn_cxx_check_header_mongrel ()
2604 {
2605   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2606   if eval \${$3+:} false; then :
2607   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2608 $as_echo_n "checking for $2... " >&6; }
2609 if eval \${$3+:} false; then :
2610   $as_echo_n "(cached) " >&6
2611 fi
2612 eval ac_res=\$$3
2613                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2614 $as_echo "$ac_res" >&6; }
2615 else
2616   # Is the header compilable?
2617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2618 $as_echo_n "checking $2 usability... " >&6; }
2619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2620 /* end confdefs.h.  */
2621 $4
2622 #include <$2>
2623 _ACEOF
2624 if ac_fn_cxx_try_compile "$LINENO"; then :
2625   ac_header_compiler=yes
2626 else
2627   ac_header_compiler=no
2628 fi
2629 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2631 $as_echo "$ac_header_compiler" >&6; }
2632 
2633 # Is the header present?
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2635 $as_echo_n "checking $2 presence... " >&6; }
2636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2637 /* end confdefs.h.  */
2638 #include <$2>
2639 _ACEOF
2640 if ac_fn_cxx_try_cpp "$LINENO"; then :
2641   ac_header_preproc=yes
2642 else
2643   ac_header_preproc=no
2644 fi
2645 rm -f conftest.err conftest.i conftest.$ac_ext
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2647 $as_echo "$ac_header_preproc" >&6; }
2648 
2649 # So?  What about this header?
2650 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2651   yes:no: )
2652     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2653 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2654     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2655 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2656     ;;
2657   no:yes:* )
2658     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2659 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2660     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2661 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2662     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2663 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2664     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2665 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2666     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2667 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2668 ( $as_echo "## ----------------------------------------- ##
2669 ## Report this to build-dev@openjdk.java.net ##
2670 ## ----------------------------------------- ##"
2671      ) | sed "s/^/$as_me: WARNING:     /" >&2
2672     ;;
2673 esac
2674   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2675 $as_echo_n "checking for $2... " >&6; }
2676 if eval \${$3+:} false; then :
2677   $as_echo_n "(cached) " >&6
2678 else
2679   eval "$3=\$ac_header_compiler"
2680 fi
2681 eval ac_res=\$$3
2682                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2683 $as_echo "$ac_res" >&6; }
2684 fi
2685   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2686 
2687 } # ac_fn_cxx_check_header_mongrel
2688 
2689 # ac_fn_cxx_try_run LINENO
2690 # ------------------------
2691 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2692 # that executables *can* be run.
2693 ac_fn_cxx_try_run ()
2694 {
2695   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2696   if { { ac_try="$ac_link"
2697 case "(($ac_try" in
2698   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2699   *) ac_try_echo=$ac_try;;
2700 esac
2701 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2702 $as_echo "$ac_try_echo"; } >&5
2703   (eval "$ac_link") 2>&5
2704   ac_status=$?
2705   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2706   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2707   { { case "(($ac_try" in
2708   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2709   *) ac_try_echo=$ac_try;;
2710 esac
2711 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2712 $as_echo "$ac_try_echo"; } >&5
2713   (eval "$ac_try") 2>&5
2714   ac_status=$?
2715   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2716   test $ac_status = 0; }; }; then :
2717   ac_retval=0
2718 else
2719   $as_echo "$as_me: program exited with status $ac_status" >&5
2720        $as_echo "$as_me: failed program was:" >&5
2721 sed 's/^/| /' conftest.$ac_ext >&5
2722 
2723        ac_retval=$ac_status
2724 fi
2725   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2726   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2727   as_fn_set_status $ac_retval
2728 
2729 } # ac_fn_cxx_try_run
2730 
2731 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2732 # ---------------------------------------------------------
2733 # Tests whether HEADER exists and can be compiled using the include files in
2734 # INCLUDES, setting the cache variable VAR accordingly.
2735 ac_fn_cxx_check_header_compile ()
2736 {
2737   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2738   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2739 $as_echo_n "checking for $2... " >&6; }
2740 if eval \${$3+:} false; then :
2741   $as_echo_n "(cached) " >&6
2742 else
2743   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2744 /* end confdefs.h.  */
2745 $4
2746 #include <$2>
2747 _ACEOF
2748 if ac_fn_cxx_try_compile "$LINENO"; then :
2749   eval "$3=yes"
2750 else
2751   eval "$3=no"
2752 fi
2753 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2754 fi
2755 eval ac_res=\$$3
2756                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2757 $as_echo "$ac_res" >&6; }
2758   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2759 
2760 } # ac_fn_cxx_check_header_compile
2761 
2762 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2763 # ----------------------------------------------
2764 # Tries to find the compile-time value of EXPR in a program that includes
2765 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2766 # computed
2767 ac_fn_cxx_compute_int ()
2768 {
2769   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2770   if test "$cross_compiling" = yes; then
2771     # Depending upon the size, compute the lo and hi bounds.
2772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2773 /* end confdefs.h.  */
2774 $4
2775 int
2776 main ()
2777 {
2778 static int test_array [1 - 2 * !(($2) >= 0)];
2779 test_array [0] = 0;
2780 return test_array [0];
2781 
2782   ;
2783   return 0;
2784 }
2785 _ACEOF
2786 if ac_fn_cxx_try_compile "$LINENO"; then :
2787   ac_lo=0 ac_mid=0
2788   while :; do
2789     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2790 /* end confdefs.h.  */
2791 $4
2792 int
2793 main ()
2794 {
2795 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2796 test_array [0] = 0;
2797 return test_array [0];
2798 
2799   ;
2800   return 0;
2801 }
2802 _ACEOF
2803 if ac_fn_cxx_try_compile "$LINENO"; then :
2804   ac_hi=$ac_mid; break
2805 else
2806   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2807                         if test $ac_lo -le $ac_mid; then
2808                           ac_lo= ac_hi=
2809                           break
2810                         fi
2811                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2812 fi
2813 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2814   done
2815 else
2816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2817 /* end confdefs.h.  */
2818 $4
2819 int
2820 main ()
2821 {
2822 static int test_array [1 - 2 * !(($2) < 0)];
2823 test_array [0] = 0;
2824 return test_array [0];
2825 
2826   ;
2827   return 0;
2828 }
2829 _ACEOF
2830 if ac_fn_cxx_try_compile "$LINENO"; then :
2831   ac_hi=-1 ac_mid=-1
2832   while :; do
2833     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2834 /* end confdefs.h.  */
2835 $4
2836 int
2837 main ()
2838 {
2839 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2840 test_array [0] = 0;
2841 return test_array [0];
2842 
2843   ;
2844   return 0;
2845 }
2846 _ACEOF
2847 if ac_fn_cxx_try_compile "$LINENO"; then :
2848   ac_lo=$ac_mid; break
2849 else
2850   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2851                         if test $ac_mid -le $ac_hi; then
2852                           ac_lo= ac_hi=
2853                           break
2854                         fi
2855                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2856 fi
2857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2858   done
2859 else
2860   ac_lo= ac_hi=
2861 fi
2862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2863 fi
2864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2865 # Binary search between lo and hi bounds.
2866 while test "x$ac_lo" != "x$ac_hi"; do
2867   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2868   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2869 /* end confdefs.h.  */
2870 $4
2871 int
2872 main ()
2873 {
2874 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2875 test_array [0] = 0;
2876 return test_array [0];
2877 
2878   ;
2879   return 0;
2880 }
2881 _ACEOF
2882 if ac_fn_cxx_try_compile "$LINENO"; then :
2883   ac_hi=$ac_mid
2884 else
2885   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2886 fi
2887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2888 done
2889 case $ac_lo in #((
2890 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2891 '') ac_retval=1 ;;
2892 esac
2893   else
2894     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2895 /* end confdefs.h.  */
2896 $4
2897 static long int longval () { return $2; }
2898 static unsigned long int ulongval () { return $2; }
2899 #include <stdio.h>
2900 #include <stdlib.h>
2901 int
2902 main ()
2903 {
2904 
2905   FILE *f = fopen ("conftest.val", "w");
2906   if (! f)
2907     return 1;
2908   if (($2) < 0)
2909     {
2910       long int i = longval ();
2911       if (i != ($2))
2912         return 1;
2913       fprintf (f, "%ld", i);
2914     }
2915   else
2916     {
2917       unsigned long int i = ulongval ();
2918       if (i != ($2))
2919         return 1;
2920       fprintf (f, "%lu", i);
2921     }
2922   /* Do not output a trailing newline, as this causes \r\n confusion
2923      on some platforms.  */
2924   return ferror (f) || fclose (f) != 0;
2925 
2926   ;
2927   return 0;
2928 }
2929 _ACEOF
2930 if ac_fn_cxx_try_run "$LINENO"; then :
2931   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2932 else
2933   ac_retval=1
2934 fi
2935 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2936   conftest.$ac_objext conftest.beam conftest.$ac_ext
2937 rm -f conftest.val
2938 
2939   fi
2940   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2941   as_fn_set_status $ac_retval
2942 
2943 } # ac_fn_cxx_compute_int
2944 
2945 # ac_fn_cxx_try_link LINENO
2946 # -------------------------
2947 # Try to link conftest.$ac_ext, and return whether this succeeded.
2948 ac_fn_cxx_try_link ()
2949 {
2950   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2951   rm -f conftest.$ac_objext conftest$ac_exeext
2952   if { { ac_try="$ac_link"
2953 case "(($ac_try" in
2954   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2955   *) ac_try_echo=$ac_try;;
2956 esac
2957 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2958 $as_echo "$ac_try_echo"; } >&5
2959   (eval "$ac_link") 2>conftest.err
2960   ac_status=$?
2961   if test -s conftest.err; then
2962     grep -v '^ *+' conftest.err >conftest.er1
2963     cat conftest.er1 >&5
2964     mv -f conftest.er1 conftest.err
2965   fi
2966   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2967   test $ac_status = 0; } && {
2968          test -z "$ac_cxx_werror_flag" ||
2969          test ! -s conftest.err
2970        } && test -s conftest$ac_exeext && {
2971          test "$cross_compiling" = yes ||
2972          test -x conftest$ac_exeext
2973        }; then :
2974   ac_retval=0
2975 else
2976   $as_echo "$as_me: failed program was:" >&5
2977 sed 's/^/| /' conftest.$ac_ext >&5
2978 
2979         ac_retval=1
2980 fi
2981   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2982   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2983   # interfere with the next link command; also delete a directory that is
2984   # left behind by Apple's compiler.  We do this before executing the actions.
2985   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2986   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2987   as_fn_set_status $ac_retval
2988 
2989 } # ac_fn_cxx_try_link
2990 
2991 # ac_fn_cxx_check_func LINENO FUNC VAR
2992 # ------------------------------------
2993 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2994 ac_fn_cxx_check_func ()
2995 {
2996   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2997   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2998 $as_echo_n "checking for $2... " >&6; }
2999 if eval \${$3+:} false; then :
3000   $as_echo_n "(cached) " >&6
3001 else
3002   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3003 /* end confdefs.h.  */
3004 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3005    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3006 #define $2 innocuous_$2
3007 
3008 /* System header to define __stub macros and hopefully few prototypes,
3009     which can conflict with char $2 (); below.
3010     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3011     <limits.h> exists even on freestanding compilers.  */
3012 
3013 #ifdef __STDC__
3014 # include <limits.h>
3015 #else
3016 # include <assert.h>
3017 #endif
3018 
3019 #undef $2
3020 
3021 /* Override any GCC internal prototype to avoid an error.
3022    Use char because int might match the return type of a GCC
3023    builtin and then its argument prototype would still apply.  */
3024 #ifdef __cplusplus
3025 extern "C"
3026 #endif
3027 char $2 ();
3028 /* The GNU C library defines this for functions which it implements
3029     to always fail with ENOSYS.  Some functions are actually named
3030     something starting with __ and the normal name is an alias.  */
3031 #if defined __stub_$2 || defined __stub___$2
3032 choke me
3033 #endif
3034 
3035 int
3036 main ()
3037 {
3038 return $2 ();
3039   ;
3040   return 0;
3041 }
3042 _ACEOF
3043 if ac_fn_cxx_try_link "$LINENO"; then :
3044   eval "$3=yes"
3045 else
3046   eval "$3=no"
3047 fi
3048 rm -f core conftest.err conftest.$ac_objext \
3049     conftest$ac_exeext conftest.$ac_ext
3050 fi
3051 eval ac_res=\$$3
3052                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3053 $as_echo "$ac_res" >&6; }
3054   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3055 
3056 } # ac_fn_cxx_check_func
3057 
3058 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3059 # -------------------------------------------------------
3060 # Tests whether HEADER exists and can be compiled using the include files in
3061 # INCLUDES, setting the cache variable VAR accordingly.
3062 ac_fn_c_check_header_compile ()
3063 {
3064   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3065   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3066 $as_echo_n "checking for $2... " >&6; }
3067 if eval \${$3+:} false; then :
3068   $as_echo_n "(cached) " >&6
3069 else
3070   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3071 /* end confdefs.h.  */
3072 $4
3073 #include <$2>
3074 _ACEOF
3075 if ac_fn_c_try_compile "$LINENO"; then :
3076   eval "$3=yes"
3077 else
3078   eval "$3=no"
3079 fi
3080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3081 fi
3082 eval ac_res=\$$3
3083                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3084 $as_echo "$ac_res" >&6; }
3085   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3086 
3087 } # ac_fn_c_check_header_compile
3088 cat >config.log <<_ACEOF
3089 This file contains any messages produced by compilers while
3090 running configure, to aid debugging if configure makes a mistake.
3091 
3092 It was created by OpenJDK $as_me jdk9, which was
3093 generated by GNU Autoconf 2.69.  Invocation command line was
3094 
3095   $ $0 $@
3096 
3097 _ACEOF
3098 exec 5>>config.log
3099 {
3100 cat <<_ASUNAME
3101 ## --------- ##
3102 ## Platform. ##
3103 ## --------- ##
3104 
3105 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3106 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3107 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3108 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3109 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3110 
3111 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3112 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3113 
3114 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3115 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3116 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3117 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3118 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3119 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3120 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3121 
3122 _ASUNAME
3123 
3124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3125 for as_dir in $PATH
3126 do
3127   IFS=$as_save_IFS
3128   test -z "$as_dir" && as_dir=.
3129     $as_echo "PATH: $as_dir"
3130   done
3131 IFS=$as_save_IFS
3132 
3133 } >&5
3134 
3135 cat >&5 <<_ACEOF
3136 
3137 
3138 ## ----------- ##
3139 ## Core tests. ##
3140 ## ----------- ##
3141 
3142 _ACEOF
3143 
3144 
3145 # Keep a trace of the command line.
3146 # Strip out --no-create and --no-recursion so they do not pile up.
3147 # Strip out --silent because we don't want to record it for future runs.
3148 # Also quote any args containing shell meta-characters.
3149 # Make two passes to allow for proper duplicate-argument suppression.
3150 ac_configure_args=
3151 ac_configure_args0=
3152 ac_configure_args1=
3153 ac_must_keep_next=false
3154 for ac_pass in 1 2
3155 do
3156   for ac_arg
3157   do
3158     case $ac_arg in
3159     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3160     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3161     | -silent | --silent | --silen | --sile | --sil)
3162       continue ;;
3163     *\'*)
3164       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3165     esac
3166     case $ac_pass in
3167     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3168     2)
3169       as_fn_append ac_configure_args1 " '$ac_arg'"
3170       if test $ac_must_keep_next = true; then
3171         ac_must_keep_next=false # Got value, back to normal.
3172       else
3173         case $ac_arg in
3174           *=* | --config-cache | -C | -disable-* | --disable-* \
3175           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3176           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3177           | -with-* | --with-* | -without-* | --without-* | --x)
3178             case "$ac_configure_args0 " in
3179               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3180             esac
3181             ;;
3182           -* ) ac_must_keep_next=true ;;
3183         esac
3184       fi
3185       as_fn_append ac_configure_args " '$ac_arg'"
3186       ;;
3187     esac
3188   done
3189 done
3190 { ac_configure_args0=; unset ac_configure_args0;}
3191 { ac_configure_args1=; unset ac_configure_args1;}
3192 
3193 # When interrupted or exit'd, cleanup temporary files, and complete
3194 # config.log.  We remove comments because anyway the quotes in there
3195 # would cause problems or look ugly.
3196 # WARNING: Use '\'' to represent an apostrophe within the trap.
3197 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3198 trap 'exit_status=$?
3199   # Save into config.log some information that might help in debugging.
3200   {
3201     echo
3202 
3203     $as_echo "## ---------------- ##
3204 ## Cache variables. ##
3205 ## ---------------- ##"
3206     echo
3207     # The following way of writing the cache mishandles newlines in values,
3208 (
3209   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3210     eval ac_val=\$$ac_var
3211     case $ac_val in #(
3212     *${as_nl}*)
3213       case $ac_var in #(
3214       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3215 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3216       esac
3217       case $ac_var in #(
3218       _ | IFS | as_nl) ;; #(
3219       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3220       *) { eval $ac_var=; unset $ac_var;} ;;
3221       esac ;;
3222     esac
3223   done
3224   (set) 2>&1 |
3225     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3226     *${as_nl}ac_space=\ *)
3227       sed -n \
3228         "s/'\''/'\''\\\\'\'''\''/g;
3229           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3230       ;; #(
3231     *)
3232       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3233       ;;
3234     esac |
3235     sort
3236 )
3237     echo
3238 
3239     $as_echo "## ----------------- ##
3240 ## Output variables. ##
3241 ## ----------------- ##"
3242     echo
3243     for ac_var in $ac_subst_vars
3244     do
3245       eval ac_val=\$$ac_var
3246       case $ac_val in
3247       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3248       esac
3249       $as_echo "$ac_var='\''$ac_val'\''"
3250     done | sort
3251     echo
3252 
3253     if test -n "$ac_subst_files"; then
3254       $as_echo "## ------------------- ##
3255 ## File substitutions. ##
3256 ## ------------------- ##"
3257       echo
3258       for ac_var in $ac_subst_files
3259       do
3260         eval ac_val=\$$ac_var
3261         case $ac_val in
3262         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3263         esac
3264         $as_echo "$ac_var='\''$ac_val'\''"
3265       done | sort
3266       echo
3267     fi
3268 
3269     if test -s confdefs.h; then
3270       $as_echo "## ----------- ##
3271 ## confdefs.h. ##
3272 ## ----------- ##"
3273       echo
3274       cat confdefs.h
3275       echo
3276     fi
3277     test "$ac_signal" != 0 &&
3278       $as_echo "$as_me: caught signal $ac_signal"
3279     $as_echo "$as_me: exit $exit_status"
3280   } >&5
3281   rm -f core *.core core.conftest.* &&
3282     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3283     exit $exit_status
3284 ' 0
3285 for ac_signal in 1 2 13 15; do
3286   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3287 done
3288 ac_signal=0
3289 
3290 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3291 rm -f -r conftest* confdefs.h
3292 
3293 $as_echo "/* confdefs.h */" > confdefs.h
3294 
3295 # Predefined preprocessor variables.
3296 
3297 cat >>confdefs.h <<_ACEOF
3298 #define PACKAGE_NAME "$PACKAGE_NAME"
3299 _ACEOF
3300 
3301 cat >>confdefs.h <<_ACEOF
3302 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3303 _ACEOF
3304 
3305 cat >>confdefs.h <<_ACEOF
3306 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3307 _ACEOF
3308 
3309 cat >>confdefs.h <<_ACEOF
3310 #define PACKAGE_STRING "$PACKAGE_STRING"
3311 _ACEOF
3312 
3313 cat >>confdefs.h <<_ACEOF
3314 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3315 _ACEOF
3316 
3317 cat >>confdefs.h <<_ACEOF
3318 #define PACKAGE_URL "$PACKAGE_URL"
3319 _ACEOF
3320 
3321 
3322 # Let the site file select an alternate cache file if it wants to.
3323 # Prefer an explicitly selected file to automatically selected ones.
3324 ac_site_file1=NONE
3325 ac_site_file2=NONE
3326 if test -n "$CONFIG_SITE"; then
3327   # We do not want a PATH search for config.site.
3328   case $CONFIG_SITE in #((
3329     -*)  ac_site_file1=./$CONFIG_SITE;;
3330     */*) ac_site_file1=$CONFIG_SITE;;
3331     *)   ac_site_file1=./$CONFIG_SITE;;
3332   esac
3333 elif test "x$prefix" != xNONE; then
3334   ac_site_file1=$prefix/share/config.site
3335   ac_site_file2=$prefix/etc/config.site
3336 else
3337   ac_site_file1=$ac_default_prefix/share/config.site
3338   ac_site_file2=$ac_default_prefix/etc/config.site
3339 fi
3340 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3341 do
3342   test "x$ac_site_file" = xNONE && continue
3343   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3344     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3345 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3346     sed 's/^/| /' "$ac_site_file" >&5
3347     . "$ac_site_file" \
3348       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3349 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3350 as_fn_error $? "failed to load site script $ac_site_file
3351 See \`config.log' for more details" "$LINENO" 5; }
3352   fi
3353 done
3354 
3355 if test -r "$cache_file"; then
3356   # Some versions of bash will fail to source /dev/null (special files
3357   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3358   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3359     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3360 $as_echo "$as_me: loading cache $cache_file" >&6;}
3361     case $cache_file in
3362       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3363       *)                      . "./$cache_file";;
3364     esac
3365   fi
3366 else
3367   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3368 $as_echo "$as_me: creating cache $cache_file" >&6;}
3369   >$cache_file
3370 fi
3371 
3372 # Check that the precious variables saved in the cache have kept the same
3373 # value.
3374 ac_cache_corrupted=false
3375 for ac_var in $ac_precious_vars; do
3376   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3377   eval ac_new_set=\$ac_env_${ac_var}_set
3378   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3379   eval ac_new_val=\$ac_env_${ac_var}_value
3380   case $ac_old_set,$ac_new_set in
3381     set,)
3382       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3383 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3384       ac_cache_corrupted=: ;;
3385     ,set)
3386       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3387 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3388       ac_cache_corrupted=: ;;
3389     ,);;
3390     *)
3391       if test "x$ac_old_val" != "x$ac_new_val"; then
3392         # differences in whitespace do not lead to failure.
3393         ac_old_val_w=`echo x $ac_old_val`
3394         ac_new_val_w=`echo x $ac_new_val`
3395         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3396           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3397 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3398           ac_cache_corrupted=:
3399         else
3400           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3401 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3402           eval $ac_var=\$ac_old_val
3403         fi
3404         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3405 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3406         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3407 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3408       fi;;
3409   esac
3410   # Pass precious variables to config.status.
3411   if test "$ac_new_set" = set; then
3412     case $ac_new_val in
3413     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3414     *) ac_arg=$ac_var=$ac_new_val ;;
3415     esac
3416     case " $ac_configure_args " in
3417       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3418       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3419     esac
3420   fi
3421 done
3422 if $ac_cache_corrupted; then
3423   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3424 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3425   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3426 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3427   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3428 fi
3429 ## -------------------- ##
3430 ## Main body of script. ##
3431 ## -------------------- ##
3432 
3433 ac_ext=c
3434 ac_cpp='$CPP $CPPFLAGS'
3435 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3436 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3437 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3438 
3439 
3440 
3441 ac_aux_dir=
3442 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3443   if test -f "$ac_dir/install-sh"; then
3444     ac_aux_dir=$ac_dir
3445     ac_install_sh="$ac_aux_dir/install-sh -c"
3446     break
3447   elif test -f "$ac_dir/install.sh"; then
3448     ac_aux_dir=$ac_dir
3449     ac_install_sh="$ac_aux_dir/install.sh -c"
3450     break
3451   elif test -f "$ac_dir/shtool"; then
3452     ac_aux_dir=$ac_dir
3453     ac_install_sh="$ac_aux_dir/shtool install -c"
3454     break
3455   fi
3456 done
3457 if test -z "$ac_aux_dir"; then
3458   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
3459 fi
3460 
3461 # These three variables are undocumented and unsupported,
3462 # and are intended to be withdrawn in a future Autoconf release.
3463 # They can cause serious problems if a builder's source tree is in a directory
3464 # whose full name contains unusual characters.
3465 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3466 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3467 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3468 
3469 
3470 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3471 
3472 #
3473 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3474 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3475 #
3476 # This code is free software; you can redistribute it and/or modify it
3477 # under the terms of the GNU General Public License version 2 only, as
3478 # published by the Free Software Foundation.  Oracle designates this
3479 # particular file as subject to the "Classpath" exception as provided
3480 # by Oracle in the LICENSE file that accompanied this code.
3481 #
3482 # This code is distributed in the hope that it will be useful, but WITHOUT
3483 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3484 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3485 # version 2 for more details (a copy is included in the LICENSE file that
3486 # accompanied this code).
3487 #
3488 # You should have received a copy of the GNU General Public License version
3489 # 2 along with this work; if not, write to the Free Software Foundation,
3490 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3491 #
3492 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3493 # or visit www.oracle.com if you need additional information or have any
3494 # questions.
3495 #
3496 
3497 #
3498 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3499 #
3500 # This program is free software; you can redistribute it and/or modify
3501 # it under the terms of the GNU General Public License as published by
3502 # the Free Software Foundation; either version 2 of the License, or
3503 # (at your option) any later version.
3504 #
3505 # This program is distributed in the hope that it will be useful, but
3506 # WITHOUT ANY WARRANTY; without even the implied warranty of
3507 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3508 # General Public License for more details.
3509 #
3510 # You should have received a copy of the GNU General Public License
3511 # along with this program; if not, write to the Free Software
3512 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3513 #
3514 # As a special exception to the GNU General Public License, if you
3515 # distribute this file as part of a program that contains a
3516 # configuration script generated by Autoconf, you may include it under
3517 # the same distribution terms that you use for the rest of that program.
3518 
3519 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3520 # ----------------------------------
3521 # PKG_PROG_PKG_CONFIG
3522 
3523 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3524 #
3525 # Check to see whether a particular set of modules exists.  Similar
3526 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3527 #
3528 #
3529 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3530 # this or PKG_CHECK_MODULES is called, or make sure to call
3531 # PKG_CHECK_EXISTS manually
3532 # --------------------------------------------------------------
3533 
3534 
3535 
3536 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3537 # ---------------------------------------------
3538 # _PKG_CONFIG
3539 
3540 # _PKG_SHORT_ERRORS_SUPPORTED
3541 # -----------------------------
3542 # _PKG_SHORT_ERRORS_SUPPORTED
3543 
3544 
3545 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3546 # [ACTION-IF-NOT-FOUND])
3547 #
3548 #
3549 # Note that if there is a possibility the first call to
3550 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3551 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3552 #
3553 #
3554 # --------------------------------------------------------------
3555 # PKG_CHECK_MODULES
3556 
3557 
3558 # Include these first...
3559 #
3560 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3561 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3562 #
3563 # This code is free software; you can redistribute it and/or modify it
3564 # under the terms of the GNU General Public License version 2 only, as
3565 # published by the Free Software Foundation.  Oracle designates this
3566 # particular file as subject to the "Classpath" exception as provided
3567 # by Oracle in the LICENSE file that accompanied this code.
3568 #
3569 # This code is distributed in the hope that it will be useful, but WITHOUT
3570 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3571 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3572 # version 2 for more details (a copy is included in the LICENSE file that
3573 # accompanied this code).
3574 #
3575 # You should have received a copy of the GNU General Public License version
3576 # 2 along with this work; if not, write to the Free Software Foundation,
3577 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3578 #
3579 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3580 # or visit www.oracle.com if you need additional information or have any
3581 # questions.
3582 #
3583 
3584 # Create a function/macro that takes a series of named arguments. The call is
3585 # similar to AC_DEFUN, but the setup of the function looks like this:
3586 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3587 # ... do something
3588 #   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3589 # ])
3590 # A star (*) in front of a named argument means that it is required and it's
3591 # presence will be verified. To pass e.g. the first value as a normal indexed
3592 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3593 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3594 # "ARG_FOO".
3595 #
3596 # The generated function can be called like this:
3597 # MYFUNC(FOO: [foo-val],
3598 #     BAR: [
3599 #         $ECHO hello world
3600 #     ])
3601 # Note that the argument value must start on the same line as the argument name.
3602 #
3603 # Argument 1: Name of the function to define
3604 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3605 # Argument 3: Argument array to treat as named, typically $@
3606 # Argument 4: The main function body
3607 
3608 
3609 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3610 # If so, then append $1 to $2 \
3611 # Also set JVM_ARG_OK to true/false depending on outcome.
3612 
3613 
3614 # Appends a string to a path variable, only adding the : when needed.
3615 
3616 
3617 # Prepends a string to a path variable, only adding the : when needed.
3618 
3619 
3620 # This will make sure the given variable points to a full and proper
3621 # path. This means:
3622 # 1) There will be no spaces in the path. On unix platforms,
3623 #    spaces in the path will result in an error. On Windows,
3624 #    the path will be rewritten using short-style to be space-free.
3625 # 2) The path will be absolute, and it will be in unix-style (on
3626 #     cygwin).
3627 # $1: The name of the variable to fix
3628 
3629 
3630 # This will make sure the given variable points to a executable
3631 # with a full and proper path. This means:
3632 # 1) There will be no spaces in the path. On unix platforms,
3633 #    spaces in the path will result in an error. On Windows,
3634 #    the path will be rewritten using short-style to be space-free.
3635 # 2) The path will be absolute, and it will be in unix-style (on
3636 #     cygwin).
3637 # Any arguments given to the executable is preserved.
3638 # If the input variable does not have a directory specification, then
3639 # it need to be in the PATH.
3640 # $1: The name of the variable to fix
3641 
3642 
3643 
3644 
3645 # Register a --with argument but mark it as deprecated
3646 # $1: The name of the with argument to deprecate, not including --with-
3647 
3648 
3649 # Register a --enable argument but mark it as deprecated
3650 # $1: The name of the with argument to deprecate, not including --enable-
3651 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3652 # $3: Messages to user.
3653 
3654 
3655 
3656 
3657 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3658 # $1: variable to check
3659 
3660 
3661 # Check that there are no unprocessed overridden variables left.
3662 # If so, they are an incorrect argument and we will exit with an error.
3663 
3664 
3665 # Setup a tool for the given variable. If correctly specified by the user,
3666 # use that value, otherwise search for the tool using the supplied code snippet.
3667 # $1: variable to set
3668 # $2: code snippet to call to look for the tool
3669 # $3: code snippet to call if variable was used to find tool
3670 
3671 
3672 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3673 # $1: variable to set
3674 # $2: executable name (or list of names) to look for
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 
3686 
3687 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3688 # $1: variable to set
3689 # $2: autoconf macro to call to look for the special tool
3690 
3691 
3692 # Setup the most fundamental tools that relies on not much else to set up,
3693 # but is used by much of the early bootstrap code.
3694 
3695 
3696 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3697 
3698 
3699 # Evaluates platform specific overrides for devkit variables.
3700 # $1: Name of variable
3701 
3702 
3703 
3704 
3705 
3706 
3707 #%%% Simple tools %%%
3708 
3709 # Check if we have found a usable version of make
3710 # $1: the path to a potential make binary (or empty)
3711 # $2: the description on how we found this
3712 
3713 
3714 
3715 
3716 # Goes looking for a usable version of GNU make.
3717 
3718 
3719 
3720 
3721 
3722 
3723 
3724 
3725 # Check if build directory is on local disk. If not possible to determine,
3726 # we prefer to claim it's local.
3727 # Argument 1: directory to test
3728 # Argument 2: what to do if it is on local disk
3729 # Argument 3: what to do otherwise (remote disk or failure)
3730 
3731 
3732 # Check that source files have basic read permissions set. This might
3733 # not be the case in cygwin in certain conditions.
3734 
3735 
3736 
3737 
3738 # Check for support for specific options in bash
3739 
3740 
3741 ################################################################################
3742 #
3743 # Default make target
3744 #
3745 
3746 
3747 # Code to run after AC_OUTPUT
3748 
3749 
3750 #
3751 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3752 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3753 #
3754 # This code is free software; you can redistribute it and/or modify it
3755 # under the terms of the GNU General Public License version 2 only, as
3756 # published by the Free Software Foundation.  Oracle designates this
3757 # particular file as subject to the "Classpath" exception as provided
3758 # by Oracle in the LICENSE file that accompanied this code.
3759 #
3760 # This code is distributed in the hope that it will be useful, but WITHOUT
3761 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3762 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3763 # version 2 for more details (a copy is included in the LICENSE file that
3764 # accompanied this code).
3765 #
3766 # You should have received a copy of the GNU General Public License version
3767 # 2 along with this work; if not, write to the Free Software Foundation,
3768 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3769 #
3770 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3771 # or visit www.oracle.com if you need additional information or have any
3772 # questions.
3773 #
3774 
3775 
3776 
3777 
3778 
3779 # Helper function which possibly converts a path using DOS-style short mode.
3780 # If so, the updated path is stored in $new_path.
3781 # $1: The path to check
3782 
3783 
3784 # Helper function which possibly converts a path using DOS-style short mode.
3785 # If so, the updated path is stored in $new_path.
3786 # $1: The path to check
3787 
3788 
3789 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3790 # and could probably be heavily simplified. However, all changes in this
3791 # area tend to need lot of testing in different scenarios, and in lack of
3792 # proper unit testing, cleaning this up has not been deemed worth the effort
3793 # at the moment.
3794 
3795 
3796 
3797 
3798 
3799 
3800 
3801 
3802 
3803 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3804 
3805 
3806 
3807 
3808 # ... then the rest
3809 #
3810 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3811 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3812 #
3813 # This code is free software; you can redistribute it and/or modify it
3814 # under the terms of the GNU General Public License version 2 only, as
3815 # published by the Free Software Foundation.  Oracle designates this
3816 # particular file as subject to the "Classpath" exception as provided
3817 # by Oracle in the LICENSE file that accompanied this code.
3818 #
3819 # This code is distributed in the hope that it will be useful, but WITHOUT
3820 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3821 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3822 # version 2 for more details (a copy is included in the LICENSE file that
3823 # accompanied this code).
3824 #
3825 # You should have received a copy of the GNU General Public License version
3826 # 2 along with this work; if not, write to the Free Software Foundation,
3827 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3828 #
3829 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3830 # or visit www.oracle.com if you need additional information or have any
3831 # questions.
3832 #
3833 
3834 ########################################################################
3835 # This file handles detection of the Boot JDK. The Boot JDK detection
3836 # process has been developed as a response to solve a complex real-world
3837 # problem. Initially, it was simple, but it has grown as platform after
3838 # platform, idiosyncracy after idiosyncracy has been supported.
3839 #
3840 # The basic idea is this:
3841 # 1) You need an acceptable *) JDK to use as a Boot JDK
3842 # 2) There are several ways to locate a JDK, that are mostly platform
3843 #    dependent **)
3844 # 3) You can have multiple JDKs installed
3845 # 4) If possible, configure should try to dig out an acceptable JDK
3846 #    automatically, without having to resort to command-line options
3847 #
3848 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3849 #     javac) and not a JRE, etc.
3850 #
3851 # **) On Windows we typically use a well-known path.
3852 #     On MacOSX we typically use the tool java_home.
3853 #     On Linux we typically find javac in the $PATH, and then follow a
3854 #     chain of symlinks that often ends up in a real JDK.
3855 #
3856 # This leads to the code where we check in different ways to locate a
3857 # JDK, and if one is found, check if it is acceptable. If not, we print
3858 # our reasons for rejecting it (useful when debugging non-working
3859 # configure situations) and continue checking the next one.
3860 ########################################################################
3861 
3862 # Execute the check given as argument, and verify the result
3863 # If the Boot JDK was previously found, do nothing
3864 # $1 A command line (typically autoconf macro) to execute
3865 
3866 
3867 # Test: Is bootjdk explicitely set by command line arguments?
3868 
3869 
3870 # Test: Is $JAVA_HOME set?
3871 
3872 
3873 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3874 
3875 
3876 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3877 # $1: Argument to the java_home binary (optional)
3878 
3879 
3880 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3881 
3882 
3883 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3884 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3885 # $1 = Path to directory containing jdk installations.
3886 # $2 = String to append to the found JDK directory to get the proper JDK home
3887 
3888 
3889 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3890 # environmental variable as base for where to look.
3891 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3892 
3893 
3894 # Test: Is there a JDK installed in default, well-known locations?
3895 
3896 
3897 # Check that a command-line tool in the Boot JDK is correct
3898 # $1 = name of variable to assign
3899 # $2 = name of binary
3900 
3901 
3902 ###############################################################################
3903 #
3904 # We need a Boot JDK to bootstrap the build.
3905 #
3906 
3907 
3908 
3909 
3910 
3911 # BUILD_JDK: the location of the latest JDK that can run
3912 #   on the host system and supports the target class file version
3913 #   generated in this JDK build.  This variable should only be
3914 #   used after the launchers are built.
3915 #
3916 
3917 # Execute the check given as argument, and verify the result.
3918 # If the JDK was previously found, do nothing.
3919 # $1 A command line (typically autoconf macro) to execute
3920 
3921 
3922 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3923 # is different than the host system doing the build (e.g. cross-compilation),
3924 # a special BUILD_JDK is built as part of the build process.  An external
3925 # prebuilt BUILD_JDK can also be supplied.
3926 
3927 
3928 #
3929 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3930 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3931 #
3932 # This code is free software; you can redistribute it and/or modify it
3933 # under the terms of the GNU General Public License version 2 only, as
3934 # published by the Free Software Foundation.  Oracle designates this
3935 # particular file as subject to the "Classpath" exception as provided
3936 # by Oracle in the LICENSE file that accompanied this code.
3937 #
3938 # This code is distributed in the hope that it will be useful, but WITHOUT
3939 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3940 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3941 # version 2 for more details (a copy is included in the LICENSE file that
3942 # accompanied this code).
3943 #
3944 # You should have received a copy of the GNU General Public License version
3945 # 2 along with this work; if not, write to the Free Software Foundation,
3946 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3947 #
3948 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3949 # or visit www.oracle.com if you need additional information or have any
3950 # questions.
3951 #
3952 
3953 
3954 
3955 
3956 
3957 
3958 
3959 
3960 
3961 
3962 
3963 
3964 
3965 
3966 
3967 
3968 
3969 ################################################################################
3970 #
3971 # Runs icecc-create-env once and prints the error if it fails
3972 #
3973 # $1: arguments to icecc-create-env
3974 # $2: log file
3975 #
3976 
3977 
3978 ################################################################################
3979 #
3980 # Optionally enable distributed compilation of native code using icecc/icecream
3981 #
3982 
3983 
3984 
3985 
3986 
3987 
3988 
3989 #
3990 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3991 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3992 #
3993 # This code is free software; you can redistribute it and/or modify it
3994 # under the terms of the GNU General Public License version 2 only, as
3995 # published by the Free Software Foundation.  Oracle designates this
3996 # particular file as subject to the "Classpath" exception as provided
3997 # by Oracle in the LICENSE file that accompanied this code.
3998 #
3999 # This code is distributed in the hope that it will be useful, but WITHOUT
4000 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4001 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4002 # version 2 for more details (a copy is included in the LICENSE file that
4003 # accompanied this code).
4004 #
4005 # You should have received a copy of the GNU General Public License version
4006 # 2 along with this work; if not, write to the Free Software Foundation,
4007 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4008 #
4009 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4010 # or visit www.oracle.com if you need additional information or have any
4011 # questions.
4012 #
4013 
4014 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4015 # corresponding configure arguments instead
4016 
4017 
4018 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4019 # that configure can use them while detecting compilers.
4020 # TOOLCHAIN_TYPE is available here.
4021 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
4022 
4023 
4024 
4025 
4026 
4027 
4028 # Documentation on common flags used for solstudio in HIGHEST.
4029 #
4030 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4031 #          done with care, there are some assumptions below that need to
4032 #          be understood about the use of pointers, and IEEE behavior.
4033 #
4034 # -fns: Use non-standard floating point mode (not IEEE 754)
4035 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4036 # -fsingle: Use single precision floating point with 'float'
4037 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
4038 #   (Source with excessing pointer casting and data access with mixed
4039 #    pointer types are not recommended)
4040 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4041 #   (If you expect perfect errno behavior, do not use this)
4042 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4043 # -xrestrict: Pointer parameters to functions do not overlap
4044 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4045 #    If you pass in multiple pointers to the same data, do not use this)
4046 # -xlibmil: Inline some library routines
4047 #   (If you expect perfect errno behavior, do not use this)
4048 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4049 #   (If you expect perfect errno behavior, do not use this)
4050 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4051 
4052     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4053     # Bug?
4054     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4055     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4056     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4057     #fi
4058 
4059 
4060 
4061 
4062 
4063 
4064 ################################################################################
4065 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4066 #      conditionals against.
4067 # $2 - Optional prefix for each variable defined.
4068 
4069 
4070 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4071 #                                  IF_FALSE: [RUN-IF-FALSE])
4072 # ------------------------------------------------------------
4073 # Check that the C compiler supports an argument
4074 
4075 
4076 
4077 
4078 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4079 #                                    IF_FALSE: [RUN-IF-FALSE])
4080 # ------------------------------------------------------------
4081 # Check that the C++ compiler supports an argument
4082 
4083 
4084 
4085 
4086 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4087 #                                IF_FALSE: [RUN-IF-FALSE])
4088 # ------------------------------------------------------------
4089 # Check that the C and C++ compilers support an argument
4090 
4091 
4092 
4093 
4094 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4095 #                                   IF_FALSE: [RUN-IF-FALSE])
4096 # ------------------------------------------------------------
4097 # Check that the linker support an argument
4098 
4099 
4100 
4101 
4102 
4103 
4104 # FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4105 # Arguments:
4106 # $1 - Optional prefix for each variable defined.
4107 
4108 
4109 #
4110 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4111 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4112 #
4113 # This code is free software; you can redistribute it and/or modify it
4114 # under the terms of the GNU General Public License version 2 only, as
4115 # published by the Free Software Foundation.  Oracle designates this
4116 # particular file as subject to the "Classpath" exception as provided
4117 # by Oracle in the LICENSE file that accompanied this code.
4118 #
4119 # This code is distributed in the hope that it will be useful, but WITHOUT
4120 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4121 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4122 # version 2 for more details (a copy is included in the LICENSE file that
4123 # accompanied this code).
4124 #
4125 # You should have received a copy of the GNU General Public License version
4126 # 2 along with this work; if not, write to the Free Software Foundation,
4127 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4128 #
4129 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4130 # or visit www.oracle.com if you need additional information or have any
4131 # questions.
4132 #
4133 
4134 
4135 
4136 
4137 
4138 cygwin_help() {
4139   case $1 in
4140     unzip)
4141       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4142       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4143       ;;
4144     zip)
4145       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4146       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4147       ;;
4148     make)
4149       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4150       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4151       ;;
4152     freetype)
4153       HELP_MSG="
4154 The freetype library can now be build during the configure process.
4155 Download the freetype sources and unpack them into an arbitrary directory:
4156 
4157 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4158 tar -xzf freetype-2.5.3.tar.gz
4159 
4160 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4161 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4162 builds or into '<freetype_src>/lib32' for 32-bit builds.
4163 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4164 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4165 
4166 Alternatively you can unpack the sources like this to use the default directory:
4167 
4168 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4169       ;;
4170   esac
4171 }
4172 
4173 msys_help() {
4174   PKGHANDLER_COMMAND=""
4175 }
4176 
4177 apt_help() {
4178   case $1 in
4179     reduced)
4180       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4181     devkit)
4182       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4183     openjdk)
4184       PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4185     alsa)
4186       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4187     cups)
4188       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4189     freetype)
4190       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4191     ffi)
4192       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4193     x11)
4194       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4195     ccache)
4196       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4197     dtrace)
4198       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4199   esac
4200 }
4201 
4202 yum_help() {
4203   case $1 in
4204     devkit)
4205       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4206     openjdk)
4207       PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4208     alsa)
4209       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4210     cups)
4211       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4212     freetype)
4213       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4214     x11)
4215       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4216     ccache)
4217       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4218   esac
4219 }
4220 
4221 port_help() {
4222   PKGHANDLER_COMMAND=""
4223 }
4224 
4225 pkgutil_help() {
4226   PKGHANDLER_COMMAND=""
4227 }
4228 
4229 pkgadd_help() {
4230   PKGHANDLER_COMMAND=""
4231 }
4232 
4233 # This function will check if we're called from the "configure" wrapper while
4234 # printing --help. If so, we will print out additional information that can
4235 # only be extracted within the autoconf script, and then exit. This must be
4236 # called at the very beginning in configure.ac.
4237 
4238 
4239 
4240 
4241 
4242 
4243 #
4244 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4245 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4246 #
4247 # This code is free software; you can redistribute it and/or modify it
4248 # under the terms of the GNU General Public License version 2 only, as
4249 # published by the Free Software Foundation.  Oracle designates this
4250 # particular file as subject to the "Classpath" exception as provided
4251 # by Oracle in the LICENSE file that accompanied this code.
4252 #
4253 # This code is distributed in the hope that it will be useful, but WITHOUT
4254 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4255 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4256 # version 2 for more details (a copy is included in the LICENSE file that
4257 # accompanied this code).
4258 #
4259 # You should have received a copy of the GNU General Public License version
4260 # 2 along with this work; if not, write to the Free Software Foundation,
4261 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4262 #
4263 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4264 # or visit www.oracle.com if you need additional information or have any
4265 # questions.
4266 #
4267 
4268 # All valid JVM features, regardless of platform
4269 VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4270     fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4271 
4272 # All valid JVM variants
4273 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4274 
4275 ###############################################################################
4276 # Check if the specified JVM variant should be built. To be used in shell if
4277 # constructs, like this:
4278 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4279 #
4280 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4281 
4282 # Definition kept in one line to allow inlining in if statements.
4283 # Additional [] needed to keep m4 from mangling shell constructs.
4284 
4285 
4286 ###############################################################################
4287 # Check if the specified JVM features are explicitly enabled. To be used in
4288 # shell if constructs, like this:
4289 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4290 #
4291 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4292 
4293 # Definition kept in one line to allow inlining in if statements.
4294 # Additional [] needed to keep m4 from mangling shell constructs.
4295 
4296 
4297 ###############################################################################
4298 # Check which variants of the JVM that we want to build. Available variants are:
4299 #   server: normal interpreter, and a tiered C1/C2 compiler
4300 #   client: normal interpreter, and C1 (no C2 compiler)
4301 #   minimal: reduced form of client with optional features stripped out
4302 #   core: normal interpreter only, no compiler
4303 #   zero: C++ based interpreter only, no compiler
4304 #   zeroshark: C++ based interpreter, and a llvm-based compiler
4305 #   custom: baseline JVM with no default features
4306 #
4307 
4308 
4309 ###############################################################################
4310 # Check if dtrace should be enabled and has all prerequisites present.
4311 #
4312 
4313 
4314 ###############################################################################
4315 # Set up all JVM features for each JVM variant.
4316 #
4317 
4318 
4319 ###############################################################################
4320 # Validate JVM features once all setup is complete, including custom setup.
4321 #
4322 
4323 
4324 ################################################################################
4325 # Check if gtest should be built
4326 #
4327 
4328 
4329 #
4330 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4331 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4332 #
4333 # This code is free software; you can redistribute it and/or modify it
4334 # under the terms of the GNU General Public License version 2 only, as
4335 # published by the Free Software Foundation.  Oracle designates this
4336 # particular file as subject to the "Classpath" exception as provided
4337 # by Oracle in the LICENSE file that accompanied this code.
4338 #
4339 # This code is distributed in the hope that it will be useful, but WITHOUT
4340 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4341 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4342 # version 2 for more details (a copy is included in the LICENSE file that
4343 # accompanied this code).
4344 #
4345 # You should have received a copy of the GNU General Public License version
4346 # 2 along with this work; if not, write to the Free Software Foundation,
4347 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4348 #
4349 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4350 # or visit www.oracle.com if you need additional information or have any
4351 # questions.
4352 #
4353 
4354 ###############################################################################
4355 # Check which variant of the JDK that we want to build.
4356 # Currently we have:
4357 #    normal:   standard edition
4358 # but the custom make system may add other variants
4359 #
4360 # Effectively the JDK variant gives a name to a specific set of
4361 # modules to compile into the JDK.
4362 
4363 
4364 ###############################################################################
4365 
4366 # Set the debug level
4367 #    release: no debug information, all optimizations, no asserts.
4368 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4369 #    fastdebug: debug information (-g), all optimizations, all asserts
4370 #    slowdebug: debug information (-g), no optimizations, all asserts
4371 
4372 
4373 
4374 ###############################################################################
4375 #
4376 # Should we build only OpenJDK even if closed sources are present?
4377 #
4378 
4379 
4380 
4381 
4382 ###############################################################################
4383 #
4384 # Enable or disable the elliptic curve crypto implementation
4385 #
4386 
4387 
4388 
4389 
4390 ################################################################################
4391 #
4392 # Gcov coverage data for hotspot
4393 #
4394 
4395 
4396 ################################################################################
4397 #
4398 # Static build support.  When enabled will generate static
4399 # libraries instead of shared libraries for all JDK libs.
4400 #
4401 
4402 
4403 ################################################################################
4404 #
4405 # jlink options.
4406 # We always keep packaged modules in JDK image.
4407 #
4408 
4409 
4410 ################################################################################
4411 #
4412 # Check if building of the jtreg failure handler should be enabled.
4413 #
4414 
4415 
4416 ################################################################################
4417 #
4418 # Enable or disable generation of the classlist at build time
4419 #
4420 
4421 
4422 #
4423 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4424 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4425 #
4426 # This code is free software; you can redistribute it and/or modify it
4427 # under the terms of the GNU General Public License version 2 only, as
4428 # published by the Free Software Foundation.  Oracle designates this
4429 # particular file as subject to the "Classpath" exception as provided
4430 # by Oracle in the LICENSE file that accompanied this code.
4431 #
4432 # This code is distributed in the hope that it will be useful, but WITHOUT
4433 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4434 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4435 # version 2 for more details (a copy is included in the LICENSE file that
4436 # accompanied this code).
4437 #
4438 # You should have received a copy of the GNU General Public License version
4439 # 2 along with this work; if not, write to the Free Software Foundation,
4440 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4441 #
4442 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4443 # or visit www.oracle.com if you need additional information or have any
4444 # questions.
4445 #
4446 
4447 ###############################################################################
4448 #
4449 # Setup version numbers
4450 #
4451 
4452 # Verify that a given string represents a valid version number, and assign it
4453 # to a variable.
4454 
4455 # Argument 1: the variable to assign to
4456 # Argument 2: the value given by the user
4457 
4458 
4459 
4460 
4461 #
4462 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4463 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4464 #
4465 # This code is free software; you can redistribute it and/or modify it
4466 # under the terms of the GNU General Public License version 2 only, as
4467 # published by the Free Software Foundation.  Oracle designates this
4468 # particular file as subject to the "Classpath" exception as provided
4469 # by Oracle in the LICENSE file that accompanied this code.
4470 #
4471 # This code is distributed in the hope that it will be useful, but WITHOUT
4472 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4473 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4474 # version 2 for more details (a copy is included in the LICENSE file that
4475 # accompanied this code).
4476 #
4477 # You should have received a copy of the GNU General Public License version
4478 # 2 along with this work; if not, write to the Free Software Foundation,
4479 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4480 #
4481 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4482 # or visit www.oracle.com if you need additional information or have any
4483 # questions.
4484 #
4485 
4486 # Major library component reside in separate files.
4487 #
4488 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4489 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4490 #
4491 # This code is free software; you can redistribute it and/or modify it
4492 # under the terms of the GNU General Public License version 2 only, as
4493 # published by the Free Software Foundation.  Oracle designates this
4494 # particular file as subject to the "Classpath" exception as provided
4495 # by Oracle in the LICENSE file that accompanied this code.
4496 #
4497 # This code is distributed in the hope that it will be useful, but WITHOUT
4498 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4499 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4500 # version 2 for more details (a copy is included in the LICENSE file that
4501 # accompanied this code).
4502 #
4503 # You should have received a copy of the GNU General Public License version
4504 # 2 along with this work; if not, write to the Free Software Foundation,
4505 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4506 #
4507 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4508 # or visit www.oracle.com if you need additional information or have any
4509 # questions.
4510 #
4511 
4512 ################################################################################
4513 # Setup alsa (Advanced Linux Sound Architecture)
4514 ################################################################################
4515 
4516 
4517 #
4518 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4519 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4520 #
4521 # This code is free software; you can redistribute it and/or modify it
4522 # under the terms of the GNU General Public License version 2 only, as
4523 # published by the Free Software Foundation.  Oracle designates this
4524 # particular file as subject to the "Classpath" exception as provided
4525 # by Oracle in the LICENSE file that accompanied this code.
4526 #
4527 # This code is distributed in the hope that it will be useful, but WITHOUT
4528 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4529 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4530 # version 2 for more details (a copy is included in the LICENSE file that
4531 # accompanied this code).
4532 #
4533 # You should have received a copy of the GNU General Public License version
4534 # 2 along with this work; if not, write to the Free Software Foundation,
4535 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4536 #
4537 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4538 # or visit www.oracle.com if you need additional information or have any
4539 # questions.
4540 #
4541 
4542 ################################################################################
4543 # Setup bundled libraries.
4544 #
4545 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4546 # OpenJDK repository. Default is to use these libraries as bundled, but they
4547 # might be replaced by en external version by the user.
4548 ################################################################################
4549 
4550 
4551 ################################################################################
4552 # Setup libjpeg
4553 ################################################################################
4554 
4555 
4556 ################################################################################
4557 # Setup giflib
4558 ################################################################################
4559 
4560 
4561 ################################################################################
4562 # Setup libpng
4563 ################################################################################
4564 
4565 
4566 ################################################################################
4567 # Setup zlib
4568 ################################################################################
4569 
4570 
4571 ################################################################################
4572 # Setup lcms (Little CMS)
4573 ################################################################################
4574 
4575 
4576 #
4577 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4578 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4579 #
4580 # This code is free software; you can redistribute it and/or modify it
4581 # under the terms of the GNU General Public License version 2 only, as
4582 # published by the Free Software Foundation.  Oracle designates this
4583 # particular file as subject to the "Classpath" exception as provided
4584 # by Oracle in the LICENSE file that accompanied this code.
4585 #
4586 # This code is distributed in the hope that it will be useful, but WITHOUT
4587 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4588 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4589 # version 2 for more details (a copy is included in the LICENSE file that
4590 # accompanied this code).
4591 #
4592 # You should have received a copy of the GNU General Public License version
4593 # 2 along with this work; if not, write to the Free Software Foundation,
4594 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4595 #
4596 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4597 # or visit www.oracle.com if you need additional information or have any
4598 # questions.
4599 #
4600 
4601 ################################################################################
4602 # Setup cups (Common Unix Printing System)
4603 ################################################################################
4604 
4605 
4606 #
4607 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4608 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4609 #
4610 # This code is free software; you can redistribute it and/or modify it
4611 # under the terms of the GNU General Public License version 2 only, as
4612 # published by the Free Software Foundation.  Oracle designates this
4613 # particular file as subject to the "Classpath" exception as provided
4614 # by Oracle in the LICENSE file that accompanied this code.
4615 #
4616 # This code is distributed in the hope that it will be useful, but WITHOUT
4617 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4618 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4619 # version 2 for more details (a copy is included in the LICENSE file that
4620 # accompanied this code).
4621 #
4622 # You should have received a copy of the GNU General Public License version
4623 # 2 along with this work; if not, write to the Free Software Foundation,
4624 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4625 #
4626 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4627 # or visit www.oracle.com if you need additional information or have any
4628 # questions.
4629 #
4630 
4631 ################################################################################
4632 # Setup libffi (Foreign Function Interface)
4633 ################################################################################
4634 
4635 
4636 #
4637 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4638 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4639 #
4640 # This code is free software; you can redistribute it and/or modify it
4641 # under the terms of the GNU General Public License version 2 only, as
4642 # published by the Free Software Foundation.  Oracle designates this
4643 # particular file as subject to the "Classpath" exception as provided
4644 # by Oracle in the LICENSE file that accompanied this code.
4645 #
4646 # This code is distributed in the hope that it will be useful, but WITHOUT
4647 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4648 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4649 # version 2 for more details (a copy is included in the LICENSE file that
4650 # accompanied this code).
4651 #
4652 # You should have received a copy of the GNU General Public License version
4653 # 2 along with this work; if not, write to the Free Software Foundation,
4654 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4655 #
4656 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4657 # or visit www.oracle.com if you need additional information or have any
4658 # questions.
4659 #
4660 
4661 ################################################################################
4662 # Build the freetype lib from source
4663 ################################################################################
4664 
4665 
4666 ################################################################################
4667 # Check if a potential freeype library match is correct and usable
4668 ################################################################################
4669 
4670 
4671 ################################################################################
4672 # Setup freetype (The FreeType2 font rendering library)
4673 ################################################################################
4674 
4675 
4676 #
4677 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4678 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4679 #
4680 # This code is free software; you can redistribute it and/or modify it
4681 # under the terms of the GNU General Public License version 2 only, as
4682 # published by the Free Software Foundation.  Oracle designates this
4683 # particular file as subject to the "Classpath" exception as provided
4684 # by Oracle in the LICENSE file that accompanied this code.
4685 #
4686 # This code is distributed in the hope that it will be useful, but WITHOUT
4687 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4688 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4689 # version 2 for more details (a copy is included in the LICENSE file that
4690 # accompanied this code).
4691 #
4692 # You should have received a copy of the GNU General Public License version
4693 # 2 along with this work; if not, write to the Free Software Foundation,
4694 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4695 #
4696 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4697 # or visit www.oracle.com if you need additional information or have any
4698 # questions.
4699 #
4700 
4701 ################################################################################
4702 # Setup the standard C/C++ runtime libraries.
4703 #
4704 # Most importantly, determine if stdc++ should be linked statically or
4705 # dynamically.
4706 ################################################################################
4707 
4708 
4709 #
4710 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4711 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4712 #
4713 # This code is free software; you can redistribute it and/or modify it
4714 # under the terms of the GNU General Public License version 2 only, as
4715 # published by the Free Software Foundation.  Oracle designates this
4716 # particular file as subject to the "Classpath" exception as provided
4717 # by Oracle in the LICENSE file that accompanied this code.
4718 #
4719 # This code is distributed in the hope that it will be useful, but WITHOUT
4720 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4721 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4722 # version 2 for more details (a copy is included in the LICENSE file that
4723 # accompanied this code).
4724 #
4725 # You should have received a copy of the GNU General Public License version
4726 # 2 along with this work; if not, write to the Free Software Foundation,
4727 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4728 #
4729 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4730 # or visit www.oracle.com if you need additional information or have any
4731 # questions.
4732 #
4733 
4734 ################################################################################
4735 # Setup X11 Windows system
4736 ################################################################################
4737 
4738 
4739 
4740 ################################################################################
4741 # Determine which libraries are needed for this configuration
4742 ################################################################################
4743 
4744 
4745 ################################################################################
4746 # Parse library options, and setup needed libraries
4747 ################################################################################
4748 
4749 
4750 ################################################################################
4751 # Setup llvm (Low-Level VM)
4752 ################################################################################
4753 
4754 
4755 ################################################################################
4756 # Setup various libraries, typically small system libraries
4757 ################################################################################
4758 
4759 
4760 ################################################################################
4761 # libstlport.so.1 is needed for running gtest on Solaris. Find it to
4762 # redistribute it in the test image.
4763 ################################################################################
4764 
4765 
4766 
4767 #
4768 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4769 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4770 #
4771 # This code is free software; you can redistribute it and/or modify it
4772 # under the terms of the GNU General Public License version 2 only, as
4773 # published by the Free Software Foundation.  Oracle designates this
4774 # particular file as subject to the "Classpath" exception as provided
4775 # by Oracle in the LICENSE file that accompanied this code.
4776 #
4777 # This code is distributed in the hope that it will be useful, but WITHOUT
4778 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4779 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4780 # version 2 for more details (a copy is included in the LICENSE file that
4781 # accompanied this code).
4782 #
4783 # You should have received a copy of the GNU General Public License version
4784 # 2 along with this work; if not, write to the Free Software Foundation,
4785 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4786 #
4787 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4788 # or visit www.oracle.com if you need additional information or have any
4789 # questions.
4790 #
4791 
4792 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4793 # Converts autoconf style CPU name to OpenJDK style, into
4794 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4795 
4796 
4797 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4798 # Converts autoconf style OS name to OpenJDK style, into
4799 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4800 
4801 
4802 # Expects $host_os $host_cpu $build_os and $build_cpu
4803 # and $with_target_bits to have been setup!
4804 #
4805 # Translate the standard triplet(quadruplet) definition
4806 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4807 # OPENJDK_BUILD_OS, etc.
4808 
4809 
4810 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4811 # accordingly. Must be done after setting up build and target system, but before
4812 # doing anything else with these values.
4813 
4814 
4815 # Setup the legacy variables, for controlling the old makefiles.
4816 #
4817 
4818 
4819 # $1 - Either TARGET or BUILD to setup the variables for.
4820 
4821 
4822 
4823 
4824 #%%% Build and target systems %%%
4825 
4826 
4827 
4828 
4829 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4830 # Add -mX to various FLAGS variables.
4831 
4832 
4833 
4834 
4835 
4836 
4837 #
4838 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4839 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4840 #
4841 # This code is free software; you can redistribute it and/or modify it
4842 # under the terms of the GNU General Public License version 2 only, as
4843 # published by the Free Software Foundation.  Oracle designates this
4844 # particular file as subject to the "Classpath" exception as provided
4845 # by Oracle in the LICENSE file that accompanied this code.
4846 #
4847 # This code is distributed in the hope that it will be useful, but WITHOUT
4848 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4849 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4850 # version 2 for more details (a copy is included in the LICENSE file that
4851 # accompanied this code).
4852 #
4853 # You should have received a copy of the GNU General Public License version
4854 # 2 along with this work; if not, write to the Free Software Foundation,
4855 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4856 #
4857 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4858 # or visit www.oracle.com if you need additional information or have any
4859 # questions.
4860 #
4861 
4862 
4863 
4864 
4865 
4866 
4867 
4868 ################################################################################
4869 # Define a mechanism for importing extra prebuilt modules
4870 #
4871 
4872 
4873 
4874 #
4875 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4876 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4877 #
4878 # This code is free software; you can redistribute it and/or modify it
4879 # under the terms of the GNU General Public License version 2 only, as
4880 # published by the Free Software Foundation.  Oracle designates this
4881 # particular file as subject to the "Classpath" exception as provided
4882 # by Oracle in the LICENSE file that accompanied this code.
4883 #
4884 # This code is distributed in the hope that it will be useful, but WITHOUT
4885 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4886 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4887 # version 2 for more details (a copy is included in the LICENSE file that
4888 # accompanied this code).
4889 #
4890 # You should have received a copy of the GNU General Public License version
4891 # 2 along with this work; if not, write to the Free Software Foundation,
4892 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4893 #
4894 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4895 # or visit www.oracle.com if you need additional information or have any
4896 # questions.
4897 #
4898 
4899 ########################################################################
4900 # This file is responsible for detecting, verifying and setting up the
4901 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4902 # proper paths to the binaries, but it will not setup any flags.
4903 #
4904 # The binaries used is determined by the toolchain type, which is the family of
4905 # compilers and related tools that are used.
4906 ########################################################################
4907 
4908 
4909 # All valid toolchains, regardless of platform (used by help.m4)
4910 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4911 
4912 # These toolchains are valid on different platforms
4913 VALID_TOOLCHAINS_linux="gcc clang"
4914 VALID_TOOLCHAINS_solaris="solstudio"
4915 VALID_TOOLCHAINS_macosx="gcc clang"
4916 VALID_TOOLCHAINS_aix="xlc"
4917 VALID_TOOLCHAINS_windows="microsoft"
4918 
4919 # Toolchain descriptions
4920 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4921 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4922 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4923 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4924 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4925 
4926 # Minimum supported versions, empty means unspecified
4927 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4928 TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4929 TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4930 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4931 TOOLCHAIN_MINIMUM_VERSION_xlc=""
4932 
4933 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4934 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4935 # $1 - optional variable prefix for compiler and version variables (BUILD_)
4936 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4937 
4938 
4939 # Check if the configured compiler (C and C++) is of a specific version or
4940 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4941 #
4942 # Arguments:
4943 #   VERSION:   The version string to check against the found version
4944 #   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4945 #   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4946 #   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4947 
4948 
4949 
4950 
4951 # Setup a number of variables describing how native output files are
4952 # named on this platform/toolchain.
4953 
4954 
4955 # Determine which toolchain type to use, and make sure it is valid for this
4956 # platform. Setup various information about the selected toolchain.
4957 
4958 
4959 # Before we start detecting the toolchain executables, we might need some
4960 # special setup, e.g. additional paths etc.
4961 
4962 
4963 # Restore path, etc
4964 
4965 
4966 # Check if a compiler is of the toolchain type we expect, and save the version
4967 # information from it. If the compiler does not match the expected type,
4968 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4969 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4970 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4971 #
4972 # $1 = compiler to test (CC or CXX)
4973 # $2 = human readable name of compiler (C or C++)
4974 
4975 
4976 # Try to locate the given C or C++ compiler in the path, or otherwise.
4977 #
4978 # $1 = compiler to test (CC or CXX)
4979 # $2 = human readable name of compiler (C or C++)
4980 # $3 = list of compiler names to search for
4981 
4982 
4983 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4984 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4985 # archiver (AR). Verify that the compilers are correct according to the
4986 # toolchain type.
4987 
4988 
4989 # Setup additional tools that is considered a part of the toolchain, but not the
4990 # core part. Many of these are highly platform-specific and do not exist,
4991 # and/or are not needed on all platforms.
4992 
4993 
4994 # Setup the build tools (i.e, the compiler and linker used to build programs
4995 # that should be run on the build platform, not the target platform, as a build
4996 # helper). Since the non-cross-compile case uses the normal, target compilers
4997 # for this, we can only do this after these have been setup.
4998 
4999 
5000 # Setup legacy variables that are still needed as alternative ways to refer to
5001 # parts of the toolchain.
5002 
5003 
5004 # Do some additional checks on the detected tools.
5005 
5006 
5007 # Setup the JTReg Regression Test Harness.
5008 
5009 
5010 #
5011 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5012 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5013 #
5014 # This code is free software; you can redistribute it and/or modify it
5015 # under the terms of the GNU General Public License version 2 only, as
5016 # published by the Free Software Foundation.  Oracle designates this
5017 # particular file as subject to the "Classpath" exception as provided
5018 # by Oracle in the LICENSE file that accompanied this code.
5019 #
5020 # This code is distributed in the hope that it will be useful, but WITHOUT
5021 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5022 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5023 # version 2 for more details (a copy is included in the LICENSE file that
5024 # accompanied this code).
5025 #
5026 # You should have received a copy of the GNU General Public License version
5027 # 2 along with this work; if not, write to the Free Software Foundation,
5028 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5029 #
5030 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5031 # or visit www.oracle.com if you need additional information or have any
5032 # questions.
5033 #
5034 
5035 ################################################################################
5036 # The order of these defines the priority by which we try to find them.
5037 VALID_VS_VERSIONS="2013 2012 2010"
5038 
5039 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5040 VS_VERSION_INTERNAL_2010=100
5041 VS_MSVCR_2010=msvcr100.dll
5042 # We don't use msvcp on Visual Studio 2010
5043 #VS_MSVCP_2010=msvcp100.dll
5044 VS_ENVVAR_2010="VS100COMNTOOLS"
5045 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5046 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5047 VS_VS_PLATFORM_NAME_2010="v100"
5048 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5049 
5050 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5051 VS_VERSION_INTERNAL_2012=110
5052 VS_MSVCR_2012=msvcr110.dll
5053 VS_MSVCP_2012=msvcp110.dll
5054 VS_ENVVAR_2012="VS110COMNTOOLS"
5055 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5056 VS_SDK_INSTALLDIR_2012=
5057 VS_VS_PLATFORM_NAME_2012="v110"
5058 VS_SDK_PLATFORM_NAME_2012=
5059 
5060 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5061 VS_VERSION_INTERNAL_2013=120
5062 VS_MSVCR_2013=msvcr120.dll
5063 VS_MSVCP_2013=msvcp120.dll
5064 VS_ENVVAR_2013="VS120COMNTOOLS"
5065 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5066 VS_SDK_INSTALLDIR_2013=
5067 VS_VS_PLATFORM_NAME_2013="v120"
5068 VS_SDK_PLATFORM_NAME_2013=
5069 
5070 ################################################################################
5071 
5072 
5073 
5074 ################################################################################
5075 
5076 
5077 
5078 ################################################################################
5079 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5080 # build environment and assigns it to VS_ENV_CMD
5081 
5082 
5083 ################################################################################
5084 
5085 
5086 
5087 ################################################################################
5088 # Check if the VS env variables were setup prior to running configure.
5089 # If not, then find vcvarsall.bat and run it automatically, and integrate
5090 # the set env variables into the spec file.
5091 
5092 
5093 
5094 
5095 
5096 
5097 
5098 
5099 
5100 
5101 
5102 
5103 
5104 
5105 # This line needs to be here, verbatim, after all includes and the dummy hook
5106 # definitions. It is replaced with custom functionality when building
5107 # custom sources.
5108 #CUSTOM_AUTOCONF_INCLUDE
5109 
5110 # Do not change or remove the following line, it is needed for consistency checks:
5111 DATE_WHEN_GENERATED=1471531493
5112 
5113 ###############################################################################
5114 #
5115 # Initialization / Boot-strapping
5116 #
5117 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5118 # thus it jumps back and forth, each time gaining something needed later on.
5119 #
5120 ###############################################################################
5121 
5122 # If we are requested to print additional help, do that and then exit.
5123 # This must be the very first call.
5124 
5125   if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5126 
5127     # Print available toolchains
5128     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5129     $PRINTF "Which are valid to use depends on the build platform.\n"
5130     for toolchain in $VALID_TOOLCHAINS_all; do
5131       # Use indirect variable referencing
5132       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5133       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5134       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5135     done
5136     $PRINTF "\n"
5137 
5138     # Print available jvm features
5139     $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5140     $PRINTF "Which are valid to use depends on the target platform.\n  "
5141     $PRINTF "%s " $VALID_JVM_FEATURES
5142     $PRINTF "\n"
5143 
5144     # And now exit directly
5145     exit 0
5146   fi
5147 
5148 
5149 # Basic initialization that must happen first of all in the normal process.
5150 
5151   # Save the original command line. This is passed to us by the wrapper configure script.
5152 
5153   # Save the path variable before it gets changed
5154   ORIGINAL_PATH="$PATH"
5155 
5156   DATE_WHEN_CONFIGURED=`LANG=C date`
5157 
5158   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5159 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5160   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5161 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5162 
5163 
5164   # Start with tools that do not need have cross compilation support
5165   # and can be expected to be found in the default PATH. These tools are
5166   # used by configure.
5167 
5168   # First are all the simple required tools.
5169 
5170 
5171 
5172   # Publish this variable in the help.
5173 
5174 
5175   if [ -z "${BASENAME+x}" ]; then
5176     # The variable is not set by user, try to locate tool using the code snippet
5177     for ac_prog in basename
5178 do
5179   # Extract the first word of "$ac_prog", so it can be a program name with args.
5180 set dummy $ac_prog; ac_word=$2
5181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5182 $as_echo_n "checking for $ac_word... " >&6; }
5183 if ${ac_cv_path_BASENAME+:} false; then :
5184   $as_echo_n "(cached) " >&6
5185 else
5186   case $BASENAME in
5187   [\\/]* | ?:[\\/]*)
5188   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5189   ;;
5190   *)
5191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5192 for as_dir in $PATH
5193 do
5194   IFS=$as_save_IFS
5195   test -z "$as_dir" && as_dir=.
5196     for ac_exec_ext in '' $ac_executable_extensions; do
5197   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5198     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5199     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5200     break 2
5201   fi
5202 done
5203   done
5204 IFS=$as_save_IFS
5205 
5206   ;;
5207 esac
5208 fi
5209 BASENAME=$ac_cv_path_BASENAME
5210 if test -n "$BASENAME"; then
5211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5212 $as_echo "$BASENAME" >&6; }
5213 else
5214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5215 $as_echo "no" >&6; }
5216 fi
5217 
5218 
5219   test -n "$BASENAME" && break
5220 done
5221 
5222   else
5223     # The variable is set, but is it from the command line or the environment?
5224 
5225     # Try to remove the string !BASENAME! from our list.
5226     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5227     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5228       # If it failed, the variable was not from the command line. Ignore it,
5229       # but warn the user (except for BASH, which is always set by the calling BASH).
5230       if test "xBASENAME" != xBASH; then
5231         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5232 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5233       fi
5234       # Try to locate tool using the code snippet
5235       for ac_prog in basename
5236 do
5237   # Extract the first word of "$ac_prog", so it can be a program name with args.
5238 set dummy $ac_prog; ac_word=$2
5239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5240 $as_echo_n "checking for $ac_word... " >&6; }
5241 if ${ac_cv_path_BASENAME+:} false; then :
5242   $as_echo_n "(cached) " >&6
5243 else
5244   case $BASENAME in
5245   [\\/]* | ?:[\\/]*)
5246   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5247   ;;
5248   *)
5249   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5250 for as_dir in $PATH
5251 do
5252   IFS=$as_save_IFS
5253   test -z "$as_dir" && as_dir=.
5254     for ac_exec_ext in '' $ac_executable_extensions; do
5255   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5256     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5258     break 2
5259   fi
5260 done
5261   done
5262 IFS=$as_save_IFS
5263 
5264   ;;
5265 esac
5266 fi
5267 BASENAME=$ac_cv_path_BASENAME
5268 if test -n "$BASENAME"; then
5269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5270 $as_echo "$BASENAME" >&6; }
5271 else
5272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5273 $as_echo "no" >&6; }
5274 fi
5275 
5276 
5277   test -n "$BASENAME" && break
5278 done
5279 
5280     else
5281       # If it succeeded, then it was overridden by the user. We will use it
5282       # for the tool.
5283 
5284       # First remove it from the list of overridden variables, so we can test
5285       # for unknown variables in the end.
5286       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5287 
5288       # Check if we try to supply an empty value
5289       if test "x$BASENAME" = x; then
5290         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5291 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5292         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5293 $as_echo_n "checking for BASENAME... " >&6; }
5294         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5295 $as_echo "disabled" >&6; }
5296       else
5297         # Check if the provided tool contains a complete path.
5298         tool_specified="$BASENAME"
5299         tool_basename="${tool_specified##*/}"
5300         if test "x$tool_basename" = "x$tool_specified"; then
5301           # A command without a complete path is provided, search $PATH.
5302           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5303 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5304           # Extract the first word of "$tool_basename", so it can be a program name with args.
5305 set dummy $tool_basename; ac_word=$2
5306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5307 $as_echo_n "checking for $ac_word... " >&6; }
5308 if ${ac_cv_path_BASENAME+:} false; then :
5309   $as_echo_n "(cached) " >&6
5310 else
5311   case $BASENAME in
5312   [\\/]* | ?:[\\/]*)
5313   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5314   ;;
5315   *)
5316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5317 for as_dir in $PATH
5318 do
5319   IFS=$as_save_IFS
5320   test -z "$as_dir" && as_dir=.
5321     for ac_exec_ext in '' $ac_executable_extensions; do
5322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5323     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5325     break 2
5326   fi
5327 done
5328   done
5329 IFS=$as_save_IFS
5330 
5331   ;;
5332 esac
5333 fi
5334 BASENAME=$ac_cv_path_BASENAME
5335 if test -n "$BASENAME"; then
5336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5337 $as_echo "$BASENAME" >&6; }
5338 else
5339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5340 $as_echo "no" >&6; }
5341 fi
5342 
5343 
5344           if test "x$BASENAME" = x; then
5345             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5346           fi
5347         else
5348           # Otherwise we believe it is a complete path. Use it as it is.
5349           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5350 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5351           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5352 $as_echo_n "checking for BASENAME... " >&6; }
5353           if test ! -x "$tool_specified"; then
5354             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5355 $as_echo "not found" >&6; }
5356             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5357           fi
5358           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5359 $as_echo "$tool_specified" >&6; }
5360         fi
5361       fi
5362     fi
5363 
5364   fi
5365 
5366 
5367 
5368   if test "x$BASENAME" = x; then
5369     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5370   fi
5371 
5372 
5373 
5374 
5375 
5376   # Publish this variable in the help.
5377 
5378 
5379   if [ -z "${BASH+x}" ]; then
5380     # The variable is not set by user, try to locate tool using the code snippet
5381     for ac_prog in bash
5382 do
5383   # Extract the first word of "$ac_prog", so it can be a program name with args.
5384 set dummy $ac_prog; ac_word=$2
5385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5386 $as_echo_n "checking for $ac_word... " >&6; }
5387 if ${ac_cv_path_BASH+:} false; then :
5388   $as_echo_n "(cached) " >&6
5389 else
5390   case $BASH in
5391   [\\/]* | ?:[\\/]*)
5392   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5393   ;;
5394   *)
5395   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5396 for as_dir in $PATH
5397 do
5398   IFS=$as_save_IFS
5399   test -z "$as_dir" && as_dir=.
5400     for ac_exec_ext in '' $ac_executable_extensions; do
5401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5402     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5404     break 2
5405   fi
5406 done
5407   done
5408 IFS=$as_save_IFS
5409 
5410   ;;
5411 esac
5412 fi
5413 BASH=$ac_cv_path_BASH
5414 if test -n "$BASH"; then
5415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5416 $as_echo "$BASH" >&6; }
5417 else
5418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5419 $as_echo "no" >&6; }
5420 fi
5421 
5422 
5423   test -n "$BASH" && break
5424 done
5425 
5426   else
5427     # The variable is set, but is it from the command line or the environment?
5428 
5429     # Try to remove the string !BASH! from our list.
5430     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5431     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5432       # If it failed, the variable was not from the command line. Ignore it,
5433       # but warn the user (except for BASH, which is always set by the calling BASH).
5434       if test "xBASH" != xBASH; then
5435         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5436 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5437       fi
5438       # Try to locate tool using the code snippet
5439       for ac_prog in bash
5440 do
5441   # Extract the first word of "$ac_prog", so it can be a program name with args.
5442 set dummy $ac_prog; ac_word=$2
5443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5444 $as_echo_n "checking for $ac_word... " >&6; }
5445 if ${ac_cv_path_BASH+:} false; then :
5446   $as_echo_n "(cached) " >&6
5447 else
5448   case $BASH in
5449   [\\/]* | ?:[\\/]*)
5450   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5451   ;;
5452   *)
5453   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5454 for as_dir in $PATH
5455 do
5456   IFS=$as_save_IFS
5457   test -z "$as_dir" && as_dir=.
5458     for ac_exec_ext in '' $ac_executable_extensions; do
5459   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5460     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5461     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5462     break 2
5463   fi
5464 done
5465   done
5466 IFS=$as_save_IFS
5467 
5468   ;;
5469 esac
5470 fi
5471 BASH=$ac_cv_path_BASH
5472 if test -n "$BASH"; then
5473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5474 $as_echo "$BASH" >&6; }
5475 else
5476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5477 $as_echo "no" >&6; }
5478 fi
5479 
5480 
5481   test -n "$BASH" && break
5482 done
5483 
5484     else
5485       # If it succeeded, then it was overridden by the user. We will use it
5486       # for the tool.
5487 
5488       # First remove it from the list of overridden variables, so we can test
5489       # for unknown variables in the end.
5490       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5491 
5492       # Check if we try to supply an empty value
5493       if test "x$BASH" = x; then
5494         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5495 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5496         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5497 $as_echo_n "checking for BASH... " >&6; }
5498         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5499 $as_echo "disabled" >&6; }
5500       else
5501         # Check if the provided tool contains a complete path.
5502         tool_specified="$BASH"
5503         tool_basename="${tool_specified##*/}"
5504         if test "x$tool_basename" = "x$tool_specified"; then
5505           # A command without a complete path is provided, search $PATH.
5506           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5507 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5508           # Extract the first word of "$tool_basename", so it can be a program name with args.
5509 set dummy $tool_basename; ac_word=$2
5510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5511 $as_echo_n "checking for $ac_word... " >&6; }
5512 if ${ac_cv_path_BASH+:} false; then :
5513   $as_echo_n "(cached) " >&6
5514 else
5515   case $BASH in
5516   [\\/]* | ?:[\\/]*)
5517   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5518   ;;
5519   *)
5520   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5521 for as_dir in $PATH
5522 do
5523   IFS=$as_save_IFS
5524   test -z "$as_dir" && as_dir=.
5525     for ac_exec_ext in '' $ac_executable_extensions; do
5526   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5527     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5529     break 2
5530   fi
5531 done
5532   done
5533 IFS=$as_save_IFS
5534 
5535   ;;
5536 esac
5537 fi
5538 BASH=$ac_cv_path_BASH
5539 if test -n "$BASH"; then
5540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5541 $as_echo "$BASH" >&6; }
5542 else
5543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5544 $as_echo "no" >&6; }
5545 fi
5546 
5547 
5548           if test "x$BASH" = x; then
5549             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5550           fi
5551         else
5552           # Otherwise we believe it is a complete path. Use it as it is.
5553           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5554 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5555           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5556 $as_echo_n "checking for BASH... " >&6; }
5557           if test ! -x "$tool_specified"; then
5558             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5559 $as_echo "not found" >&6; }
5560             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5561           fi
5562           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5563 $as_echo "$tool_specified" >&6; }
5564         fi
5565       fi
5566     fi
5567 
5568   fi
5569 
5570 
5571 
5572   if test "x$BASH" = x; then
5573     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5574   fi
5575 
5576 
5577 
5578 
5579 
5580   # Publish this variable in the help.
5581 
5582 
5583   if [ -z "${CAT+x}" ]; then
5584     # The variable is not set by user, try to locate tool using the code snippet
5585     for ac_prog in cat
5586 do
5587   # Extract the first word of "$ac_prog", so it can be a program name with args.
5588 set dummy $ac_prog; ac_word=$2
5589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5590 $as_echo_n "checking for $ac_word... " >&6; }
5591 if ${ac_cv_path_CAT+:} false; then :
5592   $as_echo_n "(cached) " >&6
5593 else
5594   case $CAT in
5595   [\\/]* | ?:[\\/]*)
5596   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5597   ;;
5598   *)
5599   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5600 for as_dir in $PATH
5601 do
5602   IFS=$as_save_IFS
5603   test -z "$as_dir" && as_dir=.
5604     for ac_exec_ext in '' $ac_executable_extensions; do
5605   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5606     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5607     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5608     break 2
5609   fi
5610 done
5611   done
5612 IFS=$as_save_IFS
5613 
5614   ;;
5615 esac
5616 fi
5617 CAT=$ac_cv_path_CAT
5618 if test -n "$CAT"; then
5619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5620 $as_echo "$CAT" >&6; }
5621 else
5622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5623 $as_echo "no" >&6; }
5624 fi
5625 
5626 
5627   test -n "$CAT" && break
5628 done
5629 
5630   else
5631     # The variable is set, but is it from the command line or the environment?
5632 
5633     # Try to remove the string !CAT! from our list.
5634     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5635     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5636       # If it failed, the variable was not from the command line. Ignore it,
5637       # but warn the user (except for BASH, which is always set by the calling BASH).
5638       if test "xCAT" != xBASH; then
5639         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5640 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5641       fi
5642       # Try to locate tool using the code snippet
5643       for ac_prog in cat
5644 do
5645   # Extract the first word of "$ac_prog", so it can be a program name with args.
5646 set dummy $ac_prog; ac_word=$2
5647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5648 $as_echo_n "checking for $ac_word... " >&6; }
5649 if ${ac_cv_path_CAT+:} false; then :
5650   $as_echo_n "(cached) " >&6
5651 else
5652   case $CAT in
5653   [\\/]* | ?:[\\/]*)
5654   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5655   ;;
5656   *)
5657   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5658 for as_dir in $PATH
5659 do
5660   IFS=$as_save_IFS
5661   test -z "$as_dir" && as_dir=.
5662     for ac_exec_ext in '' $ac_executable_extensions; do
5663   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5664     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5666     break 2
5667   fi
5668 done
5669   done
5670 IFS=$as_save_IFS
5671 
5672   ;;
5673 esac
5674 fi
5675 CAT=$ac_cv_path_CAT
5676 if test -n "$CAT"; then
5677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5678 $as_echo "$CAT" >&6; }
5679 else
5680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5681 $as_echo "no" >&6; }
5682 fi
5683 
5684 
5685   test -n "$CAT" && break
5686 done
5687 
5688     else
5689       # If it succeeded, then it was overridden by the user. We will use it
5690       # for the tool.
5691 
5692       # First remove it from the list of overridden variables, so we can test
5693       # for unknown variables in the end.
5694       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5695 
5696       # Check if we try to supply an empty value
5697       if test "x$CAT" = x; then
5698         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5699 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5700         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5701 $as_echo_n "checking for CAT... " >&6; }
5702         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5703 $as_echo "disabled" >&6; }
5704       else
5705         # Check if the provided tool contains a complete path.
5706         tool_specified="$CAT"
5707         tool_basename="${tool_specified##*/}"
5708         if test "x$tool_basename" = "x$tool_specified"; then
5709           # A command without a complete path is provided, search $PATH.
5710           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5711 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5712           # Extract the first word of "$tool_basename", so it can be a program name with args.
5713 set dummy $tool_basename; ac_word=$2
5714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5715 $as_echo_n "checking for $ac_word... " >&6; }
5716 if ${ac_cv_path_CAT+:} false; then :
5717   $as_echo_n "(cached) " >&6
5718 else
5719   case $CAT in
5720   [\\/]* | ?:[\\/]*)
5721   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5722   ;;
5723   *)
5724   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5725 for as_dir in $PATH
5726 do
5727   IFS=$as_save_IFS
5728   test -z "$as_dir" && as_dir=.
5729     for ac_exec_ext in '' $ac_executable_extensions; do
5730   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5731     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5732     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5733     break 2
5734   fi
5735 done
5736   done
5737 IFS=$as_save_IFS
5738 
5739   ;;
5740 esac
5741 fi
5742 CAT=$ac_cv_path_CAT
5743 if test -n "$CAT"; then
5744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5745 $as_echo "$CAT" >&6; }
5746 else
5747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5748 $as_echo "no" >&6; }
5749 fi
5750 
5751 
5752           if test "x$CAT" = x; then
5753             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5754           fi
5755         else
5756           # Otherwise we believe it is a complete path. Use it as it is.
5757           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5758 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5759           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5760 $as_echo_n "checking for CAT... " >&6; }
5761           if test ! -x "$tool_specified"; then
5762             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5763 $as_echo "not found" >&6; }
5764             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5765           fi
5766           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5767 $as_echo "$tool_specified" >&6; }
5768         fi
5769       fi
5770     fi
5771 
5772   fi
5773 
5774 
5775 
5776   if test "x$CAT" = x; then
5777     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5778   fi
5779 
5780 
5781 
5782 
5783 
5784   # Publish this variable in the help.
5785 
5786 
5787   if [ -z "${CHMOD+x}" ]; then
5788     # The variable is not set by user, try to locate tool using the code snippet
5789     for ac_prog in chmod
5790 do
5791   # Extract the first word of "$ac_prog", so it can be a program name with args.
5792 set dummy $ac_prog; ac_word=$2
5793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5794 $as_echo_n "checking for $ac_word... " >&6; }
5795 if ${ac_cv_path_CHMOD+:} false; then :
5796   $as_echo_n "(cached) " >&6
5797 else
5798   case $CHMOD in
5799   [\\/]* | ?:[\\/]*)
5800   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5801   ;;
5802   *)
5803   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5804 for as_dir in $PATH
5805 do
5806   IFS=$as_save_IFS
5807   test -z "$as_dir" && as_dir=.
5808     for ac_exec_ext in '' $ac_executable_extensions; do
5809   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5810     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5811     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5812     break 2
5813   fi
5814 done
5815   done
5816 IFS=$as_save_IFS
5817 
5818   ;;
5819 esac
5820 fi
5821 CHMOD=$ac_cv_path_CHMOD
5822 if test -n "$CHMOD"; then
5823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5824 $as_echo "$CHMOD" >&6; }
5825 else
5826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5827 $as_echo "no" >&6; }
5828 fi
5829 
5830 
5831   test -n "$CHMOD" && break
5832 done
5833 
5834   else
5835     # The variable is set, but is it from the command line or the environment?
5836 
5837     # Try to remove the string !CHMOD! from our list.
5838     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5839     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5840       # If it failed, the variable was not from the command line. Ignore it,
5841       # but warn the user (except for BASH, which is always set by the calling BASH).
5842       if test "xCHMOD" != xBASH; then
5843         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5844 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5845       fi
5846       # Try to locate tool using the code snippet
5847       for ac_prog in chmod
5848 do
5849   # Extract the first word of "$ac_prog", so it can be a program name with args.
5850 set dummy $ac_prog; ac_word=$2
5851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5852 $as_echo_n "checking for $ac_word... " >&6; }
5853 if ${ac_cv_path_CHMOD+:} false; then :
5854   $as_echo_n "(cached) " >&6
5855 else
5856   case $CHMOD in
5857   [\\/]* | ?:[\\/]*)
5858   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5859   ;;
5860   *)
5861   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5862 for as_dir in $PATH
5863 do
5864   IFS=$as_save_IFS
5865   test -z "$as_dir" && as_dir=.
5866     for ac_exec_ext in '' $ac_executable_extensions; do
5867   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5868     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5869     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5870     break 2
5871   fi
5872 done
5873   done
5874 IFS=$as_save_IFS
5875 
5876   ;;
5877 esac
5878 fi
5879 CHMOD=$ac_cv_path_CHMOD
5880 if test -n "$CHMOD"; then
5881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5882 $as_echo "$CHMOD" >&6; }
5883 else
5884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5885 $as_echo "no" >&6; }
5886 fi
5887 
5888 
5889   test -n "$CHMOD" && break
5890 done
5891 
5892     else
5893       # If it succeeded, then it was overridden by the user. We will use it
5894       # for the tool.
5895 
5896       # First remove it from the list of overridden variables, so we can test
5897       # for unknown variables in the end.
5898       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5899 
5900       # Check if we try to supply an empty value
5901       if test "x$CHMOD" = x; then
5902         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5903 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5904         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5905 $as_echo_n "checking for CHMOD... " >&6; }
5906         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5907 $as_echo "disabled" >&6; }
5908       else
5909         # Check if the provided tool contains a complete path.
5910         tool_specified="$CHMOD"
5911         tool_basename="${tool_specified##*/}"
5912         if test "x$tool_basename" = "x$tool_specified"; then
5913           # A command without a complete path is provided, search $PATH.
5914           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5915 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5916           # Extract the first word of "$tool_basename", so it can be a program name with args.
5917 set dummy $tool_basename; ac_word=$2
5918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5919 $as_echo_n "checking for $ac_word... " >&6; }
5920 if ${ac_cv_path_CHMOD+:} false; then :
5921   $as_echo_n "(cached) " >&6
5922 else
5923   case $CHMOD in
5924   [\\/]* | ?:[\\/]*)
5925   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5926   ;;
5927   *)
5928   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929 for as_dir in $PATH
5930 do
5931   IFS=$as_save_IFS
5932   test -z "$as_dir" && as_dir=.
5933     for ac_exec_ext in '' $ac_executable_extensions; do
5934   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5935     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5936     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5937     break 2
5938   fi
5939 done
5940   done
5941 IFS=$as_save_IFS
5942 
5943   ;;
5944 esac
5945 fi
5946 CHMOD=$ac_cv_path_CHMOD
5947 if test -n "$CHMOD"; then
5948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5949 $as_echo "$CHMOD" >&6; }
5950 else
5951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5952 $as_echo "no" >&6; }
5953 fi
5954 
5955 
5956           if test "x$CHMOD" = x; then
5957             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5958           fi
5959         else
5960           # Otherwise we believe it is a complete path. Use it as it is.
5961           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5962 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5963           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5964 $as_echo_n "checking for CHMOD... " >&6; }
5965           if test ! -x "$tool_specified"; then
5966             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5967 $as_echo "not found" >&6; }
5968             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5969           fi
5970           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5971 $as_echo "$tool_specified" >&6; }
5972         fi
5973       fi
5974     fi
5975 
5976   fi
5977 
5978 
5979 
5980   if test "x$CHMOD" = x; then
5981     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5982   fi
5983 
5984 
5985 
5986 
5987 
5988   # Publish this variable in the help.
5989 
5990 
5991   if [ -z "${CMP+x}" ]; then
5992     # The variable is not set by user, try to locate tool using the code snippet
5993     for ac_prog in cmp
5994 do
5995   # Extract the first word of "$ac_prog", so it can be a program name with args.
5996 set dummy $ac_prog; ac_word=$2
5997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5998 $as_echo_n "checking for $ac_word... " >&6; }
5999 if ${ac_cv_path_CMP+:} false; then :
6000   $as_echo_n "(cached) " >&6
6001 else
6002   case $CMP in
6003   [\\/]* | ?:[\\/]*)
6004   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6005   ;;
6006   *)
6007   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6008 for as_dir in $PATH
6009 do
6010   IFS=$as_save_IFS
6011   test -z "$as_dir" && as_dir=.
6012     for ac_exec_ext in '' $ac_executable_extensions; do
6013   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6014     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6015     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6016     break 2
6017   fi
6018 done
6019   done
6020 IFS=$as_save_IFS
6021 
6022   ;;
6023 esac
6024 fi
6025 CMP=$ac_cv_path_CMP
6026 if test -n "$CMP"; then
6027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6028 $as_echo "$CMP" >&6; }
6029 else
6030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6031 $as_echo "no" >&6; }
6032 fi
6033 
6034 
6035   test -n "$CMP" && break
6036 done
6037 
6038   else
6039     # The variable is set, but is it from the command line or the environment?
6040 
6041     # Try to remove the string !CMP! from our list.
6042     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6043     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6044       # If it failed, the variable was not from the command line. Ignore it,
6045       # but warn the user (except for BASH, which is always set by the calling BASH).
6046       if test "xCMP" != xBASH; then
6047         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6048 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6049       fi
6050       # Try to locate tool using the code snippet
6051       for ac_prog in cmp
6052 do
6053   # Extract the first word of "$ac_prog", so it can be a program name with args.
6054 set dummy $ac_prog; ac_word=$2
6055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6056 $as_echo_n "checking for $ac_word... " >&6; }
6057 if ${ac_cv_path_CMP+:} false; then :
6058   $as_echo_n "(cached) " >&6
6059 else
6060   case $CMP in
6061   [\\/]* | ?:[\\/]*)
6062   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6063   ;;
6064   *)
6065   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6066 for as_dir in $PATH
6067 do
6068   IFS=$as_save_IFS
6069   test -z "$as_dir" && as_dir=.
6070     for ac_exec_ext in '' $ac_executable_extensions; do
6071   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6072     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6073     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6074     break 2
6075   fi
6076 done
6077   done
6078 IFS=$as_save_IFS
6079 
6080   ;;
6081 esac
6082 fi
6083 CMP=$ac_cv_path_CMP
6084 if test -n "$CMP"; then
6085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6086 $as_echo "$CMP" >&6; }
6087 else
6088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6089 $as_echo "no" >&6; }
6090 fi
6091 
6092 
6093   test -n "$CMP" && break
6094 done
6095 
6096     else
6097       # If it succeeded, then it was overridden by the user. We will use it
6098       # for the tool.
6099 
6100       # First remove it from the list of overridden variables, so we can test
6101       # for unknown variables in the end.
6102       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6103 
6104       # Check if we try to supply an empty value
6105       if test "x$CMP" = x; then
6106         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6107 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6108         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6109 $as_echo_n "checking for CMP... " >&6; }
6110         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6111 $as_echo "disabled" >&6; }
6112       else
6113         # Check if the provided tool contains a complete path.
6114         tool_specified="$CMP"
6115         tool_basename="${tool_specified##*/}"
6116         if test "x$tool_basename" = "x$tool_specified"; then
6117           # A command without a complete path is provided, search $PATH.
6118           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6119 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6120           # Extract the first word of "$tool_basename", so it can be a program name with args.
6121 set dummy $tool_basename; ac_word=$2
6122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6123 $as_echo_n "checking for $ac_word... " >&6; }
6124 if ${ac_cv_path_CMP+:} false; then :
6125   $as_echo_n "(cached) " >&6
6126 else
6127   case $CMP in
6128   [\\/]* | ?:[\\/]*)
6129   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6130   ;;
6131   *)
6132   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6133 for as_dir in $PATH
6134 do
6135   IFS=$as_save_IFS
6136   test -z "$as_dir" && as_dir=.
6137     for ac_exec_ext in '' $ac_executable_extensions; do
6138   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6139     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6140     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6141     break 2
6142   fi
6143 done
6144   done
6145 IFS=$as_save_IFS
6146 
6147   ;;
6148 esac
6149 fi
6150 CMP=$ac_cv_path_CMP
6151 if test -n "$CMP"; then
6152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6153 $as_echo "$CMP" >&6; }
6154 else
6155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6156 $as_echo "no" >&6; }
6157 fi
6158 
6159 
6160           if test "x$CMP" = x; then
6161             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6162           fi
6163         else
6164           # Otherwise we believe it is a complete path. Use it as it is.
6165           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6166 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6167           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6168 $as_echo_n "checking for CMP... " >&6; }
6169           if test ! -x "$tool_specified"; then
6170             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6171 $as_echo "not found" >&6; }
6172             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6173           fi
6174           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6175 $as_echo "$tool_specified" >&6; }
6176         fi
6177       fi
6178     fi
6179 
6180   fi
6181 
6182 
6183 
6184   if test "x$CMP" = x; then
6185     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6186   fi
6187 
6188 
6189 
6190 
6191 
6192   # Publish this variable in the help.
6193 
6194 
6195   if [ -z "${COMM+x}" ]; then
6196     # The variable is not set by user, try to locate tool using the code snippet
6197     for ac_prog in comm
6198 do
6199   # Extract the first word of "$ac_prog", so it can be a program name with args.
6200 set dummy $ac_prog; ac_word=$2
6201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6202 $as_echo_n "checking for $ac_word... " >&6; }
6203 if ${ac_cv_path_COMM+:} false; then :
6204   $as_echo_n "(cached) " >&6
6205 else
6206   case $COMM in
6207   [\\/]* | ?:[\\/]*)
6208   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6209   ;;
6210   *)
6211   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6212 for as_dir in $PATH
6213 do
6214   IFS=$as_save_IFS
6215   test -z "$as_dir" && as_dir=.
6216     for ac_exec_ext in '' $ac_executable_extensions; do
6217   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6218     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6219     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6220     break 2
6221   fi
6222 done
6223   done
6224 IFS=$as_save_IFS
6225 
6226   ;;
6227 esac
6228 fi
6229 COMM=$ac_cv_path_COMM
6230 if test -n "$COMM"; then
6231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6232 $as_echo "$COMM" >&6; }
6233 else
6234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6235 $as_echo "no" >&6; }
6236 fi
6237 
6238 
6239   test -n "$COMM" && break
6240 done
6241 
6242   else
6243     # The variable is set, but is it from the command line or the environment?
6244 
6245     # Try to remove the string !COMM! from our list.
6246     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6247     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6248       # If it failed, the variable was not from the command line. Ignore it,
6249       # but warn the user (except for BASH, which is always set by the calling BASH).
6250       if test "xCOMM" != xBASH; then
6251         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6252 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6253       fi
6254       # Try to locate tool using the code snippet
6255       for ac_prog in comm
6256 do
6257   # Extract the first word of "$ac_prog", so it can be a program name with args.
6258 set dummy $ac_prog; ac_word=$2
6259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6260 $as_echo_n "checking for $ac_word... " >&6; }
6261 if ${ac_cv_path_COMM+:} false; then :
6262   $as_echo_n "(cached) " >&6
6263 else
6264   case $COMM in
6265   [\\/]* | ?:[\\/]*)
6266   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6267   ;;
6268   *)
6269   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6270 for as_dir in $PATH
6271 do
6272   IFS=$as_save_IFS
6273   test -z "$as_dir" && as_dir=.
6274     for ac_exec_ext in '' $ac_executable_extensions; do
6275   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6276     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6277     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6278     break 2
6279   fi
6280 done
6281   done
6282 IFS=$as_save_IFS
6283 
6284   ;;
6285 esac
6286 fi
6287 COMM=$ac_cv_path_COMM
6288 if test -n "$COMM"; then
6289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6290 $as_echo "$COMM" >&6; }
6291 else
6292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6293 $as_echo "no" >&6; }
6294 fi
6295 
6296 
6297   test -n "$COMM" && break
6298 done
6299 
6300     else
6301       # If it succeeded, then it was overridden by the user. We will use it
6302       # for the tool.
6303 
6304       # First remove it from the list of overridden variables, so we can test
6305       # for unknown variables in the end.
6306       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6307 
6308       # Check if we try to supply an empty value
6309       if test "x$COMM" = x; then
6310         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6311 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6312         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6313 $as_echo_n "checking for COMM... " >&6; }
6314         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6315 $as_echo "disabled" >&6; }
6316       else
6317         # Check if the provided tool contains a complete path.
6318         tool_specified="$COMM"
6319         tool_basename="${tool_specified##*/}"
6320         if test "x$tool_basename" = "x$tool_specified"; then
6321           # A command without a complete path is provided, search $PATH.
6322           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6323 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6324           # Extract the first word of "$tool_basename", so it can be a program name with args.
6325 set dummy $tool_basename; ac_word=$2
6326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6327 $as_echo_n "checking for $ac_word... " >&6; }
6328 if ${ac_cv_path_COMM+:} false; then :
6329   $as_echo_n "(cached) " >&6
6330 else
6331   case $COMM in
6332   [\\/]* | ?:[\\/]*)
6333   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6334   ;;
6335   *)
6336   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6337 for as_dir in $PATH
6338 do
6339   IFS=$as_save_IFS
6340   test -z "$as_dir" && as_dir=.
6341     for ac_exec_ext in '' $ac_executable_extensions; do
6342   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6343     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6344     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6345     break 2
6346   fi
6347 done
6348   done
6349 IFS=$as_save_IFS
6350 
6351   ;;
6352 esac
6353 fi
6354 COMM=$ac_cv_path_COMM
6355 if test -n "$COMM"; then
6356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6357 $as_echo "$COMM" >&6; }
6358 else
6359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6360 $as_echo "no" >&6; }
6361 fi
6362 
6363 
6364           if test "x$COMM" = x; then
6365             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6366           fi
6367         else
6368           # Otherwise we believe it is a complete path. Use it as it is.
6369           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6370 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6371           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6372 $as_echo_n "checking for COMM... " >&6; }
6373           if test ! -x "$tool_specified"; then
6374             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6375 $as_echo "not found" >&6; }
6376             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6377           fi
6378           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6379 $as_echo "$tool_specified" >&6; }
6380         fi
6381       fi
6382     fi
6383 
6384   fi
6385 
6386 
6387 
6388   if test "x$COMM" = x; then
6389     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6390   fi
6391 
6392 
6393 
6394 
6395 
6396   # Publish this variable in the help.
6397 
6398 
6399   if [ -z "${CP+x}" ]; then
6400     # The variable is not set by user, try to locate tool using the code snippet
6401     for ac_prog in cp
6402 do
6403   # Extract the first word of "$ac_prog", so it can be a program name with args.
6404 set dummy $ac_prog; ac_word=$2
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6406 $as_echo_n "checking for $ac_word... " >&6; }
6407 if ${ac_cv_path_CP+:} false; then :
6408   $as_echo_n "(cached) " >&6
6409 else
6410   case $CP in
6411   [\\/]* | ?:[\\/]*)
6412   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6413   ;;
6414   *)
6415   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6416 for as_dir in $PATH
6417 do
6418   IFS=$as_save_IFS
6419   test -z "$as_dir" && as_dir=.
6420     for ac_exec_ext in '' $ac_executable_extensions; do
6421   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6422     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6423     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6424     break 2
6425   fi
6426 done
6427   done
6428 IFS=$as_save_IFS
6429 
6430   ;;
6431 esac
6432 fi
6433 CP=$ac_cv_path_CP
6434 if test -n "$CP"; then
6435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6436 $as_echo "$CP" >&6; }
6437 else
6438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6439 $as_echo "no" >&6; }
6440 fi
6441 
6442 
6443   test -n "$CP" && break
6444 done
6445 
6446   else
6447     # The variable is set, but is it from the command line or the environment?
6448 
6449     # Try to remove the string !CP! from our list.
6450     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6451     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6452       # If it failed, the variable was not from the command line. Ignore it,
6453       # but warn the user (except for BASH, which is always set by the calling BASH).
6454       if test "xCP" != xBASH; then
6455         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6456 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6457       fi
6458       # Try to locate tool using the code snippet
6459       for ac_prog in cp
6460 do
6461   # Extract the first word of "$ac_prog", so it can be a program name with args.
6462 set dummy $ac_prog; ac_word=$2
6463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6464 $as_echo_n "checking for $ac_word... " >&6; }
6465 if ${ac_cv_path_CP+:} false; then :
6466   $as_echo_n "(cached) " >&6
6467 else
6468   case $CP in
6469   [\\/]* | ?:[\\/]*)
6470   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6471   ;;
6472   *)
6473   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6474 for as_dir in $PATH
6475 do
6476   IFS=$as_save_IFS
6477   test -z "$as_dir" && as_dir=.
6478     for ac_exec_ext in '' $ac_executable_extensions; do
6479   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6480     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6481     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6482     break 2
6483   fi
6484 done
6485   done
6486 IFS=$as_save_IFS
6487 
6488   ;;
6489 esac
6490 fi
6491 CP=$ac_cv_path_CP
6492 if test -n "$CP"; then
6493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6494 $as_echo "$CP" >&6; }
6495 else
6496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6497 $as_echo "no" >&6; }
6498 fi
6499 
6500 
6501   test -n "$CP" && break
6502 done
6503 
6504     else
6505       # If it succeeded, then it was overridden by the user. We will use it
6506       # for the tool.
6507 
6508       # First remove it from the list of overridden variables, so we can test
6509       # for unknown variables in the end.
6510       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6511 
6512       # Check if we try to supply an empty value
6513       if test "x$CP" = x; then
6514         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6515 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6516         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6517 $as_echo_n "checking for CP... " >&6; }
6518         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6519 $as_echo "disabled" >&6; }
6520       else
6521         # Check if the provided tool contains a complete path.
6522         tool_specified="$CP"
6523         tool_basename="${tool_specified##*/}"
6524         if test "x$tool_basename" = "x$tool_specified"; then
6525           # A command without a complete path is provided, search $PATH.
6526           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6527 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6528           # Extract the first word of "$tool_basename", so it can be a program name with args.
6529 set dummy $tool_basename; ac_word=$2
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6531 $as_echo_n "checking for $ac_word... " >&6; }
6532 if ${ac_cv_path_CP+:} false; then :
6533   $as_echo_n "(cached) " >&6
6534 else
6535   case $CP in
6536   [\\/]* | ?:[\\/]*)
6537   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6538   ;;
6539   *)
6540   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6541 for as_dir in $PATH
6542 do
6543   IFS=$as_save_IFS
6544   test -z "$as_dir" && as_dir=.
6545     for ac_exec_ext in '' $ac_executable_extensions; do
6546   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6547     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6548     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6549     break 2
6550   fi
6551 done
6552   done
6553 IFS=$as_save_IFS
6554 
6555   ;;
6556 esac
6557 fi
6558 CP=$ac_cv_path_CP
6559 if test -n "$CP"; then
6560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6561 $as_echo "$CP" >&6; }
6562 else
6563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564 $as_echo "no" >&6; }
6565 fi
6566 
6567 
6568           if test "x$CP" = x; then
6569             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6570           fi
6571         else
6572           # Otherwise we believe it is a complete path. Use it as it is.
6573           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6574 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6575           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6576 $as_echo_n "checking for CP... " >&6; }
6577           if test ! -x "$tool_specified"; then
6578             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6579 $as_echo "not found" >&6; }
6580             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6581           fi
6582           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6583 $as_echo "$tool_specified" >&6; }
6584         fi
6585       fi
6586     fi
6587 
6588   fi
6589 
6590 
6591 
6592   if test "x$CP" = x; then
6593     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6594   fi
6595 
6596 
6597 
6598 
6599 
6600   # Publish this variable in the help.
6601 
6602 
6603   if [ -z "${CUT+x}" ]; then
6604     # The variable is not set by user, try to locate tool using the code snippet
6605     for ac_prog in cut
6606 do
6607   # Extract the first word of "$ac_prog", so it can be a program name with args.
6608 set dummy $ac_prog; ac_word=$2
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6610 $as_echo_n "checking for $ac_word... " >&6; }
6611 if ${ac_cv_path_CUT+:} false; then :
6612   $as_echo_n "(cached) " >&6
6613 else
6614   case $CUT in
6615   [\\/]* | ?:[\\/]*)
6616   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6617   ;;
6618   *)
6619   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6620 for as_dir in $PATH
6621 do
6622   IFS=$as_save_IFS
6623   test -z "$as_dir" && as_dir=.
6624     for ac_exec_ext in '' $ac_executable_extensions; do
6625   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6626     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6627     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6628     break 2
6629   fi
6630 done
6631   done
6632 IFS=$as_save_IFS
6633 
6634   ;;
6635 esac
6636 fi
6637 CUT=$ac_cv_path_CUT
6638 if test -n "$CUT"; then
6639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6640 $as_echo "$CUT" >&6; }
6641 else
6642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6643 $as_echo "no" >&6; }
6644 fi
6645 
6646 
6647   test -n "$CUT" && break
6648 done
6649 
6650   else
6651     # The variable is set, but is it from the command line or the environment?
6652 
6653     # Try to remove the string !CUT! from our list.
6654     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6655     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6656       # If it failed, the variable was not from the command line. Ignore it,
6657       # but warn the user (except for BASH, which is always set by the calling BASH).
6658       if test "xCUT" != xBASH; then
6659         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6660 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6661       fi
6662       # Try to locate tool using the code snippet
6663       for ac_prog in cut
6664 do
6665   # Extract the first word of "$ac_prog", so it can be a program name with args.
6666 set dummy $ac_prog; ac_word=$2
6667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6668 $as_echo_n "checking for $ac_word... " >&6; }
6669 if ${ac_cv_path_CUT+:} false; then :
6670   $as_echo_n "(cached) " >&6
6671 else
6672   case $CUT in
6673   [\\/]* | ?:[\\/]*)
6674   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6675   ;;
6676   *)
6677   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6678 for as_dir in $PATH
6679 do
6680   IFS=$as_save_IFS
6681   test -z "$as_dir" && as_dir=.
6682     for ac_exec_ext in '' $ac_executable_extensions; do
6683   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6684     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6685     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6686     break 2
6687   fi
6688 done
6689   done
6690 IFS=$as_save_IFS
6691 
6692   ;;
6693 esac
6694 fi
6695 CUT=$ac_cv_path_CUT
6696 if test -n "$CUT"; then
6697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6698 $as_echo "$CUT" >&6; }
6699 else
6700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6701 $as_echo "no" >&6; }
6702 fi
6703 
6704 
6705   test -n "$CUT" && break
6706 done
6707 
6708     else
6709       # If it succeeded, then it was overridden by the user. We will use it
6710       # for the tool.
6711 
6712       # First remove it from the list of overridden variables, so we can test
6713       # for unknown variables in the end.
6714       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6715 
6716       # Check if we try to supply an empty value
6717       if test "x$CUT" = x; then
6718         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6719 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6720         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6721 $as_echo_n "checking for CUT... " >&6; }
6722         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6723 $as_echo "disabled" >&6; }
6724       else
6725         # Check if the provided tool contains a complete path.
6726         tool_specified="$CUT"
6727         tool_basename="${tool_specified##*/}"
6728         if test "x$tool_basename" = "x$tool_specified"; then
6729           # A command without a complete path is provided, search $PATH.
6730           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6731 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6732           # Extract the first word of "$tool_basename", so it can be a program name with args.
6733 set dummy $tool_basename; ac_word=$2
6734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6735 $as_echo_n "checking for $ac_word... " >&6; }
6736 if ${ac_cv_path_CUT+:} false; then :
6737   $as_echo_n "(cached) " >&6
6738 else
6739   case $CUT in
6740   [\\/]* | ?:[\\/]*)
6741   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6742   ;;
6743   *)
6744   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6745 for as_dir in $PATH
6746 do
6747   IFS=$as_save_IFS
6748   test -z "$as_dir" && as_dir=.
6749     for ac_exec_ext in '' $ac_executable_extensions; do
6750   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6751     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6752     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6753     break 2
6754   fi
6755 done
6756   done
6757 IFS=$as_save_IFS
6758 
6759   ;;
6760 esac
6761 fi
6762 CUT=$ac_cv_path_CUT
6763 if test -n "$CUT"; then
6764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6765 $as_echo "$CUT" >&6; }
6766 else
6767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6768 $as_echo "no" >&6; }
6769 fi
6770 
6771 
6772           if test "x$CUT" = x; then
6773             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6774           fi
6775         else
6776           # Otherwise we believe it is a complete path. Use it as it is.
6777           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6778 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6779           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6780 $as_echo_n "checking for CUT... " >&6; }
6781           if test ! -x "$tool_specified"; then
6782             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6783 $as_echo "not found" >&6; }
6784             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6785           fi
6786           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6787 $as_echo "$tool_specified" >&6; }
6788         fi
6789       fi
6790     fi
6791 
6792   fi
6793 
6794 
6795 
6796   if test "x$CUT" = x; then
6797     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6798   fi
6799 
6800 
6801 
6802 
6803 
6804   # Publish this variable in the help.
6805 
6806 
6807   if [ -z "${DATE+x}" ]; then
6808     # The variable is not set by user, try to locate tool using the code snippet
6809     for ac_prog in date
6810 do
6811   # Extract the first word of "$ac_prog", so it can be a program name with args.
6812 set dummy $ac_prog; ac_word=$2
6813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6814 $as_echo_n "checking for $ac_word... " >&6; }
6815 if ${ac_cv_path_DATE+:} false; then :
6816   $as_echo_n "(cached) " >&6
6817 else
6818   case $DATE in
6819   [\\/]* | ?:[\\/]*)
6820   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6821   ;;
6822   *)
6823   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6824 for as_dir in $PATH
6825 do
6826   IFS=$as_save_IFS
6827   test -z "$as_dir" && as_dir=.
6828     for ac_exec_ext in '' $ac_executable_extensions; do
6829   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6830     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6831     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6832     break 2
6833   fi
6834 done
6835   done
6836 IFS=$as_save_IFS
6837 
6838   ;;
6839 esac
6840 fi
6841 DATE=$ac_cv_path_DATE
6842 if test -n "$DATE"; then
6843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6844 $as_echo "$DATE" >&6; }
6845 else
6846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6847 $as_echo "no" >&6; }
6848 fi
6849 
6850 
6851   test -n "$DATE" && break
6852 done
6853 
6854   else
6855     # The variable is set, but is it from the command line or the environment?
6856 
6857     # Try to remove the string !DATE! from our list.
6858     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6859     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6860       # If it failed, the variable was not from the command line. Ignore it,
6861       # but warn the user (except for BASH, which is always set by the calling BASH).
6862       if test "xDATE" != xBASH; then
6863         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6864 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6865       fi
6866       # Try to locate tool using the code snippet
6867       for ac_prog in date
6868 do
6869   # Extract the first word of "$ac_prog", so it can be a program name with args.
6870 set dummy $ac_prog; ac_word=$2
6871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6872 $as_echo_n "checking for $ac_word... " >&6; }
6873 if ${ac_cv_path_DATE+:} false; then :
6874   $as_echo_n "(cached) " >&6
6875 else
6876   case $DATE in
6877   [\\/]* | ?:[\\/]*)
6878   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6879   ;;
6880   *)
6881   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6882 for as_dir in $PATH
6883 do
6884   IFS=$as_save_IFS
6885   test -z "$as_dir" && as_dir=.
6886     for ac_exec_ext in '' $ac_executable_extensions; do
6887   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6888     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6890     break 2
6891   fi
6892 done
6893   done
6894 IFS=$as_save_IFS
6895 
6896   ;;
6897 esac
6898 fi
6899 DATE=$ac_cv_path_DATE
6900 if test -n "$DATE"; then
6901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6902 $as_echo "$DATE" >&6; }
6903 else
6904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6905 $as_echo "no" >&6; }
6906 fi
6907 
6908 
6909   test -n "$DATE" && break
6910 done
6911 
6912     else
6913       # If it succeeded, then it was overridden by the user. We will use it
6914       # for the tool.
6915 
6916       # First remove it from the list of overridden variables, so we can test
6917       # for unknown variables in the end.
6918       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6919 
6920       # Check if we try to supply an empty value
6921       if test "x$DATE" = x; then
6922         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6923 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6924         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6925 $as_echo_n "checking for DATE... " >&6; }
6926         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6927 $as_echo "disabled" >&6; }
6928       else
6929         # Check if the provided tool contains a complete path.
6930         tool_specified="$DATE"
6931         tool_basename="${tool_specified##*/}"
6932         if test "x$tool_basename" = "x$tool_specified"; then
6933           # A command without a complete path is provided, search $PATH.
6934           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6935 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6936           # Extract the first word of "$tool_basename", so it can be a program name with args.
6937 set dummy $tool_basename; ac_word=$2
6938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6939 $as_echo_n "checking for $ac_word... " >&6; }
6940 if ${ac_cv_path_DATE+:} false; then :
6941   $as_echo_n "(cached) " >&6
6942 else
6943   case $DATE in
6944   [\\/]* | ?:[\\/]*)
6945   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6946   ;;
6947   *)
6948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6949 for as_dir in $PATH
6950 do
6951   IFS=$as_save_IFS
6952   test -z "$as_dir" && as_dir=.
6953     for ac_exec_ext in '' $ac_executable_extensions; do
6954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6955     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6957     break 2
6958   fi
6959 done
6960   done
6961 IFS=$as_save_IFS
6962 
6963   ;;
6964 esac
6965 fi
6966 DATE=$ac_cv_path_DATE
6967 if test -n "$DATE"; then
6968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6969 $as_echo "$DATE" >&6; }
6970 else
6971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6972 $as_echo "no" >&6; }
6973 fi
6974 
6975 
6976           if test "x$DATE" = x; then
6977             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6978           fi
6979         else
6980           # Otherwise we believe it is a complete path. Use it as it is.
6981           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6982 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6983           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6984 $as_echo_n "checking for DATE... " >&6; }
6985           if test ! -x "$tool_specified"; then
6986             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6987 $as_echo "not found" >&6; }
6988             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6989           fi
6990           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6991 $as_echo "$tool_specified" >&6; }
6992         fi
6993       fi
6994     fi
6995 
6996   fi
6997 
6998 
6999 
7000   if test "x$DATE" = x; then
7001     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7002   fi
7003 
7004 
7005 
7006 
7007 
7008   # Publish this variable in the help.
7009 
7010 
7011   if [ -z "${DIFF+x}" ]; then
7012     # The variable is not set by user, try to locate tool using the code snippet
7013     for ac_prog in gdiff diff
7014 do
7015   # Extract the first word of "$ac_prog", so it can be a program name with args.
7016 set dummy $ac_prog; ac_word=$2
7017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7018 $as_echo_n "checking for $ac_word... " >&6; }
7019 if ${ac_cv_path_DIFF+:} false; then :
7020   $as_echo_n "(cached) " >&6
7021 else
7022   case $DIFF in
7023   [\\/]* | ?:[\\/]*)
7024   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7025   ;;
7026   *)
7027   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7028 for as_dir in $PATH
7029 do
7030   IFS=$as_save_IFS
7031   test -z "$as_dir" && as_dir=.
7032     for ac_exec_ext in '' $ac_executable_extensions; do
7033   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7034     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7035     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7036     break 2
7037   fi
7038 done
7039   done
7040 IFS=$as_save_IFS
7041 
7042   ;;
7043 esac
7044 fi
7045 DIFF=$ac_cv_path_DIFF
7046 if test -n "$DIFF"; then
7047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7048 $as_echo "$DIFF" >&6; }
7049 else
7050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7051 $as_echo "no" >&6; }
7052 fi
7053 
7054 
7055   test -n "$DIFF" && break
7056 done
7057 
7058   else
7059     # The variable is set, but is it from the command line or the environment?
7060 
7061     # Try to remove the string !DIFF! from our list.
7062     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7063     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7064       # If it failed, the variable was not from the command line. Ignore it,
7065       # but warn the user (except for BASH, which is always set by the calling BASH).
7066       if test "xDIFF" != xBASH; then
7067         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7068 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7069       fi
7070       # Try to locate tool using the code snippet
7071       for ac_prog in gdiff diff
7072 do
7073   # Extract the first word of "$ac_prog", so it can be a program name with args.
7074 set dummy $ac_prog; ac_word=$2
7075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7076 $as_echo_n "checking for $ac_word... " >&6; }
7077 if ${ac_cv_path_DIFF+:} false; then :
7078   $as_echo_n "(cached) " >&6
7079 else
7080   case $DIFF in
7081   [\\/]* | ?:[\\/]*)
7082   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7083   ;;
7084   *)
7085   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7086 for as_dir in $PATH
7087 do
7088   IFS=$as_save_IFS
7089   test -z "$as_dir" && as_dir=.
7090     for ac_exec_ext in '' $ac_executable_extensions; do
7091   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7092     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7093     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7094     break 2
7095   fi
7096 done
7097   done
7098 IFS=$as_save_IFS
7099 
7100   ;;
7101 esac
7102 fi
7103 DIFF=$ac_cv_path_DIFF
7104 if test -n "$DIFF"; then
7105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7106 $as_echo "$DIFF" >&6; }
7107 else
7108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7109 $as_echo "no" >&6; }
7110 fi
7111 
7112 
7113   test -n "$DIFF" && break
7114 done
7115 
7116     else
7117       # If it succeeded, then it was overridden by the user. We will use it
7118       # for the tool.
7119 
7120       # First remove it from the list of overridden variables, so we can test
7121       # for unknown variables in the end.
7122       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7123 
7124       # Check if we try to supply an empty value
7125       if test "x$DIFF" = x; then
7126         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7127 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7128         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7129 $as_echo_n "checking for DIFF... " >&6; }
7130         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7131 $as_echo "disabled" >&6; }
7132       else
7133         # Check if the provided tool contains a complete path.
7134         tool_specified="$DIFF"
7135         tool_basename="${tool_specified##*/}"
7136         if test "x$tool_basename" = "x$tool_specified"; then
7137           # A command without a complete path is provided, search $PATH.
7138           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7139 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7140           # Extract the first word of "$tool_basename", so it can be a program name with args.
7141 set dummy $tool_basename; ac_word=$2
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7143 $as_echo_n "checking for $ac_word... " >&6; }
7144 if ${ac_cv_path_DIFF+:} false; then :
7145   $as_echo_n "(cached) " >&6
7146 else
7147   case $DIFF in
7148   [\\/]* | ?:[\\/]*)
7149   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7150   ;;
7151   *)
7152   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7153 for as_dir in $PATH
7154 do
7155   IFS=$as_save_IFS
7156   test -z "$as_dir" && as_dir=.
7157     for ac_exec_ext in '' $ac_executable_extensions; do
7158   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7159     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7160     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7161     break 2
7162   fi
7163 done
7164   done
7165 IFS=$as_save_IFS
7166 
7167   ;;
7168 esac
7169 fi
7170 DIFF=$ac_cv_path_DIFF
7171 if test -n "$DIFF"; then
7172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7173 $as_echo "$DIFF" >&6; }
7174 else
7175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7176 $as_echo "no" >&6; }
7177 fi
7178 
7179 
7180           if test "x$DIFF" = x; then
7181             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7182           fi
7183         else
7184           # Otherwise we believe it is a complete path. Use it as it is.
7185           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7186 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7187           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7188 $as_echo_n "checking for DIFF... " >&6; }
7189           if test ! -x "$tool_specified"; then
7190             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7191 $as_echo "not found" >&6; }
7192             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7193           fi
7194           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7195 $as_echo "$tool_specified" >&6; }
7196         fi
7197       fi
7198     fi
7199 
7200   fi
7201 
7202 
7203 
7204   if test "x$DIFF" = x; then
7205     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7206   fi
7207 
7208 
7209 
7210 
7211 
7212   # Publish this variable in the help.
7213 
7214 
7215   if [ -z "${DIRNAME+x}" ]; then
7216     # The variable is not set by user, try to locate tool using the code snippet
7217     for ac_prog in dirname
7218 do
7219   # Extract the first word of "$ac_prog", so it can be a program name with args.
7220 set dummy $ac_prog; ac_word=$2
7221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7222 $as_echo_n "checking for $ac_word... " >&6; }
7223 if ${ac_cv_path_DIRNAME+:} false; then :
7224   $as_echo_n "(cached) " >&6
7225 else
7226   case $DIRNAME in
7227   [\\/]* | ?:[\\/]*)
7228   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7229   ;;
7230   *)
7231   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7232 for as_dir in $PATH
7233 do
7234   IFS=$as_save_IFS
7235   test -z "$as_dir" && as_dir=.
7236     for ac_exec_ext in '' $ac_executable_extensions; do
7237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7238     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7240     break 2
7241   fi
7242 done
7243   done
7244 IFS=$as_save_IFS
7245 
7246   ;;
7247 esac
7248 fi
7249 DIRNAME=$ac_cv_path_DIRNAME
7250 if test -n "$DIRNAME"; then
7251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7252 $as_echo "$DIRNAME" >&6; }
7253 else
7254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7255 $as_echo "no" >&6; }
7256 fi
7257 
7258 
7259   test -n "$DIRNAME" && break
7260 done
7261 
7262   else
7263     # The variable is set, but is it from the command line or the environment?
7264 
7265     # Try to remove the string !DIRNAME! from our list.
7266     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7267     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7268       # If it failed, the variable was not from the command line. Ignore it,
7269       # but warn the user (except for BASH, which is always set by the calling BASH).
7270       if test "xDIRNAME" != xBASH; then
7271         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7272 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7273       fi
7274       # Try to locate tool using the code snippet
7275       for ac_prog in dirname
7276 do
7277   # Extract the first word of "$ac_prog", so it can be a program name with args.
7278 set dummy $ac_prog; ac_word=$2
7279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7280 $as_echo_n "checking for $ac_word... " >&6; }
7281 if ${ac_cv_path_DIRNAME+:} false; then :
7282   $as_echo_n "(cached) " >&6
7283 else
7284   case $DIRNAME in
7285   [\\/]* | ?:[\\/]*)
7286   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7287   ;;
7288   *)
7289   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7290 for as_dir in $PATH
7291 do
7292   IFS=$as_save_IFS
7293   test -z "$as_dir" && as_dir=.
7294     for ac_exec_ext in '' $ac_executable_extensions; do
7295   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7296     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7297     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7298     break 2
7299   fi
7300 done
7301   done
7302 IFS=$as_save_IFS
7303 
7304   ;;
7305 esac
7306 fi
7307 DIRNAME=$ac_cv_path_DIRNAME
7308 if test -n "$DIRNAME"; then
7309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7310 $as_echo "$DIRNAME" >&6; }
7311 else
7312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7313 $as_echo "no" >&6; }
7314 fi
7315 
7316 
7317   test -n "$DIRNAME" && break
7318 done
7319 
7320     else
7321       # If it succeeded, then it was overridden by the user. We will use it
7322       # for the tool.
7323 
7324       # First remove it from the list of overridden variables, so we can test
7325       # for unknown variables in the end.
7326       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7327 
7328       # Check if we try to supply an empty value
7329       if test "x$DIRNAME" = x; then
7330         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7331 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7332         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7333 $as_echo_n "checking for DIRNAME... " >&6; }
7334         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7335 $as_echo "disabled" >&6; }
7336       else
7337         # Check if the provided tool contains a complete path.
7338         tool_specified="$DIRNAME"
7339         tool_basename="${tool_specified##*/}"
7340         if test "x$tool_basename" = "x$tool_specified"; then
7341           # A command without a complete path is provided, search $PATH.
7342           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7343 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7344           # Extract the first word of "$tool_basename", so it can be a program name with args.
7345 set dummy $tool_basename; ac_word=$2
7346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7347 $as_echo_n "checking for $ac_word... " >&6; }
7348 if ${ac_cv_path_DIRNAME+:} false; then :
7349   $as_echo_n "(cached) " >&6
7350 else
7351   case $DIRNAME in
7352   [\\/]* | ?:[\\/]*)
7353   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7354   ;;
7355   *)
7356   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7357 for as_dir in $PATH
7358 do
7359   IFS=$as_save_IFS
7360   test -z "$as_dir" && as_dir=.
7361     for ac_exec_ext in '' $ac_executable_extensions; do
7362   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7363     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7364     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7365     break 2
7366   fi
7367 done
7368   done
7369 IFS=$as_save_IFS
7370 
7371   ;;
7372 esac
7373 fi
7374 DIRNAME=$ac_cv_path_DIRNAME
7375 if test -n "$DIRNAME"; then
7376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7377 $as_echo "$DIRNAME" >&6; }
7378 else
7379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7380 $as_echo "no" >&6; }
7381 fi
7382 
7383 
7384           if test "x$DIRNAME" = x; then
7385             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7386           fi
7387         else
7388           # Otherwise we believe it is a complete path. Use it as it is.
7389           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7390 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7391           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7392 $as_echo_n "checking for DIRNAME... " >&6; }
7393           if test ! -x "$tool_specified"; then
7394             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7395 $as_echo "not found" >&6; }
7396             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7397           fi
7398           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7399 $as_echo "$tool_specified" >&6; }
7400         fi
7401       fi
7402     fi
7403 
7404   fi
7405 
7406 
7407 
7408   if test "x$DIRNAME" = x; then
7409     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7410   fi
7411 
7412 
7413 
7414 
7415 
7416   # Publish this variable in the help.
7417 
7418 
7419   if [ -z "${ECHO+x}" ]; then
7420     # The variable is not set by user, try to locate tool using the code snippet
7421     for ac_prog in echo
7422 do
7423   # Extract the first word of "$ac_prog", so it can be a program name with args.
7424 set dummy $ac_prog; ac_word=$2
7425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7426 $as_echo_n "checking for $ac_word... " >&6; }
7427 if ${ac_cv_path_ECHO+:} false; then :
7428   $as_echo_n "(cached) " >&6
7429 else
7430   case $ECHO in
7431   [\\/]* | ?:[\\/]*)
7432   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7433   ;;
7434   *)
7435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7436 for as_dir in $PATH
7437 do
7438   IFS=$as_save_IFS
7439   test -z "$as_dir" && as_dir=.
7440     for ac_exec_ext in '' $ac_executable_extensions; do
7441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7442     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7444     break 2
7445   fi
7446 done
7447   done
7448 IFS=$as_save_IFS
7449 
7450   ;;
7451 esac
7452 fi
7453 ECHO=$ac_cv_path_ECHO
7454 if test -n "$ECHO"; then
7455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7456 $as_echo "$ECHO" >&6; }
7457 else
7458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7459 $as_echo "no" >&6; }
7460 fi
7461 
7462 
7463   test -n "$ECHO" && break
7464 done
7465 
7466   else
7467     # The variable is set, but is it from the command line or the environment?
7468 
7469     # Try to remove the string !ECHO! from our list.
7470     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7471     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7472       # If it failed, the variable was not from the command line. Ignore it,
7473       # but warn the user (except for BASH, which is always set by the calling BASH).
7474       if test "xECHO" != xBASH; then
7475         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7476 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7477       fi
7478       # Try to locate tool using the code snippet
7479       for ac_prog in echo
7480 do
7481   # Extract the first word of "$ac_prog", so it can be a program name with args.
7482 set dummy $ac_prog; ac_word=$2
7483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7484 $as_echo_n "checking for $ac_word... " >&6; }
7485 if ${ac_cv_path_ECHO+:} false; then :
7486   $as_echo_n "(cached) " >&6
7487 else
7488   case $ECHO in
7489   [\\/]* | ?:[\\/]*)
7490   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7491   ;;
7492   *)
7493   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7494 for as_dir in $PATH
7495 do
7496   IFS=$as_save_IFS
7497   test -z "$as_dir" && as_dir=.
7498     for ac_exec_ext in '' $ac_executable_extensions; do
7499   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7500     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7501     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7502     break 2
7503   fi
7504 done
7505   done
7506 IFS=$as_save_IFS
7507 
7508   ;;
7509 esac
7510 fi
7511 ECHO=$ac_cv_path_ECHO
7512 if test -n "$ECHO"; then
7513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7514 $as_echo "$ECHO" >&6; }
7515 else
7516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7517 $as_echo "no" >&6; }
7518 fi
7519 
7520 
7521   test -n "$ECHO" && break
7522 done
7523 
7524     else
7525       # If it succeeded, then it was overridden by the user. We will use it
7526       # for the tool.
7527 
7528       # First remove it from the list of overridden variables, so we can test
7529       # for unknown variables in the end.
7530       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7531 
7532       # Check if we try to supply an empty value
7533       if test "x$ECHO" = x; then
7534         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7535 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7536         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7537 $as_echo_n "checking for ECHO... " >&6; }
7538         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7539 $as_echo "disabled" >&6; }
7540       else
7541         # Check if the provided tool contains a complete path.
7542         tool_specified="$ECHO"
7543         tool_basename="${tool_specified##*/}"
7544         if test "x$tool_basename" = "x$tool_specified"; then
7545           # A command without a complete path is provided, search $PATH.
7546           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7547 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7548           # Extract the first word of "$tool_basename", so it can be a program name with args.
7549 set dummy $tool_basename; ac_word=$2
7550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7551 $as_echo_n "checking for $ac_word... " >&6; }
7552 if ${ac_cv_path_ECHO+:} false; then :
7553   $as_echo_n "(cached) " >&6
7554 else
7555   case $ECHO in
7556   [\\/]* | ?:[\\/]*)
7557   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7558   ;;
7559   *)
7560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7561 for as_dir in $PATH
7562 do
7563   IFS=$as_save_IFS
7564   test -z "$as_dir" && as_dir=.
7565     for ac_exec_ext in '' $ac_executable_extensions; do
7566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7567     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7569     break 2
7570   fi
7571 done
7572   done
7573 IFS=$as_save_IFS
7574 
7575   ;;
7576 esac
7577 fi
7578 ECHO=$ac_cv_path_ECHO
7579 if test -n "$ECHO"; then
7580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7581 $as_echo "$ECHO" >&6; }
7582 else
7583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7584 $as_echo "no" >&6; }
7585 fi
7586 
7587 
7588           if test "x$ECHO" = x; then
7589             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7590           fi
7591         else
7592           # Otherwise we believe it is a complete path. Use it as it is.
7593           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7594 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7595           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7596 $as_echo_n "checking for ECHO... " >&6; }
7597           if test ! -x "$tool_specified"; then
7598             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7599 $as_echo "not found" >&6; }
7600             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7601           fi
7602           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7603 $as_echo "$tool_specified" >&6; }
7604         fi
7605       fi
7606     fi
7607 
7608   fi
7609 
7610 
7611 
7612   if test "x$ECHO" = x; then
7613     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7614   fi
7615 
7616 
7617 
7618 
7619 
7620   # Publish this variable in the help.
7621 
7622 
7623   if [ -z "${EXPR+x}" ]; then
7624     # The variable is not set by user, try to locate tool using the code snippet
7625     for ac_prog in expr
7626 do
7627   # Extract the first word of "$ac_prog", so it can be a program name with args.
7628 set dummy $ac_prog; ac_word=$2
7629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7630 $as_echo_n "checking for $ac_word... " >&6; }
7631 if ${ac_cv_path_EXPR+:} false; then :
7632   $as_echo_n "(cached) " >&6
7633 else
7634   case $EXPR in
7635   [\\/]* | ?:[\\/]*)
7636   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7637   ;;
7638   *)
7639   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7640 for as_dir in $PATH
7641 do
7642   IFS=$as_save_IFS
7643   test -z "$as_dir" && as_dir=.
7644     for ac_exec_ext in '' $ac_executable_extensions; do
7645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7646     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7648     break 2
7649   fi
7650 done
7651   done
7652 IFS=$as_save_IFS
7653 
7654   ;;
7655 esac
7656 fi
7657 EXPR=$ac_cv_path_EXPR
7658 if test -n "$EXPR"; then
7659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7660 $as_echo "$EXPR" >&6; }
7661 else
7662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7663 $as_echo "no" >&6; }
7664 fi
7665 
7666 
7667   test -n "$EXPR" && break
7668 done
7669 
7670   else
7671     # The variable is set, but is it from the command line or the environment?
7672 
7673     # Try to remove the string !EXPR! from our list.
7674     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7675     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7676       # If it failed, the variable was not from the command line. Ignore it,
7677       # but warn the user (except for BASH, which is always set by the calling BASH).
7678       if test "xEXPR" != xBASH; then
7679         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7680 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7681       fi
7682       # Try to locate tool using the code snippet
7683       for ac_prog in expr
7684 do
7685   # Extract the first word of "$ac_prog", so it can be a program name with args.
7686 set dummy $ac_prog; ac_word=$2
7687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7688 $as_echo_n "checking for $ac_word... " >&6; }
7689 if ${ac_cv_path_EXPR+:} false; then :
7690   $as_echo_n "(cached) " >&6
7691 else
7692   case $EXPR in
7693   [\\/]* | ?:[\\/]*)
7694   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7695   ;;
7696   *)
7697   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7698 for as_dir in $PATH
7699 do
7700   IFS=$as_save_IFS
7701   test -z "$as_dir" && as_dir=.
7702     for ac_exec_ext in '' $ac_executable_extensions; do
7703   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7704     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7705     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7706     break 2
7707   fi
7708 done
7709   done
7710 IFS=$as_save_IFS
7711 
7712   ;;
7713 esac
7714 fi
7715 EXPR=$ac_cv_path_EXPR
7716 if test -n "$EXPR"; then
7717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7718 $as_echo "$EXPR" >&6; }
7719 else
7720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7721 $as_echo "no" >&6; }
7722 fi
7723 
7724 
7725   test -n "$EXPR" && break
7726 done
7727 
7728     else
7729       # If it succeeded, then it was overridden by the user. We will use it
7730       # for the tool.
7731 
7732       # First remove it from the list of overridden variables, so we can test
7733       # for unknown variables in the end.
7734       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7735 
7736       # Check if we try to supply an empty value
7737       if test "x$EXPR" = x; then
7738         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7739 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7740         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7741 $as_echo_n "checking for EXPR... " >&6; }
7742         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7743 $as_echo "disabled" >&6; }
7744       else
7745         # Check if the provided tool contains a complete path.
7746         tool_specified="$EXPR"
7747         tool_basename="${tool_specified##*/}"
7748         if test "x$tool_basename" = "x$tool_specified"; then
7749           # A command without a complete path is provided, search $PATH.
7750           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7751 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7752           # Extract the first word of "$tool_basename", so it can be a program name with args.
7753 set dummy $tool_basename; ac_word=$2
7754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7755 $as_echo_n "checking for $ac_word... " >&6; }
7756 if ${ac_cv_path_EXPR+:} false; then :
7757   $as_echo_n "(cached) " >&6
7758 else
7759   case $EXPR in
7760   [\\/]* | ?:[\\/]*)
7761   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7762   ;;
7763   *)
7764   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7765 for as_dir in $PATH
7766 do
7767   IFS=$as_save_IFS
7768   test -z "$as_dir" && as_dir=.
7769     for ac_exec_ext in '' $ac_executable_extensions; do
7770   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7771     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7772     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7773     break 2
7774   fi
7775 done
7776   done
7777 IFS=$as_save_IFS
7778 
7779   ;;
7780 esac
7781 fi
7782 EXPR=$ac_cv_path_EXPR
7783 if test -n "$EXPR"; then
7784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7785 $as_echo "$EXPR" >&6; }
7786 else
7787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7788 $as_echo "no" >&6; }
7789 fi
7790 
7791 
7792           if test "x$EXPR" = x; then
7793             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7794           fi
7795         else
7796           # Otherwise we believe it is a complete path. Use it as it is.
7797           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7798 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7799           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7800 $as_echo_n "checking for EXPR... " >&6; }
7801           if test ! -x "$tool_specified"; then
7802             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7803 $as_echo "not found" >&6; }
7804             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7805           fi
7806           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7807 $as_echo "$tool_specified" >&6; }
7808         fi
7809       fi
7810     fi
7811 
7812   fi
7813 
7814 
7815 
7816   if test "x$EXPR" = x; then
7817     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7818   fi
7819 
7820 
7821 
7822 
7823 
7824   # Publish this variable in the help.
7825 
7826 
7827   if [ -z "${FILE+x}" ]; then
7828     # The variable is not set by user, try to locate tool using the code snippet
7829     for ac_prog in file
7830 do
7831   # Extract the first word of "$ac_prog", so it can be a program name with args.
7832 set dummy $ac_prog; ac_word=$2
7833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7834 $as_echo_n "checking for $ac_word... " >&6; }
7835 if ${ac_cv_path_FILE+:} false; then :
7836   $as_echo_n "(cached) " >&6
7837 else
7838   case $FILE in
7839   [\\/]* | ?:[\\/]*)
7840   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7841   ;;
7842   *)
7843   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7844 for as_dir in $PATH
7845 do
7846   IFS=$as_save_IFS
7847   test -z "$as_dir" && as_dir=.
7848     for ac_exec_ext in '' $ac_executable_extensions; do
7849   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7850     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7851     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7852     break 2
7853   fi
7854 done
7855   done
7856 IFS=$as_save_IFS
7857 
7858   ;;
7859 esac
7860 fi
7861 FILE=$ac_cv_path_FILE
7862 if test -n "$FILE"; then
7863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7864 $as_echo "$FILE" >&6; }
7865 else
7866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7867 $as_echo "no" >&6; }
7868 fi
7869 
7870 
7871   test -n "$FILE" && break
7872 done
7873 
7874   else
7875     # The variable is set, but is it from the command line or the environment?
7876 
7877     # Try to remove the string !FILE! from our list.
7878     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7879     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7880       # If it failed, the variable was not from the command line. Ignore it,
7881       # but warn the user (except for BASH, which is always set by the calling BASH).
7882       if test "xFILE" != xBASH; then
7883         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7884 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7885       fi
7886       # Try to locate tool using the code snippet
7887       for ac_prog in file
7888 do
7889   # Extract the first word of "$ac_prog", so it can be a program name with args.
7890 set dummy $ac_prog; ac_word=$2
7891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7892 $as_echo_n "checking for $ac_word... " >&6; }
7893 if ${ac_cv_path_FILE+:} false; then :
7894   $as_echo_n "(cached) " >&6
7895 else
7896   case $FILE in
7897   [\\/]* | ?:[\\/]*)
7898   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7899   ;;
7900   *)
7901   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7902 for as_dir in $PATH
7903 do
7904   IFS=$as_save_IFS
7905   test -z "$as_dir" && as_dir=.
7906     for ac_exec_ext in '' $ac_executable_extensions; do
7907   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7908     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7909     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7910     break 2
7911   fi
7912 done
7913   done
7914 IFS=$as_save_IFS
7915 
7916   ;;
7917 esac
7918 fi
7919 FILE=$ac_cv_path_FILE
7920 if test -n "$FILE"; then
7921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7922 $as_echo "$FILE" >&6; }
7923 else
7924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7925 $as_echo "no" >&6; }
7926 fi
7927 
7928 
7929   test -n "$FILE" && break
7930 done
7931 
7932     else
7933       # If it succeeded, then it was overridden by the user. We will use it
7934       # for the tool.
7935 
7936       # First remove it from the list of overridden variables, so we can test
7937       # for unknown variables in the end.
7938       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7939 
7940       # Check if we try to supply an empty value
7941       if test "x$FILE" = x; then
7942         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7943 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7944         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7945 $as_echo_n "checking for FILE... " >&6; }
7946         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7947 $as_echo "disabled" >&6; }
7948       else
7949         # Check if the provided tool contains a complete path.
7950         tool_specified="$FILE"
7951         tool_basename="${tool_specified##*/}"
7952         if test "x$tool_basename" = "x$tool_specified"; then
7953           # A command without a complete path is provided, search $PATH.
7954           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7955 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7956           # Extract the first word of "$tool_basename", so it can be a program name with args.
7957 set dummy $tool_basename; ac_word=$2
7958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7959 $as_echo_n "checking for $ac_word... " >&6; }
7960 if ${ac_cv_path_FILE+:} false; then :
7961   $as_echo_n "(cached) " >&6
7962 else
7963   case $FILE in
7964   [\\/]* | ?:[\\/]*)
7965   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7966   ;;
7967   *)
7968   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7969 for as_dir in $PATH
7970 do
7971   IFS=$as_save_IFS
7972   test -z "$as_dir" && as_dir=.
7973     for ac_exec_ext in '' $ac_executable_extensions; do
7974   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7975     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7976     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7977     break 2
7978   fi
7979 done
7980   done
7981 IFS=$as_save_IFS
7982 
7983   ;;
7984 esac
7985 fi
7986 FILE=$ac_cv_path_FILE
7987 if test -n "$FILE"; then
7988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7989 $as_echo "$FILE" >&6; }
7990 else
7991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7992 $as_echo "no" >&6; }
7993 fi
7994 
7995 
7996           if test "x$FILE" = x; then
7997             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7998           fi
7999         else
8000           # Otherwise we believe it is a complete path. Use it as it is.
8001           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8002 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8003           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8004 $as_echo_n "checking for FILE... " >&6; }
8005           if test ! -x "$tool_specified"; then
8006             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8007 $as_echo "not found" >&6; }
8008             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8009           fi
8010           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8011 $as_echo "$tool_specified" >&6; }
8012         fi
8013       fi
8014     fi
8015 
8016   fi
8017 
8018 
8019 
8020   if test "x$FILE" = x; then
8021     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8022   fi
8023 
8024 
8025 
8026 
8027 
8028   # Publish this variable in the help.
8029 
8030 
8031   if [ -z "${FIND+x}" ]; then
8032     # The variable is not set by user, try to locate tool using the code snippet
8033     for ac_prog in find
8034 do
8035   # Extract the first word of "$ac_prog", so it can be a program name with args.
8036 set dummy $ac_prog; ac_word=$2
8037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8038 $as_echo_n "checking for $ac_word... " >&6; }
8039 if ${ac_cv_path_FIND+:} false; then :
8040   $as_echo_n "(cached) " >&6
8041 else
8042   case $FIND in
8043   [\\/]* | ?:[\\/]*)
8044   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8045   ;;
8046   *)
8047   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8048 for as_dir in $PATH
8049 do
8050   IFS=$as_save_IFS
8051   test -z "$as_dir" && as_dir=.
8052     for ac_exec_ext in '' $ac_executable_extensions; do
8053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8054     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8056     break 2
8057   fi
8058 done
8059   done
8060 IFS=$as_save_IFS
8061 
8062   ;;
8063 esac
8064 fi
8065 FIND=$ac_cv_path_FIND
8066 if test -n "$FIND"; then
8067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8068 $as_echo "$FIND" >&6; }
8069 else
8070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8071 $as_echo "no" >&6; }
8072 fi
8073 
8074 
8075   test -n "$FIND" && break
8076 done
8077 
8078   else
8079     # The variable is set, but is it from the command line or the environment?
8080 
8081     # Try to remove the string !FIND! from our list.
8082     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8083     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8084       # If it failed, the variable was not from the command line. Ignore it,
8085       # but warn the user (except for BASH, which is always set by the calling BASH).
8086       if test "xFIND" != xBASH; then
8087         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8088 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8089       fi
8090       # Try to locate tool using the code snippet
8091       for ac_prog in find
8092 do
8093   # Extract the first word of "$ac_prog", so it can be a program name with args.
8094 set dummy $ac_prog; ac_word=$2
8095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8096 $as_echo_n "checking for $ac_word... " >&6; }
8097 if ${ac_cv_path_FIND+:} false; then :
8098   $as_echo_n "(cached) " >&6
8099 else
8100   case $FIND in
8101   [\\/]* | ?:[\\/]*)
8102   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8103   ;;
8104   *)
8105   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8106 for as_dir in $PATH
8107 do
8108   IFS=$as_save_IFS
8109   test -z "$as_dir" && as_dir=.
8110     for ac_exec_ext in '' $ac_executable_extensions; do
8111   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8112     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8113     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8114     break 2
8115   fi
8116 done
8117   done
8118 IFS=$as_save_IFS
8119 
8120   ;;
8121 esac
8122 fi
8123 FIND=$ac_cv_path_FIND
8124 if test -n "$FIND"; then
8125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8126 $as_echo "$FIND" >&6; }
8127 else
8128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8129 $as_echo "no" >&6; }
8130 fi
8131 
8132 
8133   test -n "$FIND" && break
8134 done
8135 
8136     else
8137       # If it succeeded, then it was overridden by the user. We will use it
8138       # for the tool.
8139 
8140       # First remove it from the list of overridden variables, so we can test
8141       # for unknown variables in the end.
8142       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8143 
8144       # Check if we try to supply an empty value
8145       if test "x$FIND" = x; then
8146         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8147 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8148         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8149 $as_echo_n "checking for FIND... " >&6; }
8150         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8151 $as_echo "disabled" >&6; }
8152       else
8153         # Check if the provided tool contains a complete path.
8154         tool_specified="$FIND"
8155         tool_basename="${tool_specified##*/}"
8156         if test "x$tool_basename" = "x$tool_specified"; then
8157           # A command without a complete path is provided, search $PATH.
8158           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8159 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8160           # Extract the first word of "$tool_basename", so it can be a program name with args.
8161 set dummy $tool_basename; ac_word=$2
8162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8163 $as_echo_n "checking for $ac_word... " >&6; }
8164 if ${ac_cv_path_FIND+:} false; then :
8165   $as_echo_n "(cached) " >&6
8166 else
8167   case $FIND in
8168   [\\/]* | ?:[\\/]*)
8169   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8170   ;;
8171   *)
8172   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8173 for as_dir in $PATH
8174 do
8175   IFS=$as_save_IFS
8176   test -z "$as_dir" && as_dir=.
8177     for ac_exec_ext in '' $ac_executable_extensions; do
8178   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8179     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8180     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8181     break 2
8182   fi
8183 done
8184   done
8185 IFS=$as_save_IFS
8186 
8187   ;;
8188 esac
8189 fi
8190 FIND=$ac_cv_path_FIND
8191 if test -n "$FIND"; then
8192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8193 $as_echo "$FIND" >&6; }
8194 else
8195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8196 $as_echo "no" >&6; }
8197 fi
8198 
8199 
8200           if test "x$FIND" = x; then
8201             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8202           fi
8203         else
8204           # Otherwise we believe it is a complete path. Use it as it is.
8205           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8206 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8207           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8208 $as_echo_n "checking for FIND... " >&6; }
8209           if test ! -x "$tool_specified"; then
8210             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8211 $as_echo "not found" >&6; }
8212             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8213           fi
8214           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8215 $as_echo "$tool_specified" >&6; }
8216         fi
8217       fi
8218     fi
8219 
8220   fi
8221 
8222 
8223 
8224   if test "x$FIND" = x; then
8225     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8226   fi
8227 
8228 
8229 
8230 
8231 
8232   # Publish this variable in the help.
8233 
8234 
8235   if [ -z "${HEAD+x}" ]; then
8236     # The variable is not set by user, try to locate tool using the code snippet
8237     for ac_prog in head
8238 do
8239   # Extract the first word of "$ac_prog", so it can be a program name with args.
8240 set dummy $ac_prog; ac_word=$2
8241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8242 $as_echo_n "checking for $ac_word... " >&6; }
8243 if ${ac_cv_path_HEAD+:} false; then :
8244   $as_echo_n "(cached) " >&6
8245 else
8246   case $HEAD in
8247   [\\/]* | ?:[\\/]*)
8248   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8249   ;;
8250   *)
8251   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8252 for as_dir in $PATH
8253 do
8254   IFS=$as_save_IFS
8255   test -z "$as_dir" && as_dir=.
8256     for ac_exec_ext in '' $ac_executable_extensions; do
8257   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8258     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8259     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8260     break 2
8261   fi
8262 done
8263   done
8264 IFS=$as_save_IFS
8265 
8266   ;;
8267 esac
8268 fi
8269 HEAD=$ac_cv_path_HEAD
8270 if test -n "$HEAD"; then
8271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8272 $as_echo "$HEAD" >&6; }
8273 else
8274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8275 $as_echo "no" >&6; }
8276 fi
8277 
8278 
8279   test -n "$HEAD" && break
8280 done
8281 
8282   else
8283     # The variable is set, but is it from the command line or the environment?
8284 
8285     # Try to remove the string !HEAD! from our list.
8286     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8287     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8288       # If it failed, the variable was not from the command line. Ignore it,
8289       # but warn the user (except for BASH, which is always set by the calling BASH).
8290       if test "xHEAD" != xBASH; then
8291         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8292 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8293       fi
8294       # Try to locate tool using the code snippet
8295       for ac_prog in head
8296 do
8297   # Extract the first word of "$ac_prog", so it can be a program name with args.
8298 set dummy $ac_prog; ac_word=$2
8299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8300 $as_echo_n "checking for $ac_word... " >&6; }
8301 if ${ac_cv_path_HEAD+:} false; then :
8302   $as_echo_n "(cached) " >&6
8303 else
8304   case $HEAD in
8305   [\\/]* | ?:[\\/]*)
8306   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8307   ;;
8308   *)
8309   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8310 for as_dir in $PATH
8311 do
8312   IFS=$as_save_IFS
8313   test -z "$as_dir" && as_dir=.
8314     for ac_exec_ext in '' $ac_executable_extensions; do
8315   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8316     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8317     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8318     break 2
8319   fi
8320 done
8321   done
8322 IFS=$as_save_IFS
8323 
8324   ;;
8325 esac
8326 fi
8327 HEAD=$ac_cv_path_HEAD
8328 if test -n "$HEAD"; then
8329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8330 $as_echo "$HEAD" >&6; }
8331 else
8332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8333 $as_echo "no" >&6; }
8334 fi
8335 
8336 
8337   test -n "$HEAD" && break
8338 done
8339 
8340     else
8341       # If it succeeded, then it was overridden by the user. We will use it
8342       # for the tool.
8343 
8344       # First remove it from the list of overridden variables, so we can test
8345       # for unknown variables in the end.
8346       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8347 
8348       # Check if we try to supply an empty value
8349       if test "x$HEAD" = x; then
8350         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8351 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8352         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8353 $as_echo_n "checking for HEAD... " >&6; }
8354         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8355 $as_echo "disabled" >&6; }
8356       else
8357         # Check if the provided tool contains a complete path.
8358         tool_specified="$HEAD"
8359         tool_basename="${tool_specified##*/}"
8360         if test "x$tool_basename" = "x$tool_specified"; then
8361           # A command without a complete path is provided, search $PATH.
8362           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8363 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8364           # Extract the first word of "$tool_basename", so it can be a program name with args.
8365 set dummy $tool_basename; ac_word=$2
8366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8367 $as_echo_n "checking for $ac_word... " >&6; }
8368 if ${ac_cv_path_HEAD+:} false; then :
8369   $as_echo_n "(cached) " >&6
8370 else
8371   case $HEAD in
8372   [\\/]* | ?:[\\/]*)
8373   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8374   ;;
8375   *)
8376   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8377 for as_dir in $PATH
8378 do
8379   IFS=$as_save_IFS
8380   test -z "$as_dir" && as_dir=.
8381     for ac_exec_ext in '' $ac_executable_extensions; do
8382   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8383     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8384     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8385     break 2
8386   fi
8387 done
8388   done
8389 IFS=$as_save_IFS
8390 
8391   ;;
8392 esac
8393 fi
8394 HEAD=$ac_cv_path_HEAD
8395 if test -n "$HEAD"; then
8396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8397 $as_echo "$HEAD" >&6; }
8398 else
8399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8400 $as_echo "no" >&6; }
8401 fi
8402 
8403 
8404           if test "x$HEAD" = x; then
8405             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8406           fi
8407         else
8408           # Otherwise we believe it is a complete path. Use it as it is.
8409           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8410 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8411           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8412 $as_echo_n "checking for HEAD... " >&6; }
8413           if test ! -x "$tool_specified"; then
8414             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8415 $as_echo "not found" >&6; }
8416             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8417           fi
8418           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8419 $as_echo "$tool_specified" >&6; }
8420         fi
8421       fi
8422     fi
8423 
8424   fi
8425 
8426 
8427 
8428   if test "x$HEAD" = x; then
8429     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8430   fi
8431 
8432 
8433 
8434 
8435 
8436   # Publish this variable in the help.
8437 
8438 
8439   if [ -z "${GUNZIP+x}" ]; then
8440     # The variable is not set by user, try to locate tool using the code snippet
8441     for ac_prog in gunzip
8442 do
8443   # Extract the first word of "$ac_prog", so it can be a program name with args.
8444 set dummy $ac_prog; ac_word=$2
8445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8446 $as_echo_n "checking for $ac_word... " >&6; }
8447 if ${ac_cv_path_GUNZIP+:} false; then :
8448   $as_echo_n "(cached) " >&6
8449 else
8450   case $GUNZIP in
8451   [\\/]* | ?:[\\/]*)
8452   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8453   ;;
8454   *)
8455   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8456 for as_dir in $PATH
8457 do
8458   IFS=$as_save_IFS
8459   test -z "$as_dir" && as_dir=.
8460     for ac_exec_ext in '' $ac_executable_extensions; do
8461   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8462     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8463     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8464     break 2
8465   fi
8466 done
8467   done
8468 IFS=$as_save_IFS
8469 
8470   ;;
8471 esac
8472 fi
8473 GUNZIP=$ac_cv_path_GUNZIP
8474 if test -n "$GUNZIP"; then
8475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8476 $as_echo "$GUNZIP" >&6; }
8477 else
8478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8479 $as_echo "no" >&6; }
8480 fi
8481 
8482 
8483   test -n "$GUNZIP" && break
8484 done
8485 
8486   else
8487     # The variable is set, but is it from the command line or the environment?
8488 
8489     # Try to remove the string !GUNZIP! from our list.
8490     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8491     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8492       # If it failed, the variable was not from the command line. Ignore it,
8493       # but warn the user (except for BASH, which is always set by the calling BASH).
8494       if test "xGUNZIP" != xBASH; then
8495         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8496 $as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8497       fi
8498       # Try to locate tool using the code snippet
8499       for ac_prog in gunzip
8500 do
8501   # Extract the first word of "$ac_prog", so it can be a program name with args.
8502 set dummy $ac_prog; ac_word=$2
8503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8504 $as_echo_n "checking for $ac_word... " >&6; }
8505 if ${ac_cv_path_GUNZIP+:} false; then :
8506   $as_echo_n "(cached) " >&6
8507 else
8508   case $GUNZIP in
8509   [\\/]* | ?:[\\/]*)
8510   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8511   ;;
8512   *)
8513   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8514 for as_dir in $PATH
8515 do
8516   IFS=$as_save_IFS
8517   test -z "$as_dir" && as_dir=.
8518     for ac_exec_ext in '' $ac_executable_extensions; do
8519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8520     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8522     break 2
8523   fi
8524 done
8525   done
8526 IFS=$as_save_IFS
8527 
8528   ;;
8529 esac
8530 fi
8531 GUNZIP=$ac_cv_path_GUNZIP
8532 if test -n "$GUNZIP"; then
8533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8534 $as_echo "$GUNZIP" >&6; }
8535 else
8536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8537 $as_echo "no" >&6; }
8538 fi
8539 
8540 
8541   test -n "$GUNZIP" && break
8542 done
8543 
8544     else
8545       # If it succeeded, then it was overridden by the user. We will use it
8546       # for the tool.
8547 
8548       # First remove it from the list of overridden variables, so we can test
8549       # for unknown variables in the end.
8550       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8551 
8552       # Check if we try to supply an empty value
8553       if test "x$GUNZIP" = x; then
8554         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8555 $as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8556         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8557 $as_echo_n "checking for GUNZIP... " >&6; }
8558         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8559 $as_echo "disabled" >&6; }
8560       else
8561         # Check if the provided tool contains a complete path.
8562         tool_specified="$GUNZIP"
8563         tool_basename="${tool_specified##*/}"
8564         if test "x$tool_basename" = "x$tool_specified"; then
8565           # A command without a complete path is provided, search $PATH.
8566           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8567 $as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8568           # Extract the first word of "$tool_basename", so it can be a program name with args.
8569 set dummy $tool_basename; ac_word=$2
8570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8571 $as_echo_n "checking for $ac_word... " >&6; }
8572 if ${ac_cv_path_GUNZIP+:} false; then :
8573   $as_echo_n "(cached) " >&6
8574 else
8575   case $GUNZIP in
8576   [\\/]* | ?:[\\/]*)
8577   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8578   ;;
8579   *)
8580   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8581 for as_dir in $PATH
8582 do
8583   IFS=$as_save_IFS
8584   test -z "$as_dir" && as_dir=.
8585     for ac_exec_ext in '' $ac_executable_extensions; do
8586   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8587     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8588     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8589     break 2
8590   fi
8591 done
8592   done
8593 IFS=$as_save_IFS
8594 
8595   ;;
8596 esac
8597 fi
8598 GUNZIP=$ac_cv_path_GUNZIP
8599 if test -n "$GUNZIP"; then
8600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8601 $as_echo "$GUNZIP" >&6; }
8602 else
8603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8604 $as_echo "no" >&6; }
8605 fi
8606 
8607 
8608           if test "x$GUNZIP" = x; then
8609             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8610           fi
8611         else
8612           # Otherwise we believe it is a complete path. Use it as it is.
8613           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8614 $as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8615           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8616 $as_echo_n "checking for GUNZIP... " >&6; }
8617           if test ! -x "$tool_specified"; then
8618             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8619 $as_echo "not found" >&6; }
8620             as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8621           fi
8622           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8623 $as_echo "$tool_specified" >&6; }
8624         fi
8625       fi
8626     fi
8627 
8628   fi
8629 
8630 
8631 
8632   if test "x$GUNZIP" = x; then
8633     as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8634   fi
8635 
8636 
8637 
8638 
8639 
8640   # Publish this variable in the help.
8641 
8642 
8643   if [ -z "${GZIP+x}" ]; then
8644     # The variable is not set by user, try to locate tool using the code snippet
8645     for ac_prog in pigz gzip
8646 do
8647   # Extract the first word of "$ac_prog", so it can be a program name with args.
8648 set dummy $ac_prog; ac_word=$2
8649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8650 $as_echo_n "checking for $ac_word... " >&6; }
8651 if ${ac_cv_path_GZIP+:} false; then :
8652   $as_echo_n "(cached) " >&6
8653 else
8654   case $GZIP in
8655   [\\/]* | ?:[\\/]*)
8656   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8657   ;;
8658   *)
8659   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8660 for as_dir in $PATH
8661 do
8662   IFS=$as_save_IFS
8663   test -z "$as_dir" && as_dir=.
8664     for ac_exec_ext in '' $ac_executable_extensions; do
8665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8666     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8668     break 2
8669   fi
8670 done
8671   done
8672 IFS=$as_save_IFS
8673 
8674   ;;
8675 esac
8676 fi
8677 GZIP=$ac_cv_path_GZIP
8678 if test -n "$GZIP"; then
8679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8680 $as_echo "$GZIP" >&6; }
8681 else
8682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8683 $as_echo "no" >&6; }
8684 fi
8685 
8686 
8687   test -n "$GZIP" && break
8688 done
8689 
8690   else
8691     # The variable is set, but is it from the command line or the environment?
8692 
8693     # Try to remove the string !GZIP! from our list.
8694     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8695     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8696       # If it failed, the variable was not from the command line. Ignore it,
8697       # but warn the user (except for BASH, which is always set by the calling BASH).
8698       if test "xGZIP" != xBASH; then
8699         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8700 $as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8701       fi
8702       # Try to locate tool using the code snippet
8703       for ac_prog in pigz gzip
8704 do
8705   # Extract the first word of "$ac_prog", so it can be a program name with args.
8706 set dummy $ac_prog; ac_word=$2
8707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8708 $as_echo_n "checking for $ac_word... " >&6; }
8709 if ${ac_cv_path_GZIP+:} false; then :
8710   $as_echo_n "(cached) " >&6
8711 else
8712   case $GZIP in
8713   [\\/]* | ?:[\\/]*)
8714   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8715   ;;
8716   *)
8717   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8718 for as_dir in $PATH
8719 do
8720   IFS=$as_save_IFS
8721   test -z "$as_dir" && as_dir=.
8722     for ac_exec_ext in '' $ac_executable_extensions; do
8723   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8724     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8725     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8726     break 2
8727   fi
8728 done
8729   done
8730 IFS=$as_save_IFS
8731 
8732   ;;
8733 esac
8734 fi
8735 GZIP=$ac_cv_path_GZIP
8736 if test -n "$GZIP"; then
8737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8738 $as_echo "$GZIP" >&6; }
8739 else
8740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8741 $as_echo "no" >&6; }
8742 fi
8743 
8744 
8745   test -n "$GZIP" && break
8746 done
8747 
8748     else
8749       # If it succeeded, then it was overridden by the user. We will use it
8750       # for the tool.
8751 
8752       # First remove it from the list of overridden variables, so we can test
8753       # for unknown variables in the end.
8754       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8755 
8756       # Check if we try to supply an empty value
8757       if test "x$GZIP" = x; then
8758         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8759 $as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8760         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8761 $as_echo_n "checking for GZIP... " >&6; }
8762         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8763 $as_echo "disabled" >&6; }
8764       else
8765         # Check if the provided tool contains a complete path.
8766         tool_specified="$GZIP"
8767         tool_basename="${tool_specified##*/}"
8768         if test "x$tool_basename" = "x$tool_specified"; then
8769           # A command without a complete path is provided, search $PATH.
8770           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8771 $as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8772           # Extract the first word of "$tool_basename", so it can be a program name with args.
8773 set dummy $tool_basename; ac_word=$2
8774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8775 $as_echo_n "checking for $ac_word... " >&6; }
8776 if ${ac_cv_path_GZIP+:} false; then :
8777   $as_echo_n "(cached) " >&6
8778 else
8779   case $GZIP in
8780   [\\/]* | ?:[\\/]*)
8781   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8782   ;;
8783   *)
8784   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8785 for as_dir in $PATH
8786 do
8787   IFS=$as_save_IFS
8788   test -z "$as_dir" && as_dir=.
8789     for ac_exec_ext in '' $ac_executable_extensions; do
8790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8791     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8793     break 2
8794   fi
8795 done
8796   done
8797 IFS=$as_save_IFS
8798 
8799   ;;
8800 esac
8801 fi
8802 GZIP=$ac_cv_path_GZIP
8803 if test -n "$GZIP"; then
8804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8805 $as_echo "$GZIP" >&6; }
8806 else
8807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8808 $as_echo "no" >&6; }
8809 fi
8810 
8811 
8812           if test "x$GZIP" = x; then
8813             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8814           fi
8815         else
8816           # Otherwise we believe it is a complete path. Use it as it is.
8817           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8818 $as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8819           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8820 $as_echo_n "checking for GZIP... " >&6; }
8821           if test ! -x "$tool_specified"; then
8822             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8823 $as_echo "not found" >&6; }
8824             as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8825           fi
8826           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8827 $as_echo "$tool_specified" >&6; }
8828         fi
8829       fi
8830     fi
8831 
8832   fi
8833 
8834 
8835 
8836   if test "x$GZIP" = x; then
8837     as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8838   fi
8839 
8840 
8841 
8842 
8843 
8844   # Publish this variable in the help.
8845 
8846 
8847   if [ -z "${LN+x}" ]; then
8848     # The variable is not set by user, try to locate tool using the code snippet
8849     for ac_prog in ln
8850 do
8851   # Extract the first word of "$ac_prog", so it can be a program name with args.
8852 set dummy $ac_prog; ac_word=$2
8853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8854 $as_echo_n "checking for $ac_word... " >&6; }
8855 if ${ac_cv_path_LN+:} false; then :
8856   $as_echo_n "(cached) " >&6
8857 else
8858   case $LN in
8859   [\\/]* | ?:[\\/]*)
8860   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8861   ;;
8862   *)
8863   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8864 for as_dir in $PATH
8865 do
8866   IFS=$as_save_IFS
8867   test -z "$as_dir" && as_dir=.
8868     for ac_exec_ext in '' $ac_executable_extensions; do
8869   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8870     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8871     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8872     break 2
8873   fi
8874 done
8875   done
8876 IFS=$as_save_IFS
8877 
8878   ;;
8879 esac
8880 fi
8881 LN=$ac_cv_path_LN
8882 if test -n "$LN"; then
8883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8884 $as_echo "$LN" >&6; }
8885 else
8886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8887 $as_echo "no" >&6; }
8888 fi
8889 
8890 
8891   test -n "$LN" && break
8892 done
8893 
8894   else
8895     # The variable is set, but is it from the command line or the environment?
8896 
8897     # Try to remove the string !LN! from our list.
8898     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8899     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8900       # If it failed, the variable was not from the command line. Ignore it,
8901       # but warn the user (except for BASH, which is always set by the calling BASH).
8902       if test "xLN" != xBASH; then
8903         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8904 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8905       fi
8906       # Try to locate tool using the code snippet
8907       for ac_prog in ln
8908 do
8909   # Extract the first word of "$ac_prog", so it can be a program name with args.
8910 set dummy $ac_prog; ac_word=$2
8911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8912 $as_echo_n "checking for $ac_word... " >&6; }
8913 if ${ac_cv_path_LN+:} false; then :
8914   $as_echo_n "(cached) " >&6
8915 else
8916   case $LN in
8917   [\\/]* | ?:[\\/]*)
8918   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8919   ;;
8920   *)
8921   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8922 for as_dir in $PATH
8923 do
8924   IFS=$as_save_IFS
8925   test -z "$as_dir" && as_dir=.
8926     for ac_exec_ext in '' $ac_executable_extensions; do
8927   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8928     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8929     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8930     break 2
8931   fi
8932 done
8933   done
8934 IFS=$as_save_IFS
8935 
8936   ;;
8937 esac
8938 fi
8939 LN=$ac_cv_path_LN
8940 if test -n "$LN"; then
8941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8942 $as_echo "$LN" >&6; }
8943 else
8944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8945 $as_echo "no" >&6; }
8946 fi
8947 
8948 
8949   test -n "$LN" && break
8950 done
8951 
8952     else
8953       # If it succeeded, then it was overridden by the user. We will use it
8954       # for the tool.
8955 
8956       # First remove it from the list of overridden variables, so we can test
8957       # for unknown variables in the end.
8958       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8959 
8960       # Check if we try to supply an empty value
8961       if test "x$LN" = x; then
8962         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8963 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8964         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8965 $as_echo_n "checking for LN... " >&6; }
8966         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8967 $as_echo "disabled" >&6; }
8968       else
8969         # Check if the provided tool contains a complete path.
8970         tool_specified="$LN"
8971         tool_basename="${tool_specified##*/}"
8972         if test "x$tool_basename" = "x$tool_specified"; then
8973           # A command without a complete path is provided, search $PATH.
8974           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8975 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8976           # Extract the first word of "$tool_basename", so it can be a program name with args.
8977 set dummy $tool_basename; ac_word=$2
8978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8979 $as_echo_n "checking for $ac_word... " >&6; }
8980 if ${ac_cv_path_LN+:} false; then :
8981   $as_echo_n "(cached) " >&6
8982 else
8983   case $LN in
8984   [\\/]* | ?:[\\/]*)
8985   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8986   ;;
8987   *)
8988   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8989 for as_dir in $PATH
8990 do
8991   IFS=$as_save_IFS
8992   test -z "$as_dir" && as_dir=.
8993     for ac_exec_ext in '' $ac_executable_extensions; do
8994   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8995     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8996     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8997     break 2
8998   fi
8999 done
9000   done
9001 IFS=$as_save_IFS
9002 
9003   ;;
9004 esac
9005 fi
9006 LN=$ac_cv_path_LN
9007 if test -n "$LN"; then
9008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9009 $as_echo "$LN" >&6; }
9010 else
9011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9012 $as_echo "no" >&6; }
9013 fi
9014 
9015 
9016           if test "x$LN" = x; then
9017             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9018           fi
9019         else
9020           # Otherwise we believe it is a complete path. Use it as it is.
9021           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9022 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9023           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9024 $as_echo_n "checking for LN... " >&6; }
9025           if test ! -x "$tool_specified"; then
9026             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9027 $as_echo "not found" >&6; }
9028             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9029           fi
9030           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9031 $as_echo "$tool_specified" >&6; }
9032         fi
9033       fi
9034     fi
9035 
9036   fi
9037 
9038 
9039 
9040   if test "x$LN" = x; then
9041     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9042   fi
9043 
9044 
9045 
9046 
9047 
9048   # Publish this variable in the help.
9049 
9050 
9051   if [ -z "${LS+x}" ]; then
9052     # The variable is not set by user, try to locate tool using the code snippet
9053     for ac_prog in ls
9054 do
9055   # Extract the first word of "$ac_prog", so it can be a program name with args.
9056 set dummy $ac_prog; ac_word=$2
9057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9058 $as_echo_n "checking for $ac_word... " >&6; }
9059 if ${ac_cv_path_LS+:} false; then :
9060   $as_echo_n "(cached) " >&6
9061 else
9062   case $LS in
9063   [\\/]* | ?:[\\/]*)
9064   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9065   ;;
9066   *)
9067   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9068 for as_dir in $PATH
9069 do
9070   IFS=$as_save_IFS
9071   test -z "$as_dir" && as_dir=.
9072     for ac_exec_ext in '' $ac_executable_extensions; do
9073   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9074     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9076     break 2
9077   fi
9078 done
9079   done
9080 IFS=$as_save_IFS
9081 
9082   ;;
9083 esac
9084 fi
9085 LS=$ac_cv_path_LS
9086 if test -n "$LS"; then
9087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9088 $as_echo "$LS" >&6; }
9089 else
9090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9091 $as_echo "no" >&6; }
9092 fi
9093 
9094 
9095   test -n "$LS" && break
9096 done
9097 
9098   else
9099     # The variable is set, but is it from the command line or the environment?
9100 
9101     # Try to remove the string !LS! from our list.
9102     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9103     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9104       # If it failed, the variable was not from the command line. Ignore it,
9105       # but warn the user (except for BASH, which is always set by the calling BASH).
9106       if test "xLS" != xBASH; then
9107         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9108 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9109       fi
9110       # Try to locate tool using the code snippet
9111       for ac_prog in ls
9112 do
9113   # Extract the first word of "$ac_prog", so it can be a program name with args.
9114 set dummy $ac_prog; ac_word=$2
9115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9116 $as_echo_n "checking for $ac_word... " >&6; }
9117 if ${ac_cv_path_LS+:} false; then :
9118   $as_echo_n "(cached) " >&6
9119 else
9120   case $LS in
9121   [\\/]* | ?:[\\/]*)
9122   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9123   ;;
9124   *)
9125   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9126 for as_dir in $PATH
9127 do
9128   IFS=$as_save_IFS
9129   test -z "$as_dir" && as_dir=.
9130     for ac_exec_ext in '' $ac_executable_extensions; do
9131   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9132     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9133     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9134     break 2
9135   fi
9136 done
9137   done
9138 IFS=$as_save_IFS
9139 
9140   ;;
9141 esac
9142 fi
9143 LS=$ac_cv_path_LS
9144 if test -n "$LS"; then
9145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9146 $as_echo "$LS" >&6; }
9147 else
9148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9149 $as_echo "no" >&6; }
9150 fi
9151 
9152 
9153   test -n "$LS" && break
9154 done
9155 
9156     else
9157       # If it succeeded, then it was overridden by the user. We will use it
9158       # for the tool.
9159 
9160       # First remove it from the list of overridden variables, so we can test
9161       # for unknown variables in the end.
9162       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9163 
9164       # Check if we try to supply an empty value
9165       if test "x$LS" = x; then
9166         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9167 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9168         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9169 $as_echo_n "checking for LS... " >&6; }
9170         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9171 $as_echo "disabled" >&6; }
9172       else
9173         # Check if the provided tool contains a complete path.
9174         tool_specified="$LS"
9175         tool_basename="${tool_specified##*/}"
9176         if test "x$tool_basename" = "x$tool_specified"; then
9177           # A command without a complete path is provided, search $PATH.
9178           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9179 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9180           # Extract the first word of "$tool_basename", so it can be a program name with args.
9181 set dummy $tool_basename; ac_word=$2
9182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9183 $as_echo_n "checking for $ac_word... " >&6; }
9184 if ${ac_cv_path_LS+:} false; then :
9185   $as_echo_n "(cached) " >&6
9186 else
9187   case $LS in
9188   [\\/]* | ?:[\\/]*)
9189   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9190   ;;
9191   *)
9192   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9193 for as_dir in $PATH
9194 do
9195   IFS=$as_save_IFS
9196   test -z "$as_dir" && as_dir=.
9197     for ac_exec_ext in '' $ac_executable_extensions; do
9198   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9199     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9200     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9201     break 2
9202   fi
9203 done
9204   done
9205 IFS=$as_save_IFS
9206 
9207   ;;
9208 esac
9209 fi
9210 LS=$ac_cv_path_LS
9211 if test -n "$LS"; then
9212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9213 $as_echo "$LS" >&6; }
9214 else
9215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9216 $as_echo "no" >&6; }
9217 fi
9218 
9219 
9220           if test "x$LS" = x; then
9221             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9222           fi
9223         else
9224           # Otherwise we believe it is a complete path. Use it as it is.
9225           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9226 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9227           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9228 $as_echo_n "checking for LS... " >&6; }
9229           if test ! -x "$tool_specified"; then
9230             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9231 $as_echo "not found" >&6; }
9232             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9233           fi
9234           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9235 $as_echo "$tool_specified" >&6; }
9236         fi
9237       fi
9238     fi
9239 
9240   fi
9241 
9242 
9243 
9244   if test "x$LS" = x; then
9245     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9246   fi
9247 
9248 
9249 
9250 
9251 
9252   # Publish this variable in the help.
9253 
9254 
9255   if [ -z "${MKDIR+x}" ]; then
9256     # The variable is not set by user, try to locate tool using the code snippet
9257     for ac_prog in mkdir
9258 do
9259   # Extract the first word of "$ac_prog", so it can be a program name with args.
9260 set dummy $ac_prog; ac_word=$2
9261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9262 $as_echo_n "checking for $ac_word... " >&6; }
9263 if ${ac_cv_path_MKDIR+:} false; then :
9264   $as_echo_n "(cached) " >&6
9265 else
9266   case $MKDIR in
9267   [\\/]* | ?:[\\/]*)
9268   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9269   ;;
9270   *)
9271   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9272 for as_dir in $PATH
9273 do
9274   IFS=$as_save_IFS
9275   test -z "$as_dir" && as_dir=.
9276     for ac_exec_ext in '' $ac_executable_extensions; do
9277   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9278     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9279     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9280     break 2
9281   fi
9282 done
9283   done
9284 IFS=$as_save_IFS
9285 
9286   ;;
9287 esac
9288 fi
9289 MKDIR=$ac_cv_path_MKDIR
9290 if test -n "$MKDIR"; then
9291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9292 $as_echo "$MKDIR" >&6; }
9293 else
9294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9295 $as_echo "no" >&6; }
9296 fi
9297 
9298 
9299   test -n "$MKDIR" && break
9300 done
9301 
9302   else
9303     # The variable is set, but is it from the command line or the environment?
9304 
9305     # Try to remove the string !MKDIR! from our list.
9306     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9307     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9308       # If it failed, the variable was not from the command line. Ignore it,
9309       # but warn the user (except for BASH, which is always set by the calling BASH).
9310       if test "xMKDIR" != xBASH; then
9311         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9312 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9313       fi
9314       # Try to locate tool using the code snippet
9315       for ac_prog in mkdir
9316 do
9317   # Extract the first word of "$ac_prog", so it can be a program name with args.
9318 set dummy $ac_prog; ac_word=$2
9319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9320 $as_echo_n "checking for $ac_word... " >&6; }
9321 if ${ac_cv_path_MKDIR+:} false; then :
9322   $as_echo_n "(cached) " >&6
9323 else
9324   case $MKDIR in
9325   [\\/]* | ?:[\\/]*)
9326   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9327   ;;
9328   *)
9329   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9330 for as_dir in $PATH
9331 do
9332   IFS=$as_save_IFS
9333   test -z "$as_dir" && as_dir=.
9334     for ac_exec_ext in '' $ac_executable_extensions; do
9335   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9336     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9338     break 2
9339   fi
9340 done
9341   done
9342 IFS=$as_save_IFS
9343 
9344   ;;
9345 esac
9346 fi
9347 MKDIR=$ac_cv_path_MKDIR
9348 if test -n "$MKDIR"; then
9349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9350 $as_echo "$MKDIR" >&6; }
9351 else
9352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9353 $as_echo "no" >&6; }
9354 fi
9355 
9356 
9357   test -n "$MKDIR" && break
9358 done
9359 
9360     else
9361       # If it succeeded, then it was overridden by the user. We will use it
9362       # for the tool.
9363 
9364       # First remove it from the list of overridden variables, so we can test
9365       # for unknown variables in the end.
9366       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9367 
9368       # Check if we try to supply an empty value
9369       if test "x$MKDIR" = x; then
9370         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9371 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9372         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9373 $as_echo_n "checking for MKDIR... " >&6; }
9374         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9375 $as_echo "disabled" >&6; }
9376       else
9377         # Check if the provided tool contains a complete path.
9378         tool_specified="$MKDIR"
9379         tool_basename="${tool_specified##*/}"
9380         if test "x$tool_basename" = "x$tool_specified"; then
9381           # A command without a complete path is provided, search $PATH.
9382           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9383 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9384           # Extract the first word of "$tool_basename", so it can be a program name with args.
9385 set dummy $tool_basename; ac_word=$2
9386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9387 $as_echo_n "checking for $ac_word... " >&6; }
9388 if ${ac_cv_path_MKDIR+:} false; then :
9389   $as_echo_n "(cached) " >&6
9390 else
9391   case $MKDIR in
9392   [\\/]* | ?:[\\/]*)
9393   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9394   ;;
9395   *)
9396   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9397 for as_dir in $PATH
9398 do
9399   IFS=$as_save_IFS
9400   test -z "$as_dir" && as_dir=.
9401     for ac_exec_ext in '' $ac_executable_extensions; do
9402   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9403     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9404     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9405     break 2
9406   fi
9407 done
9408   done
9409 IFS=$as_save_IFS
9410 
9411   ;;
9412 esac
9413 fi
9414 MKDIR=$ac_cv_path_MKDIR
9415 if test -n "$MKDIR"; then
9416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9417 $as_echo "$MKDIR" >&6; }
9418 else
9419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9420 $as_echo "no" >&6; }
9421 fi
9422 
9423 
9424           if test "x$MKDIR" = x; then
9425             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9426           fi
9427         else
9428           # Otherwise we believe it is a complete path. Use it as it is.
9429           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9430 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9431           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9432 $as_echo_n "checking for MKDIR... " >&6; }
9433           if test ! -x "$tool_specified"; then
9434             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9435 $as_echo "not found" >&6; }
9436             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9437           fi
9438           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9439 $as_echo "$tool_specified" >&6; }
9440         fi
9441       fi
9442     fi
9443 
9444   fi
9445 
9446 
9447 
9448   if test "x$MKDIR" = x; then
9449     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9450   fi
9451 
9452 
9453 
9454 
9455 
9456   # Publish this variable in the help.
9457 
9458 
9459   if [ -z "${MKTEMP+x}" ]; then
9460     # The variable is not set by user, try to locate tool using the code snippet
9461     for ac_prog in mktemp
9462 do
9463   # Extract the first word of "$ac_prog", so it can be a program name with args.
9464 set dummy $ac_prog; ac_word=$2
9465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9466 $as_echo_n "checking for $ac_word... " >&6; }
9467 if ${ac_cv_path_MKTEMP+:} false; then :
9468   $as_echo_n "(cached) " >&6
9469 else
9470   case $MKTEMP in
9471   [\\/]* | ?:[\\/]*)
9472   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9473   ;;
9474   *)
9475   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9476 for as_dir in $PATH
9477 do
9478   IFS=$as_save_IFS
9479   test -z "$as_dir" && as_dir=.
9480     for ac_exec_ext in '' $ac_executable_extensions; do
9481   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9482     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9484     break 2
9485   fi
9486 done
9487   done
9488 IFS=$as_save_IFS
9489 
9490   ;;
9491 esac
9492 fi
9493 MKTEMP=$ac_cv_path_MKTEMP
9494 if test -n "$MKTEMP"; then
9495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9496 $as_echo "$MKTEMP" >&6; }
9497 else
9498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9499 $as_echo "no" >&6; }
9500 fi
9501 
9502 
9503   test -n "$MKTEMP" && break
9504 done
9505 
9506   else
9507     # The variable is set, but is it from the command line or the environment?
9508 
9509     # Try to remove the string !MKTEMP! from our list.
9510     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9511     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9512       # If it failed, the variable was not from the command line. Ignore it,
9513       # but warn the user (except for BASH, which is always set by the calling BASH).
9514       if test "xMKTEMP" != xBASH; then
9515         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9516 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9517       fi
9518       # Try to locate tool using the code snippet
9519       for ac_prog in mktemp
9520 do
9521   # Extract the first word of "$ac_prog", so it can be a program name with args.
9522 set dummy $ac_prog; ac_word=$2
9523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9524 $as_echo_n "checking for $ac_word... " >&6; }
9525 if ${ac_cv_path_MKTEMP+:} false; then :
9526   $as_echo_n "(cached) " >&6
9527 else
9528   case $MKTEMP in
9529   [\\/]* | ?:[\\/]*)
9530   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9531   ;;
9532   *)
9533   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9534 for as_dir in $PATH
9535 do
9536   IFS=$as_save_IFS
9537   test -z "$as_dir" && as_dir=.
9538     for ac_exec_ext in '' $ac_executable_extensions; do
9539   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9540     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9541     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9542     break 2
9543   fi
9544 done
9545   done
9546 IFS=$as_save_IFS
9547 
9548   ;;
9549 esac
9550 fi
9551 MKTEMP=$ac_cv_path_MKTEMP
9552 if test -n "$MKTEMP"; then
9553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9554 $as_echo "$MKTEMP" >&6; }
9555 else
9556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9557 $as_echo "no" >&6; }
9558 fi
9559 
9560 
9561   test -n "$MKTEMP" && break
9562 done
9563 
9564     else
9565       # If it succeeded, then it was overridden by the user. We will use it
9566       # for the tool.
9567 
9568       # First remove it from the list of overridden variables, so we can test
9569       # for unknown variables in the end.
9570       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9571 
9572       # Check if we try to supply an empty value
9573       if test "x$MKTEMP" = x; then
9574         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9575 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9576         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9577 $as_echo_n "checking for MKTEMP... " >&6; }
9578         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9579 $as_echo "disabled" >&6; }
9580       else
9581         # Check if the provided tool contains a complete path.
9582         tool_specified="$MKTEMP"
9583         tool_basename="${tool_specified##*/}"
9584         if test "x$tool_basename" = "x$tool_specified"; then
9585           # A command without a complete path is provided, search $PATH.
9586           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9587 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9588           # Extract the first word of "$tool_basename", so it can be a program name with args.
9589 set dummy $tool_basename; ac_word=$2
9590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9591 $as_echo_n "checking for $ac_word... " >&6; }
9592 if ${ac_cv_path_MKTEMP+:} false; then :
9593   $as_echo_n "(cached) " >&6
9594 else
9595   case $MKTEMP in
9596   [\\/]* | ?:[\\/]*)
9597   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9598   ;;
9599   *)
9600   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9601 for as_dir in $PATH
9602 do
9603   IFS=$as_save_IFS
9604   test -z "$as_dir" && as_dir=.
9605     for ac_exec_ext in '' $ac_executable_extensions; do
9606   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9607     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9608     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9609     break 2
9610   fi
9611 done
9612   done
9613 IFS=$as_save_IFS
9614 
9615   ;;
9616 esac
9617 fi
9618 MKTEMP=$ac_cv_path_MKTEMP
9619 if test -n "$MKTEMP"; then
9620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9621 $as_echo "$MKTEMP" >&6; }
9622 else
9623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9624 $as_echo "no" >&6; }
9625 fi
9626 
9627 
9628           if test "x$MKTEMP" = x; then
9629             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9630           fi
9631         else
9632           # Otherwise we believe it is a complete path. Use it as it is.
9633           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9634 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9635           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9636 $as_echo_n "checking for MKTEMP... " >&6; }
9637           if test ! -x "$tool_specified"; then
9638             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9639 $as_echo "not found" >&6; }
9640             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9641           fi
9642           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9643 $as_echo "$tool_specified" >&6; }
9644         fi
9645       fi
9646     fi
9647 
9648   fi
9649 
9650 
9651 
9652   if test "x$MKTEMP" = x; then
9653     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9654   fi
9655 
9656 
9657 
9658 
9659 
9660   # Publish this variable in the help.
9661 
9662 
9663   if [ -z "${MV+x}" ]; then
9664     # The variable is not set by user, try to locate tool using the code snippet
9665     for ac_prog in mv
9666 do
9667   # Extract the first word of "$ac_prog", so it can be a program name with args.
9668 set dummy $ac_prog; ac_word=$2
9669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9670 $as_echo_n "checking for $ac_word... " >&6; }
9671 if ${ac_cv_path_MV+:} false; then :
9672   $as_echo_n "(cached) " >&6
9673 else
9674   case $MV in
9675   [\\/]* | ?:[\\/]*)
9676   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9677   ;;
9678   *)
9679   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9680 for as_dir in $PATH
9681 do
9682   IFS=$as_save_IFS
9683   test -z "$as_dir" && as_dir=.
9684     for ac_exec_ext in '' $ac_executable_extensions; do
9685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9686     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9688     break 2
9689   fi
9690 done
9691   done
9692 IFS=$as_save_IFS
9693 
9694   ;;
9695 esac
9696 fi
9697 MV=$ac_cv_path_MV
9698 if test -n "$MV"; then
9699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9700 $as_echo "$MV" >&6; }
9701 else
9702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9703 $as_echo "no" >&6; }
9704 fi
9705 
9706 
9707   test -n "$MV" && break
9708 done
9709 
9710   else
9711     # The variable is set, but is it from the command line or the environment?
9712 
9713     # Try to remove the string !MV! from our list.
9714     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9715     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9716       # If it failed, the variable was not from the command line. Ignore it,
9717       # but warn the user (except for BASH, which is always set by the calling BASH).
9718       if test "xMV" != xBASH; then
9719         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9720 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9721       fi
9722       # Try to locate tool using the code snippet
9723       for ac_prog in mv
9724 do
9725   # Extract the first word of "$ac_prog", so it can be a program name with args.
9726 set dummy $ac_prog; ac_word=$2
9727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9728 $as_echo_n "checking for $ac_word... " >&6; }
9729 if ${ac_cv_path_MV+:} false; then :
9730   $as_echo_n "(cached) " >&6
9731 else
9732   case $MV in
9733   [\\/]* | ?:[\\/]*)
9734   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9735   ;;
9736   *)
9737   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9738 for as_dir in $PATH
9739 do
9740   IFS=$as_save_IFS
9741   test -z "$as_dir" && as_dir=.
9742     for ac_exec_ext in '' $ac_executable_extensions; do
9743   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9744     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9746     break 2
9747   fi
9748 done
9749   done
9750 IFS=$as_save_IFS
9751 
9752   ;;
9753 esac
9754 fi
9755 MV=$ac_cv_path_MV
9756 if test -n "$MV"; then
9757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9758 $as_echo "$MV" >&6; }
9759 else
9760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9761 $as_echo "no" >&6; }
9762 fi
9763 
9764 
9765   test -n "$MV" && break
9766 done
9767 
9768     else
9769       # If it succeeded, then it was overridden by the user. We will use it
9770       # for the tool.
9771 
9772       # First remove it from the list of overridden variables, so we can test
9773       # for unknown variables in the end.
9774       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9775 
9776       # Check if we try to supply an empty value
9777       if test "x$MV" = x; then
9778         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9779 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9780         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9781 $as_echo_n "checking for MV... " >&6; }
9782         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9783 $as_echo "disabled" >&6; }
9784       else
9785         # Check if the provided tool contains a complete path.
9786         tool_specified="$MV"
9787         tool_basename="${tool_specified##*/}"
9788         if test "x$tool_basename" = "x$tool_specified"; then
9789           # A command without a complete path is provided, search $PATH.
9790           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9791 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9792           # Extract the first word of "$tool_basename", so it can be a program name with args.
9793 set dummy $tool_basename; ac_word=$2
9794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9795 $as_echo_n "checking for $ac_word... " >&6; }
9796 if ${ac_cv_path_MV+:} false; then :
9797   $as_echo_n "(cached) " >&6
9798 else
9799   case $MV in
9800   [\\/]* | ?:[\\/]*)
9801   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9802   ;;
9803   *)
9804   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9805 for as_dir in $PATH
9806 do
9807   IFS=$as_save_IFS
9808   test -z "$as_dir" && as_dir=.
9809     for ac_exec_ext in '' $ac_executable_extensions; do
9810   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9811     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9812     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9813     break 2
9814   fi
9815 done
9816   done
9817 IFS=$as_save_IFS
9818 
9819   ;;
9820 esac
9821 fi
9822 MV=$ac_cv_path_MV
9823 if test -n "$MV"; then
9824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9825 $as_echo "$MV" >&6; }
9826 else
9827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9828 $as_echo "no" >&6; }
9829 fi
9830 
9831 
9832           if test "x$MV" = x; then
9833             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9834           fi
9835         else
9836           # Otherwise we believe it is a complete path. Use it as it is.
9837           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9838 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9839           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9840 $as_echo_n "checking for MV... " >&6; }
9841           if test ! -x "$tool_specified"; then
9842             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9843 $as_echo "not found" >&6; }
9844             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9845           fi
9846           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9847 $as_echo "$tool_specified" >&6; }
9848         fi
9849       fi
9850     fi
9851 
9852   fi
9853 
9854 
9855 
9856   if test "x$MV" = x; then
9857     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9858   fi
9859 
9860 
9861 
9862 
9863 
9864   # Publish this variable in the help.
9865 
9866 
9867   if [ -z "${NAWK+x}" ]; then
9868     # The variable is not set by user, try to locate tool using the code snippet
9869     for ac_prog in nawk gawk awk
9870 do
9871   # Extract the first word of "$ac_prog", so it can be a program name with args.
9872 set dummy $ac_prog; ac_word=$2
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9874 $as_echo_n "checking for $ac_word... " >&6; }
9875 if ${ac_cv_path_NAWK+:} false; then :
9876   $as_echo_n "(cached) " >&6
9877 else
9878   case $NAWK in
9879   [\\/]* | ?:[\\/]*)
9880   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9881   ;;
9882   *)
9883   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9884 for as_dir in $PATH
9885 do
9886   IFS=$as_save_IFS
9887   test -z "$as_dir" && as_dir=.
9888     for ac_exec_ext in '' $ac_executable_extensions; do
9889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9890     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9892     break 2
9893   fi
9894 done
9895   done
9896 IFS=$as_save_IFS
9897 
9898   ;;
9899 esac
9900 fi
9901 NAWK=$ac_cv_path_NAWK
9902 if test -n "$NAWK"; then
9903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9904 $as_echo "$NAWK" >&6; }
9905 else
9906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9907 $as_echo "no" >&6; }
9908 fi
9909 
9910 
9911   test -n "$NAWK" && break
9912 done
9913 
9914   else
9915     # The variable is set, but is it from the command line or the environment?
9916 
9917     # Try to remove the string !NAWK! from our list.
9918     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9919     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9920       # If it failed, the variable was not from the command line. Ignore it,
9921       # but warn the user (except for BASH, which is always set by the calling BASH).
9922       if test "xNAWK" != xBASH; then
9923         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9924 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9925       fi
9926       # Try to locate tool using the code snippet
9927       for ac_prog in nawk gawk awk
9928 do
9929   # Extract the first word of "$ac_prog", so it can be a program name with args.
9930 set dummy $ac_prog; ac_word=$2
9931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9932 $as_echo_n "checking for $ac_word... " >&6; }
9933 if ${ac_cv_path_NAWK+:} false; then :
9934   $as_echo_n "(cached) " >&6
9935 else
9936   case $NAWK in
9937   [\\/]* | ?:[\\/]*)
9938   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9939   ;;
9940   *)
9941   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9942 for as_dir in $PATH
9943 do
9944   IFS=$as_save_IFS
9945   test -z "$as_dir" && as_dir=.
9946     for ac_exec_ext in '' $ac_executable_extensions; do
9947   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9948     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9949     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9950     break 2
9951   fi
9952 done
9953   done
9954 IFS=$as_save_IFS
9955 
9956   ;;
9957 esac
9958 fi
9959 NAWK=$ac_cv_path_NAWK
9960 if test -n "$NAWK"; then
9961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9962 $as_echo "$NAWK" >&6; }
9963 else
9964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9965 $as_echo "no" >&6; }
9966 fi
9967 
9968 
9969   test -n "$NAWK" && break
9970 done
9971 
9972     else
9973       # If it succeeded, then it was overridden by the user. We will use it
9974       # for the tool.
9975 
9976       # First remove it from the list of overridden variables, so we can test
9977       # for unknown variables in the end.
9978       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9979 
9980       # Check if we try to supply an empty value
9981       if test "x$NAWK" = x; then
9982         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9983 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9984         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9985 $as_echo_n "checking for NAWK... " >&6; }
9986         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9987 $as_echo "disabled" >&6; }
9988       else
9989         # Check if the provided tool contains a complete path.
9990         tool_specified="$NAWK"
9991         tool_basename="${tool_specified##*/}"
9992         if test "x$tool_basename" = "x$tool_specified"; then
9993           # A command without a complete path is provided, search $PATH.
9994           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9995 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9996           # Extract the first word of "$tool_basename", so it can be a program name with args.
9997 set dummy $tool_basename; ac_word=$2
9998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9999 $as_echo_n "checking for $ac_word... " >&6; }
10000 if ${ac_cv_path_NAWK+:} false; then :
10001   $as_echo_n "(cached) " >&6
10002 else
10003   case $NAWK in
10004   [\\/]* | ?:[\\/]*)
10005   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10006   ;;
10007   *)
10008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10009 for as_dir in $PATH
10010 do
10011   IFS=$as_save_IFS
10012   test -z "$as_dir" && as_dir=.
10013     for ac_exec_ext in '' $ac_executable_extensions; do
10014   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10015     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10017     break 2
10018   fi
10019 done
10020   done
10021 IFS=$as_save_IFS
10022 
10023   ;;
10024 esac
10025 fi
10026 NAWK=$ac_cv_path_NAWK
10027 if test -n "$NAWK"; then
10028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10029 $as_echo "$NAWK" >&6; }
10030 else
10031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10032 $as_echo "no" >&6; }
10033 fi
10034 
10035 
10036           if test "x$NAWK" = x; then
10037             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10038           fi
10039         else
10040           # Otherwise we believe it is a complete path. Use it as it is.
10041           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10042 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10043           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10044 $as_echo_n "checking for NAWK... " >&6; }
10045           if test ! -x "$tool_specified"; then
10046             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10047 $as_echo "not found" >&6; }
10048             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10049           fi
10050           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10051 $as_echo "$tool_specified" >&6; }
10052         fi
10053       fi
10054     fi
10055 
10056   fi
10057 
10058 
10059 
10060   if test "x$NAWK" = x; then
10061     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10062   fi
10063 
10064 
10065 
10066 
10067 
10068   # Publish this variable in the help.
10069 
10070 
10071   if [ -z "${PRINTF+x}" ]; then
10072     # The variable is not set by user, try to locate tool using the code snippet
10073     for ac_prog in printf
10074 do
10075   # Extract the first word of "$ac_prog", so it can be a program name with args.
10076 set dummy $ac_prog; ac_word=$2
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10078 $as_echo_n "checking for $ac_word... " >&6; }
10079 if ${ac_cv_path_PRINTF+:} false; then :
10080   $as_echo_n "(cached) " >&6
10081 else
10082   case $PRINTF in
10083   [\\/]* | ?:[\\/]*)
10084   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10085   ;;
10086   *)
10087   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10088 for as_dir in $PATH
10089 do
10090   IFS=$as_save_IFS
10091   test -z "$as_dir" && as_dir=.
10092     for ac_exec_ext in '' $ac_executable_extensions; do
10093   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10094     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10096     break 2
10097   fi
10098 done
10099   done
10100 IFS=$as_save_IFS
10101 
10102   ;;
10103 esac
10104 fi
10105 PRINTF=$ac_cv_path_PRINTF
10106 if test -n "$PRINTF"; then
10107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10108 $as_echo "$PRINTF" >&6; }
10109 else
10110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10111 $as_echo "no" >&6; }
10112 fi
10113 
10114 
10115   test -n "$PRINTF" && break
10116 done
10117 
10118   else
10119     # The variable is set, but is it from the command line or the environment?
10120 
10121     # Try to remove the string !PRINTF! from our list.
10122     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10123     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10124       # If it failed, the variable was not from the command line. Ignore it,
10125       # but warn the user (except for BASH, which is always set by the calling BASH).
10126       if test "xPRINTF" != xBASH; then
10127         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10128 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10129       fi
10130       # Try to locate tool using the code snippet
10131       for ac_prog in printf
10132 do
10133   # Extract the first word of "$ac_prog", so it can be a program name with args.
10134 set dummy $ac_prog; ac_word=$2
10135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10136 $as_echo_n "checking for $ac_word... " >&6; }
10137 if ${ac_cv_path_PRINTF+:} false; then :
10138   $as_echo_n "(cached) " >&6
10139 else
10140   case $PRINTF in
10141   [\\/]* | ?:[\\/]*)
10142   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10143   ;;
10144   *)
10145   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10146 for as_dir in $PATH
10147 do
10148   IFS=$as_save_IFS
10149   test -z "$as_dir" && as_dir=.
10150     for ac_exec_ext in '' $ac_executable_extensions; do
10151   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10152     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10153     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10154     break 2
10155   fi
10156 done
10157   done
10158 IFS=$as_save_IFS
10159 
10160   ;;
10161 esac
10162 fi
10163 PRINTF=$ac_cv_path_PRINTF
10164 if test -n "$PRINTF"; then
10165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10166 $as_echo "$PRINTF" >&6; }
10167 else
10168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10169 $as_echo "no" >&6; }
10170 fi
10171 
10172 
10173   test -n "$PRINTF" && break
10174 done
10175 
10176     else
10177       # If it succeeded, then it was overridden by the user. We will use it
10178       # for the tool.
10179 
10180       # First remove it from the list of overridden variables, so we can test
10181       # for unknown variables in the end.
10182       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10183 
10184       # Check if we try to supply an empty value
10185       if test "x$PRINTF" = x; then
10186         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10187 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10188         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10189 $as_echo_n "checking for PRINTF... " >&6; }
10190         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10191 $as_echo "disabled" >&6; }
10192       else
10193         # Check if the provided tool contains a complete path.
10194         tool_specified="$PRINTF"
10195         tool_basename="${tool_specified##*/}"
10196         if test "x$tool_basename" = "x$tool_specified"; then
10197           # A command without a complete path is provided, search $PATH.
10198           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10199 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10200           # Extract the first word of "$tool_basename", so it can be a program name with args.
10201 set dummy $tool_basename; ac_word=$2
10202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10203 $as_echo_n "checking for $ac_word... " >&6; }
10204 if ${ac_cv_path_PRINTF+:} false; then :
10205   $as_echo_n "(cached) " >&6
10206 else
10207   case $PRINTF in
10208   [\\/]* | ?:[\\/]*)
10209   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10210   ;;
10211   *)
10212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10213 for as_dir in $PATH
10214 do
10215   IFS=$as_save_IFS
10216   test -z "$as_dir" && as_dir=.
10217     for ac_exec_ext in '' $ac_executable_extensions; do
10218   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10219     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10220     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10221     break 2
10222   fi
10223 done
10224   done
10225 IFS=$as_save_IFS
10226 
10227   ;;
10228 esac
10229 fi
10230 PRINTF=$ac_cv_path_PRINTF
10231 if test -n "$PRINTF"; then
10232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10233 $as_echo "$PRINTF" >&6; }
10234 else
10235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10236 $as_echo "no" >&6; }
10237 fi
10238 
10239 
10240           if test "x$PRINTF" = x; then
10241             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10242           fi
10243         else
10244           # Otherwise we believe it is a complete path. Use it as it is.
10245           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10246 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10247           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10248 $as_echo_n "checking for PRINTF... " >&6; }
10249           if test ! -x "$tool_specified"; then
10250             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10251 $as_echo "not found" >&6; }
10252             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10253           fi
10254           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10255 $as_echo "$tool_specified" >&6; }
10256         fi
10257       fi
10258     fi
10259 
10260   fi
10261 
10262 
10263 
10264   if test "x$PRINTF" = x; then
10265     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10266   fi
10267 
10268 
10269 
10270 
10271 
10272   # Publish this variable in the help.
10273 
10274 
10275   if [ -z "${RM+x}" ]; then
10276     # The variable is not set by user, try to locate tool using the code snippet
10277     for ac_prog in rm
10278 do
10279   # Extract the first word of "$ac_prog", so it can be a program name with args.
10280 set dummy $ac_prog; ac_word=$2
10281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10282 $as_echo_n "checking for $ac_word... " >&6; }
10283 if ${ac_cv_path_RM+:} false; then :
10284   $as_echo_n "(cached) " >&6
10285 else
10286   case $RM in
10287   [\\/]* | ?:[\\/]*)
10288   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10289   ;;
10290   *)
10291   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10292 for as_dir in $PATH
10293 do
10294   IFS=$as_save_IFS
10295   test -z "$as_dir" && as_dir=.
10296     for ac_exec_ext in '' $ac_executable_extensions; do
10297   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10298     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10299     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10300     break 2
10301   fi
10302 done
10303   done
10304 IFS=$as_save_IFS
10305 
10306   ;;
10307 esac
10308 fi
10309 RM=$ac_cv_path_RM
10310 if test -n "$RM"; then
10311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10312 $as_echo "$RM" >&6; }
10313 else
10314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10315 $as_echo "no" >&6; }
10316 fi
10317 
10318 
10319   test -n "$RM" && break
10320 done
10321 
10322   else
10323     # The variable is set, but is it from the command line or the environment?
10324 
10325     # Try to remove the string !RM! from our list.
10326     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10327     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10328       # If it failed, the variable was not from the command line. Ignore it,
10329       # but warn the user (except for BASH, which is always set by the calling BASH).
10330       if test "xRM" != xBASH; then
10331         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10332 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10333       fi
10334       # Try to locate tool using the code snippet
10335       for ac_prog in rm
10336 do
10337   # Extract the first word of "$ac_prog", so it can be a program name with args.
10338 set dummy $ac_prog; ac_word=$2
10339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10340 $as_echo_n "checking for $ac_word... " >&6; }
10341 if ${ac_cv_path_RM+:} false; then :
10342   $as_echo_n "(cached) " >&6
10343 else
10344   case $RM in
10345   [\\/]* | ?:[\\/]*)
10346   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10347   ;;
10348   *)
10349   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10350 for as_dir in $PATH
10351 do
10352   IFS=$as_save_IFS
10353   test -z "$as_dir" && as_dir=.
10354     for ac_exec_ext in '' $ac_executable_extensions; do
10355   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10356     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10357     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10358     break 2
10359   fi
10360 done
10361   done
10362 IFS=$as_save_IFS
10363 
10364   ;;
10365 esac
10366 fi
10367 RM=$ac_cv_path_RM
10368 if test -n "$RM"; then
10369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10370 $as_echo "$RM" >&6; }
10371 else
10372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10373 $as_echo "no" >&6; }
10374 fi
10375 
10376 
10377   test -n "$RM" && break
10378 done
10379 
10380     else
10381       # If it succeeded, then it was overridden by the user. We will use it
10382       # for the tool.
10383 
10384       # First remove it from the list of overridden variables, so we can test
10385       # for unknown variables in the end.
10386       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10387 
10388       # Check if we try to supply an empty value
10389       if test "x$RM" = x; then
10390         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10391 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10392         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10393 $as_echo_n "checking for RM... " >&6; }
10394         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10395 $as_echo "disabled" >&6; }
10396       else
10397         # Check if the provided tool contains a complete path.
10398         tool_specified="$RM"
10399         tool_basename="${tool_specified##*/}"
10400         if test "x$tool_basename" = "x$tool_specified"; then
10401           # A command without a complete path is provided, search $PATH.
10402           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10403 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10404           # Extract the first word of "$tool_basename", so it can be a program name with args.
10405 set dummy $tool_basename; ac_word=$2
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10407 $as_echo_n "checking for $ac_word... " >&6; }
10408 if ${ac_cv_path_RM+:} false; then :
10409   $as_echo_n "(cached) " >&6
10410 else
10411   case $RM in
10412   [\\/]* | ?:[\\/]*)
10413   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10414   ;;
10415   *)
10416   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10417 for as_dir in $PATH
10418 do
10419   IFS=$as_save_IFS
10420   test -z "$as_dir" && as_dir=.
10421     for ac_exec_ext in '' $ac_executable_extensions; do
10422   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10423     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10424     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10425     break 2
10426   fi
10427 done
10428   done
10429 IFS=$as_save_IFS
10430 
10431   ;;
10432 esac
10433 fi
10434 RM=$ac_cv_path_RM
10435 if test -n "$RM"; then
10436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10437 $as_echo "$RM" >&6; }
10438 else
10439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10440 $as_echo "no" >&6; }
10441 fi
10442 
10443 
10444           if test "x$RM" = x; then
10445             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10446           fi
10447         else
10448           # Otherwise we believe it is a complete path. Use it as it is.
10449           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10450 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10451           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10452 $as_echo_n "checking for RM... " >&6; }
10453           if test ! -x "$tool_specified"; then
10454             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10455 $as_echo "not found" >&6; }
10456             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10457           fi
10458           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10459 $as_echo "$tool_specified" >&6; }
10460         fi
10461       fi
10462     fi
10463 
10464   fi
10465 
10466 
10467 
10468   if test "x$RM" = x; then
10469     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10470   fi
10471 
10472 
10473 
10474 
10475 
10476   # Publish this variable in the help.
10477 
10478 
10479   if [ -z "${RMDIR+x}" ]; then
10480     # The variable is not set by user, try to locate tool using the code snippet
10481     for ac_prog in rmdir
10482 do
10483   # Extract the first word of "$ac_prog", so it can be a program name with args.
10484 set dummy $ac_prog; ac_word=$2
10485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10486 $as_echo_n "checking for $ac_word... " >&6; }
10487 if ${ac_cv_path_RMDIR+:} false; then :
10488   $as_echo_n "(cached) " >&6
10489 else
10490   case $RMDIR in
10491   [\\/]* | ?:[\\/]*)
10492   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10493   ;;
10494   *)
10495   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10496 for as_dir in $PATH
10497 do
10498   IFS=$as_save_IFS
10499   test -z "$as_dir" && as_dir=.
10500     for ac_exec_ext in '' $ac_executable_extensions; do
10501   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10502     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10503     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10504     break 2
10505   fi
10506 done
10507   done
10508 IFS=$as_save_IFS
10509 
10510   ;;
10511 esac
10512 fi
10513 RMDIR=$ac_cv_path_RMDIR
10514 if test -n "$RMDIR"; then
10515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10516 $as_echo "$RMDIR" >&6; }
10517 else
10518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10519 $as_echo "no" >&6; }
10520 fi
10521 
10522 
10523   test -n "$RMDIR" && break
10524 done
10525 
10526   else
10527     # The variable is set, but is it from the command line or the environment?
10528 
10529     # Try to remove the string !RMDIR! from our list.
10530     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10531     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10532       # If it failed, the variable was not from the command line. Ignore it,
10533       # but warn the user (except for BASH, which is always set by the calling BASH).
10534       if test "xRMDIR" != xBASH; then
10535         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10536 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10537       fi
10538       # Try to locate tool using the code snippet
10539       for ac_prog in rmdir
10540 do
10541   # Extract the first word of "$ac_prog", so it can be a program name with args.
10542 set dummy $ac_prog; ac_word=$2
10543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10544 $as_echo_n "checking for $ac_word... " >&6; }
10545 if ${ac_cv_path_RMDIR+:} false; then :
10546   $as_echo_n "(cached) " >&6
10547 else
10548   case $RMDIR in
10549   [\\/]* | ?:[\\/]*)
10550   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10551   ;;
10552   *)
10553   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10554 for as_dir in $PATH
10555 do
10556   IFS=$as_save_IFS
10557   test -z "$as_dir" && as_dir=.
10558     for ac_exec_ext in '' $ac_executable_extensions; do
10559   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10560     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10561     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10562     break 2
10563   fi
10564 done
10565   done
10566 IFS=$as_save_IFS
10567 
10568   ;;
10569 esac
10570 fi
10571 RMDIR=$ac_cv_path_RMDIR
10572 if test -n "$RMDIR"; then
10573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10574 $as_echo "$RMDIR" >&6; }
10575 else
10576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10577 $as_echo "no" >&6; }
10578 fi
10579 
10580 
10581   test -n "$RMDIR" && break
10582 done
10583 
10584     else
10585       # If it succeeded, then it was overridden by the user. We will use it
10586       # for the tool.
10587 
10588       # First remove it from the list of overridden variables, so we can test
10589       # for unknown variables in the end.
10590       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10591 
10592       # Check if we try to supply an empty value
10593       if test "x$RMDIR" = x; then
10594         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10595 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10596         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10597 $as_echo_n "checking for RMDIR... " >&6; }
10598         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10599 $as_echo "disabled" >&6; }
10600       else
10601         # Check if the provided tool contains a complete path.
10602         tool_specified="$RMDIR"
10603         tool_basename="${tool_specified##*/}"
10604         if test "x$tool_basename" = "x$tool_specified"; then
10605           # A command without a complete path is provided, search $PATH.
10606           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10607 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10608           # Extract the first word of "$tool_basename", so it can be a program name with args.
10609 set dummy $tool_basename; ac_word=$2
10610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10611 $as_echo_n "checking for $ac_word... " >&6; }
10612 if ${ac_cv_path_RMDIR+:} false; then :
10613   $as_echo_n "(cached) " >&6
10614 else
10615   case $RMDIR in
10616   [\\/]* | ?:[\\/]*)
10617   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10618   ;;
10619   *)
10620   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10621 for as_dir in $PATH
10622 do
10623   IFS=$as_save_IFS
10624   test -z "$as_dir" && as_dir=.
10625     for ac_exec_ext in '' $ac_executable_extensions; do
10626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10627     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10629     break 2
10630   fi
10631 done
10632   done
10633 IFS=$as_save_IFS
10634 
10635   ;;
10636 esac
10637 fi
10638 RMDIR=$ac_cv_path_RMDIR
10639 if test -n "$RMDIR"; then
10640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10641 $as_echo "$RMDIR" >&6; }
10642 else
10643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10644 $as_echo "no" >&6; }
10645 fi
10646 
10647 
10648           if test "x$RMDIR" = x; then
10649             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10650           fi
10651         else
10652           # Otherwise we believe it is a complete path. Use it as it is.
10653           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10654 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10655           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10656 $as_echo_n "checking for RMDIR... " >&6; }
10657           if test ! -x "$tool_specified"; then
10658             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10659 $as_echo "not found" >&6; }
10660             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10661           fi
10662           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10663 $as_echo "$tool_specified" >&6; }
10664         fi
10665       fi
10666     fi
10667 
10668   fi
10669 
10670 
10671 
10672   if test "x$RMDIR" = x; then
10673     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10674   fi
10675 
10676 
10677 
10678 
10679 
10680   # Publish this variable in the help.
10681 
10682 
10683   if [ -z "${SH+x}" ]; then
10684     # The variable is not set by user, try to locate tool using the code snippet
10685     for ac_prog in sh
10686 do
10687   # Extract the first word of "$ac_prog", so it can be a program name with args.
10688 set dummy $ac_prog; ac_word=$2
10689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10690 $as_echo_n "checking for $ac_word... " >&6; }
10691 if ${ac_cv_path_SH+:} false; then :
10692   $as_echo_n "(cached) " >&6
10693 else
10694   case $SH in
10695   [\\/]* | ?:[\\/]*)
10696   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10697   ;;
10698   *)
10699   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10700 for as_dir in $PATH
10701 do
10702   IFS=$as_save_IFS
10703   test -z "$as_dir" && as_dir=.
10704     for ac_exec_ext in '' $ac_executable_extensions; do
10705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10706     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10708     break 2
10709   fi
10710 done
10711   done
10712 IFS=$as_save_IFS
10713 
10714   ;;
10715 esac
10716 fi
10717 SH=$ac_cv_path_SH
10718 if test -n "$SH"; then
10719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10720 $as_echo "$SH" >&6; }
10721 else
10722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10723 $as_echo "no" >&6; }
10724 fi
10725 
10726 
10727   test -n "$SH" && break
10728 done
10729 
10730   else
10731     # The variable is set, but is it from the command line or the environment?
10732 
10733     # Try to remove the string !SH! from our list.
10734     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10735     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10736       # If it failed, the variable was not from the command line. Ignore it,
10737       # but warn the user (except for BASH, which is always set by the calling BASH).
10738       if test "xSH" != xBASH; then
10739         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10740 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10741       fi
10742       # Try to locate tool using the code snippet
10743       for ac_prog in sh
10744 do
10745   # Extract the first word of "$ac_prog", so it can be a program name with args.
10746 set dummy $ac_prog; ac_word=$2
10747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10748 $as_echo_n "checking for $ac_word... " >&6; }
10749 if ${ac_cv_path_SH+:} false; then :
10750   $as_echo_n "(cached) " >&6
10751 else
10752   case $SH in
10753   [\\/]* | ?:[\\/]*)
10754   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10755   ;;
10756   *)
10757   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10758 for as_dir in $PATH
10759 do
10760   IFS=$as_save_IFS
10761   test -z "$as_dir" && as_dir=.
10762     for ac_exec_ext in '' $ac_executable_extensions; do
10763   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10764     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10765     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10766     break 2
10767   fi
10768 done
10769   done
10770 IFS=$as_save_IFS
10771 
10772   ;;
10773 esac
10774 fi
10775 SH=$ac_cv_path_SH
10776 if test -n "$SH"; then
10777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10778 $as_echo "$SH" >&6; }
10779 else
10780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10781 $as_echo "no" >&6; }
10782 fi
10783 
10784 
10785   test -n "$SH" && break
10786 done
10787 
10788     else
10789       # If it succeeded, then it was overridden by the user. We will use it
10790       # for the tool.
10791 
10792       # First remove it from the list of overridden variables, so we can test
10793       # for unknown variables in the end.
10794       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10795 
10796       # Check if we try to supply an empty value
10797       if test "x$SH" = x; then
10798         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10799 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10800         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10801 $as_echo_n "checking for SH... " >&6; }
10802         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10803 $as_echo "disabled" >&6; }
10804       else
10805         # Check if the provided tool contains a complete path.
10806         tool_specified="$SH"
10807         tool_basename="${tool_specified##*/}"
10808         if test "x$tool_basename" = "x$tool_specified"; then
10809           # A command without a complete path is provided, search $PATH.
10810           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10811 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10812           # Extract the first word of "$tool_basename", so it can be a program name with args.
10813 set dummy $tool_basename; ac_word=$2
10814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10815 $as_echo_n "checking for $ac_word... " >&6; }
10816 if ${ac_cv_path_SH+:} false; then :
10817   $as_echo_n "(cached) " >&6
10818 else
10819   case $SH in
10820   [\\/]* | ?:[\\/]*)
10821   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10822   ;;
10823   *)
10824   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10825 for as_dir in $PATH
10826 do
10827   IFS=$as_save_IFS
10828   test -z "$as_dir" && as_dir=.
10829     for ac_exec_ext in '' $ac_executable_extensions; do
10830   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10831     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10833     break 2
10834   fi
10835 done
10836   done
10837 IFS=$as_save_IFS
10838 
10839   ;;
10840 esac
10841 fi
10842 SH=$ac_cv_path_SH
10843 if test -n "$SH"; then
10844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10845 $as_echo "$SH" >&6; }
10846 else
10847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10848 $as_echo "no" >&6; }
10849 fi
10850 
10851 
10852           if test "x$SH" = x; then
10853             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10854           fi
10855         else
10856           # Otherwise we believe it is a complete path. Use it as it is.
10857           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10858 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10859           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10860 $as_echo_n "checking for SH... " >&6; }
10861           if test ! -x "$tool_specified"; then
10862             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10863 $as_echo "not found" >&6; }
10864             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10865           fi
10866           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10867 $as_echo "$tool_specified" >&6; }
10868         fi
10869       fi
10870     fi
10871 
10872   fi
10873 
10874 
10875 
10876   if test "x$SH" = x; then
10877     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10878   fi
10879 
10880 
10881 
10882 
10883 
10884   # Publish this variable in the help.
10885 
10886 
10887   if [ -z "${SORT+x}" ]; then
10888     # The variable is not set by user, try to locate tool using the code snippet
10889     for ac_prog in sort
10890 do
10891   # Extract the first word of "$ac_prog", so it can be a program name with args.
10892 set dummy $ac_prog; ac_word=$2
10893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10894 $as_echo_n "checking for $ac_word... " >&6; }
10895 if ${ac_cv_path_SORT+:} false; then :
10896   $as_echo_n "(cached) " >&6
10897 else
10898   case $SORT in
10899   [\\/]* | ?:[\\/]*)
10900   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10901   ;;
10902   *)
10903   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10904 for as_dir in $PATH
10905 do
10906   IFS=$as_save_IFS
10907   test -z "$as_dir" && as_dir=.
10908     for ac_exec_ext in '' $ac_executable_extensions; do
10909   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10910     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10911     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10912     break 2
10913   fi
10914 done
10915   done
10916 IFS=$as_save_IFS
10917 
10918   ;;
10919 esac
10920 fi
10921 SORT=$ac_cv_path_SORT
10922 if test -n "$SORT"; then
10923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10924 $as_echo "$SORT" >&6; }
10925 else
10926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10927 $as_echo "no" >&6; }
10928 fi
10929 
10930 
10931   test -n "$SORT" && break
10932 done
10933 
10934   else
10935     # The variable is set, but is it from the command line or the environment?
10936 
10937     # Try to remove the string !SORT! from our list.
10938     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10939     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10940       # If it failed, the variable was not from the command line. Ignore it,
10941       # but warn the user (except for BASH, which is always set by the calling BASH).
10942       if test "xSORT" != xBASH; then
10943         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10944 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10945       fi
10946       # Try to locate tool using the code snippet
10947       for ac_prog in sort
10948 do
10949   # Extract the first word of "$ac_prog", so it can be a program name with args.
10950 set dummy $ac_prog; ac_word=$2
10951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10952 $as_echo_n "checking for $ac_word... " >&6; }
10953 if ${ac_cv_path_SORT+:} false; then :
10954   $as_echo_n "(cached) " >&6
10955 else
10956   case $SORT in
10957   [\\/]* | ?:[\\/]*)
10958   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10959   ;;
10960   *)
10961   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10962 for as_dir in $PATH
10963 do
10964   IFS=$as_save_IFS
10965   test -z "$as_dir" && as_dir=.
10966     for ac_exec_ext in '' $ac_executable_extensions; do
10967   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10968     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10969     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10970     break 2
10971   fi
10972 done
10973   done
10974 IFS=$as_save_IFS
10975 
10976   ;;
10977 esac
10978 fi
10979 SORT=$ac_cv_path_SORT
10980 if test -n "$SORT"; then
10981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10982 $as_echo "$SORT" >&6; }
10983 else
10984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10985 $as_echo "no" >&6; }
10986 fi
10987 
10988 
10989   test -n "$SORT" && break
10990 done
10991 
10992     else
10993       # If it succeeded, then it was overridden by the user. We will use it
10994       # for the tool.
10995 
10996       # First remove it from the list of overridden variables, so we can test
10997       # for unknown variables in the end.
10998       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10999 
11000       # Check if we try to supply an empty value
11001       if test "x$SORT" = x; then
11002         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11003 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11004         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11005 $as_echo_n "checking for SORT... " >&6; }
11006         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11007 $as_echo "disabled" >&6; }
11008       else
11009         # Check if the provided tool contains a complete path.
11010         tool_specified="$SORT"
11011         tool_basename="${tool_specified##*/}"
11012         if test "x$tool_basename" = "x$tool_specified"; then
11013           # A command without a complete path is provided, search $PATH.
11014           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11015 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11016           # Extract the first word of "$tool_basename", so it can be a program name with args.
11017 set dummy $tool_basename; ac_word=$2
11018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11019 $as_echo_n "checking for $ac_word... " >&6; }
11020 if ${ac_cv_path_SORT+:} false; then :
11021   $as_echo_n "(cached) " >&6
11022 else
11023   case $SORT in
11024   [\\/]* | ?:[\\/]*)
11025   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11026   ;;
11027   *)
11028   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11029 for as_dir in $PATH
11030 do
11031   IFS=$as_save_IFS
11032   test -z "$as_dir" && as_dir=.
11033     for ac_exec_ext in '' $ac_executable_extensions; do
11034   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11035     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11036     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11037     break 2
11038   fi
11039 done
11040   done
11041 IFS=$as_save_IFS
11042 
11043   ;;
11044 esac
11045 fi
11046 SORT=$ac_cv_path_SORT
11047 if test -n "$SORT"; then
11048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11049 $as_echo "$SORT" >&6; }
11050 else
11051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11052 $as_echo "no" >&6; }
11053 fi
11054 
11055 
11056           if test "x$SORT" = x; then
11057             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11058           fi
11059         else
11060           # Otherwise we believe it is a complete path. Use it as it is.
11061           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11062 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11063           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11064 $as_echo_n "checking for SORT... " >&6; }
11065           if test ! -x "$tool_specified"; then
11066             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11067 $as_echo "not found" >&6; }
11068             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11069           fi
11070           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11071 $as_echo "$tool_specified" >&6; }
11072         fi
11073       fi
11074     fi
11075 
11076   fi
11077 
11078 
11079 
11080   if test "x$SORT" = x; then
11081     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11082   fi
11083 
11084 
11085 
11086 
11087 
11088   # Publish this variable in the help.
11089 
11090 
11091   if [ -z "${TAIL+x}" ]; then
11092     # The variable is not set by user, try to locate tool using the code snippet
11093     for ac_prog in tail
11094 do
11095   # Extract the first word of "$ac_prog", so it can be a program name with args.
11096 set dummy $ac_prog; ac_word=$2
11097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11098 $as_echo_n "checking for $ac_word... " >&6; }
11099 if ${ac_cv_path_TAIL+:} false; then :
11100   $as_echo_n "(cached) " >&6
11101 else
11102   case $TAIL in
11103   [\\/]* | ?:[\\/]*)
11104   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11105   ;;
11106   *)
11107   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11108 for as_dir in $PATH
11109 do
11110   IFS=$as_save_IFS
11111   test -z "$as_dir" && as_dir=.
11112     for ac_exec_ext in '' $ac_executable_extensions; do
11113   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11114     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11115     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11116     break 2
11117   fi
11118 done
11119   done
11120 IFS=$as_save_IFS
11121 
11122   ;;
11123 esac
11124 fi
11125 TAIL=$ac_cv_path_TAIL
11126 if test -n "$TAIL"; then
11127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11128 $as_echo "$TAIL" >&6; }
11129 else
11130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11131 $as_echo "no" >&6; }
11132 fi
11133 
11134 
11135   test -n "$TAIL" && break
11136 done
11137 
11138   else
11139     # The variable is set, but is it from the command line or the environment?
11140 
11141     # Try to remove the string !TAIL! from our list.
11142     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11143     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11144       # If it failed, the variable was not from the command line. Ignore it,
11145       # but warn the user (except for BASH, which is always set by the calling BASH).
11146       if test "xTAIL" != xBASH; then
11147         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11148 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11149       fi
11150       # Try to locate tool using the code snippet
11151       for ac_prog in tail
11152 do
11153   # Extract the first word of "$ac_prog", so it can be a program name with args.
11154 set dummy $ac_prog; ac_word=$2
11155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11156 $as_echo_n "checking for $ac_word... " >&6; }
11157 if ${ac_cv_path_TAIL+:} false; then :
11158   $as_echo_n "(cached) " >&6
11159 else
11160   case $TAIL in
11161   [\\/]* | ?:[\\/]*)
11162   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11163   ;;
11164   *)
11165   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11166 for as_dir in $PATH
11167 do
11168   IFS=$as_save_IFS
11169   test -z "$as_dir" && as_dir=.
11170     for ac_exec_ext in '' $ac_executable_extensions; do
11171   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11172     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11174     break 2
11175   fi
11176 done
11177   done
11178 IFS=$as_save_IFS
11179 
11180   ;;
11181 esac
11182 fi
11183 TAIL=$ac_cv_path_TAIL
11184 if test -n "$TAIL"; then
11185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11186 $as_echo "$TAIL" >&6; }
11187 else
11188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11189 $as_echo "no" >&6; }
11190 fi
11191 
11192 
11193   test -n "$TAIL" && break
11194 done
11195 
11196     else
11197       # If it succeeded, then it was overridden by the user. We will use it
11198       # for the tool.
11199 
11200       # First remove it from the list of overridden variables, so we can test
11201       # for unknown variables in the end.
11202       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11203 
11204       # Check if we try to supply an empty value
11205       if test "x$TAIL" = x; then
11206         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11207 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11208         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11209 $as_echo_n "checking for TAIL... " >&6; }
11210         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11211 $as_echo "disabled" >&6; }
11212       else
11213         # Check if the provided tool contains a complete path.
11214         tool_specified="$TAIL"
11215         tool_basename="${tool_specified##*/}"
11216         if test "x$tool_basename" = "x$tool_specified"; then
11217           # A command without a complete path is provided, search $PATH.
11218           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11219 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11220           # Extract the first word of "$tool_basename", so it can be a program name with args.
11221 set dummy $tool_basename; ac_word=$2
11222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11223 $as_echo_n "checking for $ac_word... " >&6; }
11224 if ${ac_cv_path_TAIL+:} false; then :
11225   $as_echo_n "(cached) " >&6
11226 else
11227   case $TAIL in
11228   [\\/]* | ?:[\\/]*)
11229   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11230   ;;
11231   *)
11232   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11233 for as_dir in $PATH
11234 do
11235   IFS=$as_save_IFS
11236   test -z "$as_dir" && as_dir=.
11237     for ac_exec_ext in '' $ac_executable_extensions; do
11238   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11239     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11240     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11241     break 2
11242   fi
11243 done
11244   done
11245 IFS=$as_save_IFS
11246 
11247   ;;
11248 esac
11249 fi
11250 TAIL=$ac_cv_path_TAIL
11251 if test -n "$TAIL"; then
11252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11253 $as_echo "$TAIL" >&6; }
11254 else
11255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11256 $as_echo "no" >&6; }
11257 fi
11258 
11259 
11260           if test "x$TAIL" = x; then
11261             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11262           fi
11263         else
11264           # Otherwise we believe it is a complete path. Use it as it is.
11265           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11266 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11267           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11268 $as_echo_n "checking for TAIL... " >&6; }
11269           if test ! -x "$tool_specified"; then
11270             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11271 $as_echo "not found" >&6; }
11272             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11273           fi
11274           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11275 $as_echo "$tool_specified" >&6; }
11276         fi
11277       fi
11278     fi
11279 
11280   fi
11281 
11282 
11283 
11284   if test "x$TAIL" = x; then
11285     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11286   fi
11287 
11288 
11289 
11290 
11291 
11292   # Publish this variable in the help.
11293 
11294 
11295   if [ -z "${TAR+x}" ]; then
11296     # The variable is not set by user, try to locate tool using the code snippet
11297     for ac_prog in gtar tar
11298 do
11299   # Extract the first word of "$ac_prog", so it can be a program name with args.
11300 set dummy $ac_prog; ac_word=$2
11301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11302 $as_echo_n "checking for $ac_word... " >&6; }
11303 if ${ac_cv_path_TAR+:} false; then :
11304   $as_echo_n "(cached) " >&6
11305 else
11306   case $TAR in
11307   [\\/]* | ?:[\\/]*)
11308   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11309   ;;
11310   *)
11311   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11312 for as_dir in $PATH
11313 do
11314   IFS=$as_save_IFS
11315   test -z "$as_dir" && as_dir=.
11316     for ac_exec_ext in '' $ac_executable_extensions; do
11317   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11318     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11319     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11320     break 2
11321   fi
11322 done
11323   done
11324 IFS=$as_save_IFS
11325 
11326   ;;
11327 esac
11328 fi
11329 TAR=$ac_cv_path_TAR
11330 if test -n "$TAR"; then
11331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11332 $as_echo "$TAR" >&6; }
11333 else
11334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11335 $as_echo "no" >&6; }
11336 fi
11337 
11338 
11339   test -n "$TAR" && break
11340 done
11341 
11342   else
11343     # The variable is set, but is it from the command line or the environment?
11344 
11345     # Try to remove the string !TAR! from our list.
11346     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11347     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11348       # If it failed, the variable was not from the command line. Ignore it,
11349       # but warn the user (except for BASH, which is always set by the calling BASH).
11350       if test "xTAR" != xBASH; then
11351         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11352 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11353       fi
11354       # Try to locate tool using the code snippet
11355       for ac_prog in gtar tar
11356 do
11357   # Extract the first word of "$ac_prog", so it can be a program name with args.
11358 set dummy $ac_prog; ac_word=$2
11359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11360 $as_echo_n "checking for $ac_word... " >&6; }
11361 if ${ac_cv_path_TAR+:} false; then :
11362   $as_echo_n "(cached) " >&6
11363 else
11364   case $TAR in
11365   [\\/]* | ?:[\\/]*)
11366   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11367   ;;
11368   *)
11369   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11370 for as_dir in $PATH
11371 do
11372   IFS=$as_save_IFS
11373   test -z "$as_dir" && as_dir=.
11374     for ac_exec_ext in '' $ac_executable_extensions; do
11375   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11376     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11377     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11378     break 2
11379   fi
11380 done
11381   done
11382 IFS=$as_save_IFS
11383 
11384   ;;
11385 esac
11386 fi
11387 TAR=$ac_cv_path_TAR
11388 if test -n "$TAR"; then
11389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11390 $as_echo "$TAR" >&6; }
11391 else
11392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11393 $as_echo "no" >&6; }
11394 fi
11395 
11396 
11397   test -n "$TAR" && break
11398 done
11399 
11400     else
11401       # If it succeeded, then it was overridden by the user. We will use it
11402       # for the tool.
11403 
11404       # First remove it from the list of overridden variables, so we can test
11405       # for unknown variables in the end.
11406       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11407 
11408       # Check if we try to supply an empty value
11409       if test "x$TAR" = x; then
11410         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11411 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11412         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11413 $as_echo_n "checking for TAR... " >&6; }
11414         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11415 $as_echo "disabled" >&6; }
11416       else
11417         # Check if the provided tool contains a complete path.
11418         tool_specified="$TAR"
11419         tool_basename="${tool_specified##*/}"
11420         if test "x$tool_basename" = "x$tool_specified"; then
11421           # A command without a complete path is provided, search $PATH.
11422           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11423 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11424           # Extract the first word of "$tool_basename", so it can be a program name with args.
11425 set dummy $tool_basename; ac_word=$2
11426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11427 $as_echo_n "checking for $ac_word... " >&6; }
11428 if ${ac_cv_path_TAR+:} false; then :
11429   $as_echo_n "(cached) " >&6
11430 else
11431   case $TAR in
11432   [\\/]* | ?:[\\/]*)
11433   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11434   ;;
11435   *)
11436   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11437 for as_dir in $PATH
11438 do
11439   IFS=$as_save_IFS
11440   test -z "$as_dir" && as_dir=.
11441     for ac_exec_ext in '' $ac_executable_extensions; do
11442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11443     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11445     break 2
11446   fi
11447 done
11448   done
11449 IFS=$as_save_IFS
11450 
11451   ;;
11452 esac
11453 fi
11454 TAR=$ac_cv_path_TAR
11455 if test -n "$TAR"; then
11456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11457 $as_echo "$TAR" >&6; }
11458 else
11459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11460 $as_echo "no" >&6; }
11461 fi
11462 
11463 
11464           if test "x$TAR" = x; then
11465             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11466           fi
11467         else
11468           # Otherwise we believe it is a complete path. Use it as it is.
11469           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11470 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11471           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11472 $as_echo_n "checking for TAR... " >&6; }
11473           if test ! -x "$tool_specified"; then
11474             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11475 $as_echo "not found" >&6; }
11476             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11477           fi
11478           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11479 $as_echo "$tool_specified" >&6; }
11480         fi
11481       fi
11482     fi
11483 
11484   fi
11485 
11486 
11487 
11488   if test "x$TAR" = x; then
11489     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11490   fi
11491 
11492 
11493 
11494 
11495 
11496   # Publish this variable in the help.
11497 
11498 
11499   if [ -z "${TEE+x}" ]; then
11500     # The variable is not set by user, try to locate tool using the code snippet
11501     for ac_prog in tee
11502 do
11503   # Extract the first word of "$ac_prog", so it can be a program name with args.
11504 set dummy $ac_prog; ac_word=$2
11505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11506 $as_echo_n "checking for $ac_word... " >&6; }
11507 if ${ac_cv_path_TEE+:} false; then :
11508   $as_echo_n "(cached) " >&6
11509 else
11510   case $TEE in
11511   [\\/]* | ?:[\\/]*)
11512   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11513   ;;
11514   *)
11515   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11516 for as_dir in $PATH
11517 do
11518   IFS=$as_save_IFS
11519   test -z "$as_dir" && as_dir=.
11520     for ac_exec_ext in '' $ac_executable_extensions; do
11521   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11522     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11523     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11524     break 2
11525   fi
11526 done
11527   done
11528 IFS=$as_save_IFS
11529 
11530   ;;
11531 esac
11532 fi
11533 TEE=$ac_cv_path_TEE
11534 if test -n "$TEE"; then
11535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11536 $as_echo "$TEE" >&6; }
11537 else
11538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11539 $as_echo "no" >&6; }
11540 fi
11541 
11542 
11543   test -n "$TEE" && break
11544 done
11545 
11546   else
11547     # The variable is set, but is it from the command line or the environment?
11548 
11549     # Try to remove the string !TEE! from our list.
11550     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11551     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11552       # If it failed, the variable was not from the command line. Ignore it,
11553       # but warn the user (except for BASH, which is always set by the calling BASH).
11554       if test "xTEE" != xBASH; then
11555         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11556 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11557       fi
11558       # Try to locate tool using the code snippet
11559       for ac_prog in tee
11560 do
11561   # Extract the first word of "$ac_prog", so it can be a program name with args.
11562 set dummy $ac_prog; ac_word=$2
11563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11564 $as_echo_n "checking for $ac_word... " >&6; }
11565 if ${ac_cv_path_TEE+:} false; then :
11566   $as_echo_n "(cached) " >&6
11567 else
11568   case $TEE in
11569   [\\/]* | ?:[\\/]*)
11570   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11571   ;;
11572   *)
11573   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11574 for as_dir in $PATH
11575 do
11576   IFS=$as_save_IFS
11577   test -z "$as_dir" && as_dir=.
11578     for ac_exec_ext in '' $ac_executable_extensions; do
11579   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11580     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11582     break 2
11583   fi
11584 done
11585   done
11586 IFS=$as_save_IFS
11587 
11588   ;;
11589 esac
11590 fi
11591 TEE=$ac_cv_path_TEE
11592 if test -n "$TEE"; then
11593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11594 $as_echo "$TEE" >&6; }
11595 else
11596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11597 $as_echo "no" >&6; }
11598 fi
11599 
11600 
11601   test -n "$TEE" && break
11602 done
11603 
11604     else
11605       # If it succeeded, then it was overridden by the user. We will use it
11606       # for the tool.
11607 
11608       # First remove it from the list of overridden variables, so we can test
11609       # for unknown variables in the end.
11610       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11611 
11612       # Check if we try to supply an empty value
11613       if test "x$TEE" = x; then
11614         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11615 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11616         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11617 $as_echo_n "checking for TEE... " >&6; }
11618         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11619 $as_echo "disabled" >&6; }
11620       else
11621         # Check if the provided tool contains a complete path.
11622         tool_specified="$TEE"
11623         tool_basename="${tool_specified##*/}"
11624         if test "x$tool_basename" = "x$tool_specified"; then
11625           # A command without a complete path is provided, search $PATH.
11626           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11627 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11628           # Extract the first word of "$tool_basename", so it can be a program name with args.
11629 set dummy $tool_basename; ac_word=$2
11630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11631 $as_echo_n "checking for $ac_word... " >&6; }
11632 if ${ac_cv_path_TEE+:} false; then :
11633   $as_echo_n "(cached) " >&6
11634 else
11635   case $TEE in
11636   [\\/]* | ?:[\\/]*)
11637   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11638   ;;
11639   *)
11640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11641 for as_dir in $PATH
11642 do
11643   IFS=$as_save_IFS
11644   test -z "$as_dir" && as_dir=.
11645     for ac_exec_ext in '' $ac_executable_extensions; do
11646   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11647     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11649     break 2
11650   fi
11651 done
11652   done
11653 IFS=$as_save_IFS
11654 
11655   ;;
11656 esac
11657 fi
11658 TEE=$ac_cv_path_TEE
11659 if test -n "$TEE"; then
11660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11661 $as_echo "$TEE" >&6; }
11662 else
11663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11664 $as_echo "no" >&6; }
11665 fi
11666 
11667 
11668           if test "x$TEE" = x; then
11669             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11670           fi
11671         else
11672           # Otherwise we believe it is a complete path. Use it as it is.
11673           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11674 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11675           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11676 $as_echo_n "checking for TEE... " >&6; }
11677           if test ! -x "$tool_specified"; then
11678             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11679 $as_echo "not found" >&6; }
11680             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11681           fi
11682           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11683 $as_echo "$tool_specified" >&6; }
11684         fi
11685       fi
11686     fi
11687 
11688   fi
11689 
11690 
11691 
11692   if test "x$TEE" = x; then
11693     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11694   fi
11695 
11696 
11697 
11698 
11699 
11700   # Publish this variable in the help.
11701 
11702 
11703   if [ -z "${TOUCH+x}" ]; then
11704     # The variable is not set by user, try to locate tool using the code snippet
11705     for ac_prog in touch
11706 do
11707   # Extract the first word of "$ac_prog", so it can be a program name with args.
11708 set dummy $ac_prog; ac_word=$2
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11710 $as_echo_n "checking for $ac_word... " >&6; }
11711 if ${ac_cv_path_TOUCH+:} false; then :
11712   $as_echo_n "(cached) " >&6
11713 else
11714   case $TOUCH in
11715   [\\/]* | ?:[\\/]*)
11716   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11717   ;;
11718   *)
11719   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11720 for as_dir in $PATH
11721 do
11722   IFS=$as_save_IFS
11723   test -z "$as_dir" && as_dir=.
11724     for ac_exec_ext in '' $ac_executable_extensions; do
11725   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11726     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11728     break 2
11729   fi
11730 done
11731   done
11732 IFS=$as_save_IFS
11733 
11734   ;;
11735 esac
11736 fi
11737 TOUCH=$ac_cv_path_TOUCH
11738 if test -n "$TOUCH"; then
11739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11740 $as_echo "$TOUCH" >&6; }
11741 else
11742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11743 $as_echo "no" >&6; }
11744 fi
11745 
11746 
11747   test -n "$TOUCH" && break
11748 done
11749 
11750   else
11751     # The variable is set, but is it from the command line or the environment?
11752 
11753     # Try to remove the string !TOUCH! from our list.
11754     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11755     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11756       # If it failed, the variable was not from the command line. Ignore it,
11757       # but warn the user (except for BASH, which is always set by the calling BASH).
11758       if test "xTOUCH" != xBASH; then
11759         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11760 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11761       fi
11762       # Try to locate tool using the code snippet
11763       for ac_prog in touch
11764 do
11765   # Extract the first word of "$ac_prog", so it can be a program name with args.
11766 set dummy $ac_prog; ac_word=$2
11767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11768 $as_echo_n "checking for $ac_word... " >&6; }
11769 if ${ac_cv_path_TOUCH+:} false; then :
11770   $as_echo_n "(cached) " >&6
11771 else
11772   case $TOUCH in
11773   [\\/]* | ?:[\\/]*)
11774   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11775   ;;
11776   *)
11777   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11778 for as_dir in $PATH
11779 do
11780   IFS=$as_save_IFS
11781   test -z "$as_dir" && as_dir=.
11782     for ac_exec_ext in '' $ac_executable_extensions; do
11783   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11784     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11785     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11786     break 2
11787   fi
11788 done
11789   done
11790 IFS=$as_save_IFS
11791 
11792   ;;
11793 esac
11794 fi
11795 TOUCH=$ac_cv_path_TOUCH
11796 if test -n "$TOUCH"; then
11797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11798 $as_echo "$TOUCH" >&6; }
11799 else
11800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11801 $as_echo "no" >&6; }
11802 fi
11803 
11804 
11805   test -n "$TOUCH" && break
11806 done
11807 
11808     else
11809       # If it succeeded, then it was overridden by the user. We will use it
11810       # for the tool.
11811 
11812       # First remove it from the list of overridden variables, so we can test
11813       # for unknown variables in the end.
11814       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11815 
11816       # Check if we try to supply an empty value
11817       if test "x$TOUCH" = x; then
11818         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11819 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11820         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11821 $as_echo_n "checking for TOUCH... " >&6; }
11822         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11823 $as_echo "disabled" >&6; }
11824       else
11825         # Check if the provided tool contains a complete path.
11826         tool_specified="$TOUCH"
11827         tool_basename="${tool_specified##*/}"
11828         if test "x$tool_basename" = "x$tool_specified"; then
11829           # A command without a complete path is provided, search $PATH.
11830           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11831 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11832           # Extract the first word of "$tool_basename", so it can be a program name with args.
11833 set dummy $tool_basename; ac_word=$2
11834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11835 $as_echo_n "checking for $ac_word... " >&6; }
11836 if ${ac_cv_path_TOUCH+:} false; then :
11837   $as_echo_n "(cached) " >&6
11838 else
11839   case $TOUCH in
11840   [\\/]* | ?:[\\/]*)
11841   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11842   ;;
11843   *)
11844   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11845 for as_dir in $PATH
11846 do
11847   IFS=$as_save_IFS
11848   test -z "$as_dir" && as_dir=.
11849     for ac_exec_ext in '' $ac_executable_extensions; do
11850   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11851     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11852     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11853     break 2
11854   fi
11855 done
11856   done
11857 IFS=$as_save_IFS
11858 
11859   ;;
11860 esac
11861 fi
11862 TOUCH=$ac_cv_path_TOUCH
11863 if test -n "$TOUCH"; then
11864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11865 $as_echo "$TOUCH" >&6; }
11866 else
11867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11868 $as_echo "no" >&6; }
11869 fi
11870 
11871 
11872           if test "x$TOUCH" = x; then
11873             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11874           fi
11875         else
11876           # Otherwise we believe it is a complete path. Use it as it is.
11877           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11878 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11879           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11880 $as_echo_n "checking for TOUCH... " >&6; }
11881           if test ! -x "$tool_specified"; then
11882             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11883 $as_echo "not found" >&6; }
11884             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11885           fi
11886           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11887 $as_echo "$tool_specified" >&6; }
11888         fi
11889       fi
11890     fi
11891 
11892   fi
11893 
11894 
11895 
11896   if test "x$TOUCH" = x; then
11897     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11898   fi
11899 
11900 
11901 
11902 
11903 
11904   # Publish this variable in the help.
11905 
11906 
11907   if [ -z "${TR+x}" ]; then
11908     # The variable is not set by user, try to locate tool using the code snippet
11909     for ac_prog in tr
11910 do
11911   # Extract the first word of "$ac_prog", so it can be a program name with args.
11912 set dummy $ac_prog; ac_word=$2
11913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11914 $as_echo_n "checking for $ac_word... " >&6; }
11915 if ${ac_cv_path_TR+:} false; then :
11916   $as_echo_n "(cached) " >&6
11917 else
11918   case $TR in
11919   [\\/]* | ?:[\\/]*)
11920   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11921   ;;
11922   *)
11923   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11924 for as_dir in $PATH
11925 do
11926   IFS=$as_save_IFS
11927   test -z "$as_dir" && as_dir=.
11928     for ac_exec_ext in '' $ac_executable_extensions; do
11929   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11930     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11932     break 2
11933   fi
11934 done
11935   done
11936 IFS=$as_save_IFS
11937 
11938   ;;
11939 esac
11940 fi
11941 TR=$ac_cv_path_TR
11942 if test -n "$TR"; then
11943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11944 $as_echo "$TR" >&6; }
11945 else
11946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11947 $as_echo "no" >&6; }
11948 fi
11949 
11950 
11951   test -n "$TR" && break
11952 done
11953 
11954   else
11955     # The variable is set, but is it from the command line or the environment?
11956 
11957     # Try to remove the string !TR! from our list.
11958     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11959     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11960       # If it failed, the variable was not from the command line. Ignore it,
11961       # but warn the user (except for BASH, which is always set by the calling BASH).
11962       if test "xTR" != xBASH; then
11963         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11964 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11965       fi
11966       # Try to locate tool using the code snippet
11967       for ac_prog in tr
11968 do
11969   # Extract the first word of "$ac_prog", so it can be a program name with args.
11970 set dummy $ac_prog; ac_word=$2
11971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11972 $as_echo_n "checking for $ac_word... " >&6; }
11973 if ${ac_cv_path_TR+:} false; then :
11974   $as_echo_n "(cached) " >&6
11975 else
11976   case $TR in
11977   [\\/]* | ?:[\\/]*)
11978   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11979   ;;
11980   *)
11981   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11982 for as_dir in $PATH
11983 do
11984   IFS=$as_save_IFS
11985   test -z "$as_dir" && as_dir=.
11986     for ac_exec_ext in '' $ac_executable_extensions; do
11987   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11988     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11989     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11990     break 2
11991   fi
11992 done
11993   done
11994 IFS=$as_save_IFS
11995 
11996   ;;
11997 esac
11998 fi
11999 TR=$ac_cv_path_TR
12000 if test -n "$TR"; then
12001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12002 $as_echo "$TR" >&6; }
12003 else
12004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12005 $as_echo "no" >&6; }
12006 fi
12007 
12008 
12009   test -n "$TR" && break
12010 done
12011 
12012     else
12013       # If it succeeded, then it was overridden by the user. We will use it
12014       # for the tool.
12015 
12016       # First remove it from the list of overridden variables, so we can test
12017       # for unknown variables in the end.
12018       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12019 
12020       # Check if we try to supply an empty value
12021       if test "x$TR" = x; then
12022         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12023 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12024         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12025 $as_echo_n "checking for TR... " >&6; }
12026         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12027 $as_echo "disabled" >&6; }
12028       else
12029         # Check if the provided tool contains a complete path.
12030         tool_specified="$TR"
12031         tool_basename="${tool_specified##*/}"
12032         if test "x$tool_basename" = "x$tool_specified"; then
12033           # A command without a complete path is provided, search $PATH.
12034           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12035 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12036           # Extract the first word of "$tool_basename", so it can be a program name with args.
12037 set dummy $tool_basename; ac_word=$2
12038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12039 $as_echo_n "checking for $ac_word... " >&6; }
12040 if ${ac_cv_path_TR+:} false; then :
12041   $as_echo_n "(cached) " >&6
12042 else
12043   case $TR in
12044   [\\/]* | ?:[\\/]*)
12045   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12046   ;;
12047   *)
12048   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12049 for as_dir in $PATH
12050 do
12051   IFS=$as_save_IFS
12052   test -z "$as_dir" && as_dir=.
12053     for ac_exec_ext in '' $ac_executable_extensions; do
12054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12055     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12057     break 2
12058   fi
12059 done
12060   done
12061 IFS=$as_save_IFS
12062 
12063   ;;
12064 esac
12065 fi
12066 TR=$ac_cv_path_TR
12067 if test -n "$TR"; then
12068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12069 $as_echo "$TR" >&6; }
12070 else
12071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12072 $as_echo "no" >&6; }
12073 fi
12074 
12075 
12076           if test "x$TR" = x; then
12077             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12078           fi
12079         else
12080           # Otherwise we believe it is a complete path. Use it as it is.
12081           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12082 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12083           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12084 $as_echo_n "checking for TR... " >&6; }
12085           if test ! -x "$tool_specified"; then
12086             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12087 $as_echo "not found" >&6; }
12088             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12089           fi
12090           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12091 $as_echo "$tool_specified" >&6; }
12092         fi
12093       fi
12094     fi
12095 
12096   fi
12097 
12098 
12099 
12100   if test "x$TR" = x; then
12101     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12102   fi
12103 
12104 
12105 
12106 
12107 
12108   # Publish this variable in the help.
12109 
12110 
12111   if [ -z "${UNAME+x}" ]; then
12112     # The variable is not set by user, try to locate tool using the code snippet
12113     for ac_prog in uname
12114 do
12115   # Extract the first word of "$ac_prog", so it can be a program name with args.
12116 set dummy $ac_prog; ac_word=$2
12117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12118 $as_echo_n "checking for $ac_word... " >&6; }
12119 if ${ac_cv_path_UNAME+:} false; then :
12120   $as_echo_n "(cached) " >&6
12121 else
12122   case $UNAME in
12123   [\\/]* | ?:[\\/]*)
12124   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12125   ;;
12126   *)
12127   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12128 for as_dir in $PATH
12129 do
12130   IFS=$as_save_IFS
12131   test -z "$as_dir" && as_dir=.
12132     for ac_exec_ext in '' $ac_executable_extensions; do
12133   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12134     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12135     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12136     break 2
12137   fi
12138 done
12139   done
12140 IFS=$as_save_IFS
12141 
12142   ;;
12143 esac
12144 fi
12145 UNAME=$ac_cv_path_UNAME
12146 if test -n "$UNAME"; then
12147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12148 $as_echo "$UNAME" >&6; }
12149 else
12150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12151 $as_echo "no" >&6; }
12152 fi
12153 
12154 
12155   test -n "$UNAME" && break
12156 done
12157 
12158   else
12159     # The variable is set, but is it from the command line or the environment?
12160 
12161     # Try to remove the string !UNAME! from our list.
12162     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12163     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12164       # If it failed, the variable was not from the command line. Ignore it,
12165       # but warn the user (except for BASH, which is always set by the calling BASH).
12166       if test "xUNAME" != xBASH; then
12167         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12168 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12169       fi
12170       # Try to locate tool using the code snippet
12171       for ac_prog in uname
12172 do
12173   # Extract the first word of "$ac_prog", so it can be a program name with args.
12174 set dummy $ac_prog; ac_word=$2
12175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12176 $as_echo_n "checking for $ac_word... " >&6; }
12177 if ${ac_cv_path_UNAME+:} false; then :
12178   $as_echo_n "(cached) " >&6
12179 else
12180   case $UNAME in
12181   [\\/]* | ?:[\\/]*)
12182   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12183   ;;
12184   *)
12185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12186 for as_dir in $PATH
12187 do
12188   IFS=$as_save_IFS
12189   test -z "$as_dir" && as_dir=.
12190     for ac_exec_ext in '' $ac_executable_extensions; do
12191   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12192     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12194     break 2
12195   fi
12196 done
12197   done
12198 IFS=$as_save_IFS
12199 
12200   ;;
12201 esac
12202 fi
12203 UNAME=$ac_cv_path_UNAME
12204 if test -n "$UNAME"; then
12205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12206 $as_echo "$UNAME" >&6; }
12207 else
12208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12209 $as_echo "no" >&6; }
12210 fi
12211 
12212 
12213   test -n "$UNAME" && break
12214 done
12215 
12216     else
12217       # If it succeeded, then it was overridden by the user. We will use it
12218       # for the tool.
12219 
12220       # First remove it from the list of overridden variables, so we can test
12221       # for unknown variables in the end.
12222       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12223 
12224       # Check if we try to supply an empty value
12225       if test "x$UNAME" = x; then
12226         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12227 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12228         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12229 $as_echo_n "checking for UNAME... " >&6; }
12230         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12231 $as_echo "disabled" >&6; }
12232       else
12233         # Check if the provided tool contains a complete path.
12234         tool_specified="$UNAME"
12235         tool_basename="${tool_specified##*/}"
12236         if test "x$tool_basename" = "x$tool_specified"; then
12237           # A command without a complete path is provided, search $PATH.
12238           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12239 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12240           # Extract the first word of "$tool_basename", so it can be a program name with args.
12241 set dummy $tool_basename; ac_word=$2
12242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12243 $as_echo_n "checking for $ac_word... " >&6; }
12244 if ${ac_cv_path_UNAME+:} false; then :
12245   $as_echo_n "(cached) " >&6
12246 else
12247   case $UNAME in
12248   [\\/]* | ?:[\\/]*)
12249   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12250   ;;
12251   *)
12252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12253 for as_dir in $PATH
12254 do
12255   IFS=$as_save_IFS
12256   test -z "$as_dir" && as_dir=.
12257     for ac_exec_ext in '' $ac_executable_extensions; do
12258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12259     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12261     break 2
12262   fi
12263 done
12264   done
12265 IFS=$as_save_IFS
12266 
12267   ;;
12268 esac
12269 fi
12270 UNAME=$ac_cv_path_UNAME
12271 if test -n "$UNAME"; then
12272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12273 $as_echo "$UNAME" >&6; }
12274 else
12275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12276 $as_echo "no" >&6; }
12277 fi
12278 
12279 
12280           if test "x$UNAME" = x; then
12281             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12282           fi
12283         else
12284           # Otherwise we believe it is a complete path. Use it as it is.
12285           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12286 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12287           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12288 $as_echo_n "checking for UNAME... " >&6; }
12289           if test ! -x "$tool_specified"; then
12290             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12291 $as_echo "not found" >&6; }
12292             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12293           fi
12294           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12295 $as_echo "$tool_specified" >&6; }
12296         fi
12297       fi
12298     fi
12299 
12300   fi
12301 
12302 
12303 
12304   if test "x$UNAME" = x; then
12305     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12306   fi
12307 
12308 
12309 
12310 
12311 
12312   # Publish this variable in the help.
12313 
12314 
12315   if [ -z "${UNIQ+x}" ]; then
12316     # The variable is not set by user, try to locate tool using the code snippet
12317     for ac_prog in uniq
12318 do
12319   # Extract the first word of "$ac_prog", so it can be a program name with args.
12320 set dummy $ac_prog; ac_word=$2
12321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12322 $as_echo_n "checking for $ac_word... " >&6; }
12323 if ${ac_cv_path_UNIQ+:} false; then :
12324   $as_echo_n "(cached) " >&6
12325 else
12326   case $UNIQ in
12327   [\\/]* | ?:[\\/]*)
12328   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12329   ;;
12330   *)
12331   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12332 for as_dir in $PATH
12333 do
12334   IFS=$as_save_IFS
12335   test -z "$as_dir" && as_dir=.
12336     for ac_exec_ext in '' $ac_executable_extensions; do
12337   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12338     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12339     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12340     break 2
12341   fi
12342 done
12343   done
12344 IFS=$as_save_IFS
12345 
12346   ;;
12347 esac
12348 fi
12349 UNIQ=$ac_cv_path_UNIQ
12350 if test -n "$UNIQ"; then
12351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12352 $as_echo "$UNIQ" >&6; }
12353 else
12354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12355 $as_echo "no" >&6; }
12356 fi
12357 
12358 
12359   test -n "$UNIQ" && break
12360 done
12361 
12362   else
12363     # The variable is set, but is it from the command line or the environment?
12364 
12365     # Try to remove the string !UNIQ! from our list.
12366     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12367     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12368       # If it failed, the variable was not from the command line. Ignore it,
12369       # but warn the user (except for BASH, which is always set by the calling BASH).
12370       if test "xUNIQ" != xBASH; then
12371         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12372 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12373       fi
12374       # Try to locate tool using the code snippet
12375       for ac_prog in uniq
12376 do
12377   # Extract the first word of "$ac_prog", so it can be a program name with args.
12378 set dummy $ac_prog; ac_word=$2
12379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12380 $as_echo_n "checking for $ac_word... " >&6; }
12381 if ${ac_cv_path_UNIQ+:} false; then :
12382   $as_echo_n "(cached) " >&6
12383 else
12384   case $UNIQ in
12385   [\\/]* | ?:[\\/]*)
12386   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12387   ;;
12388   *)
12389   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12390 for as_dir in $PATH
12391 do
12392   IFS=$as_save_IFS
12393   test -z "$as_dir" && as_dir=.
12394     for ac_exec_ext in '' $ac_executable_extensions; do
12395   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12396     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12397     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12398     break 2
12399   fi
12400 done
12401   done
12402 IFS=$as_save_IFS
12403 
12404   ;;
12405 esac
12406 fi
12407 UNIQ=$ac_cv_path_UNIQ
12408 if test -n "$UNIQ"; then
12409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12410 $as_echo "$UNIQ" >&6; }
12411 else
12412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12413 $as_echo "no" >&6; }
12414 fi
12415 
12416 
12417   test -n "$UNIQ" && break
12418 done
12419 
12420     else
12421       # If it succeeded, then it was overridden by the user. We will use it
12422       # for the tool.
12423 
12424       # First remove it from the list of overridden variables, so we can test
12425       # for unknown variables in the end.
12426       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12427 
12428       # Check if we try to supply an empty value
12429       if test "x$UNIQ" = x; then
12430         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12431 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12432         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12433 $as_echo_n "checking for UNIQ... " >&6; }
12434         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12435 $as_echo "disabled" >&6; }
12436       else
12437         # Check if the provided tool contains a complete path.
12438         tool_specified="$UNIQ"
12439         tool_basename="${tool_specified##*/}"
12440         if test "x$tool_basename" = "x$tool_specified"; then
12441           # A command without a complete path is provided, search $PATH.
12442           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12443 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12444           # Extract the first word of "$tool_basename", so it can be a program name with args.
12445 set dummy $tool_basename; ac_word=$2
12446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12447 $as_echo_n "checking for $ac_word... " >&6; }
12448 if ${ac_cv_path_UNIQ+:} false; then :
12449   $as_echo_n "(cached) " >&6
12450 else
12451   case $UNIQ in
12452   [\\/]* | ?:[\\/]*)
12453   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12454   ;;
12455   *)
12456   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12457 for as_dir in $PATH
12458 do
12459   IFS=$as_save_IFS
12460   test -z "$as_dir" && as_dir=.
12461     for ac_exec_ext in '' $ac_executable_extensions; do
12462   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12463     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12464     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12465     break 2
12466   fi
12467 done
12468   done
12469 IFS=$as_save_IFS
12470 
12471   ;;
12472 esac
12473 fi
12474 UNIQ=$ac_cv_path_UNIQ
12475 if test -n "$UNIQ"; then
12476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12477 $as_echo "$UNIQ" >&6; }
12478 else
12479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12480 $as_echo "no" >&6; }
12481 fi
12482 
12483 
12484           if test "x$UNIQ" = x; then
12485             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12486           fi
12487         else
12488           # Otherwise we believe it is a complete path. Use it as it is.
12489           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12490 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12491           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12492 $as_echo_n "checking for UNIQ... " >&6; }
12493           if test ! -x "$tool_specified"; then
12494             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12495 $as_echo "not found" >&6; }
12496             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12497           fi
12498           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12499 $as_echo "$tool_specified" >&6; }
12500         fi
12501       fi
12502     fi
12503 
12504   fi
12505 
12506 
12507 
12508   if test "x$UNIQ" = x; then
12509     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12510   fi
12511 
12512 
12513 
12514 
12515 
12516   # Publish this variable in the help.
12517 
12518 
12519   if [ -z "${WC+x}" ]; then
12520     # The variable is not set by user, try to locate tool using the code snippet
12521     for ac_prog in wc
12522 do
12523   # Extract the first word of "$ac_prog", so it can be a program name with args.
12524 set dummy $ac_prog; ac_word=$2
12525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12526 $as_echo_n "checking for $ac_word... " >&6; }
12527 if ${ac_cv_path_WC+:} false; then :
12528   $as_echo_n "(cached) " >&6
12529 else
12530   case $WC in
12531   [\\/]* | ?:[\\/]*)
12532   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12533   ;;
12534   *)
12535   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12536 for as_dir in $PATH
12537 do
12538   IFS=$as_save_IFS
12539   test -z "$as_dir" && as_dir=.
12540     for ac_exec_ext in '' $ac_executable_extensions; do
12541   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12542     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12543     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12544     break 2
12545   fi
12546 done
12547   done
12548 IFS=$as_save_IFS
12549 
12550   ;;
12551 esac
12552 fi
12553 WC=$ac_cv_path_WC
12554 if test -n "$WC"; then
12555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12556 $as_echo "$WC" >&6; }
12557 else
12558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12559 $as_echo "no" >&6; }
12560 fi
12561 
12562 
12563   test -n "$WC" && break
12564 done
12565 
12566   else
12567     # The variable is set, but is it from the command line or the environment?
12568 
12569     # Try to remove the string !WC! from our list.
12570     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12571     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12572       # If it failed, the variable was not from the command line. Ignore it,
12573       # but warn the user (except for BASH, which is always set by the calling BASH).
12574       if test "xWC" != xBASH; then
12575         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12576 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12577       fi
12578       # Try to locate tool using the code snippet
12579       for ac_prog in wc
12580 do
12581   # Extract the first word of "$ac_prog", so it can be a program name with args.
12582 set dummy $ac_prog; ac_word=$2
12583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12584 $as_echo_n "checking for $ac_word... " >&6; }
12585 if ${ac_cv_path_WC+:} false; then :
12586   $as_echo_n "(cached) " >&6
12587 else
12588   case $WC in
12589   [\\/]* | ?:[\\/]*)
12590   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12591   ;;
12592   *)
12593   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12594 for as_dir in $PATH
12595 do
12596   IFS=$as_save_IFS
12597   test -z "$as_dir" && as_dir=.
12598     for ac_exec_ext in '' $ac_executable_extensions; do
12599   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12600     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12601     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12602     break 2
12603   fi
12604 done
12605   done
12606 IFS=$as_save_IFS
12607 
12608   ;;
12609 esac
12610 fi
12611 WC=$ac_cv_path_WC
12612 if test -n "$WC"; then
12613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12614 $as_echo "$WC" >&6; }
12615 else
12616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12617 $as_echo "no" >&6; }
12618 fi
12619 
12620 
12621   test -n "$WC" && break
12622 done
12623 
12624     else
12625       # If it succeeded, then it was overridden by the user. We will use it
12626       # for the tool.
12627 
12628       # First remove it from the list of overridden variables, so we can test
12629       # for unknown variables in the end.
12630       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12631 
12632       # Check if we try to supply an empty value
12633       if test "x$WC" = x; then
12634         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12635 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12636         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12637 $as_echo_n "checking for WC... " >&6; }
12638         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12639 $as_echo "disabled" >&6; }
12640       else
12641         # Check if the provided tool contains a complete path.
12642         tool_specified="$WC"
12643         tool_basename="${tool_specified##*/}"
12644         if test "x$tool_basename" = "x$tool_specified"; then
12645           # A command without a complete path is provided, search $PATH.
12646           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12647 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12648           # Extract the first word of "$tool_basename", so it can be a program name with args.
12649 set dummy $tool_basename; ac_word=$2
12650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12651 $as_echo_n "checking for $ac_word... " >&6; }
12652 if ${ac_cv_path_WC+:} false; then :
12653   $as_echo_n "(cached) " >&6
12654 else
12655   case $WC in
12656   [\\/]* | ?:[\\/]*)
12657   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12658   ;;
12659   *)
12660   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12661 for as_dir in $PATH
12662 do
12663   IFS=$as_save_IFS
12664   test -z "$as_dir" && as_dir=.
12665     for ac_exec_ext in '' $ac_executable_extensions; do
12666   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12667     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12668     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12669     break 2
12670   fi
12671 done
12672   done
12673 IFS=$as_save_IFS
12674 
12675   ;;
12676 esac
12677 fi
12678 WC=$ac_cv_path_WC
12679 if test -n "$WC"; then
12680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12681 $as_echo "$WC" >&6; }
12682 else
12683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12684 $as_echo "no" >&6; }
12685 fi
12686 
12687 
12688           if test "x$WC" = x; then
12689             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12690           fi
12691         else
12692           # Otherwise we believe it is a complete path. Use it as it is.
12693           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12694 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12695           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12696 $as_echo_n "checking for WC... " >&6; }
12697           if test ! -x "$tool_specified"; then
12698             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12699 $as_echo "not found" >&6; }
12700             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12701           fi
12702           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12703 $as_echo "$tool_specified" >&6; }
12704         fi
12705       fi
12706     fi
12707 
12708   fi
12709 
12710 
12711 
12712   if test "x$WC" = x; then
12713     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12714   fi
12715 
12716 
12717 
12718 
12719 
12720   # Publish this variable in the help.
12721 
12722 
12723   if [ -z "${WHICH+x}" ]; then
12724     # The variable is not set by user, try to locate tool using the code snippet
12725     for ac_prog in which
12726 do
12727   # Extract the first word of "$ac_prog", so it can be a program name with args.
12728 set dummy $ac_prog; ac_word=$2
12729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12730 $as_echo_n "checking for $ac_word... " >&6; }
12731 if ${ac_cv_path_WHICH+:} false; then :
12732   $as_echo_n "(cached) " >&6
12733 else
12734   case $WHICH in
12735   [\\/]* | ?:[\\/]*)
12736   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12737   ;;
12738   *)
12739   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12740 for as_dir in $PATH
12741 do
12742   IFS=$as_save_IFS
12743   test -z "$as_dir" && as_dir=.
12744     for ac_exec_ext in '' $ac_executable_extensions; do
12745   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12746     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12747     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12748     break 2
12749   fi
12750 done
12751   done
12752 IFS=$as_save_IFS
12753 
12754   ;;
12755 esac
12756 fi
12757 WHICH=$ac_cv_path_WHICH
12758 if test -n "$WHICH"; then
12759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12760 $as_echo "$WHICH" >&6; }
12761 else
12762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12763 $as_echo "no" >&6; }
12764 fi
12765 
12766 
12767   test -n "$WHICH" && break
12768 done
12769 
12770   else
12771     # The variable is set, but is it from the command line or the environment?
12772 
12773     # Try to remove the string !WHICH! from our list.
12774     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12775     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12776       # If it failed, the variable was not from the command line. Ignore it,
12777       # but warn the user (except for BASH, which is always set by the calling BASH).
12778       if test "xWHICH" != xBASH; then
12779         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12780 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12781       fi
12782       # Try to locate tool using the code snippet
12783       for ac_prog in which
12784 do
12785   # Extract the first word of "$ac_prog", so it can be a program name with args.
12786 set dummy $ac_prog; ac_word=$2
12787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12788 $as_echo_n "checking for $ac_word... " >&6; }
12789 if ${ac_cv_path_WHICH+:} false; then :
12790   $as_echo_n "(cached) " >&6
12791 else
12792   case $WHICH in
12793   [\\/]* | ?:[\\/]*)
12794   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12795   ;;
12796   *)
12797   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12798 for as_dir in $PATH
12799 do
12800   IFS=$as_save_IFS
12801   test -z "$as_dir" && as_dir=.
12802     for ac_exec_ext in '' $ac_executable_extensions; do
12803   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12804     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12805     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12806     break 2
12807   fi
12808 done
12809   done
12810 IFS=$as_save_IFS
12811 
12812   ;;
12813 esac
12814 fi
12815 WHICH=$ac_cv_path_WHICH
12816 if test -n "$WHICH"; then
12817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12818 $as_echo "$WHICH" >&6; }
12819 else
12820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12821 $as_echo "no" >&6; }
12822 fi
12823 
12824 
12825   test -n "$WHICH" && break
12826 done
12827 
12828     else
12829       # If it succeeded, then it was overridden by the user. We will use it
12830       # for the tool.
12831 
12832       # First remove it from the list of overridden variables, so we can test
12833       # for unknown variables in the end.
12834       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12835 
12836       # Check if we try to supply an empty value
12837       if test "x$WHICH" = x; then
12838         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12839 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12840         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12841 $as_echo_n "checking for WHICH... " >&6; }
12842         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12843 $as_echo "disabled" >&6; }
12844       else
12845         # Check if the provided tool contains a complete path.
12846         tool_specified="$WHICH"
12847         tool_basename="${tool_specified##*/}"
12848         if test "x$tool_basename" = "x$tool_specified"; then
12849           # A command without a complete path is provided, search $PATH.
12850           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12851 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12852           # Extract the first word of "$tool_basename", so it can be a program name with args.
12853 set dummy $tool_basename; ac_word=$2
12854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12855 $as_echo_n "checking for $ac_word... " >&6; }
12856 if ${ac_cv_path_WHICH+:} false; then :
12857   $as_echo_n "(cached) " >&6
12858 else
12859   case $WHICH in
12860   [\\/]* | ?:[\\/]*)
12861   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12862   ;;
12863   *)
12864   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12865 for as_dir in $PATH
12866 do
12867   IFS=$as_save_IFS
12868   test -z "$as_dir" && as_dir=.
12869     for ac_exec_ext in '' $ac_executable_extensions; do
12870   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12871     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12872     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12873     break 2
12874   fi
12875 done
12876   done
12877 IFS=$as_save_IFS
12878 
12879   ;;
12880 esac
12881 fi
12882 WHICH=$ac_cv_path_WHICH
12883 if test -n "$WHICH"; then
12884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12885 $as_echo "$WHICH" >&6; }
12886 else
12887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12888 $as_echo "no" >&6; }
12889 fi
12890 
12891 
12892           if test "x$WHICH" = x; then
12893             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12894           fi
12895         else
12896           # Otherwise we believe it is a complete path. Use it as it is.
12897           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12898 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12899           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12900 $as_echo_n "checking for WHICH... " >&6; }
12901           if test ! -x "$tool_specified"; then
12902             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12903 $as_echo "not found" >&6; }
12904             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12905           fi
12906           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12907 $as_echo "$tool_specified" >&6; }
12908         fi
12909       fi
12910     fi
12911 
12912   fi
12913 
12914 
12915 
12916   if test "x$WHICH" = x; then
12917     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12918   fi
12919 
12920 
12921 
12922 
12923 
12924   # Publish this variable in the help.
12925 
12926 
12927   if [ -z "${XARGS+x}" ]; then
12928     # The variable is not set by user, try to locate tool using the code snippet
12929     for ac_prog in xargs
12930 do
12931   # Extract the first word of "$ac_prog", so it can be a program name with args.
12932 set dummy $ac_prog; ac_word=$2
12933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12934 $as_echo_n "checking for $ac_word... " >&6; }
12935 if ${ac_cv_path_XARGS+:} false; then :
12936   $as_echo_n "(cached) " >&6
12937 else
12938   case $XARGS in
12939   [\\/]* | ?:[\\/]*)
12940   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12941   ;;
12942   *)
12943   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12944 for as_dir in $PATH
12945 do
12946   IFS=$as_save_IFS
12947   test -z "$as_dir" && as_dir=.
12948     for ac_exec_ext in '' $ac_executable_extensions; do
12949   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12950     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12951     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12952     break 2
12953   fi
12954 done
12955   done
12956 IFS=$as_save_IFS
12957 
12958   ;;
12959 esac
12960 fi
12961 XARGS=$ac_cv_path_XARGS
12962 if test -n "$XARGS"; then
12963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12964 $as_echo "$XARGS" >&6; }
12965 else
12966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12967 $as_echo "no" >&6; }
12968 fi
12969 
12970 
12971   test -n "$XARGS" && break
12972 done
12973 
12974   else
12975     # The variable is set, but is it from the command line or the environment?
12976 
12977     # Try to remove the string !XARGS! from our list.
12978     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12979     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12980       # If it failed, the variable was not from the command line. Ignore it,
12981       # but warn the user (except for BASH, which is always set by the calling BASH).
12982       if test "xXARGS" != xBASH; then
12983         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12984 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12985       fi
12986       # Try to locate tool using the code snippet
12987       for ac_prog in xargs
12988 do
12989   # Extract the first word of "$ac_prog", so it can be a program name with args.
12990 set dummy $ac_prog; ac_word=$2
12991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12992 $as_echo_n "checking for $ac_word... " >&6; }
12993 if ${ac_cv_path_XARGS+:} false; then :
12994   $as_echo_n "(cached) " >&6
12995 else
12996   case $XARGS in
12997   [\\/]* | ?:[\\/]*)
12998   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12999   ;;
13000   *)
13001   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13002 for as_dir in $PATH
13003 do
13004   IFS=$as_save_IFS
13005   test -z "$as_dir" && as_dir=.
13006     for ac_exec_ext in '' $ac_executable_extensions; do
13007   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13008     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13009     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13010     break 2
13011   fi
13012 done
13013   done
13014 IFS=$as_save_IFS
13015 
13016   ;;
13017 esac
13018 fi
13019 XARGS=$ac_cv_path_XARGS
13020 if test -n "$XARGS"; then
13021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13022 $as_echo "$XARGS" >&6; }
13023 else
13024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13025 $as_echo "no" >&6; }
13026 fi
13027 
13028 
13029   test -n "$XARGS" && break
13030 done
13031 
13032     else
13033       # If it succeeded, then it was overridden by the user. We will use it
13034       # for the tool.
13035 
13036       # First remove it from the list of overridden variables, so we can test
13037       # for unknown variables in the end.
13038       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13039 
13040       # Check if we try to supply an empty value
13041       if test "x$XARGS" = x; then
13042         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13043 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13044         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13045 $as_echo_n "checking for XARGS... " >&6; }
13046         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13047 $as_echo "disabled" >&6; }
13048       else
13049         # Check if the provided tool contains a complete path.
13050         tool_specified="$XARGS"
13051         tool_basename="${tool_specified##*/}"
13052         if test "x$tool_basename" = "x$tool_specified"; then
13053           # A command without a complete path is provided, search $PATH.
13054           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13055 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13056           # Extract the first word of "$tool_basename", so it can be a program name with args.
13057 set dummy $tool_basename; ac_word=$2
13058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13059 $as_echo_n "checking for $ac_word... " >&6; }
13060 if ${ac_cv_path_XARGS+:} false; then :
13061   $as_echo_n "(cached) " >&6
13062 else
13063   case $XARGS in
13064   [\\/]* | ?:[\\/]*)
13065   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13066   ;;
13067   *)
13068   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13069 for as_dir in $PATH
13070 do
13071   IFS=$as_save_IFS
13072   test -z "$as_dir" && as_dir=.
13073     for ac_exec_ext in '' $ac_executable_extensions; do
13074   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13075     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13076     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13077     break 2
13078   fi
13079 done
13080   done
13081 IFS=$as_save_IFS
13082 
13083   ;;
13084 esac
13085 fi
13086 XARGS=$ac_cv_path_XARGS
13087 if test -n "$XARGS"; then
13088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13089 $as_echo "$XARGS" >&6; }
13090 else
13091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13092 $as_echo "no" >&6; }
13093 fi
13094 
13095 
13096           if test "x$XARGS" = x; then
13097             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13098           fi
13099         else
13100           # Otherwise we believe it is a complete path. Use it as it is.
13101           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13102 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13103           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13104 $as_echo_n "checking for XARGS... " >&6; }
13105           if test ! -x "$tool_specified"; then
13106             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13107 $as_echo "not found" >&6; }
13108             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13109           fi
13110           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13111 $as_echo "$tool_specified" >&6; }
13112         fi
13113       fi
13114     fi
13115 
13116   fi
13117 
13118 
13119 
13120   if test "x$XARGS" = x; then
13121     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13122   fi
13123 
13124 
13125 
13126   # Then required tools that require some special treatment.
13127 
13128 
13129   # Publish this variable in the help.
13130 
13131 
13132   if [ -z "${AWK+x}" ]; then
13133     # The variable is not set by user, try to locate tool using the code snippet
13134     for ac_prog in gawk mawk nawk awk
13135 do
13136   # Extract the first word of "$ac_prog", so it can be a program name with args.
13137 set dummy $ac_prog; ac_word=$2
13138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13139 $as_echo_n "checking for $ac_word... " >&6; }
13140 if ${ac_cv_prog_AWK+:} false; then :
13141   $as_echo_n "(cached) " >&6
13142 else
13143   if test -n "$AWK"; then
13144   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13145 else
13146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13147 for as_dir in $PATH
13148 do
13149   IFS=$as_save_IFS
13150   test -z "$as_dir" && as_dir=.
13151     for ac_exec_ext in '' $ac_executable_extensions; do
13152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13153     ac_cv_prog_AWK="$ac_prog"
13154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13155     break 2
13156   fi
13157 done
13158   done
13159 IFS=$as_save_IFS
13160 
13161 fi
13162 fi
13163 AWK=$ac_cv_prog_AWK
13164 if test -n "$AWK"; then
13165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13166 $as_echo "$AWK" >&6; }
13167 else
13168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13169 $as_echo "no" >&6; }
13170 fi
13171 
13172 
13173   test -n "$AWK" && break
13174 done
13175 
13176   else
13177     # The variable is set, but is it from the command line or the environment?
13178 
13179     # Try to remove the string !AWK! from our list.
13180     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13181     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13182       # If it failed, the variable was not from the command line. Ignore it,
13183       # but warn the user (except for BASH, which is always set by the calling BASH).
13184       if test "xAWK" != xBASH; then
13185         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13186 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13187       fi
13188       # Try to locate tool using the code snippet
13189       for ac_prog in gawk mawk nawk awk
13190 do
13191   # Extract the first word of "$ac_prog", so it can be a program name with args.
13192 set dummy $ac_prog; ac_word=$2
13193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13194 $as_echo_n "checking for $ac_word... " >&6; }
13195 if ${ac_cv_prog_AWK+:} false; then :
13196   $as_echo_n "(cached) " >&6
13197 else
13198   if test -n "$AWK"; then
13199   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13200 else
13201 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13202 for as_dir in $PATH
13203 do
13204   IFS=$as_save_IFS
13205   test -z "$as_dir" && as_dir=.
13206     for ac_exec_ext in '' $ac_executable_extensions; do
13207   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13208     ac_cv_prog_AWK="$ac_prog"
13209     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13210     break 2
13211   fi
13212 done
13213   done
13214 IFS=$as_save_IFS
13215 
13216 fi
13217 fi
13218 AWK=$ac_cv_prog_AWK
13219 if test -n "$AWK"; then
13220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13221 $as_echo "$AWK" >&6; }
13222 else
13223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13224 $as_echo "no" >&6; }
13225 fi
13226 
13227 
13228   test -n "$AWK" && break
13229 done
13230 
13231     else
13232       # If it succeeded, then it was overridden by the user. We will use it
13233       # for the tool.
13234 
13235       # First remove it from the list of overridden variables, so we can test
13236       # for unknown variables in the end.
13237       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13238 
13239       # Check if we try to supply an empty value
13240       if test "x$AWK" = x; then
13241         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13242 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13243         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13244 $as_echo_n "checking for AWK... " >&6; }
13245         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13246 $as_echo "disabled" >&6; }
13247       else
13248         # Check if the provided tool contains a complete path.
13249         tool_specified="$AWK"
13250         tool_basename="${tool_specified##*/}"
13251         if test "x$tool_basename" = "x$tool_specified"; then
13252           # A command without a complete path is provided, search $PATH.
13253           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13254 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13255           # Extract the first word of "$tool_basename", so it can be a program name with args.
13256 set dummy $tool_basename; ac_word=$2
13257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13258 $as_echo_n "checking for $ac_word... " >&6; }
13259 if ${ac_cv_path_AWK+:} false; then :
13260   $as_echo_n "(cached) " >&6
13261 else
13262   case $AWK in
13263   [\\/]* | ?:[\\/]*)
13264   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13265   ;;
13266   *)
13267   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13268 for as_dir in $PATH
13269 do
13270   IFS=$as_save_IFS
13271   test -z "$as_dir" && as_dir=.
13272     for ac_exec_ext in '' $ac_executable_extensions; do
13273   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13274     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13275     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13276     break 2
13277   fi
13278 done
13279   done
13280 IFS=$as_save_IFS
13281 
13282   ;;
13283 esac
13284 fi
13285 AWK=$ac_cv_path_AWK
13286 if test -n "$AWK"; then
13287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13288 $as_echo "$AWK" >&6; }
13289 else
13290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13291 $as_echo "no" >&6; }
13292 fi
13293 
13294 
13295           if test "x$AWK" = x; then
13296             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13297           fi
13298         else
13299           # Otherwise we believe it is a complete path. Use it as it is.
13300           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13301 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13302           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13303 $as_echo_n "checking for AWK... " >&6; }
13304           if test ! -x "$tool_specified"; then
13305             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13306 $as_echo "not found" >&6; }
13307             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13308           fi
13309           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13310 $as_echo "$tool_specified" >&6; }
13311         fi
13312       fi
13313     fi
13314 
13315   fi
13316 
13317 
13318   if test "x$AWK" = x; then
13319     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13320   fi
13321 
13322 
13323 
13324 
13325   # Publish this variable in the help.
13326 
13327 
13328   if [ -z "${GREP+x}" ]; then
13329     # The variable is not set by user, try to locate tool using the code snippet
13330     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13331 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13332 if ${ac_cv_path_GREP+:} false; then :
13333   $as_echo_n "(cached) " >&6
13334 else
13335   if test -z "$GREP"; then
13336   ac_path_GREP_found=false
13337   # Loop through the user's path and test for each of PROGNAME-LIST
13338   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13339 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13340 do
13341   IFS=$as_save_IFS
13342   test -z "$as_dir" && as_dir=.
13343     for ac_prog in grep ggrep; do
13344     for ac_exec_ext in '' $ac_executable_extensions; do
13345       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13346       as_fn_executable_p "$ac_path_GREP" || continue
13347 # Check for GNU ac_path_GREP and select it if it is found.
13348   # Check for GNU $ac_path_GREP
13349 case `"$ac_path_GREP" --version 2>&1` in
13350 *GNU*)
13351   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13352 *)
13353   ac_count=0
13354   $as_echo_n 0123456789 >"conftest.in"
13355   while :
13356   do
13357     cat "conftest.in" "conftest.in" >"conftest.tmp"
13358     mv "conftest.tmp" "conftest.in"
13359     cp "conftest.in" "conftest.nl"
13360     $as_echo 'GREP' >> "conftest.nl"
13361     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13362     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13363     as_fn_arith $ac_count + 1 && ac_count=$as_val
13364     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13365       # Best one so far, save it but keep looking for a better one
13366       ac_cv_path_GREP="$ac_path_GREP"
13367       ac_path_GREP_max=$ac_count
13368     fi
13369     # 10*(2^10) chars as input seems more than enough
13370     test $ac_count -gt 10 && break
13371   done
13372   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13373 esac
13374 
13375       $ac_path_GREP_found && break 3
13376     done
13377   done
13378   done
13379 IFS=$as_save_IFS
13380   if test -z "$ac_cv_path_GREP"; then
13381     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13382   fi
13383 else
13384   ac_cv_path_GREP=$GREP
13385 fi
13386 
13387 fi
13388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13389 $as_echo "$ac_cv_path_GREP" >&6; }
13390  GREP="$ac_cv_path_GREP"
13391 
13392 
13393   else
13394     # The variable is set, but is it from the command line or the environment?
13395 
13396     # Try to remove the string !GREP! from our list.
13397     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13398     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13399       # If it failed, the variable was not from the command line. Ignore it,
13400       # but warn the user (except for BASH, which is always set by the calling BASH).
13401       if test "xGREP" != xBASH; then
13402         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13403 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13404       fi
13405       # Try to locate tool using the code snippet
13406       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13407 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13408 if ${ac_cv_path_GREP+:} false; then :
13409   $as_echo_n "(cached) " >&6
13410 else
13411   if test -z "$GREP"; then
13412   ac_path_GREP_found=false
13413   # Loop through the user's path and test for each of PROGNAME-LIST
13414   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13415 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13416 do
13417   IFS=$as_save_IFS
13418   test -z "$as_dir" && as_dir=.
13419     for ac_prog in grep ggrep; do
13420     for ac_exec_ext in '' $ac_executable_extensions; do
13421       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13422       as_fn_executable_p "$ac_path_GREP" || continue
13423 # Check for GNU ac_path_GREP and select it if it is found.
13424   # Check for GNU $ac_path_GREP
13425 case `"$ac_path_GREP" --version 2>&1` in
13426 *GNU*)
13427   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13428 *)
13429   ac_count=0
13430   $as_echo_n 0123456789 >"conftest.in"
13431   while :
13432   do
13433     cat "conftest.in" "conftest.in" >"conftest.tmp"
13434     mv "conftest.tmp" "conftest.in"
13435     cp "conftest.in" "conftest.nl"
13436     $as_echo 'GREP' >> "conftest.nl"
13437     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13438     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13439     as_fn_arith $ac_count + 1 && ac_count=$as_val
13440     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13441       # Best one so far, save it but keep looking for a better one
13442       ac_cv_path_GREP="$ac_path_GREP"
13443       ac_path_GREP_max=$ac_count
13444     fi
13445     # 10*(2^10) chars as input seems more than enough
13446     test $ac_count -gt 10 && break
13447   done
13448   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13449 esac
13450 
13451       $ac_path_GREP_found && break 3
13452     done
13453   done
13454   done
13455 IFS=$as_save_IFS
13456   if test -z "$ac_cv_path_GREP"; then
13457     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13458   fi
13459 else
13460   ac_cv_path_GREP=$GREP
13461 fi
13462 
13463 fi
13464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13465 $as_echo "$ac_cv_path_GREP" >&6; }
13466  GREP="$ac_cv_path_GREP"
13467 
13468 
13469     else
13470       # If it succeeded, then it was overridden by the user. We will use it
13471       # for the tool.
13472 
13473       # First remove it from the list of overridden variables, so we can test
13474       # for unknown variables in the end.
13475       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13476 
13477       # Check if we try to supply an empty value
13478       if test "x$GREP" = x; then
13479         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13480 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13481         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13482 $as_echo_n "checking for GREP... " >&6; }
13483         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13484 $as_echo "disabled" >&6; }
13485       else
13486         # Check if the provided tool contains a complete path.
13487         tool_specified="$GREP"
13488         tool_basename="${tool_specified##*/}"
13489         if test "x$tool_basename" = "x$tool_specified"; then
13490           # A command without a complete path is provided, search $PATH.
13491           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13492 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13493           # Extract the first word of "$tool_basename", so it can be a program name with args.
13494 set dummy $tool_basename; ac_word=$2
13495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13496 $as_echo_n "checking for $ac_word... " >&6; }
13497 if ${ac_cv_path_GREP+:} false; then :
13498   $as_echo_n "(cached) " >&6
13499 else
13500   case $GREP in
13501   [\\/]* | ?:[\\/]*)
13502   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13503   ;;
13504   *)
13505   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13506 for as_dir in $PATH
13507 do
13508   IFS=$as_save_IFS
13509   test -z "$as_dir" && as_dir=.
13510     for ac_exec_ext in '' $ac_executable_extensions; do
13511   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13512     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13513     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13514     break 2
13515   fi
13516 done
13517   done
13518 IFS=$as_save_IFS
13519 
13520   ;;
13521 esac
13522 fi
13523 GREP=$ac_cv_path_GREP
13524 if test -n "$GREP"; then
13525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13526 $as_echo "$GREP" >&6; }
13527 else
13528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13529 $as_echo "no" >&6; }
13530 fi
13531 
13532 
13533           if test "x$GREP" = x; then
13534             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13535           fi
13536         else
13537           # Otherwise we believe it is a complete path. Use it as it is.
13538           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13539 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13540           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13541 $as_echo_n "checking for GREP... " >&6; }
13542           if test ! -x "$tool_specified"; then
13543             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13544 $as_echo "not found" >&6; }
13545             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13546           fi
13547           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13548 $as_echo "$tool_specified" >&6; }
13549         fi
13550       fi
13551     fi
13552 
13553   fi
13554 
13555 
13556   if test "x$GREP" = x; then
13557     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13558   fi
13559 
13560 
13561 
13562 
13563   # Publish this variable in the help.
13564 
13565 
13566   if [ -z "${EGREP+x}" ]; then
13567     # The variable is not set by user, try to locate tool using the code snippet
13568     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13569 $as_echo_n "checking for egrep... " >&6; }
13570 if ${ac_cv_path_EGREP+:} false; then :
13571   $as_echo_n "(cached) " >&6
13572 else
13573   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13574    then ac_cv_path_EGREP="$GREP -E"
13575    else
13576      if test -z "$EGREP"; then
13577   ac_path_EGREP_found=false
13578   # Loop through the user's path and test for each of PROGNAME-LIST
13579   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13580 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13581 do
13582   IFS=$as_save_IFS
13583   test -z "$as_dir" && as_dir=.
13584     for ac_prog in egrep; do
13585     for ac_exec_ext in '' $ac_executable_extensions; do
13586       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13587       as_fn_executable_p "$ac_path_EGREP" || continue
13588 # Check for GNU ac_path_EGREP and select it if it is found.
13589   # Check for GNU $ac_path_EGREP
13590 case `"$ac_path_EGREP" --version 2>&1` in
13591 *GNU*)
13592   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13593 *)
13594   ac_count=0
13595   $as_echo_n 0123456789 >"conftest.in"
13596   while :
13597   do
13598     cat "conftest.in" "conftest.in" >"conftest.tmp"
13599     mv "conftest.tmp" "conftest.in"
13600     cp "conftest.in" "conftest.nl"
13601     $as_echo 'EGREP' >> "conftest.nl"
13602     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13603     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13604     as_fn_arith $ac_count + 1 && ac_count=$as_val
13605     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13606       # Best one so far, save it but keep looking for a better one
13607       ac_cv_path_EGREP="$ac_path_EGREP"
13608       ac_path_EGREP_max=$ac_count
13609     fi
13610     # 10*(2^10) chars as input seems more than enough
13611     test $ac_count -gt 10 && break
13612   done
13613   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13614 esac
13615 
13616       $ac_path_EGREP_found && break 3
13617     done
13618   done
13619   done
13620 IFS=$as_save_IFS
13621   if test -z "$ac_cv_path_EGREP"; then
13622     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13623   fi
13624 else
13625   ac_cv_path_EGREP=$EGREP
13626 fi
13627 
13628    fi
13629 fi
13630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13631 $as_echo "$ac_cv_path_EGREP" >&6; }
13632  EGREP="$ac_cv_path_EGREP"
13633 
13634 
13635   else
13636     # The variable is set, but is it from the command line or the environment?
13637 
13638     # Try to remove the string !EGREP! from our list.
13639     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13640     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13641       # If it failed, the variable was not from the command line. Ignore it,
13642       # but warn the user (except for BASH, which is always set by the calling BASH).
13643       if test "xEGREP" != xBASH; then
13644         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13645 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13646       fi
13647       # Try to locate tool using the code snippet
13648       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13649 $as_echo_n "checking for egrep... " >&6; }
13650 if ${ac_cv_path_EGREP+:} false; then :
13651   $as_echo_n "(cached) " >&6
13652 else
13653   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13654    then ac_cv_path_EGREP="$GREP -E"
13655    else
13656      if test -z "$EGREP"; then
13657   ac_path_EGREP_found=false
13658   # Loop through the user's path and test for each of PROGNAME-LIST
13659   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13660 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13661 do
13662   IFS=$as_save_IFS
13663   test -z "$as_dir" && as_dir=.
13664     for ac_prog in egrep; do
13665     for ac_exec_ext in '' $ac_executable_extensions; do
13666       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13667       as_fn_executable_p "$ac_path_EGREP" || continue
13668 # Check for GNU ac_path_EGREP and select it if it is found.
13669   # Check for GNU $ac_path_EGREP
13670 case `"$ac_path_EGREP" --version 2>&1` in
13671 *GNU*)
13672   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13673 *)
13674   ac_count=0
13675   $as_echo_n 0123456789 >"conftest.in"
13676   while :
13677   do
13678     cat "conftest.in" "conftest.in" >"conftest.tmp"
13679     mv "conftest.tmp" "conftest.in"
13680     cp "conftest.in" "conftest.nl"
13681     $as_echo 'EGREP' >> "conftest.nl"
13682     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13683     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13684     as_fn_arith $ac_count + 1 && ac_count=$as_val
13685     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13686       # Best one so far, save it but keep looking for a better one
13687       ac_cv_path_EGREP="$ac_path_EGREP"
13688       ac_path_EGREP_max=$ac_count
13689     fi
13690     # 10*(2^10) chars as input seems more than enough
13691     test $ac_count -gt 10 && break
13692   done
13693   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13694 esac
13695 
13696       $ac_path_EGREP_found && break 3
13697     done
13698   done
13699   done
13700 IFS=$as_save_IFS
13701   if test -z "$ac_cv_path_EGREP"; then
13702     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13703   fi
13704 else
13705   ac_cv_path_EGREP=$EGREP
13706 fi
13707 
13708    fi
13709 fi
13710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13711 $as_echo "$ac_cv_path_EGREP" >&6; }
13712  EGREP="$ac_cv_path_EGREP"
13713 
13714 
13715     else
13716       # If it succeeded, then it was overridden by the user. We will use it
13717       # for the tool.
13718 
13719       # First remove it from the list of overridden variables, so we can test
13720       # for unknown variables in the end.
13721       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13722 
13723       # Check if we try to supply an empty value
13724       if test "x$EGREP" = x; then
13725         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13726 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13727         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13728 $as_echo_n "checking for EGREP... " >&6; }
13729         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13730 $as_echo "disabled" >&6; }
13731       else
13732         # Check if the provided tool contains a complete path.
13733         tool_specified="$EGREP"
13734         tool_basename="${tool_specified##*/}"
13735         if test "x$tool_basename" = "x$tool_specified"; then
13736           # A command without a complete path is provided, search $PATH.
13737           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13738 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13739           # Extract the first word of "$tool_basename", so it can be a program name with args.
13740 set dummy $tool_basename; ac_word=$2
13741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13742 $as_echo_n "checking for $ac_word... " >&6; }
13743 if ${ac_cv_path_EGREP+:} false; then :
13744   $as_echo_n "(cached) " >&6
13745 else
13746   case $EGREP in
13747   [\\/]* | ?:[\\/]*)
13748   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13749   ;;
13750   *)
13751   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13752 for as_dir in $PATH
13753 do
13754   IFS=$as_save_IFS
13755   test -z "$as_dir" && as_dir=.
13756     for ac_exec_ext in '' $ac_executable_extensions; do
13757   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13758     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13759     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13760     break 2
13761   fi
13762 done
13763   done
13764 IFS=$as_save_IFS
13765 
13766   ;;
13767 esac
13768 fi
13769 EGREP=$ac_cv_path_EGREP
13770 if test -n "$EGREP"; then
13771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13772 $as_echo "$EGREP" >&6; }
13773 else
13774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13775 $as_echo "no" >&6; }
13776 fi
13777 
13778 
13779           if test "x$EGREP" = x; then
13780             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13781           fi
13782         else
13783           # Otherwise we believe it is a complete path. Use it as it is.
13784           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13785 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13786           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13787 $as_echo_n "checking for EGREP... " >&6; }
13788           if test ! -x "$tool_specified"; then
13789             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13790 $as_echo "not found" >&6; }
13791             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13792           fi
13793           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13794 $as_echo "$tool_specified" >&6; }
13795         fi
13796       fi
13797     fi
13798 
13799   fi
13800 
13801 
13802   if test "x$EGREP" = x; then
13803     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13804   fi
13805 
13806 
13807 
13808 
13809   # Publish this variable in the help.
13810 
13811 
13812   if [ -z "${FGREP+x}" ]; then
13813     # The variable is not set by user, try to locate tool using the code snippet
13814     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13815 $as_echo_n "checking for fgrep... " >&6; }
13816 if ${ac_cv_path_FGREP+:} false; then :
13817   $as_echo_n "(cached) " >&6
13818 else
13819   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13820    then ac_cv_path_FGREP="$GREP -F"
13821    else
13822      if test -z "$FGREP"; then
13823   ac_path_FGREP_found=false
13824   # Loop through the user's path and test for each of PROGNAME-LIST
13825   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13826 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13827 do
13828   IFS=$as_save_IFS
13829   test -z "$as_dir" && as_dir=.
13830     for ac_prog in fgrep; do
13831     for ac_exec_ext in '' $ac_executable_extensions; do
13832       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13833       as_fn_executable_p "$ac_path_FGREP" || continue
13834 # Check for GNU ac_path_FGREP and select it if it is found.
13835   # Check for GNU $ac_path_FGREP
13836 case `"$ac_path_FGREP" --version 2>&1` in
13837 *GNU*)
13838   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13839 *)
13840   ac_count=0
13841   $as_echo_n 0123456789 >"conftest.in"
13842   while :
13843   do
13844     cat "conftest.in" "conftest.in" >"conftest.tmp"
13845     mv "conftest.tmp" "conftest.in"
13846     cp "conftest.in" "conftest.nl"
13847     $as_echo 'FGREP' >> "conftest.nl"
13848     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13849     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13850     as_fn_arith $ac_count + 1 && ac_count=$as_val
13851     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13852       # Best one so far, save it but keep looking for a better one
13853       ac_cv_path_FGREP="$ac_path_FGREP"
13854       ac_path_FGREP_max=$ac_count
13855     fi
13856     # 10*(2^10) chars as input seems more than enough
13857     test $ac_count -gt 10 && break
13858   done
13859   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13860 esac
13861 
13862       $ac_path_FGREP_found && break 3
13863     done
13864   done
13865   done
13866 IFS=$as_save_IFS
13867   if test -z "$ac_cv_path_FGREP"; then
13868     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13869   fi
13870 else
13871   ac_cv_path_FGREP=$FGREP
13872 fi
13873 
13874    fi
13875 fi
13876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13877 $as_echo "$ac_cv_path_FGREP" >&6; }
13878  FGREP="$ac_cv_path_FGREP"
13879 
13880 
13881   else
13882     # The variable is set, but is it from the command line or the environment?
13883 
13884     # Try to remove the string !FGREP! from our list.
13885     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13886     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13887       # If it failed, the variable was not from the command line. Ignore it,
13888       # but warn the user (except for BASH, which is always set by the calling BASH).
13889       if test "xFGREP" != xBASH; then
13890         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13891 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13892       fi
13893       # Try to locate tool using the code snippet
13894       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13895 $as_echo_n "checking for fgrep... " >&6; }
13896 if ${ac_cv_path_FGREP+:} false; then :
13897   $as_echo_n "(cached) " >&6
13898 else
13899   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13900    then ac_cv_path_FGREP="$GREP -F"
13901    else
13902      if test -z "$FGREP"; then
13903   ac_path_FGREP_found=false
13904   # Loop through the user's path and test for each of PROGNAME-LIST
13905   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13906 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13907 do
13908   IFS=$as_save_IFS
13909   test -z "$as_dir" && as_dir=.
13910     for ac_prog in fgrep; do
13911     for ac_exec_ext in '' $ac_executable_extensions; do
13912       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13913       as_fn_executable_p "$ac_path_FGREP" || continue
13914 # Check for GNU ac_path_FGREP and select it if it is found.
13915   # Check for GNU $ac_path_FGREP
13916 case `"$ac_path_FGREP" --version 2>&1` in
13917 *GNU*)
13918   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13919 *)
13920   ac_count=0
13921   $as_echo_n 0123456789 >"conftest.in"
13922   while :
13923   do
13924     cat "conftest.in" "conftest.in" >"conftest.tmp"
13925     mv "conftest.tmp" "conftest.in"
13926     cp "conftest.in" "conftest.nl"
13927     $as_echo 'FGREP' >> "conftest.nl"
13928     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13929     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13930     as_fn_arith $ac_count + 1 && ac_count=$as_val
13931     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13932       # Best one so far, save it but keep looking for a better one
13933       ac_cv_path_FGREP="$ac_path_FGREP"
13934       ac_path_FGREP_max=$ac_count
13935     fi
13936     # 10*(2^10) chars as input seems more than enough
13937     test $ac_count -gt 10 && break
13938   done
13939   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13940 esac
13941 
13942       $ac_path_FGREP_found && break 3
13943     done
13944   done
13945   done
13946 IFS=$as_save_IFS
13947   if test -z "$ac_cv_path_FGREP"; then
13948     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13949   fi
13950 else
13951   ac_cv_path_FGREP=$FGREP
13952 fi
13953 
13954    fi
13955 fi
13956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13957 $as_echo "$ac_cv_path_FGREP" >&6; }
13958  FGREP="$ac_cv_path_FGREP"
13959 
13960 
13961     else
13962       # If it succeeded, then it was overridden by the user. We will use it
13963       # for the tool.
13964 
13965       # First remove it from the list of overridden variables, so we can test
13966       # for unknown variables in the end.
13967       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13968 
13969       # Check if we try to supply an empty value
13970       if test "x$FGREP" = x; then
13971         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13972 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13973         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13974 $as_echo_n "checking for FGREP... " >&6; }
13975         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13976 $as_echo "disabled" >&6; }
13977       else
13978         # Check if the provided tool contains a complete path.
13979         tool_specified="$FGREP"
13980         tool_basename="${tool_specified##*/}"
13981         if test "x$tool_basename" = "x$tool_specified"; then
13982           # A command without a complete path is provided, search $PATH.
13983           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13984 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13985           # Extract the first word of "$tool_basename", so it can be a program name with args.
13986 set dummy $tool_basename; ac_word=$2
13987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13988 $as_echo_n "checking for $ac_word... " >&6; }
13989 if ${ac_cv_path_FGREP+:} false; then :
13990   $as_echo_n "(cached) " >&6
13991 else
13992   case $FGREP in
13993   [\\/]* | ?:[\\/]*)
13994   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13995   ;;
13996   *)
13997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13998 for as_dir in $PATH
13999 do
14000   IFS=$as_save_IFS
14001   test -z "$as_dir" && as_dir=.
14002     for ac_exec_ext in '' $ac_executable_extensions; do
14003   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14004     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14006     break 2
14007   fi
14008 done
14009   done
14010 IFS=$as_save_IFS
14011 
14012   ;;
14013 esac
14014 fi
14015 FGREP=$ac_cv_path_FGREP
14016 if test -n "$FGREP"; then
14017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14018 $as_echo "$FGREP" >&6; }
14019 else
14020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14021 $as_echo "no" >&6; }
14022 fi
14023 
14024 
14025           if test "x$FGREP" = x; then
14026             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14027           fi
14028         else
14029           # Otherwise we believe it is a complete path. Use it as it is.
14030           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14031 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14032           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14033 $as_echo_n "checking for FGREP... " >&6; }
14034           if test ! -x "$tool_specified"; then
14035             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14036 $as_echo "not found" >&6; }
14037             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14038           fi
14039           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14040 $as_echo "$tool_specified" >&6; }
14041         fi
14042       fi
14043     fi
14044 
14045   fi
14046 
14047 
14048   if test "x$FGREP" = x; then
14049     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14050   fi
14051 
14052 
14053 
14054 
14055   # Publish this variable in the help.
14056 
14057 
14058   if [ -z "${SED+x}" ]; then
14059     # The variable is not set by user, try to locate tool using the code snippet
14060     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14061 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14062 if ${ac_cv_path_SED+:} false; then :
14063   $as_echo_n "(cached) " >&6
14064 else
14065             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14066      for ac_i in 1 2 3 4 5 6 7; do
14067        ac_script="$ac_script$as_nl$ac_script"
14068      done
14069      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14070      { ac_script=; unset ac_script;}
14071      if test -z "$SED"; then
14072   ac_path_SED_found=false
14073   # Loop through the user's path and test for each of PROGNAME-LIST
14074   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14075 for as_dir in $PATH
14076 do
14077   IFS=$as_save_IFS
14078   test -z "$as_dir" && as_dir=.
14079     for ac_prog in sed gsed; do
14080     for ac_exec_ext in '' $ac_executable_extensions; do
14081       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14082       as_fn_executable_p "$ac_path_SED" || continue
14083 # Check for GNU ac_path_SED and select it if it is found.
14084   # Check for GNU $ac_path_SED
14085 case `"$ac_path_SED" --version 2>&1` in
14086 *GNU*)
14087   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14088 *)
14089   ac_count=0
14090   $as_echo_n 0123456789 >"conftest.in"
14091   while :
14092   do
14093     cat "conftest.in" "conftest.in" >"conftest.tmp"
14094     mv "conftest.tmp" "conftest.in"
14095     cp "conftest.in" "conftest.nl"
14096     $as_echo '' >> "conftest.nl"
14097     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14098     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14099     as_fn_arith $ac_count + 1 && ac_count=$as_val
14100     if test $ac_count -gt ${ac_path_SED_max-0}; then
14101       # Best one so far, save it but keep looking for a better one
14102       ac_cv_path_SED="$ac_path_SED"
14103       ac_path_SED_max=$ac_count
14104     fi
14105     # 10*(2^10) chars as input seems more than enough
14106     test $ac_count -gt 10 && break
14107   done
14108   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14109 esac
14110 
14111       $ac_path_SED_found && break 3
14112     done
14113   done
14114   done
14115 IFS=$as_save_IFS
14116   if test -z "$ac_cv_path_SED"; then
14117     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14118   fi
14119 else
14120   ac_cv_path_SED=$SED
14121 fi
14122 
14123 fi
14124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14125 $as_echo "$ac_cv_path_SED" >&6; }
14126  SED="$ac_cv_path_SED"
14127   rm -f conftest.sed
14128 
14129   else
14130     # The variable is set, but is it from the command line or the environment?
14131 
14132     # Try to remove the string !SED! from our list.
14133     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14134     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14135       # If it failed, the variable was not from the command line. Ignore it,
14136       # but warn the user (except for BASH, which is always set by the calling BASH).
14137       if test "xSED" != xBASH; then
14138         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14139 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14140       fi
14141       # Try to locate tool using the code snippet
14142       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14143 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14144 if ${ac_cv_path_SED+:} false; then :
14145   $as_echo_n "(cached) " >&6
14146 else
14147             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14148      for ac_i in 1 2 3 4 5 6 7; do
14149        ac_script="$ac_script$as_nl$ac_script"
14150      done
14151      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14152      { ac_script=; unset ac_script;}
14153      if test -z "$SED"; then
14154   ac_path_SED_found=false
14155   # Loop through the user's path and test for each of PROGNAME-LIST
14156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14157 for as_dir in $PATH
14158 do
14159   IFS=$as_save_IFS
14160   test -z "$as_dir" && as_dir=.
14161     for ac_prog in sed gsed; do
14162     for ac_exec_ext in '' $ac_executable_extensions; do
14163       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14164       as_fn_executable_p "$ac_path_SED" || continue
14165 # Check for GNU ac_path_SED and select it if it is found.
14166   # Check for GNU $ac_path_SED
14167 case `"$ac_path_SED" --version 2>&1` in
14168 *GNU*)
14169   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14170 *)
14171   ac_count=0
14172   $as_echo_n 0123456789 >"conftest.in"
14173   while :
14174   do
14175     cat "conftest.in" "conftest.in" >"conftest.tmp"
14176     mv "conftest.tmp" "conftest.in"
14177     cp "conftest.in" "conftest.nl"
14178     $as_echo '' >> "conftest.nl"
14179     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14180     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14181     as_fn_arith $ac_count + 1 && ac_count=$as_val
14182     if test $ac_count -gt ${ac_path_SED_max-0}; then
14183       # Best one so far, save it but keep looking for a better one
14184       ac_cv_path_SED="$ac_path_SED"
14185       ac_path_SED_max=$ac_count
14186     fi
14187     # 10*(2^10) chars as input seems more than enough
14188     test $ac_count -gt 10 && break
14189   done
14190   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14191 esac
14192 
14193       $ac_path_SED_found && break 3
14194     done
14195   done
14196   done
14197 IFS=$as_save_IFS
14198   if test -z "$ac_cv_path_SED"; then
14199     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14200   fi
14201 else
14202   ac_cv_path_SED=$SED
14203 fi
14204 
14205 fi
14206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14207 $as_echo "$ac_cv_path_SED" >&6; }
14208  SED="$ac_cv_path_SED"
14209   rm -f conftest.sed
14210 
14211     else
14212       # If it succeeded, then it was overridden by the user. We will use it
14213       # for the tool.
14214 
14215       # First remove it from the list of overridden variables, so we can test
14216       # for unknown variables in the end.
14217       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14218 
14219       # Check if we try to supply an empty value
14220       if test "x$SED" = x; then
14221         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14222 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14223         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14224 $as_echo_n "checking for SED... " >&6; }
14225         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14226 $as_echo "disabled" >&6; }
14227       else
14228         # Check if the provided tool contains a complete path.
14229         tool_specified="$SED"
14230         tool_basename="${tool_specified##*/}"
14231         if test "x$tool_basename" = "x$tool_specified"; then
14232           # A command without a complete path is provided, search $PATH.
14233           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14234 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14235           # Extract the first word of "$tool_basename", so it can be a program name with args.
14236 set dummy $tool_basename; ac_word=$2
14237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14238 $as_echo_n "checking for $ac_word... " >&6; }
14239 if ${ac_cv_path_SED+:} false; then :
14240   $as_echo_n "(cached) " >&6
14241 else
14242   case $SED in
14243   [\\/]* | ?:[\\/]*)
14244   ac_cv_path_SED="$SED" # Let the user override the test with a path.
14245   ;;
14246   *)
14247   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14248 for as_dir in $PATH
14249 do
14250   IFS=$as_save_IFS
14251   test -z "$as_dir" && as_dir=.
14252     for ac_exec_ext in '' $ac_executable_extensions; do
14253   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14254     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14256     break 2
14257   fi
14258 done
14259   done
14260 IFS=$as_save_IFS
14261 
14262   ;;
14263 esac
14264 fi
14265 SED=$ac_cv_path_SED
14266 if test -n "$SED"; then
14267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14268 $as_echo "$SED" >&6; }
14269 else
14270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14271 $as_echo "no" >&6; }
14272 fi
14273 
14274 
14275           if test "x$SED" = x; then
14276             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14277           fi
14278         else
14279           # Otherwise we believe it is a complete path. Use it as it is.
14280           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14281 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14282           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14283 $as_echo_n "checking for SED... " >&6; }
14284           if test ! -x "$tool_specified"; then
14285             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14286 $as_echo "not found" >&6; }
14287             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14288           fi
14289           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14290 $as_echo "$tool_specified" >&6; }
14291         fi
14292       fi
14293     fi
14294 
14295   fi
14296 
14297 
14298   if test "x$SED" = x; then
14299     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14300   fi
14301 
14302 
14303 
14304   # Always force rm.
14305   RM="$RM -f"
14306 
14307   # pwd behaves differently on various platforms and some don't support the -L flag.
14308   # Always use the bash builtin pwd to get uniform behavior.
14309   THEPWDCMD=pwd
14310 
14311   # These are not required on all platforms
14312 
14313 
14314   # Publish this variable in the help.
14315 
14316 
14317   if [ -z "${CYGPATH+x}" ]; then
14318     # The variable is not set by user, try to locate tool using the code snippet
14319     for ac_prog in cygpath
14320 do
14321   # Extract the first word of "$ac_prog", so it can be a program name with args.
14322 set dummy $ac_prog; ac_word=$2
14323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14324 $as_echo_n "checking for $ac_word... " >&6; }
14325 if ${ac_cv_path_CYGPATH+:} false; then :
14326   $as_echo_n "(cached) " >&6
14327 else
14328   case $CYGPATH in
14329   [\\/]* | ?:[\\/]*)
14330   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14331   ;;
14332   *)
14333   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14334 for as_dir in $PATH
14335 do
14336   IFS=$as_save_IFS
14337   test -z "$as_dir" && as_dir=.
14338     for ac_exec_ext in '' $ac_executable_extensions; do
14339   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14340     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14341     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14342     break 2
14343   fi
14344 done
14345   done
14346 IFS=$as_save_IFS
14347 
14348   ;;
14349 esac
14350 fi
14351 CYGPATH=$ac_cv_path_CYGPATH
14352 if test -n "$CYGPATH"; then
14353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14354 $as_echo "$CYGPATH" >&6; }
14355 else
14356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14357 $as_echo "no" >&6; }
14358 fi
14359 
14360 
14361   test -n "$CYGPATH" && break
14362 done
14363 
14364   else
14365     # The variable is set, but is it from the command line or the environment?
14366 
14367     # Try to remove the string !CYGPATH! from our list.
14368     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14369     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14370       # If it failed, the variable was not from the command line. Ignore it,
14371       # but warn the user (except for BASH, which is always set by the calling BASH).
14372       if test "xCYGPATH" != xBASH; then
14373         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14374 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14375       fi
14376       # Try to locate tool using the code snippet
14377       for ac_prog in cygpath
14378 do
14379   # Extract the first word of "$ac_prog", so it can be a program name with args.
14380 set dummy $ac_prog; ac_word=$2
14381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14382 $as_echo_n "checking for $ac_word... " >&6; }
14383 if ${ac_cv_path_CYGPATH+:} false; then :
14384   $as_echo_n "(cached) " >&6
14385 else
14386   case $CYGPATH in
14387   [\\/]* | ?:[\\/]*)
14388   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14389   ;;
14390   *)
14391   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14392 for as_dir in $PATH
14393 do
14394   IFS=$as_save_IFS
14395   test -z "$as_dir" && as_dir=.
14396     for ac_exec_ext in '' $ac_executable_extensions; do
14397   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14398     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14399     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14400     break 2
14401   fi
14402 done
14403   done
14404 IFS=$as_save_IFS
14405 
14406   ;;
14407 esac
14408 fi
14409 CYGPATH=$ac_cv_path_CYGPATH
14410 if test -n "$CYGPATH"; then
14411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14412 $as_echo "$CYGPATH" >&6; }
14413 else
14414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14415 $as_echo "no" >&6; }
14416 fi
14417 
14418 
14419   test -n "$CYGPATH" && break
14420 done
14421 
14422     else
14423       # If it succeeded, then it was overridden by the user. We will use it
14424       # for the tool.
14425 
14426       # First remove it from the list of overridden variables, so we can test
14427       # for unknown variables in the end.
14428       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14429 
14430       # Check if we try to supply an empty value
14431       if test "x$CYGPATH" = x; then
14432         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14433 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14434         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14435 $as_echo_n "checking for CYGPATH... " >&6; }
14436         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14437 $as_echo "disabled" >&6; }
14438       else
14439         # Check if the provided tool contains a complete path.
14440         tool_specified="$CYGPATH"
14441         tool_basename="${tool_specified##*/}"
14442         if test "x$tool_basename" = "x$tool_specified"; then
14443           # A command without a complete path is provided, search $PATH.
14444           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14445 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14446           # Extract the first word of "$tool_basename", so it can be a program name with args.
14447 set dummy $tool_basename; ac_word=$2
14448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14449 $as_echo_n "checking for $ac_word... " >&6; }
14450 if ${ac_cv_path_CYGPATH+:} false; then :
14451   $as_echo_n "(cached) " >&6
14452 else
14453   case $CYGPATH in
14454   [\\/]* | ?:[\\/]*)
14455   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14456   ;;
14457   *)
14458   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14459 for as_dir in $PATH
14460 do
14461   IFS=$as_save_IFS
14462   test -z "$as_dir" && as_dir=.
14463     for ac_exec_ext in '' $ac_executable_extensions; do
14464   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14465     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14466     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14467     break 2
14468   fi
14469 done
14470   done
14471 IFS=$as_save_IFS
14472 
14473   ;;
14474 esac
14475 fi
14476 CYGPATH=$ac_cv_path_CYGPATH
14477 if test -n "$CYGPATH"; then
14478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14479 $as_echo "$CYGPATH" >&6; }
14480 else
14481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14482 $as_echo "no" >&6; }
14483 fi
14484 
14485 
14486           if test "x$CYGPATH" = x; then
14487             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14488           fi
14489         else
14490           # Otherwise we believe it is a complete path. Use it as it is.
14491           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14492 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14493           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14494 $as_echo_n "checking for CYGPATH... " >&6; }
14495           if test ! -x "$tool_specified"; then
14496             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14497 $as_echo "not found" >&6; }
14498             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14499           fi
14500           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14501 $as_echo "$tool_specified" >&6; }
14502         fi
14503       fi
14504     fi
14505 
14506   fi
14507 
14508 
14509 
14510 
14511   # Publish this variable in the help.
14512 
14513 
14514   if [ -z "${READLINK+x}" ]; then
14515     # The variable is not set by user, try to locate tool using the code snippet
14516     for ac_prog in greadlink readlink
14517 do
14518   # Extract the first word of "$ac_prog", so it can be a program name with args.
14519 set dummy $ac_prog; ac_word=$2
14520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14521 $as_echo_n "checking for $ac_word... " >&6; }
14522 if ${ac_cv_path_READLINK+:} false; then :
14523   $as_echo_n "(cached) " >&6
14524 else
14525   case $READLINK in
14526   [\\/]* | ?:[\\/]*)
14527   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14528   ;;
14529   *)
14530   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14531 for as_dir in $PATH
14532 do
14533   IFS=$as_save_IFS
14534   test -z "$as_dir" && as_dir=.
14535     for ac_exec_ext in '' $ac_executable_extensions; do
14536   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14537     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14538     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14539     break 2
14540   fi
14541 done
14542   done
14543 IFS=$as_save_IFS
14544 
14545   ;;
14546 esac
14547 fi
14548 READLINK=$ac_cv_path_READLINK
14549 if test -n "$READLINK"; then
14550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14551 $as_echo "$READLINK" >&6; }
14552 else
14553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14554 $as_echo "no" >&6; }
14555 fi
14556 
14557 
14558   test -n "$READLINK" && break
14559 done
14560 
14561   else
14562     # The variable is set, but is it from the command line or the environment?
14563 
14564     # Try to remove the string !READLINK! from our list.
14565     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14566     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14567       # If it failed, the variable was not from the command line. Ignore it,
14568       # but warn the user (except for BASH, which is always set by the calling BASH).
14569       if test "xREADLINK" != xBASH; then
14570         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14571 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14572       fi
14573       # Try to locate tool using the code snippet
14574       for ac_prog in greadlink readlink
14575 do
14576   # Extract the first word of "$ac_prog", so it can be a program name with args.
14577 set dummy $ac_prog; ac_word=$2
14578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14579 $as_echo_n "checking for $ac_word... " >&6; }
14580 if ${ac_cv_path_READLINK+:} false; then :
14581   $as_echo_n "(cached) " >&6
14582 else
14583   case $READLINK in
14584   [\\/]* | ?:[\\/]*)
14585   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14586   ;;
14587   *)
14588   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14589 for as_dir in $PATH
14590 do
14591   IFS=$as_save_IFS
14592   test -z "$as_dir" && as_dir=.
14593     for ac_exec_ext in '' $ac_executable_extensions; do
14594   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14595     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14596     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14597     break 2
14598   fi
14599 done
14600   done
14601 IFS=$as_save_IFS
14602 
14603   ;;
14604 esac
14605 fi
14606 READLINK=$ac_cv_path_READLINK
14607 if test -n "$READLINK"; then
14608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14609 $as_echo "$READLINK" >&6; }
14610 else
14611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14612 $as_echo "no" >&6; }
14613 fi
14614 
14615 
14616   test -n "$READLINK" && break
14617 done
14618 
14619     else
14620       # If it succeeded, then it was overridden by the user. We will use it
14621       # for the tool.
14622 
14623       # First remove it from the list of overridden variables, so we can test
14624       # for unknown variables in the end.
14625       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14626 
14627       # Check if we try to supply an empty value
14628       if test "x$READLINK" = x; then
14629         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14630 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14631         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14632 $as_echo_n "checking for READLINK... " >&6; }
14633         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14634 $as_echo "disabled" >&6; }
14635       else
14636         # Check if the provided tool contains a complete path.
14637         tool_specified="$READLINK"
14638         tool_basename="${tool_specified##*/}"
14639         if test "x$tool_basename" = "x$tool_specified"; then
14640           # A command without a complete path is provided, search $PATH.
14641           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14642 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14643           # Extract the first word of "$tool_basename", so it can be a program name with args.
14644 set dummy $tool_basename; ac_word=$2
14645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14646 $as_echo_n "checking for $ac_word... " >&6; }
14647 if ${ac_cv_path_READLINK+:} false; then :
14648   $as_echo_n "(cached) " >&6
14649 else
14650   case $READLINK in
14651   [\\/]* | ?:[\\/]*)
14652   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14653   ;;
14654   *)
14655   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14656 for as_dir in $PATH
14657 do
14658   IFS=$as_save_IFS
14659   test -z "$as_dir" && as_dir=.
14660     for ac_exec_ext in '' $ac_executable_extensions; do
14661   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14662     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14663     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14664     break 2
14665   fi
14666 done
14667   done
14668 IFS=$as_save_IFS
14669 
14670   ;;
14671 esac
14672 fi
14673 READLINK=$ac_cv_path_READLINK
14674 if test -n "$READLINK"; then
14675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14676 $as_echo "$READLINK" >&6; }
14677 else
14678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14679 $as_echo "no" >&6; }
14680 fi
14681 
14682 
14683           if test "x$READLINK" = x; then
14684             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14685           fi
14686         else
14687           # Otherwise we believe it is a complete path. Use it as it is.
14688           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14689 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14690           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14691 $as_echo_n "checking for READLINK... " >&6; }
14692           if test ! -x "$tool_specified"; then
14693             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14694 $as_echo "not found" >&6; }
14695             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14696           fi
14697           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14698 $as_echo "$tool_specified" >&6; }
14699         fi
14700       fi
14701     fi
14702 
14703   fi
14704 
14705 
14706 
14707 
14708   # Publish this variable in the help.
14709 
14710 
14711   if [ -z "${DF+x}" ]; then
14712     # The variable is not set by user, try to locate tool using the code snippet
14713     for ac_prog in df
14714 do
14715   # Extract the first word of "$ac_prog", so it can be a program name with args.
14716 set dummy $ac_prog; ac_word=$2
14717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14718 $as_echo_n "checking for $ac_word... " >&6; }
14719 if ${ac_cv_path_DF+:} false; then :
14720   $as_echo_n "(cached) " >&6
14721 else
14722   case $DF in
14723   [\\/]* | ?:[\\/]*)
14724   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14725   ;;
14726   *)
14727   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14728 for as_dir in $PATH
14729 do
14730   IFS=$as_save_IFS
14731   test -z "$as_dir" && as_dir=.
14732     for ac_exec_ext in '' $ac_executable_extensions; do
14733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14734     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14736     break 2
14737   fi
14738 done
14739   done
14740 IFS=$as_save_IFS
14741 
14742   ;;
14743 esac
14744 fi
14745 DF=$ac_cv_path_DF
14746 if test -n "$DF"; then
14747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14748 $as_echo "$DF" >&6; }
14749 else
14750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14751 $as_echo "no" >&6; }
14752 fi
14753 
14754 
14755   test -n "$DF" && break
14756 done
14757 
14758   else
14759     # The variable is set, but is it from the command line or the environment?
14760 
14761     # Try to remove the string !DF! from our list.
14762     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14763     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14764       # If it failed, the variable was not from the command line. Ignore it,
14765       # but warn the user (except for BASH, which is always set by the calling BASH).
14766       if test "xDF" != xBASH; then
14767         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14768 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14769       fi
14770       # Try to locate tool using the code snippet
14771       for ac_prog in df
14772 do
14773   # Extract the first word of "$ac_prog", so it can be a program name with args.
14774 set dummy $ac_prog; ac_word=$2
14775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14776 $as_echo_n "checking for $ac_word... " >&6; }
14777 if ${ac_cv_path_DF+:} false; then :
14778   $as_echo_n "(cached) " >&6
14779 else
14780   case $DF in
14781   [\\/]* | ?:[\\/]*)
14782   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14783   ;;
14784   *)
14785   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14786 for as_dir in $PATH
14787 do
14788   IFS=$as_save_IFS
14789   test -z "$as_dir" && as_dir=.
14790     for ac_exec_ext in '' $ac_executable_extensions; do
14791   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14792     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14793     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14794     break 2
14795   fi
14796 done
14797   done
14798 IFS=$as_save_IFS
14799 
14800   ;;
14801 esac
14802 fi
14803 DF=$ac_cv_path_DF
14804 if test -n "$DF"; then
14805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14806 $as_echo "$DF" >&6; }
14807 else
14808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14809 $as_echo "no" >&6; }
14810 fi
14811 
14812 
14813   test -n "$DF" && break
14814 done
14815 
14816     else
14817       # If it succeeded, then it was overridden by the user. We will use it
14818       # for the tool.
14819 
14820       # First remove it from the list of overridden variables, so we can test
14821       # for unknown variables in the end.
14822       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14823 
14824       # Check if we try to supply an empty value
14825       if test "x$DF" = x; then
14826         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14827 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14828         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14829 $as_echo_n "checking for DF... " >&6; }
14830         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14831 $as_echo "disabled" >&6; }
14832       else
14833         # Check if the provided tool contains a complete path.
14834         tool_specified="$DF"
14835         tool_basename="${tool_specified##*/}"
14836         if test "x$tool_basename" = "x$tool_specified"; then
14837           # A command without a complete path is provided, search $PATH.
14838           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14839 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14840           # Extract the first word of "$tool_basename", so it can be a program name with args.
14841 set dummy $tool_basename; ac_word=$2
14842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14843 $as_echo_n "checking for $ac_word... " >&6; }
14844 if ${ac_cv_path_DF+:} false; then :
14845   $as_echo_n "(cached) " >&6
14846 else
14847   case $DF in
14848   [\\/]* | ?:[\\/]*)
14849   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14850   ;;
14851   *)
14852   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14853 for as_dir in $PATH
14854 do
14855   IFS=$as_save_IFS
14856   test -z "$as_dir" && as_dir=.
14857     for ac_exec_ext in '' $ac_executable_extensions; do
14858   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14859     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14861     break 2
14862   fi
14863 done
14864   done
14865 IFS=$as_save_IFS
14866 
14867   ;;
14868 esac
14869 fi
14870 DF=$ac_cv_path_DF
14871 if test -n "$DF"; then
14872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14873 $as_echo "$DF" >&6; }
14874 else
14875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14876 $as_echo "no" >&6; }
14877 fi
14878 
14879 
14880           if test "x$DF" = x; then
14881             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14882           fi
14883         else
14884           # Otherwise we believe it is a complete path. Use it as it is.
14885           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14886 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14887           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14888 $as_echo_n "checking for DF... " >&6; }
14889           if test ! -x "$tool_specified"; then
14890             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14891 $as_echo "not found" >&6; }
14892             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14893           fi
14894           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14895 $as_echo "$tool_specified" >&6; }
14896         fi
14897       fi
14898     fi
14899 
14900   fi
14901 
14902 
14903 
14904 
14905   # Publish this variable in the help.
14906 
14907 
14908   if [ -z "${CPIO+x}" ]; then
14909     # The variable is not set by user, try to locate tool using the code snippet
14910     for ac_prog in cpio bsdcpio
14911 do
14912   # Extract the first word of "$ac_prog", so it can be a program name with args.
14913 set dummy $ac_prog; ac_word=$2
14914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14915 $as_echo_n "checking for $ac_word... " >&6; }
14916 if ${ac_cv_path_CPIO+:} false; then :
14917   $as_echo_n "(cached) " >&6
14918 else
14919   case $CPIO in
14920   [\\/]* | ?:[\\/]*)
14921   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14922   ;;
14923   *)
14924   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14925 for as_dir in $PATH
14926 do
14927   IFS=$as_save_IFS
14928   test -z "$as_dir" && as_dir=.
14929     for ac_exec_ext in '' $ac_executable_extensions; do
14930   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14931     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14933     break 2
14934   fi
14935 done
14936   done
14937 IFS=$as_save_IFS
14938 
14939   ;;
14940 esac
14941 fi
14942 CPIO=$ac_cv_path_CPIO
14943 if test -n "$CPIO"; then
14944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14945 $as_echo "$CPIO" >&6; }
14946 else
14947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14948 $as_echo "no" >&6; }
14949 fi
14950 
14951 
14952   test -n "$CPIO" && break
14953 done
14954 
14955   else
14956     # The variable is set, but is it from the command line or the environment?
14957 
14958     # Try to remove the string !CPIO! from our list.
14959     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14960     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14961       # If it failed, the variable was not from the command line. Ignore it,
14962       # but warn the user (except for BASH, which is always set by the calling BASH).
14963       if test "xCPIO" != xBASH; then
14964         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14965 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14966       fi
14967       # Try to locate tool using the code snippet
14968       for ac_prog in cpio bsdcpio
14969 do
14970   # Extract the first word of "$ac_prog", so it can be a program name with args.
14971 set dummy $ac_prog; ac_word=$2
14972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14973 $as_echo_n "checking for $ac_word... " >&6; }
14974 if ${ac_cv_path_CPIO+:} false; then :
14975   $as_echo_n "(cached) " >&6
14976 else
14977   case $CPIO in
14978   [\\/]* | ?:[\\/]*)
14979   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14980   ;;
14981   *)
14982   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14983 for as_dir in $PATH
14984 do
14985   IFS=$as_save_IFS
14986   test -z "$as_dir" && as_dir=.
14987     for ac_exec_ext in '' $ac_executable_extensions; do
14988   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14989     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14991     break 2
14992   fi
14993 done
14994   done
14995 IFS=$as_save_IFS
14996 
14997   ;;
14998 esac
14999 fi
15000 CPIO=$ac_cv_path_CPIO
15001 if test -n "$CPIO"; then
15002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15003 $as_echo "$CPIO" >&6; }
15004 else
15005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15006 $as_echo "no" >&6; }
15007 fi
15008 
15009 
15010   test -n "$CPIO" && break
15011 done
15012 
15013     else
15014       # If it succeeded, then it was overridden by the user. We will use it
15015       # for the tool.
15016 
15017       # First remove it from the list of overridden variables, so we can test
15018       # for unknown variables in the end.
15019       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15020 
15021       # Check if we try to supply an empty value
15022       if test "x$CPIO" = x; then
15023         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15024 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15025         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15026 $as_echo_n "checking for CPIO... " >&6; }
15027         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15028 $as_echo "disabled" >&6; }
15029       else
15030         # Check if the provided tool contains a complete path.
15031         tool_specified="$CPIO"
15032         tool_basename="${tool_specified##*/}"
15033         if test "x$tool_basename" = "x$tool_specified"; then
15034           # A command without a complete path is provided, search $PATH.
15035           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15036 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15037           # Extract the first word of "$tool_basename", so it can be a program name with args.
15038 set dummy $tool_basename; ac_word=$2
15039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15040 $as_echo_n "checking for $ac_word... " >&6; }
15041 if ${ac_cv_path_CPIO+:} false; then :
15042   $as_echo_n "(cached) " >&6
15043 else
15044   case $CPIO in
15045   [\\/]* | ?:[\\/]*)
15046   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15047   ;;
15048   *)
15049   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15050 for as_dir in $PATH
15051 do
15052   IFS=$as_save_IFS
15053   test -z "$as_dir" && as_dir=.
15054     for ac_exec_ext in '' $ac_executable_extensions; do
15055   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15056     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15057     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15058     break 2
15059   fi
15060 done
15061   done
15062 IFS=$as_save_IFS
15063 
15064   ;;
15065 esac
15066 fi
15067 CPIO=$ac_cv_path_CPIO
15068 if test -n "$CPIO"; then
15069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15070 $as_echo "$CPIO" >&6; }
15071 else
15072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15073 $as_echo "no" >&6; }
15074 fi
15075 
15076 
15077           if test "x$CPIO" = x; then
15078             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15079           fi
15080         else
15081           # Otherwise we believe it is a complete path. Use it as it is.
15082           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15083 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15084           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15085 $as_echo_n "checking for CPIO... " >&6; }
15086           if test ! -x "$tool_specified"; then
15087             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15088 $as_echo "not found" >&6; }
15089             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15090           fi
15091           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15092 $as_echo "$tool_specified" >&6; }
15093         fi
15094       fi
15095     fi
15096 
15097   fi
15098 
15099 
15100 
15101 
15102   # Publish this variable in the help.
15103 
15104 
15105   if [ -z "${NICE+x}" ]; then
15106     # The variable is not set by user, try to locate tool using the code snippet
15107     for ac_prog in nice
15108 do
15109   # Extract the first word of "$ac_prog", so it can be a program name with args.
15110 set dummy $ac_prog; ac_word=$2
15111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15112 $as_echo_n "checking for $ac_word... " >&6; }
15113 if ${ac_cv_path_NICE+:} false; then :
15114   $as_echo_n "(cached) " >&6
15115 else
15116   case $NICE in
15117   [\\/]* | ?:[\\/]*)
15118   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15119   ;;
15120   *)
15121   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15122 for as_dir in $PATH
15123 do
15124   IFS=$as_save_IFS
15125   test -z "$as_dir" && as_dir=.
15126     for ac_exec_ext in '' $ac_executable_extensions; do
15127   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15128     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15129     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15130     break 2
15131   fi
15132 done
15133   done
15134 IFS=$as_save_IFS
15135 
15136   ;;
15137 esac
15138 fi
15139 NICE=$ac_cv_path_NICE
15140 if test -n "$NICE"; then
15141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15142 $as_echo "$NICE" >&6; }
15143 else
15144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15145 $as_echo "no" >&6; }
15146 fi
15147 
15148 
15149   test -n "$NICE" && break
15150 done
15151 
15152   else
15153     # The variable is set, but is it from the command line or the environment?
15154 
15155     # Try to remove the string !NICE! from our list.
15156     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15157     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15158       # If it failed, the variable was not from the command line. Ignore it,
15159       # but warn the user (except for BASH, which is always set by the calling BASH).
15160       if test "xNICE" != xBASH; then
15161         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15162 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15163       fi
15164       # Try to locate tool using the code snippet
15165       for ac_prog in nice
15166 do
15167   # Extract the first word of "$ac_prog", so it can be a program name with args.
15168 set dummy $ac_prog; ac_word=$2
15169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15170 $as_echo_n "checking for $ac_word... " >&6; }
15171 if ${ac_cv_path_NICE+:} false; then :
15172   $as_echo_n "(cached) " >&6
15173 else
15174   case $NICE in
15175   [\\/]* | ?:[\\/]*)
15176   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15177   ;;
15178   *)
15179   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15180 for as_dir in $PATH
15181 do
15182   IFS=$as_save_IFS
15183   test -z "$as_dir" && as_dir=.
15184     for ac_exec_ext in '' $ac_executable_extensions; do
15185   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15186     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15187     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15188     break 2
15189   fi
15190 done
15191   done
15192 IFS=$as_save_IFS
15193 
15194   ;;
15195 esac
15196 fi
15197 NICE=$ac_cv_path_NICE
15198 if test -n "$NICE"; then
15199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15200 $as_echo "$NICE" >&6; }
15201 else
15202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15203 $as_echo "no" >&6; }
15204 fi
15205 
15206 
15207   test -n "$NICE" && break
15208 done
15209 
15210     else
15211       # If it succeeded, then it was overridden by the user. We will use it
15212       # for the tool.
15213 
15214       # First remove it from the list of overridden variables, so we can test
15215       # for unknown variables in the end.
15216       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15217 
15218       # Check if we try to supply an empty value
15219       if test "x$NICE" = x; then
15220         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15221 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15222         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15223 $as_echo_n "checking for NICE... " >&6; }
15224         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15225 $as_echo "disabled" >&6; }
15226       else
15227         # Check if the provided tool contains a complete path.
15228         tool_specified="$NICE"
15229         tool_basename="${tool_specified##*/}"
15230         if test "x$tool_basename" = "x$tool_specified"; then
15231           # A command without a complete path is provided, search $PATH.
15232           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15233 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15234           # Extract the first word of "$tool_basename", so it can be a program name with args.
15235 set dummy $tool_basename; ac_word=$2
15236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15237 $as_echo_n "checking for $ac_word... " >&6; }
15238 if ${ac_cv_path_NICE+:} false; then :
15239   $as_echo_n "(cached) " >&6
15240 else
15241   case $NICE in
15242   [\\/]* | ?:[\\/]*)
15243   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15244   ;;
15245   *)
15246   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15247 for as_dir in $PATH
15248 do
15249   IFS=$as_save_IFS
15250   test -z "$as_dir" && as_dir=.
15251     for ac_exec_ext in '' $ac_executable_extensions; do
15252   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15253     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15255     break 2
15256   fi
15257 done
15258   done
15259 IFS=$as_save_IFS
15260 
15261   ;;
15262 esac
15263 fi
15264 NICE=$ac_cv_path_NICE
15265 if test -n "$NICE"; then
15266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15267 $as_echo "$NICE" >&6; }
15268 else
15269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15270 $as_echo "no" >&6; }
15271 fi
15272 
15273 
15274           if test "x$NICE" = x; then
15275             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15276           fi
15277         else
15278           # Otherwise we believe it is a complete path. Use it as it is.
15279           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15280 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15281           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15282 $as_echo_n "checking for NICE... " >&6; }
15283           if test ! -x "$tool_specified"; then
15284             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15285 $as_echo "not found" >&6; }
15286             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15287           fi
15288           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15289 $as_echo "$tool_specified" >&6; }
15290         fi
15291       fi
15292     fi
15293 
15294   fi
15295 
15296 
15297 
15298 
15299 # Now we can determine OpenJDK build and target platforms. This is required to
15300 # have early on.
15301 # Make sure we can run config.sub.
15302 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15303   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15304 
15305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15306 $as_echo_n "checking build system type... " >&6; }
15307 if ${ac_cv_build+:} false; then :
15308   $as_echo_n "(cached) " >&6
15309 else
15310   ac_build_alias=$build_alias
15311 test "x$ac_build_alias" = x &&
15312   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15313 test "x$ac_build_alias" = x &&
15314   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15315 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15316   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15317 
15318 fi
15319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15320 $as_echo "$ac_cv_build" >&6; }
15321 case $ac_cv_build in
15322 *-*-*) ;;
15323 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15324 esac
15325 build=$ac_cv_build
15326 ac_save_IFS=$IFS; IFS='-'
15327 set x $ac_cv_build
15328 shift
15329 build_cpu=$1
15330 build_vendor=$2
15331 shift; shift
15332 # Remember, the first character of IFS is used to create $*,
15333 # except with old shells:
15334 build_os=$*
15335 IFS=$ac_save_IFS
15336 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15337 
15338 
15339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15340 $as_echo_n "checking host system type... " >&6; }
15341 if ${ac_cv_host+:} false; then :
15342   $as_echo_n "(cached) " >&6
15343 else
15344   if test "x$host_alias" = x; then
15345   ac_cv_host=$ac_cv_build
15346 else
15347   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15348     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15349 fi
15350 
15351 fi
15352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15353 $as_echo "$ac_cv_host" >&6; }
15354 case $ac_cv_host in
15355 *-*-*) ;;
15356 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15357 esac
15358 host=$ac_cv_host
15359 ac_save_IFS=$IFS; IFS='-'
15360 set x $ac_cv_host
15361 shift
15362 host_cpu=$1
15363 host_vendor=$2
15364 shift; shift
15365 # Remember, the first character of IFS is used to create $*,
15366 # except with old shells:
15367 host_os=$*
15368 IFS=$ac_save_IFS
15369 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15370 
15371 
15372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15373 $as_echo_n "checking target system type... " >&6; }
15374 if ${ac_cv_target+:} false; then :
15375   $as_echo_n "(cached) " >&6
15376 else
15377   if test "x$target_alias" = x; then
15378   ac_cv_target=$ac_cv_host
15379 else
15380   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15381     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15382 fi
15383 
15384 fi
15385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15386 $as_echo "$ac_cv_target" >&6; }
15387 case $ac_cv_target in
15388 *-*-*) ;;
15389 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15390 esac
15391 target=$ac_cv_target
15392 ac_save_IFS=$IFS; IFS='-'
15393 set x $ac_cv_target
15394 shift
15395 target_cpu=$1
15396 target_vendor=$2
15397 shift; shift
15398 # Remember, the first character of IFS is used to create $*,
15399 # except with old shells:
15400 target_os=$*
15401 IFS=$ac_save_IFS
15402 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15403 
15404 
15405 # The aliases save the names the user supplied, while $host etc.
15406 # will get canonicalized.
15407 test -n "$target_alias" &&
15408   test "$program_prefix$program_suffix$program_transform_name" = \
15409     NONENONEs,x,x, &&
15410   program_prefix=${target_alias}-
15411 
15412   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15413   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15414   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15415   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15416   # to use the configure naming style.
15417 
15418 
15419 
15420 
15421 
15422   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15423   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15424   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15425   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15426   OPENJDK_TARGET_AUTOCONF_NAME="$host"
15427   OPENJDK_BUILD_AUTOCONF_NAME="$build"
15428 
15429 
15430 
15431   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15432 
15433   case "$build_os" in
15434     *linux*)
15435       VAR_OS=linux
15436       VAR_OS_TYPE=unix
15437       ;;
15438     *android*)
15439       VAR_OS=android
15440       VAR_OS_TYPE=unix
15441       ;;
15442     *solaris*)
15443       VAR_OS=solaris
15444       VAR_OS_TYPE=unix
15445       ;;
15446     *darwin*)
15447       VAR_OS=macosx
15448       VAR_OS_TYPE=unix
15449       ;;
15450     *ios*)
15451       VAR_OS=ios
15452       VAR_OS_TYPE=unix
15453       ;;
15454     *bsd*)
15455       VAR_OS=bsd
15456       VAR_OS_TYPE=unix
15457       ;;
15458     *cygwin*)
15459       VAR_OS=windows
15460       VAR_OS_ENV=windows.cygwin
15461       ;;
15462     *mingw*)
15463       VAR_OS=windows
15464       VAR_OS_ENV=windows.msys
15465       ;;
15466     *aix*)
15467       VAR_OS=aix
15468       VAR_OS_TYPE=unix
15469       ;;
15470     *)
15471       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15472       ;;
15473   esac
15474 
15475 
15476   # First argument is the cpu name from the trip/quad
15477   case "$build_cpu" in
15478     x86_64)
15479       VAR_CPU=x86_64
15480       VAR_CPU_ARCH=x86
15481       VAR_CPU_BITS=64
15482       VAR_CPU_ENDIAN=little
15483       ;;
15484     i?86)
15485       VAR_CPU=x86
15486       VAR_CPU_ARCH=x86
15487       VAR_CPU_BITS=32
15488       VAR_CPU_ENDIAN=little
15489       ;;
15490     arm*)
15491       VAR_CPU=arm
15492       VAR_CPU_ARCH=arm
15493       VAR_CPU_BITS=32
15494       VAR_CPU_ENDIAN=little
15495       ;;
15496     aarch64)
15497       VAR_CPU=aarch64
15498       VAR_CPU_ARCH=aarch64
15499       VAR_CPU_BITS=64
15500       VAR_CPU_ENDIAN=little
15501       ;;
15502     powerpc)
15503       VAR_CPU=ppc
15504       VAR_CPU_ARCH=ppc
15505       VAR_CPU_BITS=32
15506       VAR_CPU_ENDIAN=big
15507       ;;
15508     powerpc64)
15509       VAR_CPU=ppc64
15510       VAR_CPU_ARCH=ppc
15511       VAR_CPU_BITS=64
15512       VAR_CPU_ENDIAN=big
15513       ;;
15514     powerpc64le)
15515       VAR_CPU=ppc64le
15516       VAR_CPU_ARCH=ppc
15517       VAR_CPU_BITS=64
15518       VAR_CPU_ENDIAN=little
15519       ;;
15520     s390)
15521       VAR_CPU=s390
15522       VAR_CPU_ARCH=s390
15523       VAR_CPU_BITS=32
15524       VAR_CPU_ENDIAN=big
15525       ;;
15526     s390x)
15527       VAR_CPU=s390x
15528       VAR_CPU_ARCH=s390
15529       VAR_CPU_BITS=64
15530       VAR_CPU_ENDIAN=big
15531       ;;
15532     sparc)
15533       VAR_CPU=sparc
15534       VAR_CPU_ARCH=sparc
15535       VAR_CPU_BITS=32
15536       VAR_CPU_ENDIAN=big
15537       ;;
15538     sparcv9|sparc64)
15539       VAR_CPU=sparcv9
15540       VAR_CPU_ARCH=sparc
15541       VAR_CPU_BITS=64
15542       VAR_CPU_ENDIAN=big
15543       ;;
15544     *)
15545       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15546       ;;
15547   esac
15548 
15549   # ..and setup our own variables. (Do this explicitely to facilitate searching)
15550   OPENJDK_BUILD_OS="$VAR_OS"
15551   if test "x$VAR_OS_TYPE" != x; then
15552     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15553   else
15554     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15555   fi
15556   if test "x$VAR_OS_ENV" != x; then
15557     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15558   else
15559     OPENJDK_BUILD_OS_ENV="$VAR_OS"
15560   fi
15561   OPENJDK_BUILD_CPU="$VAR_CPU"
15562   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15563   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15564   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15565 
15566 
15567 
15568 
15569 
15570 
15571 
15572 
15573   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15574 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
15575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15576 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15577 
15578   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15579 
15580   case "$host_os" in
15581     *linux*)
15582       VAR_OS=linux
15583       VAR_OS_TYPE=unix
15584       ;;
15585     *android*)
15586       VAR_OS=android
15587       VAR_OS_TYPE=unix
15588       ;;
15589     *solaris*)
15590       VAR_OS=solaris
15591       VAR_OS_TYPE=unix
15592       ;;
15593     *darwin*)
15594       VAR_OS=macosx
15595       VAR_OS_TYPE=unix
15596       ;;
15597     *ios*)
15598       VAR_OS=ios
15599       VAR_OS_TYPE=unix
15600       ;;
15601     *bsd*)
15602       VAR_OS=bsd
15603       VAR_OS_TYPE=unix
15604       ;;
15605     *cygwin*)
15606       VAR_OS=windows
15607       VAR_OS_ENV=windows.cygwin
15608       ;;
15609     *mingw*)
15610       VAR_OS=windows
15611       VAR_OS_ENV=windows.msys
15612       ;;
15613     *aix*)
15614       VAR_OS=aix
15615       VAR_OS_TYPE=unix
15616       ;;
15617     *)
15618       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15619       ;;
15620   esac
15621 
15622 
15623   # First argument is the cpu name from the trip/quad
15624   case "$host_cpu" in
15625     x86_64)
15626       VAR_CPU=x86_64
15627       VAR_CPU_ARCH=x86
15628       VAR_CPU_BITS=64
15629       VAR_CPU_ENDIAN=little
15630       ;;
15631     i?86)
15632       VAR_CPU=x86
15633       VAR_CPU_ARCH=x86
15634       VAR_CPU_BITS=32
15635       VAR_CPU_ENDIAN=little
15636       ;;
15637     arm*)
15638       VAR_CPU=arm
15639       VAR_CPU_ARCH=arm
15640       VAR_CPU_BITS=32
15641       VAR_CPU_ENDIAN=little
15642       ;;
15643     aarch64)
15644       VAR_CPU=aarch64
15645       VAR_CPU_ARCH=aarch64
15646       VAR_CPU_BITS=64
15647       VAR_CPU_ENDIAN=little
15648       ;;
15649     powerpc)
15650       VAR_CPU=ppc
15651       VAR_CPU_ARCH=ppc
15652       VAR_CPU_BITS=32
15653       VAR_CPU_ENDIAN=big
15654       ;;
15655     powerpc64)
15656       VAR_CPU=ppc64
15657       VAR_CPU_ARCH=ppc
15658       VAR_CPU_BITS=64
15659       VAR_CPU_ENDIAN=big
15660       ;;
15661     powerpc64le)
15662       VAR_CPU=ppc64le
15663       VAR_CPU_ARCH=ppc
15664       VAR_CPU_BITS=64
15665       VAR_CPU_ENDIAN=little
15666       ;;
15667     s390)
15668       VAR_CPU=s390
15669       VAR_CPU_ARCH=s390
15670       VAR_CPU_BITS=32
15671       VAR_CPU_ENDIAN=big
15672       ;;
15673     s390x)
15674       VAR_CPU=s390x
15675       VAR_CPU_ARCH=s390
15676       VAR_CPU_BITS=64
15677       VAR_CPU_ENDIAN=big
15678       ;;
15679     sparc)
15680       VAR_CPU=sparc
15681       VAR_CPU_ARCH=sparc
15682       VAR_CPU_BITS=32
15683       VAR_CPU_ENDIAN=big
15684       ;;
15685     sparcv9|sparc64)
15686       VAR_CPU=sparcv9
15687       VAR_CPU_ARCH=sparc
15688       VAR_CPU_BITS=64
15689       VAR_CPU_ENDIAN=big
15690       ;;
15691     *)
15692       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15693       ;;
15694   esac
15695 
15696   # ... and setup our own variables. (Do this explicitely to facilitate searching)
15697   OPENJDK_TARGET_OS="$VAR_OS"
15698   if test "x$VAR_OS_TYPE" != x; then
15699     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15700   else
15701     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15702   fi
15703   if test "x$VAR_OS_ENV" != x; then
15704     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15705   else
15706     OPENJDK_TARGET_OS_ENV="$VAR_OS"
15707   fi
15708   OPENJDK_TARGET_CPU="$VAR_CPU"
15709   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15710   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15711   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15712 
15713 
15714 
15715 
15716 
15717 
15718 
15719 
15720   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15721 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
15722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15723 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15724 
15725 
15726 
15727 # Check whether --with-target-bits was given.
15728 if test "${with_target_bits+set}" = set; then :
15729   withval=$with_target_bits;
15730 fi
15731 
15732 
15733   # We have three types of compiles:
15734   # native  == normal compilation, target system == build system
15735   # cross   == traditional cross compilation, target system != build system; special toolchain needed
15736   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15737   #
15738   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15739     # We're doing a proper cross-compilation
15740     COMPILE_TYPE="cross"
15741   else
15742     COMPILE_TYPE="native"
15743   fi
15744 
15745   if test "x$with_target_bits" != x; then
15746     if test "x$COMPILE_TYPE" = "xcross"; then
15747       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15748     fi
15749 
15750     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15751       # A reduced build is requested
15752       COMPILE_TYPE="reduced"
15753       OPENJDK_TARGET_CPU_BITS=32
15754       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15755         OPENJDK_TARGET_CPU=x86
15756       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15757         OPENJDK_TARGET_CPU=sparc
15758       else
15759         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15760       fi
15761     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15762       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
15763     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15764       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15765 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15766     else
15767       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15768     fi
15769   fi
15770 
15771 
15772   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15773 $as_echo_n "checking compilation type... " >&6; }
15774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15775 $as_echo "$COMPILE_TYPE" >&6; }
15776 
15777 
15778   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15779     REQUIRED_OS_NAME=SunOS
15780     REQUIRED_OS_VERSION=5.10
15781   fi
15782   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15783     REQUIRED_OS_NAME=Linux
15784     REQUIRED_OS_VERSION=2.6
15785   fi
15786   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15787     REQUIRED_OS_NAME=Windows
15788     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15789       REQUIRED_OS_VERSION=5.2
15790     else
15791       REQUIRED_OS_VERSION=5.1
15792     fi
15793   fi
15794   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15795     REQUIRED_OS_NAME=Darwin
15796     REQUIRED_OS_VERSION=11.2
15797   fi
15798   if test "x$OPENJDK_TARGET_OS" = "xios"; then
15799     REQUIRED_OS_NAME=iOS
15800     REQUIRED_OS_VERSION=8.0
15801   fi
15802   if test "x$OPENJDK_TARGET_OS" = "xandroid"; then
15803     REQUIRED_OS_NAME=Android
15804     REQUIRED_OS_VERSION=4.4
15805   fi
15806   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15807     REQUIRED_OS_NAME=AIX
15808     REQUIRED_OS_VERSION=7.1
15809   fi
15810 
15811 
15812 
15813 
15814 
15815 
15816   # Also store the legacy naming of the cpu.
15817   # Ie i586 and amd64 instead of x86 and x86_64
15818   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15819   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15820     OPENJDK_TARGET_CPU_LEGACY="i586"
15821   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15822     # On all platforms except MacOSX replace x86_64 with amd64.
15823     OPENJDK_TARGET_CPU_LEGACY="amd64"
15824   fi
15825 
15826 
15827   # And the second legacy naming of the cpu.
15828   # Ie i386 and amd64 instead of x86 and x86_64.
15829   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15830   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15831     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15832   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15833     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15834   fi
15835 
15836 
15837   # This is the name of the cpu (but using i386 and amd64 instead of
15838   # x86 and x86_64, respectively), preceeded by a /, to be used when
15839   # locating libraries. On macosx, it's empty, though.
15840   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15841   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15842     OPENJDK_TARGET_CPU_LIBDIR=""
15843   fi
15844 
15845 
15846   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15847   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15848   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15849   OPENJDK_TARGET_CPU_ISADIR=""
15850   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15851     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15852       OPENJDK_TARGET_CPU_ISADIR="/amd64"
15853     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15854       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15855     fi
15856   fi
15857 
15858 
15859   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15860   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15861   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15862     # On linux only, we replace x86 with i386.
15863     OPENJDK_TARGET_CPU_OSARCH="i386"
15864   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15865     # On all platforms except macosx, we replace x86_64 with amd64.
15866     OPENJDK_TARGET_CPU_OSARCH="amd64"
15867   fi
15868 
15869 
15870   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15871   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15872     OPENJDK_TARGET_CPU_JLI="i386"
15873   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15874     # On all platforms except macosx, we replace x86_64 with amd64.
15875     OPENJDK_TARGET_CPU_JLI="amd64"
15876   fi
15877   # Now setup the -D flags for building libjli.
15878   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15879   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15880     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15881       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15882     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15883       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15884     fi
15885   fi
15886 
15887 
15888   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15889       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15890   else
15891       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15892   fi
15893 
15894 
15895   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15896   # Macosx is osx and x86_64 is x64
15897   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15898     OPENJDK_TARGET_OS_BUNDLE="osx"
15899   else
15900     OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15901   fi
15902   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15903     OPENJDK_TARGET_CPU_BUNDLE="x64"
15904   else
15905     OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15906   fi
15907   OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15908 
15909 
15910 
15911 
15912   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15913     A_LP64="LP64:="
15914     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15915     # unpack200.exe
15916     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15917       OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15918     fi
15919   fi
15920   LP64=$A_LP64
15921 
15922 
15923   if test "x$COMPILE_TYPE" = "xcross"; then
15924     # FIXME: ... or should this include reduced builds..?
15925     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15926   else
15927     DEFINE_CROSS_COMPILE_ARCH=""
15928   fi
15929 
15930 
15931   # Convert openjdk platform names to hotspot names
15932 
15933   HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15934   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15935     HOTSPOT_TARGET_OS=bsd
15936   fi
15937   if test "x$OPENJDK_TARGET_OS" = xios; then
15938     HOTSPOT_TARGET_OS=bsd
15939   fi
15940 
15941 
15942   HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15943   if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15944     HOTSPOT_TARGET_OS_TYPE=posix
15945   fi
15946 
15947 
15948   HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15949   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15950     HOTSPOT_TARGET_CPU=x86_32
15951   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15952     HOTSPOT_TARGET_CPU=sparc
15953   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15954     HOTSPOT_TARGET_CPU=ppc_64
15955   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15956     HOTSPOT_TARGET_CPU=ppc_64
15957   fi
15958 
15959 
15960   # This is identical with OPENJDK_*, but define anyway for consistency.
15961   HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15962 
15963 
15964   # Setup HOTSPOT_TARGET_CPU_DEFINE
15965   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15966     HOTSPOT_TARGET_CPU_DEFINE=IA32
15967   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15968     HOTSPOT_TARGET_CPU_DEFINE=AMD64
15969   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15970     HOTSPOT_TARGET_CPU_DEFINE=SPARC
15971   elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15972     HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15973   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15974     HOTSPOT_TARGET_CPU_DEFINE=PPC64
15975   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15976     HOTSPOT_TARGET_CPU_DEFINE=PPC64
15977 
15978   # The cpu defines below are for zero, we don't support them directly.
15979   elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15980     HOTSPOT_TARGET_CPU_DEFINE=SPARC
15981   elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15982     HOTSPOT_TARGET_CPU_DEFINE=PPC32
15983   elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15984     HOTSPOT_TARGET_CPU_DEFINE=S390
15985   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15986     HOTSPOT_TARGET_CPU_DEFINE=S390
15987   fi
15988 
15989 
15990 
15991 
15992   # Also store the legacy naming of the cpu.
15993   # Ie i586 and amd64 instead of x86 and x86_64
15994   OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15995   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15996     OPENJDK_BUILD_CPU_LEGACY="i586"
15997   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15998     # On all platforms except MacOSX replace x86_64 with amd64.
15999     OPENJDK_BUILD_CPU_LEGACY="amd64"
16000   fi
16001 
16002 
16003   # And the second legacy naming of the cpu.
16004   # Ie i386 and amd64 instead of x86 and x86_64.
16005   OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16006   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16007     OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16008   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16009     OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16010   fi
16011 
16012 
16013   # This is the name of the cpu (but using i386 and amd64 instead of
16014   # x86 and x86_64, respectively), preceeded by a /, to be used when
16015   # locating libraries. On macosx, it's empty, though.
16016   OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
16017   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16018     OPENJDK_BUILD_CPU_LIBDIR=""
16019   fi
16020 
16021 
16022   # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16023   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16024   # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16025   OPENJDK_BUILD_CPU_ISADIR=""
16026   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16027     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16028       OPENJDK_BUILD_CPU_ISADIR="/amd64"
16029     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16030       OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16031     fi
16032   fi
16033 
16034 
16035   # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16036   OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16037   if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16038     # On linux only, we replace x86 with i386.
16039     OPENJDK_BUILD_CPU_OSARCH="i386"
16040   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16041     # On all platforms except macosx, we replace x86_64 with amd64.
16042     OPENJDK_BUILD_CPU_OSARCH="amd64"
16043   fi
16044 
16045 
16046   OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16047   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16048     OPENJDK_BUILD_CPU_JLI="i386"
16049   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16050     # On all platforms except macosx, we replace x86_64 with amd64.
16051     OPENJDK_BUILD_CPU_JLI="amd64"
16052   fi
16053   # Now setup the -D flags for building libjli.
16054   OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16055   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16056     if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16057       OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16058     elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16059       OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16060     fi
16061   fi
16062 
16063 
16064   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16065       OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16066   else
16067       OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16068   fi
16069 
16070 
16071   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16072   # Macosx is osx and x86_64 is x64
16073   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16074     OPENJDK_BUILD_OS_BUNDLE="osx"
16075   else
16076     OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16077   fi
16078   if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16079     OPENJDK_BUILD_CPU_BUNDLE="x64"
16080   else
16081     OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16082   fi
16083   OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16084 
16085 
16086 
16087 
16088   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16089     A_LP64="LP64:="
16090     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16091     # unpack200.exe
16092     if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16093       OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16094     fi
16095   fi
16096   LP64=$A_LP64
16097 
16098 
16099   if test "x$COMPILE_TYPE" = "xcross"; then
16100     # FIXME: ... or should this include reduced builds..?
16101     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16102   else
16103     DEFINE_CROSS_COMPILE_ARCH=""
16104   fi
16105 
16106 
16107   # Convert openjdk platform names to hotspot names
16108 
16109   HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16110   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16111     HOTSPOT_BUILD_OS=bsd
16112   fi
16113   if test "x$OPENJDK_BUILD_OS" = xios; then
16114     HOTSPOT_BUILD_OS=bsd
16115   fi
16116 
16117 
16118   HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16119   if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16120     HOTSPOT_BUILD_OS_TYPE=posix
16121   fi
16122 
16123 
16124   HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16125   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16126     HOTSPOT_BUILD_CPU=x86_32
16127   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16128     HOTSPOT_BUILD_CPU=sparc
16129   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16130     HOTSPOT_BUILD_CPU=ppc_64
16131   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16132     HOTSPOT_BUILD_CPU=ppc_64
16133   fi
16134 
16135 
16136   # This is identical with OPENJDK_*, but define anyway for consistency.
16137   HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16138 
16139 
16140   # Setup HOTSPOT_BUILD_CPU_DEFINE
16141   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16142     HOTSPOT_BUILD_CPU_DEFINE=IA32
16143   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16144     HOTSPOT_BUILD_CPU_DEFINE=AMD64
16145   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16146     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16147   elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16148     HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16149   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16150     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16151   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16152     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16153 
16154   # The cpu defines below are for zero, we don't support them directly.
16155   elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16156     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16157   elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16158     HOTSPOT_BUILD_CPU_DEFINE=PPC32
16159   elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16160     HOTSPOT_BUILD_CPU_DEFINE=S390
16161   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16162     HOTSPOT_BUILD_CPU_DEFINE=S390
16163   fi
16164 
16165 
16166 
16167 
16168   # ZERO_ARCHDEF is used to enable architecture-specific code.
16169   # This is used in legacy hotspot build.
16170   if test "x$OPENJDK_TARGET_CPU" = xarm; then
16171     HOTSPOT_TARGET_CPU_DEFINE="ARM32"
16172   elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16173     HOTSPOT_TARGET_CPU_DEFINE="AARCH64"
16174   fi
16175 
16176   ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16177 
16178 
16179 
16180 
16181 
16182 # Continue setting up basic stuff. Most remaining code require fundamental tools.
16183 
16184   # Save the current directory this script was started from
16185   CURDIR="$PWD"
16186 
16187   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16188   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16189   # was not available at that time.
16190   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16191   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16192     ORIGINAL_PATH="$REWRITTEN_PATH"
16193     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16194 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16195   fi
16196 
16197   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16198     PATH_SEP=";"
16199 
16200   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16201   if test $SRC_ROOT_LENGTH -gt 100; then
16202     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16203   fi
16204 
16205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16206     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16207 $as_echo_n "checking cygwin release... " >&6; }
16208     CYGWIN_VERSION=`$UNAME -r`
16209     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16210 $as_echo "$CYGWIN_VERSION" >&6; }
16211     WINDOWS_ENV_VENDOR='cygwin'
16212     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16213 
16214     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16215     if test "x$CYGWIN_VERSION_OLD" != x; then
16216       { $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
16217 $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;}
16218       as_fn_error $? "Cannot continue" "$LINENO" 5
16219     fi
16220     if test "x$CYGPATH" = x; then
16221       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16222     fi
16223     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16224 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16225     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16226     cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16227     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16228     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16229     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16230 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
16231     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16232     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16233     if test "x$test_cygdrive_prefix" = x; then
16234       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16235     fi
16236   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16237     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16238 $as_echo_n "checking msys release... " >&6; }
16239     MSYS_VERSION=`$UNAME -r`
16240     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16241 $as_echo "$MSYS_VERSION" >&6; }
16242 
16243     WINDOWS_ENV_VENDOR='msys'
16244     WINDOWS_ENV_VERSION="$MSYS_VERSION"
16245 
16246     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16247 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
16248     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16249     MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16250 
16251   windows_path="$MSYS_ROOT_PATH"
16252   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16253     unix_path=`$CYGPATH -u "$windows_path"`
16254     MSYS_ROOT_PATH="$unix_path"
16255   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16256     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16257     MSYS_ROOT_PATH="$unix_path"
16258   fi
16259 
16260     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16261 $as_echo "$MSYS_ROOT_PATH" >&6; }
16262     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16263   else
16264     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16265   fi
16266 
16267   # Test if windows or unix (cygwin/msys) find is first in path.
16268   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16269 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16270   FIND_BINARY_OUTPUT=`find --version 2>&1`
16271   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16272     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16273 $as_echo "unix style" >&6; }
16274   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16275     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16276 $as_echo "Windows" >&6; }
16277     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16278 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16279     { $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
16280 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16281     as_fn_error $? "Cannot continue" "$LINENO" 5
16282   else
16283     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16284 $as_echo "unknown" >&6; }
16285     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16286 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16287   fi
16288 
16289   else
16290     PATH_SEP=":"
16291   fi
16292 
16293 
16294   # We get the top-level directory from the supporting wrappers.
16295   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16296 $as_echo_n "checking for top-level directory... " >&6; }
16297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16298 $as_echo "$TOPDIR" >&6; }
16299 
16300 
16301   # Save the original version of TOPDIR for string comparisons
16302   ORIGINAL_TOPDIR="$TOPDIR"
16303 
16304 
16305   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16306 
16307   # Only process if variable expands to non-empty
16308 
16309   if test "x$CURDIR" != x; then
16310     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16311 
16312   # Input might be given as Windows format, start by converting to
16313   # unix format.
16314   path="$CURDIR"
16315   new_path=`$CYGPATH -u "$path"`
16316 
16317   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16318   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16319   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16320   # "foo.exe" is OK but "foo" is an error.
16321   #
16322   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16323   # It is also a way to make sure we got the proper file name for the real test later on.
16324   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16325   if test "x$test_shortpath" = x; then
16326     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16327 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16328     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16329   fi
16330 
16331   # Call helper function which possibly converts this using DOS-style short mode.
16332   # If so, the updated path is stored in $new_path.
16333 
16334   input_path="$new_path"
16335   # Check if we need to convert this using DOS-style short mode. If the path
16336   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16337   # take no chances and rewrite it.
16338   # Note: m4 eats our [], so we need to use [ and ] instead.
16339   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16340   if test "x$has_forbidden_chars" != x; then
16341     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16342     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16343     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16344     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16345       # Going to short mode and back again did indeed matter. Since short mode is
16346       # case insensitive, let's make it lowercase to improve readability.
16347       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16348       # Now convert it back to Unix-style (cygpath)
16349       input_path=`$CYGPATH -u "$shortmode_path"`
16350       new_path="$input_path"
16351     fi
16352   fi
16353 
16354   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16355   if test "x$test_cygdrive_prefix" = x; then
16356     # As a simple fix, exclude /usr/bin since it's not a real path.
16357     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16358       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16359       # a path prefixed by /cygdrive for fixpath to work.
16360       new_path="$CYGWIN_ROOT_PATH$input_path"
16361     fi
16362   fi
16363 
16364 
16365   if test "x$path" != "x$new_path"; then
16366     CURDIR="$new_path"
16367     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16368 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16369   fi
16370 
16371     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16372 
16373   path="$CURDIR"
16374   has_colon=`$ECHO $path | $GREP ^.:`
16375   new_path="$path"
16376   if test "x$has_colon" = x; then
16377     # Not in mixed or Windows style, start by that.
16378     new_path=`cmd //c echo $path`
16379   fi
16380 
16381 
16382   input_path="$new_path"
16383   # Check if we need to convert this using DOS-style short mode. If the path
16384   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16385   # take no chances and rewrite it.
16386   # Note: m4 eats our [], so we need to use [ and ] instead.
16387   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16388   if test "x$has_forbidden_chars" != x; then
16389     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16390     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16391   fi
16392 
16393 
16394   windows_path="$new_path"
16395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16396     unix_path=`$CYGPATH -u "$windows_path"`
16397     new_path="$unix_path"
16398   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16399     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16400     new_path="$unix_path"
16401   fi
16402 
16403   if test "x$path" != "x$new_path"; then
16404     CURDIR="$new_path"
16405     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16406 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16407   fi
16408 
16409   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16410   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16411 
16412     else
16413       # We're on a unix platform. Hooray! :)
16414       path="$CURDIR"
16415       has_space=`$ECHO "$path" | $GREP " "`
16416       if test "x$has_space" != x; then
16417         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16418 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16419         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16420       fi
16421 
16422       # Use eval to expand a potential ~
16423       eval path="$path"
16424       if test ! -f "$path" && test ! -d "$path"; then
16425         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16426       fi
16427 
16428       if test -d "$path"; then
16429         CURDIR="`cd "$path"; $THEPWDCMD -L`"
16430       else
16431         dir="`$DIRNAME "$path"`"
16432         base="`$BASENAME "$path"`"
16433         CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16434       fi
16435     fi
16436   fi
16437 
16438 
16439   # Only process if variable expands to non-empty
16440 
16441   if test "x$TOPDIR" != x; then
16442     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16443 
16444   # Input might be given as Windows format, start by converting to
16445   # unix format.
16446   path="$TOPDIR"
16447   new_path=`$CYGPATH -u "$path"`
16448 
16449   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16450   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16451   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16452   # "foo.exe" is OK but "foo" is an error.
16453   #
16454   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16455   # It is also a way to make sure we got the proper file name for the real test later on.
16456   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16457   if test "x$test_shortpath" = x; then
16458     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16459 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16460     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16461   fi
16462 
16463   # Call helper function which possibly converts this using DOS-style short mode.
16464   # If so, the updated path is stored in $new_path.
16465 
16466   input_path="$new_path"
16467   # Check if we need to convert this using DOS-style short mode. If the path
16468   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16469   # take no chances and rewrite it.
16470   # Note: m4 eats our [], so we need to use [ and ] instead.
16471   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16472   if test "x$has_forbidden_chars" != x; then
16473     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16474     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16475     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16476     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16477       # Going to short mode and back again did indeed matter. Since short mode is
16478       # case insensitive, let's make it lowercase to improve readability.
16479       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16480       # Now convert it back to Unix-style (cygpath)
16481       input_path=`$CYGPATH -u "$shortmode_path"`
16482       new_path="$input_path"
16483     fi
16484   fi
16485 
16486   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16487   if test "x$test_cygdrive_prefix" = x; then
16488     # As a simple fix, exclude /usr/bin since it's not a real path.
16489     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16490       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16491       # a path prefixed by /cygdrive for fixpath to work.
16492       new_path="$CYGWIN_ROOT_PATH$input_path"
16493     fi
16494   fi
16495 
16496 
16497   if test "x$path" != "x$new_path"; then
16498     TOPDIR="$new_path"
16499     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16500 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16501   fi
16502 
16503     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16504 
16505   path="$TOPDIR"
16506   has_colon=`$ECHO $path | $GREP ^.:`
16507   new_path="$path"
16508   if test "x$has_colon" = x; then
16509     # Not in mixed or Windows style, start by that.
16510     new_path=`cmd //c echo $path`
16511   fi
16512 
16513 
16514   input_path="$new_path"
16515   # Check if we need to convert this using DOS-style short mode. If the path
16516   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16517   # take no chances and rewrite it.
16518   # Note: m4 eats our [], so we need to use [ and ] instead.
16519   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16520   if test "x$has_forbidden_chars" != x; then
16521     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16522     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16523   fi
16524 
16525 
16526   windows_path="$new_path"
16527   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16528     unix_path=`$CYGPATH -u "$windows_path"`
16529     new_path="$unix_path"
16530   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16531     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16532     new_path="$unix_path"
16533   fi
16534 
16535   if test "x$path" != "x$new_path"; then
16536     TOPDIR="$new_path"
16537     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16538 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16539   fi
16540 
16541   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16542   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16543 
16544     else
16545       # We're on a unix platform. Hooray! :)
16546       path="$TOPDIR"
16547       has_space=`$ECHO "$path" | $GREP " "`
16548       if test "x$has_space" != x; then
16549         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16550 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16551         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16552       fi
16553 
16554       # Use eval to expand a potential ~
16555       eval path="$path"
16556       if test ! -f "$path" && test ! -d "$path"; then
16557         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16558       fi
16559 
16560       if test -d "$path"; then
16561         TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16562       else
16563         dir="`$DIRNAME "$path"`"
16564         base="`$BASENAME "$path"`"
16565         TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16566       fi
16567     fi
16568   fi
16569 
16570   # SRC_ROOT is a traditional alias for TOPDIR.
16571   SRC_ROOT=$TOPDIR
16572 
16573   # Calculate a canonical version of TOPDIR for string comparisons
16574   CANONICAL_TOPDIR=$TOPDIR
16575 
16576   if test "x$OPENJDK_BUILD_OS" != xwindows; then
16577     # Follow a chain of symbolic links. Use readlink
16578     # where it exists, else fall back to horribly
16579     # complicated shell code.
16580     if test "x$READLINK_TESTED" != yes; then
16581       # On MacOSX there is a readlink tool with a different
16582       # purpose than the GNU readlink tool. Check the found readlink.
16583       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16584       if test "x$ISGNU" = x; then
16585         # A readlink that we do not know how to use.
16586         # Are there other non-GNU readlinks out there?
16587         READLINK_TESTED=yes
16588         READLINK=
16589       fi
16590     fi
16591 
16592     if test "x$READLINK" != x; then
16593       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16594     else
16595       # Save the current directory for restoring afterwards
16596       STARTDIR=$PWD
16597       COUNTER=0
16598       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16599       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16600       cd $sym_link_dir
16601       # Use -P flag to resolve symlinks in directories.
16602       cd `$THEPWDCMD -P`
16603       sym_link_dir=`$THEPWDCMD -P`
16604       # Resolve file symlinks
16605       while test $COUNTER -lt 20; do
16606         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16607         if test "x$ISLINK" == x; then
16608           # This is not a symbolic link! We are done!
16609           break
16610         fi
16611         # Again resolve directory symlinks since the target of the just found
16612         # link could be in a different directory
16613         cd `$DIRNAME $ISLINK`
16614         sym_link_dir=`$THEPWDCMD -P`
16615         sym_link_file=`$BASENAME $ISLINK`
16616         let COUNTER=COUNTER+1
16617       done
16618       cd $STARTDIR
16619       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16620     fi
16621   fi
16622 
16623 
16624 
16625   # Locate the directory of this script.
16626   AUTOCONF_DIR=$TOPDIR/common/autoconf
16627 
16628   # Setup username (for use in adhoc version strings etc)
16629   # Outer [ ] to quote m4.
16630    USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16631 
16632 
16633 
16634 # Check if it's a pure open build or if custom sources are to be used.
16635 
16636   # Check whether --enable-openjdk-only was given.
16637 if test "${enable_openjdk_only+set}" = set; then :
16638   enableval=$enable_openjdk_only;
16639 else
16640   enable_openjdk_only="no"
16641 fi
16642 
16643 
16644   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16645 $as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16647 $as_echo "$enable_openjdk_only" >&6; }
16648   if test "x$enable_openjdk_only" = "xyes"; then
16649     SUPPRESS_CUSTOM_EXTENSIONS="true"
16650   elif test "x$enable_openjdk_only" = "xno"; then
16651     SUPPRESS_CUSTOM_EXTENSIONS="false"
16652   else
16653     as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16654   fi
16655 
16656   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16657   # the IncludeCustomExtension macro.
16658 
16659 
16660 # Check whether --with-custom-make-dir was given.
16661 if test "${with_custom_make_dir+set}" = set; then :
16662   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
16663 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16664 fi
16665 
16666 
16667 
16668 
16669 # These are needed to be able to create a configuration name (and thus the output directory)
16670 
16671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16672 $as_echo_n "checking which variant of the JDK to build... " >&6; }
16673 
16674 # Check whether --with-jdk-variant was given.
16675 if test "${with_jdk_variant+set}" = set; then :
16676   withval=$with_jdk_variant;
16677 fi
16678 
16679 
16680   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16681     JDK_VARIANT="normal"
16682   else
16683     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16684   fi
16685 
16686 
16687 
16688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16689 $as_echo "$JDK_VARIANT" >&6; }
16690 
16691 
16692   DEBUG_LEVEL="release"
16693   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16694 $as_echo_n "checking which debug level to use... " >&6; }
16695   # Check whether --enable-debug was given.
16696 if test "${enable_debug+set}" = set; then :
16697   enableval=$enable_debug;
16698         ENABLE_DEBUG="${enableval}"
16699         DEBUG_LEVEL="fastdebug"
16700 
16701 else
16702   ENABLE_DEBUG="no"
16703 fi
16704 
16705 
16706 
16707 # Check whether --with-debug-level was given.
16708 if test "${with_debug_level+set}" = set; then :
16709   withval=$with_debug_level;
16710         DEBUG_LEVEL="${withval}"
16711         if test "x$ENABLE_DEBUG" = xyes; then
16712           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16713         fi
16714 
16715 fi
16716 
16717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16718 $as_echo "$DEBUG_LEVEL" >&6; }
16719 
16720   if test "x$DEBUG_LEVEL" != xrelease && \
16721       test "x$DEBUG_LEVEL" != xoptimized && \
16722       test "x$DEBUG_LEVEL" != xfastdebug && \
16723       test "x$DEBUG_LEVEL" != xslowdebug; then
16724     as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16725   fi
16726 
16727   # Translate DEBUG_LEVEL to debug level used by Hotspot
16728   HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16729   if test "x$DEBUG_LEVEL" = xrelease; then
16730     HOTSPOT_DEBUG_LEVEL="product"
16731   elif test "x$DEBUG_LEVEL" = xslowdebug; then
16732     HOTSPOT_DEBUG_LEVEL="debug"
16733   fi
16734 
16735   if test "x$DEBUG_LEVEL" = xoptimized; then
16736     # The debug level 'optimized' is a little special because it is currently only
16737     # applicable to the HotSpot build where it means to build a completely
16738     # optimized version of the VM without any debugging code (like for the
16739     # 'release' debug level which is called 'product' in the HotSpot build) but
16740     # with the exception that it can contain additional code which is otherwise
16741     # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16742     # test new and/or experimental features which are not intended for customer
16743     # shipment. Because these new features need to be tested and benchmarked in
16744     # real world scenarios, we want to build the containing JDK at the 'release'
16745     # debug level.
16746     DEBUG_LEVEL="release"
16747   fi
16748 
16749 
16750 
16751 
16752 
16753 
16754 # Check whether --with-jvm-variants was given.
16755 if test "${with_jvm_variants+set}" = set; then :
16756   withval=$with_jvm_variants;
16757 fi
16758 
16759 
16760   if test "x$with_jvm_variants" = x; then
16761     with_jvm_variants="server"
16762   fi
16763   JVM_VARIANTS_OPT="$with_jvm_variants"
16764 
16765   # Has the user listed more than one variant?
16766   # Additional [] needed to keep m4 from mangling shell constructs.
16767   if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16768     BUILDING_MULTIPLE_JVM_VARIANTS=true
16769   else
16770     BUILDING_MULTIPLE_JVM_VARIANTS=false
16771   fi
16772   # Replace the commas with AND for use in the build directory name.
16773   JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16774 
16775   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16776 $as_echo_n "checking which variants of the JVM to build... " >&6; }
16777   # JVM_VARIANTS is a space-separated list.
16778   # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16779   JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16781 $as_echo "$JVM_VARIANTS" >&6; }
16782 
16783   # Check that the selected variants are valid
16784 
16785   # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16786   # Notice that the original variant failes on SLES 10 and 11
16787   NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16788   STACK=${JVM_VARIANTS// /$'\n'}
16789   INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16790   if test "x$INVALID_VARIANTS" != x; then
16791     { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16792 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16793     as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16794   fi
16795 
16796   # All "special" variants share the same output directory ("server")
16797   VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16798   NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16799   STACK=${JVM_VARIANTS// /$'\n'}
16800   INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16801   if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16802     as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16803   fi
16804 
16805 
16806 
16807 
16808   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16809     # zero behaves as a platform and rewrites these values. This is really weird. :(
16810     # We are guaranteed that we do not build any other variants when building zero.
16811     HOTSPOT_TARGET_CPU=zero
16812     HOTSPOT_TARGET_CPU_ARCH=zero
16813   fi
16814 
16815 
16816 # With basic setup done, call the custom early hook.
16817 
16818 
16819 # Check if we have devkits, extra paths or sysroot set.
16820 
16821 
16822 # Check whether --with-devkit was given.
16823 if test "${with_devkit+set}" = set; then :
16824   withval=$with_devkit;
16825 
16826   # Only process if variable expands to non-empty
16827 
16828   if test "x$with_devkit" != x; then
16829     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16830 
16831   # Input might be given as Windows format, start by converting to
16832   # unix format.
16833   path="$with_devkit"
16834   new_path=`$CYGPATH -u "$path"`
16835 
16836   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16837   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16838   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16839   # "foo.exe" is OK but "foo" is an error.
16840   #
16841   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16842   # It is also a way to make sure we got the proper file name for the real test later on.
16843   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16844   if test "x$test_shortpath" = x; then
16845     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16846 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16847     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16848   fi
16849 
16850   # Call helper function which possibly converts this using DOS-style short mode.
16851   # If so, the updated path is stored in $new_path.
16852 
16853   input_path="$new_path"
16854   # Check if we need to convert this using DOS-style short mode. If the path
16855   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16856   # take no chances and rewrite it.
16857   # Note: m4 eats our [], so we need to use [ and ] instead.
16858   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16859   if test "x$has_forbidden_chars" != x; then
16860     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16861     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16862     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16863     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16864       # Going to short mode and back again did indeed matter. Since short mode is
16865       # case insensitive, let's make it lowercase to improve readability.
16866       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16867       # Now convert it back to Unix-style (cygpath)
16868       input_path=`$CYGPATH -u "$shortmode_path"`
16869       new_path="$input_path"
16870     fi
16871   fi
16872 
16873   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16874   if test "x$test_cygdrive_prefix" = x; then
16875     # As a simple fix, exclude /usr/bin since it's not a real path.
16876     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16877       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16878       # a path prefixed by /cygdrive for fixpath to work.
16879       new_path="$CYGWIN_ROOT_PATH$input_path"
16880     fi
16881   fi
16882 
16883 
16884   if test "x$path" != "x$new_path"; then
16885     with_devkit="$new_path"
16886     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16887 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16888   fi
16889 
16890     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16891 
16892   path="$with_devkit"
16893   has_colon=`$ECHO $path | $GREP ^.:`
16894   new_path="$path"
16895   if test "x$has_colon" = x; then
16896     # Not in mixed or Windows style, start by that.
16897     new_path=`cmd //c echo $path`
16898   fi
16899 
16900 
16901   input_path="$new_path"
16902   # Check if we need to convert this using DOS-style short mode. If the path
16903   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16904   # take no chances and rewrite it.
16905   # Note: m4 eats our [], so we need to use [ and ] instead.
16906   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16907   if test "x$has_forbidden_chars" != x; then
16908     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16909     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16910   fi
16911 
16912 
16913   windows_path="$new_path"
16914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16915     unix_path=`$CYGPATH -u "$windows_path"`
16916     new_path="$unix_path"
16917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16918     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16919     new_path="$unix_path"
16920   fi
16921 
16922   if test "x$path" != "x$new_path"; then
16923     with_devkit="$new_path"
16924     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16925 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16926   fi
16927 
16928   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16929   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16930 
16931     else
16932       # We're on a unix platform. Hooray! :)
16933       path="$with_devkit"
16934       has_space=`$ECHO "$path" | $GREP " "`
16935       if test "x$has_space" != x; then
16936         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16937 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16938         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16939       fi
16940 
16941       # Use eval to expand a potential ~
16942       eval path="$path"
16943       if test ! -f "$path" && test ! -d "$path"; then
16944         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16945       fi
16946 
16947       if test -d "$path"; then
16948         with_devkit="`cd "$path"; $THEPWDCMD -L`"
16949       else
16950         dir="`$DIRNAME "$path"`"
16951         base="`$BASENAME "$path"`"
16952         with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16953       fi
16954     fi
16955   fi
16956 
16957         DEVKIT_ROOT="$with_devkit"
16958         # Check for a meta data info file in the root of the devkit
16959         if test -f "$DEVKIT_ROOT/devkit.info"; then
16960           . $DEVKIT_ROOT/devkit.info
16961           # This potentially sets the following:
16962           # A descriptive name of the devkit
16963 
16964   if test "x$DEVKIT_NAME" = x; then
16965     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16966   fi
16967 
16968           # Corresponds to --with-extra-path
16969 
16970   if test "x$DEVKIT_EXTRA_PATH" = x; then
16971     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16972   fi
16973 
16974           # Corresponds to --with-toolchain-path
16975 
16976   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16977     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16978   fi
16979 
16980           # Corresponds to --with-sysroot
16981 
16982   if test "x$DEVKIT_SYSROOT" = x; then
16983     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16984   fi
16985 
16986 
16987           # Identifies the Visual Studio version in the devkit
16988 
16989   if test "x$DEVKIT_VS_VERSION" = x; then
16990     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16991   fi
16992 
16993           # The Visual Studio include environment variable
16994 
16995   if test "x$DEVKIT_VS_INCLUDE" = x; then
16996     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16997   fi
16998 
16999           # The Visual Studio lib environment variable
17000 
17001   if test "x$DEVKIT_VS_LIB" = x; then
17002     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17003   fi
17004 
17005           # Corresponds to --with-msvcr-dll
17006 
17007   if test "x$DEVKIT_MSVCR_DLL" = x; then
17008     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17009   fi
17010 
17011           # Corresponds to --with-msvcp-dll
17012 
17013   if test "x$DEVKIT_MSVCP_DLL" = x; then
17014     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17015   fi
17016 
17017         fi
17018 
17019         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17020 $as_echo_n "checking for devkit... " >&6; }
17021         if test "x$DEVKIT_NAME" != x; then
17022           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17023 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17024         else
17025           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17026 $as_echo "$DEVKIT_ROOT" >&6; }
17027         fi
17028 
17029 
17030   if test "x$DEVKIT_EXTRA_PATH" != x; then
17031     if test "x$EXTRA_PATH" = x; then
17032       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17033     else
17034       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17035     fi
17036   fi
17037 
17038 
17039         # Fallback default of just /bin if DEVKIT_PATH is not defined
17040         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17041           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17042         fi
17043 
17044   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17045     if test "x$TOOLCHAIN_PATH" = x; then
17046       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17047     else
17048       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17049     fi
17050   fi
17051 
17052 
17053         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17054         # places for backwards compatiblity.
17055         if test "x$DEVKIT_SYSROOT" != x; then
17056           SYSROOT="$DEVKIT_SYSROOT"
17057         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17058           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17059         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17060           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17061         fi
17062 
17063 
17064 fi
17065 
17066 
17067   # You can force the sysroot if the sysroot encoded into the compiler tools
17068   # is not correct.
17069 
17070 # Check whether --with-sys-root was given.
17071 if test "${with_sys_root+set}" = set; then :
17072   withval=$with_sys_root; SYSROOT=$with_sys_root
17073 
17074 fi
17075 
17076 
17077 
17078 # Check whether --with-sysroot was given.
17079 if test "${with_sysroot+set}" = set; then :
17080   withval=$with_sysroot; SYSROOT=$with_sysroot
17081 
17082 fi
17083 
17084 
17085 
17086 # Check whether --with-tools-dir was given.
17087 if test "${with_tools_dir+set}" = set; then :
17088   withval=$with_tools_dir;
17089   if test "x$with_tools_dir" != x; then
17090     if test "x$TOOLCHAIN_PATH" = x; then
17091       TOOLCHAIN_PATH="$with_tools_dir"
17092     else
17093       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17094     fi
17095   fi
17096 
17097 
17098 fi
17099 
17100 
17101 
17102 # Check whether --with-toolchain-path was given.
17103 if test "${with_toolchain_path+set}" = set; then :
17104   withval=$with_toolchain_path;
17105   if test "x$with_toolchain_path" != x; then
17106     if test "x$TOOLCHAIN_PATH" = x; then
17107       TOOLCHAIN_PATH="$with_toolchain_path"
17108     else
17109       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17110     fi
17111   fi
17112 
17113 
17114 fi
17115 
17116 
17117 
17118 # Check whether --with-extra-path was given.
17119 if test "${with_extra_path+set}" = set; then :
17120   withval=$with_extra_path;
17121   if test "x$with_extra_path" != x; then
17122     if test "x$EXTRA_PATH" = x; then
17123       EXTRA_PATH="$with_extra_path"
17124     else
17125       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17126     fi
17127   fi
17128 
17129 
17130 fi
17131 
17132 
17133   if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_OS" = "xios" ; then
17134     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17135     # If not, detect if Xcode is installed by running xcodebuild -version
17136     # if no Xcode installed, xcodebuild exits with 1
17137     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17138     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17139       # We need to use xcodebuild in the toolchain dir provided by the user, this will
17140       # fall back on the stub binary in /usr/bin/xcodebuild
17141       # Extract the first word of "xcodebuild", so it can be a program name with args.
17142 set dummy xcodebuild; ac_word=$2
17143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17144 $as_echo_n "checking for $ac_word... " >&6; }
17145 if ${ac_cv_path_XCODEBUILD+:} false; then :
17146   $as_echo_n "(cached) " >&6
17147 else
17148   case $XCODEBUILD in
17149   [\\/]* | ?:[\\/]*)
17150   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17151   ;;
17152   *)
17153   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17154 for as_dir in $TOOLCHAIN_PATH
17155 do
17156   IFS=$as_save_IFS
17157   test -z "$as_dir" && as_dir=.
17158     for ac_exec_ext in '' $ac_executable_extensions; do
17159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17160     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17162     break 2
17163   fi
17164 done
17165   done
17166 IFS=$as_save_IFS
17167 
17168   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17169   ;;
17170 esac
17171 fi
17172 XCODEBUILD=$ac_cv_path_XCODEBUILD
17173 if test -n "$XCODEBUILD"; then
17174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17175 $as_echo "$XCODEBUILD" >&6; }
17176 else
17177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17178 $as_echo "no" >&6; }
17179 fi
17180 
17181 
17182     else
17183       # this should result in SYSROOT being empty, unless --with-sysroot is provided
17184       # when only the command line tools are installed there are no SDKs, so headers
17185       # are copied into the system frameworks
17186       XCODEBUILD=
17187 
17188     fi
17189 
17190     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17191 $as_echo_n "checking for sdk name... " >&6; }
17192 
17193 # Check whether --with-sdk-name was given.
17194 if test "${with_sdk_name+set}" = set; then :
17195   withval=$with_sdk_name; SDKNAME=$with_sdk_name
17196 
17197 fi
17198 
17199     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17200 $as_echo "$SDKNAME" >&6; }
17201 
17202     # if toolchain path is specified then don't rely on system headers, they may not compile
17203     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17204     test -z "$TOOLCHAIN_PATH" && \
17205       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17206 
17207     if test -z "$SYSROOT"; then
17208       if test -n "$XCODEBUILD"; then
17209         # if we don't have system headers, use default SDK name (last resort)
17210         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17211           SDKNAME=${SDKNAME:-macosx}
17212         fi
17213 
17214         if test -n "$SDKNAME"; then
17215           # Call xcodebuild to determine SYSROOT
17216           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17217         fi
17218       else
17219         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17220           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
17221         fi
17222       fi
17223     else
17224       # warn user if --with-sdk-name was also set
17225       if test -n "$with_sdk_name"; then
17226         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17227 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17228       fi
17229     fi
17230 
17231     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17232       # If no system framework headers, then SYSROOT must be set, or we won't build
17233       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
17234     fi
17235 
17236     # Perform a basic sanity test
17237     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17238       if test -z "$SYSROOT"; then
17239         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
17240       else
17241         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17242       fi
17243     fi
17244 
17245     # set SDKROOT too, Xcode tools will pick it up
17246     SDKROOT=$SYSROOT
17247 
17248   fi
17249 
17250   # Prepend the extra path to the global path
17251 
17252   if test "x$EXTRA_PATH" != x; then
17253     if test "x$PATH" = x; then
17254       PATH="$EXTRA_PATH"
17255     else
17256       PATH="$EXTRA_PATH:$PATH"
17257     fi
17258   fi
17259 
17260 
17261   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
17262     # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
17263     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
17264   fi
17265 
17266   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17267 $as_echo_n "checking for sysroot... " >&6; }
17268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17269 $as_echo "$SYSROOT" >&6; }
17270   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17271 $as_echo_n "checking for toolchain path... " >&6; }
17272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17273 $as_echo "$TOOLCHAIN_PATH" >&6; }
17274   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17275 $as_echo_n "checking for extra path... " >&6; }
17276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17277 $as_echo "$EXTRA_PATH" >&6; }
17278 
17279 
17280 # To properly create a configuration name, we need to have the OpenJDK target
17281 # and options (variants and debug level) parsed.
17282 
17283 
17284 
17285 # Check whether --with-conf-name was given.
17286 if test "${with_conf_name+set}" = set; then :
17287   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17288 fi
17289 
17290 
17291   # Test from where we are running configure, in or outside of src root.
17292   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17293 $as_echo_n "checking where to store configuration... " >&6; }
17294   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17295       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17296       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17297     # We are running configure from the src root.
17298     # Create a default ./build/target-variant-debuglevel output root.
17299     if test "x${CONF_NAME}" = x; then
17300       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17301 $as_echo "in default location" >&6; }
17302       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17303     else
17304       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17305 $as_echo "in build directory with custom name" >&6; }
17306     fi
17307     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17308     $MKDIR -p "$OUTPUT_ROOT"
17309     if test ! -d "$OUTPUT_ROOT"; then
17310       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17311     fi
17312   else
17313     # We are running configure from outside of the src dir.
17314     # Then use the current directory as output dir!
17315     # If configuration is situated in normal build directory, just use the build
17316     # directory name as configuration name, otherwise use the complete path.
17317     if test "x${CONF_NAME}" = x; then
17318       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17319     fi
17320     OUTPUT_ROOT="$CURDIR"
17321     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17322 $as_echo "in current directory" >&6; }
17323 
17324     # WARNING: This might be a bad thing to do. You need to be sure you want to
17325     # have a configuration in this directory. Do some sanity checks!
17326 
17327     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17328       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17329       # other files
17330       files_present=`$LS $OUTPUT_ROOT`
17331       # Configure has already touched config.log and confdefs.h in the current dir when this check
17332       # is performed.
17333       filtered_files=`$ECHO "$files_present" \
17334           | $SED -e 's/config.log//g' \
17335               -e 's/configure.log//g' \
17336               -e 's/confdefs.h//g' \
17337               -e 's/ //g' \
17338           | $TR -d '\n'`
17339       if test "x$filtered_files" != x; then
17340         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17341 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
17342         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17343 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17344         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17345 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17346         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17347 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17348         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17349 $as_echo "$as_me: seriously mess up just about everything." >&6;}
17350         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17351 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17352         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17353 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17354         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17355       fi
17356     fi
17357   fi
17358   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17359 $as_echo_n "checking what configuration name to use... " >&6; }
17360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17361 $as_echo "$CONF_NAME" >&6; }
17362 
17363 
17364   # Only process if variable expands to non-empty
17365 
17366   if test "x$OUTPUT_ROOT" != x; then
17367     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17368 
17369   # Input might be given as Windows format, start by converting to
17370   # unix format.
17371   path="$OUTPUT_ROOT"
17372   new_path=`$CYGPATH -u "$path"`
17373 
17374   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17375   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17376   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17377   # "foo.exe" is OK but "foo" is an error.
17378   #
17379   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17380   # It is also a way to make sure we got the proper file name for the real test later on.
17381   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17382   if test "x$test_shortpath" = x; then
17383     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17384 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17385     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17386   fi
17387 
17388   # Call helper function which possibly converts this using DOS-style short mode.
17389   # If so, the updated path is stored in $new_path.
17390 
17391   input_path="$new_path"
17392   # Check if we need to convert this using DOS-style short mode. If the path
17393   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17394   # take no chances and rewrite it.
17395   # Note: m4 eats our [], so we need to use [ and ] instead.
17396   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17397   if test "x$has_forbidden_chars" != x; then
17398     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17399     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17400     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17401     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17402       # Going to short mode and back again did indeed matter. Since short mode is
17403       # case insensitive, let's make it lowercase to improve readability.
17404       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17405       # Now convert it back to Unix-style (cygpath)
17406       input_path=`$CYGPATH -u "$shortmode_path"`
17407       new_path="$input_path"
17408     fi
17409   fi
17410 
17411   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17412   if test "x$test_cygdrive_prefix" = x; then
17413     # As a simple fix, exclude /usr/bin since it's not a real path.
17414     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17415       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17416       # a path prefixed by /cygdrive for fixpath to work.
17417       new_path="$CYGWIN_ROOT_PATH$input_path"
17418     fi
17419   fi
17420 
17421 
17422   if test "x$path" != "x$new_path"; then
17423     OUTPUT_ROOT="$new_path"
17424     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17425 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17426   fi
17427 
17428     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17429 
17430   path="$OUTPUT_ROOT"
17431   has_colon=`$ECHO $path | $GREP ^.:`
17432   new_path="$path"
17433   if test "x$has_colon" = x; then
17434     # Not in mixed or Windows style, start by that.
17435     new_path=`cmd //c echo $path`
17436   fi
17437 
17438 
17439   input_path="$new_path"
17440   # Check if we need to convert this using DOS-style short mode. If the path
17441   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17442   # take no chances and rewrite it.
17443   # Note: m4 eats our [], so we need to use [ and ] instead.
17444   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17445   if test "x$has_forbidden_chars" != x; then
17446     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17447     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17448   fi
17449 
17450 
17451   windows_path="$new_path"
17452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17453     unix_path=`$CYGPATH -u "$windows_path"`
17454     new_path="$unix_path"
17455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17456     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17457     new_path="$unix_path"
17458   fi
17459 
17460   if test "x$path" != "x$new_path"; then
17461     OUTPUT_ROOT="$new_path"
17462     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17463 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17464   fi
17465 
17466   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17467   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17468 
17469     else
17470       # We're on a unix platform. Hooray! :)
17471       path="$OUTPUT_ROOT"
17472       has_space=`$ECHO "$path" | $GREP " "`
17473       if test "x$has_space" != x; then
17474         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17475 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17476         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17477       fi
17478 
17479       # Use eval to expand a potential ~
17480       eval path="$path"
17481       if test ! -f "$path" && test ! -d "$path"; then
17482         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17483       fi
17484 
17485       if test -d "$path"; then
17486         OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17487       else
17488         dir="`$DIRNAME "$path"`"
17489         base="`$BASENAME "$path"`"
17490         OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17491       fi
17492     fi
17493   fi
17494 
17495 
17496   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17497   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17498 
17499   SPEC=$OUTPUT_ROOT/spec.gmk
17500 
17501   CONF_NAME=$CONF_NAME
17502 
17503   OUTPUT_ROOT=$OUTPUT_ROOT
17504 
17505 
17506 
17507   # The spec.gmk file contains all variables for the make system.
17508   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17509 
17510   # The bootcycle-spec.gmk file contains support for boot cycle builds.
17511   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17512 
17513   # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17514   ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17515 
17516   # The compare.sh is used to compare the build output to other builds.
17517   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17518 
17519   # The generated Makefile knows where the spec.gmk is and where the source is.
17520   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17521   # which will look for generated configurations
17522   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17523 
17524 
17525 
17526 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17527 
17528   for ac_prog in apt-get yum port pkgutil pkgadd
17529 do
17530   # Extract the first word of "$ac_prog", so it can be a program name with args.
17531 set dummy $ac_prog; ac_word=$2
17532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17533 $as_echo_n "checking for $ac_word... " >&6; }
17534 if ${ac_cv_prog_PKGHANDLER+:} false; then :
17535   $as_echo_n "(cached) " >&6
17536 else
17537   if test -n "$PKGHANDLER"; then
17538   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17539 else
17540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17541 for as_dir in $PATH
17542 do
17543   IFS=$as_save_IFS
17544   test -z "$as_dir" && as_dir=.
17545     for ac_exec_ext in '' $ac_executable_extensions; do
17546   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17547     ac_cv_prog_PKGHANDLER="$ac_prog"
17548     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17549     break 2
17550   fi
17551 done
17552   done
17553 IFS=$as_save_IFS
17554 
17555 fi
17556 fi
17557 PKGHANDLER=$ac_cv_prog_PKGHANDLER
17558 if test -n "$PKGHANDLER"; then
17559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17560 $as_echo "$PKGHANDLER" >&6; }
17561 else
17562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17563 $as_echo "no" >&6; }
17564 fi
17565 
17566 
17567   test -n "$PKGHANDLER" && break
17568 done
17569 
17570 
17571 
17572 # Setup tools that requires more complex handling, or that is not needed by the configure script.
17573 
17574 
17575 
17576   # Publish this variable in the help.
17577 
17578 
17579   if [ -z "${MAKE+x}" ]; then
17580     # The variable is not set by user, try to locate tool using the code snippet
17581 
17582     # Try our hardest to locate a correct version of GNU make
17583     for ac_prog in gmake
17584 do
17585   # Extract the first word of "$ac_prog", so it can be a program name with args.
17586 set dummy $ac_prog; ac_word=$2
17587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17588 $as_echo_n "checking for $ac_word... " >&6; }
17589 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17590   $as_echo_n "(cached) " >&6
17591 else
17592   case $CHECK_GMAKE in
17593   [\\/]* | ?:[\\/]*)
17594   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17595   ;;
17596   *)
17597   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17598 for as_dir in $PATH
17599 do
17600   IFS=$as_save_IFS
17601   test -z "$as_dir" && as_dir=.
17602     for ac_exec_ext in '' $ac_executable_extensions; do
17603   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17604     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17605     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17606     break 2
17607   fi
17608 done
17609   done
17610 IFS=$as_save_IFS
17611 
17612   ;;
17613 esac
17614 fi
17615 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17616 if test -n "$CHECK_GMAKE"; then
17617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17618 $as_echo "$CHECK_GMAKE" >&6; }
17619 else
17620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17621 $as_echo "no" >&6; }
17622 fi
17623 
17624 
17625   test -n "$CHECK_GMAKE" && break
17626 done
17627 
17628 
17629   MAKE_CANDIDATE=""$CHECK_GMAKE""
17630   DESCRIPTION="gmake in PATH"
17631 
17632   # On Cygwin, we require a newer version of make than on other platforms
17633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17634     MAKE_VERSION_EXPR="-e 4\."
17635     MAKE_REQUIRED_VERSION="4.0"
17636    else
17637     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17638     MAKE_REQUIRED_VERSION="3.81"
17639   fi
17640 
17641   if test "x$MAKE_CANDIDATE" != x; then
17642     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17643 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17644     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17645     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17646     if test "x$IS_GNU_MAKE" = x; then
17647       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17648 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17649     else
17650       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17651       if test "x$IS_MODERN_MAKE" = x; then
17652         { $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
17653 $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;}
17654       else
17655         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17656           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17657             MAKE_EXPECTED_ENV='cygwin'
17658           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17659             MAKE_EXPECTED_ENV='msys'
17660           else
17661             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17662           fi
17663           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17664           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17665         else
17666           # Not relevant for non-Windows
17667           IS_MAKE_CORRECT_ENV=true
17668         fi
17669         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17670           { $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
17671 $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;}
17672         else
17673           FOUND_MAKE=$MAKE_CANDIDATE
17674 
17675   # Only process if variable expands to non-empty
17676 
17677   if test "x$FOUND_MAKE" != x; then
17678     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17679 
17680   # First separate the path from the arguments. This will split at the first
17681   # space.
17682   complete="$FOUND_MAKE"
17683   path="${complete%% *}"
17684   tmp="$complete EOL"
17685   arguments="${tmp#* }"
17686 
17687   # Input might be given as Windows format, start by converting to
17688   # unix format.
17689   new_path=`$CYGPATH -u "$path"`
17690 
17691   # Now try to locate executable using which
17692   new_path=`$WHICH "$new_path" 2> /dev/null`
17693   # bat and cmd files are not always considered executable in cygwin causing which
17694   # to not find them
17695   if test "x$new_path" = x \
17696       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17697       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17698     new_path=`$CYGPATH -u "$path"`
17699   fi
17700   if test "x$new_path" = x; then
17701     # Oops. Which didn't find the executable.
17702     # The splitting of arguments from the executable at a space might have been incorrect,
17703     # since paths with space are more likely in Windows. Give it another try with the whole
17704     # argument.
17705     path="$complete"
17706     arguments="EOL"
17707     new_path=`$CYGPATH -u "$path"`
17708     new_path=`$WHICH "$new_path" 2> /dev/null`
17709     # bat and cmd files are not always considered executable in cygwin causing which
17710     # to not find them
17711     if test "x$new_path" = x \
17712         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17713         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17714       new_path=`$CYGPATH -u "$path"`
17715     fi
17716     if test "x$new_path" = x; then
17717       # It's still not found. Now this is an unrecoverable error.
17718       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17719 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17720       has_space=`$ECHO "$complete" | $GREP " "`
17721       if test "x$has_space" != x; then
17722         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17723 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17724       fi
17725       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17726     fi
17727   fi
17728 
17729   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17730   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17731   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17732   # "foo.exe" is OK but "foo" is an error.
17733   #
17734   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17735   # It is also a way to make sure we got the proper file name for the real test later on.
17736   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17737   if test "x$test_shortpath" = x; then
17738     # Short path failed, file does not exist as specified.
17739     # Try adding .exe or .cmd
17740     if test -f "${new_path}.exe"; then
17741       input_to_shortpath="${new_path}.exe"
17742     elif test -f "${new_path}.cmd"; then
17743       input_to_shortpath="${new_path}.cmd"
17744     else
17745       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17746 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17747       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17748 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17749       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17750     fi
17751   else
17752     input_to_shortpath="$new_path"
17753   fi
17754 
17755   # Call helper function which possibly converts this using DOS-style short mode.
17756   # If so, the updated path is stored in $new_path.
17757   new_path="$input_to_shortpath"
17758 
17759   input_path="$input_to_shortpath"
17760   # Check if we need to convert this using DOS-style short mode. If the path
17761   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17762   # take no chances and rewrite it.
17763   # Note: m4 eats our [], so we need to use [ and ] instead.
17764   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17765   if test "x$has_forbidden_chars" != x; then
17766     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17767     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17768     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17769     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17770       # Going to short mode and back again did indeed matter. Since short mode is
17771       # case insensitive, let's make it lowercase to improve readability.
17772       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17773       # Now convert it back to Unix-style (cygpath)
17774       input_path=`$CYGPATH -u "$shortmode_path"`
17775       new_path="$input_path"
17776     fi
17777   fi
17778 
17779   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17780   if test "x$test_cygdrive_prefix" = x; then
17781     # As a simple fix, exclude /usr/bin since it's not a real path.
17782     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17783       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17784       # a path prefixed by /cygdrive for fixpath to work.
17785       new_path="$CYGWIN_ROOT_PATH$input_path"
17786     fi
17787   fi
17788 
17789   # remove trailing .exe if any
17790   new_path="${new_path/%.exe/}"
17791 
17792     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17793 
17794   # First separate the path from the arguments. This will split at the first
17795   # space.
17796   complete="$FOUND_MAKE"
17797   path="${complete%% *}"
17798   tmp="$complete EOL"
17799   arguments="${tmp#* }"
17800 
17801   # Input might be given as Windows format, start by converting to
17802   # unix format.
17803   new_path="$path"
17804 
17805   windows_path="$new_path"
17806   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17807     unix_path=`$CYGPATH -u "$windows_path"`
17808     new_path="$unix_path"
17809   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17810     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17811     new_path="$unix_path"
17812   fi
17813 
17814 
17815   # Now try to locate executable using which
17816   new_path=`$WHICH "$new_path" 2> /dev/null`
17817 
17818   if test "x$new_path" = x; then
17819     # Oops. Which didn't find the executable.
17820     # The splitting of arguments from the executable at a space might have been incorrect,
17821     # since paths with space are more likely in Windows. Give it another try with the whole
17822     # argument.
17823     path="$complete"
17824     arguments="EOL"
17825     new_path="$path"
17826 
17827   windows_path="$new_path"
17828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17829     unix_path=`$CYGPATH -u "$windows_path"`
17830     new_path="$unix_path"
17831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17832     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17833     new_path="$unix_path"
17834   fi
17835 
17836 
17837     new_path=`$WHICH "$new_path" 2> /dev/null`
17838     # bat and cmd files are not always considered executable in MSYS causing which
17839     # to not find them
17840     if test "x$new_path" = x \
17841         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17842         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17843       new_path="$path"
17844 
17845   windows_path="$new_path"
17846   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17847     unix_path=`$CYGPATH -u "$windows_path"`
17848     new_path="$unix_path"
17849   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17850     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17851     new_path="$unix_path"
17852   fi
17853 
17854     fi
17855 
17856     if test "x$new_path" = x; then
17857       # It's still not found. Now this is an unrecoverable error.
17858       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17859 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17860       has_space=`$ECHO "$complete" | $GREP " "`
17861       if test "x$has_space" != x; then
17862         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17863 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17864       fi
17865       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17866     fi
17867   fi
17868 
17869   # Now new_path has a complete unix path to the binary
17870   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17871     # Keep paths in /bin as-is, but remove trailing .exe if any
17872     new_path="${new_path/%.exe/}"
17873     # Do not save /bin paths to all_fixpath_prefixes!
17874   else
17875     # Not in mixed or Windows style, start by that.
17876     new_path=`cmd //c echo $new_path`
17877 
17878   input_path="$new_path"
17879   # Check if we need to convert this using DOS-style short mode. If the path
17880   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17881   # take no chances and rewrite it.
17882   # Note: m4 eats our [], so we need to use [ and ] instead.
17883   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17884   if test "x$has_forbidden_chars" != x; then
17885     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17886     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17887   fi
17888 
17889     # Output is in $new_path
17890 
17891   windows_path="$new_path"
17892   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17893     unix_path=`$CYGPATH -u "$windows_path"`
17894     new_path="$unix_path"
17895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17896     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17897     new_path="$unix_path"
17898   fi
17899 
17900     # remove trailing .exe if any
17901     new_path="${new_path/%.exe/}"
17902 
17903     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17904     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17905   fi
17906 
17907     else
17908       # We're on a unix platform. Hooray! :)
17909       # First separate the path from the arguments. This will split at the first
17910       # space.
17911       complete="$FOUND_MAKE"
17912       path="${complete%% *}"
17913       tmp="$complete EOL"
17914       arguments="${tmp#* }"
17915 
17916       # Cannot rely on the command "which" here since it doesn't always work.
17917       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17918       if test -z "$is_absolute_path"; then
17919         # Path to executable is not absolute. Find it.
17920         IFS_save="$IFS"
17921         IFS=:
17922         for p in $PATH; do
17923           if test -f "$p/$path" && test -x "$p/$path"; then
17924             new_path="$p/$path"
17925             break
17926           fi
17927         done
17928         IFS="$IFS_save"
17929       else
17930         # This is an absolute path, we can use it without further modifications.
17931         new_path="$path"
17932       fi
17933 
17934       if test "x$new_path" = x; then
17935         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17936 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17937         has_space=`$ECHO "$complete" | $GREP " "`
17938         if test "x$has_space" != x; then
17939           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17940 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17941         fi
17942         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17943       fi
17944     fi
17945 
17946     # Now join together the path and the arguments once again
17947     if test "x$arguments" != xEOL; then
17948       new_complete="$new_path ${arguments% *}"
17949     else
17950       new_complete="$new_path"
17951     fi
17952 
17953     if test "x$complete" != "x$new_complete"; then
17954       FOUND_MAKE="$new_complete"
17955       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17956 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17957     fi
17958   fi
17959 
17960         fi
17961       fi
17962     fi
17963   fi
17964 
17965 
17966     if test "x$FOUND_MAKE" = x; then
17967       for ac_prog in make
17968 do
17969   # Extract the first word of "$ac_prog", so it can be a program name with args.
17970 set dummy $ac_prog; ac_word=$2
17971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17972 $as_echo_n "checking for $ac_word... " >&6; }
17973 if ${ac_cv_path_CHECK_MAKE+:} false; then :
17974   $as_echo_n "(cached) " >&6
17975 else
17976   case $CHECK_MAKE in
17977   [\\/]* | ?:[\\/]*)
17978   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17979   ;;
17980   *)
17981   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17982 for as_dir in $PATH
17983 do
17984   IFS=$as_save_IFS
17985   test -z "$as_dir" && as_dir=.
17986     for ac_exec_ext in '' $ac_executable_extensions; do
17987   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17988     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17989     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17990     break 2
17991   fi
17992 done
17993   done
17994 IFS=$as_save_IFS
17995 
17996   ;;
17997 esac
17998 fi
17999 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18000 if test -n "$CHECK_MAKE"; then
18001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18002 $as_echo "$CHECK_MAKE" >&6; }
18003 else
18004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18005 $as_echo "no" >&6; }
18006 fi
18007 
18008 
18009   test -n "$CHECK_MAKE" && break
18010 done
18011 
18012 
18013   MAKE_CANDIDATE=""$CHECK_MAKE""
18014   DESCRIPTION="make in PATH"
18015 
18016   # On Cygwin, we require a newer version of make than on other platforms
18017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18018     MAKE_VERSION_EXPR="-e 4\."
18019     MAKE_REQUIRED_VERSION="4.0"
18020    else
18021     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18022     MAKE_REQUIRED_VERSION="3.81"
18023   fi
18024 
18025   if test "x$MAKE_CANDIDATE" != x; then
18026     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18027 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18028     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18029     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18030     if test "x$IS_GNU_MAKE" = x; then
18031       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18032 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18033     else
18034       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18035       if test "x$IS_MODERN_MAKE" = x; then
18036         { $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
18037 $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;}
18038       else
18039         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18040           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18041             MAKE_EXPECTED_ENV='cygwin'
18042           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18043             MAKE_EXPECTED_ENV='msys'
18044           else
18045             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18046           fi
18047           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18048           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18049         else
18050           # Not relevant for non-Windows
18051           IS_MAKE_CORRECT_ENV=true
18052         fi
18053         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18054           { $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
18055 $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;}
18056         else
18057           FOUND_MAKE=$MAKE_CANDIDATE
18058 
18059   # Only process if variable expands to non-empty
18060 
18061   if test "x$FOUND_MAKE" != x; then
18062     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18063 
18064   # First separate the path from the arguments. This will split at the first
18065   # space.
18066   complete="$FOUND_MAKE"
18067   path="${complete%% *}"
18068   tmp="$complete EOL"
18069   arguments="${tmp#* }"
18070 
18071   # Input might be given as Windows format, start by converting to
18072   # unix format.
18073   new_path=`$CYGPATH -u "$path"`
18074 
18075   # Now try to locate executable using which
18076   new_path=`$WHICH "$new_path" 2> /dev/null`
18077   # bat and cmd files are not always considered executable in cygwin causing which
18078   # to not find them
18079   if test "x$new_path" = x \
18080       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18081       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18082     new_path=`$CYGPATH -u "$path"`
18083   fi
18084   if test "x$new_path" = x; then
18085     # Oops. Which didn't find the executable.
18086     # The splitting of arguments from the executable at a space might have been incorrect,
18087     # since paths with space are more likely in Windows. Give it another try with the whole
18088     # argument.
18089     path="$complete"
18090     arguments="EOL"
18091     new_path=`$CYGPATH -u "$path"`
18092     new_path=`$WHICH "$new_path" 2> /dev/null`
18093     # bat and cmd files are not always considered executable in cygwin causing which
18094     # to not find them
18095     if test "x$new_path" = x \
18096         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18097         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18098       new_path=`$CYGPATH -u "$path"`
18099     fi
18100     if test "x$new_path" = x; then
18101       # It's still not found. Now this is an unrecoverable error.
18102       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18103 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18104       has_space=`$ECHO "$complete" | $GREP " "`
18105       if test "x$has_space" != x; then
18106         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18107 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18108       fi
18109       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18110     fi
18111   fi
18112 
18113   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18114   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18115   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18116   # "foo.exe" is OK but "foo" is an error.
18117   #
18118   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18119   # It is also a way to make sure we got the proper file name for the real test later on.
18120   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18121   if test "x$test_shortpath" = x; then
18122     # Short path failed, file does not exist as specified.
18123     # Try adding .exe or .cmd
18124     if test -f "${new_path}.exe"; then
18125       input_to_shortpath="${new_path}.exe"
18126     elif test -f "${new_path}.cmd"; then
18127       input_to_shortpath="${new_path}.cmd"
18128     else
18129       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18130 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18131       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18132 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18133       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18134     fi
18135   else
18136     input_to_shortpath="$new_path"
18137   fi
18138 
18139   # Call helper function which possibly converts this using DOS-style short mode.
18140   # If so, the updated path is stored in $new_path.
18141   new_path="$input_to_shortpath"
18142 
18143   input_path="$input_to_shortpath"
18144   # Check if we need to convert this using DOS-style short mode. If the path
18145   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18146   # take no chances and rewrite it.
18147   # Note: m4 eats our [], so we need to use [ and ] instead.
18148   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18149   if test "x$has_forbidden_chars" != x; then
18150     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18151     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18152     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18153     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18154       # Going to short mode and back again did indeed matter. Since short mode is
18155       # case insensitive, let's make it lowercase to improve readability.
18156       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18157       # Now convert it back to Unix-style (cygpath)
18158       input_path=`$CYGPATH -u "$shortmode_path"`
18159       new_path="$input_path"
18160     fi
18161   fi
18162 
18163   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18164   if test "x$test_cygdrive_prefix" = x; then
18165     # As a simple fix, exclude /usr/bin since it's not a real path.
18166     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18167       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18168       # a path prefixed by /cygdrive for fixpath to work.
18169       new_path="$CYGWIN_ROOT_PATH$input_path"
18170     fi
18171   fi
18172 
18173   # remove trailing .exe if any
18174   new_path="${new_path/%.exe/}"
18175 
18176     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18177 
18178   # First separate the path from the arguments. This will split at the first
18179   # space.
18180   complete="$FOUND_MAKE"
18181   path="${complete%% *}"
18182   tmp="$complete EOL"
18183   arguments="${tmp#* }"
18184 
18185   # Input might be given as Windows format, start by converting to
18186   # unix format.
18187   new_path="$path"
18188 
18189   windows_path="$new_path"
18190   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18191     unix_path=`$CYGPATH -u "$windows_path"`
18192     new_path="$unix_path"
18193   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18194     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18195     new_path="$unix_path"
18196   fi
18197 
18198 
18199   # Now try to locate executable using which
18200   new_path=`$WHICH "$new_path" 2> /dev/null`
18201 
18202   if test "x$new_path" = x; then
18203     # Oops. Which didn't find the executable.
18204     # The splitting of arguments from the executable at a space might have been incorrect,
18205     # since paths with space are more likely in Windows. Give it another try with the whole
18206     # argument.
18207     path="$complete"
18208     arguments="EOL"
18209     new_path="$path"
18210 
18211   windows_path="$new_path"
18212   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18213     unix_path=`$CYGPATH -u "$windows_path"`
18214     new_path="$unix_path"
18215   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18216     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18217     new_path="$unix_path"
18218   fi
18219 
18220 
18221     new_path=`$WHICH "$new_path" 2> /dev/null`
18222     # bat and cmd files are not always considered executable in MSYS causing which
18223     # to not find them
18224     if test "x$new_path" = x \
18225         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18226         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18227       new_path="$path"
18228 
18229   windows_path="$new_path"
18230   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18231     unix_path=`$CYGPATH -u "$windows_path"`
18232     new_path="$unix_path"
18233   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18234     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18235     new_path="$unix_path"
18236   fi
18237 
18238     fi
18239 
18240     if test "x$new_path" = x; then
18241       # It's still not found. Now this is an unrecoverable error.
18242       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18243 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18244       has_space=`$ECHO "$complete" | $GREP " "`
18245       if test "x$has_space" != x; then
18246         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18247 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18248       fi
18249       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18250     fi
18251   fi
18252 
18253   # Now new_path has a complete unix path to the binary
18254   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18255     # Keep paths in /bin as-is, but remove trailing .exe if any
18256     new_path="${new_path/%.exe/}"
18257     # Do not save /bin paths to all_fixpath_prefixes!
18258   else
18259     # Not in mixed or Windows style, start by that.
18260     new_path=`cmd //c echo $new_path`
18261 
18262   input_path="$new_path"
18263   # Check if we need to convert this using DOS-style short mode. If the path
18264   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18265   # take no chances and rewrite it.
18266   # Note: m4 eats our [], so we need to use [ and ] instead.
18267   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18268   if test "x$has_forbidden_chars" != x; then
18269     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18270     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18271   fi
18272 
18273     # Output is in $new_path
18274 
18275   windows_path="$new_path"
18276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18277     unix_path=`$CYGPATH -u "$windows_path"`
18278     new_path="$unix_path"
18279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18280     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18281     new_path="$unix_path"
18282   fi
18283 
18284     # remove trailing .exe if any
18285     new_path="${new_path/%.exe/}"
18286 
18287     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18288     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18289   fi
18290 
18291     else
18292       # We're on a unix platform. Hooray! :)
18293       # First separate the path from the arguments. This will split at the first
18294       # space.
18295       complete="$FOUND_MAKE"
18296       path="${complete%% *}"
18297       tmp="$complete EOL"
18298       arguments="${tmp#* }"
18299 
18300       # Cannot rely on the command "which" here since it doesn't always work.
18301       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18302       if test -z "$is_absolute_path"; then
18303         # Path to executable is not absolute. Find it.
18304         IFS_save="$IFS"
18305         IFS=:
18306         for p in $PATH; do
18307           if test -f "$p/$path" && test -x "$p/$path"; then
18308             new_path="$p/$path"
18309             break
18310           fi
18311         done
18312         IFS="$IFS_save"
18313       else
18314         # This is an absolute path, we can use it without further modifications.
18315         new_path="$path"
18316       fi
18317 
18318       if test "x$new_path" = x; then
18319         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18320 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18321         has_space=`$ECHO "$complete" | $GREP " "`
18322         if test "x$has_space" != x; then
18323           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18324 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18325         fi
18326         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18327       fi
18328     fi
18329 
18330     # Now join together the path and the arguments once again
18331     if test "x$arguments" != xEOL; then
18332       new_complete="$new_path ${arguments% *}"
18333     else
18334       new_complete="$new_path"
18335     fi
18336 
18337     if test "x$complete" != "x$new_complete"; then
18338       FOUND_MAKE="$new_complete"
18339       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18340 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18341     fi
18342   fi
18343 
18344         fi
18345       fi
18346     fi
18347   fi
18348 
18349     fi
18350 
18351     if test "x$FOUND_MAKE" = x; then
18352       if test "x$TOOLCHAIN_PATH" != x; then
18353         # We have a toolchain path, check that as well before giving up.
18354         OLD_PATH=$PATH
18355         PATH=$TOOLCHAIN_PATH:$PATH
18356         for ac_prog in gmake
18357 do
18358   # Extract the first word of "$ac_prog", so it can be a program name with args.
18359 set dummy $ac_prog; ac_word=$2
18360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18361 $as_echo_n "checking for $ac_word... " >&6; }
18362 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18363   $as_echo_n "(cached) " >&6
18364 else
18365   case $CHECK_TOOLSDIR_GMAKE in
18366   [\\/]* | ?:[\\/]*)
18367   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18368   ;;
18369   *)
18370   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18371 for as_dir in $PATH
18372 do
18373   IFS=$as_save_IFS
18374   test -z "$as_dir" && as_dir=.
18375     for ac_exec_ext in '' $ac_executable_extensions; do
18376   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18377     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18378     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18379     break 2
18380   fi
18381 done
18382   done
18383 IFS=$as_save_IFS
18384 
18385   ;;
18386 esac
18387 fi
18388 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18389 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18391 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18392 else
18393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18394 $as_echo "no" >&6; }
18395 fi
18396 
18397 
18398   test -n "$CHECK_TOOLSDIR_GMAKE" && break
18399 done
18400 
18401 
18402   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18403   DESCRIPTION="gmake in tools-dir"
18404 
18405   # On Cygwin, we require a newer version of make than on other platforms
18406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18407     MAKE_VERSION_EXPR="-e 4\."
18408     MAKE_REQUIRED_VERSION="4.0"
18409    else
18410     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18411     MAKE_REQUIRED_VERSION="3.81"
18412   fi
18413 
18414   if test "x$MAKE_CANDIDATE" != x; then
18415     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18416 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18417     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18418     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18419     if test "x$IS_GNU_MAKE" = x; then
18420       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18421 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18422     else
18423       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18424       if test "x$IS_MODERN_MAKE" = x; then
18425         { $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
18426 $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;}
18427       else
18428         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18429           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18430             MAKE_EXPECTED_ENV='cygwin'
18431           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18432             MAKE_EXPECTED_ENV='msys'
18433           else
18434             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18435           fi
18436           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18437           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18438         else
18439           # Not relevant for non-Windows
18440           IS_MAKE_CORRECT_ENV=true
18441         fi
18442         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18443           { $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
18444 $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;}
18445         else
18446           FOUND_MAKE=$MAKE_CANDIDATE
18447 
18448   # Only process if variable expands to non-empty
18449 
18450   if test "x$FOUND_MAKE" != x; then
18451     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18452 
18453   # First separate the path from the arguments. This will split at the first
18454   # space.
18455   complete="$FOUND_MAKE"
18456   path="${complete%% *}"
18457   tmp="$complete EOL"
18458   arguments="${tmp#* }"
18459 
18460   # Input might be given as Windows format, start by converting to
18461   # unix format.
18462   new_path=`$CYGPATH -u "$path"`
18463 
18464   # Now try to locate executable using which
18465   new_path=`$WHICH "$new_path" 2> /dev/null`
18466   # bat and cmd files are not always considered executable in cygwin causing which
18467   # to not find them
18468   if test "x$new_path" = x \
18469       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18470       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18471     new_path=`$CYGPATH -u "$path"`
18472   fi
18473   if test "x$new_path" = x; then
18474     # Oops. Which didn't find the executable.
18475     # The splitting of arguments from the executable at a space might have been incorrect,
18476     # since paths with space are more likely in Windows. Give it another try with the whole
18477     # argument.
18478     path="$complete"
18479     arguments="EOL"
18480     new_path=`$CYGPATH -u "$path"`
18481     new_path=`$WHICH "$new_path" 2> /dev/null`
18482     # bat and cmd files are not always considered executable in cygwin causing which
18483     # to not find them
18484     if test "x$new_path" = x \
18485         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18486         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18487       new_path=`$CYGPATH -u "$path"`
18488     fi
18489     if test "x$new_path" = x; then
18490       # It's still not found. Now this is an unrecoverable error.
18491       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18492 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18493       has_space=`$ECHO "$complete" | $GREP " "`
18494       if test "x$has_space" != x; then
18495         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18496 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18497       fi
18498       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18499     fi
18500   fi
18501 
18502   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18503   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18504   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18505   # "foo.exe" is OK but "foo" is an error.
18506   #
18507   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18508   # It is also a way to make sure we got the proper file name for the real test later on.
18509   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18510   if test "x$test_shortpath" = x; then
18511     # Short path failed, file does not exist as specified.
18512     # Try adding .exe or .cmd
18513     if test -f "${new_path}.exe"; then
18514       input_to_shortpath="${new_path}.exe"
18515     elif test -f "${new_path}.cmd"; then
18516       input_to_shortpath="${new_path}.cmd"
18517     else
18518       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18519 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18520       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18521 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18522       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18523     fi
18524   else
18525     input_to_shortpath="$new_path"
18526   fi
18527 
18528   # Call helper function which possibly converts this using DOS-style short mode.
18529   # If so, the updated path is stored in $new_path.
18530   new_path="$input_to_shortpath"
18531 
18532   input_path="$input_to_shortpath"
18533   # Check if we need to convert this using DOS-style short mode. If the path
18534   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18535   # take no chances and rewrite it.
18536   # Note: m4 eats our [], so we need to use [ and ] instead.
18537   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18538   if test "x$has_forbidden_chars" != x; then
18539     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18540     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18541     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18542     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18543       # Going to short mode and back again did indeed matter. Since short mode is
18544       # case insensitive, let's make it lowercase to improve readability.
18545       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18546       # Now convert it back to Unix-style (cygpath)
18547       input_path=`$CYGPATH -u "$shortmode_path"`
18548       new_path="$input_path"
18549     fi
18550   fi
18551 
18552   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18553   if test "x$test_cygdrive_prefix" = x; then
18554     # As a simple fix, exclude /usr/bin since it's not a real path.
18555     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18556       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18557       # a path prefixed by /cygdrive for fixpath to work.
18558       new_path="$CYGWIN_ROOT_PATH$input_path"
18559     fi
18560   fi
18561 
18562   # remove trailing .exe if any
18563   new_path="${new_path/%.exe/}"
18564 
18565     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18566 
18567   # First separate the path from the arguments. This will split at the first
18568   # space.
18569   complete="$FOUND_MAKE"
18570   path="${complete%% *}"
18571   tmp="$complete EOL"
18572   arguments="${tmp#* }"
18573 
18574   # Input might be given as Windows format, start by converting to
18575   # unix format.
18576   new_path="$path"
18577 
18578   windows_path="$new_path"
18579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18580     unix_path=`$CYGPATH -u "$windows_path"`
18581     new_path="$unix_path"
18582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18584     new_path="$unix_path"
18585   fi
18586 
18587 
18588   # Now try to locate executable using which
18589   new_path=`$WHICH "$new_path" 2> /dev/null`
18590 
18591   if test "x$new_path" = x; then
18592     # Oops. Which didn't find the executable.
18593     # The splitting of arguments from the executable at a space might have been incorrect,
18594     # since paths with space are more likely in Windows. Give it another try with the whole
18595     # argument.
18596     path="$complete"
18597     arguments="EOL"
18598     new_path="$path"
18599 
18600   windows_path="$new_path"
18601   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18602     unix_path=`$CYGPATH -u "$windows_path"`
18603     new_path="$unix_path"
18604   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18605     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18606     new_path="$unix_path"
18607   fi
18608 
18609 
18610     new_path=`$WHICH "$new_path" 2> /dev/null`
18611     # bat and cmd files are not always considered executable in MSYS causing which
18612     # to not find them
18613     if test "x$new_path" = x \
18614         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18615         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18616       new_path="$path"
18617 
18618   windows_path="$new_path"
18619   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18620     unix_path=`$CYGPATH -u "$windows_path"`
18621     new_path="$unix_path"
18622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18623     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18624     new_path="$unix_path"
18625   fi
18626 
18627     fi
18628 
18629     if test "x$new_path" = x; then
18630       # It's still not found. Now this is an unrecoverable error.
18631       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18632 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18633       has_space=`$ECHO "$complete" | $GREP " "`
18634       if test "x$has_space" != x; then
18635         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18636 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18637       fi
18638       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18639     fi
18640   fi
18641 
18642   # Now new_path has a complete unix path to the binary
18643   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18644     # Keep paths in /bin as-is, but remove trailing .exe if any
18645     new_path="${new_path/%.exe/}"
18646     # Do not save /bin paths to all_fixpath_prefixes!
18647   else
18648     # Not in mixed or Windows style, start by that.
18649     new_path=`cmd //c echo $new_path`
18650 
18651   input_path="$new_path"
18652   # Check if we need to convert this using DOS-style short mode. If the path
18653   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18654   # take no chances and rewrite it.
18655   # Note: m4 eats our [], so we need to use [ and ] instead.
18656   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18657   if test "x$has_forbidden_chars" != x; then
18658     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18659     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18660   fi
18661 
18662     # Output is in $new_path
18663 
18664   windows_path="$new_path"
18665   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18666     unix_path=`$CYGPATH -u "$windows_path"`
18667     new_path="$unix_path"
18668   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18669     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18670     new_path="$unix_path"
18671   fi
18672 
18673     # remove trailing .exe if any
18674     new_path="${new_path/%.exe/}"
18675 
18676     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18677     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18678   fi
18679 
18680     else
18681       # We're on a unix platform. Hooray! :)
18682       # First separate the path from the arguments. This will split at the first
18683       # space.
18684       complete="$FOUND_MAKE"
18685       path="${complete%% *}"
18686       tmp="$complete EOL"
18687       arguments="${tmp#* }"
18688 
18689       # Cannot rely on the command "which" here since it doesn't always work.
18690       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18691       if test -z "$is_absolute_path"; then
18692         # Path to executable is not absolute. Find it.
18693         IFS_save="$IFS"
18694         IFS=:
18695         for p in $PATH; do
18696           if test -f "$p/$path" && test -x "$p/$path"; then
18697             new_path="$p/$path"
18698             break
18699           fi
18700         done
18701         IFS="$IFS_save"
18702       else
18703         # This is an absolute path, we can use it without further modifications.
18704         new_path="$path"
18705       fi
18706 
18707       if test "x$new_path" = x; then
18708         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18709 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18710         has_space=`$ECHO "$complete" | $GREP " "`
18711         if test "x$has_space" != x; then
18712           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18713 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18714         fi
18715         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18716       fi
18717     fi
18718 
18719     # Now join together the path and the arguments once again
18720     if test "x$arguments" != xEOL; then
18721       new_complete="$new_path ${arguments% *}"
18722     else
18723       new_complete="$new_path"
18724     fi
18725 
18726     if test "x$complete" != "x$new_complete"; then
18727       FOUND_MAKE="$new_complete"
18728       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18729 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18730     fi
18731   fi
18732 
18733         fi
18734       fi
18735     fi
18736   fi
18737 
18738         if test "x$FOUND_MAKE" = x; then
18739           for ac_prog in make
18740 do
18741   # Extract the first word of "$ac_prog", so it can be a program name with args.
18742 set dummy $ac_prog; ac_word=$2
18743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18744 $as_echo_n "checking for $ac_word... " >&6; }
18745 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18746   $as_echo_n "(cached) " >&6
18747 else
18748   case $CHECK_TOOLSDIR_MAKE in
18749   [\\/]* | ?:[\\/]*)
18750   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18751   ;;
18752   *)
18753   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18754 for as_dir in $PATH
18755 do
18756   IFS=$as_save_IFS
18757   test -z "$as_dir" && as_dir=.
18758     for ac_exec_ext in '' $ac_executable_extensions; do
18759   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18760     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18762     break 2
18763   fi
18764 done
18765   done
18766 IFS=$as_save_IFS
18767 
18768   ;;
18769 esac
18770 fi
18771 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18772 if test -n "$CHECK_TOOLSDIR_MAKE"; then
18773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18774 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18775 else
18776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18777 $as_echo "no" >&6; }
18778 fi
18779 
18780 
18781   test -n "$CHECK_TOOLSDIR_MAKE" && break
18782 done
18783 
18784 
18785   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18786   DESCRIPTION="make in tools-dir"
18787 
18788   # On Cygwin, we require a newer version of make than on other platforms
18789   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18790     MAKE_VERSION_EXPR="-e 4\."
18791     MAKE_REQUIRED_VERSION="4.0"
18792    else
18793     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18794     MAKE_REQUIRED_VERSION="3.81"
18795   fi
18796 
18797   if test "x$MAKE_CANDIDATE" != x; then
18798     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18799 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18800     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18801     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18802     if test "x$IS_GNU_MAKE" = x; then
18803       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18804 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18805     else
18806       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18807       if test "x$IS_MODERN_MAKE" = x; then
18808         { $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
18809 $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;}
18810       else
18811         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18812           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18813             MAKE_EXPECTED_ENV='cygwin'
18814           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18815             MAKE_EXPECTED_ENV='msys'
18816           else
18817             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18818           fi
18819           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18820           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18821         else
18822           # Not relevant for non-Windows
18823           IS_MAKE_CORRECT_ENV=true
18824         fi
18825         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18826           { $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
18827 $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;}
18828         else
18829           FOUND_MAKE=$MAKE_CANDIDATE
18830 
18831   # Only process if variable expands to non-empty
18832 
18833   if test "x$FOUND_MAKE" != x; then
18834     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18835 
18836   # First separate the path from the arguments. This will split at the first
18837   # space.
18838   complete="$FOUND_MAKE"
18839   path="${complete%% *}"
18840   tmp="$complete EOL"
18841   arguments="${tmp#* }"
18842 
18843   # Input might be given as Windows format, start by converting to
18844   # unix format.
18845   new_path=`$CYGPATH -u "$path"`
18846 
18847   # Now try to locate executable using which
18848   new_path=`$WHICH "$new_path" 2> /dev/null`
18849   # bat and cmd files are not always considered executable in cygwin causing which
18850   # to not find them
18851   if test "x$new_path" = x \
18852       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18853       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18854     new_path=`$CYGPATH -u "$path"`
18855   fi
18856   if test "x$new_path" = x; then
18857     # Oops. Which didn't find the executable.
18858     # The splitting of arguments from the executable at a space might have been incorrect,
18859     # since paths with space are more likely in Windows. Give it another try with the whole
18860     # argument.
18861     path="$complete"
18862     arguments="EOL"
18863     new_path=`$CYGPATH -u "$path"`
18864     new_path=`$WHICH "$new_path" 2> /dev/null`
18865     # bat and cmd files are not always considered executable in cygwin causing which
18866     # to not find them
18867     if test "x$new_path" = x \
18868         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18869         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18870       new_path=`$CYGPATH -u "$path"`
18871     fi
18872     if test "x$new_path" = x; then
18873       # It's still not found. Now this is an unrecoverable error.
18874       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18875 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18876       has_space=`$ECHO "$complete" | $GREP " "`
18877       if test "x$has_space" != x; then
18878         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18879 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18880       fi
18881       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18882     fi
18883   fi
18884 
18885   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18886   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18887   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18888   # "foo.exe" is OK but "foo" is an error.
18889   #
18890   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18891   # It is also a way to make sure we got the proper file name for the real test later on.
18892   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18893   if test "x$test_shortpath" = x; then
18894     # Short path failed, file does not exist as specified.
18895     # Try adding .exe or .cmd
18896     if test -f "${new_path}.exe"; then
18897       input_to_shortpath="${new_path}.exe"
18898     elif test -f "${new_path}.cmd"; then
18899       input_to_shortpath="${new_path}.cmd"
18900     else
18901       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18902 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18903       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18904 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18905       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18906     fi
18907   else
18908     input_to_shortpath="$new_path"
18909   fi
18910 
18911   # Call helper function which possibly converts this using DOS-style short mode.
18912   # If so, the updated path is stored in $new_path.
18913   new_path="$input_to_shortpath"
18914 
18915   input_path="$input_to_shortpath"
18916   # Check if we need to convert this using DOS-style short mode. If the path
18917   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18918   # take no chances and rewrite it.
18919   # Note: m4 eats our [], so we need to use [ and ] instead.
18920   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18921   if test "x$has_forbidden_chars" != x; then
18922     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18923     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18924     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18925     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18926       # Going to short mode and back again did indeed matter. Since short mode is
18927       # case insensitive, let's make it lowercase to improve readability.
18928       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18929       # Now convert it back to Unix-style (cygpath)
18930       input_path=`$CYGPATH -u "$shortmode_path"`
18931       new_path="$input_path"
18932     fi
18933   fi
18934 
18935   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18936   if test "x$test_cygdrive_prefix" = x; then
18937     # As a simple fix, exclude /usr/bin since it's not a real path.
18938     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18939       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18940       # a path prefixed by /cygdrive for fixpath to work.
18941       new_path="$CYGWIN_ROOT_PATH$input_path"
18942     fi
18943   fi
18944 
18945   # remove trailing .exe if any
18946   new_path="${new_path/%.exe/}"
18947 
18948     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18949 
18950   # First separate the path from the arguments. This will split at the first
18951   # space.
18952   complete="$FOUND_MAKE"
18953   path="${complete%% *}"
18954   tmp="$complete EOL"
18955   arguments="${tmp#* }"
18956 
18957   # Input might be given as Windows format, start by converting to
18958   # unix format.
18959   new_path="$path"
18960 
18961   windows_path="$new_path"
18962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18963     unix_path=`$CYGPATH -u "$windows_path"`
18964     new_path="$unix_path"
18965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18966     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18967     new_path="$unix_path"
18968   fi
18969 
18970 
18971   # Now try to locate executable using which
18972   new_path=`$WHICH "$new_path" 2> /dev/null`
18973 
18974   if test "x$new_path" = x; then
18975     # Oops. Which didn't find the executable.
18976     # The splitting of arguments from the executable at a space might have been incorrect,
18977     # since paths with space are more likely in Windows. Give it another try with the whole
18978     # argument.
18979     path="$complete"
18980     arguments="EOL"
18981     new_path="$path"
18982 
18983   windows_path="$new_path"
18984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18985     unix_path=`$CYGPATH -u "$windows_path"`
18986     new_path="$unix_path"
18987   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18988     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18989     new_path="$unix_path"
18990   fi
18991 
18992 
18993     new_path=`$WHICH "$new_path" 2> /dev/null`
18994     # bat and cmd files are not always considered executable in MSYS causing which
18995     # to not find them
18996     if test "x$new_path" = x \
18997         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18998         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18999       new_path="$path"
19000 
19001   windows_path="$new_path"
19002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19003     unix_path=`$CYGPATH -u "$windows_path"`
19004     new_path="$unix_path"
19005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19006     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19007     new_path="$unix_path"
19008   fi
19009 
19010     fi
19011 
19012     if test "x$new_path" = x; then
19013       # It's still not found. Now this is an unrecoverable error.
19014       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19015 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19016       has_space=`$ECHO "$complete" | $GREP " "`
19017       if test "x$has_space" != x; then
19018         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19019 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19020       fi
19021       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19022     fi
19023   fi
19024 
19025   # Now new_path has a complete unix path to the binary
19026   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19027     # Keep paths in /bin as-is, but remove trailing .exe if any
19028     new_path="${new_path/%.exe/}"
19029     # Do not save /bin paths to all_fixpath_prefixes!
19030   else
19031     # Not in mixed or Windows style, start by that.
19032     new_path=`cmd //c echo $new_path`
19033 
19034   input_path="$new_path"
19035   # Check if we need to convert this using DOS-style short mode. If the path
19036   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19037   # take no chances and rewrite it.
19038   # Note: m4 eats our [], so we need to use [ and ] instead.
19039   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19040   if test "x$has_forbidden_chars" != x; then
19041     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19042     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19043   fi
19044 
19045     # Output is in $new_path
19046 
19047   windows_path="$new_path"
19048   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19049     unix_path=`$CYGPATH -u "$windows_path"`
19050     new_path="$unix_path"
19051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19052     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19053     new_path="$unix_path"
19054   fi
19055 
19056     # remove trailing .exe if any
19057     new_path="${new_path/%.exe/}"
19058 
19059     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19060     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19061   fi
19062 
19063     else
19064       # We're on a unix platform. Hooray! :)
19065       # First separate the path from the arguments. This will split at the first
19066       # space.
19067       complete="$FOUND_MAKE"
19068       path="${complete%% *}"
19069       tmp="$complete EOL"
19070       arguments="${tmp#* }"
19071 
19072       # Cannot rely on the command "which" here since it doesn't always work.
19073       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19074       if test -z "$is_absolute_path"; then
19075         # Path to executable is not absolute. Find it.
19076         IFS_save="$IFS"
19077         IFS=:
19078         for p in $PATH; do
19079           if test -f "$p/$path" && test -x "$p/$path"; then
19080             new_path="$p/$path"
19081             break
19082           fi
19083         done
19084         IFS="$IFS_save"
19085       else
19086         # This is an absolute path, we can use it without further modifications.
19087         new_path="$path"
19088       fi
19089 
19090       if test "x$new_path" = x; then
19091         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19092 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19093         has_space=`$ECHO "$complete" | $GREP " "`
19094         if test "x$has_space" != x; then
19095           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19096 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19097         fi
19098         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19099       fi
19100     fi
19101 
19102     # Now join together the path and the arguments once again
19103     if test "x$arguments" != xEOL; then
19104       new_complete="$new_path ${arguments% *}"
19105     else
19106       new_complete="$new_path"
19107     fi
19108 
19109     if test "x$complete" != "x$new_complete"; then
19110       FOUND_MAKE="$new_complete"
19111       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19112 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19113     fi
19114   fi
19115 
19116         fi
19117       fi
19118     fi
19119   fi
19120 
19121         fi
19122         PATH=$OLD_PATH
19123       fi
19124     fi
19125 
19126     if test "x$FOUND_MAKE" = x; then
19127       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
19128     fi
19129 
19130   else
19131     # The variable is set, but is it from the command line or the environment?
19132 
19133     # Try to remove the string !MAKE! from our list.
19134     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19135     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19136       # If it failed, the variable was not from the command line. Ignore it,
19137       # but warn the user (except for BASH, which is always set by the calling BASH).
19138       if test "xMAKE" != xBASH; then
19139         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19140 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19141       fi
19142       # Try to locate tool using the code snippet
19143 
19144     # Try our hardest to locate a correct version of GNU make
19145     for ac_prog in gmake
19146 do
19147   # Extract the first word of "$ac_prog", so it can be a program name with args.
19148 set dummy $ac_prog; ac_word=$2
19149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19150 $as_echo_n "checking for $ac_word... " >&6; }
19151 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19152   $as_echo_n "(cached) " >&6
19153 else
19154   case $CHECK_GMAKE in
19155   [\\/]* | ?:[\\/]*)
19156   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19157   ;;
19158   *)
19159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19160 for as_dir in $PATH
19161 do
19162   IFS=$as_save_IFS
19163   test -z "$as_dir" && as_dir=.
19164     for ac_exec_ext in '' $ac_executable_extensions; do
19165   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19166     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19168     break 2
19169   fi
19170 done
19171   done
19172 IFS=$as_save_IFS
19173 
19174   ;;
19175 esac
19176 fi
19177 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19178 if test -n "$CHECK_GMAKE"; then
19179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19180 $as_echo "$CHECK_GMAKE" >&6; }
19181 else
19182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19183 $as_echo "no" >&6; }
19184 fi
19185 
19186 
19187   test -n "$CHECK_GMAKE" && break
19188 done
19189 
19190 
19191   MAKE_CANDIDATE=""$CHECK_GMAKE""
19192   DESCRIPTION="gmake in PATH"
19193 
19194   # On Cygwin, we require a newer version of make than on other platforms
19195   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19196     MAKE_VERSION_EXPR="-e 4\."
19197     MAKE_REQUIRED_VERSION="4.0"
19198    else
19199     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19200     MAKE_REQUIRED_VERSION="3.81"
19201   fi
19202 
19203   if test "x$MAKE_CANDIDATE" != x; then
19204     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19205 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19206     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19207     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19208     if test "x$IS_GNU_MAKE" = x; then
19209       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19210 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19211     else
19212       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19213       if test "x$IS_MODERN_MAKE" = x; then
19214         { $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
19215 $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;}
19216       else
19217         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19218           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19219             MAKE_EXPECTED_ENV='cygwin'
19220           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19221             MAKE_EXPECTED_ENV='msys'
19222           else
19223             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19224           fi
19225           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19226           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19227         else
19228           # Not relevant for non-Windows
19229           IS_MAKE_CORRECT_ENV=true
19230         fi
19231         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19232           { $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
19233 $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;}
19234         else
19235           FOUND_MAKE=$MAKE_CANDIDATE
19236 
19237   # Only process if variable expands to non-empty
19238 
19239   if test "x$FOUND_MAKE" != x; then
19240     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19241 
19242   # First separate the path from the arguments. This will split at the first
19243   # space.
19244   complete="$FOUND_MAKE"
19245   path="${complete%% *}"
19246   tmp="$complete EOL"
19247   arguments="${tmp#* }"
19248 
19249   # Input might be given as Windows format, start by converting to
19250   # unix format.
19251   new_path=`$CYGPATH -u "$path"`
19252 
19253   # Now try to locate executable using which
19254   new_path=`$WHICH "$new_path" 2> /dev/null`
19255   # bat and cmd files are not always considered executable in cygwin causing which
19256   # to not find them
19257   if test "x$new_path" = x \
19258       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19259       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19260     new_path=`$CYGPATH -u "$path"`
19261   fi
19262   if test "x$new_path" = x; then
19263     # Oops. Which didn't find the executable.
19264     # The splitting of arguments from the executable at a space might have been incorrect,
19265     # since paths with space are more likely in Windows. Give it another try with the whole
19266     # argument.
19267     path="$complete"
19268     arguments="EOL"
19269     new_path=`$CYGPATH -u "$path"`
19270     new_path=`$WHICH "$new_path" 2> /dev/null`
19271     # bat and cmd files are not always considered executable in cygwin causing which
19272     # to not find them
19273     if test "x$new_path" = x \
19274         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19275         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19276       new_path=`$CYGPATH -u "$path"`
19277     fi
19278     if test "x$new_path" = x; then
19279       # It's still not found. Now this is an unrecoverable error.
19280       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19281 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19282       has_space=`$ECHO "$complete" | $GREP " "`
19283       if test "x$has_space" != x; then
19284         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19285 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19286       fi
19287       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19288     fi
19289   fi
19290 
19291   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19292   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19293   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19294   # "foo.exe" is OK but "foo" is an error.
19295   #
19296   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19297   # It is also a way to make sure we got the proper file name for the real test later on.
19298   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19299   if test "x$test_shortpath" = x; then
19300     # Short path failed, file does not exist as specified.
19301     # Try adding .exe or .cmd
19302     if test -f "${new_path}.exe"; then
19303       input_to_shortpath="${new_path}.exe"
19304     elif test -f "${new_path}.cmd"; then
19305       input_to_shortpath="${new_path}.cmd"
19306     else
19307       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19308 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19309       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19310 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19311       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19312     fi
19313   else
19314     input_to_shortpath="$new_path"
19315   fi
19316 
19317   # Call helper function which possibly converts this using DOS-style short mode.
19318   # If so, the updated path is stored in $new_path.
19319   new_path="$input_to_shortpath"
19320 
19321   input_path="$input_to_shortpath"
19322   # Check if we need to convert this using DOS-style short mode. If the path
19323   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19324   # take no chances and rewrite it.
19325   # Note: m4 eats our [], so we need to use [ and ] instead.
19326   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19327   if test "x$has_forbidden_chars" != x; then
19328     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19329     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19330     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19331     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19332       # Going to short mode and back again did indeed matter. Since short mode is
19333       # case insensitive, let's make it lowercase to improve readability.
19334       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19335       # Now convert it back to Unix-style (cygpath)
19336       input_path=`$CYGPATH -u "$shortmode_path"`
19337       new_path="$input_path"
19338     fi
19339   fi
19340 
19341   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19342   if test "x$test_cygdrive_prefix" = x; then
19343     # As a simple fix, exclude /usr/bin since it's not a real path.
19344     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19345       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19346       # a path prefixed by /cygdrive for fixpath to work.
19347       new_path="$CYGWIN_ROOT_PATH$input_path"
19348     fi
19349   fi
19350 
19351   # remove trailing .exe if any
19352   new_path="${new_path/%.exe/}"
19353 
19354     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19355 
19356   # First separate the path from the arguments. This will split at the first
19357   # space.
19358   complete="$FOUND_MAKE"
19359   path="${complete%% *}"
19360   tmp="$complete EOL"
19361   arguments="${tmp#* }"
19362 
19363   # Input might be given as Windows format, start by converting to
19364   # unix format.
19365   new_path="$path"
19366 
19367   windows_path="$new_path"
19368   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19369     unix_path=`$CYGPATH -u "$windows_path"`
19370     new_path="$unix_path"
19371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19372     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19373     new_path="$unix_path"
19374   fi
19375 
19376 
19377   # Now try to locate executable using which
19378   new_path=`$WHICH "$new_path" 2> /dev/null`
19379 
19380   if test "x$new_path" = x; then
19381     # Oops. Which didn't find the executable.
19382     # The splitting of arguments from the executable at a space might have been incorrect,
19383     # since paths with space are more likely in Windows. Give it another try with the whole
19384     # argument.
19385     path="$complete"
19386     arguments="EOL"
19387     new_path="$path"
19388 
19389   windows_path="$new_path"
19390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19391     unix_path=`$CYGPATH -u "$windows_path"`
19392     new_path="$unix_path"
19393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19394     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19395     new_path="$unix_path"
19396   fi
19397 
19398 
19399     new_path=`$WHICH "$new_path" 2> /dev/null`
19400     # bat and cmd files are not always considered executable in MSYS causing which
19401     # to not find them
19402     if test "x$new_path" = x \
19403         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19404         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19405       new_path="$path"
19406 
19407   windows_path="$new_path"
19408   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19409     unix_path=`$CYGPATH -u "$windows_path"`
19410     new_path="$unix_path"
19411   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19412     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19413     new_path="$unix_path"
19414   fi
19415 
19416     fi
19417 
19418     if test "x$new_path" = x; then
19419       # It's still not found. Now this is an unrecoverable error.
19420       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19421 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19422       has_space=`$ECHO "$complete" | $GREP " "`
19423       if test "x$has_space" != x; then
19424         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19425 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19426       fi
19427       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19428     fi
19429   fi
19430 
19431   # Now new_path has a complete unix path to the binary
19432   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19433     # Keep paths in /bin as-is, but remove trailing .exe if any
19434     new_path="${new_path/%.exe/}"
19435     # Do not save /bin paths to all_fixpath_prefixes!
19436   else
19437     # Not in mixed or Windows style, start by that.
19438     new_path=`cmd //c echo $new_path`
19439 
19440   input_path="$new_path"
19441   # Check if we need to convert this using DOS-style short mode. If the path
19442   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19443   # take no chances and rewrite it.
19444   # Note: m4 eats our [], so we need to use [ and ] instead.
19445   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19446   if test "x$has_forbidden_chars" != x; then
19447     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19448     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19449   fi
19450 
19451     # Output is in $new_path
19452 
19453   windows_path="$new_path"
19454   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19455     unix_path=`$CYGPATH -u "$windows_path"`
19456     new_path="$unix_path"
19457   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19458     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19459     new_path="$unix_path"
19460   fi
19461 
19462     # remove trailing .exe if any
19463     new_path="${new_path/%.exe/}"
19464 
19465     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19466     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19467   fi
19468 
19469     else
19470       # We're on a unix platform. Hooray! :)
19471       # First separate the path from the arguments. This will split at the first
19472       # space.
19473       complete="$FOUND_MAKE"
19474       path="${complete%% *}"
19475       tmp="$complete EOL"
19476       arguments="${tmp#* }"
19477 
19478       # Cannot rely on the command "which" here since it doesn't always work.
19479       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19480       if test -z "$is_absolute_path"; then
19481         # Path to executable is not absolute. Find it.
19482         IFS_save="$IFS"
19483         IFS=:
19484         for p in $PATH; do
19485           if test -f "$p/$path" && test -x "$p/$path"; then
19486             new_path="$p/$path"
19487             break
19488           fi
19489         done
19490         IFS="$IFS_save"
19491       else
19492         # This is an absolute path, we can use it without further modifications.
19493         new_path="$path"
19494       fi
19495 
19496       if test "x$new_path" = x; then
19497         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19498 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19499         has_space=`$ECHO "$complete" | $GREP " "`
19500         if test "x$has_space" != x; then
19501           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19502 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19503         fi
19504         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19505       fi
19506     fi
19507 
19508     # Now join together the path and the arguments once again
19509     if test "x$arguments" != xEOL; then
19510       new_complete="$new_path ${arguments% *}"
19511     else
19512       new_complete="$new_path"
19513     fi
19514 
19515     if test "x$complete" != "x$new_complete"; then
19516       FOUND_MAKE="$new_complete"
19517       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19518 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19519     fi
19520   fi
19521 
19522         fi
19523       fi
19524     fi
19525   fi
19526 
19527 
19528     if test "x$FOUND_MAKE" = x; then
19529       for ac_prog in make
19530 do
19531   # Extract the first word of "$ac_prog", so it can be a program name with args.
19532 set dummy $ac_prog; ac_word=$2
19533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19534 $as_echo_n "checking for $ac_word... " >&6; }
19535 if ${ac_cv_path_CHECK_MAKE+:} false; then :
19536   $as_echo_n "(cached) " >&6
19537 else
19538   case $CHECK_MAKE in
19539   [\\/]* | ?:[\\/]*)
19540   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19541   ;;
19542   *)
19543   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19544 for as_dir in $PATH
19545 do
19546   IFS=$as_save_IFS
19547   test -z "$as_dir" && as_dir=.
19548     for ac_exec_ext in '' $ac_executable_extensions; do
19549   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19550     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19551     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19552     break 2
19553   fi
19554 done
19555   done
19556 IFS=$as_save_IFS
19557 
19558   ;;
19559 esac
19560 fi
19561 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19562 if test -n "$CHECK_MAKE"; then
19563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19564 $as_echo "$CHECK_MAKE" >&6; }
19565 else
19566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19567 $as_echo "no" >&6; }
19568 fi
19569 
19570 
19571   test -n "$CHECK_MAKE" && break
19572 done
19573 
19574 
19575   MAKE_CANDIDATE=""$CHECK_MAKE""
19576   DESCRIPTION="make in PATH"
19577 
19578   # On Cygwin, we require a newer version of make than on other platforms
19579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19580     MAKE_VERSION_EXPR="-e 4\."
19581     MAKE_REQUIRED_VERSION="4.0"
19582    else
19583     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19584     MAKE_REQUIRED_VERSION="3.81"
19585   fi
19586 
19587   if test "x$MAKE_CANDIDATE" != x; then
19588     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19589 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19590     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19591     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19592     if test "x$IS_GNU_MAKE" = x; then
19593       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19594 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19595     else
19596       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19597       if test "x$IS_MODERN_MAKE" = x; then
19598         { $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
19599 $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;}
19600       else
19601         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19602           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19603             MAKE_EXPECTED_ENV='cygwin'
19604           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19605             MAKE_EXPECTED_ENV='msys'
19606           else
19607             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19608           fi
19609           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19610           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19611         else
19612           # Not relevant for non-Windows
19613           IS_MAKE_CORRECT_ENV=true
19614         fi
19615         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19616           { $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
19617 $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;}
19618         else
19619           FOUND_MAKE=$MAKE_CANDIDATE
19620 
19621   # Only process if variable expands to non-empty
19622 
19623   if test "x$FOUND_MAKE" != x; then
19624     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19625 
19626   # First separate the path from the arguments. This will split at the first
19627   # space.
19628   complete="$FOUND_MAKE"
19629   path="${complete%% *}"
19630   tmp="$complete EOL"
19631   arguments="${tmp#* }"
19632 
19633   # Input might be given as Windows format, start by converting to
19634   # unix format.
19635   new_path=`$CYGPATH -u "$path"`
19636 
19637   # Now try to locate executable using which
19638   new_path=`$WHICH "$new_path" 2> /dev/null`
19639   # bat and cmd files are not always considered executable in cygwin causing which
19640   # to not find them
19641   if test "x$new_path" = x \
19642       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19643       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19644     new_path=`$CYGPATH -u "$path"`
19645   fi
19646   if test "x$new_path" = x; then
19647     # Oops. Which didn't find the executable.
19648     # The splitting of arguments from the executable at a space might have been incorrect,
19649     # since paths with space are more likely in Windows. Give it another try with the whole
19650     # argument.
19651     path="$complete"
19652     arguments="EOL"
19653     new_path=`$CYGPATH -u "$path"`
19654     new_path=`$WHICH "$new_path" 2> /dev/null`
19655     # bat and cmd files are not always considered executable in cygwin causing which
19656     # to not find them
19657     if test "x$new_path" = x \
19658         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19659         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19660       new_path=`$CYGPATH -u "$path"`
19661     fi
19662     if test "x$new_path" = x; then
19663       # It's still not found. Now this is an unrecoverable error.
19664       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19665 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19666       has_space=`$ECHO "$complete" | $GREP " "`
19667       if test "x$has_space" != x; then
19668         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19669 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19670       fi
19671       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19672     fi
19673   fi
19674 
19675   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19676   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19677   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19678   # "foo.exe" is OK but "foo" is an error.
19679   #
19680   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19681   # It is also a way to make sure we got the proper file name for the real test later on.
19682   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19683   if test "x$test_shortpath" = x; then
19684     # Short path failed, file does not exist as specified.
19685     # Try adding .exe or .cmd
19686     if test -f "${new_path}.exe"; then
19687       input_to_shortpath="${new_path}.exe"
19688     elif test -f "${new_path}.cmd"; then
19689       input_to_shortpath="${new_path}.cmd"
19690     else
19691       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19692 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19693       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19694 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19695       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19696     fi
19697   else
19698     input_to_shortpath="$new_path"
19699   fi
19700 
19701   # Call helper function which possibly converts this using DOS-style short mode.
19702   # If so, the updated path is stored in $new_path.
19703   new_path="$input_to_shortpath"
19704 
19705   input_path="$input_to_shortpath"
19706   # Check if we need to convert this using DOS-style short mode. If the path
19707   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19708   # take no chances and rewrite it.
19709   # Note: m4 eats our [], so we need to use [ and ] instead.
19710   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19711   if test "x$has_forbidden_chars" != x; then
19712     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19713     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19714     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19715     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19716       # Going to short mode and back again did indeed matter. Since short mode is
19717       # case insensitive, let's make it lowercase to improve readability.
19718       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19719       # Now convert it back to Unix-style (cygpath)
19720       input_path=`$CYGPATH -u "$shortmode_path"`
19721       new_path="$input_path"
19722     fi
19723   fi
19724 
19725   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19726   if test "x$test_cygdrive_prefix" = x; then
19727     # As a simple fix, exclude /usr/bin since it's not a real path.
19728     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19729       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19730       # a path prefixed by /cygdrive for fixpath to work.
19731       new_path="$CYGWIN_ROOT_PATH$input_path"
19732     fi
19733   fi
19734 
19735   # remove trailing .exe if any
19736   new_path="${new_path/%.exe/}"
19737 
19738     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19739 
19740   # First separate the path from the arguments. This will split at the first
19741   # space.
19742   complete="$FOUND_MAKE"
19743   path="${complete%% *}"
19744   tmp="$complete EOL"
19745   arguments="${tmp#* }"
19746 
19747   # Input might be given as Windows format, start by converting to
19748   # unix format.
19749   new_path="$path"
19750 
19751   windows_path="$new_path"
19752   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19753     unix_path=`$CYGPATH -u "$windows_path"`
19754     new_path="$unix_path"
19755   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19756     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19757     new_path="$unix_path"
19758   fi
19759 
19760 
19761   # Now try to locate executable using which
19762   new_path=`$WHICH "$new_path" 2> /dev/null`
19763 
19764   if test "x$new_path" = x; then
19765     # Oops. Which didn't find the executable.
19766     # The splitting of arguments from the executable at a space might have been incorrect,
19767     # since paths with space are more likely in Windows. Give it another try with the whole
19768     # argument.
19769     path="$complete"
19770     arguments="EOL"
19771     new_path="$path"
19772 
19773   windows_path="$new_path"
19774   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19775     unix_path=`$CYGPATH -u "$windows_path"`
19776     new_path="$unix_path"
19777   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19778     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19779     new_path="$unix_path"
19780   fi
19781 
19782 
19783     new_path=`$WHICH "$new_path" 2> /dev/null`
19784     # bat and cmd files are not always considered executable in MSYS causing which
19785     # to not find them
19786     if test "x$new_path" = x \
19787         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19788         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19789       new_path="$path"
19790 
19791   windows_path="$new_path"
19792   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19793     unix_path=`$CYGPATH -u "$windows_path"`
19794     new_path="$unix_path"
19795   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19796     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19797     new_path="$unix_path"
19798   fi
19799 
19800     fi
19801 
19802     if test "x$new_path" = x; then
19803       # It's still not found. Now this is an unrecoverable error.
19804       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19805 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19806       has_space=`$ECHO "$complete" | $GREP " "`
19807       if test "x$has_space" != x; then
19808         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19809 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19810       fi
19811       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19812     fi
19813   fi
19814 
19815   # Now new_path has a complete unix path to the binary
19816   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19817     # Keep paths in /bin as-is, but remove trailing .exe if any
19818     new_path="${new_path/%.exe/}"
19819     # Do not save /bin paths to all_fixpath_prefixes!
19820   else
19821     # Not in mixed or Windows style, start by that.
19822     new_path=`cmd //c echo $new_path`
19823 
19824   input_path="$new_path"
19825   # Check if we need to convert this using DOS-style short mode. If the path
19826   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19827   # take no chances and rewrite it.
19828   # Note: m4 eats our [], so we need to use [ and ] instead.
19829   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19830   if test "x$has_forbidden_chars" != x; then
19831     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19832     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19833   fi
19834 
19835     # Output is in $new_path
19836 
19837   windows_path="$new_path"
19838   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19839     unix_path=`$CYGPATH -u "$windows_path"`
19840     new_path="$unix_path"
19841   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19842     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19843     new_path="$unix_path"
19844   fi
19845 
19846     # remove trailing .exe if any
19847     new_path="${new_path/%.exe/}"
19848 
19849     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19850     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19851   fi
19852 
19853     else
19854       # We're on a unix platform. Hooray! :)
19855       # First separate the path from the arguments. This will split at the first
19856       # space.
19857       complete="$FOUND_MAKE"
19858       path="${complete%% *}"
19859       tmp="$complete EOL"
19860       arguments="${tmp#* }"
19861 
19862       # Cannot rely on the command "which" here since it doesn't always work.
19863       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19864       if test -z "$is_absolute_path"; then
19865         # Path to executable is not absolute. Find it.
19866         IFS_save="$IFS"
19867         IFS=:
19868         for p in $PATH; do
19869           if test -f "$p/$path" && test -x "$p/$path"; then
19870             new_path="$p/$path"
19871             break
19872           fi
19873         done
19874         IFS="$IFS_save"
19875       else
19876         # This is an absolute path, we can use it without further modifications.
19877         new_path="$path"
19878       fi
19879 
19880       if test "x$new_path" = x; then
19881         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19882 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19883         has_space=`$ECHO "$complete" | $GREP " "`
19884         if test "x$has_space" != x; then
19885           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19886 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19887         fi
19888         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19889       fi
19890     fi
19891 
19892     # Now join together the path and the arguments once again
19893     if test "x$arguments" != xEOL; then
19894       new_complete="$new_path ${arguments% *}"
19895     else
19896       new_complete="$new_path"
19897     fi
19898 
19899     if test "x$complete" != "x$new_complete"; then
19900       FOUND_MAKE="$new_complete"
19901       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19902 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19903     fi
19904   fi
19905 
19906         fi
19907       fi
19908     fi
19909   fi
19910 
19911     fi
19912 
19913     if test "x$FOUND_MAKE" = x; then
19914       if test "x$TOOLCHAIN_PATH" != x; then
19915         # We have a toolchain path, check that as well before giving up.
19916         OLD_PATH=$PATH
19917         PATH=$TOOLCHAIN_PATH:$PATH
19918         for ac_prog in gmake
19919 do
19920   # Extract the first word of "$ac_prog", so it can be a program name with args.
19921 set dummy $ac_prog; ac_word=$2
19922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19923 $as_echo_n "checking for $ac_word... " >&6; }
19924 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19925   $as_echo_n "(cached) " >&6
19926 else
19927   case $CHECK_TOOLSDIR_GMAKE in
19928   [\\/]* | ?:[\\/]*)
19929   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19930   ;;
19931   *)
19932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19933 for as_dir in $PATH
19934 do
19935   IFS=$as_save_IFS
19936   test -z "$as_dir" && as_dir=.
19937     for ac_exec_ext in '' $ac_executable_extensions; do
19938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19939     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19941     break 2
19942   fi
19943 done
19944   done
19945 IFS=$as_save_IFS
19946 
19947   ;;
19948 esac
19949 fi
19950 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19951 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19953 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19954 else
19955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19956 $as_echo "no" >&6; }
19957 fi
19958 
19959 
19960   test -n "$CHECK_TOOLSDIR_GMAKE" && break
19961 done
19962 
19963 
19964   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19965   DESCRIPTION="gmake in tools-dir"
19966 
19967   # On Cygwin, we require a newer version of make than on other platforms
19968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19969     MAKE_VERSION_EXPR="-e 4\."
19970     MAKE_REQUIRED_VERSION="4.0"
19971    else
19972     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19973     MAKE_REQUIRED_VERSION="3.81"
19974   fi
19975 
19976   if test "x$MAKE_CANDIDATE" != x; then
19977     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19978 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19979     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19980     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19981     if test "x$IS_GNU_MAKE" = x; then
19982       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19983 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19984     else
19985       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19986       if test "x$IS_MODERN_MAKE" = x; then
19987         { $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
19988 $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;}
19989       else
19990         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19991           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19992             MAKE_EXPECTED_ENV='cygwin'
19993           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19994             MAKE_EXPECTED_ENV='msys'
19995           else
19996             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19997           fi
19998           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19999           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20000         else
20001           # Not relevant for non-Windows
20002           IS_MAKE_CORRECT_ENV=true
20003         fi
20004         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20005           { $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
20006 $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;}
20007         else
20008           FOUND_MAKE=$MAKE_CANDIDATE
20009 
20010   # Only process if variable expands to non-empty
20011 
20012   if test "x$FOUND_MAKE" != x; then
20013     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20014 
20015   # First separate the path from the arguments. This will split at the first
20016   # space.
20017   complete="$FOUND_MAKE"
20018   path="${complete%% *}"
20019   tmp="$complete EOL"
20020   arguments="${tmp#* }"
20021 
20022   # Input might be given as Windows format, start by converting to
20023   # unix format.
20024   new_path=`$CYGPATH -u "$path"`
20025 
20026   # Now try to locate executable using which
20027   new_path=`$WHICH "$new_path" 2> /dev/null`
20028   # bat and cmd files are not always considered executable in cygwin causing which
20029   # to not find them
20030   if test "x$new_path" = x \
20031       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20032       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20033     new_path=`$CYGPATH -u "$path"`
20034   fi
20035   if test "x$new_path" = x; then
20036     # Oops. Which didn't find the executable.
20037     # The splitting of arguments from the executable at a space might have been incorrect,
20038     # since paths with space are more likely in Windows. Give it another try with the whole
20039     # argument.
20040     path="$complete"
20041     arguments="EOL"
20042     new_path=`$CYGPATH -u "$path"`
20043     new_path=`$WHICH "$new_path" 2> /dev/null`
20044     # bat and cmd files are not always considered executable in cygwin causing which
20045     # to not find them
20046     if test "x$new_path" = x \
20047         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20048         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20049       new_path=`$CYGPATH -u "$path"`
20050     fi
20051     if test "x$new_path" = x; then
20052       # It's still not found. Now this is an unrecoverable error.
20053       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20054 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20055       has_space=`$ECHO "$complete" | $GREP " "`
20056       if test "x$has_space" != x; then
20057         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20058 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20059       fi
20060       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20061     fi
20062   fi
20063 
20064   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20065   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20066   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20067   # "foo.exe" is OK but "foo" is an error.
20068   #
20069   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20070   # It is also a way to make sure we got the proper file name for the real test later on.
20071   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20072   if test "x$test_shortpath" = x; then
20073     # Short path failed, file does not exist as specified.
20074     # Try adding .exe or .cmd
20075     if test -f "${new_path}.exe"; then
20076       input_to_shortpath="${new_path}.exe"
20077     elif test -f "${new_path}.cmd"; then
20078       input_to_shortpath="${new_path}.cmd"
20079     else
20080       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20081 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20082       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20083 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20084       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20085     fi
20086   else
20087     input_to_shortpath="$new_path"
20088   fi
20089 
20090   # Call helper function which possibly converts this using DOS-style short mode.
20091   # If so, the updated path is stored in $new_path.
20092   new_path="$input_to_shortpath"
20093 
20094   input_path="$input_to_shortpath"
20095   # Check if we need to convert this using DOS-style short mode. If the path
20096   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20097   # take no chances and rewrite it.
20098   # Note: m4 eats our [], so we need to use [ and ] instead.
20099   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20100   if test "x$has_forbidden_chars" != x; then
20101     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20102     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20103     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20104     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20105       # Going to short mode and back again did indeed matter. Since short mode is
20106       # case insensitive, let's make it lowercase to improve readability.
20107       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20108       # Now convert it back to Unix-style (cygpath)
20109       input_path=`$CYGPATH -u "$shortmode_path"`
20110       new_path="$input_path"
20111     fi
20112   fi
20113 
20114   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20115   if test "x$test_cygdrive_prefix" = x; then
20116     # As a simple fix, exclude /usr/bin since it's not a real path.
20117     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20118       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20119       # a path prefixed by /cygdrive for fixpath to work.
20120       new_path="$CYGWIN_ROOT_PATH$input_path"
20121     fi
20122   fi
20123 
20124   # remove trailing .exe if any
20125   new_path="${new_path/%.exe/}"
20126 
20127     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20128 
20129   # First separate the path from the arguments. This will split at the first
20130   # space.
20131   complete="$FOUND_MAKE"
20132   path="${complete%% *}"
20133   tmp="$complete EOL"
20134   arguments="${tmp#* }"
20135 
20136   # Input might be given as Windows format, start by converting to
20137   # unix format.
20138   new_path="$path"
20139 
20140   windows_path="$new_path"
20141   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20142     unix_path=`$CYGPATH -u "$windows_path"`
20143     new_path="$unix_path"
20144   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20145     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20146     new_path="$unix_path"
20147   fi
20148 
20149 
20150   # Now try to locate executable using which
20151   new_path=`$WHICH "$new_path" 2> /dev/null`
20152 
20153   if test "x$new_path" = x; then
20154     # Oops. Which didn't find the executable.
20155     # The splitting of arguments from the executable at a space might have been incorrect,
20156     # since paths with space are more likely in Windows. Give it another try with the whole
20157     # argument.
20158     path="$complete"
20159     arguments="EOL"
20160     new_path="$path"
20161 
20162   windows_path="$new_path"
20163   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20164     unix_path=`$CYGPATH -u "$windows_path"`
20165     new_path="$unix_path"
20166   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20167     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20168     new_path="$unix_path"
20169   fi
20170 
20171 
20172     new_path=`$WHICH "$new_path" 2> /dev/null`
20173     # bat and cmd files are not always considered executable in MSYS causing which
20174     # to not find them
20175     if test "x$new_path" = x \
20176         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20177         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20178       new_path="$path"
20179 
20180   windows_path="$new_path"
20181   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20182     unix_path=`$CYGPATH -u "$windows_path"`
20183     new_path="$unix_path"
20184   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20185     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20186     new_path="$unix_path"
20187   fi
20188 
20189     fi
20190 
20191     if test "x$new_path" = x; then
20192       # It's still not found. Now this is an unrecoverable error.
20193       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20194 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20195       has_space=`$ECHO "$complete" | $GREP " "`
20196       if test "x$has_space" != x; then
20197         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20198 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20199       fi
20200       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20201     fi
20202   fi
20203 
20204   # Now new_path has a complete unix path to the binary
20205   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20206     # Keep paths in /bin as-is, but remove trailing .exe if any
20207     new_path="${new_path/%.exe/}"
20208     # Do not save /bin paths to all_fixpath_prefixes!
20209   else
20210     # Not in mixed or Windows style, start by that.
20211     new_path=`cmd //c echo $new_path`
20212 
20213   input_path="$new_path"
20214   # Check if we need to convert this using DOS-style short mode. If the path
20215   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20216   # take no chances and rewrite it.
20217   # Note: m4 eats our [], so we need to use [ and ] instead.
20218   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20219   if test "x$has_forbidden_chars" != x; then
20220     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20221     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20222   fi
20223 
20224     # Output is in $new_path
20225 
20226   windows_path="$new_path"
20227   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20228     unix_path=`$CYGPATH -u "$windows_path"`
20229     new_path="$unix_path"
20230   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20231     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20232     new_path="$unix_path"
20233   fi
20234 
20235     # remove trailing .exe if any
20236     new_path="${new_path/%.exe/}"
20237 
20238     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20239     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20240   fi
20241 
20242     else
20243       # We're on a unix platform. Hooray! :)
20244       # First separate the path from the arguments. This will split at the first
20245       # space.
20246       complete="$FOUND_MAKE"
20247       path="${complete%% *}"
20248       tmp="$complete EOL"
20249       arguments="${tmp#* }"
20250 
20251       # Cannot rely on the command "which" here since it doesn't always work.
20252       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20253       if test -z "$is_absolute_path"; then
20254         # Path to executable is not absolute. Find it.
20255         IFS_save="$IFS"
20256         IFS=:
20257         for p in $PATH; do
20258           if test -f "$p/$path" && test -x "$p/$path"; then
20259             new_path="$p/$path"
20260             break
20261           fi
20262         done
20263         IFS="$IFS_save"
20264       else
20265         # This is an absolute path, we can use it without further modifications.
20266         new_path="$path"
20267       fi
20268 
20269       if test "x$new_path" = x; then
20270         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20271 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20272         has_space=`$ECHO "$complete" | $GREP " "`
20273         if test "x$has_space" != x; then
20274           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20275 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20276         fi
20277         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20278       fi
20279     fi
20280 
20281     # Now join together the path and the arguments once again
20282     if test "x$arguments" != xEOL; then
20283       new_complete="$new_path ${arguments% *}"
20284     else
20285       new_complete="$new_path"
20286     fi
20287 
20288     if test "x$complete" != "x$new_complete"; then
20289       FOUND_MAKE="$new_complete"
20290       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20291 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20292     fi
20293   fi
20294 
20295         fi
20296       fi
20297     fi
20298   fi
20299 
20300         if test "x$FOUND_MAKE" = x; then
20301           for ac_prog in make
20302 do
20303   # Extract the first word of "$ac_prog", so it can be a program name with args.
20304 set dummy $ac_prog; ac_word=$2
20305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20306 $as_echo_n "checking for $ac_word... " >&6; }
20307 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20308   $as_echo_n "(cached) " >&6
20309 else
20310   case $CHECK_TOOLSDIR_MAKE in
20311   [\\/]* | ?:[\\/]*)
20312   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20313   ;;
20314   *)
20315   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20316 for as_dir in $PATH
20317 do
20318   IFS=$as_save_IFS
20319   test -z "$as_dir" && as_dir=.
20320     for ac_exec_ext in '' $ac_executable_extensions; do
20321   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20322     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20323     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20324     break 2
20325   fi
20326 done
20327   done
20328 IFS=$as_save_IFS
20329 
20330   ;;
20331 esac
20332 fi
20333 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20334 if test -n "$CHECK_TOOLSDIR_MAKE"; then
20335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20336 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20337 else
20338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20339 $as_echo "no" >&6; }
20340 fi
20341 
20342 
20343   test -n "$CHECK_TOOLSDIR_MAKE" && break
20344 done
20345 
20346 
20347   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20348   DESCRIPTION="make in tools-dir"
20349 
20350   # On Cygwin, we require a newer version of make than on other platforms
20351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20352     MAKE_VERSION_EXPR="-e 4\."
20353     MAKE_REQUIRED_VERSION="4.0"
20354    else
20355     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20356     MAKE_REQUIRED_VERSION="3.81"
20357   fi
20358 
20359   if test "x$MAKE_CANDIDATE" != x; then
20360     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20361 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20362     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20363     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20364     if test "x$IS_GNU_MAKE" = x; then
20365       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20366 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20367     else
20368       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20369       if test "x$IS_MODERN_MAKE" = x; then
20370         { $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
20371 $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;}
20372       else
20373         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20374           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20375             MAKE_EXPECTED_ENV='cygwin'
20376           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20377             MAKE_EXPECTED_ENV='msys'
20378           else
20379             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20380           fi
20381           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20382           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20383         else
20384           # Not relevant for non-Windows
20385           IS_MAKE_CORRECT_ENV=true
20386         fi
20387         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20388           { $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
20389 $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;}
20390         else
20391           FOUND_MAKE=$MAKE_CANDIDATE
20392 
20393   # Only process if variable expands to non-empty
20394 
20395   if test "x$FOUND_MAKE" != x; then
20396     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20397 
20398   # First separate the path from the arguments. This will split at the first
20399   # space.
20400   complete="$FOUND_MAKE"
20401   path="${complete%% *}"
20402   tmp="$complete EOL"
20403   arguments="${tmp#* }"
20404 
20405   # Input might be given as Windows format, start by converting to
20406   # unix format.
20407   new_path=`$CYGPATH -u "$path"`
20408 
20409   # Now try to locate executable using which
20410   new_path=`$WHICH "$new_path" 2> /dev/null`
20411   # bat and cmd files are not always considered executable in cygwin causing which
20412   # to not find them
20413   if test "x$new_path" = x \
20414       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20415       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20416     new_path=`$CYGPATH -u "$path"`
20417   fi
20418   if test "x$new_path" = x; then
20419     # Oops. Which didn't find the executable.
20420     # The splitting of arguments from the executable at a space might have been incorrect,
20421     # since paths with space are more likely in Windows. Give it another try with the whole
20422     # argument.
20423     path="$complete"
20424     arguments="EOL"
20425     new_path=`$CYGPATH -u "$path"`
20426     new_path=`$WHICH "$new_path" 2> /dev/null`
20427     # bat and cmd files are not always considered executable in cygwin causing which
20428     # to not find them
20429     if test "x$new_path" = x \
20430         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20431         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20432       new_path=`$CYGPATH -u "$path"`
20433     fi
20434     if test "x$new_path" = x; then
20435       # It's still not found. Now this is an unrecoverable error.
20436       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20437 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20438       has_space=`$ECHO "$complete" | $GREP " "`
20439       if test "x$has_space" != x; then
20440         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20441 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20442       fi
20443       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20444     fi
20445   fi
20446 
20447   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20448   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20449   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20450   # "foo.exe" is OK but "foo" is an error.
20451   #
20452   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20453   # It is also a way to make sure we got the proper file name for the real test later on.
20454   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20455   if test "x$test_shortpath" = x; then
20456     # Short path failed, file does not exist as specified.
20457     # Try adding .exe or .cmd
20458     if test -f "${new_path}.exe"; then
20459       input_to_shortpath="${new_path}.exe"
20460     elif test -f "${new_path}.cmd"; then
20461       input_to_shortpath="${new_path}.cmd"
20462     else
20463       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20464 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20465       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20466 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20467       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20468     fi
20469   else
20470     input_to_shortpath="$new_path"
20471   fi
20472 
20473   # Call helper function which possibly converts this using DOS-style short mode.
20474   # If so, the updated path is stored in $new_path.
20475   new_path="$input_to_shortpath"
20476 
20477   input_path="$input_to_shortpath"
20478   # Check if we need to convert this using DOS-style short mode. If the path
20479   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20480   # take no chances and rewrite it.
20481   # Note: m4 eats our [], so we need to use [ and ] instead.
20482   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20483   if test "x$has_forbidden_chars" != x; then
20484     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20485     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20486     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20487     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20488       # Going to short mode and back again did indeed matter. Since short mode is
20489       # case insensitive, let's make it lowercase to improve readability.
20490       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20491       # Now convert it back to Unix-style (cygpath)
20492       input_path=`$CYGPATH -u "$shortmode_path"`
20493       new_path="$input_path"
20494     fi
20495   fi
20496 
20497   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20498   if test "x$test_cygdrive_prefix" = x; then
20499     # As a simple fix, exclude /usr/bin since it's not a real path.
20500     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20501       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20502       # a path prefixed by /cygdrive for fixpath to work.
20503       new_path="$CYGWIN_ROOT_PATH$input_path"
20504     fi
20505   fi
20506 
20507   # remove trailing .exe if any
20508   new_path="${new_path/%.exe/}"
20509 
20510     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20511 
20512   # First separate the path from the arguments. This will split at the first
20513   # space.
20514   complete="$FOUND_MAKE"
20515   path="${complete%% *}"
20516   tmp="$complete EOL"
20517   arguments="${tmp#* }"
20518 
20519   # Input might be given as Windows format, start by converting to
20520   # unix format.
20521   new_path="$path"
20522 
20523   windows_path="$new_path"
20524   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20525     unix_path=`$CYGPATH -u "$windows_path"`
20526     new_path="$unix_path"
20527   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20528     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20529     new_path="$unix_path"
20530   fi
20531 
20532 
20533   # Now try to locate executable using which
20534   new_path=`$WHICH "$new_path" 2> /dev/null`
20535 
20536   if test "x$new_path" = x; then
20537     # Oops. Which didn't find the executable.
20538     # The splitting of arguments from the executable at a space might have been incorrect,
20539     # since paths with space are more likely in Windows. Give it another try with the whole
20540     # argument.
20541     path="$complete"
20542     arguments="EOL"
20543     new_path="$path"
20544 
20545   windows_path="$new_path"
20546   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20547     unix_path=`$CYGPATH -u "$windows_path"`
20548     new_path="$unix_path"
20549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20550     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20551     new_path="$unix_path"
20552   fi
20553 
20554 
20555     new_path=`$WHICH "$new_path" 2> /dev/null`
20556     # bat and cmd files are not always considered executable in MSYS causing which
20557     # to not find them
20558     if test "x$new_path" = x \
20559         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20560         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20561       new_path="$path"
20562 
20563   windows_path="$new_path"
20564   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20565     unix_path=`$CYGPATH -u "$windows_path"`
20566     new_path="$unix_path"
20567   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20568     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20569     new_path="$unix_path"
20570   fi
20571 
20572     fi
20573 
20574     if test "x$new_path" = x; then
20575       # It's still not found. Now this is an unrecoverable error.
20576       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20577 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20578       has_space=`$ECHO "$complete" | $GREP " "`
20579       if test "x$has_space" != x; then
20580         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20581 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20582       fi
20583       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20584     fi
20585   fi
20586 
20587   # Now new_path has a complete unix path to the binary
20588   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20589     # Keep paths in /bin as-is, but remove trailing .exe if any
20590     new_path="${new_path/%.exe/}"
20591     # Do not save /bin paths to all_fixpath_prefixes!
20592   else
20593     # Not in mixed or Windows style, start by that.
20594     new_path=`cmd //c echo $new_path`
20595 
20596   input_path="$new_path"
20597   # Check if we need to convert this using DOS-style short mode. If the path
20598   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20599   # take no chances and rewrite it.
20600   # Note: m4 eats our [], so we need to use [ and ] instead.
20601   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20602   if test "x$has_forbidden_chars" != x; then
20603     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20604     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20605   fi
20606 
20607     # Output is in $new_path
20608 
20609   windows_path="$new_path"
20610   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20611     unix_path=`$CYGPATH -u "$windows_path"`
20612     new_path="$unix_path"
20613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20614     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20615     new_path="$unix_path"
20616   fi
20617 
20618     # remove trailing .exe if any
20619     new_path="${new_path/%.exe/}"
20620 
20621     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20622     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20623   fi
20624 
20625     else
20626       # We're on a unix platform. Hooray! :)
20627       # First separate the path from the arguments. This will split at the first
20628       # space.
20629       complete="$FOUND_MAKE"
20630       path="${complete%% *}"
20631       tmp="$complete EOL"
20632       arguments="${tmp#* }"
20633 
20634       # Cannot rely on the command "which" here since it doesn't always work.
20635       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20636       if test -z "$is_absolute_path"; then
20637         # Path to executable is not absolute. Find it.
20638         IFS_save="$IFS"
20639         IFS=:
20640         for p in $PATH; do
20641           if test -f "$p/$path" && test -x "$p/$path"; then
20642             new_path="$p/$path"
20643             break
20644           fi
20645         done
20646         IFS="$IFS_save"
20647       else
20648         # This is an absolute path, we can use it without further modifications.
20649         new_path="$path"
20650       fi
20651 
20652       if test "x$new_path" = x; then
20653         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20654 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20655         has_space=`$ECHO "$complete" | $GREP " "`
20656         if test "x$has_space" != x; then
20657           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20658 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20659         fi
20660         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20661       fi
20662     fi
20663 
20664     # Now join together the path and the arguments once again
20665     if test "x$arguments" != xEOL; then
20666       new_complete="$new_path ${arguments% *}"
20667     else
20668       new_complete="$new_path"
20669     fi
20670 
20671     if test "x$complete" != "x$new_complete"; then
20672       FOUND_MAKE="$new_complete"
20673       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20674 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20675     fi
20676   fi
20677 
20678         fi
20679       fi
20680     fi
20681   fi
20682 
20683         fi
20684         PATH=$OLD_PATH
20685       fi
20686     fi
20687 
20688     if test "x$FOUND_MAKE" = x; then
20689       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
20690     fi
20691 
20692     else
20693       # If it succeeded, then it was overridden by the user. We will use it
20694       # for the tool.
20695 
20696       # First remove it from the list of overridden variables, so we can test
20697       # for unknown variables in the end.
20698       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20699 
20700       # Check if we try to supply an empty value
20701       if test "x$MAKE" = x; then
20702         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20703 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20704         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20705 $as_echo_n "checking for MAKE... " >&6; }
20706         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20707 $as_echo "disabled" >&6; }
20708       else
20709         # Check if the provided tool contains a complete path.
20710         tool_specified="$MAKE"
20711         tool_basename="${tool_specified##*/}"
20712         if test "x$tool_basename" = "x$tool_specified"; then
20713           # A command without a complete path is provided, search $PATH.
20714           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20715 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20716           # Extract the first word of "$tool_basename", so it can be a program name with args.
20717 set dummy $tool_basename; ac_word=$2
20718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20719 $as_echo_n "checking for $ac_word... " >&6; }
20720 if ${ac_cv_path_MAKE+:} false; then :
20721   $as_echo_n "(cached) " >&6
20722 else
20723   case $MAKE in
20724   [\\/]* | ?:[\\/]*)
20725   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20726   ;;
20727   *)
20728   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20729 for as_dir in $PATH
20730 do
20731   IFS=$as_save_IFS
20732   test -z "$as_dir" && as_dir=.
20733     for ac_exec_ext in '' $ac_executable_extensions; do
20734   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20735     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20736     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20737     break 2
20738   fi
20739 done
20740   done
20741 IFS=$as_save_IFS
20742 
20743   ;;
20744 esac
20745 fi
20746 MAKE=$ac_cv_path_MAKE
20747 if test -n "$MAKE"; then
20748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20749 $as_echo "$MAKE" >&6; }
20750 else
20751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20752 $as_echo "no" >&6; }
20753 fi
20754 
20755 
20756           if test "x$MAKE" = x; then
20757             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20758           fi
20759         else
20760           # Otherwise we believe it is a complete path. Use it as it is.
20761           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20762 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20763           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20764 $as_echo_n "checking for MAKE... " >&6; }
20765           if test ! -x "$tool_specified"; then
20766             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20767 $as_echo "not found" >&6; }
20768             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20769           fi
20770           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20771 $as_echo "$tool_specified" >&6; }
20772         fi
20773       fi
20774     fi
20775 
20776     # If MAKE was set by user, verify the version
20777 
20778   MAKE_CANDIDATE=""$MAKE""
20779   DESCRIPTION="user supplied MAKE=$MAKE"
20780 
20781   # On Cygwin, we require a newer version of make than on other platforms
20782   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20783     MAKE_VERSION_EXPR="-e 4\."
20784     MAKE_REQUIRED_VERSION="4.0"
20785    else
20786     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20787     MAKE_REQUIRED_VERSION="3.81"
20788   fi
20789 
20790   if test "x$MAKE_CANDIDATE" != x; then
20791     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20792 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20793     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20794     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20795     if test "x$IS_GNU_MAKE" = x; then
20796       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20797 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20798     else
20799       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20800       if test "x$IS_MODERN_MAKE" = x; then
20801         { $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
20802 $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;}
20803       else
20804         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20805           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20806             MAKE_EXPECTED_ENV='cygwin'
20807           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20808             MAKE_EXPECTED_ENV='msys'
20809           else
20810             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20811           fi
20812           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20813           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20814         else
20815           # Not relevant for non-Windows
20816           IS_MAKE_CORRECT_ENV=true
20817         fi
20818         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20819           { $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
20820 $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;}
20821         else
20822           FOUND_MAKE=$MAKE_CANDIDATE
20823 
20824   # Only process if variable expands to non-empty
20825 
20826   if test "x$FOUND_MAKE" != x; then
20827     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20828 
20829   # First separate the path from the arguments. This will split at the first
20830   # space.
20831   complete="$FOUND_MAKE"
20832   path="${complete%% *}"
20833   tmp="$complete EOL"
20834   arguments="${tmp#* }"
20835 
20836   # Input might be given as Windows format, start by converting to
20837   # unix format.
20838   new_path=`$CYGPATH -u "$path"`
20839 
20840   # Now try to locate executable using which
20841   new_path=`$WHICH "$new_path" 2> /dev/null`
20842   # bat and cmd files are not always considered executable in cygwin causing which
20843   # to not find them
20844   if test "x$new_path" = x \
20845       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20846       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20847     new_path=`$CYGPATH -u "$path"`
20848   fi
20849   if test "x$new_path" = x; then
20850     # Oops. Which didn't find the executable.
20851     # The splitting of arguments from the executable at a space might have been incorrect,
20852     # since paths with space are more likely in Windows. Give it another try with the whole
20853     # argument.
20854     path="$complete"
20855     arguments="EOL"
20856     new_path=`$CYGPATH -u "$path"`
20857     new_path=`$WHICH "$new_path" 2> /dev/null`
20858     # bat and cmd files are not always considered executable in cygwin causing which
20859     # to not find them
20860     if test "x$new_path" = x \
20861         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20862         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20863       new_path=`$CYGPATH -u "$path"`
20864     fi
20865     if test "x$new_path" = x; then
20866       # It's still not found. Now this is an unrecoverable error.
20867       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20868 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20869       has_space=`$ECHO "$complete" | $GREP " "`
20870       if test "x$has_space" != x; then
20871         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20872 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20873       fi
20874       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20875     fi
20876   fi
20877 
20878   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20879   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20880   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20881   # "foo.exe" is OK but "foo" is an error.
20882   #
20883   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20884   # It is also a way to make sure we got the proper file name for the real test later on.
20885   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20886   if test "x$test_shortpath" = x; then
20887     # Short path failed, file does not exist as specified.
20888     # Try adding .exe or .cmd
20889     if test -f "${new_path}.exe"; then
20890       input_to_shortpath="${new_path}.exe"
20891     elif test -f "${new_path}.cmd"; then
20892       input_to_shortpath="${new_path}.cmd"
20893     else
20894       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20895 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20896       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20897 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20898       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20899     fi
20900   else
20901     input_to_shortpath="$new_path"
20902   fi
20903 
20904   # Call helper function which possibly converts this using DOS-style short mode.
20905   # If so, the updated path is stored in $new_path.
20906   new_path="$input_to_shortpath"
20907 
20908   input_path="$input_to_shortpath"
20909   # Check if we need to convert this using DOS-style short mode. If the path
20910   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20911   # take no chances and rewrite it.
20912   # Note: m4 eats our [], so we need to use [ and ] instead.
20913   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20914   if test "x$has_forbidden_chars" != x; then
20915     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20916     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20917     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20918     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20919       # Going to short mode and back again did indeed matter. Since short mode is
20920       # case insensitive, let's make it lowercase to improve readability.
20921       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20922       # Now convert it back to Unix-style (cygpath)
20923       input_path=`$CYGPATH -u "$shortmode_path"`
20924       new_path="$input_path"
20925     fi
20926   fi
20927 
20928   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20929   if test "x$test_cygdrive_prefix" = x; then
20930     # As a simple fix, exclude /usr/bin since it's not a real path.
20931     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20932       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20933       # a path prefixed by /cygdrive for fixpath to work.
20934       new_path="$CYGWIN_ROOT_PATH$input_path"
20935     fi
20936   fi
20937 
20938   # remove trailing .exe if any
20939   new_path="${new_path/%.exe/}"
20940 
20941     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20942 
20943   # First separate the path from the arguments. This will split at the first
20944   # space.
20945   complete="$FOUND_MAKE"
20946   path="${complete%% *}"
20947   tmp="$complete EOL"
20948   arguments="${tmp#* }"
20949 
20950   # Input might be given as Windows format, start by converting to
20951   # unix format.
20952   new_path="$path"
20953 
20954   windows_path="$new_path"
20955   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20956     unix_path=`$CYGPATH -u "$windows_path"`
20957     new_path="$unix_path"
20958   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20959     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20960     new_path="$unix_path"
20961   fi
20962 
20963 
20964   # Now try to locate executable using which
20965   new_path=`$WHICH "$new_path" 2> /dev/null`
20966 
20967   if test "x$new_path" = x; then
20968     # Oops. Which didn't find the executable.
20969     # The splitting of arguments from the executable at a space might have been incorrect,
20970     # since paths with space are more likely in Windows. Give it another try with the whole
20971     # argument.
20972     path="$complete"
20973     arguments="EOL"
20974     new_path="$path"
20975 
20976   windows_path="$new_path"
20977   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20978     unix_path=`$CYGPATH -u "$windows_path"`
20979     new_path="$unix_path"
20980   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20981     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20982     new_path="$unix_path"
20983   fi
20984 
20985 
20986     new_path=`$WHICH "$new_path" 2> /dev/null`
20987     # bat and cmd files are not always considered executable in MSYS causing which
20988     # to not find them
20989     if test "x$new_path" = x \
20990         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20991         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20992       new_path="$path"
20993 
20994   windows_path="$new_path"
20995   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20996     unix_path=`$CYGPATH -u "$windows_path"`
20997     new_path="$unix_path"
20998   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20999     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21000     new_path="$unix_path"
21001   fi
21002 
21003     fi
21004 
21005     if test "x$new_path" = x; then
21006       # It's still not found. Now this is an unrecoverable error.
21007       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21008 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21009       has_space=`$ECHO "$complete" | $GREP " "`
21010       if test "x$has_space" != x; then
21011         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21012 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21013       fi
21014       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21015     fi
21016   fi
21017 
21018   # Now new_path has a complete unix path to the binary
21019   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21020     # Keep paths in /bin as-is, but remove trailing .exe if any
21021     new_path="${new_path/%.exe/}"
21022     # Do not save /bin paths to all_fixpath_prefixes!
21023   else
21024     # Not in mixed or Windows style, start by that.
21025     new_path=`cmd //c echo $new_path`
21026 
21027   input_path="$new_path"
21028   # Check if we need to convert this using DOS-style short mode. If the path
21029   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21030   # take no chances and rewrite it.
21031   # Note: m4 eats our [], so we need to use [ and ] instead.
21032   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21033   if test "x$has_forbidden_chars" != x; then
21034     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21035     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21036   fi
21037 
21038     # Output is in $new_path
21039 
21040   windows_path="$new_path"
21041   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21042     unix_path=`$CYGPATH -u "$windows_path"`
21043     new_path="$unix_path"
21044   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21045     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21046     new_path="$unix_path"
21047   fi
21048 
21049     # remove trailing .exe if any
21050     new_path="${new_path/%.exe/}"
21051 
21052     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21053     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21054   fi
21055 
21056     else
21057       # We're on a unix platform. Hooray! :)
21058       # First separate the path from the arguments. This will split at the first
21059       # space.
21060       complete="$FOUND_MAKE"
21061       path="${complete%% *}"
21062       tmp="$complete EOL"
21063       arguments="${tmp#* }"
21064 
21065       # Cannot rely on the command "which" here since it doesn't always work.
21066       is_absolute_path=`$ECHO "$path" | $GREP ^/`
21067       if test -z "$is_absolute_path"; then
21068         # Path to executable is not absolute. Find it.
21069         IFS_save="$IFS"
21070         IFS=:
21071         for p in $PATH; do
21072           if test -f "$p/$path" && test -x "$p/$path"; then
21073             new_path="$p/$path"
21074             break
21075           fi
21076         done
21077         IFS="$IFS_save"
21078       else
21079         # This is an absolute path, we can use it without further modifications.
21080         new_path="$path"
21081       fi
21082 
21083       if test "x$new_path" = x; then
21084         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21085 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21086         has_space=`$ECHO "$complete" | $GREP " "`
21087         if test "x$has_space" != x; then
21088           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21089 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21090         fi
21091         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21092       fi
21093     fi
21094 
21095     # Now join together the path and the arguments once again
21096     if test "x$arguments" != xEOL; then
21097       new_complete="$new_path ${arguments% *}"
21098     else
21099       new_complete="$new_path"
21100     fi
21101 
21102     if test "x$complete" != "x$new_complete"; then
21103       FOUND_MAKE="$new_complete"
21104       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21105 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21106     fi
21107   fi
21108 
21109         fi
21110       fi
21111     fi
21112   fi
21113 
21114     if test "x$FOUND_MAKE" = x; then
21115       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21116     fi
21117 
21118   fi
21119 
21120 
21121   MAKE=$FOUND_MAKE
21122 
21123   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21124 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21125 
21126 
21127   # Check if make supports the output sync option and if so, setup using it.
21128   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21129 $as_echo_n "checking if make --output-sync is supported... " >&6; }
21130   if $MAKE --version -O > /dev/null 2>&1; then
21131     OUTPUT_SYNC_SUPPORTED=true
21132     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21133 $as_echo "yes" >&6; }
21134     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21135 $as_echo_n "checking for output-sync value... " >&6; }
21136 
21137 # Check whether --with-output-sync was given.
21138 if test "${with_output_sync+set}" = set; then :
21139   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21140 fi
21141 
21142     if test "x$OUTPUT_SYNC" = "x"; then
21143       OUTPUT_SYNC=none
21144     fi
21145     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21146 $as_echo "$OUTPUT_SYNC" >&6; }
21147     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21148       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21149     fi
21150   else
21151     OUTPUT_SYNC_SUPPORTED=false
21152     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21153 $as_echo "no" >&6; }
21154   fi
21155 
21156 
21157 
21158 
21159 
21160 
21161   # Test if find supports -delete
21162   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21163 $as_echo_n "checking if find supports -delete... " >&6; }
21164   FIND_DELETE="-delete"
21165 
21166   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21167 
21168   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21169 
21170   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21171   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21172     # No, it does not.
21173     $RM $DELETEDIR/TestIfFindSupportsDelete
21174     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21175       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21176       FIND_DELETE="-print | $XARGS $RM"
21177     else
21178       FIND_DELETE="-exec $RM \{\} \+"
21179     fi
21180     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21181 $as_echo "no" >&6; }
21182   else
21183     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21184 $as_echo "yes" >&6; }
21185   fi
21186   $RMDIR $DELETEDIR
21187 
21188 
21189 
21190   # Test which kind of tar was found
21191   if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21192     TAR_TYPE="gnu"
21193   elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21194     TAR_TYPE="bsd"
21195   elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21196     TAR_TYPE="solaris"
21197   fi
21198   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21199 $as_echo_n "checking what type of tar was found... " >&6; }
21200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21201 $as_echo "$TAR_TYPE" >&6; }
21202 
21203   TAR_CREATE_FILE_PARAM=""
21204 
21205   if test "x$TAR_TYPE" = "xgnu"; then
21206     TAR_INCLUDE_PARAM="T"
21207     TAR_SUPPORTS_TRANSFORM="true"
21208     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21209       # When using gnu tar for Solaris targets, need to use compatibility mode
21210       TAR_CREATE_EXTRA_PARAM="--format=ustar"
21211     fi
21212   else
21213     TAR_INCLUDE_PARAM="I"
21214     TAR_SUPPORTS_TRANSFORM="false"
21215   fi
21216 
21217 
21218 
21219 
21220 
21221 
21222   # These tools might not be installed by default,
21223   # need hint on how to install them.
21224 
21225 
21226 
21227   # Publish this variable in the help.
21228 
21229 
21230   if [ -z "${UNZIP+x}" ]; then
21231     # The variable is not set by user, try to locate tool using the code snippet
21232     for ac_prog in unzip
21233 do
21234   # Extract the first word of "$ac_prog", so it can be a program name with args.
21235 set dummy $ac_prog; ac_word=$2
21236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21237 $as_echo_n "checking for $ac_word... " >&6; }
21238 if ${ac_cv_path_UNZIP+:} false; then :
21239   $as_echo_n "(cached) " >&6
21240 else
21241   case $UNZIP in
21242   [\\/]* | ?:[\\/]*)
21243   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21244   ;;
21245   *)
21246   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21247 for as_dir in $PATH
21248 do
21249   IFS=$as_save_IFS
21250   test -z "$as_dir" && as_dir=.
21251     for ac_exec_ext in '' $ac_executable_extensions; do
21252   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21253     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21255     break 2
21256   fi
21257 done
21258   done
21259 IFS=$as_save_IFS
21260 
21261   ;;
21262 esac
21263 fi
21264 UNZIP=$ac_cv_path_UNZIP
21265 if test -n "$UNZIP"; then
21266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21267 $as_echo "$UNZIP" >&6; }
21268 else
21269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21270 $as_echo "no" >&6; }
21271 fi
21272 
21273 
21274   test -n "$UNZIP" && break
21275 done
21276 
21277   else
21278     # The variable is set, but is it from the command line or the environment?
21279 
21280     # Try to remove the string !UNZIP! from our list.
21281     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21282     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21283       # If it failed, the variable was not from the command line. Ignore it,
21284       # but warn the user (except for BASH, which is always set by the calling BASH).
21285       if test "xUNZIP" != xBASH; then
21286         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21287 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21288       fi
21289       # Try to locate tool using the code snippet
21290       for ac_prog in unzip
21291 do
21292   # Extract the first word of "$ac_prog", so it can be a program name with args.
21293 set dummy $ac_prog; ac_word=$2
21294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21295 $as_echo_n "checking for $ac_word... " >&6; }
21296 if ${ac_cv_path_UNZIP+:} false; then :
21297   $as_echo_n "(cached) " >&6
21298 else
21299   case $UNZIP in
21300   [\\/]* | ?:[\\/]*)
21301   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21302   ;;
21303   *)
21304   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21305 for as_dir in $PATH
21306 do
21307   IFS=$as_save_IFS
21308   test -z "$as_dir" && as_dir=.
21309     for ac_exec_ext in '' $ac_executable_extensions; do
21310   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21311     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21312     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21313     break 2
21314   fi
21315 done
21316   done
21317 IFS=$as_save_IFS
21318 
21319   ;;
21320 esac
21321 fi
21322 UNZIP=$ac_cv_path_UNZIP
21323 if test -n "$UNZIP"; then
21324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21325 $as_echo "$UNZIP" >&6; }
21326 else
21327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21328 $as_echo "no" >&6; }
21329 fi
21330 
21331 
21332   test -n "$UNZIP" && break
21333 done
21334 
21335     else
21336       # If it succeeded, then it was overridden by the user. We will use it
21337       # for the tool.
21338 
21339       # First remove it from the list of overridden variables, so we can test
21340       # for unknown variables in the end.
21341       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21342 
21343       # Check if we try to supply an empty value
21344       if test "x$UNZIP" = x; then
21345         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21346 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21347         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21348 $as_echo_n "checking for UNZIP... " >&6; }
21349         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21350 $as_echo "disabled" >&6; }
21351       else
21352         # Check if the provided tool contains a complete path.
21353         tool_specified="$UNZIP"
21354         tool_basename="${tool_specified##*/}"
21355         if test "x$tool_basename" = "x$tool_specified"; then
21356           # A command without a complete path is provided, search $PATH.
21357           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21358 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21359           # Extract the first word of "$tool_basename", so it can be a program name with args.
21360 set dummy $tool_basename; ac_word=$2
21361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21362 $as_echo_n "checking for $ac_word... " >&6; }
21363 if ${ac_cv_path_UNZIP+:} false; then :
21364   $as_echo_n "(cached) " >&6
21365 else
21366   case $UNZIP in
21367   [\\/]* | ?:[\\/]*)
21368   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21369   ;;
21370   *)
21371   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21372 for as_dir in $PATH
21373 do
21374   IFS=$as_save_IFS
21375   test -z "$as_dir" && as_dir=.
21376     for ac_exec_ext in '' $ac_executable_extensions; do
21377   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21378     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21379     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21380     break 2
21381   fi
21382 done
21383   done
21384 IFS=$as_save_IFS
21385 
21386   ;;
21387 esac
21388 fi
21389 UNZIP=$ac_cv_path_UNZIP
21390 if test -n "$UNZIP"; then
21391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21392 $as_echo "$UNZIP" >&6; }
21393 else
21394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21395 $as_echo "no" >&6; }
21396 fi
21397 
21398 
21399           if test "x$UNZIP" = x; then
21400             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21401           fi
21402         else
21403           # Otherwise we believe it is a complete path. Use it as it is.
21404           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21405 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21406           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21407 $as_echo_n "checking for UNZIP... " >&6; }
21408           if test ! -x "$tool_specified"; then
21409             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21410 $as_echo "not found" >&6; }
21411             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21412           fi
21413           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21414 $as_echo "$tool_specified" >&6; }
21415         fi
21416       fi
21417     fi
21418 
21419   fi
21420 
21421 
21422 
21423   if test "x$UNZIP" = x; then
21424     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21425   fi
21426 
21427 
21428 
21429 
21430 
21431   # Publish this variable in the help.
21432 
21433 
21434   if [ -z "${ZIP+x}" ]; then
21435     # The variable is not set by user, try to locate tool using the code snippet
21436     for ac_prog in zip
21437 do
21438   # Extract the first word of "$ac_prog", so it can be a program name with args.
21439 set dummy $ac_prog; ac_word=$2
21440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21441 $as_echo_n "checking for $ac_word... " >&6; }
21442 if ${ac_cv_path_ZIP+:} false; then :
21443   $as_echo_n "(cached) " >&6
21444 else
21445   case $ZIP in
21446   [\\/]* | ?:[\\/]*)
21447   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21448   ;;
21449   *)
21450   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21451 for as_dir in $PATH
21452 do
21453   IFS=$as_save_IFS
21454   test -z "$as_dir" && as_dir=.
21455     for ac_exec_ext in '' $ac_executable_extensions; do
21456   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21457     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21459     break 2
21460   fi
21461 done
21462   done
21463 IFS=$as_save_IFS
21464 
21465   ;;
21466 esac
21467 fi
21468 ZIP=$ac_cv_path_ZIP
21469 if test -n "$ZIP"; then
21470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21471 $as_echo "$ZIP" >&6; }
21472 else
21473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21474 $as_echo "no" >&6; }
21475 fi
21476 
21477 
21478   test -n "$ZIP" && break
21479 done
21480 
21481   else
21482     # The variable is set, but is it from the command line or the environment?
21483 
21484     # Try to remove the string !ZIP! from our list.
21485     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21486     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21487       # If it failed, the variable was not from the command line. Ignore it,
21488       # but warn the user (except for BASH, which is always set by the calling BASH).
21489       if test "xZIP" != xBASH; then
21490         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21491 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21492       fi
21493       # Try to locate tool using the code snippet
21494       for ac_prog in zip
21495 do
21496   # Extract the first word of "$ac_prog", so it can be a program name with args.
21497 set dummy $ac_prog; ac_word=$2
21498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21499 $as_echo_n "checking for $ac_word... " >&6; }
21500 if ${ac_cv_path_ZIP+:} false; then :
21501   $as_echo_n "(cached) " >&6
21502 else
21503   case $ZIP in
21504   [\\/]* | ?:[\\/]*)
21505   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21506   ;;
21507   *)
21508   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21509 for as_dir in $PATH
21510 do
21511   IFS=$as_save_IFS
21512   test -z "$as_dir" && as_dir=.
21513     for ac_exec_ext in '' $ac_executable_extensions; do
21514   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21515     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21516     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21517     break 2
21518   fi
21519 done
21520   done
21521 IFS=$as_save_IFS
21522 
21523   ;;
21524 esac
21525 fi
21526 ZIP=$ac_cv_path_ZIP
21527 if test -n "$ZIP"; then
21528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21529 $as_echo "$ZIP" >&6; }
21530 else
21531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21532 $as_echo "no" >&6; }
21533 fi
21534 
21535 
21536   test -n "$ZIP" && break
21537 done
21538 
21539     else
21540       # If it succeeded, then it was overridden by the user. We will use it
21541       # for the tool.
21542 
21543       # First remove it from the list of overridden variables, so we can test
21544       # for unknown variables in the end.
21545       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21546 
21547       # Check if we try to supply an empty value
21548       if test "x$ZIP" = x; then
21549         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21550 $as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21551         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21552 $as_echo_n "checking for ZIP... " >&6; }
21553         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21554 $as_echo "disabled" >&6; }
21555       else
21556         # Check if the provided tool contains a complete path.
21557         tool_specified="$ZIP"
21558         tool_basename="${tool_specified##*/}"
21559         if test "x$tool_basename" = "x$tool_specified"; then
21560           # A command without a complete path is provided, search $PATH.
21561           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21562 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21563           # Extract the first word of "$tool_basename", so it can be a program name with args.
21564 set dummy $tool_basename; ac_word=$2
21565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21566 $as_echo_n "checking for $ac_word... " >&6; }
21567 if ${ac_cv_path_ZIP+:} false; then :
21568   $as_echo_n "(cached) " >&6
21569 else
21570   case $ZIP in
21571   [\\/]* | ?:[\\/]*)
21572   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21573   ;;
21574   *)
21575   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21576 for as_dir in $PATH
21577 do
21578   IFS=$as_save_IFS
21579   test -z "$as_dir" && as_dir=.
21580     for ac_exec_ext in '' $ac_executable_extensions; do
21581   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21582     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21583     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21584     break 2
21585   fi
21586 done
21587   done
21588 IFS=$as_save_IFS
21589 
21590   ;;
21591 esac
21592 fi
21593 ZIP=$ac_cv_path_ZIP
21594 if test -n "$ZIP"; then
21595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21596 $as_echo "$ZIP" >&6; }
21597 else
21598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21599 $as_echo "no" >&6; }
21600 fi
21601 
21602 
21603           if test "x$ZIP" = x; then
21604             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21605           fi
21606         else
21607           # Otherwise we believe it is a complete path. Use it as it is.
21608           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21609 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21610           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21611 $as_echo_n "checking for ZIP... " >&6; }
21612           if test ! -x "$tool_specified"; then
21613             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21614 $as_echo "not found" >&6; }
21615             as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21616           fi
21617           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21618 $as_echo "$tool_specified" >&6; }
21619         fi
21620       fi
21621     fi
21622 
21623   fi
21624 
21625 
21626 
21627   if test "x$ZIP" = x; then
21628     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21629   fi
21630 
21631 
21632 
21633   # Non-required basic tools
21634 
21635 
21636 
21637   # Publish this variable in the help.
21638 
21639 
21640   if [ -z "${LDD+x}" ]; then
21641     # The variable is not set by user, try to locate tool using the code snippet
21642     for ac_prog in ldd
21643 do
21644   # Extract the first word of "$ac_prog", so it can be a program name with args.
21645 set dummy $ac_prog; ac_word=$2
21646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21647 $as_echo_n "checking for $ac_word... " >&6; }
21648 if ${ac_cv_path_LDD+:} false; then :
21649   $as_echo_n "(cached) " >&6
21650 else
21651   case $LDD in
21652   [\\/]* | ?:[\\/]*)
21653   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21654   ;;
21655   *)
21656   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21657 for as_dir in $PATH
21658 do
21659   IFS=$as_save_IFS
21660   test -z "$as_dir" && as_dir=.
21661     for ac_exec_ext in '' $ac_executable_extensions; do
21662   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21663     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21664     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21665     break 2
21666   fi
21667 done
21668   done
21669 IFS=$as_save_IFS
21670 
21671   ;;
21672 esac
21673 fi
21674 LDD=$ac_cv_path_LDD
21675 if test -n "$LDD"; then
21676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21677 $as_echo "$LDD" >&6; }
21678 else
21679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21680 $as_echo "no" >&6; }
21681 fi
21682 
21683 
21684   test -n "$LDD" && break
21685 done
21686 
21687   else
21688     # The variable is set, but is it from the command line or the environment?
21689 
21690     # Try to remove the string !LDD! from our list.
21691     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21692     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21693       # If it failed, the variable was not from the command line. Ignore it,
21694       # but warn the user (except for BASH, which is always set by the calling BASH).
21695       if test "xLDD" != xBASH; then
21696         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21697 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21698       fi
21699       # Try to locate tool using the code snippet
21700       for ac_prog in ldd
21701 do
21702   # Extract the first word of "$ac_prog", so it can be a program name with args.
21703 set dummy $ac_prog; ac_word=$2
21704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21705 $as_echo_n "checking for $ac_word... " >&6; }
21706 if ${ac_cv_path_LDD+:} false; then :
21707   $as_echo_n "(cached) " >&6
21708 else
21709   case $LDD in
21710   [\\/]* | ?:[\\/]*)
21711   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21712   ;;
21713   *)
21714   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21715 for as_dir in $PATH
21716 do
21717   IFS=$as_save_IFS
21718   test -z "$as_dir" && as_dir=.
21719     for ac_exec_ext in '' $ac_executable_extensions; do
21720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21721     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21723     break 2
21724   fi
21725 done
21726   done
21727 IFS=$as_save_IFS
21728 
21729   ;;
21730 esac
21731 fi
21732 LDD=$ac_cv_path_LDD
21733 if test -n "$LDD"; then
21734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21735 $as_echo "$LDD" >&6; }
21736 else
21737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21738 $as_echo "no" >&6; }
21739 fi
21740 
21741 
21742   test -n "$LDD" && break
21743 done
21744 
21745     else
21746       # If it succeeded, then it was overridden by the user. We will use it
21747       # for the tool.
21748 
21749       # First remove it from the list of overridden variables, so we can test
21750       # for unknown variables in the end.
21751       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21752 
21753       # Check if we try to supply an empty value
21754       if test "x$LDD" = x; then
21755         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21756 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21757         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21758 $as_echo_n "checking for LDD... " >&6; }
21759         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21760 $as_echo "disabled" >&6; }
21761       else
21762         # Check if the provided tool contains a complete path.
21763         tool_specified="$LDD"
21764         tool_basename="${tool_specified##*/}"
21765         if test "x$tool_basename" = "x$tool_specified"; then
21766           # A command without a complete path is provided, search $PATH.
21767           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21768 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21769           # Extract the first word of "$tool_basename", so it can be a program name with args.
21770 set dummy $tool_basename; ac_word=$2
21771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21772 $as_echo_n "checking for $ac_word... " >&6; }
21773 if ${ac_cv_path_LDD+:} false; then :
21774   $as_echo_n "(cached) " >&6
21775 else
21776   case $LDD in
21777   [\\/]* | ?:[\\/]*)
21778   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21779   ;;
21780   *)
21781   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21782 for as_dir in $PATH
21783 do
21784   IFS=$as_save_IFS
21785   test -z "$as_dir" && as_dir=.
21786     for ac_exec_ext in '' $ac_executable_extensions; do
21787   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21788     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21789     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21790     break 2
21791   fi
21792 done
21793   done
21794 IFS=$as_save_IFS
21795 
21796   ;;
21797 esac
21798 fi
21799 LDD=$ac_cv_path_LDD
21800 if test -n "$LDD"; then
21801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21802 $as_echo "$LDD" >&6; }
21803 else
21804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21805 $as_echo "no" >&6; }
21806 fi
21807 
21808 
21809           if test "x$LDD" = x; then
21810             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21811           fi
21812         else
21813           # Otherwise we believe it is a complete path. Use it as it is.
21814           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21815 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21816           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21817 $as_echo_n "checking for LDD... " >&6; }
21818           if test ! -x "$tool_specified"; then
21819             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21820 $as_echo "not found" >&6; }
21821             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21822           fi
21823           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21824 $as_echo "$tool_specified" >&6; }
21825         fi
21826       fi
21827     fi
21828 
21829   fi
21830 
21831 
21832   if test "x$LDD" = "x"; then
21833     # List shared lib dependencies is used for
21834     # debug output and checking for forbidden dependencies.
21835     # We can build without it.
21836     LDD="true"
21837   fi
21838 
21839 
21840   # Publish this variable in the help.
21841 
21842 
21843   if [ -z "${OTOOL+x}" ]; then
21844     # The variable is not set by user, try to locate tool using the code snippet
21845     for ac_prog in otool
21846 do
21847   # Extract the first word of "$ac_prog", so it can be a program name with args.
21848 set dummy $ac_prog; ac_word=$2
21849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21850 $as_echo_n "checking for $ac_word... " >&6; }
21851 if ${ac_cv_path_OTOOL+:} false; then :
21852   $as_echo_n "(cached) " >&6
21853 else
21854   case $OTOOL in
21855   [\\/]* | ?:[\\/]*)
21856   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21857   ;;
21858   *)
21859   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21860 for as_dir in $PATH
21861 do
21862   IFS=$as_save_IFS
21863   test -z "$as_dir" && as_dir=.
21864     for ac_exec_ext in '' $ac_executable_extensions; do
21865   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21866     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21867     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21868     break 2
21869   fi
21870 done
21871   done
21872 IFS=$as_save_IFS
21873 
21874   ;;
21875 esac
21876 fi
21877 OTOOL=$ac_cv_path_OTOOL
21878 if test -n "$OTOOL"; then
21879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21880 $as_echo "$OTOOL" >&6; }
21881 else
21882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21883 $as_echo "no" >&6; }
21884 fi
21885 
21886 
21887   test -n "$OTOOL" && break
21888 done
21889 
21890   else
21891     # The variable is set, but is it from the command line or the environment?
21892 
21893     # Try to remove the string !OTOOL! from our list.
21894     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21895     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21896       # If it failed, the variable was not from the command line. Ignore it,
21897       # but warn the user (except for BASH, which is always set by the calling BASH).
21898       if test "xOTOOL" != xBASH; then
21899         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21900 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21901       fi
21902       # Try to locate tool using the code snippet
21903       for ac_prog in otool
21904 do
21905   # Extract the first word of "$ac_prog", so it can be a program name with args.
21906 set dummy $ac_prog; ac_word=$2
21907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21908 $as_echo_n "checking for $ac_word... " >&6; }
21909 if ${ac_cv_path_OTOOL+:} false; then :
21910   $as_echo_n "(cached) " >&6
21911 else
21912   case $OTOOL in
21913   [\\/]* | ?:[\\/]*)
21914   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21915   ;;
21916   *)
21917   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21918 for as_dir in $PATH
21919 do
21920   IFS=$as_save_IFS
21921   test -z "$as_dir" && as_dir=.
21922     for ac_exec_ext in '' $ac_executable_extensions; do
21923   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21924     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21925     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21926     break 2
21927   fi
21928 done
21929   done
21930 IFS=$as_save_IFS
21931 
21932   ;;
21933 esac
21934 fi
21935 OTOOL=$ac_cv_path_OTOOL
21936 if test -n "$OTOOL"; then
21937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21938 $as_echo "$OTOOL" >&6; }
21939 else
21940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21941 $as_echo "no" >&6; }
21942 fi
21943 
21944 
21945   test -n "$OTOOL" && break
21946 done
21947 
21948     else
21949       # If it succeeded, then it was overridden by the user. We will use it
21950       # for the tool.
21951 
21952       # First remove it from the list of overridden variables, so we can test
21953       # for unknown variables in the end.
21954       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21955 
21956       # Check if we try to supply an empty value
21957       if test "x$OTOOL" = x; then
21958         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21959 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21960         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21961 $as_echo_n "checking for OTOOL... " >&6; }
21962         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21963 $as_echo "disabled" >&6; }
21964       else
21965         # Check if the provided tool contains a complete path.
21966         tool_specified="$OTOOL"
21967         tool_basename="${tool_specified##*/}"
21968         if test "x$tool_basename" = "x$tool_specified"; then
21969           # A command without a complete path is provided, search $PATH.
21970           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21971 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21972           # Extract the first word of "$tool_basename", so it can be a program name with args.
21973 set dummy $tool_basename; ac_word=$2
21974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21975 $as_echo_n "checking for $ac_word... " >&6; }
21976 if ${ac_cv_path_OTOOL+:} false; then :
21977   $as_echo_n "(cached) " >&6
21978 else
21979   case $OTOOL in
21980   [\\/]* | ?:[\\/]*)
21981   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21982   ;;
21983   *)
21984   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21985 for as_dir in $PATH
21986 do
21987   IFS=$as_save_IFS
21988   test -z "$as_dir" && as_dir=.
21989     for ac_exec_ext in '' $ac_executable_extensions; do
21990   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21991     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21992     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21993     break 2
21994   fi
21995 done
21996   done
21997 IFS=$as_save_IFS
21998 
21999   ;;
22000 esac
22001 fi
22002 OTOOL=$ac_cv_path_OTOOL
22003 if test -n "$OTOOL"; then
22004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22005 $as_echo "$OTOOL" >&6; }
22006 else
22007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22008 $as_echo "no" >&6; }
22009 fi
22010 
22011 
22012           if test "x$OTOOL" = x; then
22013             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22014           fi
22015         else
22016           # Otherwise we believe it is a complete path. Use it as it is.
22017           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22018 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22019           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22020 $as_echo_n "checking for OTOOL... " >&6; }
22021           if test ! -x "$tool_specified"; then
22022             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22023 $as_echo "not found" >&6; }
22024             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22025           fi
22026           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22027 $as_echo "$tool_specified" >&6; }
22028         fi
22029       fi
22030     fi
22031 
22032   fi
22033 
22034 
22035   if test "x$OTOOL" = "x"; then
22036     OTOOL="true"
22037   fi
22038 
22039 
22040   # Publish this variable in the help.
22041 
22042 
22043   if [ -z "${READELF+x}" ]; then
22044     # The variable is not set by user, try to locate tool using the code snippet
22045     for ac_prog in greadelf readelf
22046 do
22047   # Extract the first word of "$ac_prog", so it can be a program name with args.
22048 set dummy $ac_prog; ac_word=$2
22049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22050 $as_echo_n "checking for $ac_word... " >&6; }
22051 if ${ac_cv_path_READELF+:} false; then :
22052   $as_echo_n "(cached) " >&6
22053 else
22054   case $READELF in
22055   [\\/]* | ?:[\\/]*)
22056   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22057   ;;
22058   *)
22059   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22060 for as_dir in $PATH
22061 do
22062   IFS=$as_save_IFS
22063   test -z "$as_dir" && as_dir=.
22064     for ac_exec_ext in '' $ac_executable_extensions; do
22065   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22066     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22067     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22068     break 2
22069   fi
22070 done
22071   done
22072 IFS=$as_save_IFS
22073 
22074   ;;
22075 esac
22076 fi
22077 READELF=$ac_cv_path_READELF
22078 if test -n "$READELF"; then
22079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22080 $as_echo "$READELF" >&6; }
22081 else
22082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22083 $as_echo "no" >&6; }
22084 fi
22085 
22086 
22087   test -n "$READELF" && break
22088 done
22089 
22090   else
22091     # The variable is set, but is it from the command line or the environment?
22092 
22093     # Try to remove the string !READELF! from our list.
22094     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22095     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22096       # If it failed, the variable was not from the command line. Ignore it,
22097       # but warn the user (except for BASH, which is always set by the calling BASH).
22098       if test "xREADELF" != xBASH; then
22099         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22100 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22101       fi
22102       # Try to locate tool using the code snippet
22103       for ac_prog in greadelf readelf
22104 do
22105   # Extract the first word of "$ac_prog", so it can be a program name with args.
22106 set dummy $ac_prog; ac_word=$2
22107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22108 $as_echo_n "checking for $ac_word... " >&6; }
22109 if ${ac_cv_path_READELF+:} false; then :
22110   $as_echo_n "(cached) " >&6
22111 else
22112   case $READELF in
22113   [\\/]* | ?:[\\/]*)
22114   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22115   ;;
22116   *)
22117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22118 for as_dir in $PATH
22119 do
22120   IFS=$as_save_IFS
22121   test -z "$as_dir" && as_dir=.
22122     for ac_exec_ext in '' $ac_executable_extensions; do
22123   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22124     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22126     break 2
22127   fi
22128 done
22129   done
22130 IFS=$as_save_IFS
22131 
22132   ;;
22133 esac
22134 fi
22135 READELF=$ac_cv_path_READELF
22136 if test -n "$READELF"; then
22137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22138 $as_echo "$READELF" >&6; }
22139 else
22140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22141 $as_echo "no" >&6; }
22142 fi
22143 
22144 
22145   test -n "$READELF" && break
22146 done
22147 
22148     else
22149       # If it succeeded, then it was overridden by the user. We will use it
22150       # for the tool.
22151 
22152       # First remove it from the list of overridden variables, so we can test
22153       # for unknown variables in the end.
22154       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22155 
22156       # Check if we try to supply an empty value
22157       if test "x$READELF" = x; then
22158         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22159 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22160         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22161 $as_echo_n "checking for READELF... " >&6; }
22162         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22163 $as_echo "disabled" >&6; }
22164       else
22165         # Check if the provided tool contains a complete path.
22166         tool_specified="$READELF"
22167         tool_basename="${tool_specified##*/}"
22168         if test "x$tool_basename" = "x$tool_specified"; then
22169           # A command without a complete path is provided, search $PATH.
22170           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22171 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22172           # Extract the first word of "$tool_basename", so it can be a program name with args.
22173 set dummy $tool_basename; ac_word=$2
22174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22175 $as_echo_n "checking for $ac_word... " >&6; }
22176 if ${ac_cv_path_READELF+:} false; then :
22177   $as_echo_n "(cached) " >&6
22178 else
22179   case $READELF in
22180   [\\/]* | ?:[\\/]*)
22181   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22182   ;;
22183   *)
22184   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22185 for as_dir in $PATH
22186 do
22187   IFS=$as_save_IFS
22188   test -z "$as_dir" && as_dir=.
22189     for ac_exec_ext in '' $ac_executable_extensions; do
22190   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22191     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22192     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22193     break 2
22194   fi
22195 done
22196   done
22197 IFS=$as_save_IFS
22198 
22199   ;;
22200 esac
22201 fi
22202 READELF=$ac_cv_path_READELF
22203 if test -n "$READELF"; then
22204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22205 $as_echo "$READELF" >&6; }
22206 else
22207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22208 $as_echo "no" >&6; }
22209 fi
22210 
22211 
22212           if test "x$READELF" = x; then
22213             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22214           fi
22215         else
22216           # Otherwise we believe it is a complete path. Use it as it is.
22217           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22218 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22219           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22220 $as_echo_n "checking for READELF... " >&6; }
22221           if test ! -x "$tool_specified"; then
22222             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22223 $as_echo "not found" >&6; }
22224             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22225           fi
22226           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22227 $as_echo "$tool_specified" >&6; }
22228         fi
22229       fi
22230     fi
22231 
22232   fi
22233 
22234 
22235 
22236 
22237   # Publish this variable in the help.
22238 
22239 
22240   if [ -z "${HG+x}" ]; then
22241     # The variable is not set by user, try to locate tool using the code snippet
22242     for ac_prog in hg
22243 do
22244   # Extract the first word of "$ac_prog", so it can be a program name with args.
22245 set dummy $ac_prog; ac_word=$2
22246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22247 $as_echo_n "checking for $ac_word... " >&6; }
22248 if ${ac_cv_path_HG+:} false; then :
22249   $as_echo_n "(cached) " >&6
22250 else
22251   case $HG in
22252   [\\/]* | ?:[\\/]*)
22253   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22254   ;;
22255   *)
22256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22257 for as_dir in $PATH
22258 do
22259   IFS=$as_save_IFS
22260   test -z "$as_dir" && as_dir=.
22261     for ac_exec_ext in '' $ac_executable_extensions; do
22262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22263     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22265     break 2
22266   fi
22267 done
22268   done
22269 IFS=$as_save_IFS
22270 
22271   ;;
22272 esac
22273 fi
22274 HG=$ac_cv_path_HG
22275 if test -n "$HG"; then
22276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22277 $as_echo "$HG" >&6; }
22278 else
22279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22280 $as_echo "no" >&6; }
22281 fi
22282 
22283 
22284   test -n "$HG" && break
22285 done
22286 
22287   else
22288     # The variable is set, but is it from the command line or the environment?
22289 
22290     # Try to remove the string !HG! from our list.
22291     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22292     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22293       # If it failed, the variable was not from the command line. Ignore it,
22294       # but warn the user (except for BASH, which is always set by the calling BASH).
22295       if test "xHG" != xBASH; then
22296         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22297 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22298       fi
22299       # Try to locate tool using the code snippet
22300       for ac_prog in hg
22301 do
22302   # Extract the first word of "$ac_prog", so it can be a program name with args.
22303 set dummy $ac_prog; ac_word=$2
22304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22305 $as_echo_n "checking for $ac_word... " >&6; }
22306 if ${ac_cv_path_HG+:} false; then :
22307   $as_echo_n "(cached) " >&6
22308 else
22309   case $HG in
22310   [\\/]* | ?:[\\/]*)
22311   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22312   ;;
22313   *)
22314   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22315 for as_dir in $PATH
22316 do
22317   IFS=$as_save_IFS
22318   test -z "$as_dir" && as_dir=.
22319     for ac_exec_ext in '' $ac_executable_extensions; do
22320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22321     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22323     break 2
22324   fi
22325 done
22326   done
22327 IFS=$as_save_IFS
22328 
22329   ;;
22330 esac
22331 fi
22332 HG=$ac_cv_path_HG
22333 if test -n "$HG"; then
22334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22335 $as_echo "$HG" >&6; }
22336 else
22337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22338 $as_echo "no" >&6; }
22339 fi
22340 
22341 
22342   test -n "$HG" && break
22343 done
22344 
22345     else
22346       # If it succeeded, then it was overridden by the user. We will use it
22347       # for the tool.
22348 
22349       # First remove it from the list of overridden variables, so we can test
22350       # for unknown variables in the end.
22351       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22352 
22353       # Check if we try to supply an empty value
22354       if test "x$HG" = x; then
22355         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22356 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22357         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22358 $as_echo_n "checking for HG... " >&6; }
22359         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22360 $as_echo "disabled" >&6; }
22361       else
22362         # Check if the provided tool contains a complete path.
22363         tool_specified="$HG"
22364         tool_basename="${tool_specified##*/}"
22365         if test "x$tool_basename" = "x$tool_specified"; then
22366           # A command without a complete path is provided, search $PATH.
22367           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22368 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22369           # Extract the first word of "$tool_basename", so it can be a program name with args.
22370 set dummy $tool_basename; ac_word=$2
22371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22372 $as_echo_n "checking for $ac_word... " >&6; }
22373 if ${ac_cv_path_HG+:} false; then :
22374   $as_echo_n "(cached) " >&6
22375 else
22376   case $HG in
22377   [\\/]* | ?:[\\/]*)
22378   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22379   ;;
22380   *)
22381   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22382 for as_dir in $PATH
22383 do
22384   IFS=$as_save_IFS
22385   test -z "$as_dir" && as_dir=.
22386     for ac_exec_ext in '' $ac_executable_extensions; do
22387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22388     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22390     break 2
22391   fi
22392 done
22393   done
22394 IFS=$as_save_IFS
22395 
22396   ;;
22397 esac
22398 fi
22399 HG=$ac_cv_path_HG
22400 if test -n "$HG"; then
22401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22402 $as_echo "$HG" >&6; }
22403 else
22404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22405 $as_echo "no" >&6; }
22406 fi
22407 
22408 
22409           if test "x$HG" = x; then
22410             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22411           fi
22412         else
22413           # Otherwise we believe it is a complete path. Use it as it is.
22414           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22415 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22416           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22417 $as_echo_n "checking for HG... " >&6; }
22418           if test ! -x "$tool_specified"; then
22419             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22420 $as_echo "not found" >&6; }
22421             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22422           fi
22423           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22424 $as_echo "$tool_specified" >&6; }
22425         fi
22426       fi
22427     fi
22428 
22429   fi
22430 
22431 
22432 
22433 
22434   # Publish this variable in the help.
22435 
22436 
22437   if [ -z "${STAT+x}" ]; then
22438     # The variable is not set by user, try to locate tool using the code snippet
22439     for ac_prog in stat
22440 do
22441   # Extract the first word of "$ac_prog", so it can be a program name with args.
22442 set dummy $ac_prog; ac_word=$2
22443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22444 $as_echo_n "checking for $ac_word... " >&6; }
22445 if ${ac_cv_path_STAT+:} false; then :
22446   $as_echo_n "(cached) " >&6
22447 else
22448   case $STAT in
22449   [\\/]* | ?:[\\/]*)
22450   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22451   ;;
22452   *)
22453   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22454 for as_dir in $PATH
22455 do
22456   IFS=$as_save_IFS
22457   test -z "$as_dir" && as_dir=.
22458     for ac_exec_ext in '' $ac_executable_extensions; do
22459   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22460     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22461     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22462     break 2
22463   fi
22464 done
22465   done
22466 IFS=$as_save_IFS
22467 
22468   ;;
22469 esac
22470 fi
22471 STAT=$ac_cv_path_STAT
22472 if test -n "$STAT"; then
22473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22474 $as_echo "$STAT" >&6; }
22475 else
22476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22477 $as_echo "no" >&6; }
22478 fi
22479 
22480 
22481   test -n "$STAT" && break
22482 done
22483 
22484   else
22485     # The variable is set, but is it from the command line or the environment?
22486 
22487     # Try to remove the string !STAT! from our list.
22488     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22489     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22490       # If it failed, the variable was not from the command line. Ignore it,
22491       # but warn the user (except for BASH, which is always set by the calling BASH).
22492       if test "xSTAT" != xBASH; then
22493         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22494 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22495       fi
22496       # Try to locate tool using the code snippet
22497       for ac_prog in stat
22498 do
22499   # Extract the first word of "$ac_prog", so it can be a program name with args.
22500 set dummy $ac_prog; ac_word=$2
22501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22502 $as_echo_n "checking for $ac_word... " >&6; }
22503 if ${ac_cv_path_STAT+:} false; then :
22504   $as_echo_n "(cached) " >&6
22505 else
22506   case $STAT in
22507   [\\/]* | ?:[\\/]*)
22508   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22509   ;;
22510   *)
22511   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22512 for as_dir in $PATH
22513 do
22514   IFS=$as_save_IFS
22515   test -z "$as_dir" && as_dir=.
22516     for ac_exec_ext in '' $ac_executable_extensions; do
22517   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22518     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22519     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22520     break 2
22521   fi
22522 done
22523   done
22524 IFS=$as_save_IFS
22525 
22526   ;;
22527 esac
22528 fi
22529 STAT=$ac_cv_path_STAT
22530 if test -n "$STAT"; then
22531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22532 $as_echo "$STAT" >&6; }
22533 else
22534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22535 $as_echo "no" >&6; }
22536 fi
22537 
22538 
22539   test -n "$STAT" && break
22540 done
22541 
22542     else
22543       # If it succeeded, then it was overridden by the user. We will use it
22544       # for the tool.
22545 
22546       # First remove it from the list of overridden variables, so we can test
22547       # for unknown variables in the end.
22548       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22549 
22550       # Check if we try to supply an empty value
22551       if test "x$STAT" = x; then
22552         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22553 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22554         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22555 $as_echo_n "checking for STAT... " >&6; }
22556         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22557 $as_echo "disabled" >&6; }
22558       else
22559         # Check if the provided tool contains a complete path.
22560         tool_specified="$STAT"
22561         tool_basename="${tool_specified##*/}"
22562         if test "x$tool_basename" = "x$tool_specified"; then
22563           # A command without a complete path is provided, search $PATH.
22564           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22565 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22566           # Extract the first word of "$tool_basename", so it can be a program name with args.
22567 set dummy $tool_basename; ac_word=$2
22568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22569 $as_echo_n "checking for $ac_word... " >&6; }
22570 if ${ac_cv_path_STAT+:} false; then :
22571   $as_echo_n "(cached) " >&6
22572 else
22573   case $STAT in
22574   [\\/]* | ?:[\\/]*)
22575   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22576   ;;
22577   *)
22578   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22579 for as_dir in $PATH
22580 do
22581   IFS=$as_save_IFS
22582   test -z "$as_dir" && as_dir=.
22583     for ac_exec_ext in '' $ac_executable_extensions; do
22584   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22585     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22587     break 2
22588   fi
22589 done
22590   done
22591 IFS=$as_save_IFS
22592 
22593   ;;
22594 esac
22595 fi
22596 STAT=$ac_cv_path_STAT
22597 if test -n "$STAT"; then
22598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22599 $as_echo "$STAT" >&6; }
22600 else
22601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22602 $as_echo "no" >&6; }
22603 fi
22604 
22605 
22606           if test "x$STAT" = x; then
22607             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22608           fi
22609         else
22610           # Otherwise we believe it is a complete path. Use it as it is.
22611           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22612 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22613           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22614 $as_echo_n "checking for STAT... " >&6; }
22615           if test ! -x "$tool_specified"; then
22616             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22617 $as_echo "not found" >&6; }
22618             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22619           fi
22620           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22621 $as_echo "$tool_specified" >&6; }
22622         fi
22623       fi
22624     fi
22625 
22626   fi
22627 
22628 
22629 
22630 
22631   # Publish this variable in the help.
22632 
22633 
22634   if [ -z "${TIME+x}" ]; then
22635     # The variable is not set by user, try to locate tool using the code snippet
22636     for ac_prog in time
22637 do
22638   # Extract the first word of "$ac_prog", so it can be a program name with args.
22639 set dummy $ac_prog; ac_word=$2
22640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22641 $as_echo_n "checking for $ac_word... " >&6; }
22642 if ${ac_cv_path_TIME+:} false; then :
22643   $as_echo_n "(cached) " >&6
22644 else
22645   case $TIME in
22646   [\\/]* | ?:[\\/]*)
22647   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22648   ;;
22649   *)
22650   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22651 for as_dir in $PATH
22652 do
22653   IFS=$as_save_IFS
22654   test -z "$as_dir" && as_dir=.
22655     for ac_exec_ext in '' $ac_executable_extensions; do
22656   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22657     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22659     break 2
22660   fi
22661 done
22662   done
22663 IFS=$as_save_IFS
22664 
22665   ;;
22666 esac
22667 fi
22668 TIME=$ac_cv_path_TIME
22669 if test -n "$TIME"; then
22670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22671 $as_echo "$TIME" >&6; }
22672 else
22673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22674 $as_echo "no" >&6; }
22675 fi
22676 
22677 
22678   test -n "$TIME" && break
22679 done
22680 
22681   else
22682     # The variable is set, but is it from the command line or the environment?
22683 
22684     # Try to remove the string !TIME! from our list.
22685     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22686     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22687       # If it failed, the variable was not from the command line. Ignore it,
22688       # but warn the user (except for BASH, which is always set by the calling BASH).
22689       if test "xTIME" != xBASH; then
22690         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22691 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22692       fi
22693       # Try to locate tool using the code snippet
22694       for ac_prog in time
22695 do
22696   # Extract the first word of "$ac_prog", so it can be a program name with args.
22697 set dummy $ac_prog; ac_word=$2
22698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22699 $as_echo_n "checking for $ac_word... " >&6; }
22700 if ${ac_cv_path_TIME+:} false; then :
22701   $as_echo_n "(cached) " >&6
22702 else
22703   case $TIME in
22704   [\\/]* | ?:[\\/]*)
22705   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22706   ;;
22707   *)
22708   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22709 for as_dir in $PATH
22710 do
22711   IFS=$as_save_IFS
22712   test -z "$as_dir" && as_dir=.
22713     for ac_exec_ext in '' $ac_executable_extensions; do
22714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22715     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22716     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22717     break 2
22718   fi
22719 done
22720   done
22721 IFS=$as_save_IFS
22722 
22723   ;;
22724 esac
22725 fi
22726 TIME=$ac_cv_path_TIME
22727 if test -n "$TIME"; then
22728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22729 $as_echo "$TIME" >&6; }
22730 else
22731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22732 $as_echo "no" >&6; }
22733 fi
22734 
22735 
22736   test -n "$TIME" && break
22737 done
22738 
22739     else
22740       # If it succeeded, then it was overridden by the user. We will use it
22741       # for the tool.
22742 
22743       # First remove it from the list of overridden variables, so we can test
22744       # for unknown variables in the end.
22745       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22746 
22747       # Check if we try to supply an empty value
22748       if test "x$TIME" = x; then
22749         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22750 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22751         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22752 $as_echo_n "checking for TIME... " >&6; }
22753         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22754 $as_echo "disabled" >&6; }
22755       else
22756         # Check if the provided tool contains a complete path.
22757         tool_specified="$TIME"
22758         tool_basename="${tool_specified##*/}"
22759         if test "x$tool_basename" = "x$tool_specified"; then
22760           # A command without a complete path is provided, search $PATH.
22761           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22762 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22763           # Extract the first word of "$tool_basename", so it can be a program name with args.
22764 set dummy $tool_basename; ac_word=$2
22765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22766 $as_echo_n "checking for $ac_word... " >&6; }
22767 if ${ac_cv_path_TIME+:} false; then :
22768   $as_echo_n "(cached) " >&6
22769 else
22770   case $TIME in
22771   [\\/]* | ?:[\\/]*)
22772   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22773   ;;
22774   *)
22775   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22776 for as_dir in $PATH
22777 do
22778   IFS=$as_save_IFS
22779   test -z "$as_dir" && as_dir=.
22780     for ac_exec_ext in '' $ac_executable_extensions; do
22781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22782     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22784     break 2
22785   fi
22786 done
22787   done
22788 IFS=$as_save_IFS
22789 
22790   ;;
22791 esac
22792 fi
22793 TIME=$ac_cv_path_TIME
22794 if test -n "$TIME"; then
22795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22796 $as_echo "$TIME" >&6; }
22797 else
22798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22799 $as_echo "no" >&6; }
22800 fi
22801 
22802 
22803           if test "x$TIME" = x; then
22804             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22805           fi
22806         else
22807           # Otherwise we believe it is a complete path. Use it as it is.
22808           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22809 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22810           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22811 $as_echo_n "checking for TIME... " >&6; }
22812           if test ! -x "$tool_specified"; then
22813             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22814 $as_echo "not found" >&6; }
22815             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22816           fi
22817           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22818 $as_echo "$tool_specified" >&6; }
22819         fi
22820       fi
22821     fi
22822 
22823   fi
22824 
22825 
22826 
22827 
22828   # Publish this variable in the help.
22829 
22830 
22831   if [ -z "${DTRACE+x}" ]; then
22832     # The variable is not set by user, try to locate tool using the code snippet
22833     for ac_prog in dtrace
22834 do
22835   # Extract the first word of "$ac_prog", so it can be a program name with args.
22836 set dummy $ac_prog; ac_word=$2
22837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22838 $as_echo_n "checking for $ac_word... " >&6; }
22839 if ${ac_cv_path_DTRACE+:} false; then :
22840   $as_echo_n "(cached) " >&6
22841 else
22842   case $DTRACE in
22843   [\\/]* | ?:[\\/]*)
22844   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22845   ;;
22846   *)
22847   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22848 for as_dir in $PATH
22849 do
22850   IFS=$as_save_IFS
22851   test -z "$as_dir" && as_dir=.
22852     for ac_exec_ext in '' $ac_executable_extensions; do
22853   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22854     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22855     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22856     break 2
22857   fi
22858 done
22859   done
22860 IFS=$as_save_IFS
22861 
22862   ;;
22863 esac
22864 fi
22865 DTRACE=$ac_cv_path_DTRACE
22866 if test -n "$DTRACE"; then
22867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22868 $as_echo "$DTRACE" >&6; }
22869 else
22870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22871 $as_echo "no" >&6; }
22872 fi
22873 
22874 
22875   test -n "$DTRACE" && break
22876 done
22877 
22878   else
22879     # The variable is set, but is it from the command line or the environment?
22880 
22881     # Try to remove the string !DTRACE! from our list.
22882     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22883     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22884       # If it failed, the variable was not from the command line. Ignore it,
22885       # but warn the user (except for BASH, which is always set by the calling BASH).
22886       if test "xDTRACE" != xBASH; then
22887         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22888 $as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22889       fi
22890       # Try to locate tool using the code snippet
22891       for ac_prog in dtrace
22892 do
22893   # Extract the first word of "$ac_prog", so it can be a program name with args.
22894 set dummy $ac_prog; ac_word=$2
22895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22896 $as_echo_n "checking for $ac_word... " >&6; }
22897 if ${ac_cv_path_DTRACE+:} false; then :
22898   $as_echo_n "(cached) " >&6
22899 else
22900   case $DTRACE in
22901   [\\/]* | ?:[\\/]*)
22902   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22903   ;;
22904   *)
22905   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22906 for as_dir in $PATH
22907 do
22908   IFS=$as_save_IFS
22909   test -z "$as_dir" && as_dir=.
22910     for ac_exec_ext in '' $ac_executable_extensions; do
22911   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22912     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22913     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22914     break 2
22915   fi
22916 done
22917   done
22918 IFS=$as_save_IFS
22919 
22920   ;;
22921 esac
22922 fi
22923 DTRACE=$ac_cv_path_DTRACE
22924 if test -n "$DTRACE"; then
22925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22926 $as_echo "$DTRACE" >&6; }
22927 else
22928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22929 $as_echo "no" >&6; }
22930 fi
22931 
22932 
22933   test -n "$DTRACE" && break
22934 done
22935 
22936     else
22937       # If it succeeded, then it was overridden by the user. We will use it
22938       # for the tool.
22939 
22940       # First remove it from the list of overridden variables, so we can test
22941       # for unknown variables in the end.
22942       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22943 
22944       # Check if we try to supply an empty value
22945       if test "x$DTRACE" = x; then
22946         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22947 $as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22948         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22949 $as_echo_n "checking for DTRACE... " >&6; }
22950         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22951 $as_echo "disabled" >&6; }
22952       else
22953         # Check if the provided tool contains a complete path.
22954         tool_specified="$DTRACE"
22955         tool_basename="${tool_specified##*/}"
22956         if test "x$tool_basename" = "x$tool_specified"; then
22957           # A command without a complete path is provided, search $PATH.
22958           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22959 $as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22960           # Extract the first word of "$tool_basename", so it can be a program name with args.
22961 set dummy $tool_basename; ac_word=$2
22962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22963 $as_echo_n "checking for $ac_word... " >&6; }
22964 if ${ac_cv_path_DTRACE+:} false; then :
22965   $as_echo_n "(cached) " >&6
22966 else
22967   case $DTRACE in
22968   [\\/]* | ?:[\\/]*)
22969   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22970   ;;
22971   *)
22972   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22973 for as_dir in $PATH
22974 do
22975   IFS=$as_save_IFS
22976   test -z "$as_dir" && as_dir=.
22977     for ac_exec_ext in '' $ac_executable_extensions; do
22978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22979     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22981     break 2
22982   fi
22983 done
22984   done
22985 IFS=$as_save_IFS
22986 
22987   ;;
22988 esac
22989 fi
22990 DTRACE=$ac_cv_path_DTRACE
22991 if test -n "$DTRACE"; then
22992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22993 $as_echo "$DTRACE" >&6; }
22994 else
22995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22996 $as_echo "no" >&6; }
22997 fi
22998 
22999 
23000           if test "x$DTRACE" = x; then
23001             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23002           fi
23003         else
23004           # Otherwise we believe it is a complete path. Use it as it is.
23005           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23006 $as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23007           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23008 $as_echo_n "checking for DTRACE... " >&6; }
23009           if test ! -x "$tool_specified"; then
23010             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23011 $as_echo "not found" >&6; }
23012             as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23013           fi
23014           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23015 $as_echo "$tool_specified" >&6; }
23016         fi
23017       fi
23018     fi
23019 
23020   fi
23021 
23022 
23023 
23024 
23025   # Publish this variable in the help.
23026 
23027 
23028   if [ -z "${PATCH+x}" ]; then
23029     # The variable is not set by user, try to locate tool using the code snippet
23030     for ac_prog in gpatch patch
23031 do
23032   # Extract the first word of "$ac_prog", so it can be a program name with args.
23033 set dummy $ac_prog; ac_word=$2
23034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23035 $as_echo_n "checking for $ac_word... " >&6; }
23036 if ${ac_cv_path_PATCH+:} false; then :
23037   $as_echo_n "(cached) " >&6
23038 else
23039   case $PATCH in
23040   [\\/]* | ?:[\\/]*)
23041   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23042   ;;
23043   *)
23044   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23045 for as_dir in $PATH
23046 do
23047   IFS=$as_save_IFS
23048   test -z "$as_dir" && as_dir=.
23049     for ac_exec_ext in '' $ac_executable_extensions; do
23050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23051     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23053     break 2
23054   fi
23055 done
23056   done
23057 IFS=$as_save_IFS
23058 
23059   ;;
23060 esac
23061 fi
23062 PATCH=$ac_cv_path_PATCH
23063 if test -n "$PATCH"; then
23064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23065 $as_echo "$PATCH" >&6; }
23066 else
23067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23068 $as_echo "no" >&6; }
23069 fi
23070 
23071 
23072   test -n "$PATCH" && break
23073 done
23074 
23075   else
23076     # The variable is set, but is it from the command line or the environment?
23077 
23078     # Try to remove the string !PATCH! from our list.
23079     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23080     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23081       # If it failed, the variable was not from the command line. Ignore it,
23082       # but warn the user (except for BASH, which is always set by the calling BASH).
23083       if test "xPATCH" != xBASH; then
23084         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23085 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23086       fi
23087       # Try to locate tool using the code snippet
23088       for ac_prog in gpatch patch
23089 do
23090   # Extract the first word of "$ac_prog", so it can be a program name with args.
23091 set dummy $ac_prog; ac_word=$2
23092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23093 $as_echo_n "checking for $ac_word... " >&6; }
23094 if ${ac_cv_path_PATCH+:} false; then :
23095   $as_echo_n "(cached) " >&6
23096 else
23097   case $PATCH in
23098   [\\/]* | ?:[\\/]*)
23099   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23100   ;;
23101   *)
23102   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23103 for as_dir in $PATH
23104 do
23105   IFS=$as_save_IFS
23106   test -z "$as_dir" && as_dir=.
23107     for ac_exec_ext in '' $ac_executable_extensions; do
23108   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23109     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23110     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23111     break 2
23112   fi
23113 done
23114   done
23115 IFS=$as_save_IFS
23116 
23117   ;;
23118 esac
23119 fi
23120 PATCH=$ac_cv_path_PATCH
23121 if test -n "$PATCH"; then
23122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23123 $as_echo "$PATCH" >&6; }
23124 else
23125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23126 $as_echo "no" >&6; }
23127 fi
23128 
23129 
23130   test -n "$PATCH" && break
23131 done
23132 
23133     else
23134       # If it succeeded, then it was overridden by the user. We will use it
23135       # for the tool.
23136 
23137       # First remove it from the list of overridden variables, so we can test
23138       # for unknown variables in the end.
23139       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23140 
23141       # Check if we try to supply an empty value
23142       if test "x$PATCH" = x; then
23143         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23144 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23145         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23146 $as_echo_n "checking for PATCH... " >&6; }
23147         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23148 $as_echo "disabled" >&6; }
23149       else
23150         # Check if the provided tool contains a complete path.
23151         tool_specified="$PATCH"
23152         tool_basename="${tool_specified##*/}"
23153         if test "x$tool_basename" = "x$tool_specified"; then
23154           # A command without a complete path is provided, search $PATH.
23155           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23156 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23157           # Extract the first word of "$tool_basename", so it can be a program name with args.
23158 set dummy $tool_basename; ac_word=$2
23159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23160 $as_echo_n "checking for $ac_word... " >&6; }
23161 if ${ac_cv_path_PATCH+:} false; then :
23162   $as_echo_n "(cached) " >&6
23163 else
23164   case $PATCH in
23165   [\\/]* | ?:[\\/]*)
23166   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23167   ;;
23168   *)
23169   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23170 for as_dir in $PATH
23171 do
23172   IFS=$as_save_IFS
23173   test -z "$as_dir" && as_dir=.
23174     for ac_exec_ext in '' $ac_executable_extensions; do
23175   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23176     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23177     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23178     break 2
23179   fi
23180 done
23181   done
23182 IFS=$as_save_IFS
23183 
23184   ;;
23185 esac
23186 fi
23187 PATCH=$ac_cv_path_PATCH
23188 if test -n "$PATCH"; then
23189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23190 $as_echo "$PATCH" >&6; }
23191 else
23192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23193 $as_echo "no" >&6; }
23194 fi
23195 
23196 
23197           if test "x$PATCH" = x; then
23198             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23199           fi
23200         else
23201           # Otherwise we believe it is a complete path. Use it as it is.
23202           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23203 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23204           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23205 $as_echo_n "checking for PATCH... " >&6; }
23206           if test ! -x "$tool_specified"; then
23207             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23208 $as_echo "not found" >&6; }
23209             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23210           fi
23211           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23212 $as_echo "$tool_specified" >&6; }
23213         fi
23214       fi
23215     fi
23216 
23217   fi
23218 
23219 
23220   # Check if it's GNU time
23221   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23222   if test "x$IS_GNU_TIME" != x; then
23223     IS_GNU_TIME=yes
23224   else
23225     IS_GNU_TIME=no
23226   fi
23227 
23228 
23229    if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_OS" = "xios" ; then
23230 
23231 
23232 
23233   # Publish this variable in the help.
23234 
23235 
23236   if [ -z "${DSYMUTIL+x}" ]; then
23237     # The variable is not set by user, try to locate tool using the code snippet
23238     for ac_prog in dsymutil
23239 do
23240   # Extract the first word of "$ac_prog", so it can be a program name with args.
23241 set dummy $ac_prog; ac_word=$2
23242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23243 $as_echo_n "checking for $ac_word... " >&6; }
23244 if ${ac_cv_path_DSYMUTIL+:} false; then :
23245   $as_echo_n "(cached) " >&6
23246 else
23247   case $DSYMUTIL in
23248   [\\/]* | ?:[\\/]*)
23249   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23250   ;;
23251   *)
23252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23253 for as_dir in $PATH
23254 do
23255   IFS=$as_save_IFS
23256   test -z "$as_dir" && as_dir=.
23257     for ac_exec_ext in '' $ac_executable_extensions; do
23258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23259     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23261     break 2
23262   fi
23263 done
23264   done
23265 IFS=$as_save_IFS
23266 
23267   ;;
23268 esac
23269 fi
23270 DSYMUTIL=$ac_cv_path_DSYMUTIL
23271 if test -n "$DSYMUTIL"; then
23272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23273 $as_echo "$DSYMUTIL" >&6; }
23274 else
23275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23276 $as_echo "no" >&6; }
23277 fi
23278 
23279 
23280   test -n "$DSYMUTIL" && break
23281 done
23282 
23283   else
23284     # The variable is set, but is it from the command line or the environment?
23285 
23286     # Try to remove the string !DSYMUTIL! from our list.
23287     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23288     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23289       # If it failed, the variable was not from the command line. Ignore it,
23290       # but warn the user (except for BASH, which is always set by the calling BASH).
23291       if test "xDSYMUTIL" != xBASH; then
23292         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23293 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23294       fi
23295       # Try to locate tool using the code snippet
23296       for ac_prog in dsymutil
23297 do
23298   # Extract the first word of "$ac_prog", so it can be a program name with args.
23299 set dummy $ac_prog; ac_word=$2
23300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23301 $as_echo_n "checking for $ac_word... " >&6; }
23302 if ${ac_cv_path_DSYMUTIL+:} false; then :
23303   $as_echo_n "(cached) " >&6
23304 else
23305   case $DSYMUTIL in
23306   [\\/]* | ?:[\\/]*)
23307   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23308   ;;
23309   *)
23310   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23311 for as_dir in $PATH
23312 do
23313   IFS=$as_save_IFS
23314   test -z "$as_dir" && as_dir=.
23315     for ac_exec_ext in '' $ac_executable_extensions; do
23316   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23317     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23318     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23319     break 2
23320   fi
23321 done
23322   done
23323 IFS=$as_save_IFS
23324 
23325   ;;
23326 esac
23327 fi
23328 DSYMUTIL=$ac_cv_path_DSYMUTIL
23329 if test -n "$DSYMUTIL"; then
23330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23331 $as_echo "$DSYMUTIL" >&6; }
23332 else
23333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23334 $as_echo "no" >&6; }
23335 fi
23336 
23337 
23338   test -n "$DSYMUTIL" && break
23339 done
23340 
23341     else
23342       # If it succeeded, then it was overridden by the user. We will use it
23343       # for the tool.
23344 
23345       # First remove it from the list of overridden variables, so we can test
23346       # for unknown variables in the end.
23347       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23348 
23349       # Check if we try to supply an empty value
23350       if test "x$DSYMUTIL" = x; then
23351         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23352 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23353         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23354 $as_echo_n "checking for DSYMUTIL... " >&6; }
23355         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23356 $as_echo "disabled" >&6; }
23357       else
23358         # Check if the provided tool contains a complete path.
23359         tool_specified="$DSYMUTIL"
23360         tool_basename="${tool_specified##*/}"
23361         if test "x$tool_basename" = "x$tool_specified"; then
23362           # A command without a complete path is provided, search $PATH.
23363           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23364 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23365           # Extract the first word of "$tool_basename", so it can be a program name with args.
23366 set dummy $tool_basename; ac_word=$2
23367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23368 $as_echo_n "checking for $ac_word... " >&6; }
23369 if ${ac_cv_path_DSYMUTIL+:} false; then :
23370   $as_echo_n "(cached) " >&6
23371 else
23372   case $DSYMUTIL in
23373   [\\/]* | ?:[\\/]*)
23374   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23375   ;;
23376   *)
23377   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23378 for as_dir in $PATH
23379 do
23380   IFS=$as_save_IFS
23381   test -z "$as_dir" && as_dir=.
23382     for ac_exec_ext in '' $ac_executable_extensions; do
23383   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23384     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23385     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23386     break 2
23387   fi
23388 done
23389   done
23390 IFS=$as_save_IFS
23391 
23392   ;;
23393 esac
23394 fi
23395 DSYMUTIL=$ac_cv_path_DSYMUTIL
23396 if test -n "$DSYMUTIL"; then
23397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23398 $as_echo "$DSYMUTIL" >&6; }
23399 else
23400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23401 $as_echo "no" >&6; }
23402 fi
23403 
23404 
23405           if test "x$DSYMUTIL" = x; then
23406             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23407           fi
23408         else
23409           # Otherwise we believe it is a complete path. Use it as it is.
23410           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23411 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23412           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23413 $as_echo_n "checking for DSYMUTIL... " >&6; }
23414           if test ! -x "$tool_specified"; then
23415             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23416 $as_echo "not found" >&6; }
23417             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23418           fi
23419           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23420 $as_echo "$tool_specified" >&6; }
23421         fi
23422       fi
23423     fi
23424 
23425   fi
23426 
23427 
23428 
23429   if test "x$DSYMUTIL" = x; then
23430     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23431   fi
23432 
23433 
23434 
23435 
23436 
23437   # Publish this variable in the help.
23438 
23439 
23440   if [ -z "${XATTR+x}" ]; then
23441     # The variable is not set by user, try to locate tool using the code snippet
23442     for ac_prog in xattr
23443 do
23444   # Extract the first word of "$ac_prog", so it can be a program name with args.
23445 set dummy $ac_prog; ac_word=$2
23446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23447 $as_echo_n "checking for $ac_word... " >&6; }
23448 if ${ac_cv_path_XATTR+:} false; then :
23449   $as_echo_n "(cached) " >&6
23450 else
23451   case $XATTR in
23452   [\\/]* | ?:[\\/]*)
23453   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23454   ;;
23455   *)
23456   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23457 for as_dir in $PATH
23458 do
23459   IFS=$as_save_IFS
23460   test -z "$as_dir" && as_dir=.
23461     for ac_exec_ext in '' $ac_executable_extensions; do
23462   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23463     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23464     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23465     break 2
23466   fi
23467 done
23468   done
23469 IFS=$as_save_IFS
23470 
23471   ;;
23472 esac
23473 fi
23474 XATTR=$ac_cv_path_XATTR
23475 if test -n "$XATTR"; then
23476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23477 $as_echo "$XATTR" >&6; }
23478 else
23479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23480 $as_echo "no" >&6; }
23481 fi
23482 
23483 
23484   test -n "$XATTR" && break
23485 done
23486 
23487   else
23488     # The variable is set, but is it from the command line or the environment?
23489 
23490     # Try to remove the string !XATTR! from our list.
23491     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23492     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23493       # If it failed, the variable was not from the command line. Ignore it,
23494       # but warn the user (except for BASH, which is always set by the calling BASH).
23495       if test "xXATTR" != xBASH; then
23496         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23497 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23498       fi
23499       # Try to locate tool using the code snippet
23500       for ac_prog in xattr
23501 do
23502   # Extract the first word of "$ac_prog", so it can be a program name with args.
23503 set dummy $ac_prog; ac_word=$2
23504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23505 $as_echo_n "checking for $ac_word... " >&6; }
23506 if ${ac_cv_path_XATTR+:} false; then :
23507   $as_echo_n "(cached) " >&6
23508 else
23509   case $XATTR in
23510   [\\/]* | ?:[\\/]*)
23511   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23512   ;;
23513   *)
23514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23515 for as_dir in $PATH
23516 do
23517   IFS=$as_save_IFS
23518   test -z "$as_dir" && as_dir=.
23519     for ac_exec_ext in '' $ac_executable_extensions; do
23520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23521     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23523     break 2
23524   fi
23525 done
23526   done
23527 IFS=$as_save_IFS
23528 
23529   ;;
23530 esac
23531 fi
23532 XATTR=$ac_cv_path_XATTR
23533 if test -n "$XATTR"; then
23534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23535 $as_echo "$XATTR" >&6; }
23536 else
23537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23538 $as_echo "no" >&6; }
23539 fi
23540 
23541 
23542   test -n "$XATTR" && break
23543 done
23544 
23545     else
23546       # If it succeeded, then it was overridden by the user. We will use it
23547       # for the tool.
23548 
23549       # First remove it from the list of overridden variables, so we can test
23550       # for unknown variables in the end.
23551       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23552 
23553       # Check if we try to supply an empty value
23554       if test "x$XATTR" = x; then
23555         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23556 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23557         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23558 $as_echo_n "checking for XATTR... " >&6; }
23559         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23560 $as_echo "disabled" >&6; }
23561       else
23562         # Check if the provided tool contains a complete path.
23563         tool_specified="$XATTR"
23564         tool_basename="${tool_specified##*/}"
23565         if test "x$tool_basename" = "x$tool_specified"; then
23566           # A command without a complete path is provided, search $PATH.
23567           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23568 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23569           # Extract the first word of "$tool_basename", so it can be a program name with args.
23570 set dummy $tool_basename; ac_word=$2
23571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23572 $as_echo_n "checking for $ac_word... " >&6; }
23573 if ${ac_cv_path_XATTR+:} false; then :
23574   $as_echo_n "(cached) " >&6
23575 else
23576   case $XATTR in
23577   [\\/]* | ?:[\\/]*)
23578   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23579   ;;
23580   *)
23581   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23582 for as_dir in $PATH
23583 do
23584   IFS=$as_save_IFS
23585   test -z "$as_dir" && as_dir=.
23586     for ac_exec_ext in '' $ac_executable_extensions; do
23587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23588     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23590     break 2
23591   fi
23592 done
23593   done
23594 IFS=$as_save_IFS
23595 
23596   ;;
23597 esac
23598 fi
23599 XATTR=$ac_cv_path_XATTR
23600 if test -n "$XATTR"; then
23601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23602 $as_echo "$XATTR" >&6; }
23603 else
23604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23605 $as_echo "no" >&6; }
23606 fi
23607 
23608 
23609           if test "x$XATTR" = x; then
23610             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23611           fi
23612         else
23613           # Otherwise we believe it is a complete path. Use it as it is.
23614           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23615 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23616           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23617 $as_echo_n "checking for XATTR... " >&6; }
23618           if test ! -x "$tool_specified"; then
23619             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23620 $as_echo "not found" >&6; }
23621             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23622           fi
23623           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23624 $as_echo "$tool_specified" >&6; }
23625         fi
23626       fi
23627     fi
23628 
23629   fi
23630 
23631 
23632 
23633   if test "x$XATTR" = x; then
23634     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23635   fi
23636 
23637 
23638 
23639 
23640   # Publish this variable in the help.
23641 
23642 
23643   if [ -z "${CODESIGN+x}" ]; then
23644     # The variable is not set by user, try to locate tool using the code snippet
23645     for ac_prog in codesign
23646 do
23647   # Extract the first word of "$ac_prog", so it can be a program name with args.
23648 set dummy $ac_prog; ac_word=$2
23649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23650 $as_echo_n "checking for $ac_word... " >&6; }
23651 if ${ac_cv_path_CODESIGN+:} false; then :
23652   $as_echo_n "(cached) " >&6
23653 else
23654   case $CODESIGN in
23655   [\\/]* | ?:[\\/]*)
23656   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23657   ;;
23658   *)
23659   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23660 for as_dir in $PATH
23661 do
23662   IFS=$as_save_IFS
23663   test -z "$as_dir" && as_dir=.
23664     for ac_exec_ext in '' $ac_executable_extensions; do
23665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23666     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23668     break 2
23669   fi
23670 done
23671   done
23672 IFS=$as_save_IFS
23673 
23674   ;;
23675 esac
23676 fi
23677 CODESIGN=$ac_cv_path_CODESIGN
23678 if test -n "$CODESIGN"; then
23679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23680 $as_echo "$CODESIGN" >&6; }
23681 else
23682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23683 $as_echo "no" >&6; }
23684 fi
23685 
23686 
23687   test -n "$CODESIGN" && break
23688 done
23689 
23690   else
23691     # The variable is set, but is it from the command line or the environment?
23692 
23693     # Try to remove the string !CODESIGN! from our list.
23694     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23695     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23696       # If it failed, the variable was not from the command line. Ignore it,
23697       # but warn the user (except for BASH, which is always set by the calling BASH).
23698       if test "xCODESIGN" != xBASH; then
23699         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23700 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23701       fi
23702       # Try to locate tool using the code snippet
23703       for ac_prog in codesign
23704 do
23705   # Extract the first word of "$ac_prog", so it can be a program name with args.
23706 set dummy $ac_prog; ac_word=$2
23707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23708 $as_echo_n "checking for $ac_word... " >&6; }
23709 if ${ac_cv_path_CODESIGN+:} false; then :
23710   $as_echo_n "(cached) " >&6
23711 else
23712   case $CODESIGN in
23713   [\\/]* | ?:[\\/]*)
23714   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23715   ;;
23716   *)
23717   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23718 for as_dir in $PATH
23719 do
23720   IFS=$as_save_IFS
23721   test -z "$as_dir" && as_dir=.
23722     for ac_exec_ext in '' $ac_executable_extensions; do
23723   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23724     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23725     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23726     break 2
23727   fi
23728 done
23729   done
23730 IFS=$as_save_IFS
23731 
23732   ;;
23733 esac
23734 fi
23735 CODESIGN=$ac_cv_path_CODESIGN
23736 if test -n "$CODESIGN"; then
23737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23738 $as_echo "$CODESIGN" >&6; }
23739 else
23740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23741 $as_echo "no" >&6; }
23742 fi
23743 
23744 
23745   test -n "$CODESIGN" && break
23746 done
23747 
23748     else
23749       # If it succeeded, then it was overridden by the user. We will use it
23750       # for the tool.
23751 
23752       # First remove it from the list of overridden variables, so we can test
23753       # for unknown variables in the end.
23754       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23755 
23756       # Check if we try to supply an empty value
23757       if test "x$CODESIGN" = x; then
23758         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23759 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23760         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23761 $as_echo_n "checking for CODESIGN... " >&6; }
23762         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23763 $as_echo "disabled" >&6; }
23764       else
23765         # Check if the provided tool contains a complete path.
23766         tool_specified="$CODESIGN"
23767         tool_basename="${tool_specified##*/}"
23768         if test "x$tool_basename" = "x$tool_specified"; then
23769           # A command without a complete path is provided, search $PATH.
23770           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23771 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23772           # Extract the first word of "$tool_basename", so it can be a program name with args.
23773 set dummy $tool_basename; ac_word=$2
23774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23775 $as_echo_n "checking for $ac_word... " >&6; }
23776 if ${ac_cv_path_CODESIGN+:} false; then :
23777   $as_echo_n "(cached) " >&6
23778 else
23779   case $CODESIGN in
23780   [\\/]* | ?:[\\/]*)
23781   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23782   ;;
23783   *)
23784   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23785 for as_dir in $PATH
23786 do
23787   IFS=$as_save_IFS
23788   test -z "$as_dir" && as_dir=.
23789     for ac_exec_ext in '' $ac_executable_extensions; do
23790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23791     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23793     break 2
23794   fi
23795 done
23796   done
23797 IFS=$as_save_IFS
23798 
23799   ;;
23800 esac
23801 fi
23802 CODESIGN=$ac_cv_path_CODESIGN
23803 if test -n "$CODESIGN"; then
23804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23805 $as_echo "$CODESIGN" >&6; }
23806 else
23807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23808 $as_echo "no" >&6; }
23809 fi
23810 
23811 
23812           if test "x$CODESIGN" = x; then
23813             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23814           fi
23815         else
23816           # Otherwise we believe it is a complete path. Use it as it is.
23817           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23818 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23819           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23820 $as_echo_n "checking for CODESIGN... " >&6; }
23821           if test ! -x "$tool_specified"; then
23822             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23823 $as_echo "not found" >&6; }
23824             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23825           fi
23826           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23827 $as_echo "$tool_specified" >&6; }
23828         fi
23829       fi
23830     fi
23831 
23832   fi
23833 
23834 
23835     if test "x$CODESIGN" != "x"; then
23836       # Verify that the openjdk_codesign certificate is present
23837       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23838 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23839       $RM codesign-testfile
23840       $TOUCH codesign-testfile
23841       $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23842       $RM codesign-testfile
23843       if test "x$CODESIGN" = x; then
23844         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23845 $as_echo "no" >&6; }
23846       else
23847         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23848 $as_echo "yes" >&6; }
23849       fi
23850     fi
23851 
23852 
23853 
23854   # Publish this variable in the help.
23855 
23856 
23857   if [ -z "${SETFILE+x}" ]; then
23858     # The variable is not set by user, try to locate tool using the code snippet
23859     for ac_prog in SetFile
23860 do
23861   # Extract the first word of "$ac_prog", so it can be a program name with args.
23862 set dummy $ac_prog; ac_word=$2
23863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23864 $as_echo_n "checking for $ac_word... " >&6; }
23865 if ${ac_cv_path_SETFILE+:} false; then :
23866   $as_echo_n "(cached) " >&6
23867 else
23868   case $SETFILE in
23869   [\\/]* | ?:[\\/]*)
23870   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23871   ;;
23872   *)
23873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23874 for as_dir in $PATH
23875 do
23876   IFS=$as_save_IFS
23877   test -z "$as_dir" && as_dir=.
23878     for ac_exec_ext in '' $ac_executable_extensions; do
23879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23880     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23882     break 2
23883   fi
23884 done
23885   done
23886 IFS=$as_save_IFS
23887 
23888   ;;
23889 esac
23890 fi
23891 SETFILE=$ac_cv_path_SETFILE
23892 if test -n "$SETFILE"; then
23893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23894 $as_echo "$SETFILE" >&6; }
23895 else
23896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23897 $as_echo "no" >&6; }
23898 fi
23899 
23900 
23901   test -n "$SETFILE" && break
23902 done
23903 
23904   else
23905     # The variable is set, but is it from the command line or the environment?
23906 
23907     # Try to remove the string !SETFILE! from our list.
23908     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23909     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23910       # If it failed, the variable was not from the command line. Ignore it,
23911       # but warn the user (except for BASH, which is always set by the calling BASH).
23912       if test "xSETFILE" != xBASH; then
23913         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23914 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23915       fi
23916       # Try to locate tool using the code snippet
23917       for ac_prog in SetFile
23918 do
23919   # Extract the first word of "$ac_prog", so it can be a program name with args.
23920 set dummy $ac_prog; ac_word=$2
23921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23922 $as_echo_n "checking for $ac_word... " >&6; }
23923 if ${ac_cv_path_SETFILE+:} false; then :
23924   $as_echo_n "(cached) " >&6
23925 else
23926   case $SETFILE in
23927   [\\/]* | ?:[\\/]*)
23928   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23929   ;;
23930   *)
23931   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23932 for as_dir in $PATH
23933 do
23934   IFS=$as_save_IFS
23935   test -z "$as_dir" && as_dir=.
23936     for ac_exec_ext in '' $ac_executable_extensions; do
23937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23938     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23940     break 2
23941   fi
23942 done
23943   done
23944 IFS=$as_save_IFS
23945 
23946   ;;
23947 esac
23948 fi
23949 SETFILE=$ac_cv_path_SETFILE
23950 if test -n "$SETFILE"; then
23951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23952 $as_echo "$SETFILE" >&6; }
23953 else
23954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23955 $as_echo "no" >&6; }
23956 fi
23957 
23958 
23959   test -n "$SETFILE" && break
23960 done
23961 
23962     else
23963       # If it succeeded, then it was overridden by the user. We will use it
23964       # for the tool.
23965 
23966       # First remove it from the list of overridden variables, so we can test
23967       # for unknown variables in the end.
23968       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23969 
23970       # Check if we try to supply an empty value
23971       if test "x$SETFILE" = x; then
23972         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23973 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23974         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23975 $as_echo_n "checking for SETFILE... " >&6; }
23976         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23977 $as_echo "disabled" >&6; }
23978       else
23979         # Check if the provided tool contains a complete path.
23980         tool_specified="$SETFILE"
23981         tool_basename="${tool_specified##*/}"
23982         if test "x$tool_basename" = "x$tool_specified"; then
23983           # A command without a complete path is provided, search $PATH.
23984           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23985 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23986           # Extract the first word of "$tool_basename", so it can be a program name with args.
23987 set dummy $tool_basename; ac_word=$2
23988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23989 $as_echo_n "checking for $ac_word... " >&6; }
23990 if ${ac_cv_path_SETFILE+:} false; then :
23991   $as_echo_n "(cached) " >&6
23992 else
23993   case $SETFILE in
23994   [\\/]* | ?:[\\/]*)
23995   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23996   ;;
23997   *)
23998   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23999 for as_dir in $PATH
24000 do
24001   IFS=$as_save_IFS
24002   test -z "$as_dir" && as_dir=.
24003     for ac_exec_ext in '' $ac_executable_extensions; do
24004   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24005     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24006     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24007     break 2
24008   fi
24009 done
24010   done
24011 IFS=$as_save_IFS
24012 
24013   ;;
24014 esac
24015 fi
24016 SETFILE=$ac_cv_path_SETFILE
24017 if test -n "$SETFILE"; then
24018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24019 $as_echo "$SETFILE" >&6; }
24020 else
24021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24022 $as_echo "no" >&6; }
24023 fi
24024 
24025 
24026           if test "x$SETFILE" = x; then
24027             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24028           fi
24029         else
24030           # Otherwise we believe it is a complete path. Use it as it is.
24031           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24032 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24033           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24034 $as_echo_n "checking for SETFILE... " >&6; }
24035           if test ! -x "$tool_specified"; then
24036             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24037 $as_echo "not found" >&6; }
24038             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24039           fi
24040           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24041 $as_echo "$tool_specified" >&6; }
24042         fi
24043       fi
24044     fi
24045 
24046   fi
24047 
24048 
24049 
24050   if test "x$SETFILE" = x; then
24051     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24052   fi
24053 
24054 
24055   fi
24056 
24057 
24058   # Test if bash supports pipefail.
24059   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24060 $as_echo_n "checking if bash supports pipefail... " >&6; }
24061   if ${BASH} -c 'set -o pipefail'; then
24062     BASH_ARGS="$BASH_ARGS -o pipefail"
24063     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24064 $as_echo "yes" >&6; }
24065   else
24066     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24067 $as_echo "no" >&6; }
24068   fi
24069 
24070   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24071 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24072   if ${BASH} -e -c 'true'; then
24073     BASH_ARGS="$BASH_ARGS -e"
24074     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24075 $as_echo "yes" >&6; }
24076   else
24077     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24078 $as_echo "no" >&6; }
24079   fi
24080 
24081 
24082 
24083 
24084 # Check if pkg-config is available.
24085 
24086 
24087 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24088         if test -n "$ac_tool_prefix"; then
24089   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24090 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24092 $as_echo_n "checking for $ac_word... " >&6; }
24093 if ${ac_cv_path_PKG_CONFIG+:} false; then :
24094   $as_echo_n "(cached) " >&6
24095 else
24096   case $PKG_CONFIG in
24097   [\\/]* | ?:[\\/]*)
24098   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24099   ;;
24100   *)
24101   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24102 for as_dir in $PATH
24103 do
24104   IFS=$as_save_IFS
24105   test -z "$as_dir" && as_dir=.
24106     for ac_exec_ext in '' $ac_executable_extensions; do
24107   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24108     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24109     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24110     break 2
24111   fi
24112 done
24113   done
24114 IFS=$as_save_IFS
24115 
24116   ;;
24117 esac
24118 fi
24119 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24120 if test -n "$PKG_CONFIG"; then
24121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24122 $as_echo "$PKG_CONFIG" >&6; }
24123 else
24124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24125 $as_echo "no" >&6; }
24126 fi
24127 
24128 
24129 fi
24130 if test -z "$ac_cv_path_PKG_CONFIG"; then
24131   ac_pt_PKG_CONFIG=$PKG_CONFIG
24132   # Extract the first word of "pkg-config", so it can be a program name with args.
24133 set dummy pkg-config; ac_word=$2
24134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24135 $as_echo_n "checking for $ac_word... " >&6; }
24136 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24137   $as_echo_n "(cached) " >&6
24138 else
24139   case $ac_pt_PKG_CONFIG in
24140   [\\/]* | ?:[\\/]*)
24141   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24142   ;;
24143   *)
24144   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24145 for as_dir in $PATH
24146 do
24147   IFS=$as_save_IFS
24148   test -z "$as_dir" && as_dir=.
24149     for ac_exec_ext in '' $ac_executable_extensions; do
24150   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24151     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24152     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24153     break 2
24154   fi
24155 done
24156   done
24157 IFS=$as_save_IFS
24158 
24159   ;;
24160 esac
24161 fi
24162 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24163 if test -n "$ac_pt_PKG_CONFIG"; then
24164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24165 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
24166 else
24167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24168 $as_echo "no" >&6; }
24169 fi
24170 
24171   if test "x$ac_pt_PKG_CONFIG" = x; then
24172     PKG_CONFIG=""
24173   else
24174     case $cross_compiling:$ac_tool_warned in
24175 yes:)
24176 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24177 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24178 ac_tool_warned=yes ;;
24179 esac
24180     PKG_CONFIG=$ac_pt_PKG_CONFIG
24181   fi
24182 else
24183   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24184 fi
24185 
24186 fi
24187 if test -n "$PKG_CONFIG"; then
24188         _pkg_min_version=0.9.0
24189         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24190 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24191         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24192                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24193 $as_echo "yes" >&6; }
24194         else
24195                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24196 $as_echo "no" >&6; }
24197                 PKG_CONFIG=""
24198         fi
24199 
24200 fi
24201 
24202 # After basic tools have been setup, we can check build os specific details.
24203 
24204   ###############################################################################
24205 
24206   # Note that this is the build platform OS version!
24207 
24208   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24209   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24210   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24211   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24212 
24213 
24214 
24215 
24216 
24217 # Misc basic settings
24218 
24219 
24220 # Check whether --with-default-make-target was given.
24221 if test "${with_default_make_target+set}" = set; then :
24222   withval=$with_default_make_target;
24223 fi
24224 
24225   if test "x$with_default_make_target" = "x" \
24226       || test "x$with_default_make_target" = "xyes"; then
24227     DEFAULT_MAKE_TARGET="exploded-image"
24228   elif test "x$with_default_make_target" = "xno"; then
24229     as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24230   else
24231     DEFAULT_MAKE_TARGET="$with_default_make_target"
24232   fi
24233 
24234 
24235 
24236 
24237 ###############################################################################
24238 #
24239 # Determine OpenJDK variants, options and version numbers.
24240 #
24241 ###############################################################################
24242 
24243 # We need build & target for this.
24244 
24245   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
24246   # We always build headless support.
24247   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
24248 $as_echo_n "checking headful support... " >&6; }
24249   # Check whether --enable-headful was given.
24250 if test "${enable_headful+set}" = set; then :
24251   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
24252 else
24253   SUPPORT_HEADFUL=yes
24254 fi
24255 
24256 
24257   SUPPORT_HEADLESS=yes
24258   BUILD_HEADLESS="BUILD_HEADLESS:=true"
24259 
24260   if test "x$SUPPORT_HEADFUL" = xyes; then
24261     # We are building both headful and headless.
24262     headful_msg="include support for both headful and headless"
24263   fi
24264 
24265   if test "x$SUPPORT_HEADFUL" = xno; then
24266     # Thus we are building headless only.
24267     BUILD_HEADLESS="BUILD_HEADLESS:=true"
24268     headful_msg="headless only"
24269   fi
24270 
24271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
24272 $as_echo "$headful_msg" >&6; }
24273 
24274 
24275 
24276 
24277 
24278   # Choose cacerts source file
24279 
24280 # Check whether --with-cacerts-file was given.
24281 if test "${with_cacerts_file+set}" = set; then :
24282   withval=$with_cacerts_file;
24283 fi
24284 
24285   if test "x$with_cacerts_file" != x; then
24286     CACERTS_FILE=$with_cacerts_file
24287   fi
24288 
24289 
24290   # Enable or disable unlimited crypto
24291   # Check whether --enable-unlimited-crypto was given.
24292 if test "${enable_unlimited_crypto+set}" = set; then :
24293   enableval=$enable_unlimited_crypto;
24294 else
24295   enable_unlimited_crypto=no
24296 fi
24297 
24298   if test "x$enable_unlimited_crypto" = "xyes"; then
24299     UNLIMITED_CRYPTO=true
24300   else
24301     UNLIMITED_CRYPTO=false
24302   fi
24303 
24304 
24305   # Should we build the serviceability agent (SA)?
24306   INCLUDE_SA=true
24307   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24308     INCLUDE_SA=false
24309   fi
24310   if test "x$OPENJDK_TARGET_OS" = xaix ; then
24311     INCLUDE_SA=false
24312   fi
24313   if test "x$OPENJDK_TARGET_OS" = xios; then
24314     INCLUDE_SA=false
24315   fi
24316   if test "x$OPENJDK_TARGET_OS" = xandroid; then
24317     INCLUDE_SA=false
24318   fi
24319 
24320 
24321   # Compress jars
24322   COMPRESS_JARS=false
24323 
24324 
24325 
24326   # Setup default copyright year. Mostly overridden when building close to a new year.
24327 
24328 # Check whether --with-copyright-year was given.
24329 if test "${with_copyright_year+set}" = set; then :
24330   withval=$with_copyright_year;
24331 fi
24332 
24333   if test "x$with_copyright_year" = xyes; then
24334     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24335   elif test "x$with_copyright_year" != x; then
24336     COPYRIGHT_YEAR="$with_copyright_year"
24337   else
24338     COPYRIGHT_YEAR=`$DATE +'%Y'`
24339   fi
24340 
24341 
24342 
24343   # Check whether --enable-keep-packaged-modules was given.
24344 if test "${enable_keep_packaged_modules+set}" = set; then :
24345   enableval=$enable_keep_packaged_modules;
24346 fi
24347 
24348 
24349   if test "x$enable_keep_packaged_modules" = "xyes"; then
24350     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24351 $as_echo_n "checking if packaged modules are kept... " >&6; }
24352     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24353 $as_echo "yes" >&6; }
24354     JLINK_KEEP_PACKAGED_MODULES=true
24355   elif test "x$enable_keep_packaged_modules" = "xno"; then
24356     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24357 $as_echo_n "checking if packaged modules are kept... " >&6; }
24358     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24359 $as_echo "no" >&6; }
24360     JLINK_KEEP_PACKAGED_MODULES=false
24361   elif test "x$enable_keep_packaged_modules" = "x"; then
24362     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24363 $as_echo "yes (default)" >&6; }
24364     JLINK_KEEP_PACKAGED_MODULES=true
24365   else
24366     as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24367   fi
24368 
24369 
24370 
24371 
24372   # Warn user that old version arguments are deprecated.
24373 
24374 
24375 # Check whether --with-milestone was given.
24376 if test "${with_milestone+set}" = set; then :
24377   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24378 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24379 fi
24380 
24381 
24382 
24383 
24384 # Check whether --with-update-version was given.
24385 if test "${with_update_version+set}" = set; then :
24386   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24387 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24388 fi
24389 
24390 
24391 
24392 
24393 # Check whether --with-user-release-suffix was given.
24394 if test "${with_user_release_suffix+set}" = set; then :
24395   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
24396 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24397 fi
24398 
24399 
24400 
24401 
24402 # Check whether --with-build-number was given.
24403 if test "${with_build_number+set}" = set; then :
24404   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24405 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24406 fi
24407 
24408 
24409 
24410   # Source the version numbers file
24411   . $AUTOCONF_DIR/version-numbers
24412 
24413   # Some non-version number information is set in that file
24414 
24415 
24416 
24417 
24418 
24419 
24420 
24421 
24422 
24423   # Override version from arguments
24424 
24425   # If --with-version-string is set, process it first. It is possible to
24426   # override parts with more specific flags, since these are processed later.
24427 
24428 # Check whether --with-version-string was given.
24429 if test "${with_version_string+set}" = set; then :
24430   withval=$with_version_string;
24431 fi
24432 
24433   if test "x$with_version_string" = xyes; then
24434     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24435   elif test "x$with_version_string" != x; then
24436     # Additional [] needed to keep m4 from mangling shell constructs.
24437     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24438       VERSION_MAJOR=${BASH_REMATCH[1]}
24439       VERSION_MINOR=${BASH_REMATCH[3]}
24440       VERSION_SECURITY=${BASH_REMATCH[5]}
24441       VERSION_PATCH=${BASH_REMATCH[7]}
24442       VERSION_PRE=${BASH_REMATCH[9]}
24443       version_plus_separator=${BASH_REMATCH[11]}
24444       VERSION_BUILD=${BASH_REMATCH[12]}
24445       VERSION_OPT=${BASH_REMATCH[14]}
24446       # Unspecified numerical fields are interpreted as 0.
24447       if test "x$VERSION_MINOR" = x; then
24448         VERSION_MINOR=0
24449       fi
24450       if test "x$VERSION_SECURITY" = x; then
24451         VERSION_SECURITY=0
24452       fi
24453       if test "x$VERSION_PATCH" = x; then
24454         VERSION_PATCH=0
24455       fi
24456       if test "x$version_plus_separator" != x \
24457           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24458         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24459       fi
24460       # Stop the version part process from setting default values.
24461       # We still allow them to explicitely override though.
24462       NO_DEFAULT_VERSION_PARTS=true
24463     else
24464       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24465     fi
24466   fi
24467 
24468 
24469 # Check whether --with-version-pre was given.
24470 if test "${with_version_pre+set}" = set; then :
24471   withval=$with_version_pre; with_version_pre_present=true
24472 else
24473   with_version_pre_present=false
24474 fi
24475 
24476 
24477   if test "x$with_version_pre_present" = xtrue; then
24478     if test "x$with_version_pre" = xyes; then
24479       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24480     elif test "x$with_version_pre" = xno; then
24481       # Interpret --without-* as empty string instead of the literal "no"
24482       VERSION_PRE=
24483     else
24484       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24485        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24486       if test "x$VERSION_PRE" != "x$with_version_pre"; then
24487         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24488 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24489       fi
24490     fi
24491   else
24492     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24493       # Default is to use "internal" as pre
24494       VERSION_PRE="internal"
24495     fi
24496   fi
24497 
24498 
24499 # Check whether --with-version-opt was given.
24500 if test "${with_version_opt+set}" = set; then :
24501   withval=$with_version_opt; with_version_opt_present=true
24502 else
24503   with_version_opt_present=false
24504 fi
24505 
24506 
24507   if test "x$with_version_opt_present" = xtrue; then
24508     if test "x$with_version_opt" = xyes; then
24509       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24510     elif test "x$with_version_opt" = xno; then
24511       # Interpret --without-* as empty string instead of the literal "no"
24512       VERSION_OPT=
24513     else
24514       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24515        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24516       if test "x$VERSION_OPT" != "x$with_version_opt"; then
24517         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24518 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24519       fi
24520     fi
24521   else
24522     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24523       # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24524       timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24525       # Outer [ ] to quote m4.
24526        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24527       VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24528     fi
24529   fi
24530 
24531 
24532 # Check whether --with-version-build was given.
24533 if test "${with_version_build+set}" = set; then :
24534   withval=$with_version_build; with_version_build_present=true
24535 else
24536   with_version_build_present=false
24537 fi
24538 
24539 
24540   if test "x$with_version_build_present" = xtrue; then
24541     if test "x$with_version_build" = xyes; then
24542       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24543     elif test "x$with_version_build" = xno; then
24544       # Interpret --without-* as empty string instead of the literal "no"
24545       VERSION_BUILD=
24546     elif test "x$with_version_build" = x; then
24547       VERSION_BUILD=
24548     else
24549 
24550   # Additional [] needed to keep m4 from mangling shell constructs.
24551   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24552     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24553   fi
24554   # Extract the version number without leading zeros.
24555   cleaned_value=${BASH_REMATCH[1]}
24556   if test "x$cleaned_value" = x; then
24557     # Special case for zero
24558     cleaned_value=${BASH_REMATCH[2]}
24559   fi
24560 
24561   if test $cleaned_value -gt 255; then
24562     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24563   fi
24564   if test "x$cleaned_value" != "x$with_version_build"; then
24565     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24566 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24567   fi
24568   VERSION_BUILD=$cleaned_value
24569 
24570     fi
24571   else
24572     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24573       # Default is to not have a build number.
24574       VERSION_BUILD=""
24575       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24576       VERSION_BUILD=0
24577     fi
24578   fi
24579 
24580 
24581 # Check whether --with-version-major was given.
24582 if test "${with_version_major+set}" = set; then :
24583   withval=$with_version_major; with_version_major_present=true
24584 else
24585   with_version_major_present=false
24586 fi
24587 
24588 
24589   if test "x$with_version_major_present" = xtrue; then
24590     if test "x$with_version_major" = xyes; then
24591       as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24592     else
24593 
24594   # Additional [] needed to keep m4 from mangling shell constructs.
24595   if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24596     as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24597   fi
24598   # Extract the version number without leading zeros.
24599   cleaned_value=${BASH_REMATCH[1]}
24600   if test "x$cleaned_value" = x; then
24601     # Special case for zero
24602     cleaned_value=${BASH_REMATCH[2]}
24603   fi
24604 
24605   if test $cleaned_value -gt 255; then
24606     as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24607   fi
24608   if test "x$cleaned_value" != "x$with_version_major"; then
24609     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24610 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24611   fi
24612   VERSION_MAJOR=$cleaned_value
24613 
24614     fi
24615   else
24616     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24617       # Default is to get value from version-numbers
24618       VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24619     fi
24620   fi
24621 
24622 
24623 # Check whether --with-version-minor was given.
24624 if test "${with_version_minor+set}" = set; then :
24625   withval=$with_version_minor; with_version_minor_present=true
24626 else
24627   with_version_minor_present=false
24628 fi
24629 
24630 
24631   if test "x$with_version_minor_present" = xtrue; then
24632     if test "x$with_version_minor" = xyes; then
24633       as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24634     elif test "x$with_version_minor" = xno; then
24635       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24636       VERSION_MINOR=0
24637     elif test "x$with_version_minor" = x; then
24638       VERSION_MINOR=0
24639     else
24640 
24641   # Additional [] needed to keep m4 from mangling shell constructs.
24642   if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24643     as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24644   fi
24645   # Extract the version number without leading zeros.
24646   cleaned_value=${BASH_REMATCH[1]}
24647   if test "x$cleaned_value" = x; then
24648     # Special case for zero
24649     cleaned_value=${BASH_REMATCH[2]}
24650   fi
24651 
24652   if test $cleaned_value -gt 255; then
24653     as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24654   fi
24655   if test "x$cleaned_value" != "x$with_version_minor"; then
24656     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24657 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24658   fi
24659   VERSION_MINOR=$cleaned_value
24660 
24661     fi
24662   else
24663     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24664       # Default is 0, if unspecified
24665       VERSION_MINOR=0
24666     fi
24667   fi
24668 
24669 
24670 # Check whether --with-version-security was given.
24671 if test "${with_version_security+set}" = set; then :
24672   withval=$with_version_security; with_version_security_present=true
24673 else
24674   with_version_security_present=false
24675 fi
24676 
24677 
24678   if test "x$with_version_security_present" = xtrue; then
24679     if test "x$with_version_security" = xyes; then
24680       as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24681     elif test "x$with_version_security" = xno; then
24682       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24683       VERSION_SECURITY=0
24684     elif test "x$with_version_security" = x; then
24685       VERSION_SECURITY=0
24686     else
24687 
24688   # Additional [] needed to keep m4 from mangling shell constructs.
24689   if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24690     as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24691   fi
24692   # Extract the version number without leading zeros.
24693   cleaned_value=${BASH_REMATCH[1]}
24694   if test "x$cleaned_value" = x; then
24695     # Special case for zero
24696     cleaned_value=${BASH_REMATCH[2]}
24697   fi
24698 
24699   if test $cleaned_value -gt 255; then
24700     as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24701   fi
24702   if test "x$cleaned_value" != "x$with_version_security"; then
24703     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24704 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24705   fi
24706   VERSION_SECURITY=$cleaned_value
24707 
24708     fi
24709   else
24710     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24711       # Default is 0, if unspecified
24712       VERSION_SECURITY=0
24713     fi
24714   fi
24715 
24716 
24717 # Check whether --with-version-patch was given.
24718 if test "${with_version_patch+set}" = set; then :
24719   withval=$with_version_patch; with_version_patch_present=true
24720 else
24721   with_version_patch_present=false
24722 fi
24723 
24724 
24725   if test "x$with_version_patch_present" = xtrue; then
24726     if test "x$with_version_patch" = xyes; then
24727       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24728     elif test "x$with_version_patch" = xno; then
24729       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24730       VERSION_PATCH=0
24731     elif test "x$with_version_patch" = x; then
24732       VERSION_PATCH=0
24733     else
24734 
24735   # Additional [] needed to keep m4 from mangling shell constructs.
24736   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24737     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24738   fi
24739   # Extract the version number without leading zeros.
24740   cleaned_value=${BASH_REMATCH[1]}
24741   if test "x$cleaned_value" = x; then
24742     # Special case for zero
24743     cleaned_value=${BASH_REMATCH[2]}
24744   fi
24745 
24746   if test $cleaned_value -gt 255; then
24747     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24748   fi
24749   if test "x$cleaned_value" != "x$with_version_patch"; then
24750     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24751 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24752   fi
24753   VERSION_PATCH=$cleaned_value
24754 
24755     fi
24756   else
24757     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24758       # Default is 0, if unspecified
24759       VERSION_PATCH=0
24760     fi
24761   fi
24762 
24763   # Calculate derived version properties
24764 
24765   # Set VERSION_IS_GA based on if VERSION_PRE has a value
24766   if test "x$VERSION_PRE" = x; then
24767     VERSION_IS_GA=true
24768   else
24769     VERSION_IS_GA=false
24770   fi
24771 
24772   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24773   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24774 
24775   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24776   # Strip trailing zeroes from stripped_version_number
24777   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24778   VERSION_NUMBER=$stripped_version_number
24779 
24780   # The complete version string, with additional build information
24781   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24782     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24783   else
24784     # If either build or opt is set, we need a + separator
24785     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24786   fi
24787 
24788   # The short version string, just VERSION_NUMBER and PRE, if present.
24789   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24790 
24791   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24792 $as_echo_n "checking for version string... " >&6; }
24793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24794 $as_echo "$VERSION_STRING" >&6; }
24795 
24796 
24797 
24798 
24799 
24800 
24801 
24802 
24803 
24804 
24805 
24806 
24807 
24808 
24809 
24810 ###############################################################################
24811 #
24812 # Setup BootJDK, used to bootstrap the build.
24813 #
24814 ###############################################################################
24815 
24816 
24817   BOOT_JDK_FOUND=no
24818 
24819 # Check whether --with-boot-jdk was given.
24820 if test "${with_boot_jdk+set}" = set; then :
24821   withval=$with_boot_jdk;
24822 fi
24823 
24824 
24825   # We look for the Boot JDK through various means, going from more certain to
24826   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24827   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24828   # must check if this is indeed valid; otherwise we'll continue looking.
24829 
24830   # Test: Is bootjdk explicitely set by command line arguments?
24831 
24832   if test "x$BOOT_JDK_FOUND" = xno; then
24833     # Now execute the test
24834 
24835   if test "x$with_boot_jdk" != x; then
24836     BOOT_JDK=$with_boot_jdk
24837     BOOT_JDK_FOUND=maybe
24838     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24839 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24840   fi
24841 
24842 
24843     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24844     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24845       # Do we have a bin/java?
24846       if test ! -x "$BOOT_JDK/bin/java"; then
24847         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24848 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24849         BOOT_JDK_FOUND=no
24850       else
24851         # Do we have a bin/javac?
24852         if test ! -x "$BOOT_JDK/bin/javac"; then
24853           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24854 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24855           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24856 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24857           BOOT_JDK_FOUND=no
24858         else
24859           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24860           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24861 
24862           # Extra M4 quote needed to protect [] in grep expression.
24863           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24864           if test "x$FOUND_CORRECT_VERSION" = x; then
24865             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24866 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24867             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24868 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24869             BOOT_JDK_FOUND=no
24870           else
24871             # We're done! :-)
24872             BOOT_JDK_FOUND=yes
24873 
24874   # Only process if variable expands to non-empty
24875 
24876   if test "x$BOOT_JDK" != x; then
24877     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24878 
24879   # Input might be given as Windows format, start by converting to
24880   # unix format.
24881   path="$BOOT_JDK"
24882   new_path=`$CYGPATH -u "$path"`
24883 
24884   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24885   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24886   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24887   # "foo.exe" is OK but "foo" is an error.
24888   #
24889   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24890   # It is also a way to make sure we got the proper file name for the real test later on.
24891   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24892   if test "x$test_shortpath" = x; then
24893     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24894 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24895     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24896   fi
24897 
24898   # Call helper function which possibly converts this using DOS-style short mode.
24899   # If so, the updated path is stored in $new_path.
24900 
24901   input_path="$new_path"
24902   # Check if we need to convert this using DOS-style short mode. If the path
24903   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24904   # take no chances and rewrite it.
24905   # Note: m4 eats our [], so we need to use [ and ] instead.
24906   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24907   if test "x$has_forbidden_chars" != x; then
24908     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24909     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24910     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24911     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24912       # Going to short mode and back again did indeed matter. Since short mode is
24913       # case insensitive, let's make it lowercase to improve readability.
24914       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24915       # Now convert it back to Unix-style (cygpath)
24916       input_path=`$CYGPATH -u "$shortmode_path"`
24917       new_path="$input_path"
24918     fi
24919   fi
24920 
24921   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24922   if test "x$test_cygdrive_prefix" = x; then
24923     # As a simple fix, exclude /usr/bin since it's not a real path.
24924     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24925       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24926       # a path prefixed by /cygdrive for fixpath to work.
24927       new_path="$CYGWIN_ROOT_PATH$input_path"
24928     fi
24929   fi
24930 
24931 
24932   if test "x$path" != "x$new_path"; then
24933     BOOT_JDK="$new_path"
24934     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24935 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24936   fi
24937 
24938     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24939 
24940   path="$BOOT_JDK"
24941   has_colon=`$ECHO $path | $GREP ^.:`
24942   new_path="$path"
24943   if test "x$has_colon" = x; then
24944     # Not in mixed or Windows style, start by that.
24945     new_path=`cmd //c echo $path`
24946   fi
24947 
24948 
24949   input_path="$new_path"
24950   # Check if we need to convert this using DOS-style short mode. If the path
24951   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24952   # take no chances and rewrite it.
24953   # Note: m4 eats our [], so we need to use [ and ] instead.
24954   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24955   if test "x$has_forbidden_chars" != x; then
24956     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24957     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24958   fi
24959 
24960 
24961   windows_path="$new_path"
24962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24963     unix_path=`$CYGPATH -u "$windows_path"`
24964     new_path="$unix_path"
24965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24966     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24967     new_path="$unix_path"
24968   fi
24969 
24970   if test "x$path" != "x$new_path"; then
24971     BOOT_JDK="$new_path"
24972     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24973 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24974   fi
24975 
24976   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24977   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24978 
24979     else
24980       # We're on a unix platform. Hooray! :)
24981       path="$BOOT_JDK"
24982       has_space=`$ECHO "$path" | $GREP " "`
24983       if test "x$has_space" != x; then
24984         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24985 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24986         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24987       fi
24988 
24989       # Use eval to expand a potential ~
24990       eval path="$path"
24991       if test ! -f "$path" && test ! -d "$path"; then
24992         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24993       fi
24994 
24995       if test -d "$path"; then
24996         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24997       else
24998         dir="`$DIRNAME "$path"`"
24999         base="`$BASENAME "$path"`"
25000         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25001       fi
25002     fi
25003   fi
25004 
25005             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25006 $as_echo_n "checking for Boot JDK... " >&6; }
25007             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25008 $as_echo "$BOOT_JDK" >&6; }
25009             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25010 $as_echo_n "checking Boot JDK version... " >&6; }
25011             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25012             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25013 $as_echo "$BOOT_JDK_VERSION" >&6; }
25014           fi # end check jdk version
25015         fi # end check javac
25016       fi # end check java
25017     fi # end check boot jdk found
25018   fi
25019 
25020   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25021     # Having specified an argument which is incorrect will produce an instant failure;
25022     # we should not go on looking
25023     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25024   fi
25025 
25026   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25027 
25028   if test "x$BOOT_JDK_FOUND" = xno; then
25029     # Now execute the test
25030 
25031   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
25032     # First check at user selected default
25033 
25034   if test "x$BOOT_JDK_FOUND" = xno; then
25035     # Now execute the test
25036 
25037   if test -x /usr/libexec/java_home; then
25038     BOOT_JDK=`/usr/libexec/java_home `
25039     BOOT_JDK_FOUND=maybe
25040     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25041 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25042   fi
25043 
25044 
25045     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25046     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25047       # Do we have a bin/java?
25048       if test ! -x "$BOOT_JDK/bin/java"; then
25049         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25050 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25051         BOOT_JDK_FOUND=no
25052       else
25053         # Do we have a bin/javac?
25054         if test ! -x "$BOOT_JDK/bin/javac"; then
25055           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25056 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25057           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25058 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25059           BOOT_JDK_FOUND=no
25060         else
25061           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25062           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25063 
25064           # Extra M4 quote needed to protect [] in grep expression.
25065           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25066           if test "x$FOUND_CORRECT_VERSION" = x; then
25067             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25068 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25069             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25070 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25071             BOOT_JDK_FOUND=no
25072           else
25073             # We're done! :-)
25074             BOOT_JDK_FOUND=yes
25075 
25076   # Only process if variable expands to non-empty
25077 
25078   if test "x$BOOT_JDK" != x; then
25079     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25080 
25081   # Input might be given as Windows format, start by converting to
25082   # unix format.
25083   path="$BOOT_JDK"
25084   new_path=`$CYGPATH -u "$path"`
25085 
25086   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25087   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25088   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25089   # "foo.exe" is OK but "foo" is an error.
25090   #
25091   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25092   # It is also a way to make sure we got the proper file name for the real test later on.
25093   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25094   if test "x$test_shortpath" = x; then
25095     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25096 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25097     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25098   fi
25099 
25100   # Call helper function which possibly converts this using DOS-style short mode.
25101   # If so, the updated path is stored in $new_path.
25102 
25103   input_path="$new_path"
25104   # Check if we need to convert this using DOS-style short mode. If the path
25105   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25106   # take no chances and rewrite it.
25107   # Note: m4 eats our [], so we need to use [ and ] instead.
25108   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25109   if test "x$has_forbidden_chars" != x; then
25110     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25111     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25112     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25113     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25114       # Going to short mode and back again did indeed matter. Since short mode is
25115       # case insensitive, let's make it lowercase to improve readability.
25116       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25117       # Now convert it back to Unix-style (cygpath)
25118       input_path=`$CYGPATH -u "$shortmode_path"`
25119       new_path="$input_path"
25120     fi
25121   fi
25122 
25123   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25124   if test "x$test_cygdrive_prefix" = x; then
25125     # As a simple fix, exclude /usr/bin since it's not a real path.
25126     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25127       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25128       # a path prefixed by /cygdrive for fixpath to work.
25129       new_path="$CYGWIN_ROOT_PATH$input_path"
25130     fi
25131   fi
25132 
25133 
25134   if test "x$path" != "x$new_path"; then
25135     BOOT_JDK="$new_path"
25136     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25137 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25138   fi
25139 
25140     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25141 
25142   path="$BOOT_JDK"
25143   has_colon=`$ECHO $path | $GREP ^.:`
25144   new_path="$path"
25145   if test "x$has_colon" = x; then
25146     # Not in mixed or Windows style, start by that.
25147     new_path=`cmd //c echo $path`
25148   fi
25149 
25150 
25151   input_path="$new_path"
25152   # Check if we need to convert this using DOS-style short mode. If the path
25153   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25154   # take no chances and rewrite it.
25155   # Note: m4 eats our [], so we need to use [ and ] instead.
25156   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25157   if test "x$has_forbidden_chars" != x; then
25158     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25159     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25160   fi
25161 
25162 
25163   windows_path="$new_path"
25164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25165     unix_path=`$CYGPATH -u "$windows_path"`
25166     new_path="$unix_path"
25167   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25168     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25169     new_path="$unix_path"
25170   fi
25171 
25172   if test "x$path" != "x$new_path"; then
25173     BOOT_JDK="$new_path"
25174     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25175 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25176   fi
25177 
25178   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25179   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25180 
25181     else
25182       # We're on a unix platform. Hooray! :)
25183       path="$BOOT_JDK"
25184       has_space=`$ECHO "$path" | $GREP " "`
25185       if test "x$has_space" != x; then
25186         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25187 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25188         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25189       fi
25190 
25191       # Use eval to expand a potential ~
25192       eval path="$path"
25193       if test ! -f "$path" && test ! -d "$path"; then
25194         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25195       fi
25196 
25197       if test -d "$path"; then
25198         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25199       else
25200         dir="`$DIRNAME "$path"`"
25201         base="`$BASENAME "$path"`"
25202         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25203       fi
25204     fi
25205   fi
25206 
25207             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25208 $as_echo_n "checking for Boot JDK... " >&6; }
25209             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25210 $as_echo "$BOOT_JDK" >&6; }
25211             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25212 $as_echo_n "checking Boot JDK version... " >&6; }
25213             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25214             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25215 $as_echo "$BOOT_JDK_VERSION" >&6; }
25216           fi # end check jdk version
25217         fi # end check javac
25218       fi # end check java
25219     fi # end check boot jdk found
25220   fi
25221 
25222     # If that did not work out (e.g. too old), try explicit versions instead
25223 
25224   if test "x$BOOT_JDK_FOUND" = xno; then
25225     # Now execute the test
25226 
25227   if test -x /usr/libexec/java_home; then
25228     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25229     BOOT_JDK_FOUND=maybe
25230     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25231 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25232   fi
25233 
25234 
25235     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25236     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25237       # Do we have a bin/java?
25238       if test ! -x "$BOOT_JDK/bin/java"; then
25239         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25240 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25241         BOOT_JDK_FOUND=no
25242       else
25243         # Do we have a bin/javac?
25244         if test ! -x "$BOOT_JDK/bin/javac"; then
25245           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25246 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25247           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25248 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25249           BOOT_JDK_FOUND=no
25250         else
25251           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25252           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25253 
25254           # Extra M4 quote needed to protect [] in grep expression.
25255           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25256           if test "x$FOUND_CORRECT_VERSION" = x; then
25257             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25258 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25259             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25260 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25261             BOOT_JDK_FOUND=no
25262           else
25263             # We're done! :-)
25264             BOOT_JDK_FOUND=yes
25265 
25266   # Only process if variable expands to non-empty
25267 
25268   if test "x$BOOT_JDK" != x; then
25269     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25270 
25271   # Input might be given as Windows format, start by converting to
25272   # unix format.
25273   path="$BOOT_JDK"
25274   new_path=`$CYGPATH -u "$path"`
25275 
25276   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25277   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25278   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25279   # "foo.exe" is OK but "foo" is an error.
25280   #
25281   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25282   # It is also a way to make sure we got the proper file name for the real test later on.
25283   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25284   if test "x$test_shortpath" = x; then
25285     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25286 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25287     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25288   fi
25289 
25290   # Call helper function which possibly converts this using DOS-style short mode.
25291   # If so, the updated path is stored in $new_path.
25292 
25293   input_path="$new_path"
25294   # Check if we need to convert this using DOS-style short mode. If the path
25295   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25296   # take no chances and rewrite it.
25297   # Note: m4 eats our [], so we need to use [ and ] instead.
25298   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25299   if test "x$has_forbidden_chars" != x; then
25300     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25301     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25302     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25303     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25304       # Going to short mode and back again did indeed matter. Since short mode is
25305       # case insensitive, let's make it lowercase to improve readability.
25306       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25307       # Now convert it back to Unix-style (cygpath)
25308       input_path=`$CYGPATH -u "$shortmode_path"`
25309       new_path="$input_path"
25310     fi
25311   fi
25312 
25313   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25314   if test "x$test_cygdrive_prefix" = x; then
25315     # As a simple fix, exclude /usr/bin since it's not a real path.
25316     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25317       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25318       # a path prefixed by /cygdrive for fixpath to work.
25319       new_path="$CYGWIN_ROOT_PATH$input_path"
25320     fi
25321   fi
25322 
25323 
25324   if test "x$path" != "x$new_path"; then
25325     BOOT_JDK="$new_path"
25326     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25327 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25328   fi
25329 
25330     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25331 
25332   path="$BOOT_JDK"
25333   has_colon=`$ECHO $path | $GREP ^.:`
25334   new_path="$path"
25335   if test "x$has_colon" = x; then
25336     # Not in mixed or Windows style, start by that.
25337     new_path=`cmd //c echo $path`
25338   fi
25339 
25340 
25341   input_path="$new_path"
25342   # Check if we need to convert this using DOS-style short mode. If the path
25343   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25344   # take no chances and rewrite it.
25345   # Note: m4 eats our [], so we need to use [ and ] instead.
25346   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25347   if test "x$has_forbidden_chars" != x; then
25348     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25349     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25350   fi
25351 
25352 
25353   windows_path="$new_path"
25354   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25355     unix_path=`$CYGPATH -u "$windows_path"`
25356     new_path="$unix_path"
25357   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25358     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25359     new_path="$unix_path"
25360   fi
25361 
25362   if test "x$path" != "x$new_path"; then
25363     BOOT_JDK="$new_path"
25364     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25365 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25366   fi
25367 
25368   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25369   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25370 
25371     else
25372       # We're on a unix platform. Hooray! :)
25373       path="$BOOT_JDK"
25374       has_space=`$ECHO "$path" | $GREP " "`
25375       if test "x$has_space" != x; then
25376         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25377 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25378         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25379       fi
25380 
25381       # Use eval to expand a potential ~
25382       eval path="$path"
25383       if test ! -f "$path" && test ! -d "$path"; then
25384         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25385       fi
25386 
25387       if test -d "$path"; then
25388         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25389       else
25390         dir="`$DIRNAME "$path"`"
25391         base="`$BASENAME "$path"`"
25392         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25393       fi
25394     fi
25395   fi
25396 
25397             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25398 $as_echo_n "checking for Boot JDK... " >&6; }
25399             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25400 $as_echo "$BOOT_JDK" >&6; }
25401             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25402 $as_echo_n "checking Boot JDK version... " >&6; }
25403             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25404             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25405 $as_echo "$BOOT_JDK_VERSION" >&6; }
25406           fi # end check jdk version
25407         fi # end check javac
25408       fi # end check java
25409     fi # end check boot jdk found
25410   fi
25411 
25412 
25413   if test "x$BOOT_JDK_FOUND" = xno; then
25414     # Now execute the test
25415 
25416   if test -x /usr/libexec/java_home; then
25417     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25418     BOOT_JDK_FOUND=maybe
25419     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25420 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25421   fi
25422 
25423 
25424     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25425     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25426       # Do we have a bin/java?
25427       if test ! -x "$BOOT_JDK/bin/java"; then
25428         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25429 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25430         BOOT_JDK_FOUND=no
25431       else
25432         # Do we have a bin/javac?
25433         if test ! -x "$BOOT_JDK/bin/javac"; then
25434           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25435 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25436           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25437 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25438           BOOT_JDK_FOUND=no
25439         else
25440           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25441           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25442 
25443           # Extra M4 quote needed to protect [] in grep expression.
25444           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25445           if test "x$FOUND_CORRECT_VERSION" = x; then
25446             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25447 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25448             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25449 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25450             BOOT_JDK_FOUND=no
25451           else
25452             # We're done! :-)
25453             BOOT_JDK_FOUND=yes
25454 
25455   # Only process if variable expands to non-empty
25456 
25457   if test "x$BOOT_JDK" != x; then
25458     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25459 
25460   # Input might be given as Windows format, start by converting to
25461   # unix format.
25462   path="$BOOT_JDK"
25463   new_path=`$CYGPATH -u "$path"`
25464 
25465   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25466   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25467   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25468   # "foo.exe" is OK but "foo" is an error.
25469   #
25470   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25471   # It is also a way to make sure we got the proper file name for the real test later on.
25472   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25473   if test "x$test_shortpath" = x; then
25474     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25475 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25476     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25477   fi
25478 
25479   # Call helper function which possibly converts this using DOS-style short mode.
25480   # If so, the updated path is stored in $new_path.
25481 
25482   input_path="$new_path"
25483   # Check if we need to convert this using DOS-style short mode. If the path
25484   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25485   # take no chances and rewrite it.
25486   # Note: m4 eats our [], so we need to use [ and ] instead.
25487   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25488   if test "x$has_forbidden_chars" != x; then
25489     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25490     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25491     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25492     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25493       # Going to short mode and back again did indeed matter. Since short mode is
25494       # case insensitive, let's make it lowercase to improve readability.
25495       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25496       # Now convert it back to Unix-style (cygpath)
25497       input_path=`$CYGPATH -u "$shortmode_path"`
25498       new_path="$input_path"
25499     fi
25500   fi
25501 
25502   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25503   if test "x$test_cygdrive_prefix" = x; then
25504     # As a simple fix, exclude /usr/bin since it's not a real path.
25505     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25506       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25507       # a path prefixed by /cygdrive for fixpath to work.
25508       new_path="$CYGWIN_ROOT_PATH$input_path"
25509     fi
25510   fi
25511 
25512 
25513   if test "x$path" != "x$new_path"; then
25514     BOOT_JDK="$new_path"
25515     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25516 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25517   fi
25518 
25519     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25520 
25521   path="$BOOT_JDK"
25522   has_colon=`$ECHO $path | $GREP ^.:`
25523   new_path="$path"
25524   if test "x$has_colon" = x; then
25525     # Not in mixed or Windows style, start by that.
25526     new_path=`cmd //c echo $path`
25527   fi
25528 
25529 
25530   input_path="$new_path"
25531   # Check if we need to convert this using DOS-style short mode. If the path
25532   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25533   # take no chances and rewrite it.
25534   # Note: m4 eats our [], so we need to use [ and ] instead.
25535   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25536   if test "x$has_forbidden_chars" != x; then
25537     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25538     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25539   fi
25540 
25541 
25542   windows_path="$new_path"
25543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25544     unix_path=`$CYGPATH -u "$windows_path"`
25545     new_path="$unix_path"
25546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25547     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25548     new_path="$unix_path"
25549   fi
25550 
25551   if test "x$path" != "x$new_path"; then
25552     BOOT_JDK="$new_path"
25553     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25554 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25555   fi
25556 
25557   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25558   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25559 
25560     else
25561       # We're on a unix platform. Hooray! :)
25562       path="$BOOT_JDK"
25563       has_space=`$ECHO "$path" | $GREP " "`
25564       if test "x$has_space" != x; then
25565         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25566 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25567         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25568       fi
25569 
25570       # Use eval to expand a potential ~
25571       eval path="$path"
25572       if test ! -f "$path" && test ! -d "$path"; then
25573         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25574       fi
25575 
25576       if test -d "$path"; then
25577         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25578       else
25579         dir="`$DIRNAME "$path"`"
25580         base="`$BASENAME "$path"`"
25581         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25582       fi
25583     fi
25584   fi
25585 
25586             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25587 $as_echo_n "checking for Boot JDK... " >&6; }
25588             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25589 $as_echo "$BOOT_JDK" >&6; }
25590             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25591 $as_echo_n "checking Boot JDK version... " >&6; }
25592             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25593             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25594 $as_echo "$BOOT_JDK_VERSION" >&6; }
25595           fi # end check jdk version
25596         fi # end check javac
25597       fi # end check java
25598     fi # end check boot jdk found
25599   fi
25600 
25601 
25602   if test "x$BOOT_JDK_FOUND" = xno; then
25603     # Now execute the test
25604 
25605   if test -x /usr/libexec/java_home; then
25606     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25607     BOOT_JDK_FOUND=maybe
25608     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25609 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25610   fi
25611 
25612 
25613     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25614     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25615       # Do we have a bin/java?
25616       if test ! -x "$BOOT_JDK/bin/java"; then
25617         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25618 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25619         BOOT_JDK_FOUND=no
25620       else
25621         # Do we have a bin/javac?
25622         if test ! -x "$BOOT_JDK/bin/javac"; then
25623           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25624 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25625           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25626 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25627           BOOT_JDK_FOUND=no
25628         else
25629           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25630           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25631 
25632           # Extra M4 quote needed to protect [] in grep expression.
25633           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25634           if test "x$FOUND_CORRECT_VERSION" = x; then
25635             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25636 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25637             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25638 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25639             BOOT_JDK_FOUND=no
25640           else
25641             # We're done! :-)
25642             BOOT_JDK_FOUND=yes
25643 
25644   # Only process if variable expands to non-empty
25645 
25646   if test "x$BOOT_JDK" != x; then
25647     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25648 
25649   # Input might be given as Windows format, start by converting to
25650   # unix format.
25651   path="$BOOT_JDK"
25652   new_path=`$CYGPATH -u "$path"`
25653 
25654   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25655   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25656   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25657   # "foo.exe" is OK but "foo" is an error.
25658   #
25659   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25660   # It is also a way to make sure we got the proper file name for the real test later on.
25661   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25662   if test "x$test_shortpath" = x; then
25663     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25664 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25665     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25666   fi
25667 
25668   # Call helper function which possibly converts this using DOS-style short mode.
25669   # If so, the updated path is stored in $new_path.
25670 
25671   input_path="$new_path"
25672   # Check if we need to convert this using DOS-style short mode. If the path
25673   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25674   # take no chances and rewrite it.
25675   # Note: m4 eats our [], so we need to use [ and ] instead.
25676   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25677   if test "x$has_forbidden_chars" != x; then
25678     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25679     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25680     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25681     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25682       # Going to short mode and back again did indeed matter. Since short mode is
25683       # case insensitive, let's make it lowercase to improve readability.
25684       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25685       # Now convert it back to Unix-style (cygpath)
25686       input_path=`$CYGPATH -u "$shortmode_path"`
25687       new_path="$input_path"
25688     fi
25689   fi
25690 
25691   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25692   if test "x$test_cygdrive_prefix" = x; then
25693     # As a simple fix, exclude /usr/bin since it's not a real path.
25694     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25695       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25696       # a path prefixed by /cygdrive for fixpath to work.
25697       new_path="$CYGWIN_ROOT_PATH$input_path"
25698     fi
25699   fi
25700 
25701 
25702   if test "x$path" != "x$new_path"; then
25703     BOOT_JDK="$new_path"
25704     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25705 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25706   fi
25707 
25708     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25709 
25710   path="$BOOT_JDK"
25711   has_colon=`$ECHO $path | $GREP ^.:`
25712   new_path="$path"
25713   if test "x$has_colon" = x; then
25714     # Not in mixed or Windows style, start by that.
25715     new_path=`cmd //c echo $path`
25716   fi
25717 
25718 
25719   input_path="$new_path"
25720   # Check if we need to convert this using DOS-style short mode. If the path
25721   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25722   # take no chances and rewrite it.
25723   # Note: m4 eats our [], so we need to use [ and ] instead.
25724   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25725   if test "x$has_forbidden_chars" != x; then
25726     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25727     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25728   fi
25729 
25730 
25731   windows_path="$new_path"
25732   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25733     unix_path=`$CYGPATH -u "$windows_path"`
25734     new_path="$unix_path"
25735   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25736     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25737     new_path="$unix_path"
25738   fi
25739 
25740   if test "x$path" != "x$new_path"; then
25741     BOOT_JDK="$new_path"
25742     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25743 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25744   fi
25745 
25746   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25747   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25748 
25749     else
25750       # We're on a unix platform. Hooray! :)
25751       path="$BOOT_JDK"
25752       has_space=`$ECHO "$path" | $GREP " "`
25753       if test "x$has_space" != x; then
25754         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25755 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25756         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25757       fi
25758 
25759       # Use eval to expand a potential ~
25760       eval path="$path"
25761       if test ! -f "$path" && test ! -d "$path"; then
25762         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25763       fi
25764 
25765       if test -d "$path"; then
25766         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25767       else
25768         dir="`$DIRNAME "$path"`"
25769         base="`$BASENAME "$path"`"
25770         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25771       fi
25772     fi
25773   fi
25774 
25775             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25776 $as_echo_n "checking for Boot JDK... " >&6; }
25777             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25778 $as_echo "$BOOT_JDK" >&6; }
25779             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25780 $as_echo_n "checking Boot JDK version... " >&6; }
25781             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25782             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25783 $as_echo "$BOOT_JDK_VERSION" >&6; }
25784           fi # end check jdk version
25785         fi # end check javac
25786       fi # end check java
25787     fi # end check boot jdk found
25788   fi
25789 
25790   fi
25791 
25792 
25793     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25794     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25795       # Do we have a bin/java?
25796       if test ! -x "$BOOT_JDK/bin/java"; then
25797         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25798 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25799         BOOT_JDK_FOUND=no
25800       else
25801         # Do we have a bin/javac?
25802         if test ! -x "$BOOT_JDK/bin/javac"; then
25803           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25804 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25805           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25806 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25807           BOOT_JDK_FOUND=no
25808         else
25809           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25810           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25811 
25812           # Extra M4 quote needed to protect [] in grep expression.
25813           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25814           if test "x$FOUND_CORRECT_VERSION" = x; then
25815             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25816 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25817             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25818 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25819             BOOT_JDK_FOUND=no
25820           else
25821             # We're done! :-)
25822             BOOT_JDK_FOUND=yes
25823 
25824   # Only process if variable expands to non-empty
25825 
25826   if test "x$BOOT_JDK" != x; then
25827     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25828 
25829   # Input might be given as Windows format, start by converting to
25830   # unix format.
25831   path="$BOOT_JDK"
25832   new_path=`$CYGPATH -u "$path"`
25833 
25834   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25835   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25836   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25837   # "foo.exe" is OK but "foo" is an error.
25838   #
25839   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25840   # It is also a way to make sure we got the proper file name for the real test later on.
25841   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25842   if test "x$test_shortpath" = x; then
25843     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25844 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25845     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25846   fi
25847 
25848   # Call helper function which possibly converts this using DOS-style short mode.
25849   # If so, the updated path is stored in $new_path.
25850 
25851   input_path="$new_path"
25852   # Check if we need to convert this using DOS-style short mode. If the path
25853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25854   # take no chances and rewrite it.
25855   # Note: m4 eats our [], so we need to use [ and ] instead.
25856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25857   if test "x$has_forbidden_chars" != x; then
25858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25859     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25860     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25861     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25862       # Going to short mode and back again did indeed matter. Since short mode is
25863       # case insensitive, let's make it lowercase to improve readability.
25864       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25865       # Now convert it back to Unix-style (cygpath)
25866       input_path=`$CYGPATH -u "$shortmode_path"`
25867       new_path="$input_path"
25868     fi
25869   fi
25870 
25871   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25872   if test "x$test_cygdrive_prefix" = x; then
25873     # As a simple fix, exclude /usr/bin since it's not a real path.
25874     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25875       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25876       # a path prefixed by /cygdrive for fixpath to work.
25877       new_path="$CYGWIN_ROOT_PATH$input_path"
25878     fi
25879   fi
25880 
25881 
25882   if test "x$path" != "x$new_path"; then
25883     BOOT_JDK="$new_path"
25884     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25885 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25886   fi
25887 
25888     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25889 
25890   path="$BOOT_JDK"
25891   has_colon=`$ECHO $path | $GREP ^.:`
25892   new_path="$path"
25893   if test "x$has_colon" = x; then
25894     # Not in mixed or Windows style, start by that.
25895     new_path=`cmd //c echo $path`
25896   fi
25897 
25898 
25899   input_path="$new_path"
25900   # Check if we need to convert this using DOS-style short mode. If the path
25901   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25902   # take no chances and rewrite it.
25903   # Note: m4 eats our [], so we need to use [ and ] instead.
25904   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25905   if test "x$has_forbidden_chars" != x; then
25906     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25907     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25908   fi
25909 
25910 
25911   windows_path="$new_path"
25912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25913     unix_path=`$CYGPATH -u "$windows_path"`
25914     new_path="$unix_path"
25915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25917     new_path="$unix_path"
25918   fi
25919 
25920   if test "x$path" != "x$new_path"; then
25921     BOOT_JDK="$new_path"
25922     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25923 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25924   fi
25925 
25926   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25927   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25928 
25929     else
25930       # We're on a unix platform. Hooray! :)
25931       path="$BOOT_JDK"
25932       has_space=`$ECHO "$path" | $GREP " "`
25933       if test "x$has_space" != x; then
25934         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25935 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25936         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25937       fi
25938 
25939       # Use eval to expand a potential ~
25940       eval path="$path"
25941       if test ! -f "$path" && test ! -d "$path"; then
25942         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25943       fi
25944 
25945       if test -d "$path"; then
25946         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25947       else
25948         dir="`$DIRNAME "$path"`"
25949         base="`$BASENAME "$path"`"
25950         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25951       fi
25952     fi
25953   fi
25954 
25955             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25956 $as_echo_n "checking for Boot JDK... " >&6; }
25957             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25958 $as_echo "$BOOT_JDK" >&6; }
25959             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25960 $as_echo_n "checking Boot JDK version... " >&6; }
25961             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25962             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25963 $as_echo "$BOOT_JDK_VERSION" >&6; }
25964           fi # end check jdk version
25965         fi # end check javac
25966       fi # end check java
25967     fi # end check boot jdk found
25968   fi
25969 
25970 
25971   # Test: Is $JAVA_HOME set?
25972 
25973   if test "x$BOOT_JDK_FOUND" = xno; then
25974     # Now execute the test
25975 
25976   if test "x$JAVA_HOME" != x; then
25977     JAVA_HOME_PROCESSED="$JAVA_HOME"
25978 
25979   # Only process if variable expands to non-empty
25980 
25981   if test "x$JAVA_HOME_PROCESSED" != x; then
25982     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25983 
25984   # Input might be given as Windows format, start by converting to
25985   # unix format.
25986   path="$JAVA_HOME_PROCESSED"
25987   new_path=`$CYGPATH -u "$path"`
25988 
25989   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25990   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25991   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25992   # "foo.exe" is OK but "foo" is an error.
25993   #
25994   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25995   # It is also a way to make sure we got the proper file name for the real test later on.
25996   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25997   if test "x$test_shortpath" = x; then
25998     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25999 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26000     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26001   fi
26002 
26003   # Call helper function which possibly converts this using DOS-style short mode.
26004   # If so, the updated path is stored in $new_path.
26005 
26006   input_path="$new_path"
26007   # Check if we need to convert this using DOS-style short mode. If the path
26008   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26009   # take no chances and rewrite it.
26010   # Note: m4 eats our [], so we need to use [ and ] instead.
26011   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26012   if test "x$has_forbidden_chars" != x; then
26013     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26014     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26015     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26016     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26017       # Going to short mode and back again did indeed matter. Since short mode is
26018       # case insensitive, let's make it lowercase to improve readability.
26019       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26020       # Now convert it back to Unix-style (cygpath)
26021       input_path=`$CYGPATH -u "$shortmode_path"`
26022       new_path="$input_path"
26023     fi
26024   fi
26025 
26026   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26027   if test "x$test_cygdrive_prefix" = x; then
26028     # As a simple fix, exclude /usr/bin since it's not a real path.
26029     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26030       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26031       # a path prefixed by /cygdrive for fixpath to work.
26032       new_path="$CYGWIN_ROOT_PATH$input_path"
26033     fi
26034   fi
26035 
26036 
26037   if test "x$path" != "x$new_path"; then
26038     JAVA_HOME_PROCESSED="$new_path"
26039     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26040 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26041   fi
26042 
26043     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26044 
26045   path="$JAVA_HOME_PROCESSED"
26046   has_colon=`$ECHO $path | $GREP ^.:`
26047   new_path="$path"
26048   if test "x$has_colon" = x; then
26049     # Not in mixed or Windows style, start by that.
26050     new_path=`cmd //c echo $path`
26051   fi
26052 
26053 
26054   input_path="$new_path"
26055   # Check if we need to convert this using DOS-style short mode. If the path
26056   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26057   # take no chances and rewrite it.
26058   # Note: m4 eats our [], so we need to use [ and ] instead.
26059   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26060   if test "x$has_forbidden_chars" != x; then
26061     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26062     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26063   fi
26064 
26065 
26066   windows_path="$new_path"
26067   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26068     unix_path=`$CYGPATH -u "$windows_path"`
26069     new_path="$unix_path"
26070   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26071     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26072     new_path="$unix_path"
26073   fi
26074 
26075   if test "x$path" != "x$new_path"; then
26076     JAVA_HOME_PROCESSED="$new_path"
26077     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26078 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26079   fi
26080 
26081   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26082   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26083 
26084     else
26085       # We're on a unix platform. Hooray! :)
26086       path="$JAVA_HOME_PROCESSED"
26087       has_space=`$ECHO "$path" | $GREP " "`
26088       if test "x$has_space" != x; then
26089         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26090 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26091         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26092       fi
26093 
26094       # Use eval to expand a potential ~
26095       eval path="$path"
26096       if test ! -f "$path" && test ! -d "$path"; then
26097         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26098       fi
26099 
26100       if test -d "$path"; then
26101         JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26102       else
26103         dir="`$DIRNAME "$path"`"
26104         base="`$BASENAME "$path"`"
26105         JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26106       fi
26107     fi
26108   fi
26109 
26110     if test ! -d "$JAVA_HOME_PROCESSED"; then
26111       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26112 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26113     else
26114       # Aha, the user has set a JAVA_HOME
26115       # let us use that as the Boot JDK.
26116       BOOT_JDK="$JAVA_HOME_PROCESSED"
26117       BOOT_JDK_FOUND=maybe
26118       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26119 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26120     fi
26121   fi
26122 
26123 
26124     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26125     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26126       # Do we have a bin/java?
26127       if test ! -x "$BOOT_JDK/bin/java"; then
26128         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26129 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26130         BOOT_JDK_FOUND=no
26131       else
26132         # Do we have a bin/javac?
26133         if test ! -x "$BOOT_JDK/bin/javac"; then
26134           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26135 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26136           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26137 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26138           BOOT_JDK_FOUND=no
26139         else
26140           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26141           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26142 
26143           # Extra M4 quote needed to protect [] in grep expression.
26144           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26145           if test "x$FOUND_CORRECT_VERSION" = x; then
26146             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26147 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26148             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26149 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26150             BOOT_JDK_FOUND=no
26151           else
26152             # We're done! :-)
26153             BOOT_JDK_FOUND=yes
26154 
26155   # Only process if variable expands to non-empty
26156 
26157   if test "x$BOOT_JDK" != x; then
26158     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26159 
26160   # Input might be given as Windows format, start by converting to
26161   # unix format.
26162   path="$BOOT_JDK"
26163   new_path=`$CYGPATH -u "$path"`
26164 
26165   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26166   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26167   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26168   # "foo.exe" is OK but "foo" is an error.
26169   #
26170   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26171   # It is also a way to make sure we got the proper file name for the real test later on.
26172   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26173   if test "x$test_shortpath" = x; then
26174     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26175 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26176     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26177   fi
26178 
26179   # Call helper function which possibly converts this using DOS-style short mode.
26180   # If so, the updated path is stored in $new_path.
26181 
26182   input_path="$new_path"
26183   # Check if we need to convert this using DOS-style short mode. If the path
26184   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26185   # take no chances and rewrite it.
26186   # Note: m4 eats our [], so we need to use [ and ] instead.
26187   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26188   if test "x$has_forbidden_chars" != x; then
26189     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26190     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26191     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26192     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26193       # Going to short mode and back again did indeed matter. Since short mode is
26194       # case insensitive, let's make it lowercase to improve readability.
26195       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26196       # Now convert it back to Unix-style (cygpath)
26197       input_path=`$CYGPATH -u "$shortmode_path"`
26198       new_path="$input_path"
26199     fi
26200   fi
26201 
26202   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26203   if test "x$test_cygdrive_prefix" = x; then
26204     # As a simple fix, exclude /usr/bin since it's not a real path.
26205     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26206       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26207       # a path prefixed by /cygdrive for fixpath to work.
26208       new_path="$CYGWIN_ROOT_PATH$input_path"
26209     fi
26210   fi
26211 
26212 
26213   if test "x$path" != "x$new_path"; then
26214     BOOT_JDK="$new_path"
26215     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26216 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26217   fi
26218 
26219     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26220 
26221   path="$BOOT_JDK"
26222   has_colon=`$ECHO $path | $GREP ^.:`
26223   new_path="$path"
26224   if test "x$has_colon" = x; then
26225     # Not in mixed or Windows style, start by that.
26226     new_path=`cmd //c echo $path`
26227   fi
26228 
26229 
26230   input_path="$new_path"
26231   # Check if we need to convert this using DOS-style short mode. If the path
26232   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26233   # take no chances and rewrite it.
26234   # Note: m4 eats our [], so we need to use [ and ] instead.
26235   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26236   if test "x$has_forbidden_chars" != x; then
26237     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26238     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26239   fi
26240 
26241 
26242   windows_path="$new_path"
26243   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26244     unix_path=`$CYGPATH -u "$windows_path"`
26245     new_path="$unix_path"
26246   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26247     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26248     new_path="$unix_path"
26249   fi
26250 
26251   if test "x$path" != "x$new_path"; then
26252     BOOT_JDK="$new_path"
26253     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26254 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26255   fi
26256 
26257   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26258   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26259 
26260     else
26261       # We're on a unix platform. Hooray! :)
26262       path="$BOOT_JDK"
26263       has_space=`$ECHO "$path" | $GREP " "`
26264       if test "x$has_space" != x; then
26265         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26266 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26267         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26268       fi
26269 
26270       # Use eval to expand a potential ~
26271       eval path="$path"
26272       if test ! -f "$path" && test ! -d "$path"; then
26273         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26274       fi
26275 
26276       if test -d "$path"; then
26277         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26278       else
26279         dir="`$DIRNAME "$path"`"
26280         base="`$BASENAME "$path"`"
26281         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26282       fi
26283     fi
26284   fi
26285 
26286             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26287 $as_echo_n "checking for Boot JDK... " >&6; }
26288             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26289 $as_echo "$BOOT_JDK" >&6; }
26290             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26291 $as_echo_n "checking Boot JDK version... " >&6; }
26292             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26293             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26294 $as_echo "$BOOT_JDK_VERSION" >&6; }
26295           fi # end check jdk version
26296         fi # end check javac
26297       fi # end check java
26298     fi # end check boot jdk found
26299   fi
26300 
26301 
26302   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26303 
26304   if test "x$BOOT_JDK_FOUND" = xno; then
26305     # Now execute the test
26306 
26307   # Extract the first word of "javac", so it can be a program name with args.
26308 set dummy javac; ac_word=$2
26309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26310 $as_echo_n "checking for $ac_word... " >&6; }
26311 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26312   $as_echo_n "(cached) " >&6
26313 else
26314   case $JAVAC_CHECK in
26315   [\\/]* | ?:[\\/]*)
26316   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26317   ;;
26318   *)
26319   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26320 for as_dir in $PATH
26321 do
26322   IFS=$as_save_IFS
26323   test -z "$as_dir" && as_dir=.
26324     for ac_exec_ext in '' $ac_executable_extensions; do
26325   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26326     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26328     break 2
26329   fi
26330 done
26331   done
26332 IFS=$as_save_IFS
26333 
26334   ;;
26335 esac
26336 fi
26337 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26338 if test -n "$JAVAC_CHECK"; then
26339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26340 $as_echo "$JAVAC_CHECK" >&6; }
26341 else
26342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26343 $as_echo "no" >&6; }
26344 fi
26345 
26346 
26347   # Extract the first word of "java", so it can be a program name with args.
26348 set dummy java; ac_word=$2
26349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26350 $as_echo_n "checking for $ac_word... " >&6; }
26351 if ${ac_cv_path_JAVA_CHECK+:} false; then :
26352   $as_echo_n "(cached) " >&6
26353 else
26354   case $JAVA_CHECK in
26355   [\\/]* | ?:[\\/]*)
26356   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26357   ;;
26358   *)
26359   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26360 for as_dir in $PATH
26361 do
26362   IFS=$as_save_IFS
26363   test -z "$as_dir" && as_dir=.
26364     for ac_exec_ext in '' $ac_executable_extensions; do
26365   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26366     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26368     break 2
26369   fi
26370 done
26371   done
26372 IFS=$as_save_IFS
26373 
26374   ;;
26375 esac
26376 fi
26377 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26378 if test -n "$JAVA_CHECK"; then
26379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26380 $as_echo "$JAVA_CHECK" >&6; }
26381 else
26382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26383 $as_echo "no" >&6; }
26384 fi
26385 
26386 
26387   BINARY="$JAVAC_CHECK"
26388   if test "x$JAVAC_CHECK" = x; then
26389     BINARY="$JAVA_CHECK"
26390   fi
26391   if test "x$BINARY" != x; then
26392     # So there is a java(c) binary, it might be part of a JDK.
26393     # Lets find the JDK/JRE directory by following symbolic links.
26394     # Linux/GNU systems often have links from /usr/bin/java to
26395     # /etc/alternatives/java to the real JDK binary.
26396 
26397   if test "x$OPENJDK_BUILD_OS" != xwindows; then
26398     # Follow a chain of symbolic links. Use readlink
26399     # where it exists, else fall back to horribly
26400     # complicated shell code.
26401     if test "x$READLINK_TESTED" != yes; then
26402       # On MacOSX there is a readlink tool with a different
26403       # purpose than the GNU readlink tool. Check the found readlink.
26404       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26405       if test "x$ISGNU" = x; then
26406         # A readlink that we do not know how to use.
26407         # Are there other non-GNU readlinks out there?
26408         READLINK_TESTED=yes
26409         READLINK=
26410       fi
26411     fi
26412 
26413     if test "x$READLINK" != x; then
26414       BINARY=`$READLINK -f $BINARY`
26415     else
26416       # Save the current directory for restoring afterwards
26417       STARTDIR=$PWD
26418       COUNTER=0
26419       sym_link_dir=`$DIRNAME $BINARY`
26420       sym_link_file=`$BASENAME $BINARY`
26421       cd $sym_link_dir
26422       # Use -P flag to resolve symlinks in directories.
26423       cd `$THEPWDCMD -P`
26424       sym_link_dir=`$THEPWDCMD -P`
26425       # Resolve file symlinks
26426       while test $COUNTER -lt 20; do
26427         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26428         if test "x$ISLINK" == x; then
26429           # This is not a symbolic link! We are done!
26430           break
26431         fi
26432         # Again resolve directory symlinks since the target of the just found
26433         # link could be in a different directory
26434         cd `$DIRNAME $ISLINK`
26435         sym_link_dir=`$THEPWDCMD -P`
26436         sym_link_file=`$BASENAME $ISLINK`
26437         let COUNTER=COUNTER+1
26438       done
26439       cd $STARTDIR
26440       BINARY=$sym_link_dir/$sym_link_file
26441     fi
26442   fi
26443 
26444     BOOT_JDK=`dirname "$BINARY"`
26445     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26446     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26447       # Looks like we found ourselves an JDK
26448       BOOT_JDK_FOUND=maybe
26449       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26450 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26451     fi
26452   fi
26453 
26454 
26455     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26456     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26457       # Do we have a bin/java?
26458       if test ! -x "$BOOT_JDK/bin/java"; then
26459         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26460 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26461         BOOT_JDK_FOUND=no
26462       else
26463         # Do we have a bin/javac?
26464         if test ! -x "$BOOT_JDK/bin/javac"; then
26465           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26466 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26467           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26468 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26469           BOOT_JDK_FOUND=no
26470         else
26471           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26472           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26473 
26474           # Extra M4 quote needed to protect [] in grep expression.
26475           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26476           if test "x$FOUND_CORRECT_VERSION" = x; then
26477             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26478 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26479             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26480 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26481             BOOT_JDK_FOUND=no
26482           else
26483             # We're done! :-)
26484             BOOT_JDK_FOUND=yes
26485 
26486   # Only process if variable expands to non-empty
26487 
26488   if test "x$BOOT_JDK" != x; then
26489     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26490 
26491   # Input might be given as Windows format, start by converting to
26492   # unix format.
26493   path="$BOOT_JDK"
26494   new_path=`$CYGPATH -u "$path"`
26495 
26496   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26497   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26498   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26499   # "foo.exe" is OK but "foo" is an error.
26500   #
26501   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26502   # It is also a way to make sure we got the proper file name for the real test later on.
26503   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26504   if test "x$test_shortpath" = x; then
26505     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26506 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26507     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26508   fi
26509 
26510   # Call helper function which possibly converts this using DOS-style short mode.
26511   # If so, the updated path is stored in $new_path.
26512 
26513   input_path="$new_path"
26514   # Check if we need to convert this using DOS-style short mode. If the path
26515   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26516   # take no chances and rewrite it.
26517   # Note: m4 eats our [], so we need to use [ and ] instead.
26518   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26519   if test "x$has_forbidden_chars" != x; then
26520     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26521     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26522     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26523     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26524       # Going to short mode and back again did indeed matter. Since short mode is
26525       # case insensitive, let's make it lowercase to improve readability.
26526       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26527       # Now convert it back to Unix-style (cygpath)
26528       input_path=`$CYGPATH -u "$shortmode_path"`
26529       new_path="$input_path"
26530     fi
26531   fi
26532 
26533   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26534   if test "x$test_cygdrive_prefix" = x; then
26535     # As a simple fix, exclude /usr/bin since it's not a real path.
26536     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26537       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26538       # a path prefixed by /cygdrive for fixpath to work.
26539       new_path="$CYGWIN_ROOT_PATH$input_path"
26540     fi
26541   fi
26542 
26543 
26544   if test "x$path" != "x$new_path"; then
26545     BOOT_JDK="$new_path"
26546     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26547 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26548   fi
26549 
26550     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26551 
26552   path="$BOOT_JDK"
26553   has_colon=`$ECHO $path | $GREP ^.:`
26554   new_path="$path"
26555   if test "x$has_colon" = x; then
26556     # Not in mixed or Windows style, start by that.
26557     new_path=`cmd //c echo $path`
26558   fi
26559 
26560 
26561   input_path="$new_path"
26562   # Check if we need to convert this using DOS-style short mode. If the path
26563   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26564   # take no chances and rewrite it.
26565   # Note: m4 eats our [], so we need to use [ and ] instead.
26566   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26567   if test "x$has_forbidden_chars" != x; then
26568     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26569     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26570   fi
26571 
26572 
26573   windows_path="$new_path"
26574   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26575     unix_path=`$CYGPATH -u "$windows_path"`
26576     new_path="$unix_path"
26577   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26578     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26579     new_path="$unix_path"
26580   fi
26581 
26582   if test "x$path" != "x$new_path"; then
26583     BOOT_JDK="$new_path"
26584     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26585 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26586   fi
26587 
26588   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26589   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26590 
26591     else
26592       # We're on a unix platform. Hooray! :)
26593       path="$BOOT_JDK"
26594       has_space=`$ECHO "$path" | $GREP " "`
26595       if test "x$has_space" != x; then
26596         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26597 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26598         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26599       fi
26600 
26601       # Use eval to expand a potential ~
26602       eval path="$path"
26603       if test ! -f "$path" && test ! -d "$path"; then
26604         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26605       fi
26606 
26607       if test -d "$path"; then
26608         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26609       else
26610         dir="`$DIRNAME "$path"`"
26611         base="`$BASENAME "$path"`"
26612         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26613       fi
26614     fi
26615   fi
26616 
26617             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26618 $as_echo_n "checking for Boot JDK... " >&6; }
26619             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26620 $as_echo "$BOOT_JDK" >&6; }
26621             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26622 $as_echo_n "checking Boot JDK version... " >&6; }
26623             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26624             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26625 $as_echo "$BOOT_JDK_VERSION" >&6; }
26626           fi # end check jdk version
26627         fi # end check javac
26628       fi # end check java
26629     fi # end check boot jdk found
26630   fi
26631 
26632 
26633   # Test: Is there a JDK installed in default, well-known locations?
26634 
26635   if test "x$BOOT_JDK_FOUND" = xno; then
26636     # Now execute the test
26637 
26638   if test "x$OPENJDK_TARGET_OS" = xwindows; then
26639 
26640   if test "x$BOOT_JDK_FOUND" = xno; then
26641     # Now execute the test
26642 
26643   if test "x$ProgramW6432" != x; then
26644     VIRTUAL_DIR="$ProgramW6432/Java"
26645 
26646   windows_path="$VIRTUAL_DIR"
26647   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26648     unix_path=`$CYGPATH -u "$windows_path"`
26649     VIRTUAL_DIR="$unix_path"
26650   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26651     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26652     VIRTUAL_DIR="$unix_path"
26653   fi
26654 
26655 
26656   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26657   BOOT_JDK_SUFFIX=""
26658   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26659   if test "x$ALL_JDKS_FOUND" != x; then
26660     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26661 
26662   if test "x$BOOT_JDK_FOUND" = xno; then
26663     # Now execute the test
26664 
26665         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26666         if test -d "$BOOT_JDK"; then
26667           BOOT_JDK_FOUND=maybe
26668           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26669 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26670         fi
26671 
26672 
26673     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26674     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26675       # Do we have a bin/java?
26676       if test ! -x "$BOOT_JDK/bin/java"; then
26677         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26678 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26679         BOOT_JDK_FOUND=no
26680       else
26681         # Do we have a bin/javac?
26682         if test ! -x "$BOOT_JDK/bin/javac"; then
26683           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26684 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26685           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26686 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26687           BOOT_JDK_FOUND=no
26688         else
26689           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26690           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26691 
26692           # Extra M4 quote needed to protect [] in grep expression.
26693           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26694           if test "x$FOUND_CORRECT_VERSION" = x; then
26695             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26696 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26697             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26698 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26699             BOOT_JDK_FOUND=no
26700           else
26701             # We're done! :-)
26702             BOOT_JDK_FOUND=yes
26703 
26704   # Only process if variable expands to non-empty
26705 
26706   if test "x$BOOT_JDK" != x; then
26707     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26708 
26709   # Input might be given as Windows format, start by converting to
26710   # unix format.
26711   path="$BOOT_JDK"
26712   new_path=`$CYGPATH -u "$path"`
26713 
26714   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26715   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26716   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26717   # "foo.exe" is OK but "foo" is an error.
26718   #
26719   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26720   # It is also a way to make sure we got the proper file name for the real test later on.
26721   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26722   if test "x$test_shortpath" = x; then
26723     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26724 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26725     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26726   fi
26727 
26728   # Call helper function which possibly converts this using DOS-style short mode.
26729   # If so, the updated path is stored in $new_path.
26730 
26731   input_path="$new_path"
26732   # Check if we need to convert this using DOS-style short mode. If the path
26733   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26734   # take no chances and rewrite it.
26735   # Note: m4 eats our [], so we need to use [ and ] instead.
26736   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26737   if test "x$has_forbidden_chars" != x; then
26738     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26739     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26740     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26741     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26742       # Going to short mode and back again did indeed matter. Since short mode is
26743       # case insensitive, let's make it lowercase to improve readability.
26744       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26745       # Now convert it back to Unix-style (cygpath)
26746       input_path=`$CYGPATH -u "$shortmode_path"`
26747       new_path="$input_path"
26748     fi
26749   fi
26750 
26751   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26752   if test "x$test_cygdrive_prefix" = x; then
26753     # As a simple fix, exclude /usr/bin since it's not a real path.
26754     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26755       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26756       # a path prefixed by /cygdrive for fixpath to work.
26757       new_path="$CYGWIN_ROOT_PATH$input_path"
26758     fi
26759   fi
26760 
26761 
26762   if test "x$path" != "x$new_path"; then
26763     BOOT_JDK="$new_path"
26764     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26765 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26766   fi
26767 
26768     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26769 
26770   path="$BOOT_JDK"
26771   has_colon=`$ECHO $path | $GREP ^.:`
26772   new_path="$path"
26773   if test "x$has_colon" = x; then
26774     # Not in mixed or Windows style, start by that.
26775     new_path=`cmd //c echo $path`
26776   fi
26777 
26778 
26779   input_path="$new_path"
26780   # Check if we need to convert this using DOS-style short mode. If the path
26781   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26782   # take no chances and rewrite it.
26783   # Note: m4 eats our [], so we need to use [ and ] instead.
26784   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26785   if test "x$has_forbidden_chars" != x; then
26786     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26787     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26788   fi
26789 
26790 
26791   windows_path="$new_path"
26792   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26793     unix_path=`$CYGPATH -u "$windows_path"`
26794     new_path="$unix_path"
26795   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26796     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26797     new_path="$unix_path"
26798   fi
26799 
26800   if test "x$path" != "x$new_path"; then
26801     BOOT_JDK="$new_path"
26802     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26803 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26804   fi
26805 
26806   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26807   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26808 
26809     else
26810       # We're on a unix platform. Hooray! :)
26811       path="$BOOT_JDK"
26812       has_space=`$ECHO "$path" | $GREP " "`
26813       if test "x$has_space" != x; then
26814         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26815 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26816         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26817       fi
26818 
26819       # Use eval to expand a potential ~
26820       eval path="$path"
26821       if test ! -f "$path" && test ! -d "$path"; then
26822         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26823       fi
26824 
26825       if test -d "$path"; then
26826         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26827       else
26828         dir="`$DIRNAME "$path"`"
26829         base="`$BASENAME "$path"`"
26830         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26831       fi
26832     fi
26833   fi
26834 
26835             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26836 $as_echo_n "checking for Boot JDK... " >&6; }
26837             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26838 $as_echo "$BOOT_JDK" >&6; }
26839             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26840 $as_echo_n "checking Boot JDK version... " >&6; }
26841             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26842             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26843 $as_echo "$BOOT_JDK_VERSION" >&6; }
26844           fi # end check jdk version
26845         fi # end check javac
26846       fi # end check java
26847     fi # end check boot jdk found
26848   fi
26849 
26850     done
26851   fi
26852 
26853   fi
26854 
26855 
26856     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26857     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26858       # Do we have a bin/java?
26859       if test ! -x "$BOOT_JDK/bin/java"; then
26860         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26861 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26862         BOOT_JDK_FOUND=no
26863       else
26864         # Do we have a bin/javac?
26865         if test ! -x "$BOOT_JDK/bin/javac"; then
26866           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26867 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26868           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26869 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26870           BOOT_JDK_FOUND=no
26871         else
26872           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26873           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26874 
26875           # Extra M4 quote needed to protect [] in grep expression.
26876           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26877           if test "x$FOUND_CORRECT_VERSION" = x; then
26878             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26879 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26880             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26881 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26882             BOOT_JDK_FOUND=no
26883           else
26884             # We're done! :-)
26885             BOOT_JDK_FOUND=yes
26886 
26887   # Only process if variable expands to non-empty
26888 
26889   if test "x$BOOT_JDK" != x; then
26890     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26891 
26892   # Input might be given as Windows format, start by converting to
26893   # unix format.
26894   path="$BOOT_JDK"
26895   new_path=`$CYGPATH -u "$path"`
26896 
26897   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26898   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26899   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26900   # "foo.exe" is OK but "foo" is an error.
26901   #
26902   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26903   # It is also a way to make sure we got the proper file name for the real test later on.
26904   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26905   if test "x$test_shortpath" = x; then
26906     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26907 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26908     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26909   fi
26910 
26911   # Call helper function which possibly converts this using DOS-style short mode.
26912   # If so, the updated path is stored in $new_path.
26913 
26914   input_path="$new_path"
26915   # Check if we need to convert this using DOS-style short mode. If the path
26916   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26917   # take no chances and rewrite it.
26918   # Note: m4 eats our [], so we need to use [ and ] instead.
26919   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26920   if test "x$has_forbidden_chars" != x; then
26921     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26922     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26923     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26924     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26925       # Going to short mode and back again did indeed matter. Since short mode is
26926       # case insensitive, let's make it lowercase to improve readability.
26927       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26928       # Now convert it back to Unix-style (cygpath)
26929       input_path=`$CYGPATH -u "$shortmode_path"`
26930       new_path="$input_path"
26931     fi
26932   fi
26933 
26934   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26935   if test "x$test_cygdrive_prefix" = x; then
26936     # As a simple fix, exclude /usr/bin since it's not a real path.
26937     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26938       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26939       # a path prefixed by /cygdrive for fixpath to work.
26940       new_path="$CYGWIN_ROOT_PATH$input_path"
26941     fi
26942   fi
26943 
26944 
26945   if test "x$path" != "x$new_path"; then
26946     BOOT_JDK="$new_path"
26947     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26948 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26949   fi
26950 
26951     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26952 
26953   path="$BOOT_JDK"
26954   has_colon=`$ECHO $path | $GREP ^.:`
26955   new_path="$path"
26956   if test "x$has_colon" = x; then
26957     # Not in mixed or Windows style, start by that.
26958     new_path=`cmd //c echo $path`
26959   fi
26960 
26961 
26962   input_path="$new_path"
26963   # Check if we need to convert this using DOS-style short mode. If the path
26964   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26965   # take no chances and rewrite it.
26966   # Note: m4 eats our [], so we need to use [ and ] instead.
26967   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26968   if test "x$has_forbidden_chars" != x; then
26969     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26970     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26971   fi
26972 
26973 
26974   windows_path="$new_path"
26975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26976     unix_path=`$CYGPATH -u "$windows_path"`
26977     new_path="$unix_path"
26978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26979     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26980     new_path="$unix_path"
26981   fi
26982 
26983   if test "x$path" != "x$new_path"; then
26984     BOOT_JDK="$new_path"
26985     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26986 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26987   fi
26988 
26989   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26990   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26991 
26992     else
26993       # We're on a unix platform. Hooray! :)
26994       path="$BOOT_JDK"
26995       has_space=`$ECHO "$path" | $GREP " "`
26996       if test "x$has_space" != x; then
26997         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26998 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26999         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27000       fi
27001 
27002       # Use eval to expand a potential ~
27003       eval path="$path"
27004       if test ! -f "$path" && test ! -d "$path"; then
27005         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27006       fi
27007 
27008       if test -d "$path"; then
27009         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27010       else
27011         dir="`$DIRNAME "$path"`"
27012         base="`$BASENAME "$path"`"
27013         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27014       fi
27015     fi
27016   fi
27017 
27018             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27019 $as_echo_n "checking for Boot JDK... " >&6; }
27020             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27021 $as_echo "$BOOT_JDK" >&6; }
27022             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27023 $as_echo_n "checking Boot JDK version... " >&6; }
27024             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27025             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27026 $as_echo "$BOOT_JDK_VERSION" >&6; }
27027           fi # end check jdk version
27028         fi # end check javac
27029       fi # end check java
27030     fi # end check boot jdk found
27031   fi
27032 
27033 
27034   if test "x$BOOT_JDK_FOUND" = xno; then
27035     # Now execute the test
27036 
27037   if test "x$PROGRAMW6432" != x; then
27038     VIRTUAL_DIR="$PROGRAMW6432/Java"
27039 
27040   windows_path="$VIRTUAL_DIR"
27041   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27042     unix_path=`$CYGPATH -u "$windows_path"`
27043     VIRTUAL_DIR="$unix_path"
27044   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27045     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27046     VIRTUAL_DIR="$unix_path"
27047   fi
27048 
27049 
27050   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27051   BOOT_JDK_SUFFIX=""
27052   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27053   if test "x$ALL_JDKS_FOUND" != x; then
27054     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27055 
27056   if test "x$BOOT_JDK_FOUND" = xno; then
27057     # Now execute the test
27058 
27059         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27060         if test -d "$BOOT_JDK"; then
27061           BOOT_JDK_FOUND=maybe
27062           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27063 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27064         fi
27065 
27066 
27067     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27068     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27069       # Do we have a bin/java?
27070       if test ! -x "$BOOT_JDK/bin/java"; then
27071         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27072 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27073         BOOT_JDK_FOUND=no
27074       else
27075         # Do we have a bin/javac?
27076         if test ! -x "$BOOT_JDK/bin/javac"; then
27077           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27078 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27079           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27080 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27081           BOOT_JDK_FOUND=no
27082         else
27083           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27084           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27085 
27086           # Extra M4 quote needed to protect [] in grep expression.
27087           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27088           if test "x$FOUND_CORRECT_VERSION" = x; then
27089             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27090 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27091             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27092 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27093             BOOT_JDK_FOUND=no
27094           else
27095             # We're done! :-)
27096             BOOT_JDK_FOUND=yes
27097 
27098   # Only process if variable expands to non-empty
27099 
27100   if test "x$BOOT_JDK" != x; then
27101     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27102 
27103   # Input might be given as Windows format, start by converting to
27104   # unix format.
27105   path="$BOOT_JDK"
27106   new_path=`$CYGPATH -u "$path"`
27107 
27108   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27109   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27110   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27111   # "foo.exe" is OK but "foo" is an error.
27112   #
27113   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27114   # It is also a way to make sure we got the proper file name for the real test later on.
27115   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27116   if test "x$test_shortpath" = x; then
27117     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27118 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27119     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27120   fi
27121 
27122   # Call helper function which possibly converts this using DOS-style short mode.
27123   # If so, the updated path is stored in $new_path.
27124 
27125   input_path="$new_path"
27126   # Check if we need to convert this using DOS-style short mode. If the path
27127   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27128   # take no chances and rewrite it.
27129   # Note: m4 eats our [], so we need to use [ and ] instead.
27130   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27131   if test "x$has_forbidden_chars" != x; then
27132     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27133     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27134     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27135     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27136       # Going to short mode and back again did indeed matter. Since short mode is
27137       # case insensitive, let's make it lowercase to improve readability.
27138       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27139       # Now convert it back to Unix-style (cygpath)
27140       input_path=`$CYGPATH -u "$shortmode_path"`
27141       new_path="$input_path"
27142     fi
27143   fi
27144 
27145   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27146   if test "x$test_cygdrive_prefix" = x; then
27147     # As a simple fix, exclude /usr/bin since it's not a real path.
27148     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27149       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27150       # a path prefixed by /cygdrive for fixpath to work.
27151       new_path="$CYGWIN_ROOT_PATH$input_path"
27152     fi
27153   fi
27154 
27155 
27156   if test "x$path" != "x$new_path"; then
27157     BOOT_JDK="$new_path"
27158     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27159 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27160   fi
27161 
27162     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27163 
27164   path="$BOOT_JDK"
27165   has_colon=`$ECHO $path | $GREP ^.:`
27166   new_path="$path"
27167   if test "x$has_colon" = x; then
27168     # Not in mixed or Windows style, start by that.
27169     new_path=`cmd //c echo $path`
27170   fi
27171 
27172 
27173   input_path="$new_path"
27174   # Check if we need to convert this using DOS-style short mode. If the path
27175   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27176   # take no chances and rewrite it.
27177   # Note: m4 eats our [], so we need to use [ and ] instead.
27178   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27179   if test "x$has_forbidden_chars" != x; then
27180     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27181     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27182   fi
27183 
27184 
27185   windows_path="$new_path"
27186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27187     unix_path=`$CYGPATH -u "$windows_path"`
27188     new_path="$unix_path"
27189   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27190     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27191     new_path="$unix_path"
27192   fi
27193 
27194   if test "x$path" != "x$new_path"; then
27195     BOOT_JDK="$new_path"
27196     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27197 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27198   fi
27199 
27200   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27201   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27202 
27203     else
27204       # We're on a unix platform. Hooray! :)
27205       path="$BOOT_JDK"
27206       has_space=`$ECHO "$path" | $GREP " "`
27207       if test "x$has_space" != x; then
27208         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27209 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27210         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27211       fi
27212 
27213       # Use eval to expand a potential ~
27214       eval path="$path"
27215       if test ! -f "$path" && test ! -d "$path"; then
27216         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27217       fi
27218 
27219       if test -d "$path"; then
27220         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27221       else
27222         dir="`$DIRNAME "$path"`"
27223         base="`$BASENAME "$path"`"
27224         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27225       fi
27226     fi
27227   fi
27228 
27229             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27230 $as_echo_n "checking for Boot JDK... " >&6; }
27231             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27232 $as_echo "$BOOT_JDK" >&6; }
27233             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27234 $as_echo_n "checking Boot JDK version... " >&6; }
27235             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27236             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27237 $as_echo "$BOOT_JDK_VERSION" >&6; }
27238           fi # end check jdk version
27239         fi # end check javac
27240       fi # end check java
27241     fi # end check boot jdk found
27242   fi
27243 
27244     done
27245   fi
27246 
27247   fi
27248 
27249 
27250     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27251     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27252       # Do we have a bin/java?
27253       if test ! -x "$BOOT_JDK/bin/java"; then
27254         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27255 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27256         BOOT_JDK_FOUND=no
27257       else
27258         # Do we have a bin/javac?
27259         if test ! -x "$BOOT_JDK/bin/javac"; then
27260           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27261 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27262           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27263 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27264           BOOT_JDK_FOUND=no
27265         else
27266           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27267           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27268 
27269           # Extra M4 quote needed to protect [] in grep expression.
27270           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27271           if test "x$FOUND_CORRECT_VERSION" = x; then
27272             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27273 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27274             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27275 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27276             BOOT_JDK_FOUND=no
27277           else
27278             # We're done! :-)
27279             BOOT_JDK_FOUND=yes
27280 
27281   # Only process if variable expands to non-empty
27282 
27283   if test "x$BOOT_JDK" != x; then
27284     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27285 
27286   # Input might be given as Windows format, start by converting to
27287   # unix format.
27288   path="$BOOT_JDK"
27289   new_path=`$CYGPATH -u "$path"`
27290 
27291   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27292   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27293   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27294   # "foo.exe" is OK but "foo" is an error.
27295   #
27296   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27297   # It is also a way to make sure we got the proper file name for the real test later on.
27298   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27299   if test "x$test_shortpath" = x; then
27300     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27301 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27302     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27303   fi
27304 
27305   # Call helper function which possibly converts this using DOS-style short mode.
27306   # If so, the updated path is stored in $new_path.
27307 
27308   input_path="$new_path"
27309   # Check if we need to convert this using DOS-style short mode. If the path
27310   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27311   # take no chances and rewrite it.
27312   # Note: m4 eats our [], so we need to use [ and ] instead.
27313   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27314   if test "x$has_forbidden_chars" != x; then
27315     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27316     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27317     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27318     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27319       # Going to short mode and back again did indeed matter. Since short mode is
27320       # case insensitive, let's make it lowercase to improve readability.
27321       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27322       # Now convert it back to Unix-style (cygpath)
27323       input_path=`$CYGPATH -u "$shortmode_path"`
27324       new_path="$input_path"
27325     fi
27326   fi
27327 
27328   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27329   if test "x$test_cygdrive_prefix" = x; then
27330     # As a simple fix, exclude /usr/bin since it's not a real path.
27331     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27332       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27333       # a path prefixed by /cygdrive for fixpath to work.
27334       new_path="$CYGWIN_ROOT_PATH$input_path"
27335     fi
27336   fi
27337 
27338 
27339   if test "x$path" != "x$new_path"; then
27340     BOOT_JDK="$new_path"
27341     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27342 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27343   fi
27344 
27345     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27346 
27347   path="$BOOT_JDK"
27348   has_colon=`$ECHO $path | $GREP ^.:`
27349   new_path="$path"
27350   if test "x$has_colon" = x; then
27351     # Not in mixed or Windows style, start by that.
27352     new_path=`cmd //c echo $path`
27353   fi
27354 
27355 
27356   input_path="$new_path"
27357   # Check if we need to convert this using DOS-style short mode. If the path
27358   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27359   # take no chances and rewrite it.
27360   # Note: m4 eats our [], so we need to use [ and ] instead.
27361   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27362   if test "x$has_forbidden_chars" != x; then
27363     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27364     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27365   fi
27366 
27367 
27368   windows_path="$new_path"
27369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27370     unix_path=`$CYGPATH -u "$windows_path"`
27371     new_path="$unix_path"
27372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27373     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27374     new_path="$unix_path"
27375   fi
27376 
27377   if test "x$path" != "x$new_path"; then
27378     BOOT_JDK="$new_path"
27379     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27380 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27381   fi
27382 
27383   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27384   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27385 
27386     else
27387       # We're on a unix platform. Hooray! :)
27388       path="$BOOT_JDK"
27389       has_space=`$ECHO "$path" | $GREP " "`
27390       if test "x$has_space" != x; then
27391         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27392 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27393         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27394       fi
27395 
27396       # Use eval to expand a potential ~
27397       eval path="$path"
27398       if test ! -f "$path" && test ! -d "$path"; then
27399         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27400       fi
27401 
27402       if test -d "$path"; then
27403         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27404       else
27405         dir="`$DIRNAME "$path"`"
27406         base="`$BASENAME "$path"`"
27407         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27408       fi
27409     fi
27410   fi
27411 
27412             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27413 $as_echo_n "checking for Boot JDK... " >&6; }
27414             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27415 $as_echo "$BOOT_JDK" >&6; }
27416             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27417 $as_echo_n "checking Boot JDK version... " >&6; }
27418             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27419             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27420 $as_echo "$BOOT_JDK_VERSION" >&6; }
27421           fi # end check jdk version
27422         fi # end check javac
27423       fi # end check java
27424     fi # end check boot jdk found
27425   fi
27426 
27427 
27428   if test "x$BOOT_JDK_FOUND" = xno; then
27429     # Now execute the test
27430 
27431   if test "x$PROGRAMFILES" != x; then
27432     VIRTUAL_DIR="$PROGRAMFILES/Java"
27433 
27434   windows_path="$VIRTUAL_DIR"
27435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27436     unix_path=`$CYGPATH -u "$windows_path"`
27437     VIRTUAL_DIR="$unix_path"
27438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27439     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27440     VIRTUAL_DIR="$unix_path"
27441   fi
27442 
27443 
27444   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27445   BOOT_JDK_SUFFIX=""
27446   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27447   if test "x$ALL_JDKS_FOUND" != x; then
27448     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27449 
27450   if test "x$BOOT_JDK_FOUND" = xno; then
27451     # Now execute the test
27452 
27453         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27454         if test -d "$BOOT_JDK"; then
27455           BOOT_JDK_FOUND=maybe
27456           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27457 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27458         fi
27459 
27460 
27461     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27462     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27463       # Do we have a bin/java?
27464       if test ! -x "$BOOT_JDK/bin/java"; then
27465         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27466 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27467         BOOT_JDK_FOUND=no
27468       else
27469         # Do we have a bin/javac?
27470         if test ! -x "$BOOT_JDK/bin/javac"; then
27471           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27472 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27473           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27474 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27475           BOOT_JDK_FOUND=no
27476         else
27477           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27478           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27479 
27480           # Extra M4 quote needed to protect [] in grep expression.
27481           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27482           if test "x$FOUND_CORRECT_VERSION" = x; then
27483             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27484 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27485             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27486 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27487             BOOT_JDK_FOUND=no
27488           else
27489             # We're done! :-)
27490             BOOT_JDK_FOUND=yes
27491 
27492   # Only process if variable expands to non-empty
27493 
27494   if test "x$BOOT_JDK" != x; then
27495     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27496 
27497   # Input might be given as Windows format, start by converting to
27498   # unix format.
27499   path="$BOOT_JDK"
27500   new_path=`$CYGPATH -u "$path"`
27501 
27502   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27503   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27504   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27505   # "foo.exe" is OK but "foo" is an error.
27506   #
27507   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27508   # It is also a way to make sure we got the proper file name for the real test later on.
27509   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27510   if test "x$test_shortpath" = x; then
27511     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27512 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27513     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27514   fi
27515 
27516   # Call helper function which possibly converts this using DOS-style short mode.
27517   # If so, the updated path is stored in $new_path.
27518 
27519   input_path="$new_path"
27520   # Check if we need to convert this using DOS-style short mode. If the path
27521   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27522   # take no chances and rewrite it.
27523   # Note: m4 eats our [], so we need to use [ and ] instead.
27524   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27525   if test "x$has_forbidden_chars" != x; then
27526     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27527     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27528     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27529     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27530       # Going to short mode and back again did indeed matter. Since short mode is
27531       # case insensitive, let's make it lowercase to improve readability.
27532       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27533       # Now convert it back to Unix-style (cygpath)
27534       input_path=`$CYGPATH -u "$shortmode_path"`
27535       new_path="$input_path"
27536     fi
27537   fi
27538 
27539   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27540   if test "x$test_cygdrive_prefix" = x; then
27541     # As a simple fix, exclude /usr/bin since it's not a real path.
27542     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27543       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27544       # a path prefixed by /cygdrive for fixpath to work.
27545       new_path="$CYGWIN_ROOT_PATH$input_path"
27546     fi
27547   fi
27548 
27549 
27550   if test "x$path" != "x$new_path"; then
27551     BOOT_JDK="$new_path"
27552     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27553 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27554   fi
27555 
27556     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27557 
27558   path="$BOOT_JDK"
27559   has_colon=`$ECHO $path | $GREP ^.:`
27560   new_path="$path"
27561   if test "x$has_colon" = x; then
27562     # Not in mixed or Windows style, start by that.
27563     new_path=`cmd //c echo $path`
27564   fi
27565 
27566 
27567   input_path="$new_path"
27568   # Check if we need to convert this using DOS-style short mode. If the path
27569   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27570   # take no chances and rewrite it.
27571   # Note: m4 eats our [], so we need to use [ and ] instead.
27572   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27573   if test "x$has_forbidden_chars" != x; then
27574     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27575     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27576   fi
27577 
27578 
27579   windows_path="$new_path"
27580   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27581     unix_path=`$CYGPATH -u "$windows_path"`
27582     new_path="$unix_path"
27583   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27584     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27585     new_path="$unix_path"
27586   fi
27587 
27588   if test "x$path" != "x$new_path"; then
27589     BOOT_JDK="$new_path"
27590     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27591 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27592   fi
27593 
27594   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27595   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27596 
27597     else
27598       # We're on a unix platform. Hooray! :)
27599       path="$BOOT_JDK"
27600       has_space=`$ECHO "$path" | $GREP " "`
27601       if test "x$has_space" != x; then
27602         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27603 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27604         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27605       fi
27606 
27607       # Use eval to expand a potential ~
27608       eval path="$path"
27609       if test ! -f "$path" && test ! -d "$path"; then
27610         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27611       fi
27612 
27613       if test -d "$path"; then
27614         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27615       else
27616         dir="`$DIRNAME "$path"`"
27617         base="`$BASENAME "$path"`"
27618         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27619       fi
27620     fi
27621   fi
27622 
27623             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27624 $as_echo_n "checking for Boot JDK... " >&6; }
27625             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27626 $as_echo "$BOOT_JDK" >&6; }
27627             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27628 $as_echo_n "checking Boot JDK version... " >&6; }
27629             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27630             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27631 $as_echo "$BOOT_JDK_VERSION" >&6; }
27632           fi # end check jdk version
27633         fi # end check javac
27634       fi # end check java
27635     fi # end check boot jdk found
27636   fi
27637 
27638     done
27639   fi
27640 
27641   fi
27642 
27643 
27644     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27645     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27646       # Do we have a bin/java?
27647       if test ! -x "$BOOT_JDK/bin/java"; then
27648         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27649 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27650         BOOT_JDK_FOUND=no
27651       else
27652         # Do we have a bin/javac?
27653         if test ! -x "$BOOT_JDK/bin/javac"; then
27654           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27655 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27656           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27657 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27658           BOOT_JDK_FOUND=no
27659         else
27660           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27661           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27662 
27663           # Extra M4 quote needed to protect [] in grep expression.
27664           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27665           if test "x$FOUND_CORRECT_VERSION" = x; then
27666             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27667 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27668             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27669 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27670             BOOT_JDK_FOUND=no
27671           else
27672             # We're done! :-)
27673             BOOT_JDK_FOUND=yes
27674 
27675   # Only process if variable expands to non-empty
27676 
27677   if test "x$BOOT_JDK" != x; then
27678     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27679 
27680   # Input might be given as Windows format, start by converting to
27681   # unix format.
27682   path="$BOOT_JDK"
27683   new_path=`$CYGPATH -u "$path"`
27684 
27685   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27686   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27687   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27688   # "foo.exe" is OK but "foo" is an error.
27689   #
27690   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27691   # It is also a way to make sure we got the proper file name for the real test later on.
27692   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27693   if test "x$test_shortpath" = x; then
27694     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27695 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27696     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27697   fi
27698 
27699   # Call helper function which possibly converts this using DOS-style short mode.
27700   # If so, the updated path is stored in $new_path.
27701 
27702   input_path="$new_path"
27703   # Check if we need to convert this using DOS-style short mode. If the path
27704   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27705   # take no chances and rewrite it.
27706   # Note: m4 eats our [], so we need to use [ and ] instead.
27707   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27708   if test "x$has_forbidden_chars" != x; then
27709     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27710     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27711     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27712     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27713       # Going to short mode and back again did indeed matter. Since short mode is
27714       # case insensitive, let's make it lowercase to improve readability.
27715       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27716       # Now convert it back to Unix-style (cygpath)
27717       input_path=`$CYGPATH -u "$shortmode_path"`
27718       new_path="$input_path"
27719     fi
27720   fi
27721 
27722   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27723   if test "x$test_cygdrive_prefix" = x; then
27724     # As a simple fix, exclude /usr/bin since it's not a real path.
27725     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27726       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27727       # a path prefixed by /cygdrive for fixpath to work.
27728       new_path="$CYGWIN_ROOT_PATH$input_path"
27729     fi
27730   fi
27731 
27732 
27733   if test "x$path" != "x$new_path"; then
27734     BOOT_JDK="$new_path"
27735     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27736 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27737   fi
27738 
27739     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27740 
27741   path="$BOOT_JDK"
27742   has_colon=`$ECHO $path | $GREP ^.:`
27743   new_path="$path"
27744   if test "x$has_colon" = x; then
27745     # Not in mixed or Windows style, start by that.
27746     new_path=`cmd //c echo $path`
27747   fi
27748 
27749 
27750   input_path="$new_path"
27751   # Check if we need to convert this using DOS-style short mode. If the path
27752   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27753   # take no chances and rewrite it.
27754   # Note: m4 eats our [], so we need to use [ and ] instead.
27755   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27756   if test "x$has_forbidden_chars" != x; then
27757     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27758     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27759   fi
27760 
27761 
27762   windows_path="$new_path"
27763   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27764     unix_path=`$CYGPATH -u "$windows_path"`
27765     new_path="$unix_path"
27766   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27767     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27768     new_path="$unix_path"
27769   fi
27770 
27771   if test "x$path" != "x$new_path"; then
27772     BOOT_JDK="$new_path"
27773     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27774 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27775   fi
27776 
27777   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27778   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27779 
27780     else
27781       # We're on a unix platform. Hooray! :)
27782       path="$BOOT_JDK"
27783       has_space=`$ECHO "$path" | $GREP " "`
27784       if test "x$has_space" != x; then
27785         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27786 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27787         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27788       fi
27789 
27790       # Use eval to expand a potential ~
27791       eval path="$path"
27792       if test ! -f "$path" && test ! -d "$path"; then
27793         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27794       fi
27795 
27796       if test -d "$path"; then
27797         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27798       else
27799         dir="`$DIRNAME "$path"`"
27800         base="`$BASENAME "$path"`"
27801         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27802       fi
27803     fi
27804   fi
27805 
27806             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27807 $as_echo_n "checking for Boot JDK... " >&6; }
27808             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27809 $as_echo "$BOOT_JDK" >&6; }
27810             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27811 $as_echo_n "checking Boot JDK version... " >&6; }
27812             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27813             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27814 $as_echo "$BOOT_JDK_VERSION" >&6; }
27815           fi # end check jdk version
27816         fi # end check javac
27817       fi # end check java
27818     fi # end check boot jdk found
27819   fi
27820 
27821 
27822   if test "x$BOOT_JDK_FOUND" = xno; then
27823     # Now execute the test
27824 
27825   if test "x$ProgramFiles" != x; then
27826     VIRTUAL_DIR="$ProgramFiles/Java"
27827 
27828   windows_path="$VIRTUAL_DIR"
27829   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27830     unix_path=`$CYGPATH -u "$windows_path"`
27831     VIRTUAL_DIR="$unix_path"
27832   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27833     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27834     VIRTUAL_DIR="$unix_path"
27835   fi
27836 
27837 
27838   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27839   BOOT_JDK_SUFFIX=""
27840   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27841   if test "x$ALL_JDKS_FOUND" != x; then
27842     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27843 
27844   if test "x$BOOT_JDK_FOUND" = xno; then
27845     # Now execute the test
27846 
27847         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27848         if test -d "$BOOT_JDK"; then
27849           BOOT_JDK_FOUND=maybe
27850           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27851 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27852         fi
27853 
27854 
27855     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27856     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27857       # Do we have a bin/java?
27858       if test ! -x "$BOOT_JDK/bin/java"; then
27859         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27860 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27861         BOOT_JDK_FOUND=no
27862       else
27863         # Do we have a bin/javac?
27864         if test ! -x "$BOOT_JDK/bin/javac"; then
27865           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27866 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27867           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27868 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27869           BOOT_JDK_FOUND=no
27870         else
27871           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27872           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27873 
27874           # Extra M4 quote needed to protect [] in grep expression.
27875           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27876           if test "x$FOUND_CORRECT_VERSION" = x; then
27877             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27878 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27879             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27880 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27881             BOOT_JDK_FOUND=no
27882           else
27883             # We're done! :-)
27884             BOOT_JDK_FOUND=yes
27885 
27886   # Only process if variable expands to non-empty
27887 
27888   if test "x$BOOT_JDK" != x; then
27889     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27890 
27891   # Input might be given as Windows format, start by converting to
27892   # unix format.
27893   path="$BOOT_JDK"
27894   new_path=`$CYGPATH -u "$path"`
27895 
27896   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27897   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27898   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27899   # "foo.exe" is OK but "foo" is an error.
27900   #
27901   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27902   # It is also a way to make sure we got the proper file name for the real test later on.
27903   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27904   if test "x$test_shortpath" = x; then
27905     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27906 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27907     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27908   fi
27909 
27910   # Call helper function which possibly converts this using DOS-style short mode.
27911   # If so, the updated path is stored in $new_path.
27912 
27913   input_path="$new_path"
27914   # Check if we need to convert this using DOS-style short mode. If the path
27915   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27916   # take no chances and rewrite it.
27917   # Note: m4 eats our [], so we need to use [ and ] instead.
27918   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27919   if test "x$has_forbidden_chars" != x; then
27920     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27921     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27922     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27923     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27924       # Going to short mode and back again did indeed matter. Since short mode is
27925       # case insensitive, let's make it lowercase to improve readability.
27926       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27927       # Now convert it back to Unix-style (cygpath)
27928       input_path=`$CYGPATH -u "$shortmode_path"`
27929       new_path="$input_path"
27930     fi
27931   fi
27932 
27933   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27934   if test "x$test_cygdrive_prefix" = x; then
27935     # As a simple fix, exclude /usr/bin since it's not a real path.
27936     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27937       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27938       # a path prefixed by /cygdrive for fixpath to work.
27939       new_path="$CYGWIN_ROOT_PATH$input_path"
27940     fi
27941   fi
27942 
27943 
27944   if test "x$path" != "x$new_path"; then
27945     BOOT_JDK="$new_path"
27946     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27947 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27948   fi
27949 
27950     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27951 
27952   path="$BOOT_JDK"
27953   has_colon=`$ECHO $path | $GREP ^.:`
27954   new_path="$path"
27955   if test "x$has_colon" = x; then
27956     # Not in mixed or Windows style, start by that.
27957     new_path=`cmd //c echo $path`
27958   fi
27959 
27960 
27961   input_path="$new_path"
27962   # Check if we need to convert this using DOS-style short mode. If the path
27963   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27964   # take no chances and rewrite it.
27965   # Note: m4 eats our [], so we need to use [ and ] instead.
27966   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27967   if test "x$has_forbidden_chars" != x; then
27968     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27969     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27970   fi
27971 
27972 
27973   windows_path="$new_path"
27974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27975     unix_path=`$CYGPATH -u "$windows_path"`
27976     new_path="$unix_path"
27977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27979     new_path="$unix_path"
27980   fi
27981 
27982   if test "x$path" != "x$new_path"; then
27983     BOOT_JDK="$new_path"
27984     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27985 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27986   fi
27987 
27988   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27989   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27990 
27991     else
27992       # We're on a unix platform. Hooray! :)
27993       path="$BOOT_JDK"
27994       has_space=`$ECHO "$path" | $GREP " "`
27995       if test "x$has_space" != x; then
27996         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27997 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27998         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27999       fi
28000 
28001       # Use eval to expand a potential ~
28002       eval path="$path"
28003       if test ! -f "$path" && test ! -d "$path"; then
28004         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28005       fi
28006 
28007       if test -d "$path"; then
28008         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28009       else
28010         dir="`$DIRNAME "$path"`"
28011         base="`$BASENAME "$path"`"
28012         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28013       fi
28014     fi
28015   fi
28016 
28017             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28018 $as_echo_n "checking for Boot JDK... " >&6; }
28019             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28020 $as_echo "$BOOT_JDK" >&6; }
28021             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28022 $as_echo_n "checking Boot JDK version... " >&6; }
28023             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28024             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28025 $as_echo "$BOOT_JDK_VERSION" >&6; }
28026           fi # end check jdk version
28027         fi # end check javac
28028       fi # end check java
28029     fi # end check boot jdk found
28030   fi
28031 
28032     done
28033   fi
28034 
28035   fi
28036 
28037 
28038     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28039     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28040       # Do we have a bin/java?
28041       if test ! -x "$BOOT_JDK/bin/java"; then
28042         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28043 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28044         BOOT_JDK_FOUND=no
28045       else
28046         # Do we have a bin/javac?
28047         if test ! -x "$BOOT_JDK/bin/javac"; then
28048           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28049 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28050           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28051 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28052           BOOT_JDK_FOUND=no
28053         else
28054           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28055           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28056 
28057           # Extra M4 quote needed to protect [] in grep expression.
28058           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28059           if test "x$FOUND_CORRECT_VERSION" = x; then
28060             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28061 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28062             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28063 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28064             BOOT_JDK_FOUND=no
28065           else
28066             # We're done! :-)
28067             BOOT_JDK_FOUND=yes
28068 
28069   # Only process if variable expands to non-empty
28070 
28071   if test "x$BOOT_JDK" != x; then
28072     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28073 
28074   # Input might be given as Windows format, start by converting to
28075   # unix format.
28076   path="$BOOT_JDK"
28077   new_path=`$CYGPATH -u "$path"`
28078 
28079   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28080   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28081   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28082   # "foo.exe" is OK but "foo" is an error.
28083   #
28084   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28085   # It is also a way to make sure we got the proper file name for the real test later on.
28086   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28087   if test "x$test_shortpath" = x; then
28088     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28089 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28090     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28091   fi
28092 
28093   # Call helper function which possibly converts this using DOS-style short mode.
28094   # If so, the updated path is stored in $new_path.
28095 
28096   input_path="$new_path"
28097   # Check if we need to convert this using DOS-style short mode. If the path
28098   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28099   # take no chances and rewrite it.
28100   # Note: m4 eats our [], so we need to use [ and ] instead.
28101   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28102   if test "x$has_forbidden_chars" != x; then
28103     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28104     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28105     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28106     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28107       # Going to short mode and back again did indeed matter. Since short mode is
28108       # case insensitive, let's make it lowercase to improve readability.
28109       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28110       # Now convert it back to Unix-style (cygpath)
28111       input_path=`$CYGPATH -u "$shortmode_path"`
28112       new_path="$input_path"
28113     fi
28114   fi
28115 
28116   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28117   if test "x$test_cygdrive_prefix" = x; then
28118     # As a simple fix, exclude /usr/bin since it's not a real path.
28119     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28120       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28121       # a path prefixed by /cygdrive for fixpath to work.
28122       new_path="$CYGWIN_ROOT_PATH$input_path"
28123     fi
28124   fi
28125 
28126 
28127   if test "x$path" != "x$new_path"; then
28128     BOOT_JDK="$new_path"
28129     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28130 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28131   fi
28132 
28133     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28134 
28135   path="$BOOT_JDK"
28136   has_colon=`$ECHO $path | $GREP ^.:`
28137   new_path="$path"
28138   if test "x$has_colon" = x; then
28139     # Not in mixed or Windows style, start by that.
28140     new_path=`cmd //c echo $path`
28141   fi
28142 
28143 
28144   input_path="$new_path"
28145   # Check if we need to convert this using DOS-style short mode. If the path
28146   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28147   # take no chances and rewrite it.
28148   # Note: m4 eats our [], so we need to use [ and ] instead.
28149   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28150   if test "x$has_forbidden_chars" != x; then
28151     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28152     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28153   fi
28154 
28155 
28156   windows_path="$new_path"
28157   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28158     unix_path=`$CYGPATH -u "$windows_path"`
28159     new_path="$unix_path"
28160   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28161     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28162     new_path="$unix_path"
28163   fi
28164 
28165   if test "x$path" != "x$new_path"; then
28166     BOOT_JDK="$new_path"
28167     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28168 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28169   fi
28170 
28171   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28172   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28173 
28174     else
28175       # We're on a unix platform. Hooray! :)
28176       path="$BOOT_JDK"
28177       has_space=`$ECHO "$path" | $GREP " "`
28178       if test "x$has_space" != x; then
28179         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28180 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28181         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28182       fi
28183 
28184       # Use eval to expand a potential ~
28185       eval path="$path"
28186       if test ! -f "$path" && test ! -d "$path"; then
28187         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28188       fi
28189 
28190       if test -d "$path"; then
28191         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28192       else
28193         dir="`$DIRNAME "$path"`"
28194         base="`$BASENAME "$path"`"
28195         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28196       fi
28197     fi
28198   fi
28199 
28200             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28201 $as_echo_n "checking for Boot JDK... " >&6; }
28202             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28203 $as_echo "$BOOT_JDK" >&6; }
28204             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28205 $as_echo_n "checking Boot JDK version... " >&6; }
28206             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28207             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28208 $as_echo "$BOOT_JDK_VERSION" >&6; }
28209           fi # end check jdk version
28210         fi # end check javac
28211       fi # end check java
28212     fi # end check boot jdk found
28213   fi
28214 
28215 
28216   if test "x$BOOT_JDK_FOUND" = xno; then
28217     # Now execute the test
28218 
28219   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28220   BOOT_JDK_SUFFIX=""
28221   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28222   if test "x$ALL_JDKS_FOUND" != x; then
28223     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28224 
28225   if test "x$BOOT_JDK_FOUND" = xno; then
28226     # Now execute the test
28227 
28228         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28229         if test -d "$BOOT_JDK"; then
28230           BOOT_JDK_FOUND=maybe
28231           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28232 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28233         fi
28234 
28235 
28236     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28237     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28238       # Do we have a bin/java?
28239       if test ! -x "$BOOT_JDK/bin/java"; then
28240         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28241 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28242         BOOT_JDK_FOUND=no
28243       else
28244         # Do we have a bin/javac?
28245         if test ! -x "$BOOT_JDK/bin/javac"; then
28246           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28247 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28248           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28249 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28250           BOOT_JDK_FOUND=no
28251         else
28252           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28253           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28254 
28255           # Extra M4 quote needed to protect [] in grep expression.
28256           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28257           if test "x$FOUND_CORRECT_VERSION" = x; then
28258             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28259 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28260             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28261 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28262             BOOT_JDK_FOUND=no
28263           else
28264             # We're done! :-)
28265             BOOT_JDK_FOUND=yes
28266 
28267   # Only process if variable expands to non-empty
28268 
28269   if test "x$BOOT_JDK" != x; then
28270     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28271 
28272   # Input might be given as Windows format, start by converting to
28273   # unix format.
28274   path="$BOOT_JDK"
28275   new_path=`$CYGPATH -u "$path"`
28276 
28277   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28278   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28279   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28280   # "foo.exe" is OK but "foo" is an error.
28281   #
28282   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28283   # It is also a way to make sure we got the proper file name for the real test later on.
28284   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28285   if test "x$test_shortpath" = x; then
28286     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28287 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28288     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28289   fi
28290 
28291   # Call helper function which possibly converts this using DOS-style short mode.
28292   # If so, the updated path is stored in $new_path.
28293 
28294   input_path="$new_path"
28295   # Check if we need to convert this using DOS-style short mode. If the path
28296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28297   # take no chances and rewrite it.
28298   # Note: m4 eats our [], so we need to use [ and ] instead.
28299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28300   if test "x$has_forbidden_chars" != x; then
28301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28302     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28303     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28304     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28305       # Going to short mode and back again did indeed matter. Since short mode is
28306       # case insensitive, let's make it lowercase to improve readability.
28307       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28308       # Now convert it back to Unix-style (cygpath)
28309       input_path=`$CYGPATH -u "$shortmode_path"`
28310       new_path="$input_path"
28311     fi
28312   fi
28313 
28314   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28315   if test "x$test_cygdrive_prefix" = x; then
28316     # As a simple fix, exclude /usr/bin since it's not a real path.
28317     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28318       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28319       # a path prefixed by /cygdrive for fixpath to work.
28320       new_path="$CYGWIN_ROOT_PATH$input_path"
28321     fi
28322   fi
28323 
28324 
28325   if test "x$path" != "x$new_path"; then
28326     BOOT_JDK="$new_path"
28327     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28328 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28329   fi
28330 
28331     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28332 
28333   path="$BOOT_JDK"
28334   has_colon=`$ECHO $path | $GREP ^.:`
28335   new_path="$path"
28336   if test "x$has_colon" = x; then
28337     # Not in mixed or Windows style, start by that.
28338     new_path=`cmd //c echo $path`
28339   fi
28340 
28341 
28342   input_path="$new_path"
28343   # Check if we need to convert this using DOS-style short mode. If the path
28344   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28345   # take no chances and rewrite it.
28346   # Note: m4 eats our [], so we need to use [ and ] instead.
28347   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28348   if test "x$has_forbidden_chars" != x; then
28349     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28350     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28351   fi
28352 
28353 
28354   windows_path="$new_path"
28355   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28356     unix_path=`$CYGPATH -u "$windows_path"`
28357     new_path="$unix_path"
28358   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28359     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28360     new_path="$unix_path"
28361   fi
28362 
28363   if test "x$path" != "x$new_path"; then
28364     BOOT_JDK="$new_path"
28365     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28366 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28367   fi
28368 
28369   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28370   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28371 
28372     else
28373       # We're on a unix platform. Hooray! :)
28374       path="$BOOT_JDK"
28375       has_space=`$ECHO "$path" | $GREP " "`
28376       if test "x$has_space" != x; then
28377         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28378 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28379         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28380       fi
28381 
28382       # Use eval to expand a potential ~
28383       eval path="$path"
28384       if test ! -f "$path" && test ! -d "$path"; then
28385         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28386       fi
28387 
28388       if test -d "$path"; then
28389         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28390       else
28391         dir="`$DIRNAME "$path"`"
28392         base="`$BASENAME "$path"`"
28393         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28394       fi
28395     fi
28396   fi
28397 
28398             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28399 $as_echo_n "checking for Boot JDK... " >&6; }
28400             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28401 $as_echo "$BOOT_JDK" >&6; }
28402             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28403 $as_echo_n "checking Boot JDK version... " >&6; }
28404             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28405             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28406 $as_echo "$BOOT_JDK_VERSION" >&6; }
28407           fi # end check jdk version
28408         fi # end check javac
28409       fi # end check java
28410     fi # end check boot jdk found
28411   fi
28412 
28413     done
28414   fi
28415 
28416 
28417     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28418     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28419       # Do we have a bin/java?
28420       if test ! -x "$BOOT_JDK/bin/java"; then
28421         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28422 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28423         BOOT_JDK_FOUND=no
28424       else
28425         # Do we have a bin/javac?
28426         if test ! -x "$BOOT_JDK/bin/javac"; then
28427           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28428 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28429           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28430 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28431           BOOT_JDK_FOUND=no
28432         else
28433           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28434           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28435 
28436           # Extra M4 quote needed to protect [] in grep expression.
28437           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28438           if test "x$FOUND_CORRECT_VERSION" = x; then
28439             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28440 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28441             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28442 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28443             BOOT_JDK_FOUND=no
28444           else
28445             # We're done! :-)
28446             BOOT_JDK_FOUND=yes
28447 
28448   # Only process if variable expands to non-empty
28449 
28450   if test "x$BOOT_JDK" != x; then
28451     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28452 
28453   # Input might be given as Windows format, start by converting to
28454   # unix format.
28455   path="$BOOT_JDK"
28456   new_path=`$CYGPATH -u "$path"`
28457 
28458   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28459   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28460   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28461   # "foo.exe" is OK but "foo" is an error.
28462   #
28463   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28464   # It is also a way to make sure we got the proper file name for the real test later on.
28465   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28466   if test "x$test_shortpath" = x; then
28467     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28468 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28469     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28470   fi
28471 
28472   # Call helper function which possibly converts this using DOS-style short mode.
28473   # If so, the updated path is stored in $new_path.
28474 
28475   input_path="$new_path"
28476   # Check if we need to convert this using DOS-style short mode. If the path
28477   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28478   # take no chances and rewrite it.
28479   # Note: m4 eats our [], so we need to use [ and ] instead.
28480   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28481   if test "x$has_forbidden_chars" != x; then
28482     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28483     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28484     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28485     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28486       # Going to short mode and back again did indeed matter. Since short mode is
28487       # case insensitive, let's make it lowercase to improve readability.
28488       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28489       # Now convert it back to Unix-style (cygpath)
28490       input_path=`$CYGPATH -u "$shortmode_path"`
28491       new_path="$input_path"
28492     fi
28493   fi
28494 
28495   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28496   if test "x$test_cygdrive_prefix" = x; then
28497     # As a simple fix, exclude /usr/bin since it's not a real path.
28498     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28499       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28500       # a path prefixed by /cygdrive for fixpath to work.
28501       new_path="$CYGWIN_ROOT_PATH$input_path"
28502     fi
28503   fi
28504 
28505 
28506   if test "x$path" != "x$new_path"; then
28507     BOOT_JDK="$new_path"
28508     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28509 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28510   fi
28511 
28512     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28513 
28514   path="$BOOT_JDK"
28515   has_colon=`$ECHO $path | $GREP ^.:`
28516   new_path="$path"
28517   if test "x$has_colon" = x; then
28518     # Not in mixed or Windows style, start by that.
28519     new_path=`cmd //c echo $path`
28520   fi
28521 
28522 
28523   input_path="$new_path"
28524   # Check if we need to convert this using DOS-style short mode. If the path
28525   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28526   # take no chances and rewrite it.
28527   # Note: m4 eats our [], so we need to use [ and ] instead.
28528   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28529   if test "x$has_forbidden_chars" != x; then
28530     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28531     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28532   fi
28533 
28534 
28535   windows_path="$new_path"
28536   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28537     unix_path=`$CYGPATH -u "$windows_path"`
28538     new_path="$unix_path"
28539   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28540     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28541     new_path="$unix_path"
28542   fi
28543 
28544   if test "x$path" != "x$new_path"; then
28545     BOOT_JDK="$new_path"
28546     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28547 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28548   fi
28549 
28550   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28551   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28552 
28553     else
28554       # We're on a unix platform. Hooray! :)
28555       path="$BOOT_JDK"
28556       has_space=`$ECHO "$path" | $GREP " "`
28557       if test "x$has_space" != x; then
28558         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28559 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28560         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28561       fi
28562 
28563       # Use eval to expand a potential ~
28564       eval path="$path"
28565       if test ! -f "$path" && test ! -d "$path"; then
28566         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28567       fi
28568 
28569       if test -d "$path"; then
28570         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28571       else
28572         dir="`$DIRNAME "$path"`"
28573         base="`$BASENAME "$path"`"
28574         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28575       fi
28576     fi
28577   fi
28578 
28579             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28580 $as_echo_n "checking for Boot JDK... " >&6; }
28581             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28582 $as_echo "$BOOT_JDK" >&6; }
28583             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28584 $as_echo_n "checking Boot JDK version... " >&6; }
28585             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28586             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28587 $as_echo "$BOOT_JDK_VERSION" >&6; }
28588           fi # end check jdk version
28589         fi # end check javac
28590       fi # end check java
28591     fi # end check boot jdk found
28592   fi
28593 
28594   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
28595 
28596   if test "x$BOOT_JDK_FOUND" = xno; then
28597     # Now execute the test
28598 
28599   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28600   BOOT_JDK_SUFFIX="/Contents/Home"
28601   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28602   if test "x$ALL_JDKS_FOUND" != x; then
28603     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28604 
28605   if test "x$BOOT_JDK_FOUND" = xno; then
28606     # Now execute the test
28607 
28608         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28609         if test -d "$BOOT_JDK"; then
28610           BOOT_JDK_FOUND=maybe
28611           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28612 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28613         fi
28614 
28615 
28616     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28617     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28618       # Do we have a bin/java?
28619       if test ! -x "$BOOT_JDK/bin/java"; then
28620         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28621 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28622         BOOT_JDK_FOUND=no
28623       else
28624         # Do we have a bin/javac?
28625         if test ! -x "$BOOT_JDK/bin/javac"; then
28626           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28627 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28628           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28629 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28630           BOOT_JDK_FOUND=no
28631         else
28632           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28633           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28634 
28635           # Extra M4 quote needed to protect [] in grep expression.
28636           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28637           if test "x$FOUND_CORRECT_VERSION" = x; then
28638             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28639 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28640             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28641 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28642             BOOT_JDK_FOUND=no
28643           else
28644             # We're done! :-)
28645             BOOT_JDK_FOUND=yes
28646 
28647   # Only process if variable expands to non-empty
28648 
28649   if test "x$BOOT_JDK" != x; then
28650     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28651 
28652   # Input might be given as Windows format, start by converting to
28653   # unix format.
28654   path="$BOOT_JDK"
28655   new_path=`$CYGPATH -u "$path"`
28656 
28657   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28658   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28659   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28660   # "foo.exe" is OK but "foo" is an error.
28661   #
28662   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28663   # It is also a way to make sure we got the proper file name for the real test later on.
28664   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28665   if test "x$test_shortpath" = x; then
28666     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28667 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28668     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28669   fi
28670 
28671   # Call helper function which possibly converts this using DOS-style short mode.
28672   # If so, the updated path is stored in $new_path.
28673 
28674   input_path="$new_path"
28675   # Check if we need to convert this using DOS-style short mode. If the path
28676   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28677   # take no chances and rewrite it.
28678   # Note: m4 eats our [], so we need to use [ and ] instead.
28679   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28680   if test "x$has_forbidden_chars" != x; then
28681     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28682     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28683     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28684     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28685       # Going to short mode and back again did indeed matter. Since short mode is
28686       # case insensitive, let's make it lowercase to improve readability.
28687       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28688       # Now convert it back to Unix-style (cygpath)
28689       input_path=`$CYGPATH -u "$shortmode_path"`
28690       new_path="$input_path"
28691     fi
28692   fi
28693 
28694   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28695   if test "x$test_cygdrive_prefix" = x; then
28696     # As a simple fix, exclude /usr/bin since it's not a real path.
28697     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28698       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28699       # a path prefixed by /cygdrive for fixpath to work.
28700       new_path="$CYGWIN_ROOT_PATH$input_path"
28701     fi
28702   fi
28703 
28704 
28705   if test "x$path" != "x$new_path"; then
28706     BOOT_JDK="$new_path"
28707     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28708 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28709   fi
28710 
28711     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28712 
28713   path="$BOOT_JDK"
28714   has_colon=`$ECHO $path | $GREP ^.:`
28715   new_path="$path"
28716   if test "x$has_colon" = x; then
28717     # Not in mixed or Windows style, start by that.
28718     new_path=`cmd //c echo $path`
28719   fi
28720 
28721 
28722   input_path="$new_path"
28723   # Check if we need to convert this using DOS-style short mode. If the path
28724   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28725   # take no chances and rewrite it.
28726   # Note: m4 eats our [], so we need to use [ and ] instead.
28727   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28728   if test "x$has_forbidden_chars" != x; then
28729     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28730     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28731   fi
28732 
28733 
28734   windows_path="$new_path"
28735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28736     unix_path=`$CYGPATH -u "$windows_path"`
28737     new_path="$unix_path"
28738   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28739     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28740     new_path="$unix_path"
28741   fi
28742 
28743   if test "x$path" != "x$new_path"; then
28744     BOOT_JDK="$new_path"
28745     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28746 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28747   fi
28748 
28749   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28750   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28751 
28752     else
28753       # We're on a unix platform. Hooray! :)
28754       path="$BOOT_JDK"
28755       has_space=`$ECHO "$path" | $GREP " "`
28756       if test "x$has_space" != x; then
28757         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28758 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28759         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28760       fi
28761 
28762       # Use eval to expand a potential ~
28763       eval path="$path"
28764       if test ! -f "$path" && test ! -d "$path"; then
28765         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28766       fi
28767 
28768       if test -d "$path"; then
28769         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28770       else
28771         dir="`$DIRNAME "$path"`"
28772         base="`$BASENAME "$path"`"
28773         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28774       fi
28775     fi
28776   fi
28777 
28778             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28779 $as_echo_n "checking for Boot JDK... " >&6; }
28780             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28781 $as_echo "$BOOT_JDK" >&6; }
28782             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28783 $as_echo_n "checking Boot JDK version... " >&6; }
28784             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28785             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28786 $as_echo "$BOOT_JDK_VERSION" >&6; }
28787           fi # end check jdk version
28788         fi # end check javac
28789       fi # end check java
28790     fi # end check boot jdk found
28791   fi
28792 
28793     done
28794   fi
28795 
28796 
28797     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28798     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28799       # Do we have a bin/java?
28800       if test ! -x "$BOOT_JDK/bin/java"; then
28801         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28802 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28803         BOOT_JDK_FOUND=no
28804       else
28805         # Do we have a bin/javac?
28806         if test ! -x "$BOOT_JDK/bin/javac"; then
28807           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28808 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28809           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28810 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28811           BOOT_JDK_FOUND=no
28812         else
28813           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28814           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28815 
28816           # Extra M4 quote needed to protect [] in grep expression.
28817           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28818           if test "x$FOUND_CORRECT_VERSION" = x; then
28819             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28820 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28821             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28822 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28823             BOOT_JDK_FOUND=no
28824           else
28825             # We're done! :-)
28826             BOOT_JDK_FOUND=yes
28827 
28828   # Only process if variable expands to non-empty
28829 
28830   if test "x$BOOT_JDK" != x; then
28831     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28832 
28833   # Input might be given as Windows format, start by converting to
28834   # unix format.
28835   path="$BOOT_JDK"
28836   new_path=`$CYGPATH -u "$path"`
28837 
28838   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28839   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28840   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28841   # "foo.exe" is OK but "foo" is an error.
28842   #
28843   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28844   # It is also a way to make sure we got the proper file name for the real test later on.
28845   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28846   if test "x$test_shortpath" = x; then
28847     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28848 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28849     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28850   fi
28851 
28852   # Call helper function which possibly converts this using DOS-style short mode.
28853   # If so, the updated path is stored in $new_path.
28854 
28855   input_path="$new_path"
28856   # Check if we need to convert this using DOS-style short mode. If the path
28857   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28858   # take no chances and rewrite it.
28859   # Note: m4 eats our [], so we need to use [ and ] instead.
28860   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28861   if test "x$has_forbidden_chars" != x; then
28862     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28863     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28864     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28865     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28866       # Going to short mode and back again did indeed matter. Since short mode is
28867       # case insensitive, let's make it lowercase to improve readability.
28868       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28869       # Now convert it back to Unix-style (cygpath)
28870       input_path=`$CYGPATH -u "$shortmode_path"`
28871       new_path="$input_path"
28872     fi
28873   fi
28874 
28875   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28876   if test "x$test_cygdrive_prefix" = x; then
28877     # As a simple fix, exclude /usr/bin since it's not a real path.
28878     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28879       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28880       # a path prefixed by /cygdrive for fixpath to work.
28881       new_path="$CYGWIN_ROOT_PATH$input_path"
28882     fi
28883   fi
28884 
28885 
28886   if test "x$path" != "x$new_path"; then
28887     BOOT_JDK="$new_path"
28888     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28889 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28890   fi
28891 
28892     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28893 
28894   path="$BOOT_JDK"
28895   has_colon=`$ECHO $path | $GREP ^.:`
28896   new_path="$path"
28897   if test "x$has_colon" = x; then
28898     # Not in mixed or Windows style, start by that.
28899     new_path=`cmd //c echo $path`
28900   fi
28901 
28902 
28903   input_path="$new_path"
28904   # Check if we need to convert this using DOS-style short mode. If the path
28905   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28906   # take no chances and rewrite it.
28907   # Note: m4 eats our [], so we need to use [ and ] instead.
28908   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28909   if test "x$has_forbidden_chars" != x; then
28910     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28911     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28912   fi
28913 
28914 
28915   windows_path="$new_path"
28916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28917     unix_path=`$CYGPATH -u "$windows_path"`
28918     new_path="$unix_path"
28919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28920     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28921     new_path="$unix_path"
28922   fi
28923 
28924   if test "x$path" != "x$new_path"; then
28925     BOOT_JDK="$new_path"
28926     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28927 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28928   fi
28929 
28930   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28931   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28932 
28933     else
28934       # We're on a unix platform. Hooray! :)
28935       path="$BOOT_JDK"
28936       has_space=`$ECHO "$path" | $GREP " "`
28937       if test "x$has_space" != x; then
28938         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28939 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28940         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28941       fi
28942 
28943       # Use eval to expand a potential ~
28944       eval path="$path"
28945       if test ! -f "$path" && test ! -d "$path"; then
28946         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28947       fi
28948 
28949       if test -d "$path"; then
28950         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28951       else
28952         dir="`$DIRNAME "$path"`"
28953         base="`$BASENAME "$path"`"
28954         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28955       fi
28956     fi
28957   fi
28958 
28959             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28960 $as_echo_n "checking for Boot JDK... " >&6; }
28961             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28962 $as_echo "$BOOT_JDK" >&6; }
28963             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28964 $as_echo_n "checking Boot JDK version... " >&6; }
28965             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28966             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28967 $as_echo "$BOOT_JDK_VERSION" >&6; }
28968           fi # end check jdk version
28969         fi # end check javac
28970       fi # end check java
28971     fi # end check boot jdk found
28972   fi
28973 
28974 
28975   if test "x$BOOT_JDK_FOUND" = xno; then
28976     # Now execute the test
28977 
28978   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28979   BOOT_JDK_SUFFIX="/Contents/Home"
28980   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28981   if test "x$ALL_JDKS_FOUND" != x; then
28982     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28983 
28984   if test "x$BOOT_JDK_FOUND" = xno; then
28985     # Now execute the test
28986 
28987         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28988         if test -d "$BOOT_JDK"; then
28989           BOOT_JDK_FOUND=maybe
28990           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28991 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28992         fi
28993 
28994 
28995     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28996     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28997       # Do we have a bin/java?
28998       if test ! -x "$BOOT_JDK/bin/java"; then
28999         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29000 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29001         BOOT_JDK_FOUND=no
29002       else
29003         # Do we have a bin/javac?
29004         if test ! -x "$BOOT_JDK/bin/javac"; then
29005           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29006 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29007           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29008 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29009           BOOT_JDK_FOUND=no
29010         else
29011           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29012           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29013 
29014           # Extra M4 quote needed to protect [] in grep expression.
29015           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29016           if test "x$FOUND_CORRECT_VERSION" = x; then
29017             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29018 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29019             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29020 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29021             BOOT_JDK_FOUND=no
29022           else
29023             # We're done! :-)
29024             BOOT_JDK_FOUND=yes
29025 
29026   # Only process if variable expands to non-empty
29027 
29028   if test "x$BOOT_JDK" != x; then
29029     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29030 
29031   # Input might be given as Windows format, start by converting to
29032   # unix format.
29033   path="$BOOT_JDK"
29034   new_path=`$CYGPATH -u "$path"`
29035 
29036   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29037   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29038   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29039   # "foo.exe" is OK but "foo" is an error.
29040   #
29041   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29042   # It is also a way to make sure we got the proper file name for the real test later on.
29043   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29044   if test "x$test_shortpath" = x; then
29045     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29046 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29047     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29048   fi
29049 
29050   # Call helper function which possibly converts this using DOS-style short mode.
29051   # If so, the updated path is stored in $new_path.
29052 
29053   input_path="$new_path"
29054   # Check if we need to convert this using DOS-style short mode. If the path
29055   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29056   # take no chances and rewrite it.
29057   # Note: m4 eats our [], so we need to use [ and ] instead.
29058   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29059   if test "x$has_forbidden_chars" != x; then
29060     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29061     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29062     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29063     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29064       # Going to short mode and back again did indeed matter. Since short mode is
29065       # case insensitive, let's make it lowercase to improve readability.
29066       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29067       # Now convert it back to Unix-style (cygpath)
29068       input_path=`$CYGPATH -u "$shortmode_path"`
29069       new_path="$input_path"
29070     fi
29071   fi
29072 
29073   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29074   if test "x$test_cygdrive_prefix" = x; then
29075     # As a simple fix, exclude /usr/bin since it's not a real path.
29076     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29077       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29078       # a path prefixed by /cygdrive for fixpath to work.
29079       new_path="$CYGWIN_ROOT_PATH$input_path"
29080     fi
29081   fi
29082 
29083 
29084   if test "x$path" != "x$new_path"; then
29085     BOOT_JDK="$new_path"
29086     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29087 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29088   fi
29089 
29090     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29091 
29092   path="$BOOT_JDK"
29093   has_colon=`$ECHO $path | $GREP ^.:`
29094   new_path="$path"
29095   if test "x$has_colon" = x; then
29096     # Not in mixed or Windows style, start by that.
29097     new_path=`cmd //c echo $path`
29098   fi
29099 
29100 
29101   input_path="$new_path"
29102   # Check if we need to convert this using DOS-style short mode. If the path
29103   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29104   # take no chances and rewrite it.
29105   # Note: m4 eats our [], so we need to use [ and ] instead.
29106   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29107   if test "x$has_forbidden_chars" != x; then
29108     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29109     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29110   fi
29111 
29112 
29113   windows_path="$new_path"
29114   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29115     unix_path=`$CYGPATH -u "$windows_path"`
29116     new_path="$unix_path"
29117   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29118     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29119     new_path="$unix_path"
29120   fi
29121 
29122   if test "x$path" != "x$new_path"; then
29123     BOOT_JDK="$new_path"
29124     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29125 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29126   fi
29127 
29128   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29129   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29130 
29131     else
29132       # We're on a unix platform. Hooray! :)
29133       path="$BOOT_JDK"
29134       has_space=`$ECHO "$path" | $GREP " "`
29135       if test "x$has_space" != x; then
29136         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29137 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29138         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29139       fi
29140 
29141       # Use eval to expand a potential ~
29142       eval path="$path"
29143       if test ! -f "$path" && test ! -d "$path"; then
29144         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29145       fi
29146 
29147       if test -d "$path"; then
29148         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29149       else
29150         dir="`$DIRNAME "$path"`"
29151         base="`$BASENAME "$path"`"
29152         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29153       fi
29154     fi
29155   fi
29156 
29157             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29158 $as_echo_n "checking for Boot JDK... " >&6; }
29159             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29160 $as_echo "$BOOT_JDK" >&6; }
29161             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29162 $as_echo_n "checking Boot JDK version... " >&6; }
29163             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29164             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29165 $as_echo "$BOOT_JDK_VERSION" >&6; }
29166           fi # end check jdk version
29167         fi # end check javac
29168       fi # end check java
29169     fi # end check boot jdk found
29170   fi
29171 
29172     done
29173   fi
29174 
29175 
29176     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29177     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29178       # Do we have a bin/java?
29179       if test ! -x "$BOOT_JDK/bin/java"; then
29180         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29181 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29182         BOOT_JDK_FOUND=no
29183       else
29184         # Do we have a bin/javac?
29185         if test ! -x "$BOOT_JDK/bin/javac"; then
29186           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29187 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29188           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29189 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29190           BOOT_JDK_FOUND=no
29191         else
29192           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29193           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29194 
29195           # Extra M4 quote needed to protect [] in grep expression.
29196           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29197           if test "x$FOUND_CORRECT_VERSION" = x; then
29198             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29199 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29200             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29201 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29202             BOOT_JDK_FOUND=no
29203           else
29204             # We're done! :-)
29205             BOOT_JDK_FOUND=yes
29206 
29207   # Only process if variable expands to non-empty
29208 
29209   if test "x$BOOT_JDK" != x; then
29210     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29211 
29212   # Input might be given as Windows format, start by converting to
29213   # unix format.
29214   path="$BOOT_JDK"
29215   new_path=`$CYGPATH -u "$path"`
29216 
29217   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29218   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29219   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29220   # "foo.exe" is OK but "foo" is an error.
29221   #
29222   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29223   # It is also a way to make sure we got the proper file name for the real test later on.
29224   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29225   if test "x$test_shortpath" = x; then
29226     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29227 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29228     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29229   fi
29230 
29231   # Call helper function which possibly converts this using DOS-style short mode.
29232   # If so, the updated path is stored in $new_path.
29233 
29234   input_path="$new_path"
29235   # Check if we need to convert this using DOS-style short mode. If the path
29236   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29237   # take no chances and rewrite it.
29238   # Note: m4 eats our [], so we need to use [ and ] instead.
29239   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29240   if test "x$has_forbidden_chars" != x; then
29241     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29242     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29243     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29244     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29245       # Going to short mode and back again did indeed matter. Since short mode is
29246       # case insensitive, let's make it lowercase to improve readability.
29247       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29248       # Now convert it back to Unix-style (cygpath)
29249       input_path=`$CYGPATH -u "$shortmode_path"`
29250       new_path="$input_path"
29251     fi
29252   fi
29253 
29254   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29255   if test "x$test_cygdrive_prefix" = x; then
29256     # As a simple fix, exclude /usr/bin since it's not a real path.
29257     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29258       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29259       # a path prefixed by /cygdrive for fixpath to work.
29260       new_path="$CYGWIN_ROOT_PATH$input_path"
29261     fi
29262   fi
29263 
29264 
29265   if test "x$path" != "x$new_path"; then
29266     BOOT_JDK="$new_path"
29267     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29268 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29269   fi
29270 
29271     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29272 
29273   path="$BOOT_JDK"
29274   has_colon=`$ECHO $path | $GREP ^.:`
29275   new_path="$path"
29276   if test "x$has_colon" = x; then
29277     # Not in mixed or Windows style, start by that.
29278     new_path=`cmd //c echo $path`
29279   fi
29280 
29281 
29282   input_path="$new_path"
29283   # Check if we need to convert this using DOS-style short mode. If the path
29284   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29285   # take no chances and rewrite it.
29286   # Note: m4 eats our [], so we need to use [ and ] instead.
29287   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29288   if test "x$has_forbidden_chars" != x; then
29289     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29290     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29291   fi
29292 
29293 
29294   windows_path="$new_path"
29295   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29296     unix_path=`$CYGPATH -u "$windows_path"`
29297     new_path="$unix_path"
29298   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29299     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29300     new_path="$unix_path"
29301   fi
29302 
29303   if test "x$path" != "x$new_path"; then
29304     BOOT_JDK="$new_path"
29305     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29306 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29307   fi
29308 
29309   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29310   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29311 
29312     else
29313       # We're on a unix platform. Hooray! :)
29314       path="$BOOT_JDK"
29315       has_space=`$ECHO "$path" | $GREP " "`
29316       if test "x$has_space" != x; then
29317         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29318 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29319         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29320       fi
29321 
29322       # Use eval to expand a potential ~
29323       eval path="$path"
29324       if test ! -f "$path" && test ! -d "$path"; then
29325         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29326       fi
29327 
29328       if test -d "$path"; then
29329         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29330       else
29331         dir="`$DIRNAME "$path"`"
29332         base="`$BASENAME "$path"`"
29333         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29334       fi
29335     fi
29336   fi
29337 
29338             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29339 $as_echo_n "checking for Boot JDK... " >&6; }
29340             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29341 $as_echo "$BOOT_JDK" >&6; }
29342             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29343 $as_echo_n "checking Boot JDK version... " >&6; }
29344             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29345             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29346 $as_echo "$BOOT_JDK_VERSION" >&6; }
29347           fi # end check jdk version
29348         fi # end check javac
29349       fi # end check java
29350     fi # end check boot jdk found
29351   fi
29352 
29353   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29354 
29355   if test "x$BOOT_JDK_FOUND" = xno; then
29356     # Now execute the test
29357 
29358   BOOT_JDK_PREFIX="/usr/lib/jvm"
29359   BOOT_JDK_SUFFIX=""
29360   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29361   if test "x$ALL_JDKS_FOUND" != x; then
29362     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29363 
29364   if test "x$BOOT_JDK_FOUND" = xno; then
29365     # Now execute the test
29366 
29367         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29368         if test -d "$BOOT_JDK"; then
29369           BOOT_JDK_FOUND=maybe
29370           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29371 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29372         fi
29373 
29374 
29375     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29376     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29377       # Do we have a bin/java?
29378       if test ! -x "$BOOT_JDK/bin/java"; then
29379         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29380 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29381         BOOT_JDK_FOUND=no
29382       else
29383         # Do we have a bin/javac?
29384         if test ! -x "$BOOT_JDK/bin/javac"; then
29385           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29386 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29387           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29388 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29389           BOOT_JDK_FOUND=no
29390         else
29391           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29392           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29393 
29394           # Extra M4 quote needed to protect [] in grep expression.
29395           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29396           if test "x$FOUND_CORRECT_VERSION" = x; then
29397             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29398 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29399             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29400 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29401             BOOT_JDK_FOUND=no
29402           else
29403             # We're done! :-)
29404             BOOT_JDK_FOUND=yes
29405 
29406   # Only process if variable expands to non-empty
29407 
29408   if test "x$BOOT_JDK" != x; then
29409     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29410 
29411   # Input might be given as Windows format, start by converting to
29412   # unix format.
29413   path="$BOOT_JDK"
29414   new_path=`$CYGPATH -u "$path"`
29415 
29416   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29417   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29418   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29419   # "foo.exe" is OK but "foo" is an error.
29420   #
29421   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29422   # It is also a way to make sure we got the proper file name for the real test later on.
29423   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29424   if test "x$test_shortpath" = x; then
29425     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29426 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29427     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29428   fi
29429 
29430   # Call helper function which possibly converts this using DOS-style short mode.
29431   # If so, the updated path is stored in $new_path.
29432 
29433   input_path="$new_path"
29434   # Check if we need to convert this using DOS-style short mode. If the path
29435   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29436   # take no chances and rewrite it.
29437   # Note: m4 eats our [], so we need to use [ and ] instead.
29438   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29439   if test "x$has_forbidden_chars" != x; then
29440     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29441     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29442     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29443     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29444       # Going to short mode and back again did indeed matter. Since short mode is
29445       # case insensitive, let's make it lowercase to improve readability.
29446       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29447       # Now convert it back to Unix-style (cygpath)
29448       input_path=`$CYGPATH -u "$shortmode_path"`
29449       new_path="$input_path"
29450     fi
29451   fi
29452 
29453   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29454   if test "x$test_cygdrive_prefix" = x; then
29455     # As a simple fix, exclude /usr/bin since it's not a real path.
29456     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29457       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29458       # a path prefixed by /cygdrive for fixpath to work.
29459       new_path="$CYGWIN_ROOT_PATH$input_path"
29460     fi
29461   fi
29462 
29463 
29464   if test "x$path" != "x$new_path"; then
29465     BOOT_JDK="$new_path"
29466     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29467 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29468   fi
29469 
29470     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29471 
29472   path="$BOOT_JDK"
29473   has_colon=`$ECHO $path | $GREP ^.:`
29474   new_path="$path"
29475   if test "x$has_colon" = x; then
29476     # Not in mixed or Windows style, start by that.
29477     new_path=`cmd //c echo $path`
29478   fi
29479 
29480 
29481   input_path="$new_path"
29482   # Check if we need to convert this using DOS-style short mode. If the path
29483   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29484   # take no chances and rewrite it.
29485   # Note: m4 eats our [], so we need to use [ and ] instead.
29486   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29487   if test "x$has_forbidden_chars" != x; then
29488     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29489     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29490   fi
29491 
29492 
29493   windows_path="$new_path"
29494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29495     unix_path=`$CYGPATH -u "$windows_path"`
29496     new_path="$unix_path"
29497   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29498     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29499     new_path="$unix_path"
29500   fi
29501 
29502   if test "x$path" != "x$new_path"; then
29503     BOOT_JDK="$new_path"
29504     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29505 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29506   fi
29507 
29508   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29509   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29510 
29511     else
29512       # We're on a unix platform. Hooray! :)
29513       path="$BOOT_JDK"
29514       has_space=`$ECHO "$path" | $GREP " "`
29515       if test "x$has_space" != x; then
29516         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29517 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29518         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29519       fi
29520 
29521       # Use eval to expand a potential ~
29522       eval path="$path"
29523       if test ! -f "$path" && test ! -d "$path"; then
29524         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29525       fi
29526 
29527       if test -d "$path"; then
29528         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29529       else
29530         dir="`$DIRNAME "$path"`"
29531         base="`$BASENAME "$path"`"
29532         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29533       fi
29534     fi
29535   fi
29536 
29537             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29538 $as_echo_n "checking for Boot JDK... " >&6; }
29539             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29540 $as_echo "$BOOT_JDK" >&6; }
29541             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29542 $as_echo_n "checking Boot JDK version... " >&6; }
29543             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29544             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29545 $as_echo "$BOOT_JDK_VERSION" >&6; }
29546           fi # end check jdk version
29547         fi # end check javac
29548       fi # end check java
29549     fi # end check boot jdk found
29550   fi
29551 
29552     done
29553   fi
29554 
29555 
29556     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29557     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29558       # Do we have a bin/java?
29559       if test ! -x "$BOOT_JDK/bin/java"; then
29560         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29561 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29562         BOOT_JDK_FOUND=no
29563       else
29564         # Do we have a bin/javac?
29565         if test ! -x "$BOOT_JDK/bin/javac"; then
29566           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29567 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29568           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29569 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29570           BOOT_JDK_FOUND=no
29571         else
29572           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29573           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29574 
29575           # Extra M4 quote needed to protect [] in grep expression.
29576           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29577           if test "x$FOUND_CORRECT_VERSION" = x; then
29578             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29579 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29580             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29581 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29582             BOOT_JDK_FOUND=no
29583           else
29584             # We're done! :-)
29585             BOOT_JDK_FOUND=yes
29586 
29587   # Only process if variable expands to non-empty
29588 
29589   if test "x$BOOT_JDK" != x; then
29590     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29591 
29592   # Input might be given as Windows format, start by converting to
29593   # unix format.
29594   path="$BOOT_JDK"
29595   new_path=`$CYGPATH -u "$path"`
29596 
29597   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29598   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29599   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29600   # "foo.exe" is OK but "foo" is an error.
29601   #
29602   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29603   # It is also a way to make sure we got the proper file name for the real test later on.
29604   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29605   if test "x$test_shortpath" = x; then
29606     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29607 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29608     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29609   fi
29610 
29611   # Call helper function which possibly converts this using DOS-style short mode.
29612   # If so, the updated path is stored in $new_path.
29613 
29614   input_path="$new_path"
29615   # Check if we need to convert this using DOS-style short mode. If the path
29616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29617   # take no chances and rewrite it.
29618   # Note: m4 eats our [], so we need to use [ and ] instead.
29619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29620   if test "x$has_forbidden_chars" != x; then
29621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29622     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29623     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29624     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29625       # Going to short mode and back again did indeed matter. Since short mode is
29626       # case insensitive, let's make it lowercase to improve readability.
29627       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29628       # Now convert it back to Unix-style (cygpath)
29629       input_path=`$CYGPATH -u "$shortmode_path"`
29630       new_path="$input_path"
29631     fi
29632   fi
29633 
29634   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29635   if test "x$test_cygdrive_prefix" = x; then
29636     # As a simple fix, exclude /usr/bin since it's not a real path.
29637     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29638       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29639       # a path prefixed by /cygdrive for fixpath to work.
29640       new_path="$CYGWIN_ROOT_PATH$input_path"
29641     fi
29642   fi
29643 
29644 
29645   if test "x$path" != "x$new_path"; then
29646     BOOT_JDK="$new_path"
29647     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29648 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29649   fi
29650 
29651     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29652 
29653   path="$BOOT_JDK"
29654   has_colon=`$ECHO $path | $GREP ^.:`
29655   new_path="$path"
29656   if test "x$has_colon" = x; then
29657     # Not in mixed or Windows style, start by that.
29658     new_path=`cmd //c echo $path`
29659   fi
29660 
29661 
29662   input_path="$new_path"
29663   # Check if we need to convert this using DOS-style short mode. If the path
29664   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29665   # take no chances and rewrite it.
29666   # Note: m4 eats our [], so we need to use [ and ] instead.
29667   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29668   if test "x$has_forbidden_chars" != x; then
29669     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29670     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29671   fi
29672 
29673 
29674   windows_path="$new_path"
29675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29676     unix_path=`$CYGPATH -u "$windows_path"`
29677     new_path="$unix_path"
29678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29680     new_path="$unix_path"
29681   fi
29682 
29683   if test "x$path" != "x$new_path"; then
29684     BOOT_JDK="$new_path"
29685     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29686 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29687   fi
29688 
29689   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29690   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29691 
29692     else
29693       # We're on a unix platform. Hooray! :)
29694       path="$BOOT_JDK"
29695       has_space=`$ECHO "$path" | $GREP " "`
29696       if test "x$has_space" != x; then
29697         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29698 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29699         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29700       fi
29701 
29702       # Use eval to expand a potential ~
29703       eval path="$path"
29704       if test ! -f "$path" && test ! -d "$path"; then
29705         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29706       fi
29707 
29708       if test -d "$path"; then
29709         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29710       else
29711         dir="`$DIRNAME "$path"`"
29712         base="`$BASENAME "$path"`"
29713         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29714       fi
29715     fi
29716   fi
29717 
29718             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29719 $as_echo_n "checking for Boot JDK... " >&6; }
29720             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29721 $as_echo "$BOOT_JDK" >&6; }
29722             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29723 $as_echo_n "checking Boot JDK version... " >&6; }
29724             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29725             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29726 $as_echo "$BOOT_JDK_VERSION" >&6; }
29727           fi # end check jdk version
29728         fi # end check javac
29729       fi # end check java
29730     fi # end check boot jdk found
29731   fi
29732 
29733   fi
29734 
29735 
29736     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29737     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29738       # Do we have a bin/java?
29739       if test ! -x "$BOOT_JDK/bin/java"; then
29740         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29741 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29742         BOOT_JDK_FOUND=no
29743       else
29744         # Do we have a bin/javac?
29745         if test ! -x "$BOOT_JDK/bin/javac"; then
29746           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29747 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29748           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29749 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29750           BOOT_JDK_FOUND=no
29751         else
29752           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29753           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29754 
29755           # Extra M4 quote needed to protect [] in grep expression.
29756           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29757           if test "x$FOUND_CORRECT_VERSION" = x; then
29758             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29759 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29760             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29761 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29762             BOOT_JDK_FOUND=no
29763           else
29764             # We're done! :-)
29765             BOOT_JDK_FOUND=yes
29766 
29767   # Only process if variable expands to non-empty
29768 
29769   if test "x$BOOT_JDK" != x; then
29770     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29771 
29772   # Input might be given as Windows format, start by converting to
29773   # unix format.
29774   path="$BOOT_JDK"
29775   new_path=`$CYGPATH -u "$path"`
29776 
29777   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29778   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29779   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29780   # "foo.exe" is OK but "foo" is an error.
29781   #
29782   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29783   # It is also a way to make sure we got the proper file name for the real test later on.
29784   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29785   if test "x$test_shortpath" = x; then
29786     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29787 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29788     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29789   fi
29790 
29791   # Call helper function which possibly converts this using DOS-style short mode.
29792   # If so, the updated path is stored in $new_path.
29793 
29794   input_path="$new_path"
29795   # Check if we need to convert this using DOS-style short mode. If the path
29796   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29797   # take no chances and rewrite it.
29798   # Note: m4 eats our [], so we need to use [ and ] instead.
29799   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29800   if test "x$has_forbidden_chars" != x; then
29801     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29802     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29803     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29804     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29805       # Going to short mode and back again did indeed matter. Since short mode is
29806       # case insensitive, let's make it lowercase to improve readability.
29807       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29808       # Now convert it back to Unix-style (cygpath)
29809       input_path=`$CYGPATH -u "$shortmode_path"`
29810       new_path="$input_path"
29811     fi
29812   fi
29813 
29814   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29815   if test "x$test_cygdrive_prefix" = x; then
29816     # As a simple fix, exclude /usr/bin since it's not a real path.
29817     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29818       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29819       # a path prefixed by /cygdrive for fixpath to work.
29820       new_path="$CYGWIN_ROOT_PATH$input_path"
29821     fi
29822   fi
29823 
29824 
29825   if test "x$path" != "x$new_path"; then
29826     BOOT_JDK="$new_path"
29827     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29828 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29829   fi
29830 
29831     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29832 
29833   path="$BOOT_JDK"
29834   has_colon=`$ECHO $path | $GREP ^.:`
29835   new_path="$path"
29836   if test "x$has_colon" = x; then
29837     # Not in mixed or Windows style, start by that.
29838     new_path=`cmd //c echo $path`
29839   fi
29840 
29841 
29842   input_path="$new_path"
29843   # Check if we need to convert this using DOS-style short mode. If the path
29844   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29845   # take no chances and rewrite it.
29846   # Note: m4 eats our [], so we need to use [ and ] instead.
29847   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29848   if test "x$has_forbidden_chars" != x; then
29849     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29850     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29851   fi
29852 
29853 
29854   windows_path="$new_path"
29855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29856     unix_path=`$CYGPATH -u "$windows_path"`
29857     new_path="$unix_path"
29858   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29859     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29860     new_path="$unix_path"
29861   fi
29862 
29863   if test "x$path" != "x$new_path"; then
29864     BOOT_JDK="$new_path"
29865     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29866 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29867   fi
29868 
29869   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29870   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29871 
29872     else
29873       # We're on a unix platform. Hooray! :)
29874       path="$BOOT_JDK"
29875       has_space=`$ECHO "$path" | $GREP " "`
29876       if test "x$has_space" != x; then
29877         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29878 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29879         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29880       fi
29881 
29882       # Use eval to expand a potential ~
29883       eval path="$path"
29884       if test ! -f "$path" && test ! -d "$path"; then
29885         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29886       fi
29887 
29888       if test -d "$path"; then
29889         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29890       else
29891         dir="`$DIRNAME "$path"`"
29892         base="`$BASENAME "$path"`"
29893         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29894       fi
29895     fi
29896   fi
29897 
29898             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29899 $as_echo_n "checking for Boot JDK... " >&6; }
29900             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29901 $as_echo "$BOOT_JDK" >&6; }
29902             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29903 $as_echo_n "checking Boot JDK version... " >&6; }
29904             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29905             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29906 $as_echo "$BOOT_JDK_VERSION" >&6; }
29907           fi # end check jdk version
29908         fi # end check javac
29909       fi # end check java
29910     fi # end check boot jdk found
29911   fi
29912 
29913 
29914   # If we haven't found anything yet, we've truly lost. Give up.
29915   if test "x$BOOT_JDK_FOUND" = xno; then
29916 
29917   # Print a helpful message on how to acquire the necessary build dependency.
29918   # openjdk is the help tag: freetype, cups, alsa etc
29919   MISSING_DEPENDENCY=openjdk
29920 
29921   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29922     cygwin_help $MISSING_DEPENDENCY
29923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29924     msys_help $MISSING_DEPENDENCY
29925   else
29926     PKGHANDLER_COMMAND=
29927 
29928     case $PKGHANDLER in
29929       apt-get)
29930         apt_help     $MISSING_DEPENDENCY ;;
29931       yum)
29932         yum_help     $MISSING_DEPENDENCY ;;
29933       port)
29934         port_help    $MISSING_DEPENDENCY ;;
29935       pkgutil)
29936         pkgutil_help $MISSING_DEPENDENCY ;;
29937       pkgadd)
29938         pkgadd_help  $MISSING_DEPENDENCY ;;
29939     esac
29940 
29941     if test "x$PKGHANDLER_COMMAND" != x; then
29942       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29943     fi
29944   fi
29945 
29946     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29947 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29948     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29949 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29950     as_fn_error $? "Cannot continue" "$LINENO" 5
29951   fi
29952 
29953 
29954 
29955   # Setup tools from the Boot JDK.
29956 
29957   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29958 
29959   # Publish this variable in the help.
29960 
29961 
29962   if [ -z "${JAVA+x}" ]; then
29963     # The variable is not set by user, try to locate tool using the code snippet
29964 
29965       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29966 $as_echo_n "checking for java in Boot JDK... " >&6; }
29967       JAVA=$BOOT_JDK/bin/java
29968       if test ! -x $JAVA; then
29969         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29970 $as_echo "not found" >&6; }
29971         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29972 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29973         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29974       fi
29975       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29976 $as_echo "ok" >&6; }
29977 
29978 
29979   else
29980     # The variable is set, but is it from the command line or the environment?
29981 
29982     # Try to remove the string !JAVA! from our list.
29983     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29984     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29985       # If it failed, the variable was not from the command line. Ignore it,
29986       # but warn the user (except for BASH, which is always set by the calling BASH).
29987       if test "xJAVA" != xBASH; then
29988         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29989 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29990       fi
29991       # Try to locate tool using the code snippet
29992 
29993       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29994 $as_echo_n "checking for java in Boot JDK... " >&6; }
29995       JAVA=$BOOT_JDK/bin/java
29996       if test ! -x $JAVA; then
29997         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29998 $as_echo "not found" >&6; }
29999         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30000 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30001         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30002       fi
30003       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30004 $as_echo "ok" >&6; }
30005 
30006 
30007     else
30008       # If it succeeded, then it was overridden by the user. We will use it
30009       # for the tool.
30010 
30011       # First remove it from the list of overridden variables, so we can test
30012       # for unknown variables in the end.
30013       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30014 
30015       # Check if we try to supply an empty value
30016       if test "x$JAVA" = x; then
30017         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30018 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30019         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30020 $as_echo_n "checking for JAVA... " >&6; }
30021         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30022 $as_echo "disabled" >&6; }
30023       else
30024         # Check if the provided tool contains a complete path.
30025         tool_specified="$JAVA"
30026         tool_basename="${tool_specified##*/}"
30027         if test "x$tool_basename" = "x$tool_specified"; then
30028           # A command without a complete path is provided, search $PATH.
30029           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30030 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30031           # Extract the first word of "$tool_basename", so it can be a program name with args.
30032 set dummy $tool_basename; ac_word=$2
30033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30034 $as_echo_n "checking for $ac_word... " >&6; }
30035 if ${ac_cv_path_JAVA+:} false; then :
30036   $as_echo_n "(cached) " >&6
30037 else
30038   case $JAVA in
30039   [\\/]* | ?:[\\/]*)
30040   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30041   ;;
30042   *)
30043   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30044 for as_dir in $PATH
30045 do
30046   IFS=$as_save_IFS
30047   test -z "$as_dir" && as_dir=.
30048     for ac_exec_ext in '' $ac_executable_extensions; do
30049   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30050     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30051     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30052     break 2
30053   fi
30054 done
30055   done
30056 IFS=$as_save_IFS
30057 
30058   ;;
30059 esac
30060 fi
30061 JAVA=$ac_cv_path_JAVA
30062 if test -n "$JAVA"; then
30063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30064 $as_echo "$JAVA" >&6; }
30065 else
30066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30067 $as_echo "no" >&6; }
30068 fi
30069 
30070 
30071           if test "x$JAVA" = x; then
30072             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30073           fi
30074         else
30075           # Otherwise we believe it is a complete path. Use it as it is.
30076           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30077 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30078           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30079 $as_echo_n "checking for JAVA... " >&6; }
30080           if test ! -x "$tool_specified"; then
30081             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30082 $as_echo "not found" >&6; }
30083             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30084           fi
30085           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30086 $as_echo "$tool_specified" >&6; }
30087         fi
30088       fi
30089     fi
30090 
30091   fi
30092 
30093 
30094 
30095   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30096 
30097   # Publish this variable in the help.
30098 
30099 
30100   if [ -z "${JAVAC+x}" ]; then
30101     # The variable is not set by user, try to locate tool using the code snippet
30102 
30103       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30104 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30105       JAVAC=$BOOT_JDK/bin/javac
30106       if test ! -x $JAVAC; then
30107         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30108 $as_echo "not found" >&6; }
30109         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30110 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30111         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30112       fi
30113       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30114 $as_echo "ok" >&6; }
30115 
30116 
30117   else
30118     # The variable is set, but is it from the command line or the environment?
30119 
30120     # Try to remove the string !JAVAC! from our list.
30121     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30122     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30123       # If it failed, the variable was not from the command line. Ignore it,
30124       # but warn the user (except for BASH, which is always set by the calling BASH).
30125       if test "xJAVAC" != xBASH; then
30126         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30127 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30128       fi
30129       # Try to locate tool using the code snippet
30130 
30131       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30132 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30133       JAVAC=$BOOT_JDK/bin/javac
30134       if test ! -x $JAVAC; then
30135         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30136 $as_echo "not found" >&6; }
30137         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30138 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30139         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30140       fi
30141       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30142 $as_echo "ok" >&6; }
30143 
30144 
30145     else
30146       # If it succeeded, then it was overridden by the user. We will use it
30147       # for the tool.
30148 
30149       # First remove it from the list of overridden variables, so we can test
30150       # for unknown variables in the end.
30151       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30152 
30153       # Check if we try to supply an empty value
30154       if test "x$JAVAC" = x; then
30155         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30156 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30157         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30158 $as_echo_n "checking for JAVAC... " >&6; }
30159         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30160 $as_echo "disabled" >&6; }
30161       else
30162         # Check if the provided tool contains a complete path.
30163         tool_specified="$JAVAC"
30164         tool_basename="${tool_specified##*/}"
30165         if test "x$tool_basename" = "x$tool_specified"; then
30166           # A command without a complete path is provided, search $PATH.
30167           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30168 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30169           # Extract the first word of "$tool_basename", so it can be a program name with args.
30170 set dummy $tool_basename; ac_word=$2
30171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30172 $as_echo_n "checking for $ac_word... " >&6; }
30173 if ${ac_cv_path_JAVAC+:} false; then :
30174   $as_echo_n "(cached) " >&6
30175 else
30176   case $JAVAC in
30177   [\\/]* | ?:[\\/]*)
30178   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30179   ;;
30180   *)
30181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30182 for as_dir in $PATH
30183 do
30184   IFS=$as_save_IFS
30185   test -z "$as_dir" && as_dir=.
30186     for ac_exec_ext in '' $ac_executable_extensions; do
30187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30188     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30190     break 2
30191   fi
30192 done
30193   done
30194 IFS=$as_save_IFS
30195 
30196   ;;
30197 esac
30198 fi
30199 JAVAC=$ac_cv_path_JAVAC
30200 if test -n "$JAVAC"; then
30201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30202 $as_echo "$JAVAC" >&6; }
30203 else
30204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30205 $as_echo "no" >&6; }
30206 fi
30207 
30208 
30209           if test "x$JAVAC" = x; then
30210             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30211           fi
30212         else
30213           # Otherwise we believe it is a complete path. Use it as it is.
30214           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30215 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30216           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30217 $as_echo_n "checking for JAVAC... " >&6; }
30218           if test ! -x "$tool_specified"; then
30219             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30220 $as_echo "not found" >&6; }
30221             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30222           fi
30223           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30224 $as_echo "$tool_specified" >&6; }
30225         fi
30226       fi
30227     fi
30228 
30229   fi
30230 
30231 
30232 
30233   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30234 
30235   # Publish this variable in the help.
30236 
30237 
30238   if [ -z "${JAVAH+x}" ]; then
30239     # The variable is not set by user, try to locate tool using the code snippet
30240 
30241       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30242 $as_echo_n "checking for javah in Boot JDK... " >&6; }
30243       JAVAH=$BOOT_JDK/bin/javah
30244       if test ! -x $JAVAH; then
30245         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30246 $as_echo "not found" >&6; }
30247         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30248 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30249         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30250       fi
30251       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30252 $as_echo "ok" >&6; }
30253 
30254 
30255   else
30256     # The variable is set, but is it from the command line or the environment?
30257 
30258     # Try to remove the string !JAVAH! from our list.
30259     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30260     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30261       # If it failed, the variable was not from the command line. Ignore it,
30262       # but warn the user (except for BASH, which is always set by the calling BASH).
30263       if test "xJAVAH" != xBASH; then
30264         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30265 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30266       fi
30267       # Try to locate tool using the code snippet
30268 
30269       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30270 $as_echo_n "checking for javah in Boot JDK... " >&6; }
30271       JAVAH=$BOOT_JDK/bin/javah
30272       if test ! -x $JAVAH; then
30273         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30274 $as_echo "not found" >&6; }
30275         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30276 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30277         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30278       fi
30279       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30280 $as_echo "ok" >&6; }
30281 
30282 
30283     else
30284       # If it succeeded, then it was overridden by the user. We will use it
30285       # for the tool.
30286 
30287       # First remove it from the list of overridden variables, so we can test
30288       # for unknown variables in the end.
30289       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30290 
30291       # Check if we try to supply an empty value
30292       if test "x$JAVAH" = x; then
30293         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30294 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30295         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30296 $as_echo_n "checking for JAVAH... " >&6; }
30297         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30298 $as_echo "disabled" >&6; }
30299       else
30300         # Check if the provided tool contains a complete path.
30301         tool_specified="$JAVAH"
30302         tool_basename="${tool_specified##*/}"
30303         if test "x$tool_basename" = "x$tool_specified"; then
30304           # A command without a complete path is provided, search $PATH.
30305           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30306 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30307           # Extract the first word of "$tool_basename", so it can be a program name with args.
30308 set dummy $tool_basename; ac_word=$2
30309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30310 $as_echo_n "checking for $ac_word... " >&6; }
30311 if ${ac_cv_path_JAVAH+:} false; then :
30312   $as_echo_n "(cached) " >&6
30313 else
30314   case $JAVAH in
30315   [\\/]* | ?:[\\/]*)
30316   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30317   ;;
30318   *)
30319   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30320 for as_dir in $PATH
30321 do
30322   IFS=$as_save_IFS
30323   test -z "$as_dir" && as_dir=.
30324     for ac_exec_ext in '' $ac_executable_extensions; do
30325   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30326     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30328     break 2
30329   fi
30330 done
30331   done
30332 IFS=$as_save_IFS
30333 
30334   ;;
30335 esac
30336 fi
30337 JAVAH=$ac_cv_path_JAVAH
30338 if test -n "$JAVAH"; then
30339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30340 $as_echo "$JAVAH" >&6; }
30341 else
30342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30343 $as_echo "no" >&6; }
30344 fi
30345 
30346 
30347           if test "x$JAVAH" = x; then
30348             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30349           fi
30350         else
30351           # Otherwise we believe it is a complete path. Use it as it is.
30352           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30353 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30354           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30355 $as_echo_n "checking for JAVAH... " >&6; }
30356           if test ! -x "$tool_specified"; then
30357             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30358 $as_echo "not found" >&6; }
30359             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30360           fi
30361           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30362 $as_echo "$tool_specified" >&6; }
30363         fi
30364       fi
30365     fi
30366 
30367   fi
30368 
30369 
30370 
30371   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30372 
30373   # Publish this variable in the help.
30374 
30375 
30376   if [ -z "${JAR+x}" ]; then
30377     # The variable is not set by user, try to locate tool using the code snippet
30378 
30379       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30380 $as_echo_n "checking for jar in Boot JDK... " >&6; }
30381       JAR=$BOOT_JDK/bin/jar
30382       if test ! -x $JAR; then
30383         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30384 $as_echo "not found" >&6; }
30385         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30386 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30387         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30388       fi
30389       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30390 $as_echo "ok" >&6; }
30391 
30392 
30393   else
30394     # The variable is set, but is it from the command line or the environment?
30395 
30396     # Try to remove the string !JAR! from our list.
30397     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30398     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30399       # If it failed, the variable was not from the command line. Ignore it,
30400       # but warn the user (except for BASH, which is always set by the calling BASH).
30401       if test "xJAR" != xBASH; then
30402         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30403 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30404       fi
30405       # Try to locate tool using the code snippet
30406 
30407       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30408 $as_echo_n "checking for jar in Boot JDK... " >&6; }
30409       JAR=$BOOT_JDK/bin/jar
30410       if test ! -x $JAR; then
30411         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30412 $as_echo "not found" >&6; }
30413         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30414 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30415         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30416       fi
30417       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30418 $as_echo "ok" >&6; }
30419 
30420 
30421     else
30422       # If it succeeded, then it was overridden by the user. We will use it
30423       # for the tool.
30424 
30425       # First remove it from the list of overridden variables, so we can test
30426       # for unknown variables in the end.
30427       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30428 
30429       # Check if we try to supply an empty value
30430       if test "x$JAR" = x; then
30431         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30432 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30433         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30434 $as_echo_n "checking for JAR... " >&6; }
30435         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30436 $as_echo "disabled" >&6; }
30437       else
30438         # Check if the provided tool contains a complete path.
30439         tool_specified="$JAR"
30440         tool_basename="${tool_specified##*/}"
30441         if test "x$tool_basename" = "x$tool_specified"; then
30442           # A command without a complete path is provided, search $PATH.
30443           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30444 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30445           # Extract the first word of "$tool_basename", so it can be a program name with args.
30446 set dummy $tool_basename; ac_word=$2
30447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30448 $as_echo_n "checking for $ac_word... " >&6; }
30449 if ${ac_cv_path_JAR+:} false; then :
30450   $as_echo_n "(cached) " >&6
30451 else
30452   case $JAR in
30453   [\\/]* | ?:[\\/]*)
30454   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30455   ;;
30456   *)
30457   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30458 for as_dir in $PATH
30459 do
30460   IFS=$as_save_IFS
30461   test -z "$as_dir" && as_dir=.
30462     for ac_exec_ext in '' $ac_executable_extensions; do
30463   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30464     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30465     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30466     break 2
30467   fi
30468 done
30469   done
30470 IFS=$as_save_IFS
30471 
30472   ;;
30473 esac
30474 fi
30475 JAR=$ac_cv_path_JAR
30476 if test -n "$JAR"; then
30477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30478 $as_echo "$JAR" >&6; }
30479 else
30480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30481 $as_echo "no" >&6; }
30482 fi
30483 
30484 
30485           if test "x$JAR" = x; then
30486             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30487           fi
30488         else
30489           # Otherwise we believe it is a complete path. Use it as it is.
30490           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30491 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30492           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30493 $as_echo_n "checking for JAR... " >&6; }
30494           if test ! -x "$tool_specified"; then
30495             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30496 $as_echo "not found" >&6; }
30497             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30498           fi
30499           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30500 $as_echo "$tool_specified" >&6; }
30501         fi
30502       fi
30503     fi
30504 
30505   fi
30506 
30507 
30508 
30509   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30510 
30511   # Publish this variable in the help.
30512 
30513 
30514   if [ -z "${JARSIGNER+x}" ]; then
30515     # The variable is not set by user, try to locate tool using the code snippet
30516 
30517       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30518 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30519       JARSIGNER=$BOOT_JDK/bin/jarsigner
30520       if test ! -x $JARSIGNER; then
30521         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30522 $as_echo "not found" >&6; }
30523         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30524 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30525         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30526       fi
30527       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30528 $as_echo "ok" >&6; }
30529 
30530 
30531   else
30532     # The variable is set, but is it from the command line or the environment?
30533 
30534     # Try to remove the string !JARSIGNER! from our list.
30535     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30536     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30537       # If it failed, the variable was not from the command line. Ignore it,
30538       # but warn the user (except for BASH, which is always set by the calling BASH).
30539       if test "xJARSIGNER" != xBASH; then
30540         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30541 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30542       fi
30543       # Try to locate tool using the code snippet
30544 
30545       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30546 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30547       JARSIGNER=$BOOT_JDK/bin/jarsigner
30548       if test ! -x $JARSIGNER; then
30549         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30550 $as_echo "not found" >&6; }
30551         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30552 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30553         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30554       fi
30555       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30556 $as_echo "ok" >&6; }
30557 
30558 
30559     else
30560       # If it succeeded, then it was overridden by the user. We will use it
30561       # for the tool.
30562 
30563       # First remove it from the list of overridden variables, so we can test
30564       # for unknown variables in the end.
30565       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30566 
30567       # Check if we try to supply an empty value
30568       if test "x$JARSIGNER" = x; then
30569         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30570 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30571         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30572 $as_echo_n "checking for JARSIGNER... " >&6; }
30573         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30574 $as_echo "disabled" >&6; }
30575       else
30576         # Check if the provided tool contains a complete path.
30577         tool_specified="$JARSIGNER"
30578         tool_basename="${tool_specified##*/}"
30579         if test "x$tool_basename" = "x$tool_specified"; then
30580           # A command without a complete path is provided, search $PATH.
30581           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30582 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30583           # Extract the first word of "$tool_basename", so it can be a program name with args.
30584 set dummy $tool_basename; ac_word=$2
30585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30586 $as_echo_n "checking for $ac_word... " >&6; }
30587 if ${ac_cv_path_JARSIGNER+:} false; then :
30588   $as_echo_n "(cached) " >&6
30589 else
30590   case $JARSIGNER in
30591   [\\/]* | ?:[\\/]*)
30592   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30593   ;;
30594   *)
30595   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30596 for as_dir in $PATH
30597 do
30598   IFS=$as_save_IFS
30599   test -z "$as_dir" && as_dir=.
30600     for ac_exec_ext in '' $ac_executable_extensions; do
30601   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30602     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30603     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30604     break 2
30605   fi
30606 done
30607   done
30608 IFS=$as_save_IFS
30609 
30610   ;;
30611 esac
30612 fi
30613 JARSIGNER=$ac_cv_path_JARSIGNER
30614 if test -n "$JARSIGNER"; then
30615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30616 $as_echo "$JARSIGNER" >&6; }
30617 else
30618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30619 $as_echo "no" >&6; }
30620 fi
30621 
30622 
30623           if test "x$JARSIGNER" = x; then
30624             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30625           fi
30626         else
30627           # Otherwise we believe it is a complete path. Use it as it is.
30628           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30629 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30630           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30631 $as_echo_n "checking for JARSIGNER... " >&6; }
30632           if test ! -x "$tool_specified"; then
30633             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30634 $as_echo "not found" >&6; }
30635             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30636           fi
30637           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30638 $as_echo "$tool_specified" >&6; }
30639         fi
30640       fi
30641     fi
30642 
30643   fi
30644 
30645 
30646 
30647   # Finally, set some other options...
30648 
30649   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30650   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30651 
30652 
30653 
30654   $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30655   $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30656   OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30657   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30658   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30659   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30660     dummy="$dummy --patch-module foo=bar"
30661     JVM_ARG_OK=true
30662   else
30663     $ECHO "Arg failed:" >&5
30664     $ECHO "$OUTPUT" >&5
30665     JVM_ARG_OK=false
30666   fi
30667 
30668   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30669 $as_echo_n "checking if Boot JDK supports modules... " >&6; }
30670   if test "x$JVM_ARG_OK" = "xtrue"; then
30671     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30672 $as_echo "yes" >&6; }
30673     BOOT_JDK_MODULAR="true"
30674   else
30675     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30676 $as_echo "no" >&6; }
30677     BOOT_JDK_MODULAR="false"
30678   fi
30679 
30680 
30681 
30682 
30683   # Check if the boot jdk is 32 or 64 bit
30684   if "$JAVA" -d64 -version > /dev/null 2>&1; then
30685     BOOT_JDK_BITS="64"
30686   else
30687     BOOT_JDK_BITS="32"
30688   fi
30689   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30690 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30692 $as_echo "$BOOT_JDK_BITS" >&6; }
30693 
30694 
30695 
30696 
30697 # Check whether --with-build-jdk was given.
30698 if test "${with_build_jdk+set}" = set; then :
30699   withval=$with_build_jdk;
30700 fi
30701 
30702 
30703   CREATE_BUILDJDK=false
30704   EXTERNAL_BUILDJDK=false
30705   BUILD_JDK_FOUND="no"
30706   if test "x$with_build_jdk" != "x"; then
30707 
30708   if test "x$BUILD_JDK_FOUND" = xno; then
30709     # Execute the test
30710 
30711        if test "x$with_build_jdk" != x; then
30712          BUILD_JDK=$with_build_jdk
30713          BUILD_JDK_FOUND=maybe
30714          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30715 $as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30716        fi
30717 
30718     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30719     if test "x$BUILD_JDK_FOUND" = xmaybe; then
30720       # Do we have a bin/java?
30721       if test ! -x "$BUILD_JDK/bin/java"; then
30722         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30723 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30724         BUILD_JDK_FOUND=no
30725       elif test ! -x "$BUILD_JDK/bin/jlink"; then
30726         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30727 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30728         BUILD_JDK_FOUND=no
30729       elif test ! -x "$BUILD_JDK/bin/jmod"; then
30730         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30731 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30732         BUILD_JDK_FOUND=no
30733       elif test ! -x "$BUILD_JDK/bin/javac"; then
30734         # Do we have a bin/javac?
30735         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30736 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30737         { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30738 $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30739         BUILD_JDK_FOUND=no
30740       else
30741         # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30742         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30743 
30744         # Extra M4 quote needed to protect [] in grep expression.
30745         FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30746         if test "x$FOUND_CORRECT_VERSION" = x; then
30747           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30748 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30749           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30750 $as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30751           BUILD_JDK_FOUND=no
30752         else
30753           # We're done!
30754           BUILD_JDK_FOUND=yes
30755 
30756   # Only process if variable expands to non-empty
30757 
30758   if test "x$BUILD_JDK" != x; then
30759     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30760 
30761   # Input might be given as Windows format, start by converting to
30762   # unix format.
30763   path="$BUILD_JDK"
30764   new_path=`$CYGPATH -u "$path"`
30765 
30766   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30767   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30768   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30769   # "foo.exe" is OK but "foo" is an error.
30770   #
30771   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30772   # It is also a way to make sure we got the proper file name for the real test later on.
30773   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30774   if test "x$test_shortpath" = x; then
30775     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30776 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30777     as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30778   fi
30779 
30780   # Call helper function which possibly converts this using DOS-style short mode.
30781   # If so, the updated path is stored in $new_path.
30782 
30783   input_path="$new_path"
30784   # Check if we need to convert this using DOS-style short mode. If the path
30785   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30786   # take no chances and rewrite it.
30787   # Note: m4 eats our [], so we need to use [ and ] instead.
30788   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30789   if test "x$has_forbidden_chars" != x; then
30790     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30791     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30792     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30793     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30794       # Going to short mode and back again did indeed matter. Since short mode is
30795       # case insensitive, let's make it lowercase to improve readability.
30796       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30797       # Now convert it back to Unix-style (cygpath)
30798       input_path=`$CYGPATH -u "$shortmode_path"`
30799       new_path="$input_path"
30800     fi
30801   fi
30802 
30803   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30804   if test "x$test_cygdrive_prefix" = x; then
30805     # As a simple fix, exclude /usr/bin since it's not a real path.
30806     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30807       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30808       # a path prefixed by /cygdrive for fixpath to work.
30809       new_path="$CYGWIN_ROOT_PATH$input_path"
30810     fi
30811   fi
30812 
30813 
30814   if test "x$path" != "x$new_path"; then
30815     BUILD_JDK="$new_path"
30816     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30817 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30818   fi
30819 
30820     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30821 
30822   path="$BUILD_JDK"
30823   has_colon=`$ECHO $path | $GREP ^.:`
30824   new_path="$path"
30825   if test "x$has_colon" = x; then
30826     # Not in mixed or Windows style, start by that.
30827     new_path=`cmd //c echo $path`
30828   fi
30829 
30830 
30831   input_path="$new_path"
30832   # Check if we need to convert this using DOS-style short mode. If the path
30833   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30834   # take no chances and rewrite it.
30835   # Note: m4 eats our [], so we need to use [ and ] instead.
30836   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30837   if test "x$has_forbidden_chars" != x; then
30838     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30839     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30840   fi
30841 
30842 
30843   windows_path="$new_path"
30844   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30845     unix_path=`$CYGPATH -u "$windows_path"`
30846     new_path="$unix_path"
30847   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30848     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30849     new_path="$unix_path"
30850   fi
30851 
30852   if test "x$path" != "x$new_path"; then
30853     BUILD_JDK="$new_path"
30854     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30855 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30856   fi
30857 
30858   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30859   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30860 
30861     else
30862       # We're on a unix platform. Hooray! :)
30863       path="$BUILD_JDK"
30864       has_space=`$ECHO "$path" | $GREP " "`
30865       if test "x$has_space" != x; then
30866         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30867 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30868         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30869       fi
30870 
30871       # Use eval to expand a potential ~
30872       eval path="$path"
30873       if test ! -f "$path" && test ! -d "$path"; then
30874         as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30875       fi
30876 
30877       if test -d "$path"; then
30878         BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30879       else
30880         dir="`$DIRNAME "$path"`"
30881         base="`$BASENAME "$path"`"
30882         BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30883       fi
30884     fi
30885   fi
30886 
30887           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30888 $as_echo_n "checking for Build JDK... " >&6; }
30889           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30890 $as_echo "$BUILD_JDK" >&6; }
30891           { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30892 $as_echo_n "checking Build JDK version... " >&6; }
30893           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30894           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30895 $as_echo "$BUILD_JDK_VERSION" >&6; }
30896         fi # end check jdk version
30897       fi # end check java
30898     fi # end check build jdk found
30899   fi
30900 
30901     EXTERNAL_BUILDJDK=true
30902   else
30903     if test "x$COMPILE_TYPE" = "xcross"; then
30904       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30905       BUILD_JDK_FOUND=yes
30906       CREATE_BUILDJDK=true
30907       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30908 $as_echo_n "checking for Build JDK... " >&6; }
30909       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30910 $as_echo "yes, will build it for the host platform" >&6; }
30911     else
30912       BUILD_JDK="\$(JDK_OUTPUTDIR)"
30913       BUILD_JDK_FOUND=yes
30914       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30915 $as_echo_n "checking for Build JDK... " >&6; }
30916       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30917 $as_echo "yes, will use output dir" >&6; }
30918     fi
30919   fi
30920 
30921   JMOD="$BUILD_JDK/bin/jmod"
30922   JLINK="$BUILD_JDK/bin/jlink"
30923 
30924 
30925 
30926   if test "x$BUILD_JDK_FOUND" != "xyes"; then
30927     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30928 $as_echo_n "checking for Build JDK... " >&6; }
30929     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30930 $as_echo "no" >&6; }
30931     as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30932   fi
30933 
30934 
30935 
30936 
30937 
30938 
30939 ###############################################################################
30940 #
30941 # Configure the sources to use. We can add or override individual directories.
30942 #
30943 ###############################################################################
30944 
30945 
30946   # Where are the sources.
30947   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30948   CORBA_TOPDIR="$SRC_ROOT/corba"
30949   JAXP_TOPDIR="$SRC_ROOT/jaxp"
30950   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30951   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30952   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30953   JDK_TOPDIR="$SRC_ROOT/jdk"
30954 
30955 
30956 
30957 
30958 
30959 
30960 
30961 
30962 
30963   # This feature is no longer supported.
30964 
30965 
30966 
30967 # Check whether --with-add-source-root was given.
30968 if test "${with_add_source_root+set}" = set; then :
30969   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
30970 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30971 fi
30972 
30973 
30974 
30975 
30976 # Check whether --with-override-source-root was given.
30977 if test "${with_override_source_root+set}" = set; then :
30978   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
30979 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30980 fi
30981 
30982 
30983 
30984 
30985 # Check whether --with-adds-and-overrides was given.
30986 if test "${with_adds_and_overrides+set}" = set; then :
30987   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
30988 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30989 fi
30990 
30991 
30992 
30993 
30994 # Check whether --with-override-langtools was given.
30995 if test "${with_override_langtools+set}" = set; then :
30996   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30997 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30998 fi
30999 
31000 
31001 
31002 
31003 # Check whether --with-override-corba was given.
31004 if test "${with_override_corba+set}" = set; then :
31005   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31006 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31007 fi
31008 
31009 
31010 
31011 
31012 # Check whether --with-override-jaxp was given.
31013 if test "${with_override_jaxp+set}" = set; then :
31014   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31015 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31016 fi
31017 
31018 
31019 
31020 
31021 # Check whether --with-override-jaxws was given.
31022 if test "${with_override_jaxws+set}" = set; then :
31023   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31024 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31025 fi
31026 
31027 
31028 
31029 
31030 # Check whether --with-override-hotspot was given.
31031 if test "${with_override_hotspot+set}" = set; then :
31032   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31033 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31034 fi
31035 
31036 
31037 
31038 
31039 # Check whether --with-override-nashorn was given.
31040 if test "${with_override_nashorn+set}" = set; then :
31041   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31042 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31043 fi
31044 
31045 
31046 
31047 
31048 # Check whether --with-override-jdk was given.
31049 if test "${with_override_jdk+set}" = set; then :
31050   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31051 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31052 fi
31053 
31054 
31055 
31056 
31057   BUILD_OUTPUT="$OUTPUT_ROOT"
31058 
31059 
31060   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
31061   BUILD_HOTSPOT=true
31062 
31063 
31064 
31065 # Check whether --with-import-hotspot was given.
31066 if test "${with_import_hotspot+set}" = set; then :
31067   withval=$with_import_hotspot;
31068 fi
31069 
31070   if test "x$with_import_hotspot" != x; then
31071     CURDIR="$PWD"
31072     cd "$with_import_hotspot"
31073     HOTSPOT_DIST="`pwd`"
31074     cd "$CURDIR"
31075     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31076       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31077     fi
31078     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31079 $as_echo_n "checking if hotspot should be imported... " >&6; }
31080     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31081 $as_echo "yes from $HOTSPOT_DIST" >&6; }
31082     BUILD_HOTSPOT=false
31083   fi
31084 
31085   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31086 
31087 
31088 
31089 
31090 # Check whether --with-import-modules was given.
31091 if test "${with_import_modules+set}" = set; then :
31092   withval=$with_import_modules;
31093 fi
31094 
31095 
31096   if test "x$with_import_modules" != x \
31097       && test "x$with_import_modules" != "xno"; then
31098     if test -d "$with_import_modules"; then
31099       IMPORT_MODULES_TOPDIR="$with_import_modules"
31100 
31101   # Only process if variable expands to non-empty
31102 
31103   if test "x$IMPORT_MODULES_TOPDIR" != x; then
31104     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31105 
31106   # Input might be given as Windows format, start by converting to
31107   # unix format.
31108   path="$IMPORT_MODULES_TOPDIR"
31109   new_path=`$CYGPATH -u "$path"`
31110 
31111   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31112   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31113   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31114   # "foo.exe" is OK but "foo" is an error.
31115   #
31116   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31117   # It is also a way to make sure we got the proper file name for the real test later on.
31118   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31119   if test "x$test_shortpath" = x; then
31120     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31121 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31122     as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31123   fi
31124 
31125   # Call helper function which possibly converts this using DOS-style short mode.
31126   # If so, the updated path is stored in $new_path.
31127 
31128   input_path="$new_path"
31129   # Check if we need to convert this using DOS-style short mode. If the path
31130   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31131   # take no chances and rewrite it.
31132   # Note: m4 eats our [], so we need to use [ and ] instead.
31133   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31134   if test "x$has_forbidden_chars" != x; then
31135     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31136     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31137     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31138     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31139       # Going to short mode and back again did indeed matter. Since short mode is
31140       # case insensitive, let's make it lowercase to improve readability.
31141       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31142       # Now convert it back to Unix-style (cygpath)
31143       input_path=`$CYGPATH -u "$shortmode_path"`
31144       new_path="$input_path"
31145     fi
31146   fi
31147 
31148   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31149   if test "x$test_cygdrive_prefix" = x; then
31150     # As a simple fix, exclude /usr/bin since it's not a real path.
31151     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31152       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31153       # a path prefixed by /cygdrive for fixpath to work.
31154       new_path="$CYGWIN_ROOT_PATH$input_path"
31155     fi
31156   fi
31157 
31158 
31159   if test "x$path" != "x$new_path"; then
31160     IMPORT_MODULES_TOPDIR="$new_path"
31161     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31162 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31163   fi
31164 
31165     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31166 
31167   path="$IMPORT_MODULES_TOPDIR"
31168   has_colon=`$ECHO $path | $GREP ^.:`
31169   new_path="$path"
31170   if test "x$has_colon" = x; then
31171     # Not in mixed or Windows style, start by that.
31172     new_path=`cmd //c echo $path`
31173   fi
31174 
31175 
31176   input_path="$new_path"
31177   # Check if we need to convert this using DOS-style short mode. If the path
31178   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31179   # take no chances and rewrite it.
31180   # Note: m4 eats our [], so we need to use [ and ] instead.
31181   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31182   if test "x$has_forbidden_chars" != x; then
31183     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31184     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31185   fi
31186 
31187 
31188   windows_path="$new_path"
31189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31190     unix_path=`$CYGPATH -u "$windows_path"`
31191     new_path="$unix_path"
31192   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31193     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31194     new_path="$unix_path"
31195   fi
31196 
31197   if test "x$path" != "x$new_path"; then
31198     IMPORT_MODULES_TOPDIR="$new_path"
31199     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31200 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31201   fi
31202 
31203   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31204   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31205 
31206     else
31207       # We're on a unix platform. Hooray! :)
31208       path="$IMPORT_MODULES_TOPDIR"
31209       has_space=`$ECHO "$path" | $GREP " "`
31210       if test "x$has_space" != x; then
31211         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31212 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31213         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31214       fi
31215 
31216       # Use eval to expand a potential ~
31217       eval path="$path"
31218       if test ! -f "$path" && test ! -d "$path"; then
31219         as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31220       fi
31221 
31222       if test -d "$path"; then
31223         IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31224       else
31225         dir="`$DIRNAME "$path"`"
31226         base="`$BASENAME "$path"`"
31227         IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31228       fi
31229     fi
31230   fi
31231 
31232     elif test -e "$with_import_modules"; then
31233       IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31234       $RM -rf "$IMPORT_MODULES_TOPDIR"
31235       $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31236       if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31237         as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31238       fi
31239     else
31240       as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31241     fi
31242   fi
31243 
31244   if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31245     IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31246   fi
31247   if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31248     IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31249   fi
31250   if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31251     IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31252   fi
31253   if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31254     IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31255   fi
31256   if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31257     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31258   fi
31259   if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31260     IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31261   fi
31262 
31263 
31264 
31265 
31266 
31267 
31268 
31269 
31270 
31271 ###############################################################################
31272 #
31273 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
31274 # native code.
31275 #
31276 ###############################################################################
31277 
31278 # See if we are doing a complete static build or not
31279 
31280   # Check whether --enable-static-build was given.
31281 if test "${enable_static_build+set}" = set; then :
31282   enableval=$enable_static_build;
31283 fi
31284 
31285   STATIC_BUILD=false
31286   if test "x$enable_static_build" = "xyes"; then
31287     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31288 $as_echo_n "checking if static build is enabled... " >&6; }
31289     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31290 $as_echo "yes" >&6; }
31291     if test "x$OPENJDK_TARGET_OS" != "xmacosx" && test "x$OPENJDK_TARGET_OS" != "xios"; then
31292       as_fn_error $? "--enable-static-build is only supported for macosx and ios builds" "$LINENO" 5
31293     fi
31294     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31295     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31296     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31297     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31298     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31299     STATIC_BUILD=true
31300   elif test "x$enable_static_build" = "xno"; then
31301     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31302 $as_echo_n "checking if static build is enabled... " >&6; }
31303     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31304 $as_echo "no" >&6; }
31305   elif test "x$enable_static_build" != "x"; then
31306     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31307   fi
31308 
31309 
31310 
31311 
31312 # First determine the toolchain type (compiler family)
31313 
31314 
31315 # Check whether --with-toolchain-type was given.
31316 if test "${with_toolchain_type+set}" = set; then :
31317   withval=$with_toolchain_type;
31318 fi
31319 
31320 
31321   # Use indirect variable referencing
31322   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31323   VALID_TOOLCHAINS=${!toolchain_var_name}
31324 
31325   if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_OS" = "xios" ; then
31326     if test -n "$XCODEBUILD"; then
31327       TOOLCHAIN_NAME="xcode"
31328       # On Mac OS X, default toolchain to clang after Xcode 5
31329       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31330       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31331       if test $? -ne 0; then
31332         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31333       fi
31334       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31335           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31336           $CUT -f 1 -d .`
31337       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31338 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31339       if test $XCODE_MAJOR_VERSION -ge 5; then
31340           DEFAULT_TOOLCHAIN="clang"
31341       else
31342           DEFAULT_TOOLCHAIN="gcc"
31343       fi
31344     else
31345       # If Xcode is not installed, but the command line tools are
31346       # then we can't run xcodebuild. On these systems we should
31347       # default to clang
31348       DEFAULT_TOOLCHAIN="clang"
31349     fi
31350   else
31351     # First toolchain type in the list is the default
31352     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31353   fi
31354 
31355   if test "x$with_toolchain_type" = xlist; then
31356     # List all toolchains
31357     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31358 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31359     for toolchain in $VALID_TOOLCHAINS; do
31360       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31361       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31362       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31363     done
31364 
31365     exit 0
31366   elif test "x$with_toolchain_type" != x; then
31367     # User override; check that it is valid
31368     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31369       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31370 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31371       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31372 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31373       as_fn_error $? "Cannot continue." "$LINENO" 5
31374     fi
31375     TOOLCHAIN_TYPE=$with_toolchain_type
31376   else
31377     # No flag given, use default
31378     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31379   fi
31380 
31381 
31382 
31383   TOOLCHAIN_CC_BINARY_clang="clang"
31384   TOOLCHAIN_CC_BINARY_gcc="gcc"
31385   TOOLCHAIN_CC_BINARY_microsoft="cl"
31386   TOOLCHAIN_CC_BINARY_solstudio="cc"
31387   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31388 
31389   TOOLCHAIN_CXX_BINARY_clang="clang++"
31390   TOOLCHAIN_CXX_BINARY_gcc="g++"
31391   TOOLCHAIN_CXX_BINARY_microsoft="cl"
31392   TOOLCHAIN_CXX_BINARY_solstudio="CC"
31393   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31394 
31395   # Use indirect variable referencing
31396   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31397   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31398   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31399   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31400   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31401   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31402   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31403   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31404 
31405 
31406   # Define filename patterns
31407   if test "x$OPENJDK_TARGET_OS" = xwindows; then
31408     LIBRARY_PREFIX=
31409     SHARED_LIBRARY_SUFFIX='.dll'
31410     STATIC_LIBRARY_SUFFIX='.lib'
31411     SHARED_LIBRARY='$1.dll'
31412     STATIC_LIBRARY='$1.lib'
31413     OBJ_SUFFIX='.obj'
31414     EXE_SUFFIX='.exe'
31415   else
31416     LIBRARY_PREFIX=lib
31417     SHARED_LIBRARY_SUFFIX='.so'
31418     STATIC_LIBRARY_SUFFIX='.a'
31419     SHARED_LIBRARY='lib$1.so'
31420     STATIC_LIBRARY='lib$1.a'
31421     BUILD_SHARED_LIBRARY_SUFFIX='.so'
31422     BUILD_SHARED_LIBRARY='lib$1.so'
31423     OBJ_SUFFIX='.o'
31424     EXE_SUFFIX=''
31425     if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_OS" = "xios" ; then
31426       # For full static builds, we're overloading the SHARED_LIBRARY
31427       # variables in order to limit the amount of changes required.
31428       # It would be better to remove SHARED and just use LIBRARY and
31429       # LIBRARY_SUFFIX for libraries that can be built either
31430       # shared or static and use STATIC_* for libraries that are
31431       # always built statically.
31432       BUILD_SHARED_LIBRARY='lib$1.dylib'
31433       BUILD_SHARED_LIBRARY_SUFFIX='.dylib'
31434       if test "x$STATIC_BUILD" = xtrue; then
31435         SHARED_LIBRARY='lib$1.a'
31436         SHARED_LIBRARY_SUFFIX='.a'
31437       else
31438         SHARED_LIBRARY='lib$1.dylib'
31439         SHARED_LIBRARY_SUFFIX='.dylib'
31440       fi
31441     fi
31442   fi
31443 
31444 
31445 
31446 
31447 
31448 
31449 
31450 
31451 
31452 
31453 
31454 
31455   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31456     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31457 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31458   else
31459     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31460 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31461   fi
31462 
31463 
31464 # User supplied flags should be used when configure detects compilers
31465 
31466   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31467     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31468 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31469   fi
31470 
31471   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31472     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31473 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31474   fi
31475 
31476   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31477     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31478 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31479   fi
31480 
31481 
31482 # Check whether --with-extra-cflags was given.
31483 if test "${with_extra_cflags+set}" = set; then :
31484   withval=$with_extra_cflags;
31485 fi
31486 
31487 
31488 
31489 # Check whether --with-extra-cxxflags was given.
31490 if test "${with_extra_cxxflags+set}" = set; then :
31491   withval=$with_extra_cxxflags;
31492 fi
31493 
31494 
31495 
31496 # Check whether --with-extra-ldflags was given.
31497 if test "${with_extra_ldflags+set}" = set; then :
31498   withval=$with_extra_ldflags;
31499 fi
31500 
31501 
31502   EXTRA_CFLAGS="$with_extra_cflags"
31503   EXTRA_CXXFLAGS="$with_extra_cxxflags"
31504   EXTRA_LDFLAGS="$with_extra_ldflags"
31505 
31506   # Additional android handling
31507   if test "x$OPENJDK_TARGET_OS" = xandroid; then
31508     if test "x$OPENJDK_TARGET_CPU" = xarm; then
31509       EXTRA_CFLAGS="$EXTRA_CFLAGS -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-short-enums -D__GLIBC__ -D_GNU_SOURCE  -Wno-psabi -fPIE"
31510       EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt -fPIE"
31511       EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--unresolved-symbols=ignore-all -Wl,--gc-sections -fPIE"
31512     else
31513       EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-short-enums -D__GLIBC__ -D_GNU_SOURCE -Wno-psabi -march=i686 -msse3 -mstackrealign -mfpmath=sse -fPIE"
31514       EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--unresolved-symbols=ignore-all -Wl,--gc-sections -Wl,-z,nocopyreloc -fPIE"
31515     fi
31516   fi
31517 
31518   # Hotspot needs these set in their legacy form
31519   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31520   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31521   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31522 
31523 
31524 
31525 
31526 
31527 
31528 
31529 
31530 
31531   # The global CFLAGS and LDLAGS variables are used by configure tests and
31532   # should include the extra parameters
31533   CFLAGS="$EXTRA_CFLAGS"
31534   CXXFLAGS="$EXTRA_CXXFLAGS"
31535   LDFLAGS="$EXTRA_LDFLAGS"
31536   CPPFLAGS=""
31537 
31538 # The sysroot cflags are needed for configure to be able to run the compilers
31539 
31540   if test "x$SYSROOT" != "x"; then
31541     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31542       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31543         # Solaris Studio does not have a concept of sysroot. Instead we must
31544         # make sure the default include and lib dirs are appended to each
31545         # compile and link command line. Must also add -I-xbuiltin to enable
31546         # inlining of system functions and intrinsics.
31547         SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31548         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31549             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
31550             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
31551       fi
31552     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31553       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31554       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31555     elif test "x$TOOLCHAIN_TYPE" = xclang; then
31556       SYSROOT_CFLAGS="-isysroot $SYSROOT"
31557       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31558     fi
31559     # Propagate the sysroot args to hotspot
31560     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31561     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31562     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31563     # The global CFLAGS and LDFLAGS variables need these for configure to function
31564     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31565     CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS $SYSROOT_CFLAGS"
31566     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31567     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31568   fi
31569 
31570   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
31571     # We also need -iframework<path>/System/Library/Frameworks
31572     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31573     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31574     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31575     # set this here so it doesn't have to be peppered throughout the forest
31576     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31577     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31578   fi
31579 
31580 
31581 
31582 
31583 
31584 # Then detect the actual binaries needed
31585 
31586   # FIXME: Is this needed?
31587   ac_ext=cpp
31588 ac_cpp='$CXXCPP $CPPFLAGS'
31589 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31590 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31591 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31592 
31593 
31594   # Store the CFLAGS etc passed to the configure script.
31595   ORG_CFLAGS="$CFLAGS"
31596   ORG_CXXFLAGS="$CXXFLAGS"
31597 
31598   # autoconf magic only relies on PATH, so update it if tools dir is specified
31599   OLD_PATH="$PATH"
31600 
31601   # On Windows, we need to detect the visual studio installation first.
31602   # This will change the PATH, but we need to keep that new PATH even
31603   # after toolchain detection is done, since the compiler (on x86) uses
31604   # it for DLL resolution in runtime.
31605   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31606       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31607 
31608   # Store path to cygwin link.exe to help excluding it when searching for
31609   # VS linker. This must be done before changing the PATH when looking for VS.
31610   # Extract the first word of "link", so it can be a program name with args.
31611 set dummy link; ac_word=$2
31612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31613 $as_echo_n "checking for $ac_word... " >&6; }
31614 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31615   $as_echo_n "(cached) " >&6
31616 else
31617   case $CYGWIN_LINK in
31618   [\\/]* | ?:[\\/]*)
31619   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31620   ;;
31621   *)
31622   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31623 for as_dir in $PATH
31624 do
31625   IFS=$as_save_IFS
31626   test -z "$as_dir" && as_dir=.
31627     for ac_exec_ext in '' $ac_executable_extensions; do
31628   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31629     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31631     break 2
31632   fi
31633 done
31634   done
31635 IFS=$as_save_IFS
31636 
31637   ;;
31638 esac
31639 fi
31640 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31641 if test -n "$CYGWIN_LINK"; then
31642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31643 $as_echo "$CYGWIN_LINK" >&6; }
31644 else
31645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31646 $as_echo "no" >&6; }
31647 fi
31648 
31649 
31650   if test "x$CYGWIN_LINK" != x; then
31651     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31652 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31653     "$CYGWIN_LINK" --version > /dev/null
31654     if test $? -eq 0 ; then
31655       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31656 $as_echo "yes" >&6; }
31657     else
31658       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31659 $as_echo "no" >&6; }
31660       # This might be the VS linker. Don't exclude it later on.
31661       CYGWIN_LINK=""
31662     fi
31663   fi
31664 
31665   # First-hand choice is to locate and run the vsvars bat file.
31666 
31667 
31668 # Check whether --with-toolchain-version was given.
31669 if test "${with_toolchain_version+set}" = set; then :
31670   withval=$with_toolchain_version;
31671 fi
31672 
31673 
31674   if test "x$with_toolchain_version" = xlist; then
31675     # List all toolchains
31676     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31677 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31678     for version in $VALID_VS_VERSIONS; do
31679       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31680       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31681     done
31682 
31683     exit 0
31684   elif test "x$DEVKIT_VS_VERSION" != x; then
31685     VS_VERSION=$DEVKIT_VS_VERSION
31686     TOOLCHAIN_VERSION=$VS_VERSION
31687     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31688     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31689     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31690     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31691     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31692     VS_PATH="$TOOLCHAIN_PATH:$PATH"
31693 
31694     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31695     # can still be exported as INCLUDE for compiler invocations without
31696     # SYSROOT_CFLAGS
31697     OLDIFS="$IFS"
31698     IFS=";"
31699     for i in $DEVKIT_VS_INCLUDE; do
31700       ipath=$i
31701 
31702   unix_path="$ipath"
31703   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31704     windows_path=`$CYGPATH -m "$unix_path"`
31705     ipath="$windows_path"
31706   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31707     windows_path=`cmd //c echo $unix_path`
31708     ipath="$windows_path"
31709   fi
31710 
31711       VS_INCLUDE="$VS_INCLUDE;$ipath"
31712     done
31713     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31714     # as LIB for compiler invocations without SYSROOT_LDFLAGS
31715     for i in $DEVKIT_VS_LIB; do
31716       libpath=$i
31717 
31718   unix_path="$libpath"
31719   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31720     windows_path=`$CYGPATH -m "$unix_path"`
31721     libpath="$windows_path"
31722   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31723     windows_path=`cmd //c echo $unix_path`
31724     libpath="$windows_path"
31725   fi
31726 
31727       VS_LIB="$VS_LIB;$libpath"
31728     done
31729     IFS="$OLDIFS"
31730 
31731     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31732 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31733 
31734   elif test "x$with_toolchain_version" != x; then
31735     # User override; check that it is valid
31736     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31737       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31738 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31739       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31740 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31741       as_fn_error $? "Cannot continue." "$LINENO" 5
31742     fi
31743     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31744   else
31745     # No flag given, use default
31746     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31747   fi
31748 
31749   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31750 
31751   VS_VERSION="$VS_VERSION"
31752   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31753   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31754   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31755   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31756 
31757   # When using --with-tools-dir, assume it points to the correct and default
31758   # version of Visual Studio or that --with-toolchain-version was also set.
31759   if test "x$with_tools_dir" != x; then
31760 
31761   if test "x$VS_ENV_CMD" = x; then
31762     VS_VERSION="${VS_VERSION}"
31763     VS_BASE="$with_tools_dir/../.."
31764     METHOD="--with-tools-dir"
31765 
31766     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31767       VCVARSFILE="vc/bin/vcvars32.bat"
31768     else
31769       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31770     fi
31771 
31772 
31773   windows_path="$VS_BASE"
31774   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31775     unix_path=`$CYGPATH -u "$windows_path"`
31776     VS_BASE="$unix_path"
31777   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31778     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31779     VS_BASE="$unix_path"
31780   fi
31781 
31782     if test -d "$VS_BASE"; then
31783       if test -f "$VS_BASE/$VCVARSFILE"; then
31784         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31785 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31786         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31787         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31788         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31789         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31790       else
31791         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31792 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31793         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31794 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31795       fi
31796     fi
31797   fi
31798 
31799 
31800   if test "x$VS_ENV_CMD" = x; then
31801     VS_VERSION="${VS_VERSION}"
31802     VS_BASE="$with_tools_dir/../../.."
31803     METHOD="--with-tools-dir"
31804 
31805     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31806       VCVARSFILE="vc/bin/vcvars32.bat"
31807     else
31808       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31809     fi
31810 
31811 
31812   windows_path="$VS_BASE"
31813   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31814     unix_path=`$CYGPATH -u "$windows_path"`
31815     VS_BASE="$unix_path"
31816   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31817     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31818     VS_BASE="$unix_path"
31819   fi
31820 
31821     if test -d "$VS_BASE"; then
31822       if test -f "$VS_BASE/$VCVARSFILE"; then
31823         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31824 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31825         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31826         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31827         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31828         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31829       else
31830         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31831 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31832         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31833 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31834       fi
31835     fi
31836   fi
31837 
31838     if test "x$VS_ENV_CMD" = x; then
31839       # Having specified an argument which is incorrect will produce an instant failure;
31840       # we should not go on looking
31841       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31842 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31843       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31844 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31845       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31846 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31847       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31848     fi
31849   fi
31850 
31851   VS_ENV_CMD=""
31852   VS_ENV_ARGS=""
31853 
31854   if test "x$VS_COMNTOOLS" != x; then
31855 
31856   if test "x$VS_ENV_CMD" = x; then
31857     VS_VERSION="${VS_VERSION}"
31858     VS_BASE="$VS_COMNTOOLS/../.."
31859     METHOD="$VS_COMNTOOLS_VAR variable"
31860 
31861     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31862       VCVARSFILE="vc/bin/vcvars32.bat"
31863     else
31864       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31865     fi
31866 
31867 
31868   windows_path="$VS_BASE"
31869   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31870     unix_path=`$CYGPATH -u "$windows_path"`
31871     VS_BASE="$unix_path"
31872   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31873     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31874     VS_BASE="$unix_path"
31875   fi
31876 
31877     if test -d "$VS_BASE"; then
31878       if test -f "$VS_BASE/$VCVARSFILE"; then
31879         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31880 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31881         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31882         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31883         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31884         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31885       else
31886         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31887 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31888         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31889 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31890       fi
31891     fi
31892   fi
31893 
31894   fi
31895   if test "x$PROGRAMFILES" != x; then
31896 
31897   if test "x$VS_ENV_CMD" = x; then
31898     VS_VERSION="${VS_VERSION}"
31899     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31900     METHOD="well-known name"
31901 
31902     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31903       VCVARSFILE="vc/bin/vcvars32.bat"
31904     else
31905       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31906     fi
31907 
31908 
31909   windows_path="$VS_BASE"
31910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31911     unix_path=`$CYGPATH -u "$windows_path"`
31912     VS_BASE="$unix_path"
31913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31915     VS_BASE="$unix_path"
31916   fi
31917 
31918     if test -d "$VS_BASE"; then
31919       if test -f "$VS_BASE/$VCVARSFILE"; then
31920         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31921 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31922         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31923         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31924         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31925         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31926       else
31927         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31928 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31929         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31930 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31931       fi
31932     fi
31933   fi
31934 
31935   fi
31936   # Work around the insanely named ProgramFiles(x86) env variable
31937   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31938   if test "x$PROGRAMFILES_X86" != x; then
31939 
31940   if test "x$VS_ENV_CMD" = x; then
31941     VS_VERSION="${VS_VERSION}"
31942     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31943     METHOD="well-known name"
31944 
31945     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31946       VCVARSFILE="vc/bin/vcvars32.bat"
31947     else
31948       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31949     fi
31950 
31951 
31952   windows_path="$VS_BASE"
31953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31954     unix_path=`$CYGPATH -u "$windows_path"`
31955     VS_BASE="$unix_path"
31956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31958     VS_BASE="$unix_path"
31959   fi
31960 
31961     if test -d "$VS_BASE"; then
31962       if test -f "$VS_BASE/$VCVARSFILE"; then
31963         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31964 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31965         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31966         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31967         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31968         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31969       else
31970         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31971 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31972         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31973 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31974       fi
31975     fi
31976   fi
31977 
31978   fi
31979 
31980   if test "x$VS_ENV_CMD" = x; then
31981     VS_VERSION="${VS_VERSION}"
31982     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31983     METHOD="well-known name"
31984 
31985     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31986       VCVARSFILE="vc/bin/vcvars32.bat"
31987     else
31988       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31989     fi
31990 
31991 
31992   windows_path="$VS_BASE"
31993   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31994     unix_path=`$CYGPATH -u "$windows_path"`
31995     VS_BASE="$unix_path"
31996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31997     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31998     VS_BASE="$unix_path"
31999   fi
32000 
32001     if test -d "$VS_BASE"; then
32002       if test -f "$VS_BASE/$VCVARSFILE"; then
32003         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32004 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32005         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32006         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32007         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32008         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32009       else
32010         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32011 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32012         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32013 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32014       fi
32015     fi
32016   fi
32017 
32018 
32019   if test "x$VS_ENV_CMD" = x; then
32020     VS_VERSION="${VS_VERSION}"
32021     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32022     METHOD="well-known name"
32023 
32024     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32025       VCVARSFILE="vc/bin/vcvars32.bat"
32026     else
32027       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32028     fi
32029 
32030 
32031   windows_path="$VS_BASE"
32032   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32033     unix_path=`$CYGPATH -u "$windows_path"`
32034     VS_BASE="$unix_path"
32035   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32036     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32037     VS_BASE="$unix_path"
32038   fi
32039 
32040     if test -d "$VS_BASE"; then
32041       if test -f "$VS_BASE/$VCVARSFILE"; then
32042         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32043 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32044         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32045         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32046         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32047         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32048       else
32049         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32050 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32051         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32052 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32053       fi
32054     fi
32055   fi
32056 
32057 
32058   if test "x$SDK_INSTALL_DIR" != x; then
32059     if test "x$ProgramW6432" != x; then
32060 
32061   if test "x$VS_ENV_CMD" = x; then
32062     VS_VERSION="${VS_VERSION}"
32063     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32064     METHOD="well-known name"
32065 
32066   windows_path="$WIN_SDK_BASE"
32067   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32068     unix_path=`$CYGPATH -u "$windows_path"`
32069     WIN_SDK_BASE="$unix_path"
32070   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32071     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32072     WIN_SDK_BASE="$unix_path"
32073   fi
32074 
32075     if test -d "$WIN_SDK_BASE"; then
32076       # There have been cases of partial or broken SDK installations. A missing
32077       # lib dir is not going to work.
32078       if test ! -d "$WIN_SDK_BASE/lib"; then
32079         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32080 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32081         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32082 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32083       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32084         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32085 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32086         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32087         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32088           VS_ENV_ARGS="/x86"
32089         else
32090           VS_ENV_ARGS="/x64"
32091         fi
32092         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32093         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32094         # TODO: improve detection for other versions of SDK
32095         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32096       else
32097         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32098 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32099         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32100 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32101       fi
32102     fi
32103   fi
32104 
32105     fi
32106     if test "x$PROGRAMW6432" != x; then
32107 
32108   if test "x$VS_ENV_CMD" = x; then
32109     VS_VERSION="${VS_VERSION}"
32110     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32111     METHOD="well-known name"
32112 
32113   windows_path="$WIN_SDK_BASE"
32114   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32115     unix_path=`$CYGPATH -u "$windows_path"`
32116     WIN_SDK_BASE="$unix_path"
32117   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32118     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32119     WIN_SDK_BASE="$unix_path"
32120   fi
32121 
32122     if test -d "$WIN_SDK_BASE"; then
32123       # There have been cases of partial or broken SDK installations. A missing
32124       # lib dir is not going to work.
32125       if test ! -d "$WIN_SDK_BASE/lib"; then
32126         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32127 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32128         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32129 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32130       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32131         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32132 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32133         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32134         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32135           VS_ENV_ARGS="/x86"
32136         else
32137           VS_ENV_ARGS="/x64"
32138         fi
32139         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32140         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32141         # TODO: improve detection for other versions of SDK
32142         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32143       else
32144         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32145 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32146         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32147 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32148       fi
32149     fi
32150   fi
32151 
32152     fi
32153     if test "x$PROGRAMFILES" != x; then
32154 
32155   if test "x$VS_ENV_CMD" = x; then
32156     VS_VERSION="${VS_VERSION}"
32157     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32158     METHOD="well-known name"
32159 
32160   windows_path="$WIN_SDK_BASE"
32161   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32162     unix_path=`$CYGPATH -u "$windows_path"`
32163     WIN_SDK_BASE="$unix_path"
32164   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32165     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32166     WIN_SDK_BASE="$unix_path"
32167   fi
32168 
32169     if test -d "$WIN_SDK_BASE"; then
32170       # There have been cases of partial or broken SDK installations. A missing
32171       # lib dir is not going to work.
32172       if test ! -d "$WIN_SDK_BASE/lib"; then
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, lib dir is missing. Ignoring" >&5
32176 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32177       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32178         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32179 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32180         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32181         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32182           VS_ENV_ARGS="/x86"
32183         else
32184           VS_ENV_ARGS="/x64"
32185         fi
32186         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32187         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32188         # TODO: improve detection for other versions of SDK
32189         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32190       else
32191         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32192 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32193         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32194 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32195       fi
32196     fi
32197   fi
32198 
32199     fi
32200 
32201   if test "x$VS_ENV_CMD" = x; then
32202     VS_VERSION="${VS_VERSION}"
32203     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32204     METHOD="well-known name"
32205 
32206   windows_path="$WIN_SDK_BASE"
32207   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32208     unix_path=`$CYGPATH -u "$windows_path"`
32209     WIN_SDK_BASE="$unix_path"
32210   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32211     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32212     WIN_SDK_BASE="$unix_path"
32213   fi
32214 
32215     if test -d "$WIN_SDK_BASE"; then
32216       # There have been cases of partial or broken SDK installations. A missing
32217       # lib dir is not going to work.
32218       if test ! -d "$WIN_SDK_BASE/lib"; then
32219         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32220 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32221         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32222 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32223       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32224         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32225 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32226         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32227         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32228           VS_ENV_ARGS="/x86"
32229         else
32230           VS_ENV_ARGS="/x64"
32231         fi
32232         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32233         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32234         # TODO: improve detection for other versions of SDK
32235         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32236       else
32237         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32238 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32239         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32240 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32241       fi
32242     fi
32243   fi
32244 
32245 
32246   if test "x$VS_ENV_CMD" = x; then
32247     VS_VERSION="${VS_VERSION}"
32248     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32249     METHOD="well-known name"
32250 
32251   windows_path="$WIN_SDK_BASE"
32252   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32253     unix_path=`$CYGPATH -u "$windows_path"`
32254     WIN_SDK_BASE="$unix_path"
32255   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32256     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32257     WIN_SDK_BASE="$unix_path"
32258   fi
32259 
32260     if test -d "$WIN_SDK_BASE"; then
32261       # There have been cases of partial or broken SDK installations. A missing
32262       # lib dir is not going to work.
32263       if test ! -d "$WIN_SDK_BASE/lib"; then
32264         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32265 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32266         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32267 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32268       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32269         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32270 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32271         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32272         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32273           VS_ENV_ARGS="/x86"
32274         else
32275           VS_ENV_ARGS="/x64"
32276         fi
32277         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32278         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32279         # TODO: improve detection for other versions of SDK
32280         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32281       else
32282         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32283 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32284         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32285 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32286       fi
32287     fi
32288   fi
32289 
32290   fi
32291 
32292     if test "x$VS_ENV_CMD" != x; then
32293       TOOLCHAIN_VERSION=$VS_VERSION
32294       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32295       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32296       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32297       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32298       # The rest of the variables are already evaled while probing
32299       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32300 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32301       break
32302     fi
32303   done
32304 
32305 
32306   # If we have a devkit, skip all of the below.
32307   if test "x$DEVKIT_VS_VERSION" = x; then
32308     if test "x$VS_ENV_CMD" != x; then
32309       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32310 
32311   # Only process if variable expands to non-empty
32312 
32313   if test "x$VS_ENV_CMD" != x; then
32314     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32315 
32316   # First separate the path from the arguments. This will split at the first
32317   # space.
32318   complete="$VS_ENV_CMD"
32319   path="${complete%% *}"
32320   tmp="$complete EOL"
32321   arguments="${tmp#* }"
32322 
32323   # Input might be given as Windows format, start by converting to
32324   # unix format.
32325   new_path=`$CYGPATH -u "$path"`
32326 
32327   # Now try to locate executable using which
32328   new_path=`$WHICH "$new_path" 2> /dev/null`
32329   # bat and cmd files are not always considered executable in cygwin causing which
32330   # to not find them
32331   if test "x$new_path" = x \
32332       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32333       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32334     new_path=`$CYGPATH -u "$path"`
32335   fi
32336   if test "x$new_path" = x; then
32337     # Oops. Which didn't find the executable.
32338     # The splitting of arguments from the executable at a space might have been incorrect,
32339     # since paths with space are more likely in Windows. Give it another try with the whole
32340     # argument.
32341     path="$complete"
32342     arguments="EOL"
32343     new_path=`$CYGPATH -u "$path"`
32344     new_path=`$WHICH "$new_path" 2> /dev/null`
32345     # bat and cmd files are not always considered executable in cygwin causing which
32346     # to not find them
32347     if test "x$new_path" = x \
32348         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32349         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32350       new_path=`$CYGPATH -u "$path"`
32351     fi
32352     if test "x$new_path" = x; then
32353       # It's still not found. Now this is an unrecoverable error.
32354       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32355 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32356       has_space=`$ECHO "$complete" | $GREP " "`
32357       if test "x$has_space" != x; then
32358         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32359 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32360       fi
32361       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32362     fi
32363   fi
32364 
32365   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32366   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32367   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32368   # "foo.exe" is OK but "foo" is an error.
32369   #
32370   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32371   # It is also a way to make sure we got the proper file name for the real test later on.
32372   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32373   if test "x$test_shortpath" = x; then
32374     # Short path failed, file does not exist as specified.
32375     # Try adding .exe or .cmd
32376     if test -f "${new_path}.exe"; then
32377       input_to_shortpath="${new_path}.exe"
32378     elif test -f "${new_path}.cmd"; then
32379       input_to_shortpath="${new_path}.cmd"
32380     else
32381       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32382 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32383       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32384 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32385       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32386     fi
32387   else
32388     input_to_shortpath="$new_path"
32389   fi
32390 
32391   # Call helper function which possibly converts this using DOS-style short mode.
32392   # If so, the updated path is stored in $new_path.
32393   new_path="$input_to_shortpath"
32394 
32395   input_path="$input_to_shortpath"
32396   # Check if we need to convert this using DOS-style short mode. If the path
32397   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32398   # take no chances and rewrite it.
32399   # Note: m4 eats our [], so we need to use [ and ] instead.
32400   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32401   if test "x$has_forbidden_chars" != x; then
32402     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32403     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32404     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32405     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32406       # Going to short mode and back again did indeed matter. Since short mode is
32407       # case insensitive, let's make it lowercase to improve readability.
32408       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32409       # Now convert it back to Unix-style (cygpath)
32410       input_path=`$CYGPATH -u "$shortmode_path"`
32411       new_path="$input_path"
32412     fi
32413   fi
32414 
32415   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32416   if test "x$test_cygdrive_prefix" = x; then
32417     # As a simple fix, exclude /usr/bin since it's not a real path.
32418     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32419       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32420       # a path prefixed by /cygdrive for fixpath to work.
32421       new_path="$CYGWIN_ROOT_PATH$input_path"
32422     fi
32423   fi
32424 
32425   # remove trailing .exe if any
32426   new_path="${new_path/%.exe/}"
32427 
32428     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32429 
32430   # First separate the path from the arguments. This will split at the first
32431   # space.
32432   complete="$VS_ENV_CMD"
32433   path="${complete%% *}"
32434   tmp="$complete EOL"
32435   arguments="${tmp#* }"
32436 
32437   # Input might be given as Windows format, start by converting to
32438   # unix format.
32439   new_path="$path"
32440 
32441   windows_path="$new_path"
32442   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32443     unix_path=`$CYGPATH -u "$windows_path"`
32444     new_path="$unix_path"
32445   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32446     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32447     new_path="$unix_path"
32448   fi
32449 
32450 
32451   # Now try to locate executable using which
32452   new_path=`$WHICH "$new_path" 2> /dev/null`
32453 
32454   if test "x$new_path" = x; then
32455     # Oops. Which didn't find the executable.
32456     # The splitting of arguments from the executable at a space might have been incorrect,
32457     # since paths with space are more likely in Windows. Give it another try with the whole
32458     # argument.
32459     path="$complete"
32460     arguments="EOL"
32461     new_path="$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 
32473     new_path=`$WHICH "$new_path" 2> /dev/null`
32474     # bat and cmd files are not always considered executable in MSYS causing which
32475     # to not find them
32476     if test "x$new_path" = x \
32477         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32478         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32479       new_path="$path"
32480 
32481   windows_path="$new_path"
32482   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32483     unix_path=`$CYGPATH -u "$windows_path"`
32484     new_path="$unix_path"
32485   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32486     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32487     new_path="$unix_path"
32488   fi
32489 
32490     fi
32491 
32492     if test "x$new_path" = x; then
32493       # It's still not found. Now this is an unrecoverable error.
32494       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32495 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32496       has_space=`$ECHO "$complete" | $GREP " "`
32497       if test "x$has_space" != x; then
32498         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32499 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32500       fi
32501       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32502     fi
32503   fi
32504 
32505   # Now new_path has a complete unix path to the binary
32506   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32507     # Keep paths in /bin as-is, but remove trailing .exe if any
32508     new_path="${new_path/%.exe/}"
32509     # Do not save /bin paths to all_fixpath_prefixes!
32510   else
32511     # Not in mixed or Windows style, start by that.
32512     new_path=`cmd //c echo $new_path`
32513 
32514   input_path="$new_path"
32515   # Check if we need to convert this using DOS-style short mode. If the path
32516   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32517   # take no chances and rewrite it.
32518   # Note: m4 eats our [], so we need to use [ and ] instead.
32519   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32520   if test "x$has_forbidden_chars" != x; then
32521     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32522     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32523   fi
32524 
32525     # Output is in $new_path
32526 
32527   windows_path="$new_path"
32528   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32529     unix_path=`$CYGPATH -u "$windows_path"`
32530     new_path="$unix_path"
32531   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32532     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32533     new_path="$unix_path"
32534   fi
32535 
32536     # remove trailing .exe if any
32537     new_path="${new_path/%.exe/}"
32538 
32539     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32540     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32541   fi
32542 
32543     else
32544       # We're on a unix platform. Hooray! :)
32545       # First separate the path from the arguments. This will split at the first
32546       # space.
32547       complete="$VS_ENV_CMD"
32548       path="${complete%% *}"
32549       tmp="$complete EOL"
32550       arguments="${tmp#* }"
32551 
32552       # Cannot rely on the command "which" here since it doesn't always work.
32553       is_absolute_path=`$ECHO "$path" | $GREP ^/`
32554       if test -z "$is_absolute_path"; then
32555         # Path to executable is not absolute. Find it.
32556         IFS_save="$IFS"
32557         IFS=:
32558         for p in $PATH; do
32559           if test -f "$p/$path" && test -x "$p/$path"; then
32560             new_path="$p/$path"
32561             break
32562           fi
32563         done
32564         IFS="$IFS_save"
32565       else
32566         # This is an absolute path, we can use it without further modifications.
32567         new_path="$path"
32568       fi
32569 
32570       if test "x$new_path" = x; then
32571         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32572 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32573         has_space=`$ECHO "$complete" | $GREP " "`
32574         if test "x$has_space" != x; then
32575           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32576 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32577         fi
32578         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32579       fi
32580     fi
32581 
32582     # Now join together the path and the arguments once again
32583     if test "x$arguments" != xEOL; then
32584       new_complete="$new_path ${arguments% *}"
32585     else
32586       new_complete="$new_path"
32587     fi
32588 
32589     if test "x$complete" != "x$new_complete"; then
32590       VS_ENV_CMD="$new_complete"
32591       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32592 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32593     fi
32594   fi
32595 
32596 
32597       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32598       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32599 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32600 
32601       # We need to create a couple of temporary files.
32602       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32603       $MKDIR -p $VS_ENV_TMP_DIR
32604 
32605       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32606       # Instead create a shell script which will set the relevant variables when run.
32607       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32608 
32609   unix_path="$WINPATH_VS_ENV_CMD"
32610   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32611     windows_path=`$CYGPATH -m "$unix_path"`
32612     WINPATH_VS_ENV_CMD="$windows_path"
32613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32614     windows_path=`cmd //c echo $unix_path`
32615     WINPATH_VS_ENV_CMD="$windows_path"
32616   fi
32617 
32618       WINPATH_BASH="$BASH"
32619 
32620   unix_path="$WINPATH_BASH"
32621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32622     windows_path=`$CYGPATH -m "$unix_path"`
32623     WINPATH_BASH="$windows_path"
32624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32625     windows_path=`cmd //c echo $unix_path`
32626     WINPATH_BASH="$windows_path"
32627   fi
32628 
32629 
32630       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32631       # script (executable by bash) that will setup the important variables.
32632       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32633       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32634       # This will end up something like:
32635       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32636       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32637       # These will end up something like:
32638       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32639       # The trailing space for everyone except PATH is no typo, but is needed due
32640       # to trailing \ in the Windows paths. These will be stripped later.
32641       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32642           >> $EXTRACT_VC_ENV_BAT_FILE
32643       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32644           >> $EXTRACT_VC_ENV_BAT_FILE
32645       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32646           >> $EXTRACT_VC_ENV_BAT_FILE
32647       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32648           >> $EXTRACT_VC_ENV_BAT_FILE
32649       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32650           >> $EXTRACT_VC_ENV_BAT_FILE
32651       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32652           >> $EXTRACT_VC_ENV_BAT_FILE
32653 
32654       # Now execute the newly created bat file.
32655       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32656       # Change directory so we don't need to mess with Windows paths in redirects.
32657       cd $VS_ENV_TMP_DIR
32658       cmd /c extract-vs-env.bat | $CAT
32659       cd $CURDIR
32660 
32661       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32662         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32663 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32664         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32665 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32666         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32667 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32668         as_fn_error $? "Cannot continue" "$LINENO" 5
32669       fi
32670 
32671       # Now set all paths and other env variables. This will allow the rest of
32672       # the configure script to find and run the compiler in the proper way.
32673       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32674 $as_echo "$as_me: Setting extracted environment variables" >&6;}
32675       . $VS_ENV_TMP_DIR/set-vs-env.sh
32676       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32677       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32678     else
32679       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32680       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32681 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32682     fi
32683   fi
32684 
32685   # At this point, we should have correct variables in the environment, or we can't continue.
32686   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32687 $as_echo_n "checking for Visual Studio variables... " >&6; }
32688 
32689   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32690       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32691     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32692       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32693 $as_echo "present but broken" >&6; }
32694       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32695     else
32696       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32697 $as_echo "ok" >&6; }
32698       # Remove any trailing "\" ";" and " " from the variables.
32699       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32700       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32701       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32702       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32703       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32704       # Remove any paths containing # (typically F#) as that messes up make. This
32705       # is needed if visual studio was installed with F# support.
32706       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32707 
32708 
32709 
32710 
32711 
32712       # Convert VS_INCLUDE into SYSROOT_CFLAGS
32713       OLDIFS="$IFS"
32714       IFS=";"
32715       for i in $VS_INCLUDE; do
32716         ipath=$i
32717         # Only process non-empty elements
32718         if test "x$ipath" != x; then
32719           IFS="$OLDIFS"
32720           # Check that directory exists before calling fixup_path
32721           testpath=$ipath
32722 
32723   windows_path="$testpath"
32724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32725     unix_path=`$CYGPATH -u "$windows_path"`
32726     testpath="$unix_path"
32727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32729     testpath="$unix_path"
32730   fi
32731 
32732           if test -d "$testpath"; then
32733 
32734   # Only process if variable expands to non-empty
32735 
32736   if test "x$ipath" != x; then
32737     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32738 
32739   # Input might be given as Windows format, start by converting to
32740   # unix format.
32741   path="$ipath"
32742   new_path=`$CYGPATH -u "$path"`
32743 
32744   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32745   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32746   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32747   # "foo.exe" is OK but "foo" is an error.
32748   #
32749   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32750   # It is also a way to make sure we got the proper file name for the real test later on.
32751   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32752   if test "x$test_shortpath" = x; then
32753     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32754 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32755     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32756   fi
32757 
32758   # Call helper function which possibly converts this using DOS-style short mode.
32759   # If so, the updated path is stored in $new_path.
32760 
32761   input_path="$new_path"
32762   # Check if we need to convert this using DOS-style short mode. If the path
32763   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32764   # take no chances and rewrite it.
32765   # Note: m4 eats our [], so we need to use [ and ] instead.
32766   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32767   if test "x$has_forbidden_chars" != x; then
32768     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32769     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32770     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32771     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32772       # Going to short mode and back again did indeed matter. Since short mode is
32773       # case insensitive, let's make it lowercase to improve readability.
32774       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32775       # Now convert it back to Unix-style (cygpath)
32776       input_path=`$CYGPATH -u "$shortmode_path"`
32777       new_path="$input_path"
32778     fi
32779   fi
32780 
32781   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32782   if test "x$test_cygdrive_prefix" = x; then
32783     # As a simple fix, exclude /usr/bin since it's not a real path.
32784     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32785       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32786       # a path prefixed by /cygdrive for fixpath to work.
32787       new_path="$CYGWIN_ROOT_PATH$input_path"
32788     fi
32789   fi
32790 
32791 
32792   if test "x$path" != "x$new_path"; then
32793     ipath="$new_path"
32794     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32795 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32796   fi
32797 
32798     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32799 
32800   path="$ipath"
32801   has_colon=`$ECHO $path | $GREP ^.:`
32802   new_path="$path"
32803   if test "x$has_colon" = x; then
32804     # Not in mixed or Windows style, start by that.
32805     new_path=`cmd //c echo $path`
32806   fi
32807 
32808 
32809   input_path="$new_path"
32810   # Check if we need to convert this using DOS-style short mode. If the path
32811   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32812   # take no chances and rewrite it.
32813   # Note: m4 eats our [], so we need to use [ and ] instead.
32814   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32815   if test "x$has_forbidden_chars" != x; then
32816     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32817     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32818   fi
32819 
32820 
32821   windows_path="$new_path"
32822   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32823     unix_path=`$CYGPATH -u "$windows_path"`
32824     new_path="$unix_path"
32825   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32826     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32827     new_path="$unix_path"
32828   fi
32829 
32830   if test "x$path" != "x$new_path"; then
32831     ipath="$new_path"
32832     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32833 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32834   fi
32835 
32836   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32837   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32838 
32839     else
32840       # We're on a unix platform. Hooray! :)
32841       path="$ipath"
32842       has_space=`$ECHO "$path" | $GREP " "`
32843       if test "x$has_space" != x; then
32844         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32845 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32846         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32847       fi
32848 
32849       # Use eval to expand a potential ~
32850       eval path="$path"
32851       if test ! -f "$path" && test ! -d "$path"; then
32852         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32853       fi
32854 
32855       if test -d "$path"; then
32856         ipath="`cd "$path"; $THEPWDCMD -L`"
32857       else
32858         dir="`$DIRNAME "$path"`"
32859         base="`$BASENAME "$path"`"
32860         ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32861       fi
32862     fi
32863   fi
32864 
32865             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32866           fi
32867           IFS=";"
32868         fi
32869       done
32870       # Convert VS_LIB into SYSROOT_LDFLAGS
32871       for i in $VS_LIB; do
32872         libpath=$i
32873         # Only process non-empty elements
32874         if test "x$libpath" != x; then
32875           IFS="$OLDIFS"
32876           # Check that directory exists before calling fixup_path
32877           testpath=$libpath
32878 
32879   windows_path="$testpath"
32880   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32881     unix_path=`$CYGPATH -u "$windows_path"`
32882     testpath="$unix_path"
32883   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32884     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32885     testpath="$unix_path"
32886   fi
32887 
32888           if test -d "$testpath"; then
32889 
32890   # Only process if variable expands to non-empty
32891 
32892   if test "x$libpath" != x; then
32893     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32894 
32895   # Input might be given as Windows format, start by converting to
32896   # unix format.
32897   path="$libpath"
32898   new_path=`$CYGPATH -u "$path"`
32899 
32900   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32901   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32902   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32903   # "foo.exe" is OK but "foo" is an error.
32904   #
32905   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32906   # It is also a way to make sure we got the proper file name for the real test later on.
32907   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32908   if test "x$test_shortpath" = x; then
32909     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32910 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32911     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32912   fi
32913 
32914   # Call helper function which possibly converts this using DOS-style short mode.
32915   # If so, the updated path is stored in $new_path.
32916 
32917   input_path="$new_path"
32918   # Check if we need to convert this using DOS-style short mode. If the path
32919   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32920   # take no chances and rewrite it.
32921   # Note: m4 eats our [], so we need to use [ and ] instead.
32922   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32923   if test "x$has_forbidden_chars" != x; then
32924     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32925     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32926     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32927     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32928       # Going to short mode and back again did indeed matter. Since short mode is
32929       # case insensitive, let's make it lowercase to improve readability.
32930       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32931       # Now convert it back to Unix-style (cygpath)
32932       input_path=`$CYGPATH -u "$shortmode_path"`
32933       new_path="$input_path"
32934     fi
32935   fi
32936 
32937   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32938   if test "x$test_cygdrive_prefix" = x; then
32939     # As a simple fix, exclude /usr/bin since it's not a real path.
32940     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32941       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32942       # a path prefixed by /cygdrive for fixpath to work.
32943       new_path="$CYGWIN_ROOT_PATH$input_path"
32944     fi
32945   fi
32946 
32947 
32948   if test "x$path" != "x$new_path"; then
32949     libpath="$new_path"
32950     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32951 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32952   fi
32953 
32954     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32955 
32956   path="$libpath"
32957   has_colon=`$ECHO $path | $GREP ^.:`
32958   new_path="$path"
32959   if test "x$has_colon" = x; then
32960     # Not in mixed or Windows style, start by that.
32961     new_path=`cmd //c echo $path`
32962   fi
32963 
32964 
32965   input_path="$new_path"
32966   # Check if we need to convert this using DOS-style short mode. If the path
32967   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32968   # take no chances and rewrite it.
32969   # Note: m4 eats our [], so we need to use [ and ] instead.
32970   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32971   if test "x$has_forbidden_chars" != x; then
32972     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32973     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32974   fi
32975 
32976 
32977   windows_path="$new_path"
32978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32979     unix_path=`$CYGPATH -u "$windows_path"`
32980     new_path="$unix_path"
32981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32983     new_path="$unix_path"
32984   fi
32985 
32986   if test "x$path" != "x$new_path"; then
32987     libpath="$new_path"
32988     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32989 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32990   fi
32991 
32992   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32993   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32994 
32995     else
32996       # We're on a unix platform. Hooray! :)
32997       path="$libpath"
32998       has_space=`$ECHO "$path" | $GREP " "`
32999       if test "x$has_space" != x; then
33000         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33001 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33002         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33003       fi
33004 
33005       # Use eval to expand a potential ~
33006       eval path="$path"
33007       if test ! -f "$path" && test ! -d "$path"; then
33008         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33009       fi
33010 
33011       if test -d "$path"; then
33012         libpath="`cd "$path"; $THEPWDCMD -L`"
33013       else
33014         dir="`$DIRNAME "$path"`"
33015         base="`$BASENAME "$path"`"
33016         libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33017       fi
33018     fi
33019   fi
33020 
33021             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33022           fi
33023           IFS=";"
33024         fi
33025       done
33026       IFS="$OLDIFS"
33027     fi
33028   else
33029     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33030 $as_echo "not found" >&6; }
33031 
33032     if test "x$VS_ENV_CMD" = x; then
33033       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33034 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33035       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33036 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33037     else
33038       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33039 $as_echo "$as_me: Running the extraction script failed." >&6;}
33040     fi
33041     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33042 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33043     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33044 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33045     as_fn_error $? "Cannot continue" "$LINENO" 5
33046   fi
33047 
33048     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33049     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33050     PATH="$VS_PATH"
33051     # The microsoft toolchain also requires INCLUDE and LIB to be set.
33052     export INCLUDE="$VS_INCLUDE"
33053     export LIB="$VS_LIB"
33054   else
33055     if test "x$XCODE_VERSION_OUTPUT" != x; then
33056       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33057       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33058       TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33059     else
33060       # Currently we do not define this for other toolchains. This might change as the need arise.
33061       TOOLCHAIN_VERSION=
33062     fi
33063   fi
33064 
33065 
33066   # For solaris we really need solaris tools, and not the GNU equivalent.
33067   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
33068   # so add that to path before starting to probe.
33069   # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
33070   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
33071     PATH="/usr/ccs/bin:$PATH"
33072   fi
33073 
33074   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33075   # override all other locations.
33076   if test "x$TOOLCHAIN_PATH" != x; then
33077     PATH=$TOOLCHAIN_PATH:$PATH
33078   fi
33079 
33080 
33081   #
33082   # Setup the compilers (CC and CXX)
33083   #
33084 
33085   COMPILER_NAME=C
33086   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33087 
33088   if test "x$CC" != x; then
33089     # User has supplied compiler name already, always let that override.
33090     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33091 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33092     if test "x`basename $CC`" = "x$CC"; then
33093       # A command without a complete path is provided, search $PATH.
33094 
33095       for ac_prog in $CC
33096 do
33097   # Extract the first word of "$ac_prog", so it can be a program name with args.
33098 set dummy $ac_prog; ac_word=$2
33099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33100 $as_echo_n "checking for $ac_word... " >&6; }
33101 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33102   $as_echo_n "(cached) " >&6
33103 else
33104   case $POTENTIAL_CC in
33105   [\\/]* | ?:[\\/]*)
33106   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33107   ;;
33108   *)
33109   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33110 for as_dir in $PATH
33111 do
33112   IFS=$as_save_IFS
33113   test -z "$as_dir" && as_dir=.
33114     for ac_exec_ext in '' $ac_executable_extensions; do
33115   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33116     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33117     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33118     break 2
33119   fi
33120 done
33121   done
33122 IFS=$as_save_IFS
33123 
33124   ;;
33125 esac
33126 fi
33127 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33128 if test -n "$POTENTIAL_CC"; then
33129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33130 $as_echo "$POTENTIAL_CC" >&6; }
33131 else
33132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33133 $as_echo "no" >&6; }
33134 fi
33135 
33136 
33137   test -n "$POTENTIAL_CC" && break
33138 done
33139 
33140       if test "x$POTENTIAL_CC" != x; then
33141         CC=$POTENTIAL_CC
33142       else
33143         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33144       fi
33145     else
33146       # Otherwise it might already be a complete path
33147       if test ! -x "$CC"; then
33148         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33149       fi
33150     fi
33151   else
33152     # No user supplied value. Locate compiler ourselves.
33153 
33154     # If we are cross compiling, assume cross compilation tools follows the
33155     # cross compilation standard where they are prefixed with the autoconf
33156     # standard name for the target. For example the binary
33157     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33158     # If we are not cross compiling, then the default compiler name will be
33159     # used.
33160 
33161     CC=
33162     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33163     # before checking the rest of the PATH.
33164     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33165     # step, this should not be necessary.
33166     if test -n "$TOOLCHAIN_PATH"; then
33167       PATH_save="$PATH"
33168       PATH="$TOOLCHAIN_PATH"
33169       for ac_prog in $SEARCH_LIST
33170 do
33171   # Extract the first word of "$ac_prog", so it can be a program name with args.
33172 set dummy $ac_prog; ac_word=$2
33173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33174 $as_echo_n "checking for $ac_word... " >&6; }
33175 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33176   $as_echo_n "(cached) " >&6
33177 else
33178   case $TOOLCHAIN_PATH_CC in
33179   [\\/]* | ?:[\\/]*)
33180   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33181   ;;
33182   *)
33183   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33184 for as_dir in $PATH
33185 do
33186   IFS=$as_save_IFS
33187   test -z "$as_dir" && as_dir=.
33188     for ac_exec_ext in '' $ac_executable_extensions; do
33189   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33190     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33191     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33192     break 2
33193   fi
33194 done
33195   done
33196 IFS=$as_save_IFS
33197 
33198   ;;
33199 esac
33200 fi
33201 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33202 if test -n "$TOOLCHAIN_PATH_CC"; then
33203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33204 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33205 else
33206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33207 $as_echo "no" >&6; }
33208 fi
33209 
33210 
33211   test -n "$TOOLCHAIN_PATH_CC" && break
33212 done
33213 
33214       CC=$TOOLCHAIN_PATH_CC
33215       PATH="$PATH_save"
33216     fi
33217 
33218     # AC_PATH_PROGS can't be run multiple times with the same variable,
33219     # so create a new name for this run.
33220     if test "x$CC" = x; then
33221       for ac_prog in $SEARCH_LIST
33222 do
33223   # Extract the first word of "$ac_prog", so it can be a program name with args.
33224 set dummy $ac_prog; ac_word=$2
33225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33226 $as_echo_n "checking for $ac_word... " >&6; }
33227 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33228   $as_echo_n "(cached) " >&6
33229 else
33230   case $POTENTIAL_CC in
33231   [\\/]* | ?:[\\/]*)
33232   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33233   ;;
33234   *)
33235   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33236 for as_dir in $PATH
33237 do
33238   IFS=$as_save_IFS
33239   test -z "$as_dir" && as_dir=.
33240     for ac_exec_ext in '' $ac_executable_extensions; do
33241   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33242     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33244     break 2
33245   fi
33246 done
33247   done
33248 IFS=$as_save_IFS
33249 
33250   ;;
33251 esac
33252 fi
33253 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33254 if test -n "$POTENTIAL_CC"; then
33255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33256 $as_echo "$POTENTIAL_CC" >&6; }
33257 else
33258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33259 $as_echo "no" >&6; }
33260 fi
33261 
33262 
33263   test -n "$POTENTIAL_CC" && break
33264 done
33265 
33266       CC=$POTENTIAL_CC
33267     fi
33268 
33269     if test "x$CC" = x; then
33270 
33271   # Print a helpful message on how to acquire the necessary build dependency.
33272   # devkit is the help tag: freetype, cups, alsa etc
33273   MISSING_DEPENDENCY=devkit
33274 
33275   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33276     cygwin_help $MISSING_DEPENDENCY
33277   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33278     msys_help $MISSING_DEPENDENCY
33279   else
33280     PKGHANDLER_COMMAND=
33281 
33282     case $PKGHANDLER in
33283       apt-get)
33284         apt_help     $MISSING_DEPENDENCY ;;
33285       yum)
33286         yum_help     $MISSING_DEPENDENCY ;;
33287       port)
33288         port_help    $MISSING_DEPENDENCY ;;
33289       pkgutil)
33290         pkgutil_help $MISSING_DEPENDENCY ;;
33291       pkgadd)
33292         pkgadd_help  $MISSING_DEPENDENCY ;;
33293     esac
33294 
33295     if test "x$PKGHANDLER_COMMAND" != x; then
33296       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33297     fi
33298   fi
33299 
33300       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33301     fi
33302   fi
33303 
33304   # Now we have a compiler binary in CC. Make sure it's okay.
33305 
33306   # Only process if variable expands to non-empty
33307 
33308   if test "x$CC" != x; then
33309     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33310 
33311   # First separate the path from the arguments. This will split at the first
33312   # space.
33313   complete="$CC"
33314   path="${complete%% *}"
33315   tmp="$complete EOL"
33316   arguments="${tmp#* }"
33317 
33318   # Input might be given as Windows format, start by converting to
33319   # unix format.
33320   new_path=`$CYGPATH -u "$path"`
33321 
33322   # Now try to locate executable using which
33323   new_path=`$WHICH "$new_path" 2> /dev/null`
33324   # bat and cmd files are not always considered executable in cygwin causing which
33325   # to not find them
33326   if test "x$new_path" = x \
33327       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33328       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33329     new_path=`$CYGPATH -u "$path"`
33330   fi
33331   if test "x$new_path" = x; then
33332     # Oops. Which didn't find the executable.
33333     # The splitting of arguments from the executable at a space might have been incorrect,
33334     # since paths with space are more likely in Windows. Give it another try with the whole
33335     # argument.
33336     path="$complete"
33337     arguments="EOL"
33338     new_path=`$CYGPATH -u "$path"`
33339     new_path=`$WHICH "$new_path" 2> /dev/null`
33340     # bat and cmd files are not always considered executable in cygwin causing which
33341     # to not find them
33342     if test "x$new_path" = x \
33343         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33344         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33345       new_path=`$CYGPATH -u "$path"`
33346     fi
33347     if test "x$new_path" = x; then
33348       # It's still not found. Now this is an unrecoverable error.
33349       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33350 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33351       has_space=`$ECHO "$complete" | $GREP " "`
33352       if test "x$has_space" != x; then
33353         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33354 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33355       fi
33356       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33357     fi
33358   fi
33359 
33360   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33361   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33362   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33363   # "foo.exe" is OK but "foo" is an error.
33364   #
33365   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33366   # It is also a way to make sure we got the proper file name for the real test later on.
33367   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33368   if test "x$test_shortpath" = x; then
33369     # Short path failed, file does not exist as specified.
33370     # Try adding .exe or .cmd
33371     if test -f "${new_path}.exe"; then
33372       input_to_shortpath="${new_path}.exe"
33373     elif test -f "${new_path}.cmd"; then
33374       input_to_shortpath="${new_path}.cmd"
33375     else
33376       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33377 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33378       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33379 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33380       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33381     fi
33382   else
33383     input_to_shortpath="$new_path"
33384   fi
33385 
33386   # Call helper function which possibly converts this using DOS-style short mode.
33387   # If so, the updated path is stored in $new_path.
33388   new_path="$input_to_shortpath"
33389 
33390   input_path="$input_to_shortpath"
33391   # Check if we need to convert this using DOS-style short mode. If the path
33392   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33393   # take no chances and rewrite it.
33394   # Note: m4 eats our [], so we need to use [ and ] instead.
33395   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33396   if test "x$has_forbidden_chars" != x; then
33397     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33398     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33399     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33400     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33401       # Going to short mode and back again did indeed matter. Since short mode is
33402       # case insensitive, let's make it lowercase to improve readability.
33403       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33404       # Now convert it back to Unix-style (cygpath)
33405       input_path=`$CYGPATH -u "$shortmode_path"`
33406       new_path="$input_path"
33407     fi
33408   fi
33409 
33410   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33411   if test "x$test_cygdrive_prefix" = x; then
33412     # As a simple fix, exclude /usr/bin since it's not a real path.
33413     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33414       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33415       # a path prefixed by /cygdrive for fixpath to work.
33416       new_path="$CYGWIN_ROOT_PATH$input_path"
33417     fi
33418   fi
33419 
33420   # remove trailing .exe if any
33421   new_path="${new_path/%.exe/}"
33422 
33423     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33424 
33425   # First separate the path from the arguments. This will split at the first
33426   # space.
33427   complete="$CC"
33428   path="${complete%% *}"
33429   tmp="$complete EOL"
33430   arguments="${tmp#* }"
33431 
33432   # Input might be given as Windows format, start by converting to
33433   # unix format.
33434   new_path="$path"
33435 
33436   windows_path="$new_path"
33437   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33438     unix_path=`$CYGPATH -u "$windows_path"`
33439     new_path="$unix_path"
33440   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33441     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33442     new_path="$unix_path"
33443   fi
33444 
33445 
33446   # Now try to locate executable using which
33447   new_path=`$WHICH "$new_path" 2> /dev/null`
33448 
33449   if test "x$new_path" = x; then
33450     # Oops. Which didn't find the executable.
33451     # The splitting of arguments from the executable at a space might have been incorrect,
33452     # since paths with space are more likely in Windows. Give it another try with the whole
33453     # argument.
33454     path="$complete"
33455     arguments="EOL"
33456     new_path="$path"
33457 
33458   windows_path="$new_path"
33459   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33460     unix_path=`$CYGPATH -u "$windows_path"`
33461     new_path="$unix_path"
33462   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33463     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33464     new_path="$unix_path"
33465   fi
33466 
33467 
33468     new_path=`$WHICH "$new_path" 2> /dev/null`
33469     # bat and cmd files are not always considered executable in MSYS causing which
33470     # to not find them
33471     if test "x$new_path" = x \
33472         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33473         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33474       new_path="$path"
33475 
33476   windows_path="$new_path"
33477   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33478     unix_path=`$CYGPATH -u "$windows_path"`
33479     new_path="$unix_path"
33480   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33481     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33482     new_path="$unix_path"
33483   fi
33484 
33485     fi
33486 
33487     if test "x$new_path" = x; then
33488       # It's still not found. Now this is an unrecoverable error.
33489       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33490 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33491       has_space=`$ECHO "$complete" | $GREP " "`
33492       if test "x$has_space" != x; then
33493         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33494 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33495       fi
33496       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33497     fi
33498   fi
33499 
33500   # Now new_path has a complete unix path to the binary
33501   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33502     # Keep paths in /bin as-is, but remove trailing .exe if any
33503     new_path="${new_path/%.exe/}"
33504     # Do not save /bin paths to all_fixpath_prefixes!
33505   else
33506     # Not in mixed or Windows style, start by that.
33507     new_path=`cmd //c echo $new_path`
33508 
33509   input_path="$new_path"
33510   # Check if we need to convert this using DOS-style short mode. If the path
33511   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33512   # take no chances and rewrite it.
33513   # Note: m4 eats our [], so we need to use [ and ] instead.
33514   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33515   if test "x$has_forbidden_chars" != x; then
33516     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33517     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33518   fi
33519 
33520     # Output is in $new_path
33521 
33522   windows_path="$new_path"
33523   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33524     unix_path=`$CYGPATH -u "$windows_path"`
33525     new_path="$unix_path"
33526   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33527     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33528     new_path="$unix_path"
33529   fi
33530 
33531     # remove trailing .exe if any
33532     new_path="${new_path/%.exe/}"
33533 
33534     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33535     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33536   fi
33537 
33538     else
33539       # We're on a unix platform. Hooray! :)
33540       # First separate the path from the arguments. This will split at the first
33541       # space.
33542       complete="$CC"
33543       path="${complete%% *}"
33544       tmp="$complete EOL"
33545       arguments="${tmp#* }"
33546 
33547       # Cannot rely on the command "which" here since it doesn't always work.
33548       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33549       if test -z "$is_absolute_path"; then
33550         # Path to executable is not absolute. Find it.
33551         IFS_save="$IFS"
33552         IFS=:
33553         for p in $PATH; do
33554           if test -f "$p/$path" && test -x "$p/$path"; then
33555             new_path="$p/$path"
33556             break
33557           fi
33558         done
33559         IFS="$IFS_save"
33560       else
33561         # This is an absolute path, we can use it without further modifications.
33562         new_path="$path"
33563       fi
33564 
33565       if test "x$new_path" = x; then
33566         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33567 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33568         has_space=`$ECHO "$complete" | $GREP " "`
33569         if test "x$has_space" != x; then
33570           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33571 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33572         fi
33573         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33574       fi
33575     fi
33576 
33577     # Now join together the path and the arguments once again
33578     if test "x$arguments" != xEOL; then
33579       new_complete="$new_path ${arguments% *}"
33580     else
33581       new_complete="$new_path"
33582     fi
33583 
33584     if test "x$complete" != "x$new_complete"; then
33585       CC="$new_complete"
33586       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33587 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33588     fi
33589   fi
33590 
33591   TEST_COMPILER="$CC"
33592 
33593   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33594 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
33595   SYMLINK_ORIGINAL="$TEST_COMPILER"
33596 
33597   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33598     # Follow a chain of symbolic links. Use readlink
33599     # where it exists, else fall back to horribly
33600     # complicated shell code.
33601     if test "x$READLINK_TESTED" != yes; then
33602       # On MacOSX there is a readlink tool with a different
33603       # purpose than the GNU readlink tool. Check the found readlink.
33604       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33605       if test "x$ISGNU" = x; then
33606         # A readlink that we do not know how to use.
33607         # Are there other non-GNU readlinks out there?
33608         READLINK_TESTED=yes
33609         READLINK=
33610       fi
33611     fi
33612 
33613     if test "x$READLINK" != x; then
33614       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33615     else
33616       # Save the current directory for restoring afterwards
33617       STARTDIR=$PWD
33618       COUNTER=0
33619       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33620       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33621       cd $sym_link_dir
33622       # Use -P flag to resolve symlinks in directories.
33623       cd `$THEPWDCMD -P`
33624       sym_link_dir=`$THEPWDCMD -P`
33625       # Resolve file symlinks
33626       while test $COUNTER -lt 20; do
33627         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33628         if test "x$ISLINK" == x; then
33629           # This is not a symbolic link! We are done!
33630           break
33631         fi
33632         # Again resolve directory symlinks since the target of the just found
33633         # link could be in a different directory
33634         cd `$DIRNAME $ISLINK`
33635         sym_link_dir=`$THEPWDCMD -P`
33636         sym_link_file=`$BASENAME $ISLINK`
33637         let COUNTER=COUNTER+1
33638       done
33639       cd $STARTDIR
33640       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33641     fi
33642   fi
33643 
33644   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33645     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33646 $as_echo "no symlink" >&6; }
33647   else
33648     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33649 $as_echo "$SYMLINK_ORIGINAL" >&6; }
33650 
33651     # We can't handle ccache by gcc wrappers, since we need to know if we're
33652     # using ccache. Instead ccache usage must be controlled by a configure option.
33653     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33654     if test "x$COMPILER_BASENAME" = "xccache"; then
33655       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33656 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33657       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33658     fi
33659   fi
33660 
33661 
33662   COMPILER=$CC
33663   COMPILER_NAME=$COMPILER_NAME
33664 
33665   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33666     # cc -V output typically looks like
33667     #     cc: Sun C 5.12 Linux_i386 2011/11/16
33668     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33669     # Check that this is likely to be the Solaris Studio cc.
33670     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33671     if test $? -ne 0; then
33672       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33673       { $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
33674 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33675       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33676 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33677       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33678 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33679       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33680     fi
33681     # Remove usage instructions (if present), and
33682     # collapse compiler output into a single line
33683     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33684         $SED -e 's/ *[Uu]sage:.*//'`
33685     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33686         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33687   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33688     # xlc -qversion output typically looks like
33689     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33690     #     Version: 11.01.0000.0015
33691     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33692     # Check that this is likely to be the IBM XL C compiler.
33693     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33694     if test $? -ne 0; then
33695       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33696       { $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
33697 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33698       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33699 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33700       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33701 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33702       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33703     fi
33704     # Collapse compiler output into a single line
33705     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33706     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33707         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33708   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33709     # There is no specific version flag, but all output starts with a version string.
33710     # First line typically looks something like:
33711     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33712     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33713     # Check that this is likely to be Microsoft CL.EXE.
33714     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33715     if test $? -ne 0; then
33716       { $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
33717 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33718       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33719 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33720       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33721     fi
33722     # Collapse compiler output into a single line
33723     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33724     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33725         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33726   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33727     # gcc --version output typically looks like
33728     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33729     #     Copyright (C) 2013 Free Software Foundation, Inc.
33730     #     This is free software; see the source for copying conditions.  There is NO
33731     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33732     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33733     # Check that this is likely to be GCC.
33734     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33735     if test $? -ne 0; then
33736       { $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
33737 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33738       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33739 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33740       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33741     fi
33742     # Remove Copyright and legalese from version string, and
33743     # collapse into a single line
33744     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33745         $SED -e 's/ *Copyright .*//'`
33746     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33747         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33748   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33749     # clang --version output typically looks like
33750     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33751     #    clang version 3.3 (tags/RELEASE_33/final)
33752     # or
33753     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33754     #    Target: x86_64-pc-linux-gnu
33755     #    Thread model: posix
33756     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33757     # Check that this is likely to be clang
33758     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33759     if test $? -ne 0; then
33760       { $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
33761 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33762       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33763 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33764       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33765     fi
33766     # Collapse compiler output into a single line
33767     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33768     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33769         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33770   else
33771       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33772   fi
33773   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33774   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33775   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33776   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33777 
33778   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33779 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33780 
33781 
33782   # Now that we have resolved CC ourself, let autoconf have its go at it
33783   ac_ext=c
33784 ac_cpp='$CPP $CPPFLAGS'
33785 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33786 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33787 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33788 if test -n "$ac_tool_prefix"; then
33789   for ac_prog in $CC
33790   do
33791     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33792 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33794 $as_echo_n "checking for $ac_word... " >&6; }
33795 if ${ac_cv_prog_CC+:} false; then :
33796   $as_echo_n "(cached) " >&6
33797 else
33798   if test -n "$CC"; then
33799   ac_cv_prog_CC="$CC" # Let the user override the test.
33800 else
33801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33802 for as_dir in $PATH
33803 do
33804   IFS=$as_save_IFS
33805   test -z "$as_dir" && as_dir=.
33806     for ac_exec_ext in '' $ac_executable_extensions; do
33807   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33808     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33809     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33810     break 2
33811   fi
33812 done
33813   done
33814 IFS=$as_save_IFS
33815 
33816 fi
33817 fi
33818 CC=$ac_cv_prog_CC
33819 if test -n "$CC"; then
33820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33821 $as_echo "$CC" >&6; }
33822 else
33823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33824 $as_echo "no" >&6; }
33825 fi
33826 
33827 
33828     test -n "$CC" && break
33829   done
33830 fi
33831 if test -z "$CC"; then
33832   ac_ct_CC=$CC
33833   for ac_prog in $CC
33834 do
33835   # Extract the first word of "$ac_prog", so it can be a program name with args.
33836 set dummy $ac_prog; ac_word=$2
33837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33838 $as_echo_n "checking for $ac_word... " >&6; }
33839 if ${ac_cv_prog_ac_ct_CC+:} false; then :
33840   $as_echo_n "(cached) " >&6
33841 else
33842   if test -n "$ac_ct_CC"; then
33843   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33844 else
33845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33846 for as_dir in $PATH
33847 do
33848   IFS=$as_save_IFS
33849   test -z "$as_dir" && as_dir=.
33850     for ac_exec_ext in '' $ac_executable_extensions; do
33851   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33852     ac_cv_prog_ac_ct_CC="$ac_prog"
33853     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33854     break 2
33855   fi
33856 done
33857   done
33858 IFS=$as_save_IFS
33859 
33860 fi
33861 fi
33862 ac_ct_CC=$ac_cv_prog_ac_ct_CC
33863 if test -n "$ac_ct_CC"; then
33864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33865 $as_echo "$ac_ct_CC" >&6; }
33866 else
33867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33868 $as_echo "no" >&6; }
33869 fi
33870 
33871 
33872   test -n "$ac_ct_CC" && break
33873 done
33874 
33875   if test "x$ac_ct_CC" = x; then
33876     CC=""
33877   else
33878     case $cross_compiling:$ac_tool_warned in
33879 yes:)
33880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33881 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33882 ac_tool_warned=yes ;;
33883 esac
33884     CC=$ac_ct_CC
33885   fi
33886 fi
33887 
33888 
33889 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33890 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33891 as_fn_error $? "no acceptable C compiler found in \$PATH
33892 See \`config.log' for more details" "$LINENO" 5; }
33893 
33894 # Provide some information about the compiler.
33895 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33896 set X $ac_compile
33897 ac_compiler=$2
33898 for ac_option in --version -v -V -qversion; do
33899   { { ac_try="$ac_compiler $ac_option >&5"
33900 case "(($ac_try" in
33901   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33902   *) ac_try_echo=$ac_try;;
33903 esac
33904 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33905 $as_echo "$ac_try_echo"; } >&5
33906   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33907   ac_status=$?
33908   if test -s conftest.err; then
33909     sed '10a\
33910 ... rest of stderr output deleted ...
33911          10q' conftest.err >conftest.er1
33912     cat conftest.er1 >&5
33913   fi
33914   rm -f conftest.er1 conftest.err
33915   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33916   test $ac_status = 0; }
33917 done
33918 
33919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33920 /* end confdefs.h.  */
33921 
33922 int
33923 main ()
33924 {
33925 
33926   ;
33927   return 0;
33928 }
33929 _ACEOF
33930 ac_clean_files_save=$ac_clean_files
33931 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33932 # Try to create an executable without -o first, disregard a.out.
33933 # It will help us diagnose broken compilers, and finding out an intuition
33934 # of exeext.
33935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33936 $as_echo_n "checking whether the C compiler works... " >&6; }
33937 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33938 
33939 # The possible output files:
33940 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33941 
33942 ac_rmfiles=
33943 for ac_file in $ac_files
33944 do
33945   case $ac_file in
33946     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33947     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33948   esac
33949 done
33950 rm -f $ac_rmfiles
33951 
33952 if { { ac_try="$ac_link_default"
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_default") 2>&5
33960   ac_status=$?
33961   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33962   test $ac_status = 0; }; then :
33963   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33964 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33965 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
33966 # so that the user can short-circuit this test for compilers unknown to
33967 # Autoconf.
33968 for ac_file in $ac_files ''
33969 do
33970   test -f "$ac_file" || continue
33971   case $ac_file in
33972     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33973         ;;
33974     [ab].out )
33975         # We found the default executable, but exeext='' is most
33976         # certainly right.
33977         break;;
33978     *.* )
33979         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33980         then :; else
33981            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33982         fi
33983         # We set ac_cv_exeext here because the later test for it is not
33984         # safe: cross compilers may not add the suffix if given an `-o'
33985         # argument, so we may need to know it at that point already.
33986         # Even if this section looks crufty: it has the advantage of
33987         # actually working.
33988         break;;
33989     * )
33990         break;;
33991   esac
33992 done
33993 test "$ac_cv_exeext" = no && ac_cv_exeext=
33994 
33995 else
33996   ac_file=''
33997 fi
33998 if test -z "$ac_file"; then :
33999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34000 $as_echo "no" >&6; }
34001 $as_echo "$as_me: failed program was:" >&5
34002 sed 's/^/| /' conftest.$ac_ext >&5
34003 
34004 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34005 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34006 as_fn_error 77 "C compiler cannot create executables
34007 See \`config.log' for more details" "$LINENO" 5; }
34008 else
34009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34010 $as_echo "yes" >&6; }
34011 fi
34012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34013 $as_echo_n "checking for C compiler default output file name... " >&6; }
34014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34015 $as_echo "$ac_file" >&6; }
34016 ac_exeext=$ac_cv_exeext
34017 
34018 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34019 ac_clean_files=$ac_clean_files_save
34020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34021 $as_echo_n "checking for suffix of executables... " >&6; }
34022 if { { ac_try="$ac_link"
34023 case "(($ac_try" in
34024   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34025   *) ac_try_echo=$ac_try;;
34026 esac
34027 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34028 $as_echo "$ac_try_echo"; } >&5
34029   (eval "$ac_link") 2>&5
34030   ac_status=$?
34031   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34032   test $ac_status = 0; }; then :
34033   # If both `conftest.exe' and `conftest' are `present' (well, observable)
34034 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34035 # work properly (i.e., refer to `conftest.exe'), while it won't with
34036 # `rm'.
34037 for ac_file in conftest.exe conftest conftest.*; do
34038   test -f "$ac_file" || continue
34039   case $ac_file in
34040     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34041     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34042           break;;
34043     * ) break;;
34044   esac
34045 done
34046 else
34047   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34048 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34049 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34050 See \`config.log' for more details" "$LINENO" 5; }
34051 fi
34052 rm -f conftest conftest$ac_cv_exeext
34053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34054 $as_echo "$ac_cv_exeext" >&6; }
34055 
34056 rm -f conftest.$ac_ext
34057 EXEEXT=$ac_cv_exeext
34058 ac_exeext=$EXEEXT
34059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34060 /* end confdefs.h.  */
34061 #include <stdio.h>
34062 int
34063 main ()
34064 {
34065 FILE *f = fopen ("conftest.out", "w");
34066  return ferror (f) || fclose (f) != 0;
34067 
34068   ;
34069   return 0;
34070 }
34071 _ACEOF
34072 ac_clean_files="$ac_clean_files conftest.out"
34073 # Check that the compiler produces executables we can run.  If not, either
34074 # the compiler is broken, or we cross compile.
34075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34076 $as_echo_n "checking whether we are cross compiling... " >&6; }
34077 if test "$cross_compiling" != yes; then
34078   { { ac_try="$ac_link"
34079 case "(($ac_try" in
34080   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34081   *) ac_try_echo=$ac_try;;
34082 esac
34083 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34084 $as_echo "$ac_try_echo"; } >&5
34085   (eval "$ac_link") 2>&5
34086   ac_status=$?
34087   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34088   test $ac_status = 0; }
34089   if { ac_try='./conftest$ac_cv_exeext'
34090   { { case "(($ac_try" in
34091   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34092   *) ac_try_echo=$ac_try;;
34093 esac
34094 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34095 $as_echo "$ac_try_echo"; } >&5
34096   (eval "$ac_try") 2>&5
34097   ac_status=$?
34098   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34099   test $ac_status = 0; }; }; then
34100     cross_compiling=no
34101   else
34102     if test "$cross_compiling" = maybe; then
34103         cross_compiling=yes
34104     else
34105         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34106 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34107 as_fn_error $? "cannot run C compiled programs.
34108 If you meant to cross compile, use \`--host'.
34109 See \`config.log' for more details" "$LINENO" 5; }
34110     fi
34111   fi
34112 fi
34113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34114 $as_echo "$cross_compiling" >&6; }
34115 
34116 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34117 ac_clean_files=$ac_clean_files_save
34118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34119 $as_echo_n "checking for suffix of object files... " >&6; }
34120 if ${ac_cv_objext+:} false; then :
34121   $as_echo_n "(cached) " >&6
34122 else
34123   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34124 /* end confdefs.h.  */
34125 
34126 int
34127 main ()
34128 {
34129 
34130   ;
34131   return 0;
34132 }
34133 _ACEOF
34134 rm -f conftest.o conftest.obj
34135 if { { ac_try="$ac_compile"
34136 case "(($ac_try" in
34137   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34138   *) ac_try_echo=$ac_try;;
34139 esac
34140 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34141 $as_echo "$ac_try_echo"; } >&5
34142   (eval "$ac_compile") 2>&5
34143   ac_status=$?
34144   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34145   test $ac_status = 0; }; then :
34146   for ac_file in conftest.o conftest.obj conftest.*; do
34147   test -f "$ac_file" || continue;
34148   case $ac_file in
34149     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34150     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34151        break;;
34152   esac
34153 done
34154 else
34155   $as_echo "$as_me: failed program was:" >&5
34156 sed 's/^/| /' conftest.$ac_ext >&5
34157 
34158 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34159 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34160 as_fn_error $? "cannot compute suffix of object files: cannot compile
34161 See \`config.log' for more details" "$LINENO" 5; }
34162 fi
34163 rm -f conftest.$ac_cv_objext conftest.$ac_ext
34164 fi
34165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34166 $as_echo "$ac_cv_objext" >&6; }
34167 OBJEXT=$ac_cv_objext
34168 ac_objext=$OBJEXT
34169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34170 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34171 if ${ac_cv_c_compiler_gnu+:} false; then :
34172   $as_echo_n "(cached) " >&6
34173 else
34174   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34175 /* end confdefs.h.  */
34176 
34177 int
34178 main ()
34179 {
34180 #ifndef __GNUC__
34181        choke me
34182 #endif
34183 
34184   ;
34185   return 0;
34186 }
34187 _ACEOF
34188 if ac_fn_c_try_compile "$LINENO"; then :
34189   ac_compiler_gnu=yes
34190 else
34191   ac_compiler_gnu=no
34192 fi
34193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34194 ac_cv_c_compiler_gnu=$ac_compiler_gnu
34195 
34196 fi
34197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34198 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
34199 if test $ac_compiler_gnu = yes; then
34200   GCC=yes
34201 else
34202   GCC=
34203 fi
34204 ac_test_CFLAGS=${CFLAGS+set}
34205 ac_save_CFLAGS=$CFLAGS
34206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34207 $as_echo_n "checking whether $CC accepts -g... " >&6; }
34208 if ${ac_cv_prog_cc_g+:} false; then :
34209   $as_echo_n "(cached) " >&6
34210 else
34211   ac_save_c_werror_flag=$ac_c_werror_flag
34212    ac_c_werror_flag=yes
34213    ac_cv_prog_cc_g=no
34214    CFLAGS="-g"
34215    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34216 /* end confdefs.h.  */
34217 
34218 int
34219 main ()
34220 {
34221 
34222   ;
34223   return 0;
34224 }
34225 _ACEOF
34226 if ac_fn_c_try_compile "$LINENO"; then :
34227   ac_cv_prog_cc_g=yes
34228 else
34229   CFLAGS=""
34230       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34231 /* end confdefs.h.  */
34232 
34233 int
34234 main ()
34235 {
34236 
34237   ;
34238   return 0;
34239 }
34240 _ACEOF
34241 if ac_fn_c_try_compile "$LINENO"; then :
34242 
34243 else
34244   ac_c_werror_flag=$ac_save_c_werror_flag
34245          CFLAGS="-g"
34246          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34247 /* end confdefs.h.  */
34248 
34249 int
34250 main ()
34251 {
34252 
34253   ;
34254   return 0;
34255 }
34256 _ACEOF
34257 if ac_fn_c_try_compile "$LINENO"; then :
34258   ac_cv_prog_cc_g=yes
34259 fi
34260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34261 fi
34262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34263 fi
34264 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34265    ac_c_werror_flag=$ac_save_c_werror_flag
34266 fi
34267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34268 $as_echo "$ac_cv_prog_cc_g" >&6; }
34269 if test "$ac_test_CFLAGS" = set; then
34270   CFLAGS=$ac_save_CFLAGS
34271 elif test $ac_cv_prog_cc_g = yes; then
34272   if test "$GCC" = yes; then
34273     CFLAGS="-g -O2"
34274   else
34275     CFLAGS="-g"
34276   fi
34277 else
34278   if test "$GCC" = yes; then
34279     CFLAGS="-O2"
34280   else
34281     CFLAGS=
34282   fi
34283 fi
34284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34285 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34286 if ${ac_cv_prog_cc_c89+:} false; then :
34287   $as_echo_n "(cached) " >&6
34288 else
34289   ac_cv_prog_cc_c89=no
34290 ac_save_CC=$CC
34291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34292 /* end confdefs.h.  */
34293 #include <stdarg.h>
34294 #include <stdio.h>
34295 struct stat;
34296 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34297 struct buf { int x; };
34298 FILE * (*rcsopen) (struct buf *, struct stat *, int);
34299 static char *e (p, i)
34300      char **p;
34301      int i;
34302 {
34303   return p[i];
34304 }
34305 static char *f (char * (*g) (char **, int), char **p, ...)
34306 {
34307   char *s;
34308   va_list v;
34309   va_start (v,p);
34310   s = g (p, va_arg (v,int));
34311   va_end (v);
34312   return s;
34313 }
34314 
34315 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34316    function prototypes and stuff, but not '\xHH' hex character constants.
34317    These don't provoke an error unfortunately, instead are silently treated
34318    as 'x'.  The following induces an error, until -std is added to get
34319    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34320    array size at least.  It's necessary to write '\x00'==0 to get something
34321    that's true only with -std.  */
34322 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34323 
34324 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34325    inside strings and character constants.  */
34326 #define FOO(x) 'x'
34327 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34328 
34329 int test (int i, double x);
34330 struct s1 {int (*f) (int a);};
34331 struct s2 {int (*f) (double a);};
34332 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34333 int argc;
34334 char **argv;
34335 int
34336 main ()
34337 {
34338 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34339   ;
34340   return 0;
34341 }
34342 _ACEOF
34343 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34344         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34345 do
34346   CC="$ac_save_CC $ac_arg"
34347   if ac_fn_c_try_compile "$LINENO"; then :
34348   ac_cv_prog_cc_c89=$ac_arg
34349 fi
34350 rm -f core conftest.err conftest.$ac_objext
34351   test "x$ac_cv_prog_cc_c89" != "xno" && break
34352 done
34353 rm -f conftest.$ac_ext
34354 CC=$ac_save_CC
34355 
34356 fi
34357 # AC_CACHE_VAL
34358 case "x$ac_cv_prog_cc_c89" in
34359   x)
34360     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34361 $as_echo "none needed" >&6; } ;;
34362   xno)
34363     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34364 $as_echo "unsupported" >&6; } ;;
34365   *)
34366     CC="$CC $ac_cv_prog_cc_c89"
34367     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34368 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34369 esac
34370 if test "x$ac_cv_prog_cc_c89" != xno; then :
34371 
34372 fi
34373 
34374 ac_ext=cpp
34375 ac_cpp='$CXXCPP $CPPFLAGS'
34376 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34377 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34378 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34379 
34380 
34381 
34382   COMPILER_NAME=C++
34383   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34384 
34385   if test "x$CXX" != x; then
34386     # User has supplied compiler name already, always let that override.
34387     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34388 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34389     if test "x`basename $CXX`" = "x$CXX"; then
34390       # A command without a complete path is provided, search $PATH.
34391 
34392       for ac_prog in $CXX
34393 do
34394   # Extract the first word of "$ac_prog", so it can be a program name with args.
34395 set dummy $ac_prog; ac_word=$2
34396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34397 $as_echo_n "checking for $ac_word... " >&6; }
34398 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34399   $as_echo_n "(cached) " >&6
34400 else
34401   case $POTENTIAL_CXX in
34402   [\\/]* | ?:[\\/]*)
34403   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34404   ;;
34405   *)
34406   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34407 for as_dir in $PATH
34408 do
34409   IFS=$as_save_IFS
34410   test -z "$as_dir" && as_dir=.
34411     for ac_exec_ext in '' $ac_executable_extensions; do
34412   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34413     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34414     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34415     break 2
34416   fi
34417 done
34418   done
34419 IFS=$as_save_IFS
34420 
34421   ;;
34422 esac
34423 fi
34424 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34425 if test -n "$POTENTIAL_CXX"; then
34426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34427 $as_echo "$POTENTIAL_CXX" >&6; }
34428 else
34429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34430 $as_echo "no" >&6; }
34431 fi
34432 
34433 
34434   test -n "$POTENTIAL_CXX" && break
34435 done
34436 
34437       if test "x$POTENTIAL_CXX" != x; then
34438         CXX=$POTENTIAL_CXX
34439       else
34440         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34441       fi
34442     else
34443       # Otherwise it might already be a complete path
34444       if test ! -x "$CXX"; then
34445         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34446       fi
34447     fi
34448   else
34449     # No user supplied value. Locate compiler ourselves.
34450 
34451     # If we are cross compiling, assume cross compilation tools follows the
34452     # cross compilation standard where they are prefixed with the autoconf
34453     # standard name for the target. For example the binary
34454     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34455     # If we are not cross compiling, then the default compiler name will be
34456     # used.
34457 
34458     CXX=
34459     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34460     # before checking the rest of the PATH.
34461     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34462     # step, this should not be necessary.
34463     if test -n "$TOOLCHAIN_PATH"; then
34464       PATH_save="$PATH"
34465       PATH="$TOOLCHAIN_PATH"
34466       for ac_prog in $SEARCH_LIST
34467 do
34468   # Extract the first word of "$ac_prog", so it can be a program name with args.
34469 set dummy $ac_prog; ac_word=$2
34470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34471 $as_echo_n "checking for $ac_word... " >&6; }
34472 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34473   $as_echo_n "(cached) " >&6
34474 else
34475   case $TOOLCHAIN_PATH_CXX in
34476   [\\/]* | ?:[\\/]*)
34477   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34478   ;;
34479   *)
34480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34481 for as_dir in $PATH
34482 do
34483   IFS=$as_save_IFS
34484   test -z "$as_dir" && as_dir=.
34485     for ac_exec_ext in '' $ac_executable_extensions; do
34486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34487     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34489     break 2
34490   fi
34491 done
34492   done
34493 IFS=$as_save_IFS
34494 
34495   ;;
34496 esac
34497 fi
34498 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34499 if test -n "$TOOLCHAIN_PATH_CXX"; then
34500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34501 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34502 else
34503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34504 $as_echo "no" >&6; }
34505 fi
34506 
34507 
34508   test -n "$TOOLCHAIN_PATH_CXX" && break
34509 done
34510 
34511       CXX=$TOOLCHAIN_PATH_CXX
34512       PATH="$PATH_save"
34513     fi
34514 
34515     # AC_PATH_PROGS can't be run multiple times with the same variable,
34516     # so create a new name for this run.
34517     if test "x$CXX" = x; then
34518       for ac_prog in $SEARCH_LIST
34519 do
34520   # Extract the first word of "$ac_prog", so it can be a program name with args.
34521 set dummy $ac_prog; ac_word=$2
34522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34523 $as_echo_n "checking for $ac_word... " >&6; }
34524 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34525   $as_echo_n "(cached) " >&6
34526 else
34527   case $POTENTIAL_CXX in
34528   [\\/]* | ?:[\\/]*)
34529   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34530   ;;
34531   *)
34532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34533 for as_dir in $PATH
34534 do
34535   IFS=$as_save_IFS
34536   test -z "$as_dir" && as_dir=.
34537     for ac_exec_ext in '' $ac_executable_extensions; do
34538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34539     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34541     break 2
34542   fi
34543 done
34544   done
34545 IFS=$as_save_IFS
34546 
34547   ;;
34548 esac
34549 fi
34550 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34551 if test -n "$POTENTIAL_CXX"; then
34552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34553 $as_echo "$POTENTIAL_CXX" >&6; }
34554 else
34555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34556 $as_echo "no" >&6; }
34557 fi
34558 
34559 
34560   test -n "$POTENTIAL_CXX" && break
34561 done
34562 
34563       CXX=$POTENTIAL_CXX
34564     fi
34565 
34566     if test "x$CXX" = x; then
34567 
34568   # Print a helpful message on how to acquire the necessary build dependency.
34569   # devkit is the help tag: freetype, cups, alsa etc
34570   MISSING_DEPENDENCY=devkit
34571 
34572   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34573     cygwin_help $MISSING_DEPENDENCY
34574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34575     msys_help $MISSING_DEPENDENCY
34576   else
34577     PKGHANDLER_COMMAND=
34578 
34579     case $PKGHANDLER in
34580       apt-get)
34581         apt_help     $MISSING_DEPENDENCY ;;
34582       yum)
34583         yum_help     $MISSING_DEPENDENCY ;;
34584       port)
34585         port_help    $MISSING_DEPENDENCY ;;
34586       pkgutil)
34587         pkgutil_help $MISSING_DEPENDENCY ;;
34588       pkgadd)
34589         pkgadd_help  $MISSING_DEPENDENCY ;;
34590     esac
34591 
34592     if test "x$PKGHANDLER_COMMAND" != x; then
34593       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34594     fi
34595   fi
34596 
34597       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34598     fi
34599   fi
34600 
34601   # Now we have a compiler binary in CXX. Make sure it's okay.
34602 
34603   # Only process if variable expands to non-empty
34604 
34605   if test "x$CXX" != x; then
34606     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34607 
34608   # First separate the path from the arguments. This will split at the first
34609   # space.
34610   complete="$CXX"
34611   path="${complete%% *}"
34612   tmp="$complete EOL"
34613   arguments="${tmp#* }"
34614 
34615   # Input might be given as Windows format, start by converting to
34616   # unix format.
34617   new_path=`$CYGPATH -u "$path"`
34618 
34619   # Now try to locate executable using which
34620   new_path=`$WHICH "$new_path" 2> /dev/null`
34621   # bat and cmd files are not always considered executable in cygwin causing which
34622   # to not find them
34623   if test "x$new_path" = x \
34624       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34625       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34626     new_path=`$CYGPATH -u "$path"`
34627   fi
34628   if test "x$new_path" = x; then
34629     # Oops. Which didn't find the executable.
34630     # The splitting of arguments from the executable at a space might have been incorrect,
34631     # since paths with space are more likely in Windows. Give it another try with the whole
34632     # argument.
34633     path="$complete"
34634     arguments="EOL"
34635     new_path=`$CYGPATH -u "$path"`
34636     new_path=`$WHICH "$new_path" 2> /dev/null`
34637     # bat and cmd files are not always considered executable in cygwin causing which
34638     # to not find them
34639     if test "x$new_path" = x \
34640         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34641         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34642       new_path=`$CYGPATH -u "$path"`
34643     fi
34644     if test "x$new_path" = x; then
34645       # It's still not found. Now this is an unrecoverable error.
34646       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34647 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34648       has_space=`$ECHO "$complete" | $GREP " "`
34649       if test "x$has_space" != x; then
34650         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34651 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34652       fi
34653       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34654     fi
34655   fi
34656 
34657   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34658   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34659   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34660   # "foo.exe" is OK but "foo" is an error.
34661   #
34662   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34663   # It is also a way to make sure we got the proper file name for the real test later on.
34664   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34665   if test "x$test_shortpath" = x; then
34666     # Short path failed, file does not exist as specified.
34667     # Try adding .exe or .cmd
34668     if test -f "${new_path}.exe"; then
34669       input_to_shortpath="${new_path}.exe"
34670     elif test -f "${new_path}.cmd"; then
34671       input_to_shortpath="${new_path}.cmd"
34672     else
34673       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34674 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34675       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34676 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34677       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34678     fi
34679   else
34680     input_to_shortpath="$new_path"
34681   fi
34682 
34683   # Call helper function which possibly converts this using DOS-style short mode.
34684   # If so, the updated path is stored in $new_path.
34685   new_path="$input_to_shortpath"
34686 
34687   input_path="$input_to_shortpath"
34688   # Check if we need to convert this using DOS-style short mode. If the path
34689   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34690   # take no chances and rewrite it.
34691   # Note: m4 eats our [], so we need to use [ and ] instead.
34692   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34693   if test "x$has_forbidden_chars" != x; then
34694     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34695     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34696     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34697     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34698       # Going to short mode and back again did indeed matter. Since short mode is
34699       # case insensitive, let's make it lowercase to improve readability.
34700       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34701       # Now convert it back to Unix-style (cygpath)
34702       input_path=`$CYGPATH -u "$shortmode_path"`
34703       new_path="$input_path"
34704     fi
34705   fi
34706 
34707   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34708   if test "x$test_cygdrive_prefix" = x; then
34709     # As a simple fix, exclude /usr/bin since it's not a real path.
34710     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34711       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34712       # a path prefixed by /cygdrive for fixpath to work.
34713       new_path="$CYGWIN_ROOT_PATH$input_path"
34714     fi
34715   fi
34716 
34717   # remove trailing .exe if any
34718   new_path="${new_path/%.exe/}"
34719 
34720     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34721 
34722   # First separate the path from the arguments. This will split at the first
34723   # space.
34724   complete="$CXX"
34725   path="${complete%% *}"
34726   tmp="$complete EOL"
34727   arguments="${tmp#* }"
34728 
34729   # Input might be given as Windows format, start by converting to
34730   # unix format.
34731   new_path="$path"
34732 
34733   windows_path="$new_path"
34734   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34735     unix_path=`$CYGPATH -u "$windows_path"`
34736     new_path="$unix_path"
34737   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34738     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34739     new_path="$unix_path"
34740   fi
34741 
34742 
34743   # Now try to locate executable using which
34744   new_path=`$WHICH "$new_path" 2> /dev/null`
34745 
34746   if test "x$new_path" = x; then
34747     # Oops. Which didn't find the executable.
34748     # The splitting of arguments from the executable at a space might have been incorrect,
34749     # since paths with space are more likely in Windows. Give it another try with the whole
34750     # argument.
34751     path="$complete"
34752     arguments="EOL"
34753     new_path="$path"
34754 
34755   windows_path="$new_path"
34756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34757     unix_path=`$CYGPATH -u "$windows_path"`
34758     new_path="$unix_path"
34759   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34760     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34761     new_path="$unix_path"
34762   fi
34763 
34764 
34765     new_path=`$WHICH "$new_path" 2> /dev/null`
34766     # bat and cmd files are not always considered executable in MSYS causing which
34767     # to not find them
34768     if test "x$new_path" = x \
34769         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34770         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34771       new_path="$path"
34772 
34773   windows_path="$new_path"
34774   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34775     unix_path=`$CYGPATH -u "$windows_path"`
34776     new_path="$unix_path"
34777   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34778     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34779     new_path="$unix_path"
34780   fi
34781 
34782     fi
34783 
34784     if test "x$new_path" = x; then
34785       # It's still not found. Now this is an unrecoverable error.
34786       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34787 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34788       has_space=`$ECHO "$complete" | $GREP " "`
34789       if test "x$has_space" != x; then
34790         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34791 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34792       fi
34793       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34794     fi
34795   fi
34796 
34797   # Now new_path has a complete unix path to the binary
34798   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34799     # Keep paths in /bin as-is, but remove trailing .exe if any
34800     new_path="${new_path/%.exe/}"
34801     # Do not save /bin paths to all_fixpath_prefixes!
34802   else
34803     # Not in mixed or Windows style, start by that.
34804     new_path=`cmd //c echo $new_path`
34805 
34806   input_path="$new_path"
34807   # Check if we need to convert this using DOS-style short mode. If the path
34808   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34809   # take no chances and rewrite it.
34810   # Note: m4 eats our [], so we need to use [ and ] instead.
34811   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34812   if test "x$has_forbidden_chars" != x; then
34813     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34814     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34815   fi
34816 
34817     # Output is in $new_path
34818 
34819   windows_path="$new_path"
34820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34821     unix_path=`$CYGPATH -u "$windows_path"`
34822     new_path="$unix_path"
34823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34825     new_path="$unix_path"
34826   fi
34827 
34828     # remove trailing .exe if any
34829     new_path="${new_path/%.exe/}"
34830 
34831     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34832     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34833   fi
34834 
34835     else
34836       # We're on a unix platform. Hooray! :)
34837       # First separate the path from the arguments. This will split at the first
34838       # space.
34839       complete="$CXX"
34840       path="${complete%% *}"
34841       tmp="$complete EOL"
34842       arguments="${tmp#* }"
34843 
34844       # Cannot rely on the command "which" here since it doesn't always work.
34845       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34846       if test -z "$is_absolute_path"; then
34847         # Path to executable is not absolute. Find it.
34848         IFS_save="$IFS"
34849         IFS=:
34850         for p in $PATH; do
34851           if test -f "$p/$path" && test -x "$p/$path"; then
34852             new_path="$p/$path"
34853             break
34854           fi
34855         done
34856         IFS="$IFS_save"
34857       else
34858         # This is an absolute path, we can use it without further modifications.
34859         new_path="$path"
34860       fi
34861 
34862       if test "x$new_path" = x; then
34863         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34864 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34865         has_space=`$ECHO "$complete" | $GREP " "`
34866         if test "x$has_space" != x; then
34867           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34868 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34869         fi
34870         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34871       fi
34872     fi
34873 
34874     # Now join together the path and the arguments once again
34875     if test "x$arguments" != xEOL; then
34876       new_complete="$new_path ${arguments% *}"
34877     else
34878       new_complete="$new_path"
34879     fi
34880 
34881     if test "x$complete" != "x$new_complete"; then
34882       CXX="$new_complete"
34883       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34884 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34885     fi
34886   fi
34887 
34888   TEST_COMPILER="$CXX"
34889 
34890   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34891 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34892   SYMLINK_ORIGINAL="$TEST_COMPILER"
34893 
34894   if test "x$OPENJDK_BUILD_OS" != xwindows; then
34895     # Follow a chain of symbolic links. Use readlink
34896     # where it exists, else fall back to horribly
34897     # complicated shell code.
34898     if test "x$READLINK_TESTED" != yes; then
34899       # On MacOSX there is a readlink tool with a different
34900       # purpose than the GNU readlink tool. Check the found readlink.
34901       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34902       if test "x$ISGNU" = x; then
34903         # A readlink that we do not know how to use.
34904         # Are there other non-GNU readlinks out there?
34905         READLINK_TESTED=yes
34906         READLINK=
34907       fi
34908     fi
34909 
34910     if test "x$READLINK" != x; then
34911       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34912     else
34913       # Save the current directory for restoring afterwards
34914       STARTDIR=$PWD
34915       COUNTER=0
34916       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34917       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34918       cd $sym_link_dir
34919       # Use -P flag to resolve symlinks in directories.
34920       cd `$THEPWDCMD -P`
34921       sym_link_dir=`$THEPWDCMD -P`
34922       # Resolve file symlinks
34923       while test $COUNTER -lt 20; do
34924         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34925         if test "x$ISLINK" == x; then
34926           # This is not a symbolic link! We are done!
34927           break
34928         fi
34929         # Again resolve directory symlinks since the target of the just found
34930         # link could be in a different directory
34931         cd `$DIRNAME $ISLINK`
34932         sym_link_dir=`$THEPWDCMD -P`
34933         sym_link_file=`$BASENAME $ISLINK`
34934         let COUNTER=COUNTER+1
34935       done
34936       cd $STARTDIR
34937       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34938     fi
34939   fi
34940 
34941   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34942     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34943 $as_echo "no symlink" >&6; }
34944   else
34945     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34946 $as_echo "$SYMLINK_ORIGINAL" >&6; }
34947 
34948     # We can't handle ccache by gcc wrappers, since we need to know if we're
34949     # using ccache. Instead ccache usage must be controlled by a configure option.
34950     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34951     if test "x$COMPILER_BASENAME" = "xccache"; then
34952       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34953 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34954       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34955     fi
34956   fi
34957 
34958 
34959   COMPILER=$CXX
34960   COMPILER_NAME=$COMPILER_NAME
34961 
34962   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34963     # cc -V output typically looks like
34964     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34965     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34966     # Check that this is likely to be the Solaris Studio cc.
34967     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34968     if test $? -ne 0; then
34969       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34970       { $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
34971 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34972       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34973 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34974       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34975 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34976       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34977     fi
34978     # Remove usage instructions (if present), and
34979     # collapse compiler output into a single line
34980     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34981         $SED -e 's/ *[Uu]sage:.*//'`
34982     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34983         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34984   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34985     # xlc -qversion output typically looks like
34986     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34987     #     Version: 11.01.0000.0015
34988     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34989     # Check that this is likely to be the IBM XL C compiler.
34990     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34991     if test $? -ne 0; then
34992       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34993       { $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
34994 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34995       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34996 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34997       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34998 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34999       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35000     fi
35001     # Collapse compiler output into a single line
35002     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35003     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35004         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35005   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35006     # There is no specific version flag, but all output starts with a version string.
35007     # First line typically looks something like:
35008     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35009     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35010     # Check that this is likely to be Microsoft CL.EXE.
35011     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35012     if test $? -ne 0; then
35013       { $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
35014 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35015       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35016 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35017       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35018     fi
35019     # Collapse compiler output into a single line
35020     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35021     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35022         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35023   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35024     # gcc --version output typically looks like
35025     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35026     #     Copyright (C) 2013 Free Software Foundation, Inc.
35027     #     This is free software; see the source for copying conditions.  There is NO
35028     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35029     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35030     # Check that this is likely to be GCC.
35031     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35032     if test $? -ne 0; then
35033       { $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
35034 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35035       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35036 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35037       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35038     fi
35039     # Remove Copyright and legalese from version string, and
35040     # collapse into a single line
35041     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35042         $SED -e 's/ *Copyright .*//'`
35043     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35044         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35045   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35046     # clang --version output typically looks like
35047     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35048     #    clang version 3.3 (tags/RELEASE_33/final)
35049     # or
35050     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35051     #    Target: x86_64-pc-linux-gnu
35052     #    Thread model: posix
35053     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35054     # Check that this is likely to be clang
35055     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35056     if test $? -ne 0; then
35057       { $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
35058 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35059       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35060 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35061       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35062     fi
35063     # Collapse compiler output into a single line
35064     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35065     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35066         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35067   else
35068       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35069   fi
35070   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35071   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35072   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35073   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35074 
35075   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35076 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35077 
35078 
35079   # Now that we have resolved CXX ourself, let autoconf have its go at it
35080   ac_ext=cpp
35081 ac_cpp='$CXXCPP $CPPFLAGS'
35082 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35083 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35084 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35085 if test -z "$CXX"; then
35086   if test -n "$CCC"; then
35087     CXX=$CCC
35088   else
35089     if test -n "$ac_tool_prefix"; then
35090   for ac_prog in $CXX
35091   do
35092     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35093 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35095 $as_echo_n "checking for $ac_word... " >&6; }
35096 if ${ac_cv_prog_CXX+:} false; then :
35097   $as_echo_n "(cached) " >&6
35098 else
35099   if test -n "$CXX"; then
35100   ac_cv_prog_CXX="$CXX" # Let the user override the test.
35101 else
35102 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35103 for as_dir in $PATH
35104 do
35105   IFS=$as_save_IFS
35106   test -z "$as_dir" && as_dir=.
35107     for ac_exec_ext in '' $ac_executable_extensions; do
35108   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35109     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35110     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35111     break 2
35112   fi
35113 done
35114   done
35115 IFS=$as_save_IFS
35116 
35117 fi
35118 fi
35119 CXX=$ac_cv_prog_CXX
35120 if test -n "$CXX"; then
35121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35122 $as_echo "$CXX" >&6; }
35123 else
35124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35125 $as_echo "no" >&6; }
35126 fi
35127 
35128 
35129     test -n "$CXX" && break
35130   done
35131 fi
35132 if test -z "$CXX"; then
35133   ac_ct_CXX=$CXX
35134   for ac_prog in $CXX
35135 do
35136   # Extract the first word of "$ac_prog", so it can be a program name with args.
35137 set dummy $ac_prog; ac_word=$2
35138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35139 $as_echo_n "checking for $ac_word... " >&6; }
35140 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35141   $as_echo_n "(cached) " >&6
35142 else
35143   if test -n "$ac_ct_CXX"; then
35144   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35145 else
35146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35147 for as_dir in $PATH
35148 do
35149   IFS=$as_save_IFS
35150   test -z "$as_dir" && as_dir=.
35151     for ac_exec_ext in '' $ac_executable_extensions; do
35152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35153     ac_cv_prog_ac_ct_CXX="$ac_prog"
35154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35155     break 2
35156   fi
35157 done
35158   done
35159 IFS=$as_save_IFS
35160 
35161 fi
35162 fi
35163 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35164 if test -n "$ac_ct_CXX"; then
35165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35166 $as_echo "$ac_ct_CXX" >&6; }
35167 else
35168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35169 $as_echo "no" >&6; }
35170 fi
35171 
35172 
35173   test -n "$ac_ct_CXX" && break
35174 done
35175 
35176   if test "x$ac_ct_CXX" = x; then
35177     CXX="g++"
35178   else
35179     case $cross_compiling:$ac_tool_warned in
35180 yes:)
35181 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35182 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35183 ac_tool_warned=yes ;;
35184 esac
35185     CXX=$ac_ct_CXX
35186   fi
35187 fi
35188 
35189   fi
35190 fi
35191 # Provide some information about the compiler.
35192 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35193 set X $ac_compile
35194 ac_compiler=$2
35195 for ac_option in --version -v -V -qversion; do
35196   { { ac_try="$ac_compiler $ac_option >&5"
35197 case "(($ac_try" in
35198   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35199   *) ac_try_echo=$ac_try;;
35200 esac
35201 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35202 $as_echo "$ac_try_echo"; } >&5
35203   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35204   ac_status=$?
35205   if test -s conftest.err; then
35206     sed '10a\
35207 ... rest of stderr output deleted ...
35208          10q' conftest.err >conftest.er1
35209     cat conftest.er1 >&5
35210   fi
35211   rm -f conftest.er1 conftest.err
35212   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35213   test $ac_status = 0; }
35214 done
35215 
35216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35217 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35218 if ${ac_cv_cxx_compiler_gnu+:} false; then :
35219   $as_echo_n "(cached) " >&6
35220 else
35221   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35222 /* end confdefs.h.  */
35223 
35224 int
35225 main ()
35226 {
35227 #ifndef __GNUC__
35228        choke me
35229 #endif
35230 
35231   ;
35232   return 0;
35233 }
35234 _ACEOF
35235 if ac_fn_cxx_try_compile "$LINENO"; then :
35236   ac_compiler_gnu=yes
35237 else
35238   ac_compiler_gnu=no
35239 fi
35240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35241 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35242 
35243 fi
35244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35245 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35246 if test $ac_compiler_gnu = yes; then
35247   GXX=yes
35248 else
35249   GXX=
35250 fi
35251 ac_test_CXXFLAGS=${CXXFLAGS+set}
35252 ac_save_CXXFLAGS=$CXXFLAGS
35253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35254 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
35255 if ${ac_cv_prog_cxx_g+:} false; then :
35256   $as_echo_n "(cached) " >&6
35257 else
35258   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35259    ac_cxx_werror_flag=yes
35260    ac_cv_prog_cxx_g=no
35261    CXXFLAGS="-g"
35262    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35263 /* end confdefs.h.  */
35264 
35265 int
35266 main ()
35267 {
35268 
35269   ;
35270   return 0;
35271 }
35272 _ACEOF
35273 if ac_fn_cxx_try_compile "$LINENO"; then :
35274   ac_cv_prog_cxx_g=yes
35275 else
35276   CXXFLAGS=""
35277       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35278 /* end confdefs.h.  */
35279 
35280 int
35281 main ()
35282 {
35283 
35284   ;
35285   return 0;
35286 }
35287 _ACEOF
35288 if ac_fn_cxx_try_compile "$LINENO"; then :
35289 
35290 else
35291   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35292          CXXFLAGS="-g"
35293          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35294 /* end confdefs.h.  */
35295 
35296 int
35297 main ()
35298 {
35299 
35300   ;
35301   return 0;
35302 }
35303 _ACEOF
35304 if ac_fn_cxx_try_compile "$LINENO"; then :
35305   ac_cv_prog_cxx_g=yes
35306 fi
35307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35308 fi
35309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35310 fi
35311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35312    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35313 fi
35314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35315 $as_echo "$ac_cv_prog_cxx_g" >&6; }
35316 if test "$ac_test_CXXFLAGS" = set; then
35317   CXXFLAGS=$ac_save_CXXFLAGS
35318 elif test $ac_cv_prog_cxx_g = yes; then
35319   if test "$GXX" = yes; then
35320     CXXFLAGS="-g -O2"
35321   else
35322     CXXFLAGS="-g"
35323   fi
35324 else
35325   if test "$GXX" = yes; then
35326     CXXFLAGS="-O2"
35327   else
35328     CXXFLAGS=
35329   fi
35330 fi
35331 ac_ext=cpp
35332 ac_cpp='$CXXCPP $CPPFLAGS'
35333 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35334 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35335 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35336 
35337 
35338   # This is the compiler version number on the form X.Y[.Z]
35339 
35340 
35341 
35342 
35343   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35344     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35345 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35346     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35347 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35348   fi
35349 
35350   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35351   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35352     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35353 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35354   fi
35355 
35356   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35357     { $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
35358 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35359   fi
35360 
35361   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35362 
35363 
35364   if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35365 
35366 
35367 
35368 
35369 
35370 
35371 
35372 
35373 
35374 
35375 
35376 
35377 
35378 
35379 
35380 
35381 
35382 
35383 
35384 
35385 
35386 
35387 
35388 
35389 
35390 
35391 
35392 
35393 
35394 
35395 
35396 
35397 
35398 
35399 
35400 
35401 
35402 
35403 
35404 
35405 
35406 
35407 
35408 
35409 
35410 
35411 
35412 
35413 
35414     # Execute function body
35415 
35416   # Need to assign to a variable since m4 is blocked from modifying parts in [].
35417   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35418 
35419   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35420     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35421   fi
35422 
35423   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35424     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35425   fi
35426 
35427   # Version comparison method inspired by http://stackoverflow.com/a/24067243
35428   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35429 
35430   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35431     :
35432 
35433   else
35434     :
35435 
35436           { $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
35437 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35438 
35439 
35440   fi
35441 
35442 
35443 
35444 
35445 
35446 
35447 
35448 
35449 
35450 
35451 
35452 
35453 
35454 
35455   fi
35456 
35457   #
35458   # Setup the preprocessor (CPP and CXXCPP)
35459   #
35460   ac_ext=c
35461 ac_cpp='$CPP $CPPFLAGS'
35462 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35463 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35464 ac_compiler_gnu=$ac_cv_c_compiler_gnu
35465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35466 $as_echo_n "checking how to run the C preprocessor... " >&6; }
35467 # On Suns, sometimes $CPP names a directory.
35468 if test -n "$CPP" && test -d "$CPP"; then
35469   CPP=
35470 fi
35471 if test -z "$CPP"; then
35472   if ${ac_cv_prog_CPP+:} false; then :
35473   $as_echo_n "(cached) " >&6
35474 else
35475       # Double quotes because CPP needs to be expanded
35476     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35477     do
35478       ac_preproc_ok=false
35479 for ac_c_preproc_warn_flag in '' yes
35480 do
35481   # Use a header file that comes with gcc, so configuring glibc
35482   # with a fresh cross-compiler works.
35483   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35484   # <limits.h> exists even on freestanding compilers.
35485   # On the NeXT, cc -E runs the code through the compiler's parser,
35486   # not just through cpp. "Syntax error" is here to catch this case.
35487   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35488 /* end confdefs.h.  */
35489 #ifdef __STDC__
35490 # include <limits.h>
35491 #else
35492 # include <assert.h>
35493 #endif
35494                      Syntax error
35495 _ACEOF
35496 if ac_fn_c_try_cpp "$LINENO"; then :
35497 
35498 else
35499   # Broken: fails on valid input.
35500 continue
35501 fi
35502 rm -f conftest.err conftest.i conftest.$ac_ext
35503 
35504   # OK, works on sane cases.  Now check whether nonexistent headers
35505   # can be detected and how.
35506   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35507 /* end confdefs.h.  */
35508 #include <ac_nonexistent.h>
35509 _ACEOF
35510 if ac_fn_c_try_cpp "$LINENO"; then :
35511   # Broken: success on invalid input.
35512 continue
35513 else
35514   # Passes both tests.
35515 ac_preproc_ok=:
35516 break
35517 fi
35518 rm -f conftest.err conftest.i conftest.$ac_ext
35519 
35520 done
35521 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35522 rm -f conftest.i conftest.err conftest.$ac_ext
35523 if $ac_preproc_ok; then :
35524   break
35525 fi
35526 
35527     done
35528     ac_cv_prog_CPP=$CPP
35529 
35530 fi
35531   CPP=$ac_cv_prog_CPP
35532 else
35533   ac_cv_prog_CPP=$CPP
35534 fi
35535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35536 $as_echo "$CPP" >&6; }
35537 ac_preproc_ok=false
35538 for ac_c_preproc_warn_flag in '' yes
35539 do
35540   # Use a header file that comes with gcc, so configuring glibc
35541   # with a fresh cross-compiler works.
35542   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35543   # <limits.h> exists even on freestanding compilers.
35544   # On the NeXT, cc -E runs the code through the compiler's parser,
35545   # not just through cpp. "Syntax error" is here to catch this case.
35546   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35547 /* end confdefs.h.  */
35548 #ifdef __STDC__
35549 # include <limits.h>
35550 #else
35551 # include <assert.h>
35552 #endif
35553                      Syntax error
35554 _ACEOF
35555 if ac_fn_c_try_cpp "$LINENO"; then :
35556 
35557 else
35558   # Broken: fails on valid input.
35559 continue
35560 fi
35561 rm -f conftest.err conftest.i conftest.$ac_ext
35562 
35563   # OK, works on sane cases.  Now check whether nonexistent headers
35564   # can be detected and how.
35565   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35566 /* end confdefs.h.  */
35567 #include <ac_nonexistent.h>
35568 _ACEOF
35569 if ac_fn_c_try_cpp "$LINENO"; then :
35570   # Broken: success on invalid input.
35571 continue
35572 else
35573   # Passes both tests.
35574 ac_preproc_ok=:
35575 break
35576 fi
35577 rm -f conftest.err conftest.i conftest.$ac_ext
35578 
35579 done
35580 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35581 rm -f conftest.i conftest.err conftest.$ac_ext
35582 if $ac_preproc_ok; then :
35583 
35584 else
35585   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35586 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35587 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35588 See \`config.log' for more details" "$LINENO" 5; }
35589 fi
35590 
35591 ac_ext=cpp
35592 ac_cpp='$CXXCPP $CPPFLAGS'
35593 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35594 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35595 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35596 
35597 
35598   # Only process if variable expands to non-empty
35599 
35600   if test "x$CPP" != x; then
35601     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35602 
35603   # First separate the path from the arguments. This will split at the first
35604   # space.
35605   complete="$CPP"
35606   path="${complete%% *}"
35607   tmp="$complete EOL"
35608   arguments="${tmp#* }"
35609 
35610   # Input might be given as Windows format, start by converting to
35611   # unix format.
35612   new_path=`$CYGPATH -u "$path"`
35613 
35614   # Now try to locate executable using which
35615   new_path=`$WHICH "$new_path" 2> /dev/null`
35616   # bat and cmd files are not always considered executable in cygwin causing which
35617   # to not find them
35618   if test "x$new_path" = x \
35619       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35620       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35621     new_path=`$CYGPATH -u "$path"`
35622   fi
35623   if test "x$new_path" = x; then
35624     # Oops. Which didn't find the executable.
35625     # The splitting of arguments from the executable at a space might have been incorrect,
35626     # since paths with space are more likely in Windows. Give it another try with the whole
35627     # argument.
35628     path="$complete"
35629     arguments="EOL"
35630     new_path=`$CYGPATH -u "$path"`
35631     new_path=`$WHICH "$new_path" 2> /dev/null`
35632     # bat and cmd files are not always considered executable in cygwin causing which
35633     # to not find them
35634     if test "x$new_path" = x \
35635         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35636         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35637       new_path=`$CYGPATH -u "$path"`
35638     fi
35639     if test "x$new_path" = x; then
35640       # It's still not found. Now this is an unrecoverable error.
35641       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35642 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35643       has_space=`$ECHO "$complete" | $GREP " "`
35644       if test "x$has_space" != x; then
35645         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35646 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35647       fi
35648       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35649     fi
35650   fi
35651 
35652   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35653   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35654   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35655   # "foo.exe" is OK but "foo" is an error.
35656   #
35657   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35658   # It is also a way to make sure we got the proper file name for the real test later on.
35659   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35660   if test "x$test_shortpath" = x; then
35661     # Short path failed, file does not exist as specified.
35662     # Try adding .exe or .cmd
35663     if test -f "${new_path}.exe"; then
35664       input_to_shortpath="${new_path}.exe"
35665     elif test -f "${new_path}.cmd"; then
35666       input_to_shortpath="${new_path}.cmd"
35667     else
35668       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35669 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35670       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35671 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35672       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35673     fi
35674   else
35675     input_to_shortpath="$new_path"
35676   fi
35677 
35678   # Call helper function which possibly converts this using DOS-style short mode.
35679   # If so, the updated path is stored in $new_path.
35680   new_path="$input_to_shortpath"
35681 
35682   input_path="$input_to_shortpath"
35683   # Check if we need to convert this using DOS-style short mode. If the path
35684   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35685   # take no chances and rewrite it.
35686   # Note: m4 eats our [], so we need to use [ and ] instead.
35687   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35688   if test "x$has_forbidden_chars" != x; then
35689     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35690     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35691     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35692     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35693       # Going to short mode and back again did indeed matter. Since short mode is
35694       # case insensitive, let's make it lowercase to improve readability.
35695       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35696       # Now convert it back to Unix-style (cygpath)
35697       input_path=`$CYGPATH -u "$shortmode_path"`
35698       new_path="$input_path"
35699     fi
35700   fi
35701 
35702   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35703   if test "x$test_cygdrive_prefix" = x; then
35704     # As a simple fix, exclude /usr/bin since it's not a real path.
35705     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35706       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35707       # a path prefixed by /cygdrive for fixpath to work.
35708       new_path="$CYGWIN_ROOT_PATH$input_path"
35709     fi
35710   fi
35711 
35712   # remove trailing .exe if any
35713   new_path="${new_path/%.exe/}"
35714 
35715     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35716 
35717   # First separate the path from the arguments. This will split at the first
35718   # space.
35719   complete="$CPP"
35720   path="${complete%% *}"
35721   tmp="$complete EOL"
35722   arguments="${tmp#* }"
35723 
35724   # Input might be given as Windows format, start by converting to
35725   # unix format.
35726   new_path="$path"
35727 
35728   windows_path="$new_path"
35729   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35730     unix_path=`$CYGPATH -u "$windows_path"`
35731     new_path="$unix_path"
35732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35733     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35734     new_path="$unix_path"
35735   fi
35736 
35737 
35738   # Now try to locate executable using which
35739   new_path=`$WHICH "$new_path" 2> /dev/null`
35740 
35741   if test "x$new_path" = x; then
35742     # Oops. Which didn't find the executable.
35743     # The splitting of arguments from the executable at a space might have been incorrect,
35744     # since paths with space are more likely in Windows. Give it another try with the whole
35745     # argument.
35746     path="$complete"
35747     arguments="EOL"
35748     new_path="$path"
35749 
35750   windows_path="$new_path"
35751   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35752     unix_path=`$CYGPATH -u "$windows_path"`
35753     new_path="$unix_path"
35754   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35755     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35756     new_path="$unix_path"
35757   fi
35758 
35759 
35760     new_path=`$WHICH "$new_path" 2> /dev/null`
35761     # bat and cmd files are not always considered executable in MSYS causing which
35762     # to not find them
35763     if test "x$new_path" = x \
35764         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35765         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35766       new_path="$path"
35767 
35768   windows_path="$new_path"
35769   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35770     unix_path=`$CYGPATH -u "$windows_path"`
35771     new_path="$unix_path"
35772   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35773     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35774     new_path="$unix_path"
35775   fi
35776 
35777     fi
35778 
35779     if test "x$new_path" = x; then
35780       # It's still not found. Now this is an unrecoverable error.
35781       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35782 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35783       has_space=`$ECHO "$complete" | $GREP " "`
35784       if test "x$has_space" != x; then
35785         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35786 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35787       fi
35788       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35789     fi
35790   fi
35791 
35792   # Now new_path has a complete unix path to the binary
35793   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35794     # Keep paths in /bin as-is, but remove trailing .exe if any
35795     new_path="${new_path/%.exe/}"
35796     # Do not save /bin paths to all_fixpath_prefixes!
35797   else
35798     # Not in mixed or Windows style, start by that.
35799     new_path=`cmd //c echo $new_path`
35800 
35801   input_path="$new_path"
35802   # Check if we need to convert this using DOS-style short mode. If the path
35803   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35804   # take no chances and rewrite it.
35805   # Note: m4 eats our [], so we need to use [ and ] instead.
35806   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35807   if test "x$has_forbidden_chars" != x; then
35808     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35809     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35810   fi
35811 
35812     # Output is in $new_path
35813 
35814   windows_path="$new_path"
35815   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35816     unix_path=`$CYGPATH -u "$windows_path"`
35817     new_path="$unix_path"
35818   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35819     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35820     new_path="$unix_path"
35821   fi
35822 
35823     # remove trailing .exe if any
35824     new_path="${new_path/%.exe/}"
35825 
35826     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35827     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35828   fi
35829 
35830     else
35831       # We're on a unix platform. Hooray! :)
35832       # First separate the path from the arguments. This will split at the first
35833       # space.
35834       complete="$CPP"
35835       path="${complete%% *}"
35836       tmp="$complete EOL"
35837       arguments="${tmp#* }"
35838 
35839       # Cannot rely on the command "which" here since it doesn't always work.
35840       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35841       if test -z "$is_absolute_path"; then
35842         # Path to executable is not absolute. Find it.
35843         IFS_save="$IFS"
35844         IFS=:
35845         for p in $PATH; do
35846           if test -f "$p/$path" && test -x "$p/$path"; then
35847             new_path="$p/$path"
35848             break
35849           fi
35850         done
35851         IFS="$IFS_save"
35852       else
35853         # This is an absolute path, we can use it without further modifications.
35854         new_path="$path"
35855       fi
35856 
35857       if test "x$new_path" = x; then
35858         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35859 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35860         has_space=`$ECHO "$complete" | $GREP " "`
35861         if test "x$has_space" != x; then
35862           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35863 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35864         fi
35865         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35866       fi
35867     fi
35868 
35869     # Now join together the path and the arguments once again
35870     if test "x$arguments" != xEOL; then
35871       new_complete="$new_path ${arguments% *}"
35872     else
35873       new_complete="$new_path"
35874     fi
35875 
35876     if test "x$complete" != "x$new_complete"; then
35877       CPP="$new_complete"
35878       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35879 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35880     fi
35881   fi
35882 
35883   ac_ext=cpp
35884 ac_cpp='$CXXCPP $CPPFLAGS'
35885 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35886 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35887 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35889 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35890 if test -z "$CXXCPP"; then
35891   if ${ac_cv_prog_CXXCPP+:} false; then :
35892   $as_echo_n "(cached) " >&6
35893 else
35894       # Double quotes because CXXCPP needs to be expanded
35895     for CXXCPP in "$CXX -E" "/lib/cpp"
35896     do
35897       ac_preproc_ok=false
35898 for ac_cxx_preproc_warn_flag in '' yes
35899 do
35900   # Use a header file that comes with gcc, so configuring glibc
35901   # with a fresh cross-compiler works.
35902   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35903   # <limits.h> exists even on freestanding compilers.
35904   # On the NeXT, cc -E runs the code through the compiler's parser,
35905   # not just through cpp. "Syntax error" is here to catch this case.
35906   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35907 /* end confdefs.h.  */
35908 #ifdef __STDC__
35909 # include <limits.h>
35910 #else
35911 # include <assert.h>
35912 #endif
35913                      Syntax error
35914 _ACEOF
35915 if ac_fn_cxx_try_cpp "$LINENO"; then :
35916 
35917 else
35918   # Broken: fails on valid input.
35919 continue
35920 fi
35921 rm -f conftest.err conftest.i conftest.$ac_ext
35922 
35923   # OK, works on sane cases.  Now check whether nonexistent headers
35924   # can be detected and how.
35925   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35926 /* end confdefs.h.  */
35927 #include <ac_nonexistent.h>
35928 _ACEOF
35929 if ac_fn_cxx_try_cpp "$LINENO"; then :
35930   # Broken: success on invalid input.
35931 continue
35932 else
35933   # Passes both tests.
35934 ac_preproc_ok=:
35935 break
35936 fi
35937 rm -f conftest.err conftest.i conftest.$ac_ext
35938 
35939 done
35940 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35941 rm -f conftest.i conftest.err conftest.$ac_ext
35942 if $ac_preproc_ok; then :
35943   break
35944 fi
35945 
35946     done
35947     ac_cv_prog_CXXCPP=$CXXCPP
35948 
35949 fi
35950   CXXCPP=$ac_cv_prog_CXXCPP
35951 else
35952   ac_cv_prog_CXXCPP=$CXXCPP
35953 fi
35954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35955 $as_echo "$CXXCPP" >&6; }
35956 ac_preproc_ok=false
35957 for ac_cxx_preproc_warn_flag in '' yes
35958 do
35959   # Use a header file that comes with gcc, so configuring glibc
35960   # with a fresh cross-compiler works.
35961   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35962   # <limits.h> exists even on freestanding compilers.
35963   # On the NeXT, cc -E runs the code through the compiler's parser,
35964   # not just through cpp. "Syntax error" is here to catch this case.
35965   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35966 /* end confdefs.h.  */
35967 #ifdef __STDC__
35968 # include <limits.h>
35969 #else
35970 # include <assert.h>
35971 #endif
35972                      Syntax error
35973 _ACEOF
35974 if ac_fn_cxx_try_cpp "$LINENO"; then :
35975 
35976 else
35977   # Broken: fails on valid input.
35978 continue
35979 fi
35980 rm -f conftest.err conftest.i conftest.$ac_ext
35981 
35982   # OK, works on sane cases.  Now check whether nonexistent headers
35983   # can be detected and how.
35984   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35985 /* end confdefs.h.  */
35986 #include <ac_nonexistent.h>
35987 _ACEOF
35988 if ac_fn_cxx_try_cpp "$LINENO"; then :
35989   # Broken: success on invalid input.
35990 continue
35991 else
35992   # Passes both tests.
35993 ac_preproc_ok=:
35994 break
35995 fi
35996 rm -f conftest.err conftest.i conftest.$ac_ext
35997 
35998 done
35999 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36000 rm -f conftest.i conftest.err conftest.$ac_ext
36001 if $ac_preproc_ok; then :
36002 
36003 else
36004   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36005 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36006 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36007 See \`config.log' for more details" "$LINENO" 5; }
36008 fi
36009 
36010 ac_ext=cpp
36011 ac_cpp='$CXXCPP $CPPFLAGS'
36012 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36013 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36014 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36015 
36016 
36017   # Only process if variable expands to non-empty
36018 
36019   if test "x$CXXCPP" != x; then
36020     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36021 
36022   # First separate the path from the arguments. This will split at the first
36023   # space.
36024   complete="$CXXCPP"
36025   path="${complete%% *}"
36026   tmp="$complete EOL"
36027   arguments="${tmp#* }"
36028 
36029   # Input might be given as Windows format, start by converting to
36030   # unix format.
36031   new_path=`$CYGPATH -u "$path"`
36032 
36033   # Now try to locate executable using which
36034   new_path=`$WHICH "$new_path" 2> /dev/null`
36035   # bat and cmd files are not always considered executable in cygwin causing which
36036   # to not find them
36037   if test "x$new_path" = x \
36038       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36039       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36040     new_path=`$CYGPATH -u "$path"`
36041   fi
36042   if test "x$new_path" = x; then
36043     # Oops. Which didn't find the executable.
36044     # The splitting of arguments from the executable at a space might have been incorrect,
36045     # since paths with space are more likely in Windows. Give it another try with the whole
36046     # argument.
36047     path="$complete"
36048     arguments="EOL"
36049     new_path=`$CYGPATH -u "$path"`
36050     new_path=`$WHICH "$new_path" 2> /dev/null`
36051     # bat and cmd files are not always considered executable in cygwin causing which
36052     # to not find them
36053     if test "x$new_path" = x \
36054         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36055         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36056       new_path=`$CYGPATH -u "$path"`
36057     fi
36058     if test "x$new_path" = x; then
36059       # It's still not found. Now this is an unrecoverable error.
36060       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36061 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36062       has_space=`$ECHO "$complete" | $GREP " "`
36063       if test "x$has_space" != x; then
36064         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36065 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36066       fi
36067       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36068     fi
36069   fi
36070 
36071   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36072   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36073   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36074   # "foo.exe" is OK but "foo" is an error.
36075   #
36076   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36077   # It is also a way to make sure we got the proper file name for the real test later on.
36078   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36079   if test "x$test_shortpath" = x; then
36080     # Short path failed, file does not exist as specified.
36081     # Try adding .exe or .cmd
36082     if test -f "${new_path}.exe"; then
36083       input_to_shortpath="${new_path}.exe"
36084     elif test -f "${new_path}.cmd"; then
36085       input_to_shortpath="${new_path}.cmd"
36086     else
36087       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36088 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36089       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36090 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36091       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36092     fi
36093   else
36094     input_to_shortpath="$new_path"
36095   fi
36096 
36097   # Call helper function which possibly converts this using DOS-style short mode.
36098   # If so, the updated path is stored in $new_path.
36099   new_path="$input_to_shortpath"
36100 
36101   input_path="$input_to_shortpath"
36102   # Check if we need to convert this using DOS-style short mode. If the path
36103   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36104   # take no chances and rewrite it.
36105   # Note: m4 eats our [], so we need to use [ and ] instead.
36106   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36107   if test "x$has_forbidden_chars" != x; then
36108     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36109     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36110     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36111     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36112       # Going to short mode and back again did indeed matter. Since short mode is
36113       # case insensitive, let's make it lowercase to improve readability.
36114       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36115       # Now convert it back to Unix-style (cygpath)
36116       input_path=`$CYGPATH -u "$shortmode_path"`
36117       new_path="$input_path"
36118     fi
36119   fi
36120 
36121   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36122   if test "x$test_cygdrive_prefix" = x; then
36123     # As a simple fix, exclude /usr/bin since it's not a real path.
36124     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36125       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36126       # a path prefixed by /cygdrive for fixpath to work.
36127       new_path="$CYGWIN_ROOT_PATH$input_path"
36128     fi
36129   fi
36130 
36131   # remove trailing .exe if any
36132   new_path="${new_path/%.exe/}"
36133 
36134     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36135 
36136   # First separate the path from the arguments. This will split at the first
36137   # space.
36138   complete="$CXXCPP"
36139   path="${complete%% *}"
36140   tmp="$complete EOL"
36141   arguments="${tmp#* }"
36142 
36143   # Input might be given as Windows format, start by converting to
36144   # unix format.
36145   new_path="$path"
36146 
36147   windows_path="$new_path"
36148   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36149     unix_path=`$CYGPATH -u "$windows_path"`
36150     new_path="$unix_path"
36151   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36152     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36153     new_path="$unix_path"
36154   fi
36155 
36156 
36157   # Now try to locate executable using which
36158   new_path=`$WHICH "$new_path" 2> /dev/null`
36159 
36160   if test "x$new_path" = x; then
36161     # Oops. Which didn't find the executable.
36162     # The splitting of arguments from the executable at a space might have been incorrect,
36163     # since paths with space are more likely in Windows. Give it another try with the whole
36164     # argument.
36165     path="$complete"
36166     arguments="EOL"
36167     new_path="$path"
36168 
36169   windows_path="$new_path"
36170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36171     unix_path=`$CYGPATH -u "$windows_path"`
36172     new_path="$unix_path"
36173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36174     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36175     new_path="$unix_path"
36176   fi
36177 
36178 
36179     new_path=`$WHICH "$new_path" 2> /dev/null`
36180     # bat and cmd files are not always considered executable in MSYS causing which
36181     # to not find them
36182     if test "x$new_path" = x \
36183         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36184         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36185       new_path="$path"
36186 
36187   windows_path="$new_path"
36188   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36189     unix_path=`$CYGPATH -u "$windows_path"`
36190     new_path="$unix_path"
36191   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36192     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36193     new_path="$unix_path"
36194   fi
36195 
36196     fi
36197 
36198     if test "x$new_path" = x; then
36199       # It's still not found. Now this is an unrecoverable error.
36200       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36201 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36202       has_space=`$ECHO "$complete" | $GREP " "`
36203       if test "x$has_space" != x; then
36204         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36205 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36206       fi
36207       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36208     fi
36209   fi
36210 
36211   # Now new_path has a complete unix path to the binary
36212   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36213     # Keep paths in /bin as-is, but remove trailing .exe if any
36214     new_path="${new_path/%.exe/}"
36215     # Do not save /bin paths to all_fixpath_prefixes!
36216   else
36217     # Not in mixed or Windows style, start by that.
36218     new_path=`cmd //c echo $new_path`
36219 
36220   input_path="$new_path"
36221   # Check if we need to convert this using DOS-style short mode. If the path
36222   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36223   # take no chances and rewrite it.
36224   # Note: m4 eats our [], so we need to use [ and ] instead.
36225   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36226   if test "x$has_forbidden_chars" != x; then
36227     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36228     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36229   fi
36230 
36231     # Output is in $new_path
36232 
36233   windows_path="$new_path"
36234   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36235     unix_path=`$CYGPATH -u "$windows_path"`
36236     new_path="$unix_path"
36237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36238     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36239     new_path="$unix_path"
36240   fi
36241 
36242     # remove trailing .exe if any
36243     new_path="${new_path/%.exe/}"
36244 
36245     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36246     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36247   fi
36248 
36249     else
36250       # We're on a unix platform. Hooray! :)
36251       # First separate the path from the arguments. This will split at the first
36252       # space.
36253       complete="$CXXCPP"
36254       path="${complete%% *}"
36255       tmp="$complete EOL"
36256       arguments="${tmp#* }"
36257 
36258       # Cannot rely on the command "which" here since it doesn't always work.
36259       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36260       if test -z "$is_absolute_path"; then
36261         # Path to executable is not absolute. Find it.
36262         IFS_save="$IFS"
36263         IFS=:
36264         for p in $PATH; do
36265           if test -f "$p/$path" && test -x "$p/$path"; then
36266             new_path="$p/$path"
36267             break
36268           fi
36269         done
36270         IFS="$IFS_save"
36271       else
36272         # This is an absolute path, we can use it without further modifications.
36273         new_path="$path"
36274       fi
36275 
36276       if test "x$new_path" = x; then
36277         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36278 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36279         has_space=`$ECHO "$complete" | $GREP " "`
36280         if test "x$has_space" != x; then
36281           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36282 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36283         fi
36284         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36285       fi
36286     fi
36287 
36288     # Now join together the path and the arguments once again
36289     if test "x$arguments" != xEOL; then
36290       new_complete="$new_path ${arguments% *}"
36291     else
36292       new_complete="$new_path"
36293     fi
36294 
36295     if test "x$complete" != "x$new_complete"; then
36296       CXXCPP="$new_complete"
36297       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36298 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36299     fi
36300   fi
36301 
36302 
36303   #
36304   # Setup the linker (LD)
36305   #
36306   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36307     # In the Microsoft toolchain we have a separate LD command "link".
36308     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36309     # a cygwin program for something completely different.
36310     # Extract the first word of "link", so it can be a program name with args.
36311 set dummy link; ac_word=$2
36312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36313 $as_echo_n "checking for $ac_word... " >&6; }
36314 if ${ac_cv_prog_LD+:} false; then :
36315   $as_echo_n "(cached) " >&6
36316 else
36317   if test -n "$LD"; then
36318   ac_cv_prog_LD="$LD" # Let the user override the test.
36319 else
36320   ac_prog_rejected=no
36321 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36322 for as_dir in $PATH
36323 do
36324   IFS=$as_save_IFS
36325   test -z "$as_dir" && as_dir=.
36326     for ac_exec_ext in '' $ac_executable_extensions; do
36327   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36328     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36329        ac_prog_rejected=yes
36330        continue
36331      fi
36332     ac_cv_prog_LD="link"
36333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36334     break 2
36335   fi
36336 done
36337   done
36338 IFS=$as_save_IFS
36339 
36340 if test $ac_prog_rejected = yes; then
36341   # We found a bogon in the path, so make sure we never use it.
36342   set dummy $ac_cv_prog_LD
36343   shift
36344   if test $# != 0; then
36345     # We chose a different compiler from the bogus one.
36346     # However, it has the same basename, so the bogon will be chosen
36347     # first if we set LD to just the basename; use the full file name.
36348     shift
36349     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36350   fi
36351 fi
36352 fi
36353 fi
36354 LD=$ac_cv_prog_LD
36355 if test -n "$LD"; then
36356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36357 $as_echo "$LD" >&6; }
36358 else
36359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36360 $as_echo "no" >&6; }
36361 fi
36362 
36363 
36364 
36365   # Only process if variable expands to non-empty
36366 
36367   if test "x$LD" != x; then
36368     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36369 
36370   # First separate the path from the arguments. This will split at the first
36371   # space.
36372   complete="$LD"
36373   path="${complete%% *}"
36374   tmp="$complete EOL"
36375   arguments="${tmp#* }"
36376 
36377   # Input might be given as Windows format, start by converting to
36378   # unix format.
36379   new_path=`$CYGPATH -u "$path"`
36380 
36381   # Now try to locate executable using which
36382   new_path=`$WHICH "$new_path" 2> /dev/null`
36383   # bat and cmd files are not always considered executable in cygwin causing which
36384   # to not find them
36385   if test "x$new_path" = x \
36386       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36387       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36388     new_path=`$CYGPATH -u "$path"`
36389   fi
36390   if test "x$new_path" = x; then
36391     # Oops. Which didn't find the executable.
36392     # The splitting of arguments from the executable at a space might have been incorrect,
36393     # since paths with space are more likely in Windows. Give it another try with the whole
36394     # argument.
36395     path="$complete"
36396     arguments="EOL"
36397     new_path=`$CYGPATH -u "$path"`
36398     new_path=`$WHICH "$new_path" 2> /dev/null`
36399     # bat and cmd files are not always considered executable in cygwin causing which
36400     # to not find them
36401     if test "x$new_path" = x \
36402         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36403         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36404       new_path=`$CYGPATH -u "$path"`
36405     fi
36406     if test "x$new_path" = x; then
36407       # It's still not found. Now this is an unrecoverable error.
36408       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36409 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36410       has_space=`$ECHO "$complete" | $GREP " "`
36411       if test "x$has_space" != x; then
36412         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36413 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36414       fi
36415       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36416     fi
36417   fi
36418 
36419   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36420   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36421   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36422   # "foo.exe" is OK but "foo" is an error.
36423   #
36424   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36425   # It is also a way to make sure we got the proper file name for the real test later on.
36426   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36427   if test "x$test_shortpath" = x; then
36428     # Short path failed, file does not exist as specified.
36429     # Try adding .exe or .cmd
36430     if test -f "${new_path}.exe"; then
36431       input_to_shortpath="${new_path}.exe"
36432     elif test -f "${new_path}.cmd"; then
36433       input_to_shortpath="${new_path}.cmd"
36434     else
36435       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36436 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36437       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36438 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36439       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36440     fi
36441   else
36442     input_to_shortpath="$new_path"
36443   fi
36444 
36445   # Call helper function which possibly converts this using DOS-style short mode.
36446   # If so, the updated path is stored in $new_path.
36447   new_path="$input_to_shortpath"
36448 
36449   input_path="$input_to_shortpath"
36450   # Check if we need to convert this using DOS-style short mode. If the path
36451   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36452   # take no chances and rewrite it.
36453   # Note: m4 eats our [], so we need to use [ and ] instead.
36454   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36455   if test "x$has_forbidden_chars" != x; then
36456     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36457     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36458     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36459     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36460       # Going to short mode and back again did indeed matter. Since short mode is
36461       # case insensitive, let's make it lowercase to improve readability.
36462       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36463       # Now convert it back to Unix-style (cygpath)
36464       input_path=`$CYGPATH -u "$shortmode_path"`
36465       new_path="$input_path"
36466     fi
36467   fi
36468 
36469   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36470   if test "x$test_cygdrive_prefix" = x; then
36471     # As a simple fix, exclude /usr/bin since it's not a real path.
36472     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36473       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36474       # a path prefixed by /cygdrive for fixpath to work.
36475       new_path="$CYGWIN_ROOT_PATH$input_path"
36476     fi
36477   fi
36478 
36479   # remove trailing .exe if any
36480   new_path="${new_path/%.exe/}"
36481 
36482     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36483 
36484   # First separate the path from the arguments. This will split at the first
36485   # space.
36486   complete="$LD"
36487   path="${complete%% *}"
36488   tmp="$complete EOL"
36489   arguments="${tmp#* }"
36490 
36491   # Input might be given as Windows format, start by converting to
36492   # unix format.
36493   new_path="$path"
36494 
36495   windows_path="$new_path"
36496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36497     unix_path=`$CYGPATH -u "$windows_path"`
36498     new_path="$unix_path"
36499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36500     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36501     new_path="$unix_path"
36502   fi
36503 
36504 
36505   # Now try to locate executable using which
36506   new_path=`$WHICH "$new_path" 2> /dev/null`
36507 
36508   if test "x$new_path" = x; then
36509     # Oops. Which didn't find the executable.
36510     # The splitting of arguments from the executable at a space might have been incorrect,
36511     # since paths with space are more likely in Windows. Give it another try with the whole
36512     # argument.
36513     path="$complete"
36514     arguments="EOL"
36515     new_path="$path"
36516 
36517   windows_path="$new_path"
36518   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36519     unix_path=`$CYGPATH -u "$windows_path"`
36520     new_path="$unix_path"
36521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36522     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36523     new_path="$unix_path"
36524   fi
36525 
36526 
36527     new_path=`$WHICH "$new_path" 2> /dev/null`
36528     # bat and cmd files are not always considered executable in MSYS causing which
36529     # to not find them
36530     if test "x$new_path" = x \
36531         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36532         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36533       new_path="$path"
36534 
36535   windows_path="$new_path"
36536   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36537     unix_path=`$CYGPATH -u "$windows_path"`
36538     new_path="$unix_path"
36539   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36540     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36541     new_path="$unix_path"
36542   fi
36543 
36544     fi
36545 
36546     if test "x$new_path" = x; then
36547       # It's still not found. Now this is an unrecoverable error.
36548       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36549 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36550       has_space=`$ECHO "$complete" | $GREP " "`
36551       if test "x$has_space" != x; then
36552         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36553 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36554       fi
36555       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36556     fi
36557   fi
36558 
36559   # Now new_path has a complete unix path to the binary
36560   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36561     # Keep paths in /bin as-is, but remove trailing .exe if any
36562     new_path="${new_path/%.exe/}"
36563     # Do not save /bin paths to all_fixpath_prefixes!
36564   else
36565     # Not in mixed or Windows style, start by that.
36566     new_path=`cmd //c echo $new_path`
36567 
36568   input_path="$new_path"
36569   # Check if we need to convert this using DOS-style short mode. If the path
36570   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36571   # take no chances and rewrite it.
36572   # Note: m4 eats our [], so we need to use [ and ] instead.
36573   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36574   if test "x$has_forbidden_chars" != x; then
36575     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36576     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36577   fi
36578 
36579     # Output is in $new_path
36580 
36581   windows_path="$new_path"
36582   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36583     unix_path=`$CYGPATH -u "$windows_path"`
36584     new_path="$unix_path"
36585   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36586     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36587     new_path="$unix_path"
36588   fi
36589 
36590     # remove trailing .exe if any
36591     new_path="${new_path/%.exe/}"
36592 
36593     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36594     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36595   fi
36596 
36597     else
36598       # We're on a unix platform. Hooray! :)
36599       # First separate the path from the arguments. This will split at the first
36600       # space.
36601       complete="$LD"
36602       path="${complete%% *}"
36603       tmp="$complete EOL"
36604       arguments="${tmp#* }"
36605 
36606       # Cannot rely on the command "which" here since it doesn't always work.
36607       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36608       if test -z "$is_absolute_path"; then
36609         # Path to executable is not absolute. Find it.
36610         IFS_save="$IFS"
36611         IFS=:
36612         for p in $PATH; do
36613           if test -f "$p/$path" && test -x "$p/$path"; then
36614             new_path="$p/$path"
36615             break
36616           fi
36617         done
36618         IFS="$IFS_save"
36619       else
36620         # This is an absolute path, we can use it without further modifications.
36621         new_path="$path"
36622       fi
36623 
36624       if test "x$new_path" = x; then
36625         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36626 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36627         has_space=`$ECHO "$complete" | $GREP " "`
36628         if test "x$has_space" != x; then
36629           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36630 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36631         fi
36632         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36633       fi
36634     fi
36635 
36636     # Now join together the path and the arguments once again
36637     if test "x$arguments" != xEOL; then
36638       new_complete="$new_path ${arguments% *}"
36639     else
36640       new_complete="$new_path"
36641     fi
36642 
36643     if test "x$complete" != "x$new_complete"; then
36644       LD="$new_complete"
36645       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36646 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36647     fi
36648   fi
36649 
36650     # Verify that we indeed succeeded with this trick.
36651     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36652 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36653     "$LD" --version > /dev/null
36654     if test $? -eq 0 ; then
36655       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36656 $as_echo "no" >&6; }
36657       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36658     else
36659       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36660 $as_echo "yes" >&6; }
36661     fi
36662     LDCXX="$LD"
36663   else
36664     # All other toolchains use the compiler to link.
36665     LD="$CC"
36666     LDCXX="$CXX"
36667   fi
36668 
36669   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36670 
36671 
36672   #
36673   # Setup the assembler (AS)
36674   #
36675   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36676 
36677 
36678   # Publish this variable in the help.
36679 
36680 
36681   if [ -z "${AS+x}" ]; then
36682     # The variable is not set by user, try to locate tool using the code snippet
36683     for ac_prog in as
36684 do
36685   # Extract the first word of "$ac_prog", so it can be a program name with args.
36686 set dummy $ac_prog; ac_word=$2
36687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36688 $as_echo_n "checking for $ac_word... " >&6; }
36689 if ${ac_cv_path_AS+:} false; then :
36690   $as_echo_n "(cached) " >&6
36691 else
36692   case $AS in
36693   [\\/]* | ?:[\\/]*)
36694   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36695   ;;
36696   *)
36697   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36698 for as_dir in $PATH
36699 do
36700   IFS=$as_save_IFS
36701   test -z "$as_dir" && as_dir=.
36702     for ac_exec_ext in '' $ac_executable_extensions; do
36703   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36704     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36705     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36706     break 2
36707   fi
36708 done
36709   done
36710 IFS=$as_save_IFS
36711 
36712   ;;
36713 esac
36714 fi
36715 AS=$ac_cv_path_AS
36716 if test -n "$AS"; then
36717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36718 $as_echo "$AS" >&6; }
36719 else
36720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36721 $as_echo "no" >&6; }
36722 fi
36723 
36724 
36725   test -n "$AS" && break
36726 done
36727 
36728   else
36729     # The variable is set, but is it from the command line or the environment?
36730 
36731     # Try to remove the string !AS! from our list.
36732     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36733     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36734       # If it failed, the variable was not from the command line. Ignore it,
36735       # but warn the user (except for BASH, which is always set by the calling BASH).
36736       if test "xAS" != xBASH; then
36737         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36738 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36739       fi
36740       # Try to locate tool using the code snippet
36741       for ac_prog in as
36742 do
36743   # Extract the first word of "$ac_prog", so it can be a program name with args.
36744 set dummy $ac_prog; ac_word=$2
36745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36746 $as_echo_n "checking for $ac_word... " >&6; }
36747 if ${ac_cv_path_AS+:} false; then :
36748   $as_echo_n "(cached) " >&6
36749 else
36750   case $AS in
36751   [\\/]* | ?:[\\/]*)
36752   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36753   ;;
36754   *)
36755   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36756 for as_dir in $PATH
36757 do
36758   IFS=$as_save_IFS
36759   test -z "$as_dir" && as_dir=.
36760     for ac_exec_ext in '' $ac_executable_extensions; do
36761   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36762     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36763     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36764     break 2
36765   fi
36766 done
36767   done
36768 IFS=$as_save_IFS
36769 
36770   ;;
36771 esac
36772 fi
36773 AS=$ac_cv_path_AS
36774 if test -n "$AS"; then
36775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36776 $as_echo "$AS" >&6; }
36777 else
36778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36779 $as_echo "no" >&6; }
36780 fi
36781 
36782 
36783   test -n "$AS" && break
36784 done
36785 
36786     else
36787       # If it succeeded, then it was overridden by the user. We will use it
36788       # for the tool.
36789 
36790       # First remove it from the list of overridden variables, so we can test
36791       # for unknown variables in the end.
36792       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36793 
36794       # Check if we try to supply an empty value
36795       if test "x$AS" = x; then
36796         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36797 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36798         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36799 $as_echo_n "checking for AS... " >&6; }
36800         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36801 $as_echo "disabled" >&6; }
36802       else
36803         # Check if the provided tool contains a complete path.
36804         tool_specified="$AS"
36805         tool_basename="${tool_specified##*/}"
36806         if test "x$tool_basename" = "x$tool_specified"; then
36807           # A command without a complete path is provided, search $PATH.
36808           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36809 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36810           # Extract the first word of "$tool_basename", so it can be a program name with args.
36811 set dummy $tool_basename; ac_word=$2
36812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36813 $as_echo_n "checking for $ac_word... " >&6; }
36814 if ${ac_cv_path_AS+:} false; then :
36815   $as_echo_n "(cached) " >&6
36816 else
36817   case $AS in
36818   [\\/]* | ?:[\\/]*)
36819   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36820   ;;
36821   *)
36822   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36823 for as_dir in $PATH
36824 do
36825   IFS=$as_save_IFS
36826   test -z "$as_dir" && as_dir=.
36827     for ac_exec_ext in '' $ac_executable_extensions; do
36828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36829     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36831     break 2
36832   fi
36833 done
36834   done
36835 IFS=$as_save_IFS
36836 
36837   ;;
36838 esac
36839 fi
36840 AS=$ac_cv_path_AS
36841 if test -n "$AS"; then
36842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36843 $as_echo "$AS" >&6; }
36844 else
36845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36846 $as_echo "no" >&6; }
36847 fi
36848 
36849 
36850           if test "x$AS" = x; then
36851             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36852           fi
36853         else
36854           # Otherwise we believe it is a complete path. Use it as it is.
36855           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36856 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36857           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36858 $as_echo_n "checking for AS... " >&6; }
36859           if test ! -x "$tool_specified"; then
36860             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36861 $as_echo "not found" >&6; }
36862             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36863           fi
36864           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36865 $as_echo "$tool_specified" >&6; }
36866         fi
36867       fi
36868     fi
36869 
36870   fi
36871 
36872 
36873 
36874   # Only process if variable expands to non-empty
36875 
36876   if test "x$AS" != x; then
36877     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36878 
36879   # First separate the path from the arguments. This will split at the first
36880   # space.
36881   complete="$AS"
36882   path="${complete%% *}"
36883   tmp="$complete EOL"
36884   arguments="${tmp#* }"
36885 
36886   # Input might be given as Windows format, start by converting to
36887   # unix format.
36888   new_path=`$CYGPATH -u "$path"`
36889 
36890   # Now try to locate executable using which
36891   new_path=`$WHICH "$new_path" 2> /dev/null`
36892   # bat and cmd files are not always considered executable in cygwin causing which
36893   # to not find them
36894   if test "x$new_path" = x \
36895       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36896       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36897     new_path=`$CYGPATH -u "$path"`
36898   fi
36899   if test "x$new_path" = x; then
36900     # Oops. Which didn't find the executable.
36901     # The splitting of arguments from the executable at a space might have been incorrect,
36902     # since paths with space are more likely in Windows. Give it another try with the whole
36903     # argument.
36904     path="$complete"
36905     arguments="EOL"
36906     new_path=`$CYGPATH -u "$path"`
36907     new_path=`$WHICH "$new_path" 2> /dev/null`
36908     # bat and cmd files are not always considered executable in cygwin causing which
36909     # to not find them
36910     if test "x$new_path" = x \
36911         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36912         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36913       new_path=`$CYGPATH -u "$path"`
36914     fi
36915     if test "x$new_path" = x; then
36916       # It's still not found. Now this is an unrecoverable error.
36917       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36918 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36919       has_space=`$ECHO "$complete" | $GREP " "`
36920       if test "x$has_space" != x; then
36921         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36922 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36923       fi
36924       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36925     fi
36926   fi
36927 
36928   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36929   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36930   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36931   # "foo.exe" is OK but "foo" is an error.
36932   #
36933   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36934   # It is also a way to make sure we got the proper file name for the real test later on.
36935   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36936   if test "x$test_shortpath" = x; then
36937     # Short path failed, file does not exist as specified.
36938     # Try adding .exe or .cmd
36939     if test -f "${new_path}.exe"; then
36940       input_to_shortpath="${new_path}.exe"
36941     elif test -f "${new_path}.cmd"; then
36942       input_to_shortpath="${new_path}.cmd"
36943     else
36944       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36945 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36946       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36947 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36948       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36949     fi
36950   else
36951     input_to_shortpath="$new_path"
36952   fi
36953 
36954   # Call helper function which possibly converts this using DOS-style short mode.
36955   # If so, the updated path is stored in $new_path.
36956   new_path="$input_to_shortpath"
36957 
36958   input_path="$input_to_shortpath"
36959   # Check if we need to convert this using DOS-style short mode. If the path
36960   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36961   # take no chances and rewrite it.
36962   # Note: m4 eats our [], so we need to use [ and ] instead.
36963   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36964   if test "x$has_forbidden_chars" != x; then
36965     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36966     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36967     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36968     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36969       # Going to short mode and back again did indeed matter. Since short mode is
36970       # case insensitive, let's make it lowercase to improve readability.
36971       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36972       # Now convert it back to Unix-style (cygpath)
36973       input_path=`$CYGPATH -u "$shortmode_path"`
36974       new_path="$input_path"
36975     fi
36976   fi
36977 
36978   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36979   if test "x$test_cygdrive_prefix" = x; then
36980     # As a simple fix, exclude /usr/bin since it's not a real path.
36981     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36982       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36983       # a path prefixed by /cygdrive for fixpath to work.
36984       new_path="$CYGWIN_ROOT_PATH$input_path"
36985     fi
36986   fi
36987 
36988   # remove trailing .exe if any
36989   new_path="${new_path/%.exe/}"
36990 
36991     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36992 
36993   # First separate the path from the arguments. This will split at the first
36994   # space.
36995   complete="$AS"
36996   path="${complete%% *}"
36997   tmp="$complete EOL"
36998   arguments="${tmp#* }"
36999 
37000   # Input might be given as Windows format, start by converting to
37001   # unix format.
37002   new_path="$path"
37003 
37004   windows_path="$new_path"
37005   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37006     unix_path=`$CYGPATH -u "$windows_path"`
37007     new_path="$unix_path"
37008   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37009     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37010     new_path="$unix_path"
37011   fi
37012 
37013 
37014   # Now try to locate executable using which
37015   new_path=`$WHICH "$new_path" 2> /dev/null`
37016 
37017   if test "x$new_path" = x; then
37018     # Oops. Which didn't find the executable.
37019     # The splitting of arguments from the executable at a space might have been incorrect,
37020     # since paths with space are more likely in Windows. Give it another try with the whole
37021     # argument.
37022     path="$complete"
37023     arguments="EOL"
37024     new_path="$path"
37025 
37026   windows_path="$new_path"
37027   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37028     unix_path=`$CYGPATH -u "$windows_path"`
37029     new_path="$unix_path"
37030   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37031     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37032     new_path="$unix_path"
37033   fi
37034 
37035 
37036     new_path=`$WHICH "$new_path" 2> /dev/null`
37037     # bat and cmd files are not always considered executable in MSYS causing which
37038     # to not find them
37039     if test "x$new_path" = x \
37040         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37041         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37042       new_path="$path"
37043 
37044   windows_path="$new_path"
37045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37046     unix_path=`$CYGPATH -u "$windows_path"`
37047     new_path="$unix_path"
37048   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37049     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37050     new_path="$unix_path"
37051   fi
37052 
37053     fi
37054 
37055     if test "x$new_path" = x; then
37056       # It's still not found. Now this is an unrecoverable error.
37057       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37058 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37059       has_space=`$ECHO "$complete" | $GREP " "`
37060       if test "x$has_space" != x; then
37061         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37062 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37063       fi
37064       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37065     fi
37066   fi
37067 
37068   # Now new_path has a complete unix path to the binary
37069   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37070     # Keep paths in /bin as-is, but remove trailing .exe if any
37071     new_path="${new_path/%.exe/}"
37072     # Do not save /bin paths to all_fixpath_prefixes!
37073   else
37074     # Not in mixed or Windows style, start by that.
37075     new_path=`cmd //c echo $new_path`
37076 
37077   input_path="$new_path"
37078   # Check if we need to convert this using DOS-style short mode. If the path
37079   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37080   # take no chances and rewrite it.
37081   # Note: m4 eats our [], so we need to use [ and ] instead.
37082   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37083   if test "x$has_forbidden_chars" != x; then
37084     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37085     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37086   fi
37087 
37088     # Output is in $new_path
37089 
37090   windows_path="$new_path"
37091   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37092     unix_path=`$CYGPATH -u "$windows_path"`
37093     new_path="$unix_path"
37094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37095     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37096     new_path="$unix_path"
37097   fi
37098 
37099     # remove trailing .exe if any
37100     new_path="${new_path/%.exe/}"
37101 
37102     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37103     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37104   fi
37105 
37106     else
37107       # We're on a unix platform. Hooray! :)
37108       # First separate the path from the arguments. This will split at the first
37109       # space.
37110       complete="$AS"
37111       path="${complete%% *}"
37112       tmp="$complete EOL"
37113       arguments="${tmp#* }"
37114 
37115       # Cannot rely on the command "which" here since it doesn't always work.
37116       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37117       if test -z "$is_absolute_path"; then
37118         # Path to executable is not absolute. Find it.
37119         IFS_save="$IFS"
37120         IFS=:
37121         for p in $PATH; do
37122           if test -f "$p/$path" && test -x "$p/$path"; then
37123             new_path="$p/$path"
37124             break
37125           fi
37126         done
37127         IFS="$IFS_save"
37128       else
37129         # This is an absolute path, we can use it without further modifications.
37130         new_path="$path"
37131       fi
37132 
37133       if test "x$new_path" = x; then
37134         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37135 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37136         has_space=`$ECHO "$complete" | $GREP " "`
37137         if test "x$has_space" != x; then
37138           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37139 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37140         fi
37141         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37142       fi
37143     fi
37144 
37145     # Now join together the path and the arguments once again
37146     if test "x$arguments" != xEOL; then
37147       new_complete="$new_path ${arguments% *}"
37148     else
37149       new_complete="$new_path"
37150     fi
37151 
37152     if test "x$complete" != "x$new_complete"; then
37153       AS="$new_complete"
37154       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37155 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37156     fi
37157   fi
37158 
37159     if test "x$AS" = x; then
37160       as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37161     fi
37162   else
37163     # FIXME: is this correct for microsoft?
37164     AS="$CC -c"
37165   fi
37166 
37167 
37168   #
37169   # Setup the archiver (AR)
37170   #
37171   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37172     # The corresponding ar tool is lib.exe (used to create static libraries)
37173     # Extract the first word of "lib", so it can be a program name with args.
37174 set dummy lib; ac_word=$2
37175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37176 $as_echo_n "checking for $ac_word... " >&6; }
37177 if ${ac_cv_prog_AR+:} false; then :
37178   $as_echo_n "(cached) " >&6
37179 else
37180   if test -n "$AR"; then
37181   ac_cv_prog_AR="$AR" # Let the user override the test.
37182 else
37183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37184 for as_dir in $PATH
37185 do
37186   IFS=$as_save_IFS
37187   test -z "$as_dir" && as_dir=.
37188     for ac_exec_ext in '' $ac_executable_extensions; do
37189   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37190     ac_cv_prog_AR="lib"
37191     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37192     break 2
37193   fi
37194 done
37195   done
37196 IFS=$as_save_IFS
37197 
37198 fi
37199 fi
37200 AR=$ac_cv_prog_AR
37201 if test -n "$AR"; then
37202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37203 $as_echo "$AR" >&6; }
37204 else
37205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37206 $as_echo "no" >&6; }
37207 fi
37208 
37209 
37210   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37211 
37212 
37213   # Publish this variable in the help.
37214 
37215 
37216   if [ -z "${AR+x}" ]; then
37217     # The variable is not set by user, try to locate tool using the code snippet
37218     if test -n "$ac_tool_prefix"; then
37219   for ac_prog in ar gcc-ar
37220   do
37221     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37222 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37224 $as_echo_n "checking for $ac_word... " >&6; }
37225 if ${ac_cv_prog_AR+:} false; then :
37226   $as_echo_n "(cached) " >&6
37227 else
37228   if test -n "$AR"; then
37229   ac_cv_prog_AR="$AR" # Let the user override the test.
37230 else
37231 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37232 for as_dir in $PATH
37233 do
37234   IFS=$as_save_IFS
37235   test -z "$as_dir" && as_dir=.
37236     for ac_exec_ext in '' $ac_executable_extensions; do
37237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37238     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37240     break 2
37241   fi
37242 done
37243   done
37244 IFS=$as_save_IFS
37245 
37246 fi
37247 fi
37248 AR=$ac_cv_prog_AR
37249 if test -n "$AR"; then
37250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37251 $as_echo "$AR" >&6; }
37252 else
37253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37254 $as_echo "no" >&6; }
37255 fi
37256 
37257 
37258     test -n "$AR" && break
37259   done
37260 fi
37261 if test -z "$AR"; then
37262   ac_ct_AR=$AR
37263   for ac_prog in ar gcc-ar
37264 do
37265   # Extract the first word of "$ac_prog", so it can be a program name with args.
37266 set dummy $ac_prog; ac_word=$2
37267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37268 $as_echo_n "checking for $ac_word... " >&6; }
37269 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37270   $as_echo_n "(cached) " >&6
37271 else
37272   if test -n "$ac_ct_AR"; then
37273   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37274 else
37275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37276 for as_dir in $PATH
37277 do
37278   IFS=$as_save_IFS
37279   test -z "$as_dir" && as_dir=.
37280     for ac_exec_ext in '' $ac_executable_extensions; do
37281   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37282     ac_cv_prog_ac_ct_AR="$ac_prog"
37283     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37284     break 2
37285   fi
37286 done
37287   done
37288 IFS=$as_save_IFS
37289 
37290 fi
37291 fi
37292 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37293 if test -n "$ac_ct_AR"; then
37294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37295 $as_echo "$ac_ct_AR" >&6; }
37296 else
37297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37298 $as_echo "no" >&6; }
37299 fi
37300 
37301 
37302   test -n "$ac_ct_AR" && break
37303 done
37304 
37305   if test "x$ac_ct_AR" = x; then
37306     AR=""
37307   else
37308     case $cross_compiling:$ac_tool_warned in
37309 yes:)
37310 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37311 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37312 ac_tool_warned=yes ;;
37313 esac
37314     AR=$ac_ct_AR
37315   fi
37316 fi
37317 
37318   else
37319     # The variable is set, but is it from the command line or the environment?
37320 
37321     # Try to remove the string !AR! from our list.
37322     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37323     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37324       # If it failed, the variable was not from the command line. Ignore it,
37325       # but warn the user (except for BASH, which is always set by the calling BASH).
37326       if test "xAR" != xBASH; then
37327         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37328 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37329       fi
37330       # Try to locate tool using the code snippet
37331       if test -n "$ac_tool_prefix"; then
37332   for ac_prog in ar gcc-ar
37333   do
37334     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37335 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37337 $as_echo_n "checking for $ac_word... " >&6; }
37338 if ${ac_cv_prog_AR+:} false; then :
37339   $as_echo_n "(cached) " >&6
37340 else
37341   if test -n "$AR"; then
37342   ac_cv_prog_AR="$AR" # Let the user override the test.
37343 else
37344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37345 for as_dir in $PATH
37346 do
37347   IFS=$as_save_IFS
37348   test -z "$as_dir" && as_dir=.
37349     for ac_exec_ext in '' $ac_executable_extensions; do
37350   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37351     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37352     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37353     break 2
37354   fi
37355 done
37356   done
37357 IFS=$as_save_IFS
37358 
37359 fi
37360 fi
37361 AR=$ac_cv_prog_AR
37362 if test -n "$AR"; then
37363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37364 $as_echo "$AR" >&6; }
37365 else
37366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37367 $as_echo "no" >&6; }
37368 fi
37369 
37370 
37371     test -n "$AR" && break
37372   done
37373 fi
37374 if test -z "$AR"; then
37375   ac_ct_AR=$AR
37376   for ac_prog in ar gcc-ar
37377 do
37378   # Extract the first word of "$ac_prog", so it can be a program name with args.
37379 set dummy $ac_prog; ac_word=$2
37380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37381 $as_echo_n "checking for $ac_word... " >&6; }
37382 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37383   $as_echo_n "(cached) " >&6
37384 else
37385   if test -n "$ac_ct_AR"; then
37386   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37387 else
37388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37389 for as_dir in $PATH
37390 do
37391   IFS=$as_save_IFS
37392   test -z "$as_dir" && as_dir=.
37393     for ac_exec_ext in '' $ac_executable_extensions; do
37394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37395     ac_cv_prog_ac_ct_AR="$ac_prog"
37396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37397     break 2
37398   fi
37399 done
37400   done
37401 IFS=$as_save_IFS
37402 
37403 fi
37404 fi
37405 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37406 if test -n "$ac_ct_AR"; then
37407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37408 $as_echo "$ac_ct_AR" >&6; }
37409 else
37410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37411 $as_echo "no" >&6; }
37412 fi
37413 
37414 
37415   test -n "$ac_ct_AR" && break
37416 done
37417 
37418   if test "x$ac_ct_AR" = x; then
37419     AR=""
37420   else
37421     case $cross_compiling:$ac_tool_warned in
37422 yes:)
37423 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37424 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37425 ac_tool_warned=yes ;;
37426 esac
37427     AR=$ac_ct_AR
37428   fi
37429 fi
37430 
37431     else
37432       # If it succeeded, then it was overridden by the user. We will use it
37433       # for the tool.
37434 
37435       # First remove it from the list of overridden variables, so we can test
37436       # for unknown variables in the end.
37437       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37438 
37439       # Check if we try to supply an empty value
37440       if test "x$AR" = x; then
37441         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37442 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37443         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37444 $as_echo_n "checking for AR... " >&6; }
37445         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37446 $as_echo "disabled" >&6; }
37447       else
37448         # Check if the provided tool contains a complete path.
37449         tool_specified="$AR"
37450         tool_basename="${tool_specified##*/}"
37451         if test "x$tool_basename" = "x$tool_specified"; then
37452           # A command without a complete path is provided, search $PATH.
37453           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37454 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37455           # Extract the first word of "$tool_basename", so it can be a program name with args.
37456 set dummy $tool_basename; ac_word=$2
37457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37458 $as_echo_n "checking for $ac_word... " >&6; }
37459 if ${ac_cv_path_AR+:} false; then :
37460   $as_echo_n "(cached) " >&6
37461 else
37462   case $AR in
37463   [\\/]* | ?:[\\/]*)
37464   ac_cv_path_AR="$AR" # Let the user override the test with a path.
37465   ;;
37466   *)
37467   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37468 for as_dir in $PATH
37469 do
37470   IFS=$as_save_IFS
37471   test -z "$as_dir" && as_dir=.
37472     for ac_exec_ext in '' $ac_executable_extensions; do
37473   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37474     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37475     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37476     break 2
37477   fi
37478 done
37479   done
37480 IFS=$as_save_IFS
37481 
37482   ;;
37483 esac
37484 fi
37485 AR=$ac_cv_path_AR
37486 if test -n "$AR"; then
37487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37488 $as_echo "$AR" >&6; }
37489 else
37490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37491 $as_echo "no" >&6; }
37492 fi
37493 
37494 
37495           if test "x$AR" = x; then
37496             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37497           fi
37498         else
37499           # Otherwise we believe it is a complete path. Use it as it is.
37500           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37501 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37502           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37503 $as_echo_n "checking for AR... " >&6; }
37504           if test ! -x "$tool_specified"; then
37505             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37506 $as_echo "not found" >&6; }
37507             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37508           fi
37509           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37510 $as_echo "$tool_specified" >&6; }
37511         fi
37512       fi
37513     fi
37514 
37515   fi
37516 
37517 
37518   else
37519 
37520 
37521   # Publish this variable in the help.
37522 
37523 
37524   if [ -z "${AR+x}" ]; then
37525     # The variable is not set by user, try to locate tool using the code snippet
37526     if test -n "$ac_tool_prefix"; then
37527   for ac_prog in ar
37528   do
37529     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37530 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37532 $as_echo_n "checking for $ac_word... " >&6; }
37533 if ${ac_cv_prog_AR+:} false; then :
37534   $as_echo_n "(cached) " >&6
37535 else
37536   if test -n "$AR"; then
37537   ac_cv_prog_AR="$AR" # Let the user override the test.
37538 else
37539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37540 for as_dir in $PATH
37541 do
37542   IFS=$as_save_IFS
37543   test -z "$as_dir" && as_dir=.
37544     for ac_exec_ext in '' $ac_executable_extensions; do
37545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37546     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37548     break 2
37549   fi
37550 done
37551   done
37552 IFS=$as_save_IFS
37553 
37554 fi
37555 fi
37556 AR=$ac_cv_prog_AR
37557 if test -n "$AR"; then
37558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37559 $as_echo "$AR" >&6; }
37560 else
37561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37562 $as_echo "no" >&6; }
37563 fi
37564 
37565 
37566     test -n "$AR" && break
37567   done
37568 fi
37569 if test -z "$AR"; then
37570   ac_ct_AR=$AR
37571   for ac_prog in ar
37572 do
37573   # Extract the first word of "$ac_prog", so it can be a program name with args.
37574 set dummy $ac_prog; ac_word=$2
37575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37576 $as_echo_n "checking for $ac_word... " >&6; }
37577 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37578   $as_echo_n "(cached) " >&6
37579 else
37580   if test -n "$ac_ct_AR"; then
37581   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37582 else
37583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37584 for as_dir in $PATH
37585 do
37586   IFS=$as_save_IFS
37587   test -z "$as_dir" && as_dir=.
37588     for ac_exec_ext in '' $ac_executable_extensions; do
37589   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37590     ac_cv_prog_ac_ct_AR="$ac_prog"
37591     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37592     break 2
37593   fi
37594 done
37595   done
37596 IFS=$as_save_IFS
37597 
37598 fi
37599 fi
37600 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37601 if test -n "$ac_ct_AR"; then
37602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37603 $as_echo "$ac_ct_AR" >&6; }
37604 else
37605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37606 $as_echo "no" >&6; }
37607 fi
37608 
37609 
37610   test -n "$ac_ct_AR" && break
37611 done
37612 
37613   if test "x$ac_ct_AR" = x; then
37614     AR=""
37615   else
37616     case $cross_compiling:$ac_tool_warned in
37617 yes:)
37618 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37619 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37620 ac_tool_warned=yes ;;
37621 esac
37622     AR=$ac_ct_AR
37623   fi
37624 fi
37625 
37626   else
37627     # The variable is set, but is it from the command line or the environment?
37628 
37629     # Try to remove the string !AR! from our list.
37630     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37631     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37632       # If it failed, the variable was not from the command line. Ignore it,
37633       # but warn the user (except for BASH, which is always set by the calling BASH).
37634       if test "xAR" != xBASH; then
37635         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37636 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37637       fi
37638       # Try to locate tool using the code snippet
37639       if test -n "$ac_tool_prefix"; then
37640   for ac_prog in ar
37641   do
37642     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37643 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37645 $as_echo_n "checking for $ac_word... " >&6; }
37646 if ${ac_cv_prog_AR+:} false; then :
37647   $as_echo_n "(cached) " >&6
37648 else
37649   if test -n "$AR"; then
37650   ac_cv_prog_AR="$AR" # Let the user override the test.
37651 else
37652 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37653 for as_dir in $PATH
37654 do
37655   IFS=$as_save_IFS
37656   test -z "$as_dir" && as_dir=.
37657     for ac_exec_ext in '' $ac_executable_extensions; do
37658   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37659     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37660     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37661     break 2
37662   fi
37663 done
37664   done
37665 IFS=$as_save_IFS
37666 
37667 fi
37668 fi
37669 AR=$ac_cv_prog_AR
37670 if test -n "$AR"; then
37671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37672 $as_echo "$AR" >&6; }
37673 else
37674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37675 $as_echo "no" >&6; }
37676 fi
37677 
37678 
37679     test -n "$AR" && break
37680   done
37681 fi
37682 if test -z "$AR"; then
37683   ac_ct_AR=$AR
37684   for ac_prog in ar
37685 do
37686   # Extract the first word of "$ac_prog", so it can be a program name with args.
37687 set dummy $ac_prog; ac_word=$2
37688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37689 $as_echo_n "checking for $ac_word... " >&6; }
37690 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37691   $as_echo_n "(cached) " >&6
37692 else
37693   if test -n "$ac_ct_AR"; then
37694   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37695 else
37696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37697 for as_dir in $PATH
37698 do
37699   IFS=$as_save_IFS
37700   test -z "$as_dir" && as_dir=.
37701     for ac_exec_ext in '' $ac_executable_extensions; do
37702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37703     ac_cv_prog_ac_ct_AR="$ac_prog"
37704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37705     break 2
37706   fi
37707 done
37708   done
37709 IFS=$as_save_IFS
37710 
37711 fi
37712 fi
37713 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37714 if test -n "$ac_ct_AR"; then
37715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37716 $as_echo "$ac_ct_AR" >&6; }
37717 else
37718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37719 $as_echo "no" >&6; }
37720 fi
37721 
37722 
37723   test -n "$ac_ct_AR" && break
37724 done
37725 
37726   if test "x$ac_ct_AR" = x; then
37727     AR=""
37728   else
37729     case $cross_compiling:$ac_tool_warned in
37730 yes:)
37731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37732 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37733 ac_tool_warned=yes ;;
37734 esac
37735     AR=$ac_ct_AR
37736   fi
37737 fi
37738 
37739     else
37740       # If it succeeded, then it was overridden by the user. We will use it
37741       # for the tool.
37742 
37743       # First remove it from the list of overridden variables, so we can test
37744       # for unknown variables in the end.
37745       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37746 
37747       # Check if we try to supply an empty value
37748       if test "x$AR" = x; then
37749         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37750 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37751         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37752 $as_echo_n "checking for AR... " >&6; }
37753         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37754 $as_echo "disabled" >&6; }
37755       else
37756         # Check if the provided tool contains a complete path.
37757         tool_specified="$AR"
37758         tool_basename="${tool_specified##*/}"
37759         if test "x$tool_basename" = "x$tool_specified"; then
37760           # A command without a complete path is provided, search $PATH.
37761           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37762 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37763           # Extract the first word of "$tool_basename", so it can be a program name with args.
37764 set dummy $tool_basename; ac_word=$2
37765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37766 $as_echo_n "checking for $ac_word... " >&6; }
37767 if ${ac_cv_path_AR+:} false; then :
37768   $as_echo_n "(cached) " >&6
37769 else
37770   case $AR in
37771   [\\/]* | ?:[\\/]*)
37772   ac_cv_path_AR="$AR" # Let the user override the test with a path.
37773   ;;
37774   *)
37775   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37776 for as_dir in $PATH
37777 do
37778   IFS=$as_save_IFS
37779   test -z "$as_dir" && as_dir=.
37780     for ac_exec_ext in '' $ac_executable_extensions; do
37781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37782     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37784     break 2
37785   fi
37786 done
37787   done
37788 IFS=$as_save_IFS
37789 
37790   ;;
37791 esac
37792 fi
37793 AR=$ac_cv_path_AR
37794 if test -n "$AR"; then
37795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37796 $as_echo "$AR" >&6; }
37797 else
37798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37799 $as_echo "no" >&6; }
37800 fi
37801 
37802 
37803           if test "x$AR" = x; then
37804             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37805           fi
37806         else
37807           # Otherwise we believe it is a complete path. Use it as it is.
37808           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37809 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37810           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37811 $as_echo_n "checking for AR... " >&6; }
37812           if test ! -x "$tool_specified"; then
37813             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37814 $as_echo "not found" >&6; }
37815             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37816           fi
37817           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37818 $as_echo "$tool_specified" >&6; }
37819         fi
37820       fi
37821     fi
37822 
37823   fi
37824 
37825 
37826   fi
37827 
37828   # Only process if variable expands to non-empty
37829 
37830   if test "x$AR" != x; then
37831     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37832 
37833   # First separate the path from the arguments. This will split at the first
37834   # space.
37835   complete="$AR"
37836   path="${complete%% *}"
37837   tmp="$complete EOL"
37838   arguments="${tmp#* }"
37839 
37840   # Input might be given as Windows format, start by converting to
37841   # unix format.
37842   new_path=`$CYGPATH -u "$path"`
37843 
37844   # Now try to locate executable using which
37845   new_path=`$WHICH "$new_path" 2> /dev/null`
37846   # bat and cmd files are not always considered executable in cygwin causing which
37847   # to not find them
37848   if test "x$new_path" = x \
37849       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37850       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37851     new_path=`$CYGPATH -u "$path"`
37852   fi
37853   if test "x$new_path" = x; then
37854     # Oops. Which didn't find the executable.
37855     # The splitting of arguments from the executable at a space might have been incorrect,
37856     # since paths with space are more likely in Windows. Give it another try with the whole
37857     # argument.
37858     path="$complete"
37859     arguments="EOL"
37860     new_path=`$CYGPATH -u "$path"`
37861     new_path=`$WHICH "$new_path" 2> /dev/null`
37862     # bat and cmd files are not always considered executable in cygwin causing which
37863     # to not find them
37864     if test "x$new_path" = x \
37865         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37866         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37867       new_path=`$CYGPATH -u "$path"`
37868     fi
37869     if test "x$new_path" = x; then
37870       # It's still not found. Now this is an unrecoverable error.
37871       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37872 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37873       has_space=`$ECHO "$complete" | $GREP " "`
37874       if test "x$has_space" != x; then
37875         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37876 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37877       fi
37878       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37879     fi
37880   fi
37881 
37882   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37883   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37884   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37885   # "foo.exe" is OK but "foo" is an error.
37886   #
37887   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37888   # It is also a way to make sure we got the proper file name for the real test later on.
37889   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37890   if test "x$test_shortpath" = x; then
37891     # Short path failed, file does not exist as specified.
37892     # Try adding .exe or .cmd
37893     if test -f "${new_path}.exe"; then
37894       input_to_shortpath="${new_path}.exe"
37895     elif test -f "${new_path}.cmd"; then
37896       input_to_shortpath="${new_path}.cmd"
37897     else
37898       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37899 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37900       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37901 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37902       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37903     fi
37904   else
37905     input_to_shortpath="$new_path"
37906   fi
37907 
37908   # Call helper function which possibly converts this using DOS-style short mode.
37909   # If so, the updated path is stored in $new_path.
37910   new_path="$input_to_shortpath"
37911 
37912   input_path="$input_to_shortpath"
37913   # Check if we need to convert this using DOS-style short mode. If the path
37914   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37915   # take no chances and rewrite it.
37916   # Note: m4 eats our [], so we need to use [ and ] instead.
37917   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37918   if test "x$has_forbidden_chars" != x; then
37919     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37920     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37921     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37922     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37923       # Going to short mode and back again did indeed matter. Since short mode is
37924       # case insensitive, let's make it lowercase to improve readability.
37925       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37926       # Now convert it back to Unix-style (cygpath)
37927       input_path=`$CYGPATH -u "$shortmode_path"`
37928       new_path="$input_path"
37929     fi
37930   fi
37931 
37932   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37933   if test "x$test_cygdrive_prefix" = x; then
37934     # As a simple fix, exclude /usr/bin since it's not a real path.
37935     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37936       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37937       # a path prefixed by /cygdrive for fixpath to work.
37938       new_path="$CYGWIN_ROOT_PATH$input_path"
37939     fi
37940   fi
37941 
37942   # remove trailing .exe if any
37943   new_path="${new_path/%.exe/}"
37944 
37945     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37946 
37947   # First separate the path from the arguments. This will split at the first
37948   # space.
37949   complete="$AR"
37950   path="${complete%% *}"
37951   tmp="$complete EOL"
37952   arguments="${tmp#* }"
37953 
37954   # Input might be given as Windows format, start by converting to
37955   # unix format.
37956   new_path="$path"
37957 
37958   windows_path="$new_path"
37959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37960     unix_path=`$CYGPATH -u "$windows_path"`
37961     new_path="$unix_path"
37962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37963     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37964     new_path="$unix_path"
37965   fi
37966 
37967 
37968   # Now try to locate executable using which
37969   new_path=`$WHICH "$new_path" 2> /dev/null`
37970 
37971   if test "x$new_path" = x; then
37972     # Oops. Which didn't find the executable.
37973     # The splitting of arguments from the executable at a space might have been incorrect,
37974     # since paths with space are more likely in Windows. Give it another try with the whole
37975     # argument.
37976     path="$complete"
37977     arguments="EOL"
37978     new_path="$path"
37979 
37980   windows_path="$new_path"
37981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37982     unix_path=`$CYGPATH -u "$windows_path"`
37983     new_path="$unix_path"
37984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37986     new_path="$unix_path"
37987   fi
37988 
37989 
37990     new_path=`$WHICH "$new_path" 2> /dev/null`
37991     # bat and cmd files are not always considered executable in MSYS causing which
37992     # to not find them
37993     if test "x$new_path" = x \
37994         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37995         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37996       new_path="$path"
37997 
37998   windows_path="$new_path"
37999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38000     unix_path=`$CYGPATH -u "$windows_path"`
38001     new_path="$unix_path"
38002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38003     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38004     new_path="$unix_path"
38005   fi
38006 
38007     fi
38008 
38009     if test "x$new_path" = x; then
38010       # It's still not found. Now this is an unrecoverable error.
38011       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38012 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38013       has_space=`$ECHO "$complete" | $GREP " "`
38014       if test "x$has_space" != x; then
38015         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38016 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38017       fi
38018       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38019     fi
38020   fi
38021 
38022   # Now new_path has a complete unix path to the binary
38023   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38024     # Keep paths in /bin as-is, but remove trailing .exe if any
38025     new_path="${new_path/%.exe/}"
38026     # Do not save /bin paths to all_fixpath_prefixes!
38027   else
38028     # Not in mixed or Windows style, start by that.
38029     new_path=`cmd //c echo $new_path`
38030 
38031   input_path="$new_path"
38032   # Check if we need to convert this using DOS-style short mode. If the path
38033   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38034   # take no chances and rewrite it.
38035   # Note: m4 eats our [], so we need to use [ and ] instead.
38036   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38037   if test "x$has_forbidden_chars" != x; then
38038     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38039     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38040   fi
38041 
38042     # Output is in $new_path
38043 
38044   windows_path="$new_path"
38045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38046     unix_path=`$CYGPATH -u "$windows_path"`
38047     new_path="$unix_path"
38048   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38049     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38050     new_path="$unix_path"
38051   fi
38052 
38053     # remove trailing .exe if any
38054     new_path="${new_path/%.exe/}"
38055 
38056     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38057     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38058   fi
38059 
38060     else
38061       # We're on a unix platform. Hooray! :)
38062       # First separate the path from the arguments. This will split at the first
38063       # space.
38064       complete="$AR"
38065       path="${complete%% *}"
38066       tmp="$complete EOL"
38067       arguments="${tmp#* }"
38068 
38069       # Cannot rely on the command "which" here since it doesn't always work.
38070       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38071       if test -z "$is_absolute_path"; then
38072         # Path to executable is not absolute. Find it.
38073         IFS_save="$IFS"
38074         IFS=:
38075         for p in $PATH; do
38076           if test -f "$p/$path" && test -x "$p/$path"; then
38077             new_path="$p/$path"
38078             break
38079           fi
38080         done
38081         IFS="$IFS_save"
38082       else
38083         # This is an absolute path, we can use it without further modifications.
38084         new_path="$path"
38085       fi
38086 
38087       if test "x$new_path" = x; then
38088         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38089 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38090         has_space=`$ECHO "$complete" | $GREP " "`
38091         if test "x$has_space" != x; then
38092           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38093 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38094         fi
38095         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38096       fi
38097     fi
38098 
38099     # Now join together the path and the arguments once again
38100     if test "x$arguments" != xEOL; then
38101       new_complete="$new_path ${arguments% *}"
38102     else
38103       new_complete="$new_path"
38104     fi
38105 
38106     if test "x$complete" != "x$new_complete"; then
38107       AR="$new_complete"
38108       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38109 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38110     fi
38111   fi
38112 
38113 
38114 
38115   if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_OS" = "xios"; then
38116 
38117 
38118   # Publish this variable in the help.
38119 
38120 
38121   if [ -z "${LIPO+x}" ]; then
38122     # The variable is not set by user, try to locate tool using the code snippet
38123     for ac_prog in lipo
38124 do
38125   # Extract the first word of "$ac_prog", so it can be a program name with args.
38126 set dummy $ac_prog; ac_word=$2
38127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38128 $as_echo_n "checking for $ac_word... " >&6; }
38129 if ${ac_cv_path_LIPO+:} false; then :
38130   $as_echo_n "(cached) " >&6
38131 else
38132   case $LIPO in
38133   [\\/]* | ?:[\\/]*)
38134   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38135   ;;
38136   *)
38137   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38138 for as_dir in $PATH
38139 do
38140   IFS=$as_save_IFS
38141   test -z "$as_dir" && as_dir=.
38142     for ac_exec_ext in '' $ac_executable_extensions; do
38143   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38144     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38145     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38146     break 2
38147   fi
38148 done
38149   done
38150 IFS=$as_save_IFS
38151 
38152   ;;
38153 esac
38154 fi
38155 LIPO=$ac_cv_path_LIPO
38156 if test -n "$LIPO"; then
38157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38158 $as_echo "$LIPO" >&6; }
38159 else
38160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38161 $as_echo "no" >&6; }
38162 fi
38163 
38164 
38165   test -n "$LIPO" && break
38166 done
38167 
38168   else
38169     # The variable is set, but is it from the command line or the environment?
38170 
38171     # Try to remove the string !LIPO! from our list.
38172     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38173     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38174       # If it failed, the variable was not from the command line. Ignore it,
38175       # but warn the user (except for BASH, which is always set by the calling BASH).
38176       if test "xLIPO" != xBASH; then
38177         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38178 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38179       fi
38180       # Try to locate tool using the code snippet
38181       for ac_prog in lipo
38182 do
38183   # Extract the first word of "$ac_prog", so it can be a program name with args.
38184 set dummy $ac_prog; ac_word=$2
38185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38186 $as_echo_n "checking for $ac_word... " >&6; }
38187 if ${ac_cv_path_LIPO+:} false; then :
38188   $as_echo_n "(cached) " >&6
38189 else
38190   case $LIPO in
38191   [\\/]* | ?:[\\/]*)
38192   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38193   ;;
38194   *)
38195   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38196 for as_dir in $PATH
38197 do
38198   IFS=$as_save_IFS
38199   test -z "$as_dir" && as_dir=.
38200     for ac_exec_ext in '' $ac_executable_extensions; do
38201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38202     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38204     break 2
38205   fi
38206 done
38207   done
38208 IFS=$as_save_IFS
38209 
38210   ;;
38211 esac
38212 fi
38213 LIPO=$ac_cv_path_LIPO
38214 if test -n "$LIPO"; then
38215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38216 $as_echo "$LIPO" >&6; }
38217 else
38218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38219 $as_echo "no" >&6; }
38220 fi
38221 
38222 
38223   test -n "$LIPO" && break
38224 done
38225 
38226     else
38227       # If it succeeded, then it was overridden by the user. We will use it
38228       # for the tool.
38229 
38230       # First remove it from the list of overridden variables, so we can test
38231       # for unknown variables in the end.
38232       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38233 
38234       # Check if we try to supply an empty value
38235       if test "x$LIPO" = x; then
38236         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38237 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38238         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38239 $as_echo_n "checking for LIPO... " >&6; }
38240         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38241 $as_echo "disabled" >&6; }
38242       else
38243         # Check if the provided tool contains a complete path.
38244         tool_specified="$LIPO"
38245         tool_basename="${tool_specified##*/}"
38246         if test "x$tool_basename" = "x$tool_specified"; then
38247           # A command without a complete path is provided, search $PATH.
38248           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38249 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38250           # Extract the first word of "$tool_basename", so it can be a program name with args.
38251 set dummy $tool_basename; ac_word=$2
38252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38253 $as_echo_n "checking for $ac_word... " >&6; }
38254 if ${ac_cv_path_LIPO+:} false; then :
38255   $as_echo_n "(cached) " >&6
38256 else
38257   case $LIPO in
38258   [\\/]* | ?:[\\/]*)
38259   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38260   ;;
38261   *)
38262   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38263 for as_dir in $PATH
38264 do
38265   IFS=$as_save_IFS
38266   test -z "$as_dir" && as_dir=.
38267     for ac_exec_ext in '' $ac_executable_extensions; do
38268   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38269     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38270     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38271     break 2
38272   fi
38273 done
38274   done
38275 IFS=$as_save_IFS
38276 
38277   ;;
38278 esac
38279 fi
38280 LIPO=$ac_cv_path_LIPO
38281 if test -n "$LIPO"; then
38282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38283 $as_echo "$LIPO" >&6; }
38284 else
38285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38286 $as_echo "no" >&6; }
38287 fi
38288 
38289 
38290           if test "x$LIPO" = x; then
38291             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38292           fi
38293         else
38294           # Otherwise we believe it is a complete path. Use it as it is.
38295           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38296 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38297           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38298 $as_echo_n "checking for LIPO... " >&6; }
38299           if test ! -x "$tool_specified"; then
38300             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38301 $as_echo "not found" >&6; }
38302             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38303           fi
38304           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38305 $as_echo "$tool_specified" >&6; }
38306         fi
38307       fi
38308     fi
38309 
38310   fi
38311 
38312 
38313 
38314   # Only process if variable expands to non-empty
38315 
38316   if test "x$LIPO" != x; then
38317     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38318 
38319   # First separate the path from the arguments. This will split at the first
38320   # space.
38321   complete="$LIPO"
38322   path="${complete%% *}"
38323   tmp="$complete EOL"
38324   arguments="${tmp#* }"
38325 
38326   # Input might be given as Windows format, start by converting to
38327   # unix format.
38328   new_path=`$CYGPATH -u "$path"`
38329 
38330   # Now try to locate executable using which
38331   new_path=`$WHICH "$new_path" 2> /dev/null`
38332   # bat and cmd files are not always considered executable in cygwin causing which
38333   # to not find them
38334   if test "x$new_path" = x \
38335       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38336       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38337     new_path=`$CYGPATH -u "$path"`
38338   fi
38339   if test "x$new_path" = x; then
38340     # Oops. Which didn't find the executable.
38341     # The splitting of arguments from the executable at a space might have been incorrect,
38342     # since paths with space are more likely in Windows. Give it another try with the whole
38343     # argument.
38344     path="$complete"
38345     arguments="EOL"
38346     new_path=`$CYGPATH -u "$path"`
38347     new_path=`$WHICH "$new_path" 2> /dev/null`
38348     # bat and cmd files are not always considered executable in cygwin causing which
38349     # to not find them
38350     if test "x$new_path" = x \
38351         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38352         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38353       new_path=`$CYGPATH -u "$path"`
38354     fi
38355     if test "x$new_path" = x; then
38356       # It's still not found. Now this is an unrecoverable error.
38357       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38358 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38359       has_space=`$ECHO "$complete" | $GREP " "`
38360       if test "x$has_space" != x; then
38361         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38362 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38363       fi
38364       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38365     fi
38366   fi
38367 
38368   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38369   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38370   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38371   # "foo.exe" is OK but "foo" is an error.
38372   #
38373   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38374   # It is also a way to make sure we got the proper file name for the real test later on.
38375   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38376   if test "x$test_shortpath" = x; then
38377     # Short path failed, file does not exist as specified.
38378     # Try adding .exe or .cmd
38379     if test -f "${new_path}.exe"; then
38380       input_to_shortpath="${new_path}.exe"
38381     elif test -f "${new_path}.cmd"; then
38382       input_to_shortpath="${new_path}.cmd"
38383     else
38384       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38385 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38386       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38387 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38388       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38389     fi
38390   else
38391     input_to_shortpath="$new_path"
38392   fi
38393 
38394   # Call helper function which possibly converts this using DOS-style short mode.
38395   # If so, the updated path is stored in $new_path.
38396   new_path="$input_to_shortpath"
38397 
38398   input_path="$input_to_shortpath"
38399   # Check if we need to convert this using DOS-style short mode. If the path
38400   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38401   # take no chances and rewrite it.
38402   # Note: m4 eats our [], so we need to use [ and ] instead.
38403   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38404   if test "x$has_forbidden_chars" != x; then
38405     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38406     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38407     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38408     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38409       # Going to short mode and back again did indeed matter. Since short mode is
38410       # case insensitive, let's make it lowercase to improve readability.
38411       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38412       # Now convert it back to Unix-style (cygpath)
38413       input_path=`$CYGPATH -u "$shortmode_path"`
38414       new_path="$input_path"
38415     fi
38416   fi
38417 
38418   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38419   if test "x$test_cygdrive_prefix" = x; then
38420     # As a simple fix, exclude /usr/bin since it's not a real path.
38421     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38422       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38423       # a path prefixed by /cygdrive for fixpath to work.
38424       new_path="$CYGWIN_ROOT_PATH$input_path"
38425     fi
38426   fi
38427 
38428   # remove trailing .exe if any
38429   new_path="${new_path/%.exe/}"
38430 
38431     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38432 
38433   # First separate the path from the arguments. This will split at the first
38434   # space.
38435   complete="$LIPO"
38436   path="${complete%% *}"
38437   tmp="$complete EOL"
38438   arguments="${tmp#* }"
38439 
38440   # Input might be given as Windows format, start by converting to
38441   # unix format.
38442   new_path="$path"
38443 
38444   windows_path="$new_path"
38445   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38446     unix_path=`$CYGPATH -u "$windows_path"`
38447     new_path="$unix_path"
38448   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38449     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38450     new_path="$unix_path"
38451   fi
38452 
38453 
38454   # Now try to locate executable using which
38455   new_path=`$WHICH "$new_path" 2> /dev/null`
38456 
38457   if test "x$new_path" = x; then
38458     # Oops. Which didn't find the executable.
38459     # The splitting of arguments from the executable at a space might have been incorrect,
38460     # since paths with space are more likely in Windows. Give it another try with the whole
38461     # argument.
38462     path="$complete"
38463     arguments="EOL"
38464     new_path="$path"
38465 
38466   windows_path="$new_path"
38467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38468     unix_path=`$CYGPATH -u "$windows_path"`
38469     new_path="$unix_path"
38470   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38471     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38472     new_path="$unix_path"
38473   fi
38474 
38475 
38476     new_path=`$WHICH "$new_path" 2> /dev/null`
38477     # bat and cmd files are not always considered executable in MSYS causing which
38478     # to not find them
38479     if test "x$new_path" = x \
38480         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38481         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38482       new_path="$path"
38483 
38484   windows_path="$new_path"
38485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38486     unix_path=`$CYGPATH -u "$windows_path"`
38487     new_path="$unix_path"
38488   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38489     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38490     new_path="$unix_path"
38491   fi
38492 
38493     fi
38494 
38495     if test "x$new_path" = x; then
38496       # It's still not found. Now this is an unrecoverable error.
38497       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38498 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38499       has_space=`$ECHO "$complete" | $GREP " "`
38500       if test "x$has_space" != x; then
38501         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38502 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38503       fi
38504       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38505     fi
38506   fi
38507 
38508   # Now new_path has a complete unix path to the binary
38509   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38510     # Keep paths in /bin as-is, but remove trailing .exe if any
38511     new_path="${new_path/%.exe/}"
38512     # Do not save /bin paths to all_fixpath_prefixes!
38513   else
38514     # Not in mixed or Windows style, start by that.
38515     new_path=`cmd //c echo $new_path`
38516 
38517   input_path="$new_path"
38518   # Check if we need to convert this using DOS-style short mode. If the path
38519   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38520   # take no chances and rewrite it.
38521   # Note: m4 eats our [], so we need to use [ and ] instead.
38522   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38523   if test "x$has_forbidden_chars" != x; then
38524     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38525     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38526   fi
38527 
38528     # Output is in $new_path
38529 
38530   windows_path="$new_path"
38531   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38532     unix_path=`$CYGPATH -u "$windows_path"`
38533     new_path="$unix_path"
38534   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38535     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38536     new_path="$unix_path"
38537   fi
38538 
38539     # remove trailing .exe if any
38540     new_path="${new_path/%.exe/}"
38541 
38542     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38543     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38544   fi
38545 
38546     else
38547       # We're on a unix platform. Hooray! :)
38548       # First separate the path from the arguments. This will split at the first
38549       # space.
38550       complete="$LIPO"
38551       path="${complete%% *}"
38552       tmp="$complete EOL"
38553       arguments="${tmp#* }"
38554 
38555       # Cannot rely on the command "which" here since it doesn't always work.
38556       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38557       if test -z "$is_absolute_path"; then
38558         # Path to executable is not absolute. Find it.
38559         IFS_save="$IFS"
38560         IFS=:
38561         for p in $PATH; do
38562           if test -f "$p/$path" && test -x "$p/$path"; then
38563             new_path="$p/$path"
38564             break
38565           fi
38566         done
38567         IFS="$IFS_save"
38568       else
38569         # This is an absolute path, we can use it without further modifications.
38570         new_path="$path"
38571       fi
38572 
38573       if test "x$new_path" = x; then
38574         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38575 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38576         has_space=`$ECHO "$complete" | $GREP " "`
38577         if test "x$has_space" != x; then
38578           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38579 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38580         fi
38581         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38582       fi
38583     fi
38584 
38585     # Now join together the path and the arguments once again
38586     if test "x$arguments" != xEOL; then
38587       new_complete="$new_path ${arguments% *}"
38588     else
38589       new_complete="$new_path"
38590     fi
38591 
38592     if test "x$complete" != "x$new_complete"; then
38593       LIPO="$new_complete"
38594       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38595 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38596     fi
38597   fi
38598 
38599   fi
38600 
38601   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38602     # Extract the first word of "mt", so it can be a program name with args.
38603 set dummy mt; ac_word=$2
38604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38605 $as_echo_n "checking for $ac_word... " >&6; }
38606 if ${ac_cv_prog_MT+:} false; then :
38607   $as_echo_n "(cached) " >&6
38608 else
38609   if test -n "$MT"; then
38610   ac_cv_prog_MT="$MT" # Let the user override the test.
38611 else
38612   ac_prog_rejected=no
38613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38614 for as_dir in $PATH
38615 do
38616   IFS=$as_save_IFS
38617   test -z "$as_dir" && as_dir=.
38618     for ac_exec_ext in '' $ac_executable_extensions; do
38619   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38620     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38621        ac_prog_rejected=yes
38622        continue
38623      fi
38624     ac_cv_prog_MT="mt"
38625     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38626     break 2
38627   fi
38628 done
38629   done
38630 IFS=$as_save_IFS
38631 
38632 if test $ac_prog_rejected = yes; then
38633   # We found a bogon in the path, so make sure we never use it.
38634   set dummy $ac_cv_prog_MT
38635   shift
38636   if test $# != 0; then
38637     # We chose a different compiler from the bogus one.
38638     # However, it has the same basename, so the bogon will be chosen
38639     # first if we set MT to just the basename; use the full file name.
38640     shift
38641     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38642   fi
38643 fi
38644 fi
38645 fi
38646 MT=$ac_cv_prog_MT
38647 if test -n "$MT"; then
38648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38649 $as_echo "$MT" >&6; }
38650 else
38651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38652 $as_echo "no" >&6; }
38653 fi
38654 
38655 
38656 
38657   # Only process if variable expands to non-empty
38658 
38659   if test "x$MT" != x; then
38660     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38661 
38662   # First separate the path from the arguments. This will split at the first
38663   # space.
38664   complete="$MT"
38665   path="${complete%% *}"
38666   tmp="$complete EOL"
38667   arguments="${tmp#* }"
38668 
38669   # Input might be given as Windows format, start by converting to
38670   # unix format.
38671   new_path=`$CYGPATH -u "$path"`
38672 
38673   # Now try to locate executable using which
38674   new_path=`$WHICH "$new_path" 2> /dev/null`
38675   # bat and cmd files are not always considered executable in cygwin causing which
38676   # to not find them
38677   if test "x$new_path" = x \
38678       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38679       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38680     new_path=`$CYGPATH -u "$path"`
38681   fi
38682   if test "x$new_path" = x; then
38683     # Oops. Which didn't find the executable.
38684     # The splitting of arguments from the executable at a space might have been incorrect,
38685     # since paths with space are more likely in Windows. Give it another try with the whole
38686     # argument.
38687     path="$complete"
38688     arguments="EOL"
38689     new_path=`$CYGPATH -u "$path"`
38690     new_path=`$WHICH "$new_path" 2> /dev/null`
38691     # bat and cmd files are not always considered executable in cygwin causing which
38692     # to not find them
38693     if test "x$new_path" = x \
38694         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38695         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38696       new_path=`$CYGPATH -u "$path"`
38697     fi
38698     if test "x$new_path" = x; then
38699       # It's still not found. Now this is an unrecoverable error.
38700       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38701 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38702       has_space=`$ECHO "$complete" | $GREP " "`
38703       if test "x$has_space" != x; then
38704         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38705 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38706       fi
38707       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38708     fi
38709   fi
38710 
38711   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38712   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38713   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38714   # "foo.exe" is OK but "foo" is an error.
38715   #
38716   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38717   # It is also a way to make sure we got the proper file name for the real test later on.
38718   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38719   if test "x$test_shortpath" = x; then
38720     # Short path failed, file does not exist as specified.
38721     # Try adding .exe or .cmd
38722     if test -f "${new_path}.exe"; then
38723       input_to_shortpath="${new_path}.exe"
38724     elif test -f "${new_path}.cmd"; then
38725       input_to_shortpath="${new_path}.cmd"
38726     else
38727       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38728 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38729       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38730 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38731       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38732     fi
38733   else
38734     input_to_shortpath="$new_path"
38735   fi
38736 
38737   # Call helper function which possibly converts this using DOS-style short mode.
38738   # If so, the updated path is stored in $new_path.
38739   new_path="$input_to_shortpath"
38740 
38741   input_path="$input_to_shortpath"
38742   # Check if we need to convert this using DOS-style short mode. If the path
38743   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38744   # take no chances and rewrite it.
38745   # Note: m4 eats our [], so we need to use [ and ] instead.
38746   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38747   if test "x$has_forbidden_chars" != x; then
38748     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38749     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38750     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38751     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38752       # Going to short mode and back again did indeed matter. Since short mode is
38753       # case insensitive, let's make it lowercase to improve readability.
38754       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38755       # Now convert it back to Unix-style (cygpath)
38756       input_path=`$CYGPATH -u "$shortmode_path"`
38757       new_path="$input_path"
38758     fi
38759   fi
38760 
38761   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38762   if test "x$test_cygdrive_prefix" = x; then
38763     # As a simple fix, exclude /usr/bin since it's not a real path.
38764     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38765       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38766       # a path prefixed by /cygdrive for fixpath to work.
38767       new_path="$CYGWIN_ROOT_PATH$input_path"
38768     fi
38769   fi
38770 
38771   # remove trailing .exe if any
38772   new_path="${new_path/%.exe/}"
38773 
38774     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38775 
38776   # First separate the path from the arguments. This will split at the first
38777   # space.
38778   complete="$MT"
38779   path="${complete%% *}"
38780   tmp="$complete EOL"
38781   arguments="${tmp#* }"
38782 
38783   # Input might be given as Windows format, start by converting to
38784   # unix format.
38785   new_path="$path"
38786 
38787   windows_path="$new_path"
38788   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38789     unix_path=`$CYGPATH -u "$windows_path"`
38790     new_path="$unix_path"
38791   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38792     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38793     new_path="$unix_path"
38794   fi
38795 
38796 
38797   # Now try to locate executable using which
38798   new_path=`$WHICH "$new_path" 2> /dev/null`
38799 
38800   if test "x$new_path" = x; then
38801     # Oops. Which didn't find the executable.
38802     # The splitting of arguments from the executable at a space might have been incorrect,
38803     # since paths with space are more likely in Windows. Give it another try with the whole
38804     # argument.
38805     path="$complete"
38806     arguments="EOL"
38807     new_path="$path"
38808 
38809   windows_path="$new_path"
38810   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38811     unix_path=`$CYGPATH -u "$windows_path"`
38812     new_path="$unix_path"
38813   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38814     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38815     new_path="$unix_path"
38816   fi
38817 
38818 
38819     new_path=`$WHICH "$new_path" 2> /dev/null`
38820     # bat and cmd files are not always considered executable in MSYS causing which
38821     # to not find them
38822     if test "x$new_path" = x \
38823         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38824         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38825       new_path="$path"
38826 
38827   windows_path="$new_path"
38828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38829     unix_path=`$CYGPATH -u "$windows_path"`
38830     new_path="$unix_path"
38831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38832     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38833     new_path="$unix_path"
38834   fi
38835 
38836     fi
38837 
38838     if test "x$new_path" = x; then
38839       # It's still not found. Now this is an unrecoverable error.
38840       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38841 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38842       has_space=`$ECHO "$complete" | $GREP " "`
38843       if test "x$has_space" != x; then
38844         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38845 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38846       fi
38847       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38848     fi
38849   fi
38850 
38851   # Now new_path has a complete unix path to the binary
38852   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38853     # Keep paths in /bin as-is, but remove trailing .exe if any
38854     new_path="${new_path/%.exe/}"
38855     # Do not save /bin paths to all_fixpath_prefixes!
38856   else
38857     # Not in mixed or Windows style, start by that.
38858     new_path=`cmd //c echo $new_path`
38859 
38860   input_path="$new_path"
38861   # Check if we need to convert this using DOS-style short mode. If the path
38862   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38863   # take no chances and rewrite it.
38864   # Note: m4 eats our [], so we need to use [ and ] instead.
38865   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38866   if test "x$has_forbidden_chars" != x; then
38867     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38868     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38869   fi
38870 
38871     # Output is in $new_path
38872 
38873   windows_path="$new_path"
38874   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38875     unix_path=`$CYGPATH -u "$windows_path"`
38876     new_path="$unix_path"
38877   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38878     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38879     new_path="$unix_path"
38880   fi
38881 
38882     # remove trailing .exe if any
38883     new_path="${new_path/%.exe/}"
38884 
38885     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38886     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38887   fi
38888 
38889     else
38890       # We're on a unix platform. Hooray! :)
38891       # First separate the path from the arguments. This will split at the first
38892       # space.
38893       complete="$MT"
38894       path="${complete%% *}"
38895       tmp="$complete EOL"
38896       arguments="${tmp#* }"
38897 
38898       # Cannot rely on the command "which" here since it doesn't always work.
38899       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38900       if test -z "$is_absolute_path"; then
38901         # Path to executable is not absolute. Find it.
38902         IFS_save="$IFS"
38903         IFS=:
38904         for p in $PATH; do
38905           if test -f "$p/$path" && test -x "$p/$path"; then
38906             new_path="$p/$path"
38907             break
38908           fi
38909         done
38910         IFS="$IFS_save"
38911       else
38912         # This is an absolute path, we can use it without further modifications.
38913         new_path="$path"
38914       fi
38915 
38916       if test "x$new_path" = x; then
38917         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38918 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38919         has_space=`$ECHO "$complete" | $GREP " "`
38920         if test "x$has_space" != x; then
38921           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38922 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38923         fi
38924         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38925       fi
38926     fi
38927 
38928     # Now join together the path and the arguments once again
38929     if test "x$arguments" != xEOL; then
38930       new_complete="$new_path ${arguments% *}"
38931     else
38932       new_complete="$new_path"
38933     fi
38934 
38935     if test "x$complete" != "x$new_complete"; then
38936       MT="$new_complete"
38937       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38938 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38939     fi
38940   fi
38941 
38942     # Setup the resource compiler (RC)
38943     # Extract the first word of "rc", so it can be a program name with args.
38944 set dummy rc; ac_word=$2
38945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38946 $as_echo_n "checking for $ac_word... " >&6; }
38947 if ${ac_cv_prog_RC+:} false; then :
38948   $as_echo_n "(cached) " >&6
38949 else
38950   if test -n "$RC"; then
38951   ac_cv_prog_RC="$RC" # Let the user override the test.
38952 else
38953   ac_prog_rejected=no
38954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38955 for as_dir in $PATH
38956 do
38957   IFS=$as_save_IFS
38958   test -z "$as_dir" && as_dir=.
38959     for ac_exec_ext in '' $ac_executable_extensions; do
38960   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38961     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38962        ac_prog_rejected=yes
38963        continue
38964      fi
38965     ac_cv_prog_RC="rc"
38966     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38967     break 2
38968   fi
38969 done
38970   done
38971 IFS=$as_save_IFS
38972 
38973 if test $ac_prog_rejected = yes; then
38974   # We found a bogon in the path, so make sure we never use it.
38975   set dummy $ac_cv_prog_RC
38976   shift
38977   if test $# != 0; then
38978     # We chose a different compiler from the bogus one.
38979     # However, it has the same basename, so the bogon will be chosen
38980     # first if we set RC to just the basename; use the full file name.
38981     shift
38982     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38983   fi
38984 fi
38985 fi
38986 fi
38987 RC=$ac_cv_prog_RC
38988 if test -n "$RC"; then
38989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38990 $as_echo "$RC" >&6; }
38991 else
38992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38993 $as_echo "no" >&6; }
38994 fi
38995 
38996 
38997 
38998   # Only process if variable expands to non-empty
38999 
39000   if test "x$RC" != x; then
39001     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39002 
39003   # First separate the path from the arguments. This will split at the first
39004   # space.
39005   complete="$RC"
39006   path="${complete%% *}"
39007   tmp="$complete EOL"
39008   arguments="${tmp#* }"
39009 
39010   # Input might be given as Windows format, start by converting to
39011   # unix format.
39012   new_path=`$CYGPATH -u "$path"`
39013 
39014   # Now try to locate executable using which
39015   new_path=`$WHICH "$new_path" 2> /dev/null`
39016   # bat and cmd files are not always considered executable in cygwin causing which
39017   # to not find them
39018   if test "x$new_path" = x \
39019       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39020       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39021     new_path=`$CYGPATH -u "$path"`
39022   fi
39023   if test "x$new_path" = x; then
39024     # Oops. Which didn't find the executable.
39025     # The splitting of arguments from the executable at a space might have been incorrect,
39026     # since paths with space are more likely in Windows. Give it another try with the whole
39027     # argument.
39028     path="$complete"
39029     arguments="EOL"
39030     new_path=`$CYGPATH -u "$path"`
39031     new_path=`$WHICH "$new_path" 2> /dev/null`
39032     # bat and cmd files are not always considered executable in cygwin causing which
39033     # to not find them
39034     if test "x$new_path" = x \
39035         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39036         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39037       new_path=`$CYGPATH -u "$path"`
39038     fi
39039     if test "x$new_path" = x; then
39040       # It's still not found. Now this is an unrecoverable error.
39041       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39042 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39043       has_space=`$ECHO "$complete" | $GREP " "`
39044       if test "x$has_space" != x; then
39045         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39046 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39047       fi
39048       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39049     fi
39050   fi
39051 
39052   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39053   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39054   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39055   # "foo.exe" is OK but "foo" is an error.
39056   #
39057   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39058   # It is also a way to make sure we got the proper file name for the real test later on.
39059   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39060   if test "x$test_shortpath" = x; then
39061     # Short path failed, file does not exist as specified.
39062     # Try adding .exe or .cmd
39063     if test -f "${new_path}.exe"; then
39064       input_to_shortpath="${new_path}.exe"
39065     elif test -f "${new_path}.cmd"; then
39066       input_to_shortpath="${new_path}.cmd"
39067     else
39068       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39069 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39070       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39071 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39072       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39073     fi
39074   else
39075     input_to_shortpath="$new_path"
39076   fi
39077 
39078   # Call helper function which possibly converts this using DOS-style short mode.
39079   # If so, the updated path is stored in $new_path.
39080   new_path="$input_to_shortpath"
39081 
39082   input_path="$input_to_shortpath"
39083   # Check if we need to convert this using DOS-style short mode. If the path
39084   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39085   # take no chances and rewrite it.
39086   # Note: m4 eats our [], so we need to use [ and ] instead.
39087   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39088   if test "x$has_forbidden_chars" != x; then
39089     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39090     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39091     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39092     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39093       # Going to short mode and back again did indeed matter. Since short mode is
39094       # case insensitive, let's make it lowercase to improve readability.
39095       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39096       # Now convert it back to Unix-style (cygpath)
39097       input_path=`$CYGPATH -u "$shortmode_path"`
39098       new_path="$input_path"
39099     fi
39100   fi
39101 
39102   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39103   if test "x$test_cygdrive_prefix" = x; then
39104     # As a simple fix, exclude /usr/bin since it's not a real path.
39105     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39106       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39107       # a path prefixed by /cygdrive for fixpath to work.
39108       new_path="$CYGWIN_ROOT_PATH$input_path"
39109     fi
39110   fi
39111 
39112   # remove trailing .exe if any
39113   new_path="${new_path/%.exe/}"
39114 
39115     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39116 
39117   # First separate the path from the arguments. This will split at the first
39118   # space.
39119   complete="$RC"
39120   path="${complete%% *}"
39121   tmp="$complete EOL"
39122   arguments="${tmp#* }"
39123 
39124   # Input might be given as Windows format, start by converting to
39125   # unix format.
39126   new_path="$path"
39127 
39128   windows_path="$new_path"
39129   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39130     unix_path=`$CYGPATH -u "$windows_path"`
39131     new_path="$unix_path"
39132   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39133     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39134     new_path="$unix_path"
39135   fi
39136 
39137 
39138   # Now try to locate executable using which
39139   new_path=`$WHICH "$new_path" 2> /dev/null`
39140 
39141   if test "x$new_path" = x; then
39142     # Oops. Which didn't find the executable.
39143     # The splitting of arguments from the executable at a space might have been incorrect,
39144     # since paths with space are more likely in Windows. Give it another try with the whole
39145     # argument.
39146     path="$complete"
39147     arguments="EOL"
39148     new_path="$path"
39149 
39150   windows_path="$new_path"
39151   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39152     unix_path=`$CYGPATH -u "$windows_path"`
39153     new_path="$unix_path"
39154   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39155     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39156     new_path="$unix_path"
39157   fi
39158 
39159 
39160     new_path=`$WHICH "$new_path" 2> /dev/null`
39161     # bat and cmd files are not always considered executable in MSYS causing which
39162     # to not find them
39163     if test "x$new_path" = x \
39164         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39165         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39166       new_path="$path"
39167 
39168   windows_path="$new_path"
39169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39170     unix_path=`$CYGPATH -u "$windows_path"`
39171     new_path="$unix_path"
39172   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39173     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39174     new_path="$unix_path"
39175   fi
39176 
39177     fi
39178 
39179     if test "x$new_path" = x; then
39180       # It's still not found. Now this is an unrecoverable error.
39181       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39182 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39183       has_space=`$ECHO "$complete" | $GREP " "`
39184       if test "x$has_space" != x; then
39185         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39186 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39187       fi
39188       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39189     fi
39190   fi
39191 
39192   # Now new_path has a complete unix path to the binary
39193   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39194     # Keep paths in /bin as-is, but remove trailing .exe if any
39195     new_path="${new_path/%.exe/}"
39196     # Do not save /bin paths to all_fixpath_prefixes!
39197   else
39198     # Not in mixed or Windows style, start by that.
39199     new_path=`cmd //c echo $new_path`
39200 
39201   input_path="$new_path"
39202   # Check if we need to convert this using DOS-style short mode. If the path
39203   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39204   # take no chances and rewrite it.
39205   # Note: m4 eats our [], so we need to use [ and ] instead.
39206   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39207   if test "x$has_forbidden_chars" != x; then
39208     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39209     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39210   fi
39211 
39212     # Output is in $new_path
39213 
39214   windows_path="$new_path"
39215   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39216     unix_path=`$CYGPATH -u "$windows_path"`
39217     new_path="$unix_path"
39218   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39219     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39220     new_path="$unix_path"
39221   fi
39222 
39223     # remove trailing .exe if any
39224     new_path="${new_path/%.exe/}"
39225 
39226     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39227     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39228   fi
39229 
39230     else
39231       # We're on a unix platform. Hooray! :)
39232       # First separate the path from the arguments. This will split at the first
39233       # space.
39234       complete="$RC"
39235       path="${complete%% *}"
39236       tmp="$complete EOL"
39237       arguments="${tmp#* }"
39238 
39239       # Cannot rely on the command "which" here since it doesn't always work.
39240       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39241       if test -z "$is_absolute_path"; then
39242         # Path to executable is not absolute. Find it.
39243         IFS_save="$IFS"
39244         IFS=:
39245         for p in $PATH; do
39246           if test -f "$p/$path" && test -x "$p/$path"; then
39247             new_path="$p/$path"
39248             break
39249           fi
39250         done
39251         IFS="$IFS_save"
39252       else
39253         # This is an absolute path, we can use it without further modifications.
39254         new_path="$path"
39255       fi
39256 
39257       if test "x$new_path" = x; then
39258         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39259 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39260         has_space=`$ECHO "$complete" | $GREP " "`
39261         if test "x$has_space" != x; then
39262           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39263 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39264         fi
39265         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39266       fi
39267     fi
39268 
39269     # Now join together the path and the arguments once again
39270     if test "x$arguments" != xEOL; then
39271       new_complete="$new_path ${arguments% *}"
39272     else
39273       new_complete="$new_path"
39274     fi
39275 
39276     if test "x$complete" != "x$new_complete"; then
39277       RC="$new_complete"
39278       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39279 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39280     fi
39281   fi
39282 
39283     # Extract the first word of "dumpbin", so it can be a program name with args.
39284 set dummy dumpbin; ac_word=$2
39285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39286 $as_echo_n "checking for $ac_word... " >&6; }
39287 if ${ac_cv_prog_DUMPBIN+:} false; then :
39288   $as_echo_n "(cached) " >&6
39289 else
39290   if test -n "$DUMPBIN"; then
39291   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39292 else
39293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39294 for as_dir in $PATH
39295 do
39296   IFS=$as_save_IFS
39297   test -z "$as_dir" && as_dir=.
39298     for ac_exec_ext in '' $ac_executable_extensions; do
39299   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39300     ac_cv_prog_DUMPBIN="dumpbin"
39301     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39302     break 2
39303   fi
39304 done
39305   done
39306 IFS=$as_save_IFS
39307 
39308 fi
39309 fi
39310 DUMPBIN=$ac_cv_prog_DUMPBIN
39311 if test -n "$DUMPBIN"; then
39312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39313 $as_echo "$DUMPBIN" >&6; }
39314 else
39315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39316 $as_echo "no" >&6; }
39317 fi
39318 
39319 
39320 
39321   # Only process if variable expands to non-empty
39322 
39323   if test "x$DUMPBIN" != x; then
39324     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39325 
39326   # First separate the path from the arguments. This will split at the first
39327   # space.
39328   complete="$DUMPBIN"
39329   path="${complete%% *}"
39330   tmp="$complete EOL"
39331   arguments="${tmp#* }"
39332 
39333   # Input might be given as Windows format, start by converting to
39334   # unix format.
39335   new_path=`$CYGPATH -u "$path"`
39336 
39337   # Now try to locate executable using which
39338   new_path=`$WHICH "$new_path" 2> /dev/null`
39339   # bat and cmd files are not always considered executable in cygwin causing which
39340   # to not find them
39341   if test "x$new_path" = x \
39342       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39343       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39344     new_path=`$CYGPATH -u "$path"`
39345   fi
39346   if test "x$new_path" = x; then
39347     # Oops. Which didn't find the executable.
39348     # The splitting of arguments from the executable at a space might have been incorrect,
39349     # since paths with space are more likely in Windows. Give it another try with the whole
39350     # argument.
39351     path="$complete"
39352     arguments="EOL"
39353     new_path=`$CYGPATH -u "$path"`
39354     new_path=`$WHICH "$new_path" 2> /dev/null`
39355     # bat and cmd files are not always considered executable in cygwin causing which
39356     # to not find them
39357     if test "x$new_path" = x \
39358         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39359         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39360       new_path=`$CYGPATH -u "$path"`
39361     fi
39362     if test "x$new_path" = x; then
39363       # It's still not found. Now this is an unrecoverable error.
39364       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39365 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39366       has_space=`$ECHO "$complete" | $GREP " "`
39367       if test "x$has_space" != x; then
39368         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39369 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39370       fi
39371       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39372     fi
39373   fi
39374 
39375   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39376   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39377   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39378   # "foo.exe" is OK but "foo" is an error.
39379   #
39380   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39381   # It is also a way to make sure we got the proper file name for the real test later on.
39382   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39383   if test "x$test_shortpath" = x; then
39384     # Short path failed, file does not exist as specified.
39385     # Try adding .exe or .cmd
39386     if test -f "${new_path}.exe"; then
39387       input_to_shortpath="${new_path}.exe"
39388     elif test -f "${new_path}.cmd"; then
39389       input_to_shortpath="${new_path}.cmd"
39390     else
39391       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39392 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39393       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39394 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39395       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39396     fi
39397   else
39398     input_to_shortpath="$new_path"
39399   fi
39400 
39401   # Call helper function which possibly converts this using DOS-style short mode.
39402   # If so, the updated path is stored in $new_path.
39403   new_path="$input_to_shortpath"
39404 
39405   input_path="$input_to_shortpath"
39406   # Check if we need to convert this using DOS-style short mode. If the path
39407   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39408   # take no chances and rewrite it.
39409   # Note: m4 eats our [], so we need to use [ and ] instead.
39410   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39411   if test "x$has_forbidden_chars" != x; then
39412     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39413     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39414     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39415     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39416       # Going to short mode and back again did indeed matter. Since short mode is
39417       # case insensitive, let's make it lowercase to improve readability.
39418       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39419       # Now convert it back to Unix-style (cygpath)
39420       input_path=`$CYGPATH -u "$shortmode_path"`
39421       new_path="$input_path"
39422     fi
39423   fi
39424 
39425   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39426   if test "x$test_cygdrive_prefix" = x; then
39427     # As a simple fix, exclude /usr/bin since it's not a real path.
39428     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39429       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39430       # a path prefixed by /cygdrive for fixpath to work.
39431       new_path="$CYGWIN_ROOT_PATH$input_path"
39432     fi
39433   fi
39434 
39435   # remove trailing .exe if any
39436   new_path="${new_path/%.exe/}"
39437 
39438     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39439 
39440   # First separate the path from the arguments. This will split at the first
39441   # space.
39442   complete="$DUMPBIN"
39443   path="${complete%% *}"
39444   tmp="$complete EOL"
39445   arguments="${tmp#* }"
39446 
39447   # Input might be given as Windows format, start by converting to
39448   # unix format.
39449   new_path="$path"
39450 
39451   windows_path="$new_path"
39452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39453     unix_path=`$CYGPATH -u "$windows_path"`
39454     new_path="$unix_path"
39455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39456     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39457     new_path="$unix_path"
39458   fi
39459 
39460 
39461   # Now try to locate executable using which
39462   new_path=`$WHICH "$new_path" 2> /dev/null`
39463 
39464   if test "x$new_path" = x; then
39465     # Oops. Which didn't find the executable.
39466     # The splitting of arguments from the executable at a space might have been incorrect,
39467     # since paths with space are more likely in Windows. Give it another try with the whole
39468     # argument.
39469     path="$complete"
39470     arguments="EOL"
39471     new_path="$path"
39472 
39473   windows_path="$new_path"
39474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39475     unix_path=`$CYGPATH -u "$windows_path"`
39476     new_path="$unix_path"
39477   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39478     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39479     new_path="$unix_path"
39480   fi
39481 
39482 
39483     new_path=`$WHICH "$new_path" 2> /dev/null`
39484     # bat and cmd files are not always considered executable in MSYS causing which
39485     # to not find them
39486     if test "x$new_path" = x \
39487         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39488         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39489       new_path="$path"
39490 
39491   windows_path="$new_path"
39492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39493     unix_path=`$CYGPATH -u "$windows_path"`
39494     new_path="$unix_path"
39495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39496     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39497     new_path="$unix_path"
39498   fi
39499 
39500     fi
39501 
39502     if test "x$new_path" = x; then
39503       # It's still not found. Now this is an unrecoverable error.
39504       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39505 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39506       has_space=`$ECHO "$complete" | $GREP " "`
39507       if test "x$has_space" != x; then
39508         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39509 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39510       fi
39511       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39512     fi
39513   fi
39514 
39515   # Now new_path has a complete unix path to the binary
39516   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39517     # Keep paths in /bin as-is, but remove trailing .exe if any
39518     new_path="${new_path/%.exe/}"
39519     # Do not save /bin paths to all_fixpath_prefixes!
39520   else
39521     # Not in mixed or Windows style, start by that.
39522     new_path=`cmd //c echo $new_path`
39523 
39524   input_path="$new_path"
39525   # Check if we need to convert this using DOS-style short mode. If the path
39526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39527   # take no chances and rewrite it.
39528   # Note: m4 eats our [], so we need to use [ and ] instead.
39529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39530   if test "x$has_forbidden_chars" != x; then
39531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39532     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39533   fi
39534 
39535     # Output is in $new_path
39536 
39537   windows_path="$new_path"
39538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39539     unix_path=`$CYGPATH -u "$windows_path"`
39540     new_path="$unix_path"
39541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39543     new_path="$unix_path"
39544   fi
39545 
39546     # remove trailing .exe if any
39547     new_path="${new_path/%.exe/}"
39548 
39549     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39550     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39551   fi
39552 
39553     else
39554       # We're on a unix platform. Hooray! :)
39555       # First separate the path from the arguments. This will split at the first
39556       # space.
39557       complete="$DUMPBIN"
39558       path="${complete%% *}"
39559       tmp="$complete EOL"
39560       arguments="${tmp#* }"
39561 
39562       # Cannot rely on the command "which" here since it doesn't always work.
39563       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39564       if test -z "$is_absolute_path"; then
39565         # Path to executable is not absolute. Find it.
39566         IFS_save="$IFS"
39567         IFS=:
39568         for p in $PATH; do
39569           if test -f "$p/$path" && test -x "$p/$path"; then
39570             new_path="$p/$path"
39571             break
39572           fi
39573         done
39574         IFS="$IFS_save"
39575       else
39576         # This is an absolute path, we can use it without further modifications.
39577         new_path="$path"
39578       fi
39579 
39580       if test "x$new_path" = x; then
39581         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39582 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39583         has_space=`$ECHO "$complete" | $GREP " "`
39584         if test "x$has_space" != x; then
39585           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39586 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39587         fi
39588         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39589       fi
39590     fi
39591 
39592     # Now join together the path and the arguments once again
39593     if test "x$arguments" != xEOL; then
39594       new_complete="$new_path ${arguments% *}"
39595     else
39596       new_complete="$new_path"
39597     fi
39598 
39599     if test "x$complete" != "x$new_complete"; then
39600       DUMPBIN="$new_complete"
39601       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39602 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39603     fi
39604   fi
39605 
39606     # We need to check for 'msbuild.exe' because at the place where we expect to
39607     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39608     # won't find the 'msbuild.exe' executable in that case (and the
39609     # 'ac_executable_extensions' is unusable due to performance reasons).
39610     # Notice that we intentionally don't fix up the path to MSBUILD because we
39611     # will call it in a DOS shell during freetype detection on Windows (see
39612     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39613     # Extract the first word of "msbuild.exe", so it can be a program name with args.
39614 set dummy msbuild.exe; ac_word=$2
39615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39616 $as_echo_n "checking for $ac_word... " >&6; }
39617 if ${ac_cv_prog_MSBUILD+:} false; then :
39618   $as_echo_n "(cached) " >&6
39619 else
39620   if test -n "$MSBUILD"; then
39621   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39622 else
39623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39624 for as_dir in $PATH
39625 do
39626   IFS=$as_save_IFS
39627   test -z "$as_dir" && as_dir=.
39628     for ac_exec_ext in '' $ac_executable_extensions; do
39629   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39630     ac_cv_prog_MSBUILD="msbuild.exe"
39631     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39632     break 2
39633   fi
39634 done
39635   done
39636 IFS=$as_save_IFS
39637 
39638 fi
39639 fi
39640 MSBUILD=$ac_cv_prog_MSBUILD
39641 if test -n "$MSBUILD"; then
39642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39643 $as_echo "$MSBUILD" >&6; }
39644 else
39645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39646 $as_echo "no" >&6; }
39647 fi
39648 
39649 
39650   fi
39651 
39652   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39653 
39654 
39655   # Publish this variable in the help.
39656 
39657 
39658   if [ -z "${STRIP+x}" ]; then
39659     # The variable is not set by user, try to locate tool using the code snippet
39660     for ac_prog in strip
39661 do
39662   # Extract the first word of "$ac_prog", so it can be a program name with args.
39663 set dummy $ac_prog; ac_word=$2
39664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39665 $as_echo_n "checking for $ac_word... " >&6; }
39666 if ${ac_cv_path_STRIP+:} false; then :
39667   $as_echo_n "(cached) " >&6
39668 else
39669   case $STRIP in
39670   [\\/]* | ?:[\\/]*)
39671   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39672   ;;
39673   *)
39674   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39675 for as_dir in $PATH
39676 do
39677   IFS=$as_save_IFS
39678   test -z "$as_dir" && as_dir=.
39679     for ac_exec_ext in '' $ac_executable_extensions; do
39680   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39681     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39682     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39683     break 2
39684   fi
39685 done
39686   done
39687 IFS=$as_save_IFS
39688 
39689   ;;
39690 esac
39691 fi
39692 STRIP=$ac_cv_path_STRIP
39693 if test -n "$STRIP"; then
39694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39695 $as_echo "$STRIP" >&6; }
39696 else
39697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39698 $as_echo "no" >&6; }
39699 fi
39700 
39701 
39702   test -n "$STRIP" && break
39703 done
39704 
39705   else
39706     # The variable is set, but is it from the command line or the environment?
39707 
39708     # Try to remove the string !STRIP! from our list.
39709     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39710     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39711       # If it failed, the variable was not from the command line. Ignore it,
39712       # but warn the user (except for BASH, which is always set by the calling BASH).
39713       if test "xSTRIP" != xBASH; then
39714         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39715 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39716       fi
39717       # Try to locate tool using the code snippet
39718       for ac_prog in strip
39719 do
39720   # Extract the first word of "$ac_prog", so it can be a program name with args.
39721 set dummy $ac_prog; ac_word=$2
39722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39723 $as_echo_n "checking for $ac_word... " >&6; }
39724 if ${ac_cv_path_STRIP+:} false; then :
39725   $as_echo_n "(cached) " >&6
39726 else
39727   case $STRIP in
39728   [\\/]* | ?:[\\/]*)
39729   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39730   ;;
39731   *)
39732   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39733 for as_dir in $PATH
39734 do
39735   IFS=$as_save_IFS
39736   test -z "$as_dir" && as_dir=.
39737     for ac_exec_ext in '' $ac_executable_extensions; do
39738   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39739     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39740     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39741     break 2
39742   fi
39743 done
39744   done
39745 IFS=$as_save_IFS
39746 
39747   ;;
39748 esac
39749 fi
39750 STRIP=$ac_cv_path_STRIP
39751 if test -n "$STRIP"; then
39752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39753 $as_echo "$STRIP" >&6; }
39754 else
39755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39756 $as_echo "no" >&6; }
39757 fi
39758 
39759 
39760   test -n "$STRIP" && break
39761 done
39762 
39763     else
39764       # If it succeeded, then it was overridden by the user. We will use it
39765       # for the tool.
39766 
39767       # First remove it from the list of overridden variables, so we can test
39768       # for unknown variables in the end.
39769       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39770 
39771       # Check if we try to supply an empty value
39772       if test "x$STRIP" = x; then
39773         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39774 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39775         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39776 $as_echo_n "checking for STRIP... " >&6; }
39777         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39778 $as_echo "disabled" >&6; }
39779       else
39780         # Check if the provided tool contains a complete path.
39781         tool_specified="$STRIP"
39782         tool_basename="${tool_specified##*/}"
39783         if test "x$tool_basename" = "x$tool_specified"; then
39784           # A command without a complete path is provided, search $PATH.
39785           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39786 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39787           # Extract the first word of "$tool_basename", so it can be a program name with args.
39788 set dummy $tool_basename; ac_word=$2
39789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39790 $as_echo_n "checking for $ac_word... " >&6; }
39791 if ${ac_cv_path_STRIP+:} false; then :
39792   $as_echo_n "(cached) " >&6
39793 else
39794   case $STRIP in
39795   [\\/]* | ?:[\\/]*)
39796   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39797   ;;
39798   *)
39799   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39800 for as_dir in $PATH
39801 do
39802   IFS=$as_save_IFS
39803   test -z "$as_dir" && as_dir=.
39804     for ac_exec_ext in '' $ac_executable_extensions; do
39805   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39806     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39807     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39808     break 2
39809   fi
39810 done
39811   done
39812 IFS=$as_save_IFS
39813 
39814   ;;
39815 esac
39816 fi
39817 STRIP=$ac_cv_path_STRIP
39818 if test -n "$STRIP"; then
39819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39820 $as_echo "$STRIP" >&6; }
39821 else
39822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39823 $as_echo "no" >&6; }
39824 fi
39825 
39826 
39827           if test "x$STRIP" = x; then
39828             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39829           fi
39830         else
39831           # Otherwise we believe it is a complete path. Use it as it is.
39832           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39833 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39834           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39835 $as_echo_n "checking for STRIP... " >&6; }
39836           if test ! -x "$tool_specified"; then
39837             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39838 $as_echo "not found" >&6; }
39839             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39840           fi
39841           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39842 $as_echo "$tool_specified" >&6; }
39843         fi
39844       fi
39845     fi
39846 
39847   fi
39848 
39849 
39850 
39851   # Only process if variable expands to non-empty
39852 
39853   if test "x$STRIP" != x; then
39854     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39855 
39856   # First separate the path from the arguments. This will split at the first
39857   # space.
39858   complete="$STRIP"
39859   path="${complete%% *}"
39860   tmp="$complete EOL"
39861   arguments="${tmp#* }"
39862 
39863   # Input might be given as Windows format, start by converting to
39864   # unix format.
39865   new_path=`$CYGPATH -u "$path"`
39866 
39867   # Now try to locate executable using which
39868   new_path=`$WHICH "$new_path" 2> /dev/null`
39869   # bat and cmd files are not always considered executable in cygwin causing which
39870   # to not find them
39871   if test "x$new_path" = x \
39872       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39873       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39874     new_path=`$CYGPATH -u "$path"`
39875   fi
39876   if test "x$new_path" = x; then
39877     # Oops. Which didn't find the executable.
39878     # The splitting of arguments from the executable at a space might have been incorrect,
39879     # since paths with space are more likely in Windows. Give it another try with the whole
39880     # argument.
39881     path="$complete"
39882     arguments="EOL"
39883     new_path=`$CYGPATH -u "$path"`
39884     new_path=`$WHICH "$new_path" 2> /dev/null`
39885     # bat and cmd files are not always considered executable in cygwin causing which
39886     # to not find them
39887     if test "x$new_path" = x \
39888         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39889         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39890       new_path=`$CYGPATH -u "$path"`
39891     fi
39892     if test "x$new_path" = x; then
39893       # It's still not found. Now this is an unrecoverable error.
39894       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39895 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39896       has_space=`$ECHO "$complete" | $GREP " "`
39897       if test "x$has_space" != x; then
39898         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39899 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39900       fi
39901       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39902     fi
39903   fi
39904 
39905   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39906   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39907   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39908   # "foo.exe" is OK but "foo" is an error.
39909   #
39910   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39911   # It is also a way to make sure we got the proper file name for the real test later on.
39912   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39913   if test "x$test_shortpath" = x; then
39914     # Short path failed, file does not exist as specified.
39915     # Try adding .exe or .cmd
39916     if test -f "${new_path}.exe"; then
39917       input_to_shortpath="${new_path}.exe"
39918     elif test -f "${new_path}.cmd"; then
39919       input_to_shortpath="${new_path}.cmd"
39920     else
39921       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39922 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39923       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39924 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39925       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39926     fi
39927   else
39928     input_to_shortpath="$new_path"
39929   fi
39930 
39931   # Call helper function which possibly converts this using DOS-style short mode.
39932   # If so, the updated path is stored in $new_path.
39933   new_path="$input_to_shortpath"
39934 
39935   input_path="$input_to_shortpath"
39936   # Check if we need to convert this using DOS-style short mode. If the path
39937   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39938   # take no chances and rewrite it.
39939   # Note: m4 eats our [], so we need to use [ and ] instead.
39940   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39941   if test "x$has_forbidden_chars" != x; then
39942     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39943     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39944     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39945     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39946       # Going to short mode and back again did indeed matter. Since short mode is
39947       # case insensitive, let's make it lowercase to improve readability.
39948       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39949       # Now convert it back to Unix-style (cygpath)
39950       input_path=`$CYGPATH -u "$shortmode_path"`
39951       new_path="$input_path"
39952     fi
39953   fi
39954 
39955   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39956   if test "x$test_cygdrive_prefix" = x; then
39957     # As a simple fix, exclude /usr/bin since it's not a real path.
39958     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39959       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39960       # a path prefixed by /cygdrive for fixpath to work.
39961       new_path="$CYGWIN_ROOT_PATH$input_path"
39962     fi
39963   fi
39964 
39965   # remove trailing .exe if any
39966   new_path="${new_path/%.exe/}"
39967 
39968     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39969 
39970   # First separate the path from the arguments. This will split at the first
39971   # space.
39972   complete="$STRIP"
39973   path="${complete%% *}"
39974   tmp="$complete EOL"
39975   arguments="${tmp#* }"
39976 
39977   # Input might be given as Windows format, start by converting to
39978   # unix format.
39979   new_path="$path"
39980 
39981   windows_path="$new_path"
39982   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39983     unix_path=`$CYGPATH -u "$windows_path"`
39984     new_path="$unix_path"
39985   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39986     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39987     new_path="$unix_path"
39988   fi
39989 
39990 
39991   # Now try to locate executable using which
39992   new_path=`$WHICH "$new_path" 2> /dev/null`
39993 
39994   if test "x$new_path" = x; then
39995     # Oops. Which didn't find the executable.
39996     # The splitting of arguments from the executable at a space might have been incorrect,
39997     # since paths with space are more likely in Windows. Give it another try with the whole
39998     # argument.
39999     path="$complete"
40000     arguments="EOL"
40001     new_path="$path"
40002 
40003   windows_path="$new_path"
40004   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40005     unix_path=`$CYGPATH -u "$windows_path"`
40006     new_path="$unix_path"
40007   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40008     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40009     new_path="$unix_path"
40010   fi
40011 
40012 
40013     new_path=`$WHICH "$new_path" 2> /dev/null`
40014     # bat and cmd files are not always considered executable in MSYS causing which
40015     # to not find them
40016     if test "x$new_path" = x \
40017         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40018         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40019       new_path="$path"
40020 
40021   windows_path="$new_path"
40022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40023     unix_path=`$CYGPATH -u "$windows_path"`
40024     new_path="$unix_path"
40025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40026     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40027     new_path="$unix_path"
40028   fi
40029 
40030     fi
40031 
40032     if test "x$new_path" = x; then
40033       # It's still not found. Now this is an unrecoverable error.
40034       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40035 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40036       has_space=`$ECHO "$complete" | $GREP " "`
40037       if test "x$has_space" != x; then
40038         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40039 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40040       fi
40041       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40042     fi
40043   fi
40044 
40045   # Now new_path has a complete unix path to the binary
40046   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40047     # Keep paths in /bin as-is, but remove trailing .exe if any
40048     new_path="${new_path/%.exe/}"
40049     # Do not save /bin paths to all_fixpath_prefixes!
40050   else
40051     # Not in mixed or Windows style, start by that.
40052     new_path=`cmd //c echo $new_path`
40053 
40054   input_path="$new_path"
40055   # Check if we need to convert this using DOS-style short mode. If the path
40056   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40057   # take no chances and rewrite it.
40058   # Note: m4 eats our [], so we need to use [ and ] instead.
40059   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40060   if test "x$has_forbidden_chars" != x; then
40061     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40062     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40063   fi
40064 
40065     # Output is in $new_path
40066 
40067   windows_path="$new_path"
40068   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40069     unix_path=`$CYGPATH -u "$windows_path"`
40070     new_path="$unix_path"
40071   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40072     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40073     new_path="$unix_path"
40074   fi
40075 
40076     # remove trailing .exe if any
40077     new_path="${new_path/%.exe/}"
40078 
40079     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40080     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40081   fi
40082 
40083     else
40084       # We're on a unix platform. Hooray! :)
40085       # First separate the path from the arguments. This will split at the first
40086       # space.
40087       complete="$STRIP"
40088       path="${complete%% *}"
40089       tmp="$complete EOL"
40090       arguments="${tmp#* }"
40091 
40092       # Cannot rely on the command "which" here since it doesn't always work.
40093       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40094       if test -z "$is_absolute_path"; then
40095         # Path to executable is not absolute. Find it.
40096         IFS_save="$IFS"
40097         IFS=:
40098         for p in $PATH; do
40099           if test -f "$p/$path" && test -x "$p/$path"; then
40100             new_path="$p/$path"
40101             break
40102           fi
40103         done
40104         IFS="$IFS_save"
40105       else
40106         # This is an absolute path, we can use it without further modifications.
40107         new_path="$path"
40108       fi
40109 
40110       if test "x$new_path" = x; then
40111         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40112 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40113         has_space=`$ECHO "$complete" | $GREP " "`
40114         if test "x$has_space" != x; then
40115           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40116 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40117         fi
40118         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40119       fi
40120     fi
40121 
40122     # Now join together the path and the arguments once again
40123     if test "x$arguments" != xEOL; then
40124       new_complete="$new_path ${arguments% *}"
40125     else
40126       new_complete="$new_path"
40127     fi
40128 
40129     if test "x$complete" != "x$new_complete"; then
40130       STRIP="$new_complete"
40131       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40132 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40133     fi
40134   fi
40135 
40136 
40137 
40138   # Publish this variable in the help.
40139 
40140 
40141   if [ -z "${NM+x}" ]; then
40142     # The variable is not set by user, try to locate tool using the code snippet
40143     for ac_prog in nm
40144 do
40145   # Extract the first word of "$ac_prog", so it can be a program name with args.
40146 set dummy $ac_prog; ac_word=$2
40147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40148 $as_echo_n "checking for $ac_word... " >&6; }
40149 if ${ac_cv_path_NM+:} false; then :
40150   $as_echo_n "(cached) " >&6
40151 else
40152   case $NM in
40153   [\\/]* | ?:[\\/]*)
40154   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40155   ;;
40156   *)
40157   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40158 for as_dir in $PATH
40159 do
40160   IFS=$as_save_IFS
40161   test -z "$as_dir" && as_dir=.
40162     for ac_exec_ext in '' $ac_executable_extensions; do
40163   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40164     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40165     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40166     break 2
40167   fi
40168 done
40169   done
40170 IFS=$as_save_IFS
40171 
40172   ;;
40173 esac
40174 fi
40175 NM=$ac_cv_path_NM
40176 if test -n "$NM"; then
40177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40178 $as_echo "$NM" >&6; }
40179 else
40180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40181 $as_echo "no" >&6; }
40182 fi
40183 
40184 
40185   test -n "$NM" && break
40186 done
40187 
40188   else
40189     # The variable is set, but is it from the command line or the environment?
40190 
40191     # Try to remove the string !NM! from our list.
40192     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40193     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40194       # If it failed, the variable was not from the command line. Ignore it,
40195       # but warn the user (except for BASH, which is always set by the calling BASH).
40196       if test "xNM" != xBASH; then
40197         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40198 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40199       fi
40200       # Try to locate tool using the code snippet
40201       for ac_prog in nm
40202 do
40203   # Extract the first word of "$ac_prog", so it can be a program name with args.
40204 set dummy $ac_prog; ac_word=$2
40205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40206 $as_echo_n "checking for $ac_word... " >&6; }
40207 if ${ac_cv_path_NM+:} false; then :
40208   $as_echo_n "(cached) " >&6
40209 else
40210   case $NM in
40211   [\\/]* | ?:[\\/]*)
40212   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40213   ;;
40214   *)
40215   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40216 for as_dir in $PATH
40217 do
40218   IFS=$as_save_IFS
40219   test -z "$as_dir" && as_dir=.
40220     for ac_exec_ext in '' $ac_executable_extensions; do
40221   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40222     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40223     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40224     break 2
40225   fi
40226 done
40227   done
40228 IFS=$as_save_IFS
40229 
40230   ;;
40231 esac
40232 fi
40233 NM=$ac_cv_path_NM
40234 if test -n "$NM"; then
40235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40236 $as_echo "$NM" >&6; }
40237 else
40238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40239 $as_echo "no" >&6; }
40240 fi
40241 
40242 
40243   test -n "$NM" && break
40244 done
40245 
40246     else
40247       # If it succeeded, then it was overridden by the user. We will use it
40248       # for the tool.
40249 
40250       # First remove it from the list of overridden variables, so we can test
40251       # for unknown variables in the end.
40252       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40253 
40254       # Check if we try to supply an empty value
40255       if test "x$NM" = x; then
40256         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40257 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40258         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40259 $as_echo_n "checking for NM... " >&6; }
40260         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40261 $as_echo "disabled" >&6; }
40262       else
40263         # Check if the provided tool contains a complete path.
40264         tool_specified="$NM"
40265         tool_basename="${tool_specified##*/}"
40266         if test "x$tool_basename" = "x$tool_specified"; then
40267           # A command without a complete path is provided, search $PATH.
40268           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40269 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40270           # Extract the first word of "$tool_basename", so it can be a program name with args.
40271 set dummy $tool_basename; ac_word=$2
40272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40273 $as_echo_n "checking for $ac_word... " >&6; }
40274 if ${ac_cv_path_NM+:} false; then :
40275   $as_echo_n "(cached) " >&6
40276 else
40277   case $NM in
40278   [\\/]* | ?:[\\/]*)
40279   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40280   ;;
40281   *)
40282   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40283 for as_dir in $PATH
40284 do
40285   IFS=$as_save_IFS
40286   test -z "$as_dir" && as_dir=.
40287     for ac_exec_ext in '' $ac_executable_extensions; do
40288   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40289     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40290     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40291     break 2
40292   fi
40293 done
40294   done
40295 IFS=$as_save_IFS
40296 
40297   ;;
40298 esac
40299 fi
40300 NM=$ac_cv_path_NM
40301 if test -n "$NM"; then
40302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40303 $as_echo "$NM" >&6; }
40304 else
40305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40306 $as_echo "no" >&6; }
40307 fi
40308 
40309 
40310           if test "x$NM" = x; then
40311             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40312           fi
40313         else
40314           # Otherwise we believe it is a complete path. Use it as it is.
40315           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40316 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40317           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40318 $as_echo_n "checking for NM... " >&6; }
40319           if test ! -x "$tool_specified"; then
40320             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40321 $as_echo "not found" >&6; }
40322             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40323           fi
40324           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40325 $as_echo "$tool_specified" >&6; }
40326         fi
40327       fi
40328     fi
40329 
40330   fi
40331 
40332 
40333 
40334   # Only process if variable expands to non-empty
40335 
40336   if test "x$NM" != x; then
40337     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40338 
40339   # First separate the path from the arguments. This will split at the first
40340   # space.
40341   complete="$NM"
40342   path="${complete%% *}"
40343   tmp="$complete EOL"
40344   arguments="${tmp#* }"
40345 
40346   # Input might be given as Windows format, start by converting to
40347   # unix format.
40348   new_path=`$CYGPATH -u "$path"`
40349 
40350   # Now try to locate executable using which
40351   new_path=`$WHICH "$new_path" 2> /dev/null`
40352   # bat and cmd files are not always considered executable in cygwin causing which
40353   # to not find them
40354   if test "x$new_path" = x \
40355       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40356       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40357     new_path=`$CYGPATH -u "$path"`
40358   fi
40359   if test "x$new_path" = x; then
40360     # Oops. Which didn't find the executable.
40361     # The splitting of arguments from the executable at a space might have been incorrect,
40362     # since paths with space are more likely in Windows. Give it another try with the whole
40363     # argument.
40364     path="$complete"
40365     arguments="EOL"
40366     new_path=`$CYGPATH -u "$path"`
40367     new_path=`$WHICH "$new_path" 2> /dev/null`
40368     # bat and cmd files are not always considered executable in cygwin causing which
40369     # to not find them
40370     if test "x$new_path" = x \
40371         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40372         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40373       new_path=`$CYGPATH -u "$path"`
40374     fi
40375     if test "x$new_path" = x; then
40376       # It's still not found. Now this is an unrecoverable error.
40377       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40378 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40379       has_space=`$ECHO "$complete" | $GREP " "`
40380       if test "x$has_space" != x; then
40381         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40382 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40383       fi
40384       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40385     fi
40386   fi
40387 
40388   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40389   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40390   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40391   # "foo.exe" is OK but "foo" is an error.
40392   #
40393   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40394   # It is also a way to make sure we got the proper file name for the real test later on.
40395   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40396   if test "x$test_shortpath" = x; then
40397     # Short path failed, file does not exist as specified.
40398     # Try adding .exe or .cmd
40399     if test -f "${new_path}.exe"; then
40400       input_to_shortpath="${new_path}.exe"
40401     elif test -f "${new_path}.cmd"; then
40402       input_to_shortpath="${new_path}.cmd"
40403     else
40404       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40405 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40406       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40407 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40408       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40409     fi
40410   else
40411     input_to_shortpath="$new_path"
40412   fi
40413 
40414   # Call helper function which possibly converts this using DOS-style short mode.
40415   # If so, the updated path is stored in $new_path.
40416   new_path="$input_to_shortpath"
40417 
40418   input_path="$input_to_shortpath"
40419   # Check if we need to convert this using DOS-style short mode. If the path
40420   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40421   # take no chances and rewrite it.
40422   # Note: m4 eats our [], so we need to use [ and ] instead.
40423   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40424   if test "x$has_forbidden_chars" != x; then
40425     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40426     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40427     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40428     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40429       # Going to short mode and back again did indeed matter. Since short mode is
40430       # case insensitive, let's make it lowercase to improve readability.
40431       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40432       # Now convert it back to Unix-style (cygpath)
40433       input_path=`$CYGPATH -u "$shortmode_path"`
40434       new_path="$input_path"
40435     fi
40436   fi
40437 
40438   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40439   if test "x$test_cygdrive_prefix" = x; then
40440     # As a simple fix, exclude /usr/bin since it's not a real path.
40441     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40442       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40443       # a path prefixed by /cygdrive for fixpath to work.
40444       new_path="$CYGWIN_ROOT_PATH$input_path"
40445     fi
40446   fi
40447 
40448   # remove trailing .exe if any
40449   new_path="${new_path/%.exe/}"
40450 
40451     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40452 
40453   # First separate the path from the arguments. This will split at the first
40454   # space.
40455   complete="$NM"
40456   path="${complete%% *}"
40457   tmp="$complete EOL"
40458   arguments="${tmp#* }"
40459 
40460   # Input might be given as Windows format, start by converting to
40461   # unix format.
40462   new_path="$path"
40463 
40464   windows_path="$new_path"
40465   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40466     unix_path=`$CYGPATH -u "$windows_path"`
40467     new_path="$unix_path"
40468   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40469     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40470     new_path="$unix_path"
40471   fi
40472 
40473 
40474   # Now try to locate executable using which
40475   new_path=`$WHICH "$new_path" 2> /dev/null`
40476 
40477   if test "x$new_path" = x; then
40478     # Oops. Which didn't find the executable.
40479     # The splitting of arguments from the executable at a space might have been incorrect,
40480     # since paths with space are more likely in Windows. Give it another try with the whole
40481     # argument.
40482     path="$complete"
40483     arguments="EOL"
40484     new_path="$path"
40485 
40486   windows_path="$new_path"
40487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40488     unix_path=`$CYGPATH -u "$windows_path"`
40489     new_path="$unix_path"
40490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40491     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40492     new_path="$unix_path"
40493   fi
40494 
40495 
40496     new_path=`$WHICH "$new_path" 2> /dev/null`
40497     # bat and cmd files are not always considered executable in MSYS causing which
40498     # to not find them
40499     if test "x$new_path" = x \
40500         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40501         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40502       new_path="$path"
40503 
40504   windows_path="$new_path"
40505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40506     unix_path=`$CYGPATH -u "$windows_path"`
40507     new_path="$unix_path"
40508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40510     new_path="$unix_path"
40511   fi
40512 
40513     fi
40514 
40515     if test "x$new_path" = x; then
40516       # It's still not found. Now this is an unrecoverable error.
40517       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40518 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40519       has_space=`$ECHO "$complete" | $GREP " "`
40520       if test "x$has_space" != x; then
40521         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40522 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40523       fi
40524       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40525     fi
40526   fi
40527 
40528   # Now new_path has a complete unix path to the binary
40529   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40530     # Keep paths in /bin as-is, but remove trailing .exe if any
40531     new_path="${new_path/%.exe/}"
40532     # Do not save /bin paths to all_fixpath_prefixes!
40533   else
40534     # Not in mixed or Windows style, start by that.
40535     new_path=`cmd //c echo $new_path`
40536 
40537   input_path="$new_path"
40538   # Check if we need to convert this using DOS-style short mode. If the path
40539   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40540   # take no chances and rewrite it.
40541   # Note: m4 eats our [], so we need to use [ and ] instead.
40542   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40543   if test "x$has_forbidden_chars" != x; then
40544     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40545     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40546   fi
40547 
40548     # Output is in $new_path
40549 
40550   windows_path="$new_path"
40551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40552     unix_path=`$CYGPATH -u "$windows_path"`
40553     new_path="$unix_path"
40554   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40555     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40556     new_path="$unix_path"
40557   fi
40558 
40559     # remove trailing .exe if any
40560     new_path="${new_path/%.exe/}"
40561 
40562     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40563     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40564   fi
40565 
40566     else
40567       # We're on a unix platform. Hooray! :)
40568       # First separate the path from the arguments. This will split at the first
40569       # space.
40570       complete="$NM"
40571       path="${complete%% *}"
40572       tmp="$complete EOL"
40573       arguments="${tmp#* }"
40574 
40575       # Cannot rely on the command "which" here since it doesn't always work.
40576       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40577       if test -z "$is_absolute_path"; then
40578         # Path to executable is not absolute. Find it.
40579         IFS_save="$IFS"
40580         IFS=:
40581         for p in $PATH; do
40582           if test -f "$p/$path" && test -x "$p/$path"; then
40583             new_path="$p/$path"
40584             break
40585           fi
40586         done
40587         IFS="$IFS_save"
40588       else
40589         # This is an absolute path, we can use it without further modifications.
40590         new_path="$path"
40591       fi
40592 
40593       if test "x$new_path" = x; then
40594         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40595 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40596         has_space=`$ECHO "$complete" | $GREP " "`
40597         if test "x$has_space" != x; then
40598           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40599 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40600         fi
40601         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40602       fi
40603     fi
40604 
40605     # Now join together the path and the arguments once again
40606     if test "x$arguments" != xEOL; then
40607       new_complete="$new_path ${arguments% *}"
40608     else
40609       new_complete="$new_path"
40610     fi
40611 
40612     if test "x$complete" != "x$new_complete"; then
40613       NM="$new_complete"
40614       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40615 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40616     fi
40617   fi
40618 
40619 
40620 
40621   # Publish this variable in the help.
40622 
40623 
40624   if [ -z "${GNM+x}" ]; then
40625     # The variable is not set by user, try to locate tool using the code snippet
40626     for ac_prog in gnm
40627 do
40628   # Extract the first word of "$ac_prog", so it can be a program name with args.
40629 set dummy $ac_prog; ac_word=$2
40630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40631 $as_echo_n "checking for $ac_word... " >&6; }
40632 if ${ac_cv_path_GNM+:} false; then :
40633   $as_echo_n "(cached) " >&6
40634 else
40635   case $GNM in
40636   [\\/]* | ?:[\\/]*)
40637   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40638   ;;
40639   *)
40640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40641 for as_dir in $PATH
40642 do
40643   IFS=$as_save_IFS
40644   test -z "$as_dir" && as_dir=.
40645     for ac_exec_ext in '' $ac_executable_extensions; do
40646   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40647     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40649     break 2
40650   fi
40651 done
40652   done
40653 IFS=$as_save_IFS
40654 
40655   ;;
40656 esac
40657 fi
40658 GNM=$ac_cv_path_GNM
40659 if test -n "$GNM"; then
40660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40661 $as_echo "$GNM" >&6; }
40662 else
40663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40664 $as_echo "no" >&6; }
40665 fi
40666 
40667 
40668   test -n "$GNM" && break
40669 done
40670 
40671   else
40672     # The variable is set, but is it from the command line or the environment?
40673 
40674     # Try to remove the string !GNM! from our list.
40675     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40676     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40677       # If it failed, the variable was not from the command line. Ignore it,
40678       # but warn the user (except for BASH, which is always set by the calling BASH).
40679       if test "xGNM" != xBASH; then
40680         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40681 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40682       fi
40683       # Try to locate tool using the code snippet
40684       for ac_prog in gnm
40685 do
40686   # Extract the first word of "$ac_prog", so it can be a program name with args.
40687 set dummy $ac_prog; ac_word=$2
40688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40689 $as_echo_n "checking for $ac_word... " >&6; }
40690 if ${ac_cv_path_GNM+:} false; then :
40691   $as_echo_n "(cached) " >&6
40692 else
40693   case $GNM in
40694   [\\/]* | ?:[\\/]*)
40695   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40696   ;;
40697   *)
40698   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40699 for as_dir in $PATH
40700 do
40701   IFS=$as_save_IFS
40702   test -z "$as_dir" && as_dir=.
40703     for ac_exec_ext in '' $ac_executable_extensions; do
40704   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40705     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40706     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40707     break 2
40708   fi
40709 done
40710   done
40711 IFS=$as_save_IFS
40712 
40713   ;;
40714 esac
40715 fi
40716 GNM=$ac_cv_path_GNM
40717 if test -n "$GNM"; then
40718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40719 $as_echo "$GNM" >&6; }
40720 else
40721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40722 $as_echo "no" >&6; }
40723 fi
40724 
40725 
40726   test -n "$GNM" && break
40727 done
40728 
40729     else
40730       # If it succeeded, then it was overridden by the user. We will use it
40731       # for the tool.
40732 
40733       # First remove it from the list of overridden variables, so we can test
40734       # for unknown variables in the end.
40735       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40736 
40737       # Check if we try to supply an empty value
40738       if test "x$GNM" = x; then
40739         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40740 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40741         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40742 $as_echo_n "checking for GNM... " >&6; }
40743         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40744 $as_echo "disabled" >&6; }
40745       else
40746         # Check if the provided tool contains a complete path.
40747         tool_specified="$GNM"
40748         tool_basename="${tool_specified##*/}"
40749         if test "x$tool_basename" = "x$tool_specified"; then
40750           # A command without a complete path is provided, search $PATH.
40751           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40752 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40753           # Extract the first word of "$tool_basename", so it can be a program name with args.
40754 set dummy $tool_basename; ac_word=$2
40755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40756 $as_echo_n "checking for $ac_word... " >&6; }
40757 if ${ac_cv_path_GNM+:} false; then :
40758   $as_echo_n "(cached) " >&6
40759 else
40760   case $GNM in
40761   [\\/]* | ?:[\\/]*)
40762   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40763   ;;
40764   *)
40765   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40766 for as_dir in $PATH
40767 do
40768   IFS=$as_save_IFS
40769   test -z "$as_dir" && as_dir=.
40770     for ac_exec_ext in '' $ac_executable_extensions; do
40771   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40772     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40774     break 2
40775   fi
40776 done
40777   done
40778 IFS=$as_save_IFS
40779 
40780   ;;
40781 esac
40782 fi
40783 GNM=$ac_cv_path_GNM
40784 if test -n "$GNM"; then
40785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40786 $as_echo "$GNM" >&6; }
40787 else
40788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40789 $as_echo "no" >&6; }
40790 fi
40791 
40792 
40793           if test "x$GNM" = x; then
40794             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40795           fi
40796         else
40797           # Otherwise we believe it is a complete path. Use it as it is.
40798           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40799 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40800           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40801 $as_echo_n "checking for GNM... " >&6; }
40802           if test ! -x "$tool_specified"; then
40803             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40804 $as_echo "not found" >&6; }
40805             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40806           fi
40807           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40808 $as_echo "$tool_specified" >&6; }
40809         fi
40810       fi
40811     fi
40812 
40813   fi
40814 
40815 
40816 
40817   # Only process if variable expands to non-empty
40818 
40819   if test "x$GNM" != x; then
40820     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40821 
40822   # First separate the path from the arguments. This will split at the first
40823   # space.
40824   complete="$GNM"
40825   path="${complete%% *}"
40826   tmp="$complete EOL"
40827   arguments="${tmp#* }"
40828 
40829   # Input might be given as Windows format, start by converting to
40830   # unix format.
40831   new_path=`$CYGPATH -u "$path"`
40832 
40833   # Now try to locate executable using which
40834   new_path=`$WHICH "$new_path" 2> /dev/null`
40835   # bat and cmd files are not always considered executable in cygwin causing which
40836   # to not find them
40837   if test "x$new_path" = x \
40838       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40839       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40840     new_path=`$CYGPATH -u "$path"`
40841   fi
40842   if test "x$new_path" = x; then
40843     # Oops. Which didn't find the executable.
40844     # The splitting of arguments from the executable at a space might have been incorrect,
40845     # since paths with space are more likely in Windows. Give it another try with the whole
40846     # argument.
40847     path="$complete"
40848     arguments="EOL"
40849     new_path=`$CYGPATH -u "$path"`
40850     new_path=`$WHICH "$new_path" 2> /dev/null`
40851     # bat and cmd files are not always considered executable in cygwin causing which
40852     # to not find them
40853     if test "x$new_path" = x \
40854         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40855         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40856       new_path=`$CYGPATH -u "$path"`
40857     fi
40858     if test "x$new_path" = x; then
40859       # It's still not found. Now this is an unrecoverable error.
40860       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40861 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40862       has_space=`$ECHO "$complete" | $GREP " "`
40863       if test "x$has_space" != x; then
40864         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40865 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40866       fi
40867       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40868     fi
40869   fi
40870 
40871   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40872   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40873   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40874   # "foo.exe" is OK but "foo" is an error.
40875   #
40876   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40877   # It is also a way to make sure we got the proper file name for the real test later on.
40878   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40879   if test "x$test_shortpath" = x; then
40880     # Short path failed, file does not exist as specified.
40881     # Try adding .exe or .cmd
40882     if test -f "${new_path}.exe"; then
40883       input_to_shortpath="${new_path}.exe"
40884     elif test -f "${new_path}.cmd"; then
40885       input_to_shortpath="${new_path}.cmd"
40886     else
40887       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40888 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40889       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40890 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40891       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40892     fi
40893   else
40894     input_to_shortpath="$new_path"
40895   fi
40896 
40897   # Call helper function which possibly converts this using DOS-style short mode.
40898   # If so, the updated path is stored in $new_path.
40899   new_path="$input_to_shortpath"
40900 
40901   input_path="$input_to_shortpath"
40902   # Check if we need to convert this using DOS-style short mode. If the path
40903   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40904   # take no chances and rewrite it.
40905   # Note: m4 eats our [], so we need to use [ and ] instead.
40906   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40907   if test "x$has_forbidden_chars" != x; then
40908     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40909     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40910     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40911     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40912       # Going to short mode and back again did indeed matter. Since short mode is
40913       # case insensitive, let's make it lowercase to improve readability.
40914       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40915       # Now convert it back to Unix-style (cygpath)
40916       input_path=`$CYGPATH -u "$shortmode_path"`
40917       new_path="$input_path"
40918     fi
40919   fi
40920 
40921   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40922   if test "x$test_cygdrive_prefix" = x; then
40923     # As a simple fix, exclude /usr/bin since it's not a real path.
40924     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40925       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40926       # a path prefixed by /cygdrive for fixpath to work.
40927       new_path="$CYGWIN_ROOT_PATH$input_path"
40928     fi
40929   fi
40930 
40931   # remove trailing .exe if any
40932   new_path="${new_path/%.exe/}"
40933 
40934     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40935 
40936   # First separate the path from the arguments. This will split at the first
40937   # space.
40938   complete="$GNM"
40939   path="${complete%% *}"
40940   tmp="$complete EOL"
40941   arguments="${tmp#* }"
40942 
40943   # Input might be given as Windows format, start by converting to
40944   # unix format.
40945   new_path="$path"
40946 
40947   windows_path="$new_path"
40948   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40949     unix_path=`$CYGPATH -u "$windows_path"`
40950     new_path="$unix_path"
40951   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40952     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40953     new_path="$unix_path"
40954   fi
40955 
40956 
40957   # Now try to locate executable using which
40958   new_path=`$WHICH "$new_path" 2> /dev/null`
40959 
40960   if test "x$new_path" = x; then
40961     # Oops. Which didn't find the executable.
40962     # The splitting of arguments from the executable at a space might have been incorrect,
40963     # since paths with space are more likely in Windows. Give it another try with the whole
40964     # argument.
40965     path="$complete"
40966     arguments="EOL"
40967     new_path="$path"
40968 
40969   windows_path="$new_path"
40970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40971     unix_path=`$CYGPATH -u "$windows_path"`
40972     new_path="$unix_path"
40973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40974     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40975     new_path="$unix_path"
40976   fi
40977 
40978 
40979     new_path=`$WHICH "$new_path" 2> /dev/null`
40980     # bat and cmd files are not always considered executable in MSYS causing which
40981     # to not find them
40982     if test "x$new_path" = x \
40983         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40984         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40985       new_path="$path"
40986 
40987   windows_path="$new_path"
40988   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40989     unix_path=`$CYGPATH -u "$windows_path"`
40990     new_path="$unix_path"
40991   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40992     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40993     new_path="$unix_path"
40994   fi
40995 
40996     fi
40997 
40998     if test "x$new_path" = x; then
40999       # It's still not found. Now this is an unrecoverable error.
41000       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41001 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41002       has_space=`$ECHO "$complete" | $GREP " "`
41003       if test "x$has_space" != x; then
41004         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41005 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41006       fi
41007       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41008     fi
41009   fi
41010 
41011   # Now new_path has a complete unix path to the binary
41012   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41013     # Keep paths in /bin as-is, but remove trailing .exe if any
41014     new_path="${new_path/%.exe/}"
41015     # Do not save /bin paths to all_fixpath_prefixes!
41016   else
41017     # Not in mixed or Windows style, start by that.
41018     new_path=`cmd //c echo $new_path`
41019 
41020   input_path="$new_path"
41021   # Check if we need to convert this using DOS-style short mode. If the path
41022   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41023   # take no chances and rewrite it.
41024   # Note: m4 eats our [], so we need to use [ and ] instead.
41025   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41026   if test "x$has_forbidden_chars" != x; then
41027     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41028     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41029   fi
41030 
41031     # Output is in $new_path
41032 
41033   windows_path="$new_path"
41034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41035     unix_path=`$CYGPATH -u "$windows_path"`
41036     new_path="$unix_path"
41037   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41038     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41039     new_path="$unix_path"
41040   fi
41041 
41042     # remove trailing .exe if any
41043     new_path="${new_path/%.exe/}"
41044 
41045     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41046     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41047   fi
41048 
41049     else
41050       # We're on a unix platform. Hooray! :)
41051       # First separate the path from the arguments. This will split at the first
41052       # space.
41053       complete="$GNM"
41054       path="${complete%% *}"
41055       tmp="$complete EOL"
41056       arguments="${tmp#* }"
41057 
41058       # Cannot rely on the command "which" here since it doesn't always work.
41059       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41060       if test -z "$is_absolute_path"; then
41061         # Path to executable is not absolute. Find it.
41062         IFS_save="$IFS"
41063         IFS=:
41064         for p in $PATH; do
41065           if test -f "$p/$path" && test -x "$p/$path"; then
41066             new_path="$p/$path"
41067             break
41068           fi
41069         done
41070         IFS="$IFS_save"
41071       else
41072         # This is an absolute path, we can use it without further modifications.
41073         new_path="$path"
41074       fi
41075 
41076       if test "x$new_path" = x; then
41077         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41078 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41079         has_space=`$ECHO "$complete" | $GREP " "`
41080         if test "x$has_space" != x; then
41081           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41082 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41083         fi
41084         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41085       fi
41086     fi
41087 
41088     # Now join together the path and the arguments once again
41089     if test "x$arguments" != xEOL; then
41090       new_complete="$new_path ${arguments% *}"
41091     else
41092       new_complete="$new_path"
41093     fi
41094 
41095     if test "x$complete" != "x$new_complete"; then
41096       GNM="$new_complete"
41097       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41098 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41099     fi
41100   fi
41101 
41102   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41103     # FIXME: we should unify this with the solaris case above.
41104 
41105 
41106   # Publish this variable in the help.
41107 
41108 
41109   if [ -z "${STRIP+x}" ]; then
41110     # The variable is not set by user, try to locate tool using the code snippet
41111     if test -n "$ac_tool_prefix"; then
41112   for ac_prog in strip
41113   do
41114     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41115 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41117 $as_echo_n "checking for $ac_word... " >&6; }
41118 if ${ac_cv_prog_STRIP+:} false; then :
41119   $as_echo_n "(cached) " >&6
41120 else
41121   if test -n "$STRIP"; then
41122   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41123 else
41124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41125 for as_dir in $PATH
41126 do
41127   IFS=$as_save_IFS
41128   test -z "$as_dir" && as_dir=.
41129     for ac_exec_ext in '' $ac_executable_extensions; do
41130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41131     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41133     break 2
41134   fi
41135 done
41136   done
41137 IFS=$as_save_IFS
41138 
41139 fi
41140 fi
41141 STRIP=$ac_cv_prog_STRIP
41142 if test -n "$STRIP"; then
41143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41144 $as_echo "$STRIP" >&6; }
41145 else
41146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41147 $as_echo "no" >&6; }
41148 fi
41149 
41150 
41151     test -n "$STRIP" && break
41152   done
41153 fi
41154 if test -z "$STRIP"; then
41155   ac_ct_STRIP=$STRIP
41156   for ac_prog in strip
41157 do
41158   # Extract the first word of "$ac_prog", so it can be a program name with args.
41159 set dummy $ac_prog; ac_word=$2
41160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41161 $as_echo_n "checking for $ac_word... " >&6; }
41162 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41163   $as_echo_n "(cached) " >&6
41164 else
41165   if test -n "$ac_ct_STRIP"; then
41166   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41167 else
41168 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41169 for as_dir in $PATH
41170 do
41171   IFS=$as_save_IFS
41172   test -z "$as_dir" && as_dir=.
41173     for ac_exec_ext in '' $ac_executable_extensions; do
41174   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41175     ac_cv_prog_ac_ct_STRIP="$ac_prog"
41176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41177     break 2
41178   fi
41179 done
41180   done
41181 IFS=$as_save_IFS
41182 
41183 fi
41184 fi
41185 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41186 if test -n "$ac_ct_STRIP"; then
41187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41188 $as_echo "$ac_ct_STRIP" >&6; }
41189 else
41190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41191 $as_echo "no" >&6; }
41192 fi
41193 
41194 
41195   test -n "$ac_ct_STRIP" && break
41196 done
41197 
41198   if test "x$ac_ct_STRIP" = x; then
41199     STRIP=""
41200   else
41201     case $cross_compiling:$ac_tool_warned in
41202 yes:)
41203 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41204 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41205 ac_tool_warned=yes ;;
41206 esac
41207     STRIP=$ac_ct_STRIP
41208   fi
41209 fi
41210 
41211   else
41212     # The variable is set, but is it from the command line or the environment?
41213 
41214     # Try to remove the string !STRIP! from our list.
41215     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41216     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41217       # If it failed, the variable was not from the command line. Ignore it,
41218       # but warn the user (except for BASH, which is always set by the calling BASH).
41219       if test "xSTRIP" != xBASH; then
41220         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41221 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41222       fi
41223       # Try to locate tool using the code snippet
41224       if test -n "$ac_tool_prefix"; then
41225   for ac_prog in strip
41226   do
41227     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41228 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41230 $as_echo_n "checking for $ac_word... " >&6; }
41231 if ${ac_cv_prog_STRIP+:} false; then :
41232   $as_echo_n "(cached) " >&6
41233 else
41234   if test -n "$STRIP"; then
41235   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41236 else
41237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41238 for as_dir in $PATH
41239 do
41240   IFS=$as_save_IFS
41241   test -z "$as_dir" && as_dir=.
41242     for ac_exec_ext in '' $ac_executable_extensions; do
41243   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41244     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41245     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41246     break 2
41247   fi
41248 done
41249   done
41250 IFS=$as_save_IFS
41251 
41252 fi
41253 fi
41254 STRIP=$ac_cv_prog_STRIP
41255 if test -n "$STRIP"; then
41256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41257 $as_echo "$STRIP" >&6; }
41258 else
41259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41260 $as_echo "no" >&6; }
41261 fi
41262 
41263 
41264     test -n "$STRIP" && break
41265   done
41266 fi
41267 if test -z "$STRIP"; then
41268   ac_ct_STRIP=$STRIP
41269   for ac_prog in strip
41270 do
41271   # Extract the first word of "$ac_prog", so it can be a program name with args.
41272 set dummy $ac_prog; ac_word=$2
41273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41274 $as_echo_n "checking for $ac_word... " >&6; }
41275 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41276   $as_echo_n "(cached) " >&6
41277 else
41278   if test -n "$ac_ct_STRIP"; then
41279   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41280 else
41281 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41282 for as_dir in $PATH
41283 do
41284   IFS=$as_save_IFS
41285   test -z "$as_dir" && as_dir=.
41286     for ac_exec_ext in '' $ac_executable_extensions; do
41287   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41288     ac_cv_prog_ac_ct_STRIP="$ac_prog"
41289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41290     break 2
41291   fi
41292 done
41293   done
41294 IFS=$as_save_IFS
41295 
41296 fi
41297 fi
41298 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41299 if test -n "$ac_ct_STRIP"; then
41300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41301 $as_echo "$ac_ct_STRIP" >&6; }
41302 else
41303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41304 $as_echo "no" >&6; }
41305 fi
41306 
41307 
41308   test -n "$ac_ct_STRIP" && break
41309 done
41310 
41311   if test "x$ac_ct_STRIP" = x; then
41312     STRIP=""
41313   else
41314     case $cross_compiling:$ac_tool_warned in
41315 yes:)
41316 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41317 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41318 ac_tool_warned=yes ;;
41319 esac
41320     STRIP=$ac_ct_STRIP
41321   fi
41322 fi
41323 
41324     else
41325       # If it succeeded, then it was overridden by the user. We will use it
41326       # for the tool.
41327 
41328       # First remove it from the list of overridden variables, so we can test
41329       # for unknown variables in the end.
41330       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41331 
41332       # Check if we try to supply an empty value
41333       if test "x$STRIP" = x; then
41334         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41335 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41336         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41337 $as_echo_n "checking for STRIP... " >&6; }
41338         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41339 $as_echo "disabled" >&6; }
41340       else
41341         # Check if the provided tool contains a complete path.
41342         tool_specified="$STRIP"
41343         tool_basename="${tool_specified##*/}"
41344         if test "x$tool_basename" = "x$tool_specified"; then
41345           # A command without a complete path is provided, search $PATH.
41346           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41347 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41348           # Extract the first word of "$tool_basename", so it can be a program name with args.
41349 set dummy $tool_basename; ac_word=$2
41350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41351 $as_echo_n "checking for $ac_word... " >&6; }
41352 if ${ac_cv_path_STRIP+:} false; then :
41353   $as_echo_n "(cached) " >&6
41354 else
41355   case $STRIP in
41356   [\\/]* | ?:[\\/]*)
41357   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41358   ;;
41359   *)
41360   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41361 for as_dir in $PATH
41362 do
41363   IFS=$as_save_IFS
41364   test -z "$as_dir" && as_dir=.
41365     for ac_exec_ext in '' $ac_executable_extensions; do
41366   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41367     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41368     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41369     break 2
41370   fi
41371 done
41372   done
41373 IFS=$as_save_IFS
41374 
41375   ;;
41376 esac
41377 fi
41378 STRIP=$ac_cv_path_STRIP
41379 if test -n "$STRIP"; then
41380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41381 $as_echo "$STRIP" >&6; }
41382 else
41383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41384 $as_echo "no" >&6; }
41385 fi
41386 
41387 
41388           if test "x$STRIP" = x; then
41389             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41390           fi
41391         else
41392           # Otherwise we believe it is a complete path. Use it as it is.
41393           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41394 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41395           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41396 $as_echo_n "checking for STRIP... " >&6; }
41397           if test ! -x "$tool_specified"; then
41398             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41399 $as_echo "not found" >&6; }
41400             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41401           fi
41402           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41403 $as_echo "$tool_specified" >&6; }
41404         fi
41405       fi
41406     fi
41407 
41408   fi
41409 
41410 
41411 
41412   # Only process if variable expands to non-empty
41413 
41414   if test "x$STRIP" != x; then
41415     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41416 
41417   # First separate the path from the arguments. This will split at the first
41418   # space.
41419   complete="$STRIP"
41420   path="${complete%% *}"
41421   tmp="$complete EOL"
41422   arguments="${tmp#* }"
41423 
41424   # Input might be given as Windows format, start by converting to
41425   # unix format.
41426   new_path=`$CYGPATH -u "$path"`
41427 
41428   # Now try to locate executable using which
41429   new_path=`$WHICH "$new_path" 2> /dev/null`
41430   # bat and cmd files are not always considered executable in cygwin causing which
41431   # to not find them
41432   if test "x$new_path" = x \
41433       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41434       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41435     new_path=`$CYGPATH -u "$path"`
41436   fi
41437   if test "x$new_path" = x; then
41438     # Oops. Which didn't find the executable.
41439     # The splitting of arguments from the executable at a space might have been incorrect,
41440     # since paths with space are more likely in Windows. Give it another try with the whole
41441     # argument.
41442     path="$complete"
41443     arguments="EOL"
41444     new_path=`$CYGPATH -u "$path"`
41445     new_path=`$WHICH "$new_path" 2> /dev/null`
41446     # bat and cmd files are not always considered executable in cygwin causing which
41447     # to not find them
41448     if test "x$new_path" = x \
41449         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41450         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41451       new_path=`$CYGPATH -u "$path"`
41452     fi
41453     if test "x$new_path" = x; then
41454       # It's still not found. Now this is an unrecoverable error.
41455       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41456 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41457       has_space=`$ECHO "$complete" | $GREP " "`
41458       if test "x$has_space" != x; then
41459         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41460 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41461       fi
41462       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41463     fi
41464   fi
41465 
41466   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41467   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41468   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41469   # "foo.exe" is OK but "foo" is an error.
41470   #
41471   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41472   # It is also a way to make sure we got the proper file name for the real test later on.
41473   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41474   if test "x$test_shortpath" = x; then
41475     # Short path failed, file does not exist as specified.
41476     # Try adding .exe or .cmd
41477     if test -f "${new_path}.exe"; then
41478       input_to_shortpath="${new_path}.exe"
41479     elif test -f "${new_path}.cmd"; then
41480       input_to_shortpath="${new_path}.cmd"
41481     else
41482       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41483 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41484       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41485 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41486       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41487     fi
41488   else
41489     input_to_shortpath="$new_path"
41490   fi
41491 
41492   # Call helper function which possibly converts this using DOS-style short mode.
41493   # If so, the updated path is stored in $new_path.
41494   new_path="$input_to_shortpath"
41495 
41496   input_path="$input_to_shortpath"
41497   # Check if we need to convert this using DOS-style short mode. If the path
41498   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41499   # take no chances and rewrite it.
41500   # Note: m4 eats our [], so we need to use [ and ] instead.
41501   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41502   if test "x$has_forbidden_chars" != x; then
41503     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41504     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41505     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41506     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41507       # Going to short mode and back again did indeed matter. Since short mode is
41508       # case insensitive, let's make it lowercase to improve readability.
41509       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41510       # Now convert it back to Unix-style (cygpath)
41511       input_path=`$CYGPATH -u "$shortmode_path"`
41512       new_path="$input_path"
41513     fi
41514   fi
41515 
41516   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41517   if test "x$test_cygdrive_prefix" = x; then
41518     # As a simple fix, exclude /usr/bin since it's not a real path.
41519     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41520       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41521       # a path prefixed by /cygdrive for fixpath to work.
41522       new_path="$CYGWIN_ROOT_PATH$input_path"
41523     fi
41524   fi
41525 
41526   # remove trailing .exe if any
41527   new_path="${new_path/%.exe/}"
41528 
41529     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41530 
41531   # First separate the path from the arguments. This will split at the first
41532   # space.
41533   complete="$STRIP"
41534   path="${complete%% *}"
41535   tmp="$complete EOL"
41536   arguments="${tmp#* }"
41537 
41538   # Input might be given as Windows format, start by converting to
41539   # unix format.
41540   new_path="$path"
41541 
41542   windows_path="$new_path"
41543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41544     unix_path=`$CYGPATH -u "$windows_path"`
41545     new_path="$unix_path"
41546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41547     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41548     new_path="$unix_path"
41549   fi
41550 
41551 
41552   # Now try to locate executable using which
41553   new_path=`$WHICH "$new_path" 2> /dev/null`
41554 
41555   if test "x$new_path" = x; then
41556     # Oops. Which didn't find the executable.
41557     # The splitting of arguments from the executable at a space might have been incorrect,
41558     # since paths with space are more likely in Windows. Give it another try with the whole
41559     # argument.
41560     path="$complete"
41561     arguments="EOL"
41562     new_path="$path"
41563 
41564   windows_path="$new_path"
41565   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41566     unix_path=`$CYGPATH -u "$windows_path"`
41567     new_path="$unix_path"
41568   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41569     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41570     new_path="$unix_path"
41571   fi
41572 
41573 
41574     new_path=`$WHICH "$new_path" 2> /dev/null`
41575     # bat and cmd files are not always considered executable in MSYS causing which
41576     # to not find them
41577     if test "x$new_path" = x \
41578         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41579         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41580       new_path="$path"
41581 
41582   windows_path="$new_path"
41583   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41584     unix_path=`$CYGPATH -u "$windows_path"`
41585     new_path="$unix_path"
41586   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41587     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41588     new_path="$unix_path"
41589   fi
41590 
41591     fi
41592 
41593     if test "x$new_path" = x; then
41594       # It's still not found. Now this is an unrecoverable error.
41595       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41596 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41597       has_space=`$ECHO "$complete" | $GREP " "`
41598       if test "x$has_space" != x; then
41599         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41600 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41601       fi
41602       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41603     fi
41604   fi
41605 
41606   # Now new_path has a complete unix path to the binary
41607   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41608     # Keep paths in /bin as-is, but remove trailing .exe if any
41609     new_path="${new_path/%.exe/}"
41610     # Do not save /bin paths to all_fixpath_prefixes!
41611   else
41612     # Not in mixed or Windows style, start by that.
41613     new_path=`cmd //c echo $new_path`
41614 
41615   input_path="$new_path"
41616   # Check if we need to convert this using DOS-style short mode. If the path
41617   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41618   # take no chances and rewrite it.
41619   # Note: m4 eats our [], so we need to use [ and ] instead.
41620   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41621   if test "x$has_forbidden_chars" != x; then
41622     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41623     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41624   fi
41625 
41626     # Output is in $new_path
41627 
41628   windows_path="$new_path"
41629   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41630     unix_path=`$CYGPATH -u "$windows_path"`
41631     new_path="$unix_path"
41632   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41633     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41634     new_path="$unix_path"
41635   fi
41636 
41637     # remove trailing .exe if any
41638     new_path="${new_path/%.exe/}"
41639 
41640     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41641     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41642   fi
41643 
41644     else
41645       # We're on a unix platform. Hooray! :)
41646       # First separate the path from the arguments. This will split at the first
41647       # space.
41648       complete="$STRIP"
41649       path="${complete%% *}"
41650       tmp="$complete EOL"
41651       arguments="${tmp#* }"
41652 
41653       # Cannot rely on the command "which" here since it doesn't always work.
41654       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41655       if test -z "$is_absolute_path"; then
41656         # Path to executable is not absolute. Find it.
41657         IFS_save="$IFS"
41658         IFS=:
41659         for p in $PATH; do
41660           if test -f "$p/$path" && test -x "$p/$path"; then
41661             new_path="$p/$path"
41662             break
41663           fi
41664         done
41665         IFS="$IFS_save"
41666       else
41667         # This is an absolute path, we can use it without further modifications.
41668         new_path="$path"
41669       fi
41670 
41671       if test "x$new_path" = x; then
41672         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41673 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41674         has_space=`$ECHO "$complete" | $GREP " "`
41675         if test "x$has_space" != x; then
41676           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41677 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41678         fi
41679         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41680       fi
41681     fi
41682 
41683     # Now join together the path and the arguments once again
41684     if test "x$arguments" != xEOL; then
41685       new_complete="$new_path ${arguments% *}"
41686     else
41687       new_complete="$new_path"
41688     fi
41689 
41690     if test "x$complete" != "x$new_complete"; then
41691       STRIP="$new_complete"
41692       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41693 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41694     fi
41695   fi
41696 
41697     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41698 
41699 
41700   # Publish this variable in the help.
41701 
41702 
41703   if [ -z "${NM+x}" ]; then
41704     # The variable is not set by user, try to locate tool using the code snippet
41705     if test -n "$ac_tool_prefix"; then
41706   for ac_prog in nm gcc-nm
41707   do
41708     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41709 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41711 $as_echo_n "checking for $ac_word... " >&6; }
41712 if ${ac_cv_prog_NM+:} false; then :
41713   $as_echo_n "(cached) " >&6
41714 else
41715   if test -n "$NM"; then
41716   ac_cv_prog_NM="$NM" # Let the user override the test.
41717 else
41718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41719 for as_dir in $PATH
41720 do
41721   IFS=$as_save_IFS
41722   test -z "$as_dir" && as_dir=.
41723     for ac_exec_ext in '' $ac_executable_extensions; do
41724   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41725     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41726     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41727     break 2
41728   fi
41729 done
41730   done
41731 IFS=$as_save_IFS
41732 
41733 fi
41734 fi
41735 NM=$ac_cv_prog_NM
41736 if test -n "$NM"; then
41737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41738 $as_echo "$NM" >&6; }
41739 else
41740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41741 $as_echo "no" >&6; }
41742 fi
41743 
41744 
41745     test -n "$NM" && break
41746   done
41747 fi
41748 if test -z "$NM"; then
41749   ac_ct_NM=$NM
41750   for ac_prog in nm gcc-nm
41751 do
41752   # Extract the first word of "$ac_prog", so it can be a program name with args.
41753 set dummy $ac_prog; ac_word=$2
41754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41755 $as_echo_n "checking for $ac_word... " >&6; }
41756 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41757   $as_echo_n "(cached) " >&6
41758 else
41759   if test -n "$ac_ct_NM"; then
41760   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41761 else
41762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41763 for as_dir in $PATH
41764 do
41765   IFS=$as_save_IFS
41766   test -z "$as_dir" && as_dir=.
41767     for ac_exec_ext in '' $ac_executable_extensions; do
41768   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41769     ac_cv_prog_ac_ct_NM="$ac_prog"
41770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41771     break 2
41772   fi
41773 done
41774   done
41775 IFS=$as_save_IFS
41776 
41777 fi
41778 fi
41779 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41780 if test -n "$ac_ct_NM"; then
41781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41782 $as_echo "$ac_ct_NM" >&6; }
41783 else
41784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41785 $as_echo "no" >&6; }
41786 fi
41787 
41788 
41789   test -n "$ac_ct_NM" && break
41790 done
41791 
41792   if test "x$ac_ct_NM" = x; then
41793     NM=""
41794   else
41795     case $cross_compiling:$ac_tool_warned in
41796 yes:)
41797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41798 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41799 ac_tool_warned=yes ;;
41800 esac
41801     NM=$ac_ct_NM
41802   fi
41803 fi
41804 
41805   else
41806     # The variable is set, but is it from the command line or the environment?
41807 
41808     # Try to remove the string !NM! from our list.
41809     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41810     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41811       # If it failed, the variable was not from the command line. Ignore it,
41812       # but warn the user (except for BASH, which is always set by the calling BASH).
41813       if test "xNM" != xBASH; then
41814         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41815 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41816       fi
41817       # Try to locate tool using the code snippet
41818       if test -n "$ac_tool_prefix"; then
41819   for ac_prog in nm gcc-nm
41820   do
41821     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41822 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41824 $as_echo_n "checking for $ac_word... " >&6; }
41825 if ${ac_cv_prog_NM+:} false; then :
41826   $as_echo_n "(cached) " >&6
41827 else
41828   if test -n "$NM"; then
41829   ac_cv_prog_NM="$NM" # Let the user override the test.
41830 else
41831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41832 for as_dir in $PATH
41833 do
41834   IFS=$as_save_IFS
41835   test -z "$as_dir" && as_dir=.
41836     for ac_exec_ext in '' $ac_executable_extensions; do
41837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41838     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41840     break 2
41841   fi
41842 done
41843   done
41844 IFS=$as_save_IFS
41845 
41846 fi
41847 fi
41848 NM=$ac_cv_prog_NM
41849 if test -n "$NM"; then
41850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41851 $as_echo "$NM" >&6; }
41852 else
41853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41854 $as_echo "no" >&6; }
41855 fi
41856 
41857 
41858     test -n "$NM" && break
41859   done
41860 fi
41861 if test -z "$NM"; then
41862   ac_ct_NM=$NM
41863   for ac_prog in nm gcc-nm
41864 do
41865   # Extract the first word of "$ac_prog", so it can be a program name with args.
41866 set dummy $ac_prog; ac_word=$2
41867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41868 $as_echo_n "checking for $ac_word... " >&6; }
41869 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41870   $as_echo_n "(cached) " >&6
41871 else
41872   if test -n "$ac_ct_NM"; then
41873   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41874 else
41875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41876 for as_dir in $PATH
41877 do
41878   IFS=$as_save_IFS
41879   test -z "$as_dir" && as_dir=.
41880     for ac_exec_ext in '' $ac_executable_extensions; do
41881   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41882     ac_cv_prog_ac_ct_NM="$ac_prog"
41883     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41884     break 2
41885   fi
41886 done
41887   done
41888 IFS=$as_save_IFS
41889 
41890 fi
41891 fi
41892 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41893 if test -n "$ac_ct_NM"; then
41894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41895 $as_echo "$ac_ct_NM" >&6; }
41896 else
41897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41898 $as_echo "no" >&6; }
41899 fi
41900 
41901 
41902   test -n "$ac_ct_NM" && break
41903 done
41904 
41905   if test "x$ac_ct_NM" = x; then
41906     NM=""
41907   else
41908     case $cross_compiling:$ac_tool_warned in
41909 yes:)
41910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41911 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41912 ac_tool_warned=yes ;;
41913 esac
41914     NM=$ac_ct_NM
41915   fi
41916 fi
41917 
41918     else
41919       # If it succeeded, then it was overridden by the user. We will use it
41920       # for the tool.
41921 
41922       # First remove it from the list of overridden variables, so we can test
41923       # for unknown variables in the end.
41924       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41925 
41926       # Check if we try to supply an empty value
41927       if test "x$NM" = x; then
41928         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41929 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41930         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41931 $as_echo_n "checking for NM... " >&6; }
41932         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41933 $as_echo "disabled" >&6; }
41934       else
41935         # Check if the provided tool contains a complete path.
41936         tool_specified="$NM"
41937         tool_basename="${tool_specified##*/}"
41938         if test "x$tool_basename" = "x$tool_specified"; then
41939           # A command without a complete path is provided, search $PATH.
41940           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41941 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41942           # Extract the first word of "$tool_basename", so it can be a program name with args.
41943 set dummy $tool_basename; ac_word=$2
41944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41945 $as_echo_n "checking for $ac_word... " >&6; }
41946 if ${ac_cv_path_NM+:} false; then :
41947   $as_echo_n "(cached) " >&6
41948 else
41949   case $NM in
41950   [\\/]* | ?:[\\/]*)
41951   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41952   ;;
41953   *)
41954   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41955 for as_dir in $PATH
41956 do
41957   IFS=$as_save_IFS
41958   test -z "$as_dir" && as_dir=.
41959     for ac_exec_ext in '' $ac_executable_extensions; do
41960   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41961     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41962     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41963     break 2
41964   fi
41965 done
41966   done
41967 IFS=$as_save_IFS
41968 
41969   ;;
41970 esac
41971 fi
41972 NM=$ac_cv_path_NM
41973 if test -n "$NM"; then
41974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41975 $as_echo "$NM" >&6; }
41976 else
41977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41978 $as_echo "no" >&6; }
41979 fi
41980 
41981 
41982           if test "x$NM" = x; then
41983             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41984           fi
41985         else
41986           # Otherwise we believe it is a complete path. Use it as it is.
41987           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41988 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41989           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41990 $as_echo_n "checking for NM... " >&6; }
41991           if test ! -x "$tool_specified"; then
41992             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41993 $as_echo "not found" >&6; }
41994             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41995           fi
41996           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41997 $as_echo "$tool_specified" >&6; }
41998         fi
41999       fi
42000     fi
42001 
42002   fi
42003 
42004 
42005     else
42006 
42007 
42008   # Publish this variable in the help.
42009 
42010 
42011   if [ -z "${NM+x}" ]; then
42012     # The variable is not set by user, try to locate tool using the code snippet
42013     if test -n "$ac_tool_prefix"; then
42014   for ac_prog in nm
42015   do
42016     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42017 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42019 $as_echo_n "checking for $ac_word... " >&6; }
42020 if ${ac_cv_prog_NM+:} false; then :
42021   $as_echo_n "(cached) " >&6
42022 else
42023   if test -n "$NM"; then
42024   ac_cv_prog_NM="$NM" # Let the user override the test.
42025 else
42026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42027 for as_dir in $PATH
42028 do
42029   IFS=$as_save_IFS
42030   test -z "$as_dir" && as_dir=.
42031     for ac_exec_ext in '' $ac_executable_extensions; do
42032   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42033     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42034     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42035     break 2
42036   fi
42037 done
42038   done
42039 IFS=$as_save_IFS
42040 
42041 fi
42042 fi
42043 NM=$ac_cv_prog_NM
42044 if test -n "$NM"; then
42045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42046 $as_echo "$NM" >&6; }
42047 else
42048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42049 $as_echo "no" >&6; }
42050 fi
42051 
42052 
42053     test -n "$NM" && break
42054   done
42055 fi
42056 if test -z "$NM"; then
42057   ac_ct_NM=$NM
42058   for ac_prog in nm
42059 do
42060   # Extract the first word of "$ac_prog", so it can be a program name with args.
42061 set dummy $ac_prog; ac_word=$2
42062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42063 $as_echo_n "checking for $ac_word... " >&6; }
42064 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42065   $as_echo_n "(cached) " >&6
42066 else
42067   if test -n "$ac_ct_NM"; then
42068   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42069 else
42070 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42071 for as_dir in $PATH
42072 do
42073   IFS=$as_save_IFS
42074   test -z "$as_dir" && as_dir=.
42075     for ac_exec_ext in '' $ac_executable_extensions; do
42076   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42077     ac_cv_prog_ac_ct_NM="$ac_prog"
42078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42079     break 2
42080   fi
42081 done
42082   done
42083 IFS=$as_save_IFS
42084 
42085 fi
42086 fi
42087 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42088 if test -n "$ac_ct_NM"; then
42089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42090 $as_echo "$ac_ct_NM" >&6; }
42091 else
42092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42093 $as_echo "no" >&6; }
42094 fi
42095 
42096 
42097   test -n "$ac_ct_NM" && break
42098 done
42099 
42100   if test "x$ac_ct_NM" = x; then
42101     NM=""
42102   else
42103     case $cross_compiling:$ac_tool_warned in
42104 yes:)
42105 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42106 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42107 ac_tool_warned=yes ;;
42108 esac
42109     NM=$ac_ct_NM
42110   fi
42111 fi
42112 
42113   else
42114     # The variable is set, but is it from the command line or the environment?
42115 
42116     # Try to remove the string !NM! from our list.
42117     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42118     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42119       # If it failed, the variable was not from the command line. Ignore it,
42120       # but warn the user (except for BASH, which is always set by the calling BASH).
42121       if test "xNM" != xBASH; then
42122         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42123 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42124       fi
42125       # Try to locate tool using the code snippet
42126       if test -n "$ac_tool_prefix"; then
42127   for ac_prog in nm
42128   do
42129     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42130 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42132 $as_echo_n "checking for $ac_word... " >&6; }
42133 if ${ac_cv_prog_NM+:} false; then :
42134   $as_echo_n "(cached) " >&6
42135 else
42136   if test -n "$NM"; then
42137   ac_cv_prog_NM="$NM" # Let the user override the test.
42138 else
42139 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42140 for as_dir in $PATH
42141 do
42142   IFS=$as_save_IFS
42143   test -z "$as_dir" && as_dir=.
42144     for ac_exec_ext in '' $ac_executable_extensions; do
42145   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42146     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42147     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42148     break 2
42149   fi
42150 done
42151   done
42152 IFS=$as_save_IFS
42153 
42154 fi
42155 fi
42156 NM=$ac_cv_prog_NM
42157 if test -n "$NM"; then
42158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42159 $as_echo "$NM" >&6; }
42160 else
42161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42162 $as_echo "no" >&6; }
42163 fi
42164 
42165 
42166     test -n "$NM" && break
42167   done
42168 fi
42169 if test -z "$NM"; then
42170   ac_ct_NM=$NM
42171   for ac_prog in nm
42172 do
42173   # Extract the first word of "$ac_prog", so it can be a program name with args.
42174 set dummy $ac_prog; ac_word=$2
42175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42176 $as_echo_n "checking for $ac_word... " >&6; }
42177 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42178   $as_echo_n "(cached) " >&6
42179 else
42180   if test -n "$ac_ct_NM"; then
42181   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42182 else
42183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42184 for as_dir in $PATH
42185 do
42186   IFS=$as_save_IFS
42187   test -z "$as_dir" && as_dir=.
42188     for ac_exec_ext in '' $ac_executable_extensions; do
42189   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42190     ac_cv_prog_ac_ct_NM="$ac_prog"
42191     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42192     break 2
42193   fi
42194 done
42195   done
42196 IFS=$as_save_IFS
42197 
42198 fi
42199 fi
42200 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42201 if test -n "$ac_ct_NM"; then
42202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42203 $as_echo "$ac_ct_NM" >&6; }
42204 else
42205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42206 $as_echo "no" >&6; }
42207 fi
42208 
42209 
42210   test -n "$ac_ct_NM" && break
42211 done
42212 
42213   if test "x$ac_ct_NM" = x; then
42214     NM=""
42215   else
42216     case $cross_compiling:$ac_tool_warned in
42217 yes:)
42218 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42219 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42220 ac_tool_warned=yes ;;
42221 esac
42222     NM=$ac_ct_NM
42223   fi
42224 fi
42225 
42226     else
42227       # If it succeeded, then it was overridden by the user. We will use it
42228       # for the tool.
42229 
42230       # First remove it from the list of overridden variables, so we can test
42231       # for unknown variables in the end.
42232       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42233 
42234       # Check if we try to supply an empty value
42235       if test "x$NM" = x; then
42236         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42237 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42238         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42239 $as_echo_n "checking for NM... " >&6; }
42240         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42241 $as_echo "disabled" >&6; }
42242       else
42243         # Check if the provided tool contains a complete path.
42244         tool_specified="$NM"
42245         tool_basename="${tool_specified##*/}"
42246         if test "x$tool_basename" = "x$tool_specified"; then
42247           # A command without a complete path is provided, search $PATH.
42248           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42249 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42250           # Extract the first word of "$tool_basename", so it can be a program name with args.
42251 set dummy $tool_basename; ac_word=$2
42252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42253 $as_echo_n "checking for $ac_word... " >&6; }
42254 if ${ac_cv_path_NM+:} false; then :
42255   $as_echo_n "(cached) " >&6
42256 else
42257   case $NM in
42258   [\\/]* | ?:[\\/]*)
42259   ac_cv_path_NM="$NM" # Let the user override the test with a path.
42260   ;;
42261   *)
42262   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42263 for as_dir in $PATH
42264 do
42265   IFS=$as_save_IFS
42266   test -z "$as_dir" && as_dir=.
42267     for ac_exec_ext in '' $ac_executable_extensions; do
42268   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42269     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42270     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42271     break 2
42272   fi
42273 done
42274   done
42275 IFS=$as_save_IFS
42276 
42277   ;;
42278 esac
42279 fi
42280 NM=$ac_cv_path_NM
42281 if test -n "$NM"; then
42282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42283 $as_echo "$NM" >&6; }
42284 else
42285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42286 $as_echo "no" >&6; }
42287 fi
42288 
42289 
42290           if test "x$NM" = x; then
42291             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42292           fi
42293         else
42294           # Otherwise we believe it is a complete path. Use it as it is.
42295           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42296 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42297           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42298 $as_echo_n "checking for NM... " >&6; }
42299           if test ! -x "$tool_specified"; then
42300             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42301 $as_echo "not found" >&6; }
42302             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42303           fi
42304           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42305 $as_echo "$tool_specified" >&6; }
42306         fi
42307       fi
42308     fi
42309 
42310   fi
42311 
42312 
42313     fi
42314 
42315   # Only process if variable expands to non-empty
42316 
42317   if test "x$NM" != x; then
42318     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42319 
42320   # First separate the path from the arguments. This will split at the first
42321   # space.
42322   complete="$NM"
42323   path="${complete%% *}"
42324   tmp="$complete EOL"
42325   arguments="${tmp#* }"
42326 
42327   # Input might be given as Windows format, start by converting to
42328   # unix format.
42329   new_path=`$CYGPATH -u "$path"`
42330 
42331   # Now try to locate executable using which
42332   new_path=`$WHICH "$new_path" 2> /dev/null`
42333   # bat and cmd files are not always considered executable in cygwin causing which
42334   # to not find them
42335   if test "x$new_path" = x \
42336       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42337       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42338     new_path=`$CYGPATH -u "$path"`
42339   fi
42340   if test "x$new_path" = x; then
42341     # Oops. Which didn't find the executable.
42342     # The splitting of arguments from the executable at a space might have been incorrect,
42343     # since paths with space are more likely in Windows. Give it another try with the whole
42344     # argument.
42345     path="$complete"
42346     arguments="EOL"
42347     new_path=`$CYGPATH -u "$path"`
42348     new_path=`$WHICH "$new_path" 2> /dev/null`
42349     # bat and cmd files are not always considered executable in cygwin causing which
42350     # to not find them
42351     if test "x$new_path" = x \
42352         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42353         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42354       new_path=`$CYGPATH -u "$path"`
42355     fi
42356     if test "x$new_path" = x; then
42357       # It's still not found. Now this is an unrecoverable error.
42358       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42359 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42360       has_space=`$ECHO "$complete" | $GREP " "`
42361       if test "x$has_space" != x; then
42362         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42363 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42364       fi
42365       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42366     fi
42367   fi
42368 
42369   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42370   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42371   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42372   # "foo.exe" is OK but "foo" is an error.
42373   #
42374   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42375   # It is also a way to make sure we got the proper file name for the real test later on.
42376   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42377   if test "x$test_shortpath" = x; then
42378     # Short path failed, file does not exist as specified.
42379     # Try adding .exe or .cmd
42380     if test -f "${new_path}.exe"; then
42381       input_to_shortpath="${new_path}.exe"
42382     elif test -f "${new_path}.cmd"; then
42383       input_to_shortpath="${new_path}.cmd"
42384     else
42385       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42386 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42387       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42388 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42389       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42390     fi
42391   else
42392     input_to_shortpath="$new_path"
42393   fi
42394 
42395   # Call helper function which possibly converts this using DOS-style short mode.
42396   # If so, the updated path is stored in $new_path.
42397   new_path="$input_to_shortpath"
42398 
42399   input_path="$input_to_shortpath"
42400   # Check if we need to convert this using DOS-style short mode. If the path
42401   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42402   # take no chances and rewrite it.
42403   # Note: m4 eats our [], so we need to use [ and ] instead.
42404   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42405   if test "x$has_forbidden_chars" != x; then
42406     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42407     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42408     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42409     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42410       # Going to short mode and back again did indeed matter. Since short mode is
42411       # case insensitive, let's make it lowercase to improve readability.
42412       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42413       # Now convert it back to Unix-style (cygpath)
42414       input_path=`$CYGPATH -u "$shortmode_path"`
42415       new_path="$input_path"
42416     fi
42417   fi
42418 
42419   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42420   if test "x$test_cygdrive_prefix" = x; then
42421     # As a simple fix, exclude /usr/bin since it's not a real path.
42422     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42423       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42424       # a path prefixed by /cygdrive for fixpath to work.
42425       new_path="$CYGWIN_ROOT_PATH$input_path"
42426     fi
42427   fi
42428 
42429   # remove trailing .exe if any
42430   new_path="${new_path/%.exe/}"
42431 
42432     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42433 
42434   # First separate the path from the arguments. This will split at the first
42435   # space.
42436   complete="$NM"
42437   path="${complete%% *}"
42438   tmp="$complete EOL"
42439   arguments="${tmp#* }"
42440 
42441   # Input might be given as Windows format, start by converting to
42442   # unix format.
42443   new_path="$path"
42444 
42445   windows_path="$new_path"
42446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42447     unix_path=`$CYGPATH -u "$windows_path"`
42448     new_path="$unix_path"
42449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42450     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42451     new_path="$unix_path"
42452   fi
42453 
42454 
42455   # Now try to locate executable using which
42456   new_path=`$WHICH "$new_path" 2> /dev/null`
42457 
42458   if test "x$new_path" = x; then
42459     # Oops. Which didn't find the executable.
42460     # The splitting of arguments from the executable at a space might have been incorrect,
42461     # since paths with space are more likely in Windows. Give it another try with the whole
42462     # argument.
42463     path="$complete"
42464     arguments="EOL"
42465     new_path="$path"
42466 
42467   windows_path="$new_path"
42468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42469     unix_path=`$CYGPATH -u "$windows_path"`
42470     new_path="$unix_path"
42471   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42472     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42473     new_path="$unix_path"
42474   fi
42475 
42476 
42477     new_path=`$WHICH "$new_path" 2> /dev/null`
42478     # bat and cmd files are not always considered executable in MSYS causing which
42479     # to not find them
42480     if test "x$new_path" = x \
42481         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42482         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42483       new_path="$path"
42484 
42485   windows_path="$new_path"
42486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42487     unix_path=`$CYGPATH -u "$windows_path"`
42488     new_path="$unix_path"
42489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42490     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42491     new_path="$unix_path"
42492   fi
42493 
42494     fi
42495 
42496     if test "x$new_path" = x; then
42497       # It's still not found. Now this is an unrecoverable error.
42498       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42499 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42500       has_space=`$ECHO "$complete" | $GREP " "`
42501       if test "x$has_space" != x; then
42502         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42503 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42504       fi
42505       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42506     fi
42507   fi
42508 
42509   # Now new_path has a complete unix path to the binary
42510   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42511     # Keep paths in /bin as-is, but remove trailing .exe if any
42512     new_path="${new_path/%.exe/}"
42513     # Do not save /bin paths to all_fixpath_prefixes!
42514   else
42515     # Not in mixed or Windows style, start by that.
42516     new_path=`cmd //c echo $new_path`
42517 
42518   input_path="$new_path"
42519   # Check if we need to convert this using DOS-style short mode. If the path
42520   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42521   # take no chances and rewrite it.
42522   # Note: m4 eats our [], so we need to use [ and ] instead.
42523   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42524   if test "x$has_forbidden_chars" != x; then
42525     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42526     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42527   fi
42528 
42529     # Output is in $new_path
42530 
42531   windows_path="$new_path"
42532   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42533     unix_path=`$CYGPATH -u "$windows_path"`
42534     new_path="$unix_path"
42535   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42536     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42537     new_path="$unix_path"
42538   fi
42539 
42540     # remove trailing .exe if any
42541     new_path="${new_path/%.exe/}"
42542 
42543     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42544     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42545   fi
42546 
42547     else
42548       # We're on a unix platform. Hooray! :)
42549       # First separate the path from the arguments. This will split at the first
42550       # space.
42551       complete="$NM"
42552       path="${complete%% *}"
42553       tmp="$complete EOL"
42554       arguments="${tmp#* }"
42555 
42556       # Cannot rely on the command "which" here since it doesn't always work.
42557       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42558       if test -z "$is_absolute_path"; then
42559         # Path to executable is not absolute. Find it.
42560         IFS_save="$IFS"
42561         IFS=:
42562         for p in $PATH; do
42563           if test -f "$p/$path" && test -x "$p/$path"; then
42564             new_path="$p/$path"
42565             break
42566           fi
42567         done
42568         IFS="$IFS_save"
42569       else
42570         # This is an absolute path, we can use it without further modifications.
42571         new_path="$path"
42572       fi
42573 
42574       if test "x$new_path" = x; then
42575         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42576 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42577         has_space=`$ECHO "$complete" | $GREP " "`
42578         if test "x$has_space" != x; then
42579           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42580 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42581         fi
42582         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42583       fi
42584     fi
42585 
42586     # Now join together the path and the arguments once again
42587     if test "x$arguments" != xEOL; then
42588       new_complete="$new_path ${arguments% *}"
42589     else
42590       new_complete="$new_path"
42591     fi
42592 
42593     if test "x$complete" != "x$new_complete"; then
42594       NM="$new_complete"
42595       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42596 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42597     fi
42598   fi
42599 
42600     GNM="$NM"
42601 
42602   fi
42603 
42604   # objcopy is used for moving debug symbols to separate files when
42605   # full debug symbols are enabled.
42606   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux || \
42607       test "x$OPENJDK_TARGET_OS" = xandroid ; then
42608 
42609 
42610   # Publish this variable in the help.
42611 
42612 
42613   if [ -z "${OBJCOPY+x}" ]; then
42614     # The variable is not set by user, try to locate tool using the code snippet
42615     if test -n "$ac_tool_prefix"; then
42616   for ac_prog in gobjcopy objcopy
42617   do
42618     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42619 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42621 $as_echo_n "checking for $ac_word... " >&6; }
42622 if ${ac_cv_prog_OBJCOPY+:} false; then :
42623   $as_echo_n "(cached) " >&6
42624 else
42625   if test -n "$OBJCOPY"; then
42626   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42627 else
42628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42629 for as_dir in $PATH
42630 do
42631   IFS=$as_save_IFS
42632   test -z "$as_dir" && as_dir=.
42633     for ac_exec_ext in '' $ac_executable_extensions; do
42634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42635     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42637     break 2
42638   fi
42639 done
42640   done
42641 IFS=$as_save_IFS
42642 
42643 fi
42644 fi
42645 OBJCOPY=$ac_cv_prog_OBJCOPY
42646 if test -n "$OBJCOPY"; then
42647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42648 $as_echo "$OBJCOPY" >&6; }
42649 else
42650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42651 $as_echo "no" >&6; }
42652 fi
42653 
42654 
42655     test -n "$OBJCOPY" && break
42656   done
42657 fi
42658 if test -z "$OBJCOPY"; then
42659   ac_ct_OBJCOPY=$OBJCOPY
42660   for ac_prog in gobjcopy objcopy
42661 do
42662   # Extract the first word of "$ac_prog", so it can be a program name with args.
42663 set dummy $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_ac_ct_OBJCOPY+:} false; then :
42667   $as_echo_n "(cached) " >&6
42668 else
42669   if test -n "$ac_ct_OBJCOPY"; then
42670   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_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_ac_ct_OBJCOPY="$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 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42690 if test -n "$ac_ct_OBJCOPY"; then
42691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42692 $as_echo "$ac_ct_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 "$ac_ct_OBJCOPY" && break
42700 done
42701 
42702   if test "x$ac_ct_OBJCOPY" = x; then
42703     OBJCOPY=""
42704   else
42705     case $cross_compiling:$ac_tool_warned in
42706 yes:)
42707 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42708 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42709 ac_tool_warned=yes ;;
42710 esac
42711     OBJCOPY=$ac_ct_OBJCOPY
42712   fi
42713 fi
42714 
42715   else
42716     # The variable is set, but is it from the command line or the environment?
42717 
42718     # Try to remove the string !OBJCOPY! from our list.
42719     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42720     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42721       # If it failed, the variable was not from the command line. Ignore it,
42722       # but warn the user (except for BASH, which is always set by the calling BASH).
42723       if test "xOBJCOPY" != xBASH; then
42724         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42725 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42726       fi
42727       # Try to locate tool using the code snippet
42728       if test -n "$ac_tool_prefix"; then
42729   for ac_prog in gobjcopy objcopy
42730   do
42731     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42732 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42734 $as_echo_n "checking for $ac_word... " >&6; }
42735 if ${ac_cv_prog_OBJCOPY+:} false; then :
42736   $as_echo_n "(cached) " >&6
42737 else
42738   if test -n "$OBJCOPY"; then
42739   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42740 else
42741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42742 for as_dir in $PATH
42743 do
42744   IFS=$as_save_IFS
42745   test -z "$as_dir" && as_dir=.
42746     for ac_exec_ext in '' $ac_executable_extensions; do
42747   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42748     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42749     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42750     break 2
42751   fi
42752 done
42753   done
42754 IFS=$as_save_IFS
42755 
42756 fi
42757 fi
42758 OBJCOPY=$ac_cv_prog_OBJCOPY
42759 if test -n "$OBJCOPY"; then
42760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42761 $as_echo "$OBJCOPY" >&6; }
42762 else
42763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42764 $as_echo "no" >&6; }
42765 fi
42766 
42767 
42768     test -n "$OBJCOPY" && break
42769   done
42770 fi
42771 if test -z "$OBJCOPY"; then
42772   ac_ct_OBJCOPY=$OBJCOPY
42773   for ac_prog in gobjcopy objcopy
42774 do
42775   # Extract the first word of "$ac_prog", so it can be a program name with args.
42776 set dummy $ac_prog; ac_word=$2
42777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42778 $as_echo_n "checking for $ac_word... " >&6; }
42779 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42780   $as_echo_n "(cached) " >&6
42781 else
42782   if test -n "$ac_ct_OBJCOPY"; then
42783   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42784 else
42785 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42786 for as_dir in $PATH
42787 do
42788   IFS=$as_save_IFS
42789   test -z "$as_dir" && as_dir=.
42790     for ac_exec_ext in '' $ac_executable_extensions; do
42791   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42792     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42793     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42794     break 2
42795   fi
42796 done
42797   done
42798 IFS=$as_save_IFS
42799 
42800 fi
42801 fi
42802 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42803 if test -n "$ac_ct_OBJCOPY"; then
42804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42805 $as_echo "$ac_ct_OBJCOPY" >&6; }
42806 else
42807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42808 $as_echo "no" >&6; }
42809 fi
42810 
42811 
42812   test -n "$ac_ct_OBJCOPY" && break
42813 done
42814 
42815   if test "x$ac_ct_OBJCOPY" = x; then
42816     OBJCOPY=""
42817   else
42818     case $cross_compiling:$ac_tool_warned in
42819 yes:)
42820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42821 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42822 ac_tool_warned=yes ;;
42823 esac
42824     OBJCOPY=$ac_ct_OBJCOPY
42825   fi
42826 fi
42827 
42828     else
42829       # If it succeeded, then it was overridden by the user. We will use it
42830       # for the tool.
42831 
42832       # First remove it from the list of overridden variables, so we can test
42833       # for unknown variables in the end.
42834       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42835 
42836       # Check if we try to supply an empty value
42837       if test "x$OBJCOPY" = x; then
42838         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42839 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42840         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42841 $as_echo_n "checking for OBJCOPY... " >&6; }
42842         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42843 $as_echo "disabled" >&6; }
42844       else
42845         # Check if the provided tool contains a complete path.
42846         tool_specified="$OBJCOPY"
42847         tool_basename="${tool_specified##*/}"
42848         if test "x$tool_basename" = "x$tool_specified"; then
42849           # A command without a complete path is provided, search $PATH.
42850           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42851 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42852           # Extract the first word of "$tool_basename", so it can be a program name with args.
42853 set dummy $tool_basename; ac_word=$2
42854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42855 $as_echo_n "checking for $ac_word... " >&6; }
42856 if ${ac_cv_path_OBJCOPY+:} false; then :
42857   $as_echo_n "(cached) " >&6
42858 else
42859   case $OBJCOPY in
42860   [\\/]* | ?:[\\/]*)
42861   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42862   ;;
42863   *)
42864   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42865 for as_dir in $PATH
42866 do
42867   IFS=$as_save_IFS
42868   test -z "$as_dir" && as_dir=.
42869     for ac_exec_ext in '' $ac_executable_extensions; do
42870   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42871     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42872     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42873     break 2
42874   fi
42875 done
42876   done
42877 IFS=$as_save_IFS
42878 
42879   ;;
42880 esac
42881 fi
42882 OBJCOPY=$ac_cv_path_OBJCOPY
42883 if test -n "$OBJCOPY"; then
42884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42885 $as_echo "$OBJCOPY" >&6; }
42886 else
42887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42888 $as_echo "no" >&6; }
42889 fi
42890 
42891 
42892           if test "x$OBJCOPY" = x; then
42893             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42894           fi
42895         else
42896           # Otherwise we believe it is a complete path. Use it as it is.
42897           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42898 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42899           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42900 $as_echo_n "checking for OBJCOPY... " >&6; }
42901           if test ! -x "$tool_specified"; then
42902             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42903 $as_echo "not found" >&6; }
42904             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42905           fi
42906           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42907 $as_echo "$tool_specified" >&6; }
42908         fi
42909       fi
42910     fi
42911 
42912   fi
42913 
42914 
42915     # Only call fixup if objcopy was found.
42916     if test -n "$OBJCOPY"; then
42917 
42918   # Only process if variable expands to non-empty
42919 
42920   if test "x$OBJCOPY" != x; then
42921     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42922 
42923   # First separate the path from the arguments. This will split at the first
42924   # space.
42925   complete="$OBJCOPY"
42926   path="${complete%% *}"
42927   tmp="$complete EOL"
42928   arguments="${tmp#* }"
42929 
42930   # Input might be given as Windows format, start by converting to
42931   # unix format.
42932   new_path=`$CYGPATH -u "$path"`
42933 
42934   # Now try to locate executable using which
42935   new_path=`$WHICH "$new_path" 2> /dev/null`
42936   # bat and cmd files are not always considered executable in cygwin causing which
42937   # to not find them
42938   if test "x$new_path" = x \
42939       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42940       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42941     new_path=`$CYGPATH -u "$path"`
42942   fi
42943   if test "x$new_path" = x; then
42944     # Oops. Which didn't find the executable.
42945     # The splitting of arguments from the executable at a space might have been incorrect,
42946     # since paths with space are more likely in Windows. Give it another try with the whole
42947     # argument.
42948     path="$complete"
42949     arguments="EOL"
42950     new_path=`$CYGPATH -u "$path"`
42951     new_path=`$WHICH "$new_path" 2> /dev/null`
42952     # bat and cmd files are not always considered executable in cygwin causing which
42953     # to not find them
42954     if test "x$new_path" = x \
42955         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42956         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42957       new_path=`$CYGPATH -u "$path"`
42958     fi
42959     if test "x$new_path" = x; then
42960       # It's still not found. Now this is an unrecoverable error.
42961       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42962 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42963       has_space=`$ECHO "$complete" | $GREP " "`
42964       if test "x$has_space" != x; then
42965         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42966 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42967       fi
42968       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42969     fi
42970   fi
42971 
42972   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42973   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42974   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42975   # "foo.exe" is OK but "foo" is an error.
42976   #
42977   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42978   # It is also a way to make sure we got the proper file name for the real test later on.
42979   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42980   if test "x$test_shortpath" = x; then
42981     # Short path failed, file does not exist as specified.
42982     # Try adding .exe or .cmd
42983     if test -f "${new_path}.exe"; then
42984       input_to_shortpath="${new_path}.exe"
42985     elif test -f "${new_path}.cmd"; then
42986       input_to_shortpath="${new_path}.cmd"
42987     else
42988       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42989 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42990       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42991 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42992       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42993     fi
42994   else
42995     input_to_shortpath="$new_path"
42996   fi
42997 
42998   # Call helper function which possibly converts this using DOS-style short mode.
42999   # If so, the updated path is stored in $new_path.
43000   new_path="$input_to_shortpath"
43001 
43002   input_path="$input_to_shortpath"
43003   # Check if we need to convert this using DOS-style short mode. If the path
43004   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43005   # take no chances and rewrite it.
43006   # Note: m4 eats our [], so we need to use [ and ] instead.
43007   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43008   if test "x$has_forbidden_chars" != x; then
43009     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43010     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43011     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43012     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43013       # Going to short mode and back again did indeed matter. Since short mode is
43014       # case insensitive, let's make it lowercase to improve readability.
43015       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43016       # Now convert it back to Unix-style (cygpath)
43017       input_path=`$CYGPATH -u "$shortmode_path"`
43018       new_path="$input_path"
43019     fi
43020   fi
43021 
43022   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43023   if test "x$test_cygdrive_prefix" = x; then
43024     # As a simple fix, exclude /usr/bin since it's not a real path.
43025     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43026       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43027       # a path prefixed by /cygdrive for fixpath to work.
43028       new_path="$CYGWIN_ROOT_PATH$input_path"
43029     fi
43030   fi
43031 
43032   # remove trailing .exe if any
43033   new_path="${new_path/%.exe/}"
43034 
43035     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43036 
43037   # First separate the path from the arguments. This will split at the first
43038   # space.
43039   complete="$OBJCOPY"
43040   path="${complete%% *}"
43041   tmp="$complete EOL"
43042   arguments="${tmp#* }"
43043 
43044   # Input might be given as Windows format, start by converting to
43045   # unix format.
43046   new_path="$path"
43047 
43048   windows_path="$new_path"
43049   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43050     unix_path=`$CYGPATH -u "$windows_path"`
43051     new_path="$unix_path"
43052   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43053     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43054     new_path="$unix_path"
43055   fi
43056 
43057 
43058   # Now try to locate executable using which
43059   new_path=`$WHICH "$new_path" 2> /dev/null`
43060 
43061   if test "x$new_path" = x; then
43062     # Oops. Which didn't find the executable.
43063     # The splitting of arguments from the executable at a space might have been incorrect,
43064     # since paths with space are more likely in Windows. Give it another try with the whole
43065     # argument.
43066     path="$complete"
43067     arguments="EOL"
43068     new_path="$path"
43069 
43070   windows_path="$new_path"
43071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43072     unix_path=`$CYGPATH -u "$windows_path"`
43073     new_path="$unix_path"
43074   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43075     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43076     new_path="$unix_path"
43077   fi
43078 
43079 
43080     new_path=`$WHICH "$new_path" 2> /dev/null`
43081     # bat and cmd files are not always considered executable in MSYS causing which
43082     # to not find them
43083     if test "x$new_path" = x \
43084         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43085         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43086       new_path="$path"
43087 
43088   windows_path="$new_path"
43089   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43090     unix_path=`$CYGPATH -u "$windows_path"`
43091     new_path="$unix_path"
43092   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43093     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43094     new_path="$unix_path"
43095   fi
43096 
43097     fi
43098 
43099     if test "x$new_path" = x; then
43100       # It's still not found. Now this is an unrecoverable error.
43101       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43102 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43103       has_space=`$ECHO "$complete" | $GREP " "`
43104       if test "x$has_space" != x; then
43105         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43106 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43107       fi
43108       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43109     fi
43110   fi
43111 
43112   # Now new_path has a complete unix path to the binary
43113   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43114     # Keep paths in /bin as-is, but remove trailing .exe if any
43115     new_path="${new_path/%.exe/}"
43116     # Do not save /bin paths to all_fixpath_prefixes!
43117   else
43118     # Not in mixed or Windows style, start by that.
43119     new_path=`cmd //c echo $new_path`
43120 
43121   input_path="$new_path"
43122   # Check if we need to convert this using DOS-style short mode. If the path
43123   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43124   # take no chances and rewrite it.
43125   # Note: m4 eats our [], so we need to use [ and ] instead.
43126   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43127   if test "x$has_forbidden_chars" != x; then
43128     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43129     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43130   fi
43131 
43132     # Output is in $new_path
43133 
43134   windows_path="$new_path"
43135   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43136     unix_path=`$CYGPATH -u "$windows_path"`
43137     new_path="$unix_path"
43138   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43139     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43140     new_path="$unix_path"
43141   fi
43142 
43143     # remove trailing .exe if any
43144     new_path="${new_path/%.exe/}"
43145 
43146     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43147     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43148   fi
43149 
43150     else
43151       # We're on a unix platform. Hooray! :)
43152       # First separate the path from the arguments. This will split at the first
43153       # space.
43154       complete="$OBJCOPY"
43155       path="${complete%% *}"
43156       tmp="$complete EOL"
43157       arguments="${tmp#* }"
43158 
43159       # Cannot rely on the command "which" here since it doesn't always work.
43160       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43161       if test -z "$is_absolute_path"; then
43162         # Path to executable is not absolute. Find it.
43163         IFS_save="$IFS"
43164         IFS=:
43165         for p in $PATH; do
43166           if test -f "$p/$path" && test -x "$p/$path"; then
43167             new_path="$p/$path"
43168             break
43169           fi
43170         done
43171         IFS="$IFS_save"
43172       else
43173         # This is an absolute path, we can use it without further modifications.
43174         new_path="$path"
43175       fi
43176 
43177       if test "x$new_path" = x; then
43178         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43179 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43180         has_space=`$ECHO "$complete" | $GREP " "`
43181         if test "x$has_space" != x; then
43182           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43183 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43184         fi
43185         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43186       fi
43187     fi
43188 
43189     # Now join together the path and the arguments once again
43190     if test "x$arguments" != xEOL; then
43191       new_complete="$new_path ${arguments% *}"
43192     else
43193       new_complete="$new_path"
43194     fi
43195 
43196     if test "x$complete" != "x$new_complete"; then
43197       OBJCOPY="$new_complete"
43198       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43199 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43200     fi
43201   fi
43202 
43203       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43204         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43205         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43206         # - version number is last blank separate word on first line
43207         # - version number formats that have been seen:
43208         #   - <major>.<minor>
43209         #   - <major>.<minor>.<micro>
43210         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43211         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43212          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43213               -e 's/.* //' \
43214               -e '/^[01]\./b bad' \
43215               -e '/^2\./{' \
43216               -e '  s/^2\.//' \
43217               -e '  /^[0-9]$/b bad' \
43218               -e '  /^[0-9]\./b bad' \
43219               -e '  /^1[0-9]$/b bad' \
43220               -e '  /^1[0-9]\./b bad' \
43221               -e '  /^20\./b bad' \
43222               -e '  /^21\.0$/b bad' \
43223               -e '  /^21\.0\./b bad' \
43224               -e '}' \
43225               -e ':good' \
43226               -e 's/.*/VALID_VERSION/p' \
43227               -e 'q' \
43228               -e ':bad' \
43229               -e 's/.*/BAD_VERSION/p' \
43230               -e 'q'`
43231         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43232           OBJCOPY=
43233           { $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
43234 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43235           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43236 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43237           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43238 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43239           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43240 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43241           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43242 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43243         fi
43244       fi
43245     fi
43246   fi
43247 
43248 
43249 
43250   # Publish this variable in the help.
43251 
43252 
43253   if [ -z "${OBJDUMP+x}" ]; then
43254     # The variable is not set by user, try to locate tool using the code snippet
43255     if test -n "$ac_tool_prefix"; then
43256   for ac_prog in gobjdump objdump
43257   do
43258     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43259 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43261 $as_echo_n "checking for $ac_word... " >&6; }
43262 if ${ac_cv_prog_OBJDUMP+:} false; then :
43263   $as_echo_n "(cached) " >&6
43264 else
43265   if test -n "$OBJDUMP"; then
43266   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43267 else
43268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43269 for as_dir in $PATH
43270 do
43271   IFS=$as_save_IFS
43272   test -z "$as_dir" && as_dir=.
43273     for ac_exec_ext in '' $ac_executable_extensions; do
43274   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43275     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43276     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43277     break 2
43278   fi
43279 done
43280   done
43281 IFS=$as_save_IFS
43282 
43283 fi
43284 fi
43285 OBJDUMP=$ac_cv_prog_OBJDUMP
43286 if test -n "$OBJDUMP"; then
43287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43288 $as_echo "$OBJDUMP" >&6; }
43289 else
43290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43291 $as_echo "no" >&6; }
43292 fi
43293 
43294 
43295     test -n "$OBJDUMP" && break
43296   done
43297 fi
43298 if test -z "$OBJDUMP"; then
43299   ac_ct_OBJDUMP=$OBJDUMP
43300   for ac_prog in gobjdump objdump
43301 do
43302   # Extract the first word of "$ac_prog", so it can be a program name with args.
43303 set dummy $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_ac_ct_OBJDUMP+:} false; then :
43307   $as_echo_n "(cached) " >&6
43308 else
43309   if test -n "$ac_ct_OBJDUMP"; then
43310   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_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_ac_ct_OBJDUMP="$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 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43330 if test -n "$ac_ct_OBJDUMP"; then
43331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43332 $as_echo "$ac_ct_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 "$ac_ct_OBJDUMP" && break
43340 done
43341 
43342   if test "x$ac_ct_OBJDUMP" = x; then
43343     OBJDUMP=""
43344   else
43345     case $cross_compiling:$ac_tool_warned in
43346 yes:)
43347 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43348 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43349 ac_tool_warned=yes ;;
43350 esac
43351     OBJDUMP=$ac_ct_OBJDUMP
43352   fi
43353 fi
43354 
43355   else
43356     # The variable is set, but is it from the command line or the environment?
43357 
43358     # Try to remove the string !OBJDUMP! from our list.
43359     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43360     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43361       # If it failed, the variable was not from the command line. Ignore it,
43362       # but warn the user (except for BASH, which is always set by the calling BASH).
43363       if test "xOBJDUMP" != xBASH; then
43364         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43365 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43366       fi
43367       # Try to locate tool using the code snippet
43368       if test -n "$ac_tool_prefix"; then
43369   for ac_prog in gobjdump objdump
43370   do
43371     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43372 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43374 $as_echo_n "checking for $ac_word... " >&6; }
43375 if ${ac_cv_prog_OBJDUMP+:} false; then :
43376   $as_echo_n "(cached) " >&6
43377 else
43378   if test -n "$OBJDUMP"; then
43379   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43380 else
43381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43382 for as_dir in $PATH
43383 do
43384   IFS=$as_save_IFS
43385   test -z "$as_dir" && as_dir=.
43386     for ac_exec_ext in '' $ac_executable_extensions; do
43387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43388     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43390     break 2
43391   fi
43392 done
43393   done
43394 IFS=$as_save_IFS
43395 
43396 fi
43397 fi
43398 OBJDUMP=$ac_cv_prog_OBJDUMP
43399 if test -n "$OBJDUMP"; then
43400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43401 $as_echo "$OBJDUMP" >&6; }
43402 else
43403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43404 $as_echo "no" >&6; }
43405 fi
43406 
43407 
43408     test -n "$OBJDUMP" && break
43409   done
43410 fi
43411 if test -z "$OBJDUMP"; then
43412   ac_ct_OBJDUMP=$OBJDUMP
43413   for ac_prog in gobjdump objdump
43414 do
43415   # Extract the first word of "$ac_prog", so it can be a program name with args.
43416 set dummy $ac_prog; ac_word=$2
43417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43418 $as_echo_n "checking for $ac_word... " >&6; }
43419 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43420   $as_echo_n "(cached) " >&6
43421 else
43422   if test -n "$ac_ct_OBJDUMP"; then
43423   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43424 else
43425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43426 for as_dir in $PATH
43427 do
43428   IFS=$as_save_IFS
43429   test -z "$as_dir" && as_dir=.
43430     for ac_exec_ext in '' $ac_executable_extensions; do
43431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43432     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43434     break 2
43435   fi
43436 done
43437   done
43438 IFS=$as_save_IFS
43439 
43440 fi
43441 fi
43442 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43443 if test -n "$ac_ct_OBJDUMP"; then
43444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43445 $as_echo "$ac_ct_OBJDUMP" >&6; }
43446 else
43447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43448 $as_echo "no" >&6; }
43449 fi
43450 
43451 
43452   test -n "$ac_ct_OBJDUMP" && break
43453 done
43454 
43455   if test "x$ac_ct_OBJDUMP" = x; then
43456     OBJDUMP=""
43457   else
43458     case $cross_compiling:$ac_tool_warned in
43459 yes:)
43460 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43461 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43462 ac_tool_warned=yes ;;
43463 esac
43464     OBJDUMP=$ac_ct_OBJDUMP
43465   fi
43466 fi
43467 
43468     else
43469       # If it succeeded, then it was overridden by the user. We will use it
43470       # for the tool.
43471 
43472       # First remove it from the list of overridden variables, so we can test
43473       # for unknown variables in the end.
43474       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43475 
43476       # Check if we try to supply an empty value
43477       if test "x$OBJDUMP" = x; then
43478         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43479 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43480         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43481 $as_echo_n "checking for OBJDUMP... " >&6; }
43482         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43483 $as_echo "disabled" >&6; }
43484       else
43485         # Check if the provided tool contains a complete path.
43486         tool_specified="$OBJDUMP"
43487         tool_basename="${tool_specified##*/}"
43488         if test "x$tool_basename" = "x$tool_specified"; then
43489           # A command without a complete path is provided, search $PATH.
43490           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43491 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43492           # Extract the first word of "$tool_basename", so it can be a program name with args.
43493 set dummy $tool_basename; ac_word=$2
43494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43495 $as_echo_n "checking for $ac_word... " >&6; }
43496 if ${ac_cv_path_OBJDUMP+:} false; then :
43497   $as_echo_n "(cached) " >&6
43498 else
43499   case $OBJDUMP in
43500   [\\/]* | ?:[\\/]*)
43501   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43502   ;;
43503   *)
43504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43505 for as_dir in $PATH
43506 do
43507   IFS=$as_save_IFS
43508   test -z "$as_dir" && as_dir=.
43509     for ac_exec_ext in '' $ac_executable_extensions; do
43510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43511     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43513     break 2
43514   fi
43515 done
43516   done
43517 IFS=$as_save_IFS
43518 
43519   ;;
43520 esac
43521 fi
43522 OBJDUMP=$ac_cv_path_OBJDUMP
43523 if test -n "$OBJDUMP"; then
43524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43525 $as_echo "$OBJDUMP" >&6; }
43526 else
43527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43528 $as_echo "no" >&6; }
43529 fi
43530 
43531 
43532           if test "x$OBJDUMP" = x; then
43533             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43534           fi
43535         else
43536           # Otherwise we believe it is a complete path. Use it as it is.
43537           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43538 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43539           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43540 $as_echo_n "checking for OBJDUMP... " >&6; }
43541           if test ! -x "$tool_specified"; then
43542             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43543 $as_echo "not found" >&6; }
43544             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43545           fi
43546           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43547 $as_echo "$tool_specified" >&6; }
43548         fi
43549       fi
43550     fi
43551 
43552   fi
43553 
43554 
43555   if test "x$OBJDUMP" != x; then
43556     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43557     # bails if argument is missing.
43558 
43559   # Only process if variable expands to non-empty
43560 
43561   if test "x$OBJDUMP" != x; then
43562     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43563 
43564   # First separate the path from the arguments. This will split at the first
43565   # space.
43566   complete="$OBJDUMP"
43567   path="${complete%% *}"
43568   tmp="$complete EOL"
43569   arguments="${tmp#* }"
43570 
43571   # Input might be given as Windows format, start by converting to
43572   # unix format.
43573   new_path=`$CYGPATH -u "$path"`
43574 
43575   # Now try to locate executable using which
43576   new_path=`$WHICH "$new_path" 2> /dev/null`
43577   # bat and cmd files are not always considered executable in cygwin causing which
43578   # to not find them
43579   if test "x$new_path" = x \
43580       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43581       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43582     new_path=`$CYGPATH -u "$path"`
43583   fi
43584   if test "x$new_path" = x; then
43585     # Oops. Which didn't find the executable.
43586     # The splitting of arguments from the executable at a space might have been incorrect,
43587     # since paths with space are more likely in Windows. Give it another try with the whole
43588     # argument.
43589     path="$complete"
43590     arguments="EOL"
43591     new_path=`$CYGPATH -u "$path"`
43592     new_path=`$WHICH "$new_path" 2> /dev/null`
43593     # bat and cmd files are not always considered executable in cygwin causing which
43594     # to not find them
43595     if test "x$new_path" = x \
43596         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43597         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43598       new_path=`$CYGPATH -u "$path"`
43599     fi
43600     if test "x$new_path" = x; then
43601       # It's still not found. Now this is an unrecoverable error.
43602       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43603 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43604       has_space=`$ECHO "$complete" | $GREP " "`
43605       if test "x$has_space" != x; then
43606         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43607 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43608       fi
43609       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43610     fi
43611   fi
43612 
43613   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43614   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43615   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43616   # "foo.exe" is OK but "foo" is an error.
43617   #
43618   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43619   # It is also a way to make sure we got the proper file name for the real test later on.
43620   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43621   if test "x$test_shortpath" = x; then
43622     # Short path failed, file does not exist as specified.
43623     # Try adding .exe or .cmd
43624     if test -f "${new_path}.exe"; then
43625       input_to_shortpath="${new_path}.exe"
43626     elif test -f "${new_path}.cmd"; then
43627       input_to_shortpath="${new_path}.cmd"
43628     else
43629       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43630 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43631       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43632 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43633       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43634     fi
43635   else
43636     input_to_shortpath="$new_path"
43637   fi
43638 
43639   # Call helper function which possibly converts this using DOS-style short mode.
43640   # If so, the updated path is stored in $new_path.
43641   new_path="$input_to_shortpath"
43642 
43643   input_path="$input_to_shortpath"
43644   # Check if we need to convert this using DOS-style short mode. If the path
43645   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43646   # take no chances and rewrite it.
43647   # Note: m4 eats our [], so we need to use [ and ] instead.
43648   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43649   if test "x$has_forbidden_chars" != x; then
43650     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43651     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43652     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43653     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43654       # Going to short mode and back again did indeed matter. Since short mode is
43655       # case insensitive, let's make it lowercase to improve readability.
43656       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43657       # Now convert it back to Unix-style (cygpath)
43658       input_path=`$CYGPATH -u "$shortmode_path"`
43659       new_path="$input_path"
43660     fi
43661   fi
43662 
43663   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43664   if test "x$test_cygdrive_prefix" = x; then
43665     # As a simple fix, exclude /usr/bin since it's not a real path.
43666     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43667       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43668       # a path prefixed by /cygdrive for fixpath to work.
43669       new_path="$CYGWIN_ROOT_PATH$input_path"
43670     fi
43671   fi
43672 
43673   # remove trailing .exe if any
43674   new_path="${new_path/%.exe/}"
43675 
43676     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43677 
43678   # First separate the path from the arguments. This will split at the first
43679   # space.
43680   complete="$OBJDUMP"
43681   path="${complete%% *}"
43682   tmp="$complete EOL"
43683   arguments="${tmp#* }"
43684 
43685   # Input might be given as Windows format, start by converting to
43686   # unix format.
43687   new_path="$path"
43688 
43689   windows_path="$new_path"
43690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43691     unix_path=`$CYGPATH -u "$windows_path"`
43692     new_path="$unix_path"
43693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43694     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43695     new_path="$unix_path"
43696   fi
43697 
43698 
43699   # Now try to locate executable using which
43700   new_path=`$WHICH "$new_path" 2> /dev/null`
43701 
43702   if test "x$new_path" = x; then
43703     # Oops. Which didn't find the executable.
43704     # The splitting of arguments from the executable at a space might have been incorrect,
43705     # since paths with space are more likely in Windows. Give it another try with the whole
43706     # argument.
43707     path="$complete"
43708     arguments="EOL"
43709     new_path="$path"
43710 
43711   windows_path="$new_path"
43712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43713     unix_path=`$CYGPATH -u "$windows_path"`
43714     new_path="$unix_path"
43715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43716     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43717     new_path="$unix_path"
43718   fi
43719 
43720 
43721     new_path=`$WHICH "$new_path" 2> /dev/null`
43722     # bat and cmd files are not always considered executable in MSYS causing which
43723     # to not find them
43724     if test "x$new_path" = x \
43725         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43726         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43727       new_path="$path"
43728 
43729   windows_path="$new_path"
43730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43731     unix_path=`$CYGPATH -u "$windows_path"`
43732     new_path="$unix_path"
43733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43734     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43735     new_path="$unix_path"
43736   fi
43737 
43738     fi
43739 
43740     if test "x$new_path" = x; then
43741       # It's still not found. Now this is an unrecoverable error.
43742       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43743 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43744       has_space=`$ECHO "$complete" | $GREP " "`
43745       if test "x$has_space" != x; then
43746         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43747 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43748       fi
43749       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43750     fi
43751   fi
43752 
43753   # Now new_path has a complete unix path to the binary
43754   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43755     # Keep paths in /bin as-is, but remove trailing .exe if any
43756     new_path="${new_path/%.exe/}"
43757     # Do not save /bin paths to all_fixpath_prefixes!
43758   else
43759     # Not in mixed or Windows style, start by that.
43760     new_path=`cmd //c echo $new_path`
43761 
43762   input_path="$new_path"
43763   # Check if we need to convert this using DOS-style short mode. If the path
43764   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43765   # take no chances and rewrite it.
43766   # Note: m4 eats our [], so we need to use [ and ] instead.
43767   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43768   if test "x$has_forbidden_chars" != x; then
43769     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43770     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43771   fi
43772 
43773     # Output is in $new_path
43774 
43775   windows_path="$new_path"
43776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43777     unix_path=`$CYGPATH -u "$windows_path"`
43778     new_path="$unix_path"
43779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43781     new_path="$unix_path"
43782   fi
43783 
43784     # remove trailing .exe if any
43785     new_path="${new_path/%.exe/}"
43786 
43787     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43788     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43789   fi
43790 
43791     else
43792       # We're on a unix platform. Hooray! :)
43793       # First separate the path from the arguments. This will split at the first
43794       # space.
43795       complete="$OBJDUMP"
43796       path="${complete%% *}"
43797       tmp="$complete EOL"
43798       arguments="${tmp#* }"
43799 
43800       # Cannot rely on the command "which" here since it doesn't always work.
43801       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43802       if test -z "$is_absolute_path"; then
43803         # Path to executable is not absolute. Find it.
43804         IFS_save="$IFS"
43805         IFS=:
43806         for p in $PATH; do
43807           if test -f "$p/$path" && test -x "$p/$path"; then
43808             new_path="$p/$path"
43809             break
43810           fi
43811         done
43812         IFS="$IFS_save"
43813       else
43814         # This is an absolute path, we can use it without further modifications.
43815         new_path="$path"
43816       fi
43817 
43818       if test "x$new_path" = x; then
43819         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43820 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43821         has_space=`$ECHO "$complete" | $GREP " "`
43822         if test "x$has_space" != x; then
43823           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43824 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43825         fi
43826         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43827       fi
43828     fi
43829 
43830     # Now join together the path and the arguments once again
43831     if test "x$arguments" != xEOL; then
43832       new_complete="$new_path ${arguments% *}"
43833     else
43834       new_complete="$new_path"
43835     fi
43836 
43837     if test "x$complete" != "x$new_complete"; then
43838       OBJDUMP="$new_complete"
43839       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43840 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43841     fi
43842   fi
43843 
43844   fi
43845 
43846 
43847   # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43848   # to remain in place. Otherwise the compiler will not work in some siutations
43849   # in later configure checks.
43850   if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43851     PATH="$OLD_PATH"
43852   fi
43853 
43854   # Restore the flags to the user specified values.
43855   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43856   CFLAGS="$ORG_CFLAGS"
43857   CXXFLAGS="$ORG_CXXFLAGS"
43858 
43859 
43860 # Finally do some processing after the detection phase
43861 
43862   if test "x$COMPILE_TYPE" = "xcross" && test "x$OPENJDK_TARGET_OS" != xios ; then
43863     # Now we need to find a C/C++ compiler that can build executables for the
43864     # build platform. We can't use the AC_PROG_CC macro, since it can only be
43865     # used once. Also, we need to do this without adding a tools dir to the
43866     # path, otherwise we might pick up cross-compilers which don't use standard
43867     # naming.
43868 
43869     OLDPATH="$PATH"
43870 
43871 
43872 # Check whether --with-build-devkit was given.
43873 if test "${with_build_devkit+set}" = set; then :
43874   withval=$with_build_devkit;
43875 fi
43876 
43877     if test "x$with_build_devkit" = "xyes"; then
43878       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43879     elif test -n "$with_build_devkit"; then
43880       if test ! -d "$with_build_devkit"; then
43881         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43882       else
43883 
43884   # Only process if variable expands to non-empty
43885 
43886   if test "x$with_build_devkit" != x; then
43887     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43888 
43889   # Input might be given as Windows format, start by converting to
43890   # unix format.
43891   path="$with_build_devkit"
43892   new_path=`$CYGPATH -u "$path"`
43893 
43894   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43895   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43896   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43897   # "foo.exe" is OK but "foo" is an error.
43898   #
43899   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43900   # It is also a way to make sure we got the proper file name for the real test later on.
43901   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43902   if test "x$test_shortpath" = x; then
43903     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43904 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43905     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43906   fi
43907 
43908   # Call helper function which possibly converts this using DOS-style short mode.
43909   # If so, the updated path is stored in $new_path.
43910 
43911   input_path="$new_path"
43912   # Check if we need to convert this using DOS-style short mode. If the path
43913   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43914   # take no chances and rewrite it.
43915   # Note: m4 eats our [], so we need to use [ and ] instead.
43916   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43917   if test "x$has_forbidden_chars" != x; then
43918     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43919     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43920     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43921     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43922       # Going to short mode and back again did indeed matter. Since short mode is
43923       # case insensitive, let's make it lowercase to improve readability.
43924       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43925       # Now convert it back to Unix-style (cygpath)
43926       input_path=`$CYGPATH -u "$shortmode_path"`
43927       new_path="$input_path"
43928     fi
43929   fi
43930 
43931   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43932   if test "x$test_cygdrive_prefix" = x; then
43933     # As a simple fix, exclude /usr/bin since it's not a real path.
43934     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43935       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43936       # a path prefixed by /cygdrive for fixpath to work.
43937       new_path="$CYGWIN_ROOT_PATH$input_path"
43938     fi
43939   fi
43940 
43941 
43942   if test "x$path" != "x$new_path"; then
43943     with_build_devkit="$new_path"
43944     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43945 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43946   fi
43947 
43948     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43949 
43950   path="$with_build_devkit"
43951   has_colon=`$ECHO $path | $GREP ^.:`
43952   new_path="$path"
43953   if test "x$has_colon" = x; then
43954     # Not in mixed or Windows style, start by that.
43955     new_path=`cmd //c echo $path`
43956   fi
43957 
43958 
43959   input_path="$new_path"
43960   # Check if we need to convert this using DOS-style short mode. If the path
43961   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43962   # take no chances and rewrite it.
43963   # Note: m4 eats our [], so we need to use [ and ] instead.
43964   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43965   if test "x$has_forbidden_chars" != x; then
43966     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43967     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43968   fi
43969 
43970 
43971   windows_path="$new_path"
43972   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43973     unix_path=`$CYGPATH -u "$windows_path"`
43974     new_path="$unix_path"
43975   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43976     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43977     new_path="$unix_path"
43978   fi
43979 
43980   if test "x$path" != "x$new_path"; then
43981     with_build_devkit="$new_path"
43982     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43983 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43984   fi
43985 
43986   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43987   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43988 
43989     else
43990       # We're on a unix platform. Hooray! :)
43991       path="$with_build_devkit"
43992       has_space=`$ECHO "$path" | $GREP " "`
43993       if test "x$has_space" != x; then
43994         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43995 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43996         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43997       fi
43998 
43999       # Use eval to expand a potential ~
44000       eval path="$path"
44001       if test ! -f "$path" && test ! -d "$path"; then
44002         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44003       fi
44004 
44005       if test -d "$path"; then
44006         with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44007       else
44008         dir="`$DIRNAME "$path"`"
44009         base="`$BASENAME "$path"`"
44010         with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44011       fi
44012     fi
44013   fi
44014 
44015         BUILD_DEVKIT_ROOT="$with_build_devkit"
44016         # Check for a meta data info file in the root of the devkit
44017         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44018           # Process devkit.info so that existing devkit variables are not
44019           # modified by this
44020           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44021               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44022               -e "s/\$host/\$build/g" \
44023               $BUILD_DEVKIT_ROOT/devkit.info \
44024               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44025           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44026           # This potentially sets the following:
44027           # A descriptive name of the devkit
44028 
44029   if test "x$BUILD_DEVKIT_NAME" = x; then
44030     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44031   fi
44032 
44033           # Corresponds to --with-extra-path
44034 
44035   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44036     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44037   fi
44038 
44039           # Corresponds to --with-toolchain-path
44040 
44041   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44042     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44043   fi
44044 
44045           # Corresponds to --with-sysroot
44046 
44047   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44048     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44049   fi
44050 
44051           # Skip the Window specific parts
44052         fi
44053 
44054         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44055 $as_echo_n "checking for build platform devkit... " >&6; }
44056         if test "x$BUILD_DEVKIT_NAME" != x; then
44057           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44058 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44059         else
44060           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44061 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44062         fi
44063 
44064         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44065 
44066   if test "x$BUILD_SYSROOT" != "x"; then
44067     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44068       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44069         # Solaris Studio does not have a concept of sysroot. Instead we must
44070         # make sure the default include and lib dirs are appended to each
44071         # compile and link command line. Must also add -I-xbuiltin to enable
44072         # inlining of system functions and intrinsics.
44073         BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44074         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44075             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
44076             -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
44077       fi
44078     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44079       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44080       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44081     elif test "x$TOOLCHAIN_TYPE" = xclang; then
44082       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44083       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44084     fi
44085     # Propagate the sysroot args to hotspot
44086     BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44087     BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44088     BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44089     # The global CFLAGS and LDFLAGS variables need these for configure to function
44090     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44091     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44092     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44093     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44094   fi
44095 
44096   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
44097     # We also need -iframework<path>/System/Library/Frameworks
44098     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44099     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44100     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44101     # set this here so it doesn't have to be peppered throughout the forest
44102     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44103     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44104   fi
44105 
44106 
44107 
44108 
44109 
44110          # Fallback default of just /bin if DEVKIT_PATH is not defined
44111         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44112           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44113         fi
44114         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44115       fi
44116     fi
44117 
44118     # FIXME: we should list the discovered compilers as an exclude pattern!
44119     # If we do that, we can do this detection before POST_DETECTION, and still
44120     # find the build compilers in the tools dir, if needed.
44121 
44122 
44123 
44124   # Publish this variable in the help.
44125 
44126 
44127   if [ -z "${BUILD_CC+x}" ]; then
44128     # The variable is not set by user, try to locate tool using the code snippet
44129     for ac_prog in cl cc gcc
44130 do
44131   # Extract the first word of "$ac_prog", so it can be a program name with args.
44132 set dummy $ac_prog; ac_word=$2
44133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44134 $as_echo_n "checking for $ac_word... " >&6; }
44135 if ${ac_cv_path_BUILD_CC+:} false; then :
44136   $as_echo_n "(cached) " >&6
44137 else
44138   case $BUILD_CC in
44139   [\\/]* | ?:[\\/]*)
44140   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44141   ;;
44142   *)
44143   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44144 for as_dir in $PATH
44145 do
44146   IFS=$as_save_IFS
44147   test -z "$as_dir" && as_dir=.
44148     for ac_exec_ext in '' $ac_executable_extensions; do
44149   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44150     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44151     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44152     break 2
44153   fi
44154 done
44155   done
44156 IFS=$as_save_IFS
44157 
44158   ;;
44159 esac
44160 fi
44161 BUILD_CC=$ac_cv_path_BUILD_CC
44162 if test -n "$BUILD_CC"; then
44163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44164 $as_echo "$BUILD_CC" >&6; }
44165 else
44166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44167 $as_echo "no" >&6; }
44168 fi
44169 
44170 
44171   test -n "$BUILD_CC" && break
44172 done
44173 
44174   else
44175     # The variable is set, but is it from the command line or the environment?
44176 
44177     # Try to remove the string !BUILD_CC! from our list.
44178     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44179     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44180       # If it failed, the variable was not from the command line. Ignore it,
44181       # but warn the user (except for BASH, which is always set by the calling BASH).
44182       if test "xBUILD_CC" != xBASH; then
44183         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44184 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44185       fi
44186       # Try to locate tool using the code snippet
44187       for ac_prog in cl cc gcc
44188 do
44189   # Extract the first word of "$ac_prog", so it can be a program name with args.
44190 set dummy $ac_prog; ac_word=$2
44191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44192 $as_echo_n "checking for $ac_word... " >&6; }
44193 if ${ac_cv_path_BUILD_CC+:} false; then :
44194   $as_echo_n "(cached) " >&6
44195 else
44196   case $BUILD_CC in
44197   [\\/]* | ?:[\\/]*)
44198   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44199   ;;
44200   *)
44201   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44202 for as_dir in $PATH
44203 do
44204   IFS=$as_save_IFS
44205   test -z "$as_dir" && as_dir=.
44206     for ac_exec_ext in '' $ac_executable_extensions; do
44207   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44208     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44209     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44210     break 2
44211   fi
44212 done
44213   done
44214 IFS=$as_save_IFS
44215 
44216   ;;
44217 esac
44218 fi
44219 BUILD_CC=$ac_cv_path_BUILD_CC
44220 if test -n "$BUILD_CC"; then
44221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44222 $as_echo "$BUILD_CC" >&6; }
44223 else
44224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44225 $as_echo "no" >&6; }
44226 fi
44227 
44228 
44229   test -n "$BUILD_CC" && break
44230 done
44231 
44232     else
44233       # If it succeeded, then it was overridden by the user. We will use it
44234       # for the tool.
44235 
44236       # First remove it from the list of overridden variables, so we can test
44237       # for unknown variables in the end.
44238       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44239 
44240       # Check if we try to supply an empty value
44241       if test "x$BUILD_CC" = x; then
44242         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44243 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44244         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44245 $as_echo_n "checking for BUILD_CC... " >&6; }
44246         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44247 $as_echo "disabled" >&6; }
44248       else
44249         # Check if the provided tool contains a complete path.
44250         tool_specified="$BUILD_CC"
44251         tool_basename="${tool_specified##*/}"
44252         if test "x$tool_basename" = "x$tool_specified"; then
44253           # A command without a complete path is provided, search $PATH.
44254           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44255 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44256           # Extract the first word of "$tool_basename", so it can be a program name with args.
44257 set dummy $tool_basename; ac_word=$2
44258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44259 $as_echo_n "checking for $ac_word... " >&6; }
44260 if ${ac_cv_path_BUILD_CC+:} false; then :
44261   $as_echo_n "(cached) " >&6
44262 else
44263   case $BUILD_CC in
44264   [\\/]* | ?:[\\/]*)
44265   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44266   ;;
44267   *)
44268   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44269 for as_dir in $PATH
44270 do
44271   IFS=$as_save_IFS
44272   test -z "$as_dir" && as_dir=.
44273     for ac_exec_ext in '' $ac_executable_extensions; do
44274   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44275     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44276     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44277     break 2
44278   fi
44279 done
44280   done
44281 IFS=$as_save_IFS
44282 
44283   ;;
44284 esac
44285 fi
44286 BUILD_CC=$ac_cv_path_BUILD_CC
44287 if test -n "$BUILD_CC"; then
44288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44289 $as_echo "$BUILD_CC" >&6; }
44290 else
44291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44292 $as_echo "no" >&6; }
44293 fi
44294 
44295 
44296           if test "x$BUILD_CC" = x; then
44297             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44298           fi
44299         else
44300           # Otherwise we believe it is a complete path. Use it as it is.
44301           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44302 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44303           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44304 $as_echo_n "checking for BUILD_CC... " >&6; }
44305           if test ! -x "$tool_specified"; then
44306             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44307 $as_echo "not found" >&6; }
44308             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44309           fi
44310           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44311 $as_echo "$tool_specified" >&6; }
44312         fi
44313       fi
44314     fi
44315 
44316   fi
44317 
44318 
44319 
44320   if test "x$BUILD_CC" = x; then
44321     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44322   fi
44323 
44324 
44325 
44326   # Only process if variable expands to non-empty
44327 
44328   if test "x$BUILD_CC" != x; then
44329     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44330 
44331   # First separate the path from the arguments. This will split at the first
44332   # space.
44333   complete="$BUILD_CC"
44334   path="${complete%% *}"
44335   tmp="$complete EOL"
44336   arguments="${tmp#* }"
44337 
44338   # Input might be given as Windows format, start by converting to
44339   # unix format.
44340   new_path=`$CYGPATH -u "$path"`
44341 
44342   # Now try to locate executable using which
44343   new_path=`$WHICH "$new_path" 2> /dev/null`
44344   # bat and cmd files are not always considered executable in cygwin causing which
44345   # to not find them
44346   if test "x$new_path" = x \
44347       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44348       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44349     new_path=`$CYGPATH -u "$path"`
44350   fi
44351   if test "x$new_path" = x; then
44352     # Oops. Which didn't find the executable.
44353     # The splitting of arguments from the executable at a space might have been incorrect,
44354     # since paths with space are more likely in Windows. Give it another try with the whole
44355     # argument.
44356     path="$complete"
44357     arguments="EOL"
44358     new_path=`$CYGPATH -u "$path"`
44359     new_path=`$WHICH "$new_path" 2> /dev/null`
44360     # bat and cmd files are not always considered executable in cygwin causing which
44361     # to not find them
44362     if test "x$new_path" = x \
44363         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44364         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44365       new_path=`$CYGPATH -u "$path"`
44366     fi
44367     if test "x$new_path" = x; then
44368       # It's still not found. Now this is an unrecoverable error.
44369       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44370 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44371       has_space=`$ECHO "$complete" | $GREP " "`
44372       if test "x$has_space" != x; then
44373         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44374 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44375       fi
44376       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44377     fi
44378   fi
44379 
44380   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44381   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44382   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44383   # "foo.exe" is OK but "foo" is an error.
44384   #
44385   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44386   # It is also a way to make sure we got the proper file name for the real test later on.
44387   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44388   if test "x$test_shortpath" = x; then
44389     # Short path failed, file does not exist as specified.
44390     # Try adding .exe or .cmd
44391     if test -f "${new_path}.exe"; then
44392       input_to_shortpath="${new_path}.exe"
44393     elif test -f "${new_path}.cmd"; then
44394       input_to_shortpath="${new_path}.cmd"
44395     else
44396       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44397 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44398       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44399 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44400       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44401     fi
44402   else
44403     input_to_shortpath="$new_path"
44404   fi
44405 
44406   # Call helper function which possibly converts this using DOS-style short mode.
44407   # If so, the updated path is stored in $new_path.
44408   new_path="$input_to_shortpath"
44409 
44410   input_path="$input_to_shortpath"
44411   # Check if we need to convert this using DOS-style short mode. If the path
44412   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44413   # take no chances and rewrite it.
44414   # Note: m4 eats our [], so we need to use [ and ] instead.
44415   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44416   if test "x$has_forbidden_chars" != x; then
44417     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44418     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44419     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44420     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44421       # Going to short mode and back again did indeed matter. Since short mode is
44422       # case insensitive, let's make it lowercase to improve readability.
44423       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44424       # Now convert it back to Unix-style (cygpath)
44425       input_path=`$CYGPATH -u "$shortmode_path"`
44426       new_path="$input_path"
44427     fi
44428   fi
44429 
44430   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44431   if test "x$test_cygdrive_prefix" = x; then
44432     # As a simple fix, exclude /usr/bin since it's not a real path.
44433     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44434       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44435       # a path prefixed by /cygdrive for fixpath to work.
44436       new_path="$CYGWIN_ROOT_PATH$input_path"
44437     fi
44438   fi
44439 
44440   # remove trailing .exe if any
44441   new_path="${new_path/%.exe/}"
44442 
44443     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44444 
44445   # First separate the path from the arguments. This will split at the first
44446   # space.
44447   complete="$BUILD_CC"
44448   path="${complete%% *}"
44449   tmp="$complete EOL"
44450   arguments="${tmp#* }"
44451 
44452   # Input might be given as Windows format, start by converting to
44453   # unix format.
44454   new_path="$path"
44455 
44456   windows_path="$new_path"
44457   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44458     unix_path=`$CYGPATH -u "$windows_path"`
44459     new_path="$unix_path"
44460   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44461     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44462     new_path="$unix_path"
44463   fi
44464 
44465 
44466   # Now try to locate executable using which
44467   new_path=`$WHICH "$new_path" 2> /dev/null`
44468 
44469   if test "x$new_path" = x; then
44470     # Oops. Which didn't find the executable.
44471     # The splitting of arguments from the executable at a space might have been incorrect,
44472     # since paths with space are more likely in Windows. Give it another try with the whole
44473     # argument.
44474     path="$complete"
44475     arguments="EOL"
44476     new_path="$path"
44477 
44478   windows_path="$new_path"
44479   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44480     unix_path=`$CYGPATH -u "$windows_path"`
44481     new_path="$unix_path"
44482   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44483     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44484     new_path="$unix_path"
44485   fi
44486 
44487 
44488     new_path=`$WHICH "$new_path" 2> /dev/null`
44489     # bat and cmd files are not always considered executable in MSYS causing which
44490     # to not find them
44491     if test "x$new_path" = x \
44492         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44493         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44494       new_path="$path"
44495 
44496   windows_path="$new_path"
44497   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44498     unix_path=`$CYGPATH -u "$windows_path"`
44499     new_path="$unix_path"
44500   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44501     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44502     new_path="$unix_path"
44503   fi
44504 
44505     fi
44506 
44507     if test "x$new_path" = x; then
44508       # It's still not found. Now this is an unrecoverable error.
44509       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44510 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44511       has_space=`$ECHO "$complete" | $GREP " "`
44512       if test "x$has_space" != x; then
44513         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44514 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44515       fi
44516       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44517     fi
44518   fi
44519 
44520   # Now new_path has a complete unix path to the binary
44521   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44522     # Keep paths in /bin as-is, but remove trailing .exe if any
44523     new_path="${new_path/%.exe/}"
44524     # Do not save /bin paths to all_fixpath_prefixes!
44525   else
44526     # Not in mixed or Windows style, start by that.
44527     new_path=`cmd //c echo $new_path`
44528 
44529   input_path="$new_path"
44530   # Check if we need to convert this using DOS-style short mode. If the path
44531   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44532   # take no chances and rewrite it.
44533   # Note: m4 eats our [], so we need to use [ and ] instead.
44534   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44535   if test "x$has_forbidden_chars" != x; then
44536     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44537     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44538   fi
44539 
44540     # Output is in $new_path
44541 
44542   windows_path="$new_path"
44543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44544     unix_path=`$CYGPATH -u "$windows_path"`
44545     new_path="$unix_path"
44546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44547     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44548     new_path="$unix_path"
44549   fi
44550 
44551     # remove trailing .exe if any
44552     new_path="${new_path/%.exe/}"
44553 
44554     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44555     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44556   fi
44557 
44558     else
44559       # We're on a unix platform. Hooray! :)
44560       # First separate the path from the arguments. This will split at the first
44561       # space.
44562       complete="$BUILD_CC"
44563       path="${complete%% *}"
44564       tmp="$complete EOL"
44565       arguments="${tmp#* }"
44566 
44567       # Cannot rely on the command "which" here since it doesn't always work.
44568       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44569       if test -z "$is_absolute_path"; then
44570         # Path to executable is not absolute. Find it.
44571         IFS_save="$IFS"
44572         IFS=:
44573         for p in $PATH; do
44574           if test -f "$p/$path" && test -x "$p/$path"; then
44575             new_path="$p/$path"
44576             break
44577           fi
44578         done
44579         IFS="$IFS_save"
44580       else
44581         # This is an absolute path, we can use it without further modifications.
44582         new_path="$path"
44583       fi
44584 
44585       if test "x$new_path" = x; then
44586         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44587 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44588         has_space=`$ECHO "$complete" | $GREP " "`
44589         if test "x$has_space" != x; then
44590           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44591 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44592         fi
44593         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44594       fi
44595     fi
44596 
44597     # Now join together the path and the arguments once again
44598     if test "x$arguments" != xEOL; then
44599       new_complete="$new_path ${arguments% *}"
44600     else
44601       new_complete="$new_path"
44602     fi
44603 
44604     if test "x$complete" != "x$new_complete"; then
44605       BUILD_CC="$new_complete"
44606       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44607 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44608     fi
44609   fi
44610 
44611 
44612 
44613 
44614   # Publish this variable in the help.
44615 
44616 
44617   if [ -z "${BUILD_CXX+x}" ]; then
44618     # The variable is not set by user, try to locate tool using the code snippet
44619     for ac_prog in cl CC g++
44620 do
44621   # Extract the first word of "$ac_prog", so it can be a program name with args.
44622 set dummy $ac_prog; ac_word=$2
44623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44624 $as_echo_n "checking for $ac_word... " >&6; }
44625 if ${ac_cv_path_BUILD_CXX+:} false; then :
44626   $as_echo_n "(cached) " >&6
44627 else
44628   case $BUILD_CXX in
44629   [\\/]* | ?:[\\/]*)
44630   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44631   ;;
44632   *)
44633   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44634 for as_dir in $PATH
44635 do
44636   IFS=$as_save_IFS
44637   test -z "$as_dir" && as_dir=.
44638     for ac_exec_ext in '' $ac_executable_extensions; do
44639   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44640     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44641     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44642     break 2
44643   fi
44644 done
44645   done
44646 IFS=$as_save_IFS
44647 
44648   ;;
44649 esac
44650 fi
44651 BUILD_CXX=$ac_cv_path_BUILD_CXX
44652 if test -n "$BUILD_CXX"; then
44653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44654 $as_echo "$BUILD_CXX" >&6; }
44655 else
44656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44657 $as_echo "no" >&6; }
44658 fi
44659 
44660 
44661   test -n "$BUILD_CXX" && break
44662 done
44663 
44664   else
44665     # The variable is set, but is it from the command line or the environment?
44666 
44667     # Try to remove the string !BUILD_CXX! from our list.
44668     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44669     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44670       # If it failed, the variable was not from the command line. Ignore it,
44671       # but warn the user (except for BASH, which is always set by the calling BASH).
44672       if test "xBUILD_CXX" != xBASH; then
44673         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44674 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44675       fi
44676       # Try to locate tool using the code snippet
44677       for ac_prog in cl CC g++
44678 do
44679   # Extract the first word of "$ac_prog", so it can be a program name with args.
44680 set dummy $ac_prog; ac_word=$2
44681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44682 $as_echo_n "checking for $ac_word... " >&6; }
44683 if ${ac_cv_path_BUILD_CXX+:} false; then :
44684   $as_echo_n "(cached) " >&6
44685 else
44686   case $BUILD_CXX in
44687   [\\/]* | ?:[\\/]*)
44688   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44689   ;;
44690   *)
44691   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44692 for as_dir in $PATH
44693 do
44694   IFS=$as_save_IFS
44695   test -z "$as_dir" && as_dir=.
44696     for ac_exec_ext in '' $ac_executable_extensions; do
44697   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44698     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44699     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44700     break 2
44701   fi
44702 done
44703   done
44704 IFS=$as_save_IFS
44705 
44706   ;;
44707 esac
44708 fi
44709 BUILD_CXX=$ac_cv_path_BUILD_CXX
44710 if test -n "$BUILD_CXX"; then
44711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44712 $as_echo "$BUILD_CXX" >&6; }
44713 else
44714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44715 $as_echo "no" >&6; }
44716 fi
44717 
44718 
44719   test -n "$BUILD_CXX" && break
44720 done
44721 
44722     else
44723       # If it succeeded, then it was overridden by the user. We will use it
44724       # for the tool.
44725 
44726       # First remove it from the list of overridden variables, so we can test
44727       # for unknown variables in the end.
44728       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44729 
44730       # Check if we try to supply an empty value
44731       if test "x$BUILD_CXX" = x; then
44732         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44733 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44734         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44735 $as_echo_n "checking for BUILD_CXX... " >&6; }
44736         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44737 $as_echo "disabled" >&6; }
44738       else
44739         # Check if the provided tool contains a complete path.
44740         tool_specified="$BUILD_CXX"
44741         tool_basename="${tool_specified##*/}"
44742         if test "x$tool_basename" = "x$tool_specified"; then
44743           # A command without a complete path is provided, search $PATH.
44744           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44745 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44746           # Extract the first word of "$tool_basename", so it can be a program name with args.
44747 set dummy $tool_basename; ac_word=$2
44748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44749 $as_echo_n "checking for $ac_word... " >&6; }
44750 if ${ac_cv_path_BUILD_CXX+:} false; then :
44751   $as_echo_n "(cached) " >&6
44752 else
44753   case $BUILD_CXX in
44754   [\\/]* | ?:[\\/]*)
44755   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44756   ;;
44757   *)
44758   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44759 for as_dir in $PATH
44760 do
44761   IFS=$as_save_IFS
44762   test -z "$as_dir" && as_dir=.
44763     for ac_exec_ext in '' $ac_executable_extensions; do
44764   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44765     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44766     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44767     break 2
44768   fi
44769 done
44770   done
44771 IFS=$as_save_IFS
44772 
44773   ;;
44774 esac
44775 fi
44776 BUILD_CXX=$ac_cv_path_BUILD_CXX
44777 if test -n "$BUILD_CXX"; then
44778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44779 $as_echo "$BUILD_CXX" >&6; }
44780 else
44781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44782 $as_echo "no" >&6; }
44783 fi
44784 
44785 
44786           if test "x$BUILD_CXX" = x; then
44787             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44788           fi
44789         else
44790           # Otherwise we believe it is a complete path. Use it as it is.
44791           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44792 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44793           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44794 $as_echo_n "checking for BUILD_CXX... " >&6; }
44795           if test ! -x "$tool_specified"; then
44796             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44797 $as_echo "not found" >&6; }
44798             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44799           fi
44800           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44801 $as_echo "$tool_specified" >&6; }
44802         fi
44803       fi
44804     fi
44805 
44806   fi
44807 
44808 
44809 
44810   if test "x$BUILD_CXX" = x; then
44811     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44812   fi
44813 
44814 
44815 
44816   # Only process if variable expands to non-empty
44817 
44818   if test "x$BUILD_CXX" != x; then
44819     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44820 
44821   # First separate the path from the arguments. This will split at the first
44822   # space.
44823   complete="$BUILD_CXX"
44824   path="${complete%% *}"
44825   tmp="$complete EOL"
44826   arguments="${tmp#* }"
44827 
44828   # Input might be given as Windows format, start by converting to
44829   # unix format.
44830   new_path=`$CYGPATH -u "$path"`
44831 
44832   # Now try to locate executable using which
44833   new_path=`$WHICH "$new_path" 2> /dev/null`
44834   # bat and cmd files are not always considered executable in cygwin causing which
44835   # to not find them
44836   if test "x$new_path" = x \
44837       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44838       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44839     new_path=`$CYGPATH -u "$path"`
44840   fi
44841   if test "x$new_path" = x; then
44842     # Oops. Which didn't find the executable.
44843     # The splitting of arguments from the executable at a space might have been incorrect,
44844     # since paths with space are more likely in Windows. Give it another try with the whole
44845     # argument.
44846     path="$complete"
44847     arguments="EOL"
44848     new_path=`$CYGPATH -u "$path"`
44849     new_path=`$WHICH "$new_path" 2> /dev/null`
44850     # bat and cmd files are not always considered executable in cygwin causing which
44851     # to not find them
44852     if test "x$new_path" = x \
44853         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44854         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44855       new_path=`$CYGPATH -u "$path"`
44856     fi
44857     if test "x$new_path" = x; then
44858       # It's still not found. Now this is an unrecoverable error.
44859       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44860 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44861       has_space=`$ECHO "$complete" | $GREP " "`
44862       if test "x$has_space" != x; then
44863         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44864 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44865       fi
44866       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44867     fi
44868   fi
44869 
44870   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44871   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44872   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44873   # "foo.exe" is OK but "foo" is an error.
44874   #
44875   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44876   # It is also a way to make sure we got the proper file name for the real test later on.
44877   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44878   if test "x$test_shortpath" = x; then
44879     # Short path failed, file does not exist as specified.
44880     # Try adding .exe or .cmd
44881     if test -f "${new_path}.exe"; then
44882       input_to_shortpath="${new_path}.exe"
44883     elif test -f "${new_path}.cmd"; then
44884       input_to_shortpath="${new_path}.cmd"
44885     else
44886       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44887 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44888       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44889 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44890       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44891     fi
44892   else
44893     input_to_shortpath="$new_path"
44894   fi
44895 
44896   # Call helper function which possibly converts this using DOS-style short mode.
44897   # If so, the updated path is stored in $new_path.
44898   new_path="$input_to_shortpath"
44899 
44900   input_path="$input_to_shortpath"
44901   # Check if we need to convert this using DOS-style short mode. If the path
44902   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44903   # take no chances and rewrite it.
44904   # Note: m4 eats our [], so we need to use [ and ] instead.
44905   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44906   if test "x$has_forbidden_chars" != x; then
44907     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44908     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44909     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44910     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44911       # Going to short mode and back again did indeed matter. Since short mode is
44912       # case insensitive, let's make it lowercase to improve readability.
44913       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44914       # Now convert it back to Unix-style (cygpath)
44915       input_path=`$CYGPATH -u "$shortmode_path"`
44916       new_path="$input_path"
44917     fi
44918   fi
44919 
44920   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44921   if test "x$test_cygdrive_prefix" = x; then
44922     # As a simple fix, exclude /usr/bin since it's not a real path.
44923     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44924       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44925       # a path prefixed by /cygdrive for fixpath to work.
44926       new_path="$CYGWIN_ROOT_PATH$input_path"
44927     fi
44928   fi
44929 
44930   # remove trailing .exe if any
44931   new_path="${new_path/%.exe/}"
44932 
44933     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44934 
44935   # First separate the path from the arguments. This will split at the first
44936   # space.
44937   complete="$BUILD_CXX"
44938   path="${complete%% *}"
44939   tmp="$complete EOL"
44940   arguments="${tmp#* }"
44941 
44942   # Input might be given as Windows format, start by converting to
44943   # unix format.
44944   new_path="$path"
44945 
44946   windows_path="$new_path"
44947   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44948     unix_path=`$CYGPATH -u "$windows_path"`
44949     new_path="$unix_path"
44950   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44951     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44952     new_path="$unix_path"
44953   fi
44954 
44955 
44956   # Now try to locate executable using which
44957   new_path=`$WHICH "$new_path" 2> /dev/null`
44958 
44959   if test "x$new_path" = x; then
44960     # Oops. Which didn't find the executable.
44961     # The splitting of arguments from the executable at a space might have been incorrect,
44962     # since paths with space are more likely in Windows. Give it another try with the whole
44963     # argument.
44964     path="$complete"
44965     arguments="EOL"
44966     new_path="$path"
44967 
44968   windows_path="$new_path"
44969   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44970     unix_path=`$CYGPATH -u "$windows_path"`
44971     new_path="$unix_path"
44972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44973     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44974     new_path="$unix_path"
44975   fi
44976 
44977 
44978     new_path=`$WHICH "$new_path" 2> /dev/null`
44979     # bat and cmd files are not always considered executable in MSYS causing which
44980     # to not find them
44981     if test "x$new_path" = x \
44982         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44983         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44984       new_path="$path"
44985 
44986   windows_path="$new_path"
44987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44988     unix_path=`$CYGPATH -u "$windows_path"`
44989     new_path="$unix_path"
44990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44992     new_path="$unix_path"
44993   fi
44994 
44995     fi
44996 
44997     if test "x$new_path" = x; then
44998       # It's still not found. Now this is an unrecoverable error.
44999       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45000 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45001       has_space=`$ECHO "$complete" | $GREP " "`
45002       if test "x$has_space" != x; then
45003         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45004 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45005       fi
45006       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45007     fi
45008   fi
45009 
45010   # Now new_path has a complete unix path to the binary
45011   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45012     # Keep paths in /bin as-is, but remove trailing .exe if any
45013     new_path="${new_path/%.exe/}"
45014     # Do not save /bin paths to all_fixpath_prefixes!
45015   else
45016     # Not in mixed or Windows style, start by that.
45017     new_path=`cmd //c echo $new_path`
45018 
45019   input_path="$new_path"
45020   # Check if we need to convert this using DOS-style short mode. If the path
45021   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45022   # take no chances and rewrite it.
45023   # Note: m4 eats our [], so we need to use [ and ] instead.
45024   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45025   if test "x$has_forbidden_chars" != x; then
45026     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45027     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45028   fi
45029 
45030     # Output is in $new_path
45031 
45032   windows_path="$new_path"
45033   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45034     unix_path=`$CYGPATH -u "$windows_path"`
45035     new_path="$unix_path"
45036   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45037     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45038     new_path="$unix_path"
45039   fi
45040 
45041     # remove trailing .exe if any
45042     new_path="${new_path/%.exe/}"
45043 
45044     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45045     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45046   fi
45047 
45048     else
45049       # We're on a unix platform. Hooray! :)
45050       # First separate the path from the arguments. This will split at the first
45051       # space.
45052       complete="$BUILD_CXX"
45053       path="${complete%% *}"
45054       tmp="$complete EOL"
45055       arguments="${tmp#* }"
45056 
45057       # Cannot rely on the command "which" here since it doesn't always work.
45058       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45059       if test -z "$is_absolute_path"; then
45060         # Path to executable is not absolute. Find it.
45061         IFS_save="$IFS"
45062         IFS=:
45063         for p in $PATH; do
45064           if test -f "$p/$path" && test -x "$p/$path"; then
45065             new_path="$p/$path"
45066             break
45067           fi
45068         done
45069         IFS="$IFS_save"
45070       else
45071         # This is an absolute path, we can use it without further modifications.
45072         new_path="$path"
45073       fi
45074 
45075       if test "x$new_path" = x; then
45076         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45077 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45078         has_space=`$ECHO "$complete" | $GREP " "`
45079         if test "x$has_space" != x; then
45080           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45081 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45082         fi
45083         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45084       fi
45085     fi
45086 
45087     # Now join together the path and the arguments once again
45088     if test "x$arguments" != xEOL; then
45089       new_complete="$new_path ${arguments% *}"
45090     else
45091       new_complete="$new_path"
45092     fi
45093 
45094     if test "x$complete" != "x$new_complete"; then
45095       BUILD_CXX="$new_complete"
45096       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45097 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45098     fi
45099   fi
45100 
45101 
45102 
45103   # Publish this variable in the help.
45104 
45105 
45106   if [ -z "${BUILD_NM+x}" ]; then
45107     # The variable is not set by user, try to locate tool using the code snippet
45108     for ac_prog in nm gcc-nm
45109 do
45110   # Extract the first word of "$ac_prog", so it can be a program name with args.
45111 set dummy $ac_prog; ac_word=$2
45112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45113 $as_echo_n "checking for $ac_word... " >&6; }
45114 if ${ac_cv_path_BUILD_NM+:} false; then :
45115   $as_echo_n "(cached) " >&6
45116 else
45117   case $BUILD_NM in
45118   [\\/]* | ?:[\\/]*)
45119   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45120   ;;
45121   *)
45122   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45123 for as_dir in $PATH
45124 do
45125   IFS=$as_save_IFS
45126   test -z "$as_dir" && as_dir=.
45127     for ac_exec_ext in '' $ac_executable_extensions; do
45128   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45129     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45130     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45131     break 2
45132   fi
45133 done
45134   done
45135 IFS=$as_save_IFS
45136 
45137   ;;
45138 esac
45139 fi
45140 BUILD_NM=$ac_cv_path_BUILD_NM
45141 if test -n "$BUILD_NM"; then
45142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45143 $as_echo "$BUILD_NM" >&6; }
45144 else
45145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45146 $as_echo "no" >&6; }
45147 fi
45148 
45149 
45150   test -n "$BUILD_NM" && break
45151 done
45152 
45153   else
45154     # The variable is set, but is it from the command line or the environment?
45155 
45156     # Try to remove the string !BUILD_NM! from our list.
45157     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45158     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45159       # If it failed, the variable was not from the command line. Ignore it,
45160       # but warn the user (except for BASH, which is always set by the calling BASH).
45161       if test "xBUILD_NM" != xBASH; then
45162         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45163 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45164       fi
45165       # Try to locate tool using the code snippet
45166       for ac_prog in nm gcc-nm
45167 do
45168   # Extract the first word of "$ac_prog", so it can be a program name with args.
45169 set dummy $ac_prog; ac_word=$2
45170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45171 $as_echo_n "checking for $ac_word... " >&6; }
45172 if ${ac_cv_path_BUILD_NM+:} false; then :
45173   $as_echo_n "(cached) " >&6
45174 else
45175   case $BUILD_NM in
45176   [\\/]* | ?:[\\/]*)
45177   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45178   ;;
45179   *)
45180   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45181 for as_dir in $PATH
45182 do
45183   IFS=$as_save_IFS
45184   test -z "$as_dir" && as_dir=.
45185     for ac_exec_ext in '' $ac_executable_extensions; do
45186   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45187     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45189     break 2
45190   fi
45191 done
45192   done
45193 IFS=$as_save_IFS
45194 
45195   ;;
45196 esac
45197 fi
45198 BUILD_NM=$ac_cv_path_BUILD_NM
45199 if test -n "$BUILD_NM"; then
45200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45201 $as_echo "$BUILD_NM" >&6; }
45202 else
45203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45204 $as_echo "no" >&6; }
45205 fi
45206 
45207 
45208   test -n "$BUILD_NM" && break
45209 done
45210 
45211     else
45212       # If it succeeded, then it was overridden by the user. We will use it
45213       # for the tool.
45214 
45215       # First remove it from the list of overridden variables, so we can test
45216       # for unknown variables in the end.
45217       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45218 
45219       # Check if we try to supply an empty value
45220       if test "x$BUILD_NM" = x; then
45221         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45222 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45223         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45224 $as_echo_n "checking for BUILD_NM... " >&6; }
45225         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45226 $as_echo "disabled" >&6; }
45227       else
45228         # Check if the provided tool contains a complete path.
45229         tool_specified="$BUILD_NM"
45230         tool_basename="${tool_specified##*/}"
45231         if test "x$tool_basename" = "x$tool_specified"; then
45232           # A command without a complete path is provided, search $PATH.
45233           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45234 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45235           # Extract the first word of "$tool_basename", so it can be a program name with args.
45236 set dummy $tool_basename; ac_word=$2
45237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45238 $as_echo_n "checking for $ac_word... " >&6; }
45239 if ${ac_cv_path_BUILD_NM+:} false; then :
45240   $as_echo_n "(cached) " >&6
45241 else
45242   case $BUILD_NM in
45243   [\\/]* | ?:[\\/]*)
45244   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45245   ;;
45246   *)
45247   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45248 for as_dir in $PATH
45249 do
45250   IFS=$as_save_IFS
45251   test -z "$as_dir" && as_dir=.
45252     for ac_exec_ext in '' $ac_executable_extensions; do
45253   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45254     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45256     break 2
45257   fi
45258 done
45259   done
45260 IFS=$as_save_IFS
45261 
45262   ;;
45263 esac
45264 fi
45265 BUILD_NM=$ac_cv_path_BUILD_NM
45266 if test -n "$BUILD_NM"; then
45267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45268 $as_echo "$BUILD_NM" >&6; }
45269 else
45270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45271 $as_echo "no" >&6; }
45272 fi
45273 
45274 
45275           if test "x$BUILD_NM" = x; then
45276             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45277           fi
45278         else
45279           # Otherwise we believe it is a complete path. Use it as it is.
45280           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45281 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45282           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45283 $as_echo_n "checking for BUILD_NM... " >&6; }
45284           if test ! -x "$tool_specified"; then
45285             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45286 $as_echo "not found" >&6; }
45287             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45288           fi
45289           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45290 $as_echo "$tool_specified" >&6; }
45291         fi
45292       fi
45293     fi
45294 
45295   fi
45296 
45297 
45298 
45299   # Only process if variable expands to non-empty
45300 
45301   if test "x$BUILD_NM" != x; then
45302     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45303 
45304   # First separate the path from the arguments. This will split at the first
45305   # space.
45306   complete="$BUILD_NM"
45307   path="${complete%% *}"
45308   tmp="$complete EOL"
45309   arguments="${tmp#* }"
45310 
45311   # Input might be given as Windows format, start by converting to
45312   # unix format.
45313   new_path=`$CYGPATH -u "$path"`
45314 
45315   # Now try to locate executable using which
45316   new_path=`$WHICH "$new_path" 2> /dev/null`
45317   # bat and cmd files are not always considered executable in cygwin causing which
45318   # to not find them
45319   if test "x$new_path" = x \
45320       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45321       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45322     new_path=`$CYGPATH -u "$path"`
45323   fi
45324   if test "x$new_path" = x; then
45325     # Oops. Which didn't find the executable.
45326     # The splitting of arguments from the executable at a space might have been incorrect,
45327     # since paths with space are more likely in Windows. Give it another try with the whole
45328     # argument.
45329     path="$complete"
45330     arguments="EOL"
45331     new_path=`$CYGPATH -u "$path"`
45332     new_path=`$WHICH "$new_path" 2> /dev/null`
45333     # bat and cmd files are not always considered executable in cygwin causing which
45334     # to not find them
45335     if test "x$new_path" = x \
45336         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45337         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45338       new_path=`$CYGPATH -u "$path"`
45339     fi
45340     if test "x$new_path" = x; then
45341       # It's still not found. Now this is an unrecoverable error.
45342       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45343 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45344       has_space=`$ECHO "$complete" | $GREP " "`
45345       if test "x$has_space" != x; then
45346         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45347 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45348       fi
45349       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45350     fi
45351   fi
45352 
45353   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45354   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45355   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45356   # "foo.exe" is OK but "foo" is an error.
45357   #
45358   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45359   # It is also a way to make sure we got the proper file name for the real test later on.
45360   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45361   if test "x$test_shortpath" = x; then
45362     # Short path failed, file does not exist as specified.
45363     # Try adding .exe or .cmd
45364     if test -f "${new_path}.exe"; then
45365       input_to_shortpath="${new_path}.exe"
45366     elif test -f "${new_path}.cmd"; then
45367       input_to_shortpath="${new_path}.cmd"
45368     else
45369       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45370 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45371       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45372 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45373       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45374     fi
45375   else
45376     input_to_shortpath="$new_path"
45377   fi
45378 
45379   # Call helper function which possibly converts this using DOS-style short mode.
45380   # If so, the updated path is stored in $new_path.
45381   new_path="$input_to_shortpath"
45382 
45383   input_path="$input_to_shortpath"
45384   # Check if we need to convert this using DOS-style short mode. If the path
45385   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45386   # take no chances and rewrite it.
45387   # Note: m4 eats our [], so we need to use [ and ] instead.
45388   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45389   if test "x$has_forbidden_chars" != x; then
45390     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45391     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45392     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45393     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45394       # Going to short mode and back again did indeed matter. Since short mode is
45395       # case insensitive, let's make it lowercase to improve readability.
45396       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45397       # Now convert it back to Unix-style (cygpath)
45398       input_path=`$CYGPATH -u "$shortmode_path"`
45399       new_path="$input_path"
45400     fi
45401   fi
45402 
45403   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45404   if test "x$test_cygdrive_prefix" = x; then
45405     # As a simple fix, exclude /usr/bin since it's not a real path.
45406     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45407       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45408       # a path prefixed by /cygdrive for fixpath to work.
45409       new_path="$CYGWIN_ROOT_PATH$input_path"
45410     fi
45411   fi
45412 
45413   # remove trailing .exe if any
45414   new_path="${new_path/%.exe/}"
45415 
45416     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45417 
45418   # First separate the path from the arguments. This will split at the first
45419   # space.
45420   complete="$BUILD_NM"
45421   path="${complete%% *}"
45422   tmp="$complete EOL"
45423   arguments="${tmp#* }"
45424 
45425   # Input might be given as Windows format, start by converting to
45426   # unix format.
45427   new_path="$path"
45428 
45429   windows_path="$new_path"
45430   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45431     unix_path=`$CYGPATH -u "$windows_path"`
45432     new_path="$unix_path"
45433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45434     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45435     new_path="$unix_path"
45436   fi
45437 
45438 
45439   # Now try to locate executable using which
45440   new_path=`$WHICH "$new_path" 2> /dev/null`
45441 
45442   if test "x$new_path" = x; then
45443     # Oops. Which didn't find the executable.
45444     # The splitting of arguments from the executable at a space might have been incorrect,
45445     # since paths with space are more likely in Windows. Give it another try with the whole
45446     # argument.
45447     path="$complete"
45448     arguments="EOL"
45449     new_path="$path"
45450 
45451   windows_path="$new_path"
45452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45453     unix_path=`$CYGPATH -u "$windows_path"`
45454     new_path="$unix_path"
45455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45456     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45457     new_path="$unix_path"
45458   fi
45459 
45460 
45461     new_path=`$WHICH "$new_path" 2> /dev/null`
45462     # bat and cmd files are not always considered executable in MSYS causing which
45463     # to not find them
45464     if test "x$new_path" = x \
45465         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45466         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45467       new_path="$path"
45468 
45469   windows_path="$new_path"
45470   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45471     unix_path=`$CYGPATH -u "$windows_path"`
45472     new_path="$unix_path"
45473   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45474     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45475     new_path="$unix_path"
45476   fi
45477 
45478     fi
45479 
45480     if test "x$new_path" = x; then
45481       # It's still not found. Now this is an unrecoverable error.
45482       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45483 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45484       has_space=`$ECHO "$complete" | $GREP " "`
45485       if test "x$has_space" != x; then
45486         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45487 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45488       fi
45489       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45490     fi
45491   fi
45492 
45493   # Now new_path has a complete unix path to the binary
45494   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45495     # Keep paths in /bin as-is, but remove trailing .exe if any
45496     new_path="${new_path/%.exe/}"
45497     # Do not save /bin paths to all_fixpath_prefixes!
45498   else
45499     # Not in mixed or Windows style, start by that.
45500     new_path=`cmd //c echo $new_path`
45501 
45502   input_path="$new_path"
45503   # Check if we need to convert this using DOS-style short mode. If the path
45504   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45505   # take no chances and rewrite it.
45506   # Note: m4 eats our [], so we need to use [ and ] instead.
45507   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45508   if test "x$has_forbidden_chars" != x; then
45509     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45510     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45511   fi
45512 
45513     # Output is in $new_path
45514 
45515   windows_path="$new_path"
45516   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45517     unix_path=`$CYGPATH -u "$windows_path"`
45518     new_path="$unix_path"
45519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45520     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45521     new_path="$unix_path"
45522   fi
45523 
45524     # remove trailing .exe if any
45525     new_path="${new_path/%.exe/}"
45526 
45527     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45528     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45529   fi
45530 
45531     else
45532       # We're on a unix platform. Hooray! :)
45533       # First separate the path from the arguments. This will split at the first
45534       # space.
45535       complete="$BUILD_NM"
45536       path="${complete%% *}"
45537       tmp="$complete EOL"
45538       arguments="${tmp#* }"
45539 
45540       # Cannot rely on the command "which" here since it doesn't always work.
45541       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45542       if test -z "$is_absolute_path"; then
45543         # Path to executable is not absolute. Find it.
45544         IFS_save="$IFS"
45545         IFS=:
45546         for p in $PATH; do
45547           if test -f "$p/$path" && test -x "$p/$path"; then
45548             new_path="$p/$path"
45549             break
45550           fi
45551         done
45552         IFS="$IFS_save"
45553       else
45554         # This is an absolute path, we can use it without further modifications.
45555         new_path="$path"
45556       fi
45557 
45558       if test "x$new_path" = x; then
45559         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45560 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45561         has_space=`$ECHO "$complete" | $GREP " "`
45562         if test "x$has_space" != x; then
45563           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45564 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45565         fi
45566         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45567       fi
45568     fi
45569 
45570     # Now join together the path and the arguments once again
45571     if test "x$arguments" != xEOL; then
45572       new_complete="$new_path ${arguments% *}"
45573     else
45574       new_complete="$new_path"
45575     fi
45576 
45577     if test "x$complete" != "x$new_complete"; then
45578       BUILD_NM="$new_complete"
45579       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45580 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45581     fi
45582   fi
45583 
45584 
45585 
45586   # Publish this variable in the help.
45587 
45588 
45589   if [ -z "${BUILD_AR+x}" ]; then
45590     # The variable is not set by user, try to locate tool using the code snippet
45591     for ac_prog in ar gcc-ar
45592 do
45593   # Extract the first word of "$ac_prog", so it can be a program name with args.
45594 set dummy $ac_prog; ac_word=$2
45595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45596 $as_echo_n "checking for $ac_word... " >&6; }
45597 if ${ac_cv_path_BUILD_AR+:} false; then :
45598   $as_echo_n "(cached) " >&6
45599 else
45600   case $BUILD_AR in
45601   [\\/]* | ?:[\\/]*)
45602   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45603   ;;
45604   *)
45605   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45606 for as_dir in $PATH
45607 do
45608   IFS=$as_save_IFS
45609   test -z "$as_dir" && as_dir=.
45610     for ac_exec_ext in '' $ac_executable_extensions; do
45611   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45612     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45613     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45614     break 2
45615   fi
45616 done
45617   done
45618 IFS=$as_save_IFS
45619 
45620   ;;
45621 esac
45622 fi
45623 BUILD_AR=$ac_cv_path_BUILD_AR
45624 if test -n "$BUILD_AR"; then
45625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45626 $as_echo "$BUILD_AR" >&6; }
45627 else
45628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45629 $as_echo "no" >&6; }
45630 fi
45631 
45632 
45633   test -n "$BUILD_AR" && break
45634 done
45635 
45636   else
45637     # The variable is set, but is it from the command line or the environment?
45638 
45639     # Try to remove the string !BUILD_AR! from our list.
45640     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45641     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45642       # If it failed, the variable was not from the command line. Ignore it,
45643       # but warn the user (except for BASH, which is always set by the calling BASH).
45644       if test "xBUILD_AR" != xBASH; then
45645         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45646 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45647       fi
45648       # Try to locate tool using the code snippet
45649       for ac_prog in ar gcc-ar
45650 do
45651   # Extract the first word of "$ac_prog", so it can be a program name with args.
45652 set dummy $ac_prog; ac_word=$2
45653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45654 $as_echo_n "checking for $ac_word... " >&6; }
45655 if ${ac_cv_path_BUILD_AR+:} false; then :
45656   $as_echo_n "(cached) " >&6
45657 else
45658   case $BUILD_AR in
45659   [\\/]* | ?:[\\/]*)
45660   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45661   ;;
45662   *)
45663   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45664 for as_dir in $PATH
45665 do
45666   IFS=$as_save_IFS
45667   test -z "$as_dir" && as_dir=.
45668     for ac_exec_ext in '' $ac_executable_extensions; do
45669   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45670     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45671     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45672     break 2
45673   fi
45674 done
45675   done
45676 IFS=$as_save_IFS
45677 
45678   ;;
45679 esac
45680 fi
45681 BUILD_AR=$ac_cv_path_BUILD_AR
45682 if test -n "$BUILD_AR"; then
45683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45684 $as_echo "$BUILD_AR" >&6; }
45685 else
45686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45687 $as_echo "no" >&6; }
45688 fi
45689 
45690 
45691   test -n "$BUILD_AR" && break
45692 done
45693 
45694     else
45695       # If it succeeded, then it was overridden by the user. We will use it
45696       # for the tool.
45697 
45698       # First remove it from the list of overridden variables, so we can test
45699       # for unknown variables in the end.
45700       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45701 
45702       # Check if we try to supply an empty value
45703       if test "x$BUILD_AR" = x; then
45704         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45705 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45706         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45707 $as_echo_n "checking for BUILD_AR... " >&6; }
45708         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45709 $as_echo "disabled" >&6; }
45710       else
45711         # Check if the provided tool contains a complete path.
45712         tool_specified="$BUILD_AR"
45713         tool_basename="${tool_specified##*/}"
45714         if test "x$tool_basename" = "x$tool_specified"; then
45715           # A command without a complete path is provided, search $PATH.
45716           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45717 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45718           # Extract the first word of "$tool_basename", so it can be a program name with args.
45719 set dummy $tool_basename; ac_word=$2
45720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45721 $as_echo_n "checking for $ac_word... " >&6; }
45722 if ${ac_cv_path_BUILD_AR+:} false; then :
45723   $as_echo_n "(cached) " >&6
45724 else
45725   case $BUILD_AR in
45726   [\\/]* | ?:[\\/]*)
45727   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45728   ;;
45729   *)
45730   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45731 for as_dir in $PATH
45732 do
45733   IFS=$as_save_IFS
45734   test -z "$as_dir" && as_dir=.
45735     for ac_exec_ext in '' $ac_executable_extensions; do
45736   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45737     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45738     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45739     break 2
45740   fi
45741 done
45742   done
45743 IFS=$as_save_IFS
45744 
45745   ;;
45746 esac
45747 fi
45748 BUILD_AR=$ac_cv_path_BUILD_AR
45749 if test -n "$BUILD_AR"; then
45750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45751 $as_echo "$BUILD_AR" >&6; }
45752 else
45753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45754 $as_echo "no" >&6; }
45755 fi
45756 
45757 
45758           if test "x$BUILD_AR" = x; then
45759             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45760           fi
45761         else
45762           # Otherwise we believe it is a complete path. Use it as it is.
45763           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45764 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45765           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45766 $as_echo_n "checking for BUILD_AR... " >&6; }
45767           if test ! -x "$tool_specified"; then
45768             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45769 $as_echo "not found" >&6; }
45770             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45771           fi
45772           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45773 $as_echo "$tool_specified" >&6; }
45774         fi
45775       fi
45776     fi
45777 
45778   fi
45779 
45780 
45781 
45782   # Only process if variable expands to non-empty
45783 
45784   if test "x$BUILD_AR" != x; then
45785     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45786 
45787   # First separate the path from the arguments. This will split at the first
45788   # space.
45789   complete="$BUILD_AR"
45790   path="${complete%% *}"
45791   tmp="$complete EOL"
45792   arguments="${tmp#* }"
45793 
45794   # Input might be given as Windows format, start by converting to
45795   # unix format.
45796   new_path=`$CYGPATH -u "$path"`
45797 
45798   # Now try to locate executable using which
45799   new_path=`$WHICH "$new_path" 2> /dev/null`
45800   # bat and cmd files are not always considered executable in cygwin causing which
45801   # to not find them
45802   if test "x$new_path" = x \
45803       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45804       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45805     new_path=`$CYGPATH -u "$path"`
45806   fi
45807   if test "x$new_path" = x; then
45808     # Oops. Which didn't find the executable.
45809     # The splitting of arguments from the executable at a space might have been incorrect,
45810     # since paths with space are more likely in Windows. Give it another try with the whole
45811     # argument.
45812     path="$complete"
45813     arguments="EOL"
45814     new_path=`$CYGPATH -u "$path"`
45815     new_path=`$WHICH "$new_path" 2> /dev/null`
45816     # bat and cmd files are not always considered executable in cygwin causing which
45817     # to not find them
45818     if test "x$new_path" = x \
45819         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45820         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45821       new_path=`$CYGPATH -u "$path"`
45822     fi
45823     if test "x$new_path" = x; then
45824       # It's still not found. Now this is an unrecoverable error.
45825       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45826 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45827       has_space=`$ECHO "$complete" | $GREP " "`
45828       if test "x$has_space" != x; then
45829         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45830 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45831       fi
45832       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45833     fi
45834   fi
45835 
45836   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45837   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45838   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45839   # "foo.exe" is OK but "foo" is an error.
45840   #
45841   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45842   # It is also a way to make sure we got the proper file name for the real test later on.
45843   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45844   if test "x$test_shortpath" = x; then
45845     # Short path failed, file does not exist as specified.
45846     # Try adding .exe or .cmd
45847     if test -f "${new_path}.exe"; then
45848       input_to_shortpath="${new_path}.exe"
45849     elif test -f "${new_path}.cmd"; then
45850       input_to_shortpath="${new_path}.cmd"
45851     else
45852       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45853 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45854       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45855 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45856       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45857     fi
45858   else
45859     input_to_shortpath="$new_path"
45860   fi
45861 
45862   # Call helper function which possibly converts this using DOS-style short mode.
45863   # If so, the updated path is stored in $new_path.
45864   new_path="$input_to_shortpath"
45865 
45866   input_path="$input_to_shortpath"
45867   # Check if we need to convert this using DOS-style short mode. If the path
45868   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45869   # take no chances and rewrite it.
45870   # Note: m4 eats our [], so we need to use [ and ] instead.
45871   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45872   if test "x$has_forbidden_chars" != x; then
45873     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45874     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45875     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45876     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45877       # Going to short mode and back again did indeed matter. Since short mode is
45878       # case insensitive, let's make it lowercase to improve readability.
45879       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45880       # Now convert it back to Unix-style (cygpath)
45881       input_path=`$CYGPATH -u "$shortmode_path"`
45882       new_path="$input_path"
45883     fi
45884   fi
45885 
45886   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45887   if test "x$test_cygdrive_prefix" = x; then
45888     # As a simple fix, exclude /usr/bin since it's not a real path.
45889     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45890       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45891       # a path prefixed by /cygdrive for fixpath to work.
45892       new_path="$CYGWIN_ROOT_PATH$input_path"
45893     fi
45894   fi
45895 
45896   # remove trailing .exe if any
45897   new_path="${new_path/%.exe/}"
45898 
45899     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45900 
45901   # First separate the path from the arguments. This will split at the first
45902   # space.
45903   complete="$BUILD_AR"
45904   path="${complete%% *}"
45905   tmp="$complete EOL"
45906   arguments="${tmp#* }"
45907 
45908   # Input might be given as Windows format, start by converting to
45909   # unix format.
45910   new_path="$path"
45911 
45912   windows_path="$new_path"
45913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45914     unix_path=`$CYGPATH -u "$windows_path"`
45915     new_path="$unix_path"
45916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45917     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45918     new_path="$unix_path"
45919   fi
45920 
45921 
45922   # Now try to locate executable using which
45923   new_path=`$WHICH "$new_path" 2> /dev/null`
45924 
45925   if test "x$new_path" = x; then
45926     # Oops. Which didn't find the executable.
45927     # The splitting of arguments from the executable at a space might have been incorrect,
45928     # since paths with space are more likely in Windows. Give it another try with the whole
45929     # argument.
45930     path="$complete"
45931     arguments="EOL"
45932     new_path="$path"
45933 
45934   windows_path="$new_path"
45935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45936     unix_path=`$CYGPATH -u "$windows_path"`
45937     new_path="$unix_path"
45938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45939     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45940     new_path="$unix_path"
45941   fi
45942 
45943 
45944     new_path=`$WHICH "$new_path" 2> /dev/null`
45945     # bat and cmd files are not always considered executable in MSYS causing which
45946     # to not find them
45947     if test "x$new_path" = x \
45948         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45949         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45950       new_path="$path"
45951 
45952   windows_path="$new_path"
45953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45954     unix_path=`$CYGPATH -u "$windows_path"`
45955     new_path="$unix_path"
45956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45958     new_path="$unix_path"
45959   fi
45960 
45961     fi
45962 
45963     if test "x$new_path" = x; then
45964       # It's still not found. Now this is an unrecoverable error.
45965       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45966 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45967       has_space=`$ECHO "$complete" | $GREP " "`
45968       if test "x$has_space" != x; then
45969         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45970 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45971       fi
45972       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45973     fi
45974   fi
45975 
45976   # Now new_path has a complete unix path to the binary
45977   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45978     # Keep paths in /bin as-is, but remove trailing .exe if any
45979     new_path="${new_path/%.exe/}"
45980     # Do not save /bin paths to all_fixpath_prefixes!
45981   else
45982     # Not in mixed or Windows style, start by that.
45983     new_path=`cmd //c echo $new_path`
45984 
45985   input_path="$new_path"
45986   # Check if we need to convert this using DOS-style short mode. If the path
45987   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45988   # take no chances and rewrite it.
45989   # Note: m4 eats our [], so we need to use [ and ] instead.
45990   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45991   if test "x$has_forbidden_chars" != x; then
45992     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45993     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45994   fi
45995 
45996     # Output is in $new_path
45997 
45998   windows_path="$new_path"
45999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46000     unix_path=`$CYGPATH -u "$windows_path"`
46001     new_path="$unix_path"
46002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46003     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46004     new_path="$unix_path"
46005   fi
46006 
46007     # remove trailing .exe if any
46008     new_path="${new_path/%.exe/}"
46009 
46010     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46011     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46012   fi
46013 
46014     else
46015       # We're on a unix platform. Hooray! :)
46016       # First separate the path from the arguments. This will split at the first
46017       # space.
46018       complete="$BUILD_AR"
46019       path="${complete%% *}"
46020       tmp="$complete EOL"
46021       arguments="${tmp#* }"
46022 
46023       # Cannot rely on the command "which" here since it doesn't always work.
46024       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46025       if test -z "$is_absolute_path"; then
46026         # Path to executable is not absolute. Find it.
46027         IFS_save="$IFS"
46028         IFS=:
46029         for p in $PATH; do
46030           if test -f "$p/$path" && test -x "$p/$path"; then
46031             new_path="$p/$path"
46032             break
46033           fi
46034         done
46035         IFS="$IFS_save"
46036       else
46037         # This is an absolute path, we can use it without further modifications.
46038         new_path="$path"
46039       fi
46040 
46041       if test "x$new_path" = x; then
46042         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46043 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46044         has_space=`$ECHO "$complete" | $GREP " "`
46045         if test "x$has_space" != x; then
46046           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46047 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46048         fi
46049         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46050       fi
46051     fi
46052 
46053     # Now join together the path and the arguments once again
46054     if test "x$arguments" != xEOL; then
46055       new_complete="$new_path ${arguments% *}"
46056     else
46057       new_complete="$new_path"
46058     fi
46059 
46060     if test "x$complete" != "x$new_complete"; then
46061       BUILD_AR="$new_complete"
46062       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46063 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46064     fi
46065   fi
46066 
46067 
46068 
46069   # Publish this variable in the help.
46070 
46071 
46072   if [ -z "${BUILD_OBJCOPY+x}" ]; then
46073     # The variable is not set by user, try to locate tool using the code snippet
46074     for ac_prog in objcopy
46075 do
46076   # Extract the first word of "$ac_prog", so it can be a program name with args.
46077 set dummy $ac_prog; ac_word=$2
46078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46079 $as_echo_n "checking for $ac_word... " >&6; }
46080 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46081   $as_echo_n "(cached) " >&6
46082 else
46083   case $BUILD_OBJCOPY in
46084   [\\/]* | ?:[\\/]*)
46085   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46086   ;;
46087   *)
46088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46089 for as_dir in $PATH
46090 do
46091   IFS=$as_save_IFS
46092   test -z "$as_dir" && as_dir=.
46093     for ac_exec_ext in '' $ac_executable_extensions; do
46094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46095     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46097     break 2
46098   fi
46099 done
46100   done
46101 IFS=$as_save_IFS
46102 
46103   ;;
46104 esac
46105 fi
46106 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46107 if test -n "$BUILD_OBJCOPY"; then
46108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46109 $as_echo "$BUILD_OBJCOPY" >&6; }
46110 else
46111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46112 $as_echo "no" >&6; }
46113 fi
46114 
46115 
46116   test -n "$BUILD_OBJCOPY" && break
46117 done
46118 
46119   else
46120     # The variable is set, but is it from the command line or the environment?
46121 
46122     # Try to remove the string !BUILD_OBJCOPY! from our list.
46123     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46124     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46125       # If it failed, the variable was not from the command line. Ignore it,
46126       # but warn the user (except for BASH, which is always set by the calling BASH).
46127       if test "xBUILD_OBJCOPY" != xBASH; then
46128         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46129 $as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46130       fi
46131       # Try to locate tool using the code snippet
46132       for ac_prog in objcopy
46133 do
46134   # Extract the first word of "$ac_prog", so it can be a program name with args.
46135 set dummy $ac_prog; ac_word=$2
46136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46137 $as_echo_n "checking for $ac_word... " >&6; }
46138 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46139   $as_echo_n "(cached) " >&6
46140 else
46141   case $BUILD_OBJCOPY in
46142   [\\/]* | ?:[\\/]*)
46143   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46144   ;;
46145   *)
46146   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46147 for as_dir in $PATH
46148 do
46149   IFS=$as_save_IFS
46150   test -z "$as_dir" && as_dir=.
46151     for ac_exec_ext in '' $ac_executable_extensions; do
46152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46153     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46155     break 2
46156   fi
46157 done
46158   done
46159 IFS=$as_save_IFS
46160 
46161   ;;
46162 esac
46163 fi
46164 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46165 if test -n "$BUILD_OBJCOPY"; then
46166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46167 $as_echo "$BUILD_OBJCOPY" >&6; }
46168 else
46169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46170 $as_echo "no" >&6; }
46171 fi
46172 
46173 
46174   test -n "$BUILD_OBJCOPY" && break
46175 done
46176 
46177     else
46178       # If it succeeded, then it was overridden by the user. We will use it
46179       # for the tool.
46180 
46181       # First remove it from the list of overridden variables, so we can test
46182       # for unknown variables in the end.
46183       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46184 
46185       # Check if we try to supply an empty value
46186       if test "x$BUILD_OBJCOPY" = x; then
46187         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46188 $as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46189         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46190 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46191         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46192 $as_echo "disabled" >&6; }
46193       else
46194         # Check if the provided tool contains a complete path.
46195         tool_specified="$BUILD_OBJCOPY"
46196         tool_basename="${tool_specified##*/}"
46197         if test "x$tool_basename" = "x$tool_specified"; then
46198           # A command without a complete path is provided, search $PATH.
46199           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46200 $as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46201           # Extract the first word of "$tool_basename", so it can be a program name with args.
46202 set dummy $tool_basename; ac_word=$2
46203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46204 $as_echo_n "checking for $ac_word... " >&6; }
46205 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46206   $as_echo_n "(cached) " >&6
46207 else
46208   case $BUILD_OBJCOPY in
46209   [\\/]* | ?:[\\/]*)
46210   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46211   ;;
46212   *)
46213   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46214 for as_dir in $PATH
46215 do
46216   IFS=$as_save_IFS
46217   test -z "$as_dir" && as_dir=.
46218     for ac_exec_ext in '' $ac_executable_extensions; do
46219   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46220     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46222     break 2
46223   fi
46224 done
46225   done
46226 IFS=$as_save_IFS
46227 
46228   ;;
46229 esac
46230 fi
46231 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46232 if test -n "$BUILD_OBJCOPY"; then
46233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46234 $as_echo "$BUILD_OBJCOPY" >&6; }
46235 else
46236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46237 $as_echo "no" >&6; }
46238 fi
46239 
46240 
46241           if test "x$BUILD_OBJCOPY" = x; then
46242             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46243           fi
46244         else
46245           # Otherwise we believe it is a complete path. Use it as it is.
46246           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46247 $as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46248           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46249 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46250           if test ! -x "$tool_specified"; then
46251             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46252 $as_echo "not found" >&6; }
46253             as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46254           fi
46255           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46256 $as_echo "$tool_specified" >&6; }
46257         fi
46258       fi
46259     fi
46260 
46261   fi
46262 
46263 
46264 
46265   # Only process if variable expands to non-empty
46266 
46267   if test "x$BUILD_OBJCOPY" != x; then
46268     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46269 
46270   # First separate the path from the arguments. This will split at the first
46271   # space.
46272   complete="$BUILD_OBJCOPY"
46273   path="${complete%% *}"
46274   tmp="$complete EOL"
46275   arguments="${tmp#* }"
46276 
46277   # Input might be given as Windows format, start by converting to
46278   # unix format.
46279   new_path=`$CYGPATH -u "$path"`
46280 
46281   # Now try to locate executable using which
46282   new_path=`$WHICH "$new_path" 2> /dev/null`
46283   # bat and cmd files are not always considered executable in cygwin causing which
46284   # to not find them
46285   if test "x$new_path" = x \
46286       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46287       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46288     new_path=`$CYGPATH -u "$path"`
46289   fi
46290   if test "x$new_path" = x; then
46291     # Oops. Which didn't find the executable.
46292     # The splitting of arguments from the executable at a space might have been incorrect,
46293     # since paths with space are more likely in Windows. Give it another try with the whole
46294     # argument.
46295     path="$complete"
46296     arguments="EOL"
46297     new_path=`$CYGPATH -u "$path"`
46298     new_path=`$WHICH "$new_path" 2> /dev/null`
46299     # bat and cmd files are not always considered executable in cygwin causing which
46300     # to not find them
46301     if test "x$new_path" = x \
46302         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46303         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46304       new_path=`$CYGPATH -u "$path"`
46305     fi
46306     if test "x$new_path" = x; then
46307       # It's still not found. Now this is an unrecoverable error.
46308       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46309 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46310       has_space=`$ECHO "$complete" | $GREP " "`
46311       if test "x$has_space" != x; then
46312         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46313 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46314       fi
46315       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46316     fi
46317   fi
46318 
46319   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46320   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46321   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46322   # "foo.exe" is OK but "foo" is an error.
46323   #
46324   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46325   # It is also a way to make sure we got the proper file name for the real test later on.
46326   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46327   if test "x$test_shortpath" = x; then
46328     # Short path failed, file does not exist as specified.
46329     # Try adding .exe or .cmd
46330     if test -f "${new_path}.exe"; then
46331       input_to_shortpath="${new_path}.exe"
46332     elif test -f "${new_path}.cmd"; then
46333       input_to_shortpath="${new_path}.cmd"
46334     else
46335       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46336 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46337       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46338 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46339       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46340     fi
46341   else
46342     input_to_shortpath="$new_path"
46343   fi
46344 
46345   # Call helper function which possibly converts this using DOS-style short mode.
46346   # If so, the updated path is stored in $new_path.
46347   new_path="$input_to_shortpath"
46348 
46349   input_path="$input_to_shortpath"
46350   # Check if we need to convert this using DOS-style short mode. If the path
46351   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46352   # take no chances and rewrite it.
46353   # Note: m4 eats our [], so we need to use [ and ] instead.
46354   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46355   if test "x$has_forbidden_chars" != x; then
46356     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46357     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46358     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46359     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46360       # Going to short mode and back again did indeed matter. Since short mode is
46361       # case insensitive, let's make it lowercase to improve readability.
46362       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46363       # Now convert it back to Unix-style (cygpath)
46364       input_path=`$CYGPATH -u "$shortmode_path"`
46365       new_path="$input_path"
46366     fi
46367   fi
46368 
46369   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46370   if test "x$test_cygdrive_prefix" = x; then
46371     # As a simple fix, exclude /usr/bin since it's not a real path.
46372     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46373       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46374       # a path prefixed by /cygdrive for fixpath to work.
46375       new_path="$CYGWIN_ROOT_PATH$input_path"
46376     fi
46377   fi
46378 
46379   # remove trailing .exe if any
46380   new_path="${new_path/%.exe/}"
46381 
46382     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46383 
46384   # First separate the path from the arguments. This will split at the first
46385   # space.
46386   complete="$BUILD_OBJCOPY"
46387   path="${complete%% *}"
46388   tmp="$complete EOL"
46389   arguments="${tmp#* }"
46390 
46391   # Input might be given as Windows format, start by converting to
46392   # unix format.
46393   new_path="$path"
46394 
46395   windows_path="$new_path"
46396   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46397     unix_path=`$CYGPATH -u "$windows_path"`
46398     new_path="$unix_path"
46399   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46400     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46401     new_path="$unix_path"
46402   fi
46403 
46404 
46405   # Now try to locate executable using which
46406   new_path=`$WHICH "$new_path" 2> /dev/null`
46407 
46408   if test "x$new_path" = x; then
46409     # Oops. Which didn't find the executable.
46410     # The splitting of arguments from the executable at a space might have been incorrect,
46411     # since paths with space are more likely in Windows. Give it another try with the whole
46412     # argument.
46413     path="$complete"
46414     arguments="EOL"
46415     new_path="$path"
46416 
46417   windows_path="$new_path"
46418   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46419     unix_path=`$CYGPATH -u "$windows_path"`
46420     new_path="$unix_path"
46421   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46422     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46423     new_path="$unix_path"
46424   fi
46425 
46426 
46427     new_path=`$WHICH "$new_path" 2> /dev/null`
46428     # bat and cmd files are not always considered executable in MSYS causing which
46429     # to not find them
46430     if test "x$new_path" = x \
46431         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46432         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46433       new_path="$path"
46434 
46435   windows_path="$new_path"
46436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46437     unix_path=`$CYGPATH -u "$windows_path"`
46438     new_path="$unix_path"
46439   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46440     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46441     new_path="$unix_path"
46442   fi
46443 
46444     fi
46445 
46446     if test "x$new_path" = x; then
46447       # It's still not found. Now this is an unrecoverable error.
46448       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46449 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46450       has_space=`$ECHO "$complete" | $GREP " "`
46451       if test "x$has_space" != x; then
46452         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46453 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46454       fi
46455       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46456     fi
46457   fi
46458 
46459   # Now new_path has a complete unix path to the binary
46460   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46461     # Keep paths in /bin as-is, but remove trailing .exe if any
46462     new_path="${new_path/%.exe/}"
46463     # Do not save /bin paths to all_fixpath_prefixes!
46464   else
46465     # Not in mixed or Windows style, start by that.
46466     new_path=`cmd //c echo $new_path`
46467 
46468   input_path="$new_path"
46469   # Check if we need to convert this using DOS-style short mode. If the path
46470   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46471   # take no chances and rewrite it.
46472   # Note: m4 eats our [], so we need to use [ and ] instead.
46473   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46474   if test "x$has_forbidden_chars" != x; then
46475     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46476     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46477   fi
46478 
46479     # Output is in $new_path
46480 
46481   windows_path="$new_path"
46482   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46483     unix_path=`$CYGPATH -u "$windows_path"`
46484     new_path="$unix_path"
46485   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46486     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46487     new_path="$unix_path"
46488   fi
46489 
46490     # remove trailing .exe if any
46491     new_path="${new_path/%.exe/}"
46492 
46493     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46494     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46495   fi
46496 
46497     else
46498       # We're on a unix platform. Hooray! :)
46499       # First separate the path from the arguments. This will split at the first
46500       # space.
46501       complete="$BUILD_OBJCOPY"
46502       path="${complete%% *}"
46503       tmp="$complete EOL"
46504       arguments="${tmp#* }"
46505 
46506       # Cannot rely on the command "which" here since it doesn't always work.
46507       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46508       if test -z "$is_absolute_path"; then
46509         # Path to executable is not absolute. Find it.
46510         IFS_save="$IFS"
46511         IFS=:
46512         for p in $PATH; do
46513           if test -f "$p/$path" && test -x "$p/$path"; then
46514             new_path="$p/$path"
46515             break
46516           fi
46517         done
46518         IFS="$IFS_save"
46519       else
46520         # This is an absolute path, we can use it without further modifications.
46521         new_path="$path"
46522       fi
46523 
46524       if test "x$new_path" = x; then
46525         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46526 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46527         has_space=`$ECHO "$complete" | $GREP " "`
46528         if test "x$has_space" != x; then
46529           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46530 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46531         fi
46532         as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46533       fi
46534     fi
46535 
46536     # Now join together the path and the arguments once again
46537     if test "x$arguments" != xEOL; then
46538       new_complete="$new_path ${arguments% *}"
46539     else
46540       new_complete="$new_path"
46541     fi
46542 
46543     if test "x$complete" != "x$new_complete"; then
46544       BUILD_OBJCOPY="$new_complete"
46545       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46546 $as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46547     fi
46548   fi
46549 
46550 
46551 
46552   # Publish this variable in the help.
46553 
46554 
46555   if [ -z "${BUILD_STRIP+x}" ]; then
46556     # The variable is not set by user, try to locate tool using the code snippet
46557     for ac_prog in strip
46558 do
46559   # Extract the first word of "$ac_prog", so it can be a program name with args.
46560 set dummy $ac_prog; ac_word=$2
46561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46562 $as_echo_n "checking for $ac_word... " >&6; }
46563 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46564   $as_echo_n "(cached) " >&6
46565 else
46566   case $BUILD_STRIP in
46567   [\\/]* | ?:[\\/]*)
46568   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46569   ;;
46570   *)
46571   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46572 for as_dir in $PATH
46573 do
46574   IFS=$as_save_IFS
46575   test -z "$as_dir" && as_dir=.
46576     for ac_exec_ext in '' $ac_executable_extensions; do
46577   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46578     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46579     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46580     break 2
46581   fi
46582 done
46583   done
46584 IFS=$as_save_IFS
46585 
46586   ;;
46587 esac
46588 fi
46589 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46590 if test -n "$BUILD_STRIP"; then
46591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46592 $as_echo "$BUILD_STRIP" >&6; }
46593 else
46594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46595 $as_echo "no" >&6; }
46596 fi
46597 
46598 
46599   test -n "$BUILD_STRIP" && break
46600 done
46601 
46602   else
46603     # The variable is set, but is it from the command line or the environment?
46604 
46605     # Try to remove the string !BUILD_STRIP! from our list.
46606     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46607     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46608       # If it failed, the variable was not from the command line. Ignore it,
46609       # but warn the user (except for BASH, which is always set by the calling BASH).
46610       if test "xBUILD_STRIP" != xBASH; then
46611         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46612 $as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46613       fi
46614       # Try to locate tool using the code snippet
46615       for ac_prog in strip
46616 do
46617   # Extract the first word of "$ac_prog", so it can be a program name with args.
46618 set dummy $ac_prog; ac_word=$2
46619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46620 $as_echo_n "checking for $ac_word... " >&6; }
46621 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46622   $as_echo_n "(cached) " >&6
46623 else
46624   case $BUILD_STRIP in
46625   [\\/]* | ?:[\\/]*)
46626   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46627   ;;
46628   *)
46629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46630 for as_dir in $PATH
46631 do
46632   IFS=$as_save_IFS
46633   test -z "$as_dir" && as_dir=.
46634     for ac_exec_ext in '' $ac_executable_extensions; do
46635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46636     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46638     break 2
46639   fi
46640 done
46641   done
46642 IFS=$as_save_IFS
46643 
46644   ;;
46645 esac
46646 fi
46647 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46648 if test -n "$BUILD_STRIP"; then
46649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46650 $as_echo "$BUILD_STRIP" >&6; }
46651 else
46652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46653 $as_echo "no" >&6; }
46654 fi
46655 
46656 
46657   test -n "$BUILD_STRIP" && break
46658 done
46659 
46660     else
46661       # If it succeeded, then it was overridden by the user. We will use it
46662       # for the tool.
46663 
46664       # First remove it from the list of overridden variables, so we can test
46665       # for unknown variables in the end.
46666       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46667 
46668       # Check if we try to supply an empty value
46669       if test "x$BUILD_STRIP" = x; then
46670         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46671 $as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46672         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46673 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46674         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46675 $as_echo "disabled" >&6; }
46676       else
46677         # Check if the provided tool contains a complete path.
46678         tool_specified="$BUILD_STRIP"
46679         tool_basename="${tool_specified##*/}"
46680         if test "x$tool_basename" = "x$tool_specified"; then
46681           # A command without a complete path is provided, search $PATH.
46682           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46683 $as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46684           # Extract the first word of "$tool_basename", so it can be a program name with args.
46685 set dummy $tool_basename; ac_word=$2
46686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46687 $as_echo_n "checking for $ac_word... " >&6; }
46688 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46689   $as_echo_n "(cached) " >&6
46690 else
46691   case $BUILD_STRIP in
46692   [\\/]* | ?:[\\/]*)
46693   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46694   ;;
46695   *)
46696   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46697 for as_dir in $PATH
46698 do
46699   IFS=$as_save_IFS
46700   test -z "$as_dir" && as_dir=.
46701     for ac_exec_ext in '' $ac_executable_extensions; do
46702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46703     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46705     break 2
46706   fi
46707 done
46708   done
46709 IFS=$as_save_IFS
46710 
46711   ;;
46712 esac
46713 fi
46714 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46715 if test -n "$BUILD_STRIP"; then
46716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46717 $as_echo "$BUILD_STRIP" >&6; }
46718 else
46719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46720 $as_echo "no" >&6; }
46721 fi
46722 
46723 
46724           if test "x$BUILD_STRIP" = x; then
46725             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46726           fi
46727         else
46728           # Otherwise we believe it is a complete path. Use it as it is.
46729           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46730 $as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46731           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46732 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46733           if test ! -x "$tool_specified"; then
46734             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46735 $as_echo "not found" >&6; }
46736             as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46737           fi
46738           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46739 $as_echo "$tool_specified" >&6; }
46740         fi
46741       fi
46742     fi
46743 
46744   fi
46745 
46746 
46747 
46748   # Only process if variable expands to non-empty
46749 
46750   if test "x$BUILD_STRIP" != x; then
46751     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46752 
46753   # First separate the path from the arguments. This will split at the first
46754   # space.
46755   complete="$BUILD_STRIP"
46756   path="${complete%% *}"
46757   tmp="$complete EOL"
46758   arguments="${tmp#* }"
46759 
46760   # Input might be given as Windows format, start by converting to
46761   # unix format.
46762   new_path=`$CYGPATH -u "$path"`
46763 
46764   # Now try to locate executable using which
46765   new_path=`$WHICH "$new_path" 2> /dev/null`
46766   # bat and cmd files are not always considered executable in cygwin causing which
46767   # to not find them
46768   if test "x$new_path" = x \
46769       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46770       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46771     new_path=`$CYGPATH -u "$path"`
46772   fi
46773   if test "x$new_path" = x; then
46774     # Oops. Which didn't find the executable.
46775     # The splitting of arguments from the executable at a space might have been incorrect,
46776     # since paths with space are more likely in Windows. Give it another try with the whole
46777     # argument.
46778     path="$complete"
46779     arguments="EOL"
46780     new_path=`$CYGPATH -u "$path"`
46781     new_path=`$WHICH "$new_path" 2> /dev/null`
46782     # bat and cmd files are not always considered executable in cygwin causing which
46783     # to not find them
46784     if test "x$new_path" = x \
46785         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46786         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46787       new_path=`$CYGPATH -u "$path"`
46788     fi
46789     if test "x$new_path" = x; then
46790       # It's still not found. Now this is an unrecoverable error.
46791       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46792 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46793       has_space=`$ECHO "$complete" | $GREP " "`
46794       if test "x$has_space" != x; then
46795         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46796 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46797       fi
46798       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46799     fi
46800   fi
46801 
46802   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46803   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46804   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46805   # "foo.exe" is OK but "foo" is an error.
46806   #
46807   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46808   # It is also a way to make sure we got the proper file name for the real test later on.
46809   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46810   if test "x$test_shortpath" = x; then
46811     # Short path failed, file does not exist as specified.
46812     # Try adding .exe or .cmd
46813     if test -f "${new_path}.exe"; then
46814       input_to_shortpath="${new_path}.exe"
46815     elif test -f "${new_path}.cmd"; then
46816       input_to_shortpath="${new_path}.cmd"
46817     else
46818       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46819 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46820       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46821 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46822       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46823     fi
46824   else
46825     input_to_shortpath="$new_path"
46826   fi
46827 
46828   # Call helper function which possibly converts this using DOS-style short mode.
46829   # If so, the updated path is stored in $new_path.
46830   new_path="$input_to_shortpath"
46831 
46832   input_path="$input_to_shortpath"
46833   # Check if we need to convert this using DOS-style short mode. If the path
46834   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46835   # take no chances and rewrite it.
46836   # Note: m4 eats our [], so we need to use [ and ] instead.
46837   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46838   if test "x$has_forbidden_chars" != x; then
46839     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46840     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46841     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46842     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46843       # Going to short mode and back again did indeed matter. Since short mode is
46844       # case insensitive, let's make it lowercase to improve readability.
46845       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46846       # Now convert it back to Unix-style (cygpath)
46847       input_path=`$CYGPATH -u "$shortmode_path"`
46848       new_path="$input_path"
46849     fi
46850   fi
46851 
46852   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46853   if test "x$test_cygdrive_prefix" = x; then
46854     # As a simple fix, exclude /usr/bin since it's not a real path.
46855     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46856       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46857       # a path prefixed by /cygdrive for fixpath to work.
46858       new_path="$CYGWIN_ROOT_PATH$input_path"
46859     fi
46860   fi
46861 
46862   # remove trailing .exe if any
46863   new_path="${new_path/%.exe/}"
46864 
46865     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46866 
46867   # First separate the path from the arguments. This will split at the first
46868   # space.
46869   complete="$BUILD_STRIP"
46870   path="${complete%% *}"
46871   tmp="$complete EOL"
46872   arguments="${tmp#* }"
46873 
46874   # Input might be given as Windows format, start by converting to
46875   # unix format.
46876   new_path="$path"
46877 
46878   windows_path="$new_path"
46879   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46880     unix_path=`$CYGPATH -u "$windows_path"`
46881     new_path="$unix_path"
46882   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46883     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46884     new_path="$unix_path"
46885   fi
46886 
46887 
46888   # Now try to locate executable using which
46889   new_path=`$WHICH "$new_path" 2> /dev/null`
46890 
46891   if test "x$new_path" = x; then
46892     # Oops. Which didn't find the executable.
46893     # The splitting of arguments from the executable at a space might have been incorrect,
46894     # since paths with space are more likely in Windows. Give it another try with the whole
46895     # argument.
46896     path="$complete"
46897     arguments="EOL"
46898     new_path="$path"
46899 
46900   windows_path="$new_path"
46901   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46902     unix_path=`$CYGPATH -u "$windows_path"`
46903     new_path="$unix_path"
46904   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46905     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46906     new_path="$unix_path"
46907   fi
46908 
46909 
46910     new_path=`$WHICH "$new_path" 2> /dev/null`
46911     # bat and cmd files are not always considered executable in MSYS causing which
46912     # to not find them
46913     if test "x$new_path" = x \
46914         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46915         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46916       new_path="$path"
46917 
46918   windows_path="$new_path"
46919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46920     unix_path=`$CYGPATH -u "$windows_path"`
46921     new_path="$unix_path"
46922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46923     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46924     new_path="$unix_path"
46925   fi
46926 
46927     fi
46928 
46929     if test "x$new_path" = x; then
46930       # It's still not found. Now this is an unrecoverable error.
46931       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46932 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46933       has_space=`$ECHO "$complete" | $GREP " "`
46934       if test "x$has_space" != x; then
46935         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46936 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46937       fi
46938       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46939     fi
46940   fi
46941 
46942   # Now new_path has a complete unix path to the binary
46943   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46944     # Keep paths in /bin as-is, but remove trailing .exe if any
46945     new_path="${new_path/%.exe/}"
46946     # Do not save /bin paths to all_fixpath_prefixes!
46947   else
46948     # Not in mixed or Windows style, start by that.
46949     new_path=`cmd //c echo $new_path`
46950 
46951   input_path="$new_path"
46952   # Check if we need to convert this using DOS-style short mode. If the path
46953   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46954   # take no chances and rewrite it.
46955   # Note: m4 eats our [], so we need to use [ and ] instead.
46956   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46957   if test "x$has_forbidden_chars" != x; then
46958     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46959     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46960   fi
46961 
46962     # Output is in $new_path
46963 
46964   windows_path="$new_path"
46965   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46966     unix_path=`$CYGPATH -u "$windows_path"`
46967     new_path="$unix_path"
46968   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46969     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46970     new_path="$unix_path"
46971   fi
46972 
46973     # remove trailing .exe if any
46974     new_path="${new_path/%.exe/}"
46975 
46976     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46977     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46978   fi
46979 
46980     else
46981       # We're on a unix platform. Hooray! :)
46982       # First separate the path from the arguments. This will split at the first
46983       # space.
46984       complete="$BUILD_STRIP"
46985       path="${complete%% *}"
46986       tmp="$complete EOL"
46987       arguments="${tmp#* }"
46988 
46989       # Cannot rely on the command "which" here since it doesn't always work.
46990       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46991       if test -z "$is_absolute_path"; then
46992         # Path to executable is not absolute. Find it.
46993         IFS_save="$IFS"
46994         IFS=:
46995         for p in $PATH; do
46996           if test -f "$p/$path" && test -x "$p/$path"; then
46997             new_path="$p/$path"
46998             break
46999           fi
47000         done
47001         IFS="$IFS_save"
47002       else
47003         # This is an absolute path, we can use it without further modifications.
47004         new_path="$path"
47005       fi
47006 
47007       if test "x$new_path" = x; then
47008         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47009 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47010         has_space=`$ECHO "$complete" | $GREP " "`
47011         if test "x$has_space" != x; then
47012           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47013 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47014         fi
47015         as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47016       fi
47017     fi
47018 
47019     # Now join together the path and the arguments once again
47020     if test "x$arguments" != xEOL; then
47021       new_complete="$new_path ${arguments% *}"
47022     else
47023       new_complete="$new_path"
47024     fi
47025 
47026     if test "x$complete" != "x$new_complete"; then
47027       BUILD_STRIP="$new_complete"
47028       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47029 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47030     fi
47031   fi
47032 
47033     # Assume the C compiler is the assembler
47034     BUILD_AS="$BUILD_CC -c"
47035     # Just like for the target compiler, use the compiler as linker
47036     BUILD_LD="$BUILD_CC"
47037     BUILD_LDCXX="$BUILD_CXX"
47038 
47039     PATH="$OLDPATH"
47040 
47041 
47042   COMPILER=$BUILD_CC
47043   COMPILER_NAME=BuildC
47044 
47045   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47046     # cc -V output typically looks like
47047     #     cc: Sun C 5.12 Linux_i386 2011/11/16
47048     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47049     # Check that this is likely to be the Solaris Studio cc.
47050     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47051     if test $? -ne 0; then
47052       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47053       { $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
47054 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47055       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47056 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47057       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47058 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47059       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47060     fi
47061     # Remove usage instructions (if present), and
47062     # collapse compiler output into a single line
47063     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47064         $SED -e 's/ *[Uu]sage:.*//'`
47065     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47066         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47067   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47068     # xlc -qversion output typically looks like
47069     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47070     #     Version: 11.01.0000.0015
47071     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47072     # Check that this is likely to be the IBM XL C compiler.
47073     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47074     if test $? -ne 0; then
47075       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47076       { $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
47077 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47078       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47079 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47080       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47081 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47082       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47083     fi
47084     # Collapse compiler output into a single line
47085     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47086     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47087         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47088   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47089     # There is no specific version flag, but all output starts with a version string.
47090     # First line typically looks something like:
47091     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47092     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47093     # Check that this is likely to be Microsoft CL.EXE.
47094     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47095     if test $? -ne 0; then
47096       { $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
47097 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47098       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47099 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47100       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47101     fi
47102     # Collapse compiler output into a single line
47103     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47104     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47105         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47106   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47107     # gcc --version output typically looks like
47108     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47109     #     Copyright (C) 2013 Free Software Foundation, Inc.
47110     #     This is free software; see the source for copying conditions.  There is NO
47111     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47112     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47113     # Check that this is likely to be GCC.
47114     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47115     if test $? -ne 0; then
47116       { $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
47117 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47118       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47119 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47120       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47121     fi
47122     # Remove Copyright and legalese from version string, and
47123     # collapse into a single line
47124     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47125         $SED -e 's/ *Copyright .*//'`
47126     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47127         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47128   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47129     # clang --version output typically looks like
47130     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47131     #    clang version 3.3 (tags/RELEASE_33/final)
47132     # or
47133     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47134     #    Target: x86_64-pc-linux-gnu
47135     #    Thread model: posix
47136     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47137     # Check that this is likely to be clang
47138     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47139     if test $? -ne 0; then
47140       { $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
47141 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47142       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47143 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47144       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47145     fi
47146     # Collapse compiler output into a single line
47147     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47148     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47149         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47150   else
47151       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47152   fi
47153   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47154   BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47155   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47156   BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47157 
47158   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47159 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47160 
47161 
47162   COMPILER=$BUILD_CXX
47163   COMPILER_NAME=BuildC++
47164 
47165   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47166     # cc -V output typically looks like
47167     #     cc: Sun C 5.12 Linux_i386 2011/11/16
47168     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47169     # Check that this is likely to be the Solaris Studio cc.
47170     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47171     if test $? -ne 0; then
47172       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47173       { $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
47174 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47175       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47176 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47177       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47178 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47179       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47180     fi
47181     # Remove usage instructions (if present), and
47182     # collapse compiler output into a single line
47183     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47184         $SED -e 's/ *[Uu]sage:.*//'`
47185     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47186         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47187   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47188     # xlc -qversion output typically looks like
47189     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47190     #     Version: 11.01.0000.0015
47191     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47192     # Check that this is likely to be the IBM XL C compiler.
47193     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47194     if test $? -ne 0; then
47195       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47196       { $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
47197 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47198       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47199 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47200       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47201 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47202       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47203     fi
47204     # Collapse compiler output into a single line
47205     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47206     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47207         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47208   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47209     # There is no specific version flag, but all output starts with a version string.
47210     # First line typically looks something like:
47211     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47212     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47213     # Check that this is likely to be Microsoft CL.EXE.
47214     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47215     if test $? -ne 0; then
47216       { $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
47217 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47218       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47219 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47220       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47221     fi
47222     # Collapse compiler output into a single line
47223     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47224     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47225         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47226   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47227     # gcc --version output typically looks like
47228     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47229     #     Copyright (C) 2013 Free Software Foundation, Inc.
47230     #     This is free software; see the source for copying conditions.  There is NO
47231     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47232     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47233     # Check that this is likely to be GCC.
47234     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47235     if test $? -ne 0; then
47236       { $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
47237 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47238       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47239 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47240       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47241     fi
47242     # Remove Copyright and legalese from version string, and
47243     # collapse into a single line
47244     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47245         $SED -e 's/ *Copyright .*//'`
47246     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47247         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47248   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47249     # clang --version output typically looks like
47250     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47251     #    clang version 3.3 (tags/RELEASE_33/final)
47252     # or
47253     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47254     #    Target: x86_64-pc-linux-gnu
47255     #    Thread model: posix
47256     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47257     # Check that this is likely to be clang
47258     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47259     if test $? -ne 0; then
47260       { $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
47261 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47262       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47263 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47264       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47265     fi
47266     # Collapse compiler output into a single line
47267     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47268     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47269         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47270   else
47271       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47272   fi
47273   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47274   BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47275   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47276   BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47277 
47278   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47279 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47280 
47281 
47282   if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47283     { $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
47284 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47285     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47286 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47287   fi
47288 
47289   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47290   if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47291     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47292 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47293   fi
47294 
47295   if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47296     { $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
47297 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47298   fi
47299 
47300   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47301 
47302   else
47303     # If we are not cross compiling, use the normal target compilers for
47304     # building the build platform executables.
47305     BUILD_CC="$CC"
47306     BUILD_CXX="$CXX"
47307     BUILD_LD="$LD"
47308     BUILD_LDCXX="$LDCXX"
47309     BUILD_NM="$NM"
47310     BUILD_AS="$AS"
47311     BUILD_OBJCOPY="$OBJCOPY"
47312     BUILD_STRIP="$STRIP"
47313     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47314     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47315     BUILD_AR="$AR"
47316 
47317 
47318   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47319     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47320 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47321     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47322 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47323   fi
47324 
47325   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47326   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47327     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47328 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47329   fi
47330 
47331   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47332     { $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
47333 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47334   fi
47335 
47336   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
47337 
47338   fi
47339 
47340 
47341 
47342 
47343 
47344 
47345 
47346 
47347 
47348 
47349 
47350 
47351   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47352     # For hotspot, we need these in Windows mixed path,
47353     # so rewrite them all. Need added .exe suffix.
47354     HOTSPOT_CXX="$CXX.exe"
47355     HOTSPOT_LD="$LD.exe"
47356     HOTSPOT_MT="$MT.exe"
47357     HOTSPOT_RC="$RC.exe"
47358 
47359   unix_path="$HOTSPOT_CXX"
47360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47361     windows_path=`$CYGPATH -m "$unix_path"`
47362     HOTSPOT_CXX="$windows_path"
47363   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47364     windows_path=`cmd //c echo $unix_path`
47365     HOTSPOT_CXX="$windows_path"
47366   fi
47367 
47368 
47369   unix_path="$HOTSPOT_LD"
47370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47371     windows_path=`$CYGPATH -m "$unix_path"`
47372     HOTSPOT_LD="$windows_path"
47373   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47374     windows_path=`cmd //c echo $unix_path`
47375     HOTSPOT_LD="$windows_path"
47376   fi
47377 
47378 
47379   unix_path="$HOTSPOT_MT"
47380   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47381     windows_path=`$CYGPATH -m "$unix_path"`
47382     HOTSPOT_MT="$windows_path"
47383   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47384     windows_path=`cmd //c echo $unix_path`
47385     HOTSPOT_MT="$windows_path"
47386   fi
47387 
47388 
47389   unix_path="$HOTSPOT_RC"
47390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47391     windows_path=`$CYGPATH -m "$unix_path"`
47392     HOTSPOT_RC="$windows_path"
47393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47394     windows_path=`cmd //c echo $unix_path`
47395     HOTSPOT_RC="$windows_path"
47396   fi
47397 
47398 
47399 
47400   else
47401     HOTSPOT_CXX="$CXX"
47402     HOTSPOT_LD="$LD"
47403   fi
47404 
47405 
47406 
47407   if test  "x$TOOLCHAIN_TYPE" = xclang; then
47408     USE_CLANG=true
47409   fi
47410 
47411 
47412 
47413 
47414 
47415   # The package path is used only on macosx?
47416   # FIXME: clean this up, and/or move it elsewhere.
47417   PACKAGE_PATH=/opt/local
47418 
47419 
47420   # Check for extra potential brokenness.
47421   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47422     # On Windows, double-check that we got the right compiler.
47423     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47424     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47425     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47426       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47427         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
47428       fi
47429     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47430       if test "x$COMPILER_CPU_TEST" != "xx64"; then
47431         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47432       fi
47433     fi
47434   fi
47435 
47436   if test "x$TOOLCHAIN_TYPE" = xgcc; then
47437     # If this is a --hash-style=gnu system, use --hash-style=both, why?
47438     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47439     # This is later checked when setting flags.
47440 
47441     # "-Og" suppported for GCC 4.8 and later
47442     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47443 
47444 
47445 
47446 
47447 
47448 
47449 
47450 
47451 
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     # Execute function body
47491 
47492 
47493 
47494 
47495 
47496 
47497 
47498 
47499 
47500 
47501 
47502 
47503 
47504 
47505 
47506 
47507 
47508 
47509 
47510 
47511 
47512 
47513 
47514 
47515 
47516 
47517 
47518 
47519 
47520 
47521 
47522 
47523 
47524 
47525 
47526 
47527 
47528 
47529 
47530 
47531 
47532 
47533 
47534 
47535 
47536 
47537 
47538 
47539     # Execute function body
47540 
47541   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47542 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47543   supports=yes
47544 
47545   saved_cflags="$CFLAGS"
47546   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47547   ac_ext=c
47548 ac_cpp='$CPP $CPPFLAGS'
47549 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47550 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47551 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47552 
47553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47554 /* end confdefs.h.  */
47555 int i;
47556 _ACEOF
47557 if ac_fn_c_try_compile "$LINENO"; then :
47558 
47559 else
47560   supports=no
47561 fi
47562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47563   ac_ext=cpp
47564 ac_cpp='$CXXCPP $CPPFLAGS'
47565 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47566 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47567 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47568 
47569   CFLAGS="$saved_cflags"
47570 
47571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47572 $as_echo "$supports" >&6; }
47573   if test "x$supports" = "xyes" ; then
47574     :
47575     C_COMP_SUPPORTS="yes"
47576   else
47577     :
47578     C_COMP_SUPPORTS="no"
47579   fi
47580 
47581 
47582 
47583 
47584 
47585 
47586 
47587 
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 
47636 
47637 
47638 
47639     # Execute function body
47640 
47641   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47642 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47643   supports=yes
47644 
47645   saved_cxxflags="$CXXFLAGS"
47646   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47647   ac_ext=cpp
47648 ac_cpp='$CXXCPP $CPPFLAGS'
47649 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47650 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47651 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47652 
47653   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47654 /* end confdefs.h.  */
47655 int i;
47656 _ACEOF
47657 if ac_fn_cxx_try_compile "$LINENO"; then :
47658 
47659 else
47660   supports=no
47661 fi
47662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47663   ac_ext=cpp
47664 ac_cpp='$CXXCPP $CPPFLAGS'
47665 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47666 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47667 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47668 
47669   CXXFLAGS="$saved_cxxflags"
47670 
47671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47672 $as_echo "$supports" >&6; }
47673   if test "x$supports" = "xyes" ; then
47674     :
47675     CXX_COMP_SUPPORTS="yes"
47676   else
47677     :
47678     CXX_COMP_SUPPORTS="no"
47679   fi
47680 
47681 
47682 
47683 
47684 
47685 
47686 
47687 
47688 
47689 
47690 
47691 
47692 
47693   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47694 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47695   supports=no
47696   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47697 
47698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47699 $as_echo "$supports" >&6; }
47700   if test "x$supports" = "xyes" ; then
47701     :
47702     HAS_CFLAG_OPTIMIZE_DEBUG=true
47703   else
47704     :
47705     HAS_CFLAG_OPTIMIZE_DEBUG=false
47706   fi
47707 
47708 
47709 
47710 
47711 
47712 
47713 
47714     # "-z relro" supported in GNU binutils 2.17 and later
47715     LINKER_RELRO_FLAG="-Wl,-z,relro"
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 
47747 
47748 
47749 
47750 
47751 
47752 
47753 
47754 
47755 
47756 
47757 
47758 
47759 
47760 
47761 
47762 
47763     # Execute function body
47764 
47765   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47766 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47767   supports=yes
47768 
47769   saved_ldflags="$LDFLAGS"
47770   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47771   ac_ext=c
47772 ac_cpp='$CPP $CPPFLAGS'
47773 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47774 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47775 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47776 
47777   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47778 /* end confdefs.h.  */
47779 
47780 int
47781 main ()
47782 {
47783 
47784   ;
47785   return 0;
47786 }
47787 _ACEOF
47788 if ac_fn_c_try_link "$LINENO"; then :
47789 
47790 else
47791   supports=no
47792 fi
47793 rm -f core conftest.err conftest.$ac_objext \
47794     conftest$ac_exeext conftest.$ac_ext
47795   ac_ext=cpp
47796 ac_cpp='$CXXCPP $CPPFLAGS'
47797 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47798 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47799 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47800 
47801   LDFLAGS="$saved_ldflags"
47802 
47803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47804 $as_echo "$supports" >&6; }
47805   if test "x$supports" = "xyes" ; then
47806     :
47807     HAS_LINKER_RELRO=true
47808   else
47809     :
47810     HAS_LINKER_RELRO=false
47811   fi
47812 
47813 
47814 
47815 
47816 
47817 
47818 
47819 
47820 
47821 
47822 
47823 
47824 
47825     # "-z now" supported in GNU binutils 2.11 and later
47826     LINKER_NOW_FLAG="-Wl,-z,now"
47827 
47828 
47829 
47830 
47831 
47832 
47833 
47834 
47835 
47836 
47837 
47838 
47839 
47840 
47841 
47842 
47843 
47844 
47845 
47846 
47847 
47848 
47849 
47850 
47851 
47852 
47853 
47854 
47855 
47856 
47857 
47858 
47859 
47860 
47861 
47862 
47863 
47864 
47865 
47866 
47867 
47868 
47869 
47870 
47871 
47872 
47873 
47874     # Execute function body
47875 
47876   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47877 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47878   supports=yes
47879 
47880   saved_ldflags="$LDFLAGS"
47881   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47882   ac_ext=c
47883 ac_cpp='$CPP $CPPFLAGS'
47884 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47885 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47886 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47887 
47888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47889 /* end confdefs.h.  */
47890 
47891 int
47892 main ()
47893 {
47894 
47895   ;
47896   return 0;
47897 }
47898 _ACEOF
47899 if ac_fn_c_try_link "$LINENO"; then :
47900 
47901 else
47902   supports=no
47903 fi
47904 rm -f core conftest.err conftest.$ac_objext \
47905     conftest$ac_exeext conftest.$ac_ext
47906   ac_ext=cpp
47907 ac_cpp='$CXXCPP $CPPFLAGS'
47908 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47909 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47910 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47911 
47912   LDFLAGS="$saved_ldflags"
47913 
47914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47915 $as_echo "$supports" >&6; }
47916   if test "x$supports" = "xyes" ; then
47917     :
47918     HAS_LINKER_NOW=true
47919   else
47920     :
47921     HAS_LINKER_NOW=false
47922   fi
47923 
47924 
47925 
47926 
47927 
47928 
47929 
47930 
47931 
47932 
47933 
47934 
47935   fi
47936 
47937   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47938   # in executable.'
47939   USING_BROKEN_SUSE_LD=no
47940   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47941     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47942 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47943     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47944     $ECHO "int main() { }" > main.c
47945     if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47946       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47947 $as_echo "no" >&6; }
47948       USING_BROKEN_SUSE_LD=no
47949     else
47950       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47951 $as_echo "yes" >&6; }
47952       USING_BROKEN_SUSE_LD=yes
47953     fi
47954     $RM version-script.map main.c a.out
47955   fi
47956 
47957 
47958   # Setup hotspot lecagy names for toolchains
47959   HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47960   if test "x$TOOLCHAIN_TYPE" = xclang; then
47961     HOTSPOT_TOOLCHAIN_TYPE=gcc
47962   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47963     HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47964   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47965     HOTSPOT_TOOLCHAIN_TYPE=visCPP
47966   fi
47967 
47968 
47969 
47970 # Setup the JTReg Regression Test Harness.
47971 
47972 
47973 # Check whether --with-jtreg was given.
47974 if test "${with_jtreg+set}" = set; then :
47975   withval=$with_jtreg;
47976 else
47977   with_jtreg=no
47978 fi
47979 
47980 
47981   if test "x$with_jtreg" = xno; then
47982     # jtreg disabled
47983     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47984 $as_echo_n "checking for jtreg... " >&6; }
47985     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47986 $as_echo "no" >&6; }
47987   else
47988     if test "x$with_jtreg" != xyes; then
47989       # with path specified.
47990       JT_HOME="$with_jtreg"
47991     fi
47992 
47993     if test "x$JT_HOME" != x; then
47994       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47995 $as_echo_n "checking for jtreg... " >&6; }
47996 
47997       # use JT_HOME enviroment var.
47998 
47999   # Only process if variable expands to non-empty
48000 
48001   if test "x$JT_HOME" != x; then
48002     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48003 
48004   # Input might be given as Windows format, start by converting to
48005   # unix format.
48006   path="$JT_HOME"
48007   new_path=`$CYGPATH -u "$path"`
48008 
48009   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48010   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48011   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48012   # "foo.exe" is OK but "foo" is an error.
48013   #
48014   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48015   # It is also a way to make sure we got the proper file name for the real test later on.
48016   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48017   if test "x$test_shortpath" = x; then
48018     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48019 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48020     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
48021   fi
48022 
48023   # Call helper function which possibly converts this using DOS-style short mode.
48024   # If so, the updated path is stored in $new_path.
48025 
48026   input_path="$new_path"
48027   # Check if we need to convert this using DOS-style short mode. If the path
48028   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48029   # take no chances and rewrite it.
48030   # Note: m4 eats our [], so we need to use [ and ] instead.
48031   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48032   if test "x$has_forbidden_chars" != x; then
48033     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48034     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48035     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48036     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48037       # Going to short mode and back again did indeed matter. Since short mode is
48038       # case insensitive, let's make it lowercase to improve readability.
48039       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48040       # Now convert it back to Unix-style (cygpath)
48041       input_path=`$CYGPATH -u "$shortmode_path"`
48042       new_path="$input_path"
48043     fi
48044   fi
48045 
48046   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48047   if test "x$test_cygdrive_prefix" = x; then
48048     # As a simple fix, exclude /usr/bin since it's not a real path.
48049     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48050       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48051       # a path prefixed by /cygdrive for fixpath to work.
48052       new_path="$CYGWIN_ROOT_PATH$input_path"
48053     fi
48054   fi
48055 
48056 
48057   if test "x$path" != "x$new_path"; then
48058     JT_HOME="$new_path"
48059     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48060 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48061   fi
48062 
48063     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48064 
48065   path="$JT_HOME"
48066   has_colon=`$ECHO $path | $GREP ^.:`
48067   new_path="$path"
48068   if test "x$has_colon" = x; then
48069     # Not in mixed or Windows style, start by that.
48070     new_path=`cmd //c echo $path`
48071   fi
48072 
48073 
48074   input_path="$new_path"
48075   # Check if we need to convert this using DOS-style short mode. If the path
48076   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48077   # take no chances and rewrite it.
48078   # Note: m4 eats our [], so we need to use [ and ] instead.
48079   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48080   if test "x$has_forbidden_chars" != x; then
48081     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48082     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48083   fi
48084 
48085 
48086   windows_path="$new_path"
48087   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48088     unix_path=`$CYGPATH -u "$windows_path"`
48089     new_path="$unix_path"
48090   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48091     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48092     new_path="$unix_path"
48093   fi
48094 
48095   if test "x$path" != "x$new_path"; then
48096     JT_HOME="$new_path"
48097     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48098 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48099   fi
48100 
48101   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48102   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48103 
48104     else
48105       # We're on a unix platform. Hooray! :)
48106       path="$JT_HOME"
48107       has_space=`$ECHO "$path" | $GREP " "`
48108       if test "x$has_space" != x; then
48109         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48110 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48111         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48112       fi
48113 
48114       # Use eval to expand a potential ~
48115       eval path="$path"
48116       if test ! -f "$path" && test ! -d "$path"; then
48117         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48118       fi
48119 
48120       if test -d "$path"; then
48121         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48122       else
48123         dir="`$DIRNAME "$path"`"
48124         base="`$BASENAME "$path"`"
48125         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48126       fi
48127     fi
48128   fi
48129 
48130 
48131       # jtreg win32 script works for everybody
48132       JTREGEXE="$JT_HOME/bin/jtreg"
48133 
48134       if test ! -f "$JTREGEXE"; then
48135         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48136       fi
48137 
48138       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48139 $as_echo "$JTREGEXE" >&6; }
48140     else
48141       # try to find jtreg on path
48142 
48143 
48144 
48145   # Publish this variable in the help.
48146 
48147 
48148   if [ -z "${JTREGEXE+x}" ]; then
48149     # The variable is not set by user, try to locate tool using the code snippet
48150     for ac_prog in jtreg
48151 do
48152   # Extract the first word of "$ac_prog", so it can be a program name with args.
48153 set dummy $ac_prog; ac_word=$2
48154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48155 $as_echo_n "checking for $ac_word... " >&6; }
48156 if ${ac_cv_path_JTREGEXE+:} false; then :
48157   $as_echo_n "(cached) " >&6
48158 else
48159   case $JTREGEXE in
48160   [\\/]* | ?:[\\/]*)
48161   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48162   ;;
48163   *)
48164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48165 for as_dir in $PATH
48166 do
48167   IFS=$as_save_IFS
48168   test -z "$as_dir" && as_dir=.
48169     for ac_exec_ext in '' $ac_executable_extensions; do
48170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48171     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48173     break 2
48174   fi
48175 done
48176   done
48177 IFS=$as_save_IFS
48178 
48179   ;;
48180 esac
48181 fi
48182 JTREGEXE=$ac_cv_path_JTREGEXE
48183 if test -n "$JTREGEXE"; then
48184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48185 $as_echo "$JTREGEXE" >&6; }
48186 else
48187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48188 $as_echo "no" >&6; }
48189 fi
48190 
48191 
48192   test -n "$JTREGEXE" && break
48193 done
48194 
48195   else
48196     # The variable is set, but is it from the command line or the environment?
48197 
48198     # Try to remove the string !JTREGEXE! from our list.
48199     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48200     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48201       # If it failed, the variable was not from the command line. Ignore it,
48202       # but warn the user (except for BASH, which is always set by the calling BASH).
48203       if test "xJTREGEXE" != xBASH; then
48204         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48205 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48206       fi
48207       # Try to locate tool using the code snippet
48208       for ac_prog in jtreg
48209 do
48210   # Extract the first word of "$ac_prog", so it can be a program name with args.
48211 set dummy $ac_prog; ac_word=$2
48212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48213 $as_echo_n "checking for $ac_word... " >&6; }
48214 if ${ac_cv_path_JTREGEXE+:} false; then :
48215   $as_echo_n "(cached) " >&6
48216 else
48217   case $JTREGEXE in
48218   [\\/]* | ?:[\\/]*)
48219   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48220   ;;
48221   *)
48222   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48223 for as_dir in $PATH
48224 do
48225   IFS=$as_save_IFS
48226   test -z "$as_dir" && as_dir=.
48227     for ac_exec_ext in '' $ac_executable_extensions; do
48228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48229     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48231     break 2
48232   fi
48233 done
48234   done
48235 IFS=$as_save_IFS
48236 
48237   ;;
48238 esac
48239 fi
48240 JTREGEXE=$ac_cv_path_JTREGEXE
48241 if test -n "$JTREGEXE"; then
48242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48243 $as_echo "$JTREGEXE" >&6; }
48244 else
48245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48246 $as_echo "no" >&6; }
48247 fi
48248 
48249 
48250   test -n "$JTREGEXE" && break
48251 done
48252 
48253     else
48254       # If it succeeded, then it was overridden by the user. We will use it
48255       # for the tool.
48256 
48257       # First remove it from the list of overridden variables, so we can test
48258       # for unknown variables in the end.
48259       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48260 
48261       # Check if we try to supply an empty value
48262       if test "x$JTREGEXE" = x; then
48263         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48264 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48265         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48266 $as_echo_n "checking for JTREGEXE... " >&6; }
48267         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48268 $as_echo "disabled" >&6; }
48269       else
48270         # Check if the provided tool contains a complete path.
48271         tool_specified="$JTREGEXE"
48272         tool_basename="${tool_specified##*/}"
48273         if test "x$tool_basename" = "x$tool_specified"; then
48274           # A command without a complete path is provided, search $PATH.
48275           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48276 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48277           # Extract the first word of "$tool_basename", so it can be a program name with args.
48278 set dummy $tool_basename; ac_word=$2
48279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48280 $as_echo_n "checking for $ac_word... " >&6; }
48281 if ${ac_cv_path_JTREGEXE+:} false; then :
48282   $as_echo_n "(cached) " >&6
48283 else
48284   case $JTREGEXE in
48285   [\\/]* | ?:[\\/]*)
48286   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48287   ;;
48288   *)
48289   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48290 for as_dir in $PATH
48291 do
48292   IFS=$as_save_IFS
48293   test -z "$as_dir" && as_dir=.
48294     for ac_exec_ext in '' $ac_executable_extensions; do
48295   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48296     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48297     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48298     break 2
48299   fi
48300 done
48301   done
48302 IFS=$as_save_IFS
48303 
48304   ;;
48305 esac
48306 fi
48307 JTREGEXE=$ac_cv_path_JTREGEXE
48308 if test -n "$JTREGEXE"; then
48309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48310 $as_echo "$JTREGEXE" >&6; }
48311 else
48312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48313 $as_echo "no" >&6; }
48314 fi
48315 
48316 
48317           if test "x$JTREGEXE" = x; then
48318             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48319           fi
48320         else
48321           # Otherwise we believe it is a complete path. Use it as it is.
48322           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48323 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48324           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48325 $as_echo_n "checking for JTREGEXE... " >&6; }
48326           if test ! -x "$tool_specified"; then
48327             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48328 $as_echo "not found" >&6; }
48329             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48330           fi
48331           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48332 $as_echo "$tool_specified" >&6; }
48333         fi
48334       fi
48335     fi
48336 
48337   fi
48338 
48339 
48340 
48341   if test "x$JTREGEXE" = x; then
48342     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48343   fi
48344 
48345 
48346       JT_HOME="`$DIRNAME $JTREGEXE`"
48347     fi
48348   fi
48349 
48350 
48351 
48352 
48353 
48354 
48355   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48356   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48357   # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48358   #                              commands produced by the link step (currently AIX only)
48359   if test "x$TOOLCHAIN_TYPE" = xxlc; then
48360     COMPILER_TARGET_BITS_FLAG="-q"
48361     COMPILER_COMMAND_FILE_FLAG="-f"
48362     COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48363   else
48364     COMPILER_TARGET_BITS_FLAG="-m"
48365     COMPILER_COMMAND_FILE_FLAG="@"
48366     COMPILER_BINDCMD_FILE_FLAG=""
48367 
48368     # The solstudio linker does not support @-files.
48369     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48370       COMPILER_COMMAND_FILE_FLAG=
48371     fi
48372 
48373     # Check if @file is supported by gcc
48374     if test "x$TOOLCHAIN_TYPE" = xgcc; then
48375       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48376 $as_echo_n "checking if @file is supported by gcc... " >&6; }
48377       # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48378       $ECHO "" "--version" > command.file
48379       if $CXX @command.file 2>&5 >&5; then
48380         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48381 $as_echo "yes" >&6; }
48382         COMPILER_COMMAND_FILE_FLAG="@"
48383       else
48384         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48385 $as_echo "no" >&6; }
48386         COMPILER_COMMAND_FILE_FLAG=
48387       fi
48388       $RM command.file
48389     fi
48390   fi
48391 
48392 
48393 
48394 
48395   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48396   if test "x$TOOLCHAIN_NAME" = xxcode; then
48397     ARFLAGS="-r"
48398   elif test "x$OPENJDK_TARGET_OS" = xaix; then
48399     ARFLAGS="-X64"
48400   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48401     # lib.exe is used as AR to create static libraries.
48402     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48403   else
48404     ARFLAGS=""
48405   fi
48406 
48407 
48408   ## Setup strip.
48409   # FIXME: should this really be per platform, or should it be per toolchain type?
48410   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48411   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48412   if test "x$OPENJDK_TARGET_OS" = xlinux; then
48413     STRIPFLAGS="-g"
48414   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48415     STRIPFLAGS="-x"
48416   elif test "x$TOOLCHAIN_NAME" = xxcode; then
48417     STRIPFLAGS="-S"
48418   elif test "x$OPENJDK_TARGET_OS" = xaix; then
48419     STRIPFLAGS="-X32_64"
48420   fi
48421 
48422 
48423 
48424   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48425     CC_OUT_OPTION=-Fo
48426     EXE_OUT_OPTION=-out:
48427     LD_OUT_OPTION=-out:
48428     AR_OUT_OPTION=-out:
48429   else
48430     # The option used to specify the target .o,.a or .so file.
48431     # When compiling, how to specify the to be created object file.
48432     CC_OUT_OPTION='-o$(SPACE)'
48433     # When linking, how to specify the to be created executable.
48434     EXE_OUT_OPTION='-o$(SPACE)'
48435     # When linking, how to specify the to be created dynamically linkable library.
48436     LD_OUT_OPTION='-o$(SPACE)'
48437     # When archiving, how to specify the to be create static archive for object files.
48438     AR_OUT_OPTION='rcs$(SPACE)'
48439   fi
48440 
48441 
48442 
48443 
48444 
48445   # On Windows, we need to set RC flags.
48446   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48447     RC_FLAGS="-nologo -l0x409"
48448     JVM_RCFLAGS="-nologo"
48449     if test "x$DEBUG_LEVEL" = xrelease; then
48450       RC_FLAGS="$RC_FLAGS -DNDEBUG"
48451       JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48452     fi
48453 
48454     # The version variables used to create RC_FLAGS may be overridden
48455     # in a custom configure script, or possibly the command line.
48456     # Let those variables be expanded at make time in spec.gmk.
48457     # The \$ are escaped to the shell, and the $(...) variables
48458     # are evaluated by make.
48459     RC_FLAGS="$RC_FLAGS \
48460         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48461         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48462         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48463         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48464         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48465         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48466         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48467 
48468     JVM_RCFLAGS="$JVM_RCFLAGS \
48469         -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48470         -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48471         -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48472         -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48473         -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48474         -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48475         -D\"HS_FNAME=jvm.dll\" \
48476         -D\"HS_INTERNAL_NAME=jvm\""
48477   fi
48478 
48479 
48480 
48481   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48482     # silence copyright notice and other headers.
48483     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48484   fi
48485 
48486 
48487 # Now we can test some aspects on the target using configure macros.
48488 
48489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48490 $as_echo_n "checking for ANSI C header files... " >&6; }
48491 if ${ac_cv_header_stdc+:} false; then :
48492   $as_echo_n "(cached) " >&6
48493 else
48494   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48495 /* end confdefs.h.  */
48496 #include <stdlib.h>
48497 #include <stdarg.h>
48498 #include <string.h>
48499 #include <float.h>
48500 
48501 int
48502 main ()
48503 {
48504 
48505   ;
48506   return 0;
48507 }
48508 _ACEOF
48509 if ac_fn_cxx_try_compile "$LINENO"; then :
48510   ac_cv_header_stdc=yes
48511 else
48512   ac_cv_header_stdc=no
48513 fi
48514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48515 
48516 if test $ac_cv_header_stdc = yes; then
48517   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48518   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48519 /* end confdefs.h.  */
48520 #include <string.h>
48521 
48522 _ACEOF
48523 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48524   $EGREP "memchr" >/dev/null 2>&1; then :
48525 
48526 else
48527   ac_cv_header_stdc=no
48528 fi
48529 rm -f conftest*
48530 
48531 fi
48532 
48533 if test $ac_cv_header_stdc = yes; then
48534   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48535   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48536 /* end confdefs.h.  */
48537 #include <stdlib.h>
48538 
48539 _ACEOF
48540 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48541   $EGREP "free" >/dev/null 2>&1; then :
48542 
48543 else
48544   ac_cv_header_stdc=no
48545 fi
48546 rm -f conftest*
48547 
48548 fi
48549 
48550 if test $ac_cv_header_stdc = yes; then
48551   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48552   if test "$cross_compiling" = yes; then :
48553   :
48554 else
48555   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48556 /* end confdefs.h.  */
48557 #include <ctype.h>
48558 #include <stdlib.h>
48559 #if ((' ' & 0x0FF) == 0x020)
48560 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48561 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48562 #else
48563 # define ISLOWER(c) \
48564                    (('a' <= (c) && (c) <= 'i') \
48565                      || ('j' <= (c) && (c) <= 'r') \
48566                      || ('s' <= (c) && (c) <= 'z'))
48567 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48568 #endif
48569 
48570 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48571 int
48572 main ()
48573 {
48574   int i;
48575   for (i = 0; i < 256; i++)
48576     if (XOR (islower (i), ISLOWER (i))
48577         || toupper (i) != TOUPPER (i))
48578       return 2;
48579   return 0;
48580 }
48581 _ACEOF
48582 if ac_fn_cxx_try_run "$LINENO"; then :
48583 
48584 else
48585   ac_cv_header_stdc=no
48586 fi
48587 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48588   conftest.$ac_objext conftest.beam conftest.$ac_ext
48589 fi
48590 
48591 fi
48592 fi
48593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48594 $as_echo "$ac_cv_header_stdc" >&6; }
48595 if test $ac_cv_header_stdc = yes; then
48596 
48597 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
48598 
48599 fi
48600 
48601 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
48602 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48603                   inttypes.h stdint.h unistd.h
48604 do :
48605   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48606 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48607 "
48608 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48609   cat >>confdefs.h <<_ACEOF
48610 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48611 _ACEOF
48612 
48613 fi
48614 
48615 done
48616 
48617 
48618 
48619   ###############################################################################
48620   #
48621   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48622   # (The JVM can use 32 or 64 bit Java pointers but that decision
48623   # is made at runtime.)
48624   #
48625 
48626   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48627     # Always specify -m flag on Solaris
48628     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48629 
48630   # When we add flags to the "official" CFLAGS etc, we need to
48631   # keep track of these additions in ADDED_CFLAGS etc. These
48632   # will later be checked to make sure only controlled additions
48633   # have been made to CFLAGS etc.
48634   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48635   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48636   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48637 
48638   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48639   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48640   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48641 
48642   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48643   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48644   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48645 
48646   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48647   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48648   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48649 
48650   elif test "x$COMPILE_TYPE" = xreduced; then
48651     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48652       # Specify -m if running reduced on unix platforms
48653 
48654   # When we add flags to the "official" CFLAGS etc, we need to
48655   # keep track of these additions in ADDED_CFLAGS etc. These
48656   # will later be checked to make sure only controlled additions
48657   # have been made to CFLAGS etc.
48658   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48659   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48660   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48661 
48662   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48663   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48664   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48665 
48666   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48667   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48668   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48669 
48670   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48671   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48672   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48673 
48674     fi
48675   fi
48676   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48677     JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48678     JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48679     JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48680   fi
48681 
48682   # Make compilation sanity check
48683   for ac_header in stdio.h
48684 do :
48685   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48686 if test "x$ac_cv_header_stdio_h" = xyes; then :
48687   cat >>confdefs.h <<_ACEOF
48688 #define HAVE_STDIO_H 1
48689 _ACEOF
48690 
48691 else
48692 
48693     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48694 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48695     if test "x$COMPILE_TYPE" = xreduced; then
48696 
48697   # Print a helpful message on how to acquire the necessary build dependency.
48698   # reduced is the help tag: freetype, cups, alsa etc
48699   MISSING_DEPENDENCY=reduced
48700 
48701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48702     cygwin_help $MISSING_DEPENDENCY
48703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48704     msys_help $MISSING_DEPENDENCY
48705   else
48706     PKGHANDLER_COMMAND=
48707 
48708     case $PKGHANDLER in
48709       apt-get)
48710         apt_help     $MISSING_DEPENDENCY ;;
48711       yum)
48712         yum_help     $MISSING_DEPENDENCY ;;
48713       port)
48714         port_help    $MISSING_DEPENDENCY ;;
48715       pkgutil)
48716         pkgutil_help $MISSING_DEPENDENCY ;;
48717       pkgadd)
48718         pkgadd_help  $MISSING_DEPENDENCY ;;
48719     esac
48720 
48721     if test "x$PKGHANDLER_COMMAND" != x; then
48722       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48723     fi
48724   fi
48725 
48726       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48727 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48728     elif test "x$COMPILE_TYPE" = xcross; then
48729       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48730 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48731     fi
48732     as_fn_error $? "Cannot continue." "$LINENO" 5
48733 
48734 fi
48735 
48736 done
48737 
48738 
48739   # The cast to long int works around a bug in the HP C Compiler
48740 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48741 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48742 # This bug is HP SR number 8606223364.
48743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48744 $as_echo_n "checking size of int *... " >&6; }
48745 if ${ac_cv_sizeof_int_p+:} false; then :
48746   $as_echo_n "(cached) " >&6
48747 else
48748   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48749 
48750 else
48751   if test "$ac_cv_type_int_p" = yes; then
48752      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48753 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48754 as_fn_error 77 "cannot compute sizeof (int *)
48755 See \`config.log' for more details" "$LINENO" 5; }
48756    else
48757      ac_cv_sizeof_int_p=0
48758    fi
48759 fi
48760 
48761 fi
48762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48763 $as_echo "$ac_cv_sizeof_int_p" >&6; }
48764 
48765 
48766 
48767 cat >>confdefs.h <<_ACEOF
48768 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
48769 _ACEOF
48770 
48771 
48772 
48773   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48774   if test "x$ac_cv_sizeof_int_p" = x; then
48775     # The test failed, lets stick to the assumed value.
48776     { $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
48777 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48778   else
48779     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48780 
48781     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48782       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48783       # Let's try to implicitely set the compilers target architecture and retry the test
48784       { $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
48785 $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;}
48786       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48787 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48788 
48789   # When we add flags to the "official" CFLAGS etc, we need to
48790   # keep track of these additions in ADDED_CFLAGS etc. These
48791   # will later be checked to make sure only controlled additions
48792   # have been made to CFLAGS etc.
48793   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48794   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48795   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48796 
48797   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48798   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48799   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48800 
48801   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48802   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48803   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48804 
48805   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48806   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48807   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48808 
48809 
48810       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48811       unset ac_cv_sizeof_int_p
48812       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48813       cat >>confdefs.h <<_ACEOF
48814 #undef SIZEOF_INT_P
48815 _ACEOF
48816 
48817       # The cast to long int works around a bug in the HP C Compiler
48818 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48819 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48820 # This bug is HP SR number 8606223364.
48821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48822 $as_echo_n "checking size of int *... " >&6; }
48823 if ${ac_cv_sizeof_int_p+:} false; then :
48824   $as_echo_n "(cached) " >&6
48825 else
48826   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48827 
48828 else
48829   if test "$ac_cv_type_int_p" = yes; then
48830      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48831 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48832 as_fn_error 77 "cannot compute sizeof (int *)
48833 See \`config.log' for more details" "$LINENO" 5; }
48834    else
48835      ac_cv_sizeof_int_p=0
48836    fi
48837 fi
48838 
48839 fi
48840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48841 $as_echo "$ac_cv_sizeof_int_p" >&6; }
48842 
48843 
48844 
48845 cat >>confdefs.h <<_ACEOF
48846 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
48847 _ACEOF
48848 
48849 
48850 
48851       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48852 
48853       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48854         { $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
48855 $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;}
48856         if test "x$COMPILE_TYPE" = xreduced; then
48857 
48858   # Print a helpful message on how to acquire the necessary build dependency.
48859   # reduced is the help tag: freetype, cups, alsa etc
48860   MISSING_DEPENDENCY=reduced
48861 
48862   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48863     cygwin_help $MISSING_DEPENDENCY
48864   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48865     msys_help $MISSING_DEPENDENCY
48866   else
48867     PKGHANDLER_COMMAND=
48868 
48869     case $PKGHANDLER in
48870       apt-get)
48871         apt_help     $MISSING_DEPENDENCY ;;
48872       yum)
48873         yum_help     $MISSING_DEPENDENCY ;;
48874       port)
48875         port_help    $MISSING_DEPENDENCY ;;
48876       pkgutil)
48877         pkgutil_help $MISSING_DEPENDENCY ;;
48878       pkgadd)
48879         pkgadd_help  $MISSING_DEPENDENCY ;;
48880     esac
48881 
48882     if test "x$PKGHANDLER_COMMAND" != x; then
48883       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48884     fi
48885   fi
48886 
48887           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48888 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48889         elif test "x$COMPILE_TYPE" = xcross; then
48890           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48891 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48892         fi
48893         as_fn_error $? "Cannot continue." "$LINENO" 5
48894       fi
48895     fi
48896   fi
48897 
48898   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48899 $as_echo_n "checking for target address size... " >&6; }
48900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48901 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48902 
48903 
48904   ###############################################################################
48905   #
48906   # Is the target little of big endian?
48907   #
48908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48909 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48910 if ${ac_cv_c_bigendian+:} false; then :
48911   $as_echo_n "(cached) " >&6
48912 else
48913   ac_cv_c_bigendian=unknown
48914     # See if we're dealing with a universal compiler.
48915     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48916 /* end confdefs.h.  */
48917 #ifndef __APPLE_CC__
48918                not a universal capable compiler
48919              #endif
48920              typedef int dummy;
48921 
48922 _ACEOF
48923 if ac_fn_cxx_try_compile "$LINENO"; then :
48924 
48925         # Check for potential -arch flags.  It is not universal unless
48926         # there are at least two -arch flags with different values.
48927         ac_arch=
48928         ac_prev=
48929         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48930          if test -n "$ac_prev"; then
48931            case $ac_word in
48932              i?86 | x86_64 | ppc | ppc64)
48933                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48934                  ac_arch=$ac_word
48935                else
48936                  ac_cv_c_bigendian=universal
48937                  break
48938                fi
48939                ;;
48940            esac
48941            ac_prev=
48942          elif test "x$ac_word" = "x-arch"; then
48943            ac_prev=arch
48944          fi
48945        done
48946 fi
48947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48948     if test $ac_cv_c_bigendian = unknown; then
48949       # See if sys/param.h defines the BYTE_ORDER macro.
48950       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48951 /* end confdefs.h.  */
48952 #include <sys/types.h>
48953              #include <sys/param.h>
48954 
48955 int
48956 main ()
48957 {
48958 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48959                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48960                      && LITTLE_ENDIAN)
48961               bogus endian macros
48962              #endif
48963 
48964   ;
48965   return 0;
48966 }
48967 _ACEOF
48968 if ac_fn_cxx_try_compile "$LINENO"; then :
48969   # It does; now see whether it defined to BIG_ENDIAN or not.
48970          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48971 /* end confdefs.h.  */
48972 #include <sys/types.h>
48973                 #include <sys/param.h>
48974 
48975 int
48976 main ()
48977 {
48978 #if BYTE_ORDER != BIG_ENDIAN
48979                  not big endian
48980                 #endif
48981 
48982   ;
48983   return 0;
48984 }
48985 _ACEOF
48986 if ac_fn_cxx_try_compile "$LINENO"; then :
48987   ac_cv_c_bigendian=yes
48988 else
48989   ac_cv_c_bigendian=no
48990 fi
48991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48992 fi
48993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48994     fi
48995     if test $ac_cv_c_bigendian = unknown; then
48996       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48997       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48998 /* end confdefs.h.  */
48999 #include <limits.h>
49000 
49001 int
49002 main ()
49003 {
49004 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
49005               bogus endian macros
49006              #endif
49007 
49008   ;
49009   return 0;
49010 }
49011 _ACEOF
49012 if ac_fn_cxx_try_compile "$LINENO"; then :
49013   # It does; now see whether it defined to _BIG_ENDIAN or not.
49014          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49015 /* end confdefs.h.  */
49016 #include <limits.h>
49017 
49018 int
49019 main ()
49020 {
49021 #ifndef _BIG_ENDIAN
49022                  not big endian
49023                 #endif
49024 
49025   ;
49026   return 0;
49027 }
49028 _ACEOF
49029 if ac_fn_cxx_try_compile "$LINENO"; then :
49030   ac_cv_c_bigendian=yes
49031 else
49032   ac_cv_c_bigendian=no
49033 fi
49034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49035 fi
49036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49037     fi
49038     if test $ac_cv_c_bigendian = unknown; then
49039       # Compile a test program.
49040       if test "$cross_compiling" = yes; then :
49041   # Try to guess by grepping values from an object file.
49042          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49043 /* end confdefs.h.  */
49044 short int ascii_mm[] =
49045                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
49046                 short int ascii_ii[] =
49047                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
49048                 int use_ascii (int i) {
49049                   return ascii_mm[i] + ascii_ii[i];
49050                 }
49051                 short int ebcdic_ii[] =
49052                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
49053                 short int ebcdic_mm[] =
49054                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
49055                 int use_ebcdic (int i) {
49056                   return ebcdic_mm[i] + ebcdic_ii[i];
49057                 }
49058                 extern int foo;
49059 
49060 int
49061 main ()
49062 {
49063 return use_ascii (foo) == use_ebcdic (foo);
49064   ;
49065   return 0;
49066 }
49067 _ACEOF
49068 if ac_fn_cxx_try_compile "$LINENO"; then :
49069   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49070               ac_cv_c_bigendian=yes
49071             fi
49072             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49073               if test "$ac_cv_c_bigendian" = unknown; then
49074                 ac_cv_c_bigendian=no
49075               else
49076                 # finding both strings is unlikely to happen, but who knows?
49077                 ac_cv_c_bigendian=unknown
49078               fi
49079             fi
49080 fi
49081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49082 else
49083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49084 /* end confdefs.h.  */
49085 $ac_includes_default
49086 int
49087 main ()
49088 {
49089 
49090              /* Are we little or big endian?  From Harbison&Steele.  */
49091              union
49092              {
49093                long int l;
49094                char c[sizeof (long int)];
49095              } u;
49096              u.l = 1;
49097              return u.c[sizeof (long int) - 1] == 1;
49098 
49099   ;
49100   return 0;
49101 }
49102 _ACEOF
49103 if ac_fn_cxx_try_run "$LINENO"; then :
49104   ac_cv_c_bigendian=no
49105 else
49106   ac_cv_c_bigendian=yes
49107 fi
49108 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49109   conftest.$ac_objext conftest.beam conftest.$ac_ext
49110 fi
49111 
49112     fi
49113 fi
49114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49115 $as_echo "$ac_cv_c_bigendian" >&6; }
49116  case $ac_cv_c_bigendian in #(
49117    yes)
49118      ENDIAN="big";; #(
49119    no)
49120      ENDIAN="little" ;; #(
49121    universal)
49122      ENDIAN="universal_endianness"
49123      ;; #(
49124    *)
49125      ENDIAN="unknown" ;;
49126  esac
49127 
49128 
49129   if test "x$ENDIAN" = xuniversal_endianness; then
49130     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49131   fi
49132   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49133     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
49134   fi
49135 
49136 
49137 # Configure flags for the tools
49138 
49139   ###############################################################################
49140   #
49141   # How to compile shared libraries.
49142   #
49143 
49144   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49145     PICFLAG="-fPIC"
49146     C_FLAG_REORDER=''
49147     CXX_FLAG_REORDER=''
49148 
49149     if test "x$TOOLCHAIN_NAME" = xxcode; then
49150       # Linking is different on MacOSX
49151       if test "x$STATIC_BUILD" = xtrue; then
49152         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49153       else
49154         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49155         JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49156       fi
49157       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49158       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49159       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49160       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49161     else
49162       # Default works for linux, might work on other platforms as well.
49163       SHARED_LIBRARY_FLAGS='-shared'
49164       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49165       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49166       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49167       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49168     fi
49169   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49170     C_FLAG_REORDER=''
49171     CXX_FLAG_REORDER=''
49172 
49173     if test "x$TOOLCHAIN_NAME" = xxcode; then
49174       # Linking is different on MacOSX
49175       PICFLAG=''
49176       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49177       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49178       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49179       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49180       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49181 
49182       if test "x$STATIC_BUILD" = xfalse; then
49183         JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49184       fi
49185     else
49186       # Default works for linux, might work on other platforms as well.
49187       PICFLAG='-fPIC'
49188       SHARED_LIBRARY_FLAGS='-shared'
49189       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49190       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49191       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49192       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49193     fi
49194   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49195     PICFLAG="-KPIC"
49196     C_FLAG_REORDER='-xF'
49197     CXX_FLAG_REORDER='-xF'
49198     SHARED_LIBRARY_FLAGS="-G"
49199     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
49200     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49201     SET_SHARED_LIBRARY_NAME='-h $1'
49202     SET_SHARED_LIBRARY_MAPFILE='-M$1'
49203   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49204     # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49205     # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49206     # will have to patch this single instruction with a call to some out-of-order code which
49207     # does the load from the TOC. This is of course slow. But in that case we also would have
49208     # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49209     # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49210     # can be patched directly by the linker and does not require a jump to out-of-order code.
49211     # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49212     # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49213     # loads for accessing a global variable). But there are rumors that this may be seen as a
49214     # 'performance feature' because of improved code locality of the symbols used in a
49215     # compilation unit.
49216     PICFLAG="-qpic"
49217     JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49218     C_FLAG_REORDER=''
49219     CXX_FLAG_REORDER=''
49220     SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49221     SET_EXECUTABLE_ORIGIN=""
49222     SET_SHARED_LIBRARY_ORIGIN=''
49223     SET_SHARED_LIBRARY_NAME=''
49224     SET_SHARED_LIBRARY_MAPFILE=''
49225   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49226     PICFLAG=""
49227     C_FLAG_REORDER=''
49228     CXX_FLAG_REORDER=''
49229     SHARED_LIBRARY_FLAGS="-dll"
49230     SET_EXECUTABLE_ORIGIN=''
49231     SET_SHARED_LIBRARY_ORIGIN=''
49232     SET_SHARED_LIBRARY_NAME=''
49233     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49234   fi
49235   BUILD_SET_EXECUTABLE_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49236   BUILD_SET_SHARED_LIBRARY_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
49237   if test "x$OPENJDK_TARGET_OS" = xandroid; then
49238     SET_EXECUTABLE_ORIGIN=
49239     SET_SHARED_LIBRARY_ORIGIN=
49240   fi
49241 
49242 
49243 
49244 
49245 
49246 
49247 
49248 
49249 
49250 
49251   # The (cross) compiler is now configured, we can now test capabilities
49252   # of the target platform.
49253 
49254 
49255 
49256   ###############################################################################
49257   #
49258   # Setup the opt flags for different compilers
49259   # and different operating systems.
49260   #
49261 
49262   # FIXME: this was indirectly the old default, but just inherited.
49263   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49264   #   C_FLAG_DEPS="-MMD -MF"
49265   # fi
49266 
49267   # Generate make dependency files
49268   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49269     C_FLAG_DEPS="-MMD -MF"
49270   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49271     C_FLAG_DEPS="-MMD -MF"
49272   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49273     C_FLAG_DEPS="-xMMD -xMF"
49274   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49275     C_FLAG_DEPS="-qmakedep=gcc -MF"
49276   fi
49277   CXX_FLAG_DEPS="$C_FLAG_DEPS"
49278 
49279 
49280 
49281   # Debug symbols
49282   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49283     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49284       # reduce from default "-g2" option to save space
49285       CFLAGS_DEBUG_SYMBOLS="-g1"
49286       CXXFLAGS_DEBUG_SYMBOLS="-g1"
49287     else
49288       CFLAGS_DEBUG_SYMBOLS="-g"
49289       CXXFLAGS_DEBUG_SYMBOLS="-g"
49290     fi
49291   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49292     CFLAGS_DEBUG_SYMBOLS="-g"
49293     CXXFLAGS_DEBUG_SYMBOLS="-g"
49294   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49295     CFLAGS_DEBUG_SYMBOLS="-g -xs"
49296     # -g0 enables debug symbols without disabling inlining.
49297     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49298   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49299     CFLAGS_DEBUG_SYMBOLS="-g"
49300     CXXFLAGS_DEBUG_SYMBOLS="-g"
49301   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49302     CFLAGS_DEBUG_SYMBOLS="-Zi"
49303     CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49304   fi
49305 
49306 
49307 
49308   # Debug symbols for JVM_CFLAGS
49309   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49310     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49311     if test "x$DEBUG_LEVEL" = xslowdebug; then
49312       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49313     else
49314       # -g0 does not disable inlining, which -g does.
49315       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49316     fi
49317   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49318     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49319   else
49320     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49321   fi
49322 
49323 
49324   # bounds, memory and behavior checking options
49325   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49326     case $DEBUG_LEVEL in
49327     release )
49328       # no adjustment
49329       ;;
49330     fastdebug )
49331       # no adjustment
49332       ;;
49333     slowdebug )
49334       # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49335       # get's added conditionally on whether we produce debug symbols or not.
49336       # This is most likely not really correct.
49337 
49338       # Add runtime stack smashing and undefined behavior checks.
49339       # Not all versions of gcc support -fstack-protector
49340       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49341 
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     # Execute function body
49384 
49385 
49386 
49387 
49388 
49389 
49390 
49391 
49392 
49393 
49394 
49395 
49396 
49397 
49398 
49399 
49400 
49401 
49402 
49403 
49404 
49405 
49406 
49407 
49408 
49409 
49410 
49411 
49412 
49413 
49414 
49415 
49416 
49417 
49418 
49419 
49420 
49421 
49422 
49423 
49424 
49425 
49426 
49427 
49428 
49429 
49430 
49431 
49432     # Execute function body
49433 
49434   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49435 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49436   supports=yes
49437 
49438   saved_cflags="$CFLAGS"
49439   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49440   ac_ext=c
49441 ac_cpp='$CPP $CPPFLAGS'
49442 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49443 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49444 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49445 
49446   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49447 /* end confdefs.h.  */
49448 int i;
49449 _ACEOF
49450 if ac_fn_c_try_compile "$LINENO"; then :
49451 
49452 else
49453   supports=no
49454 fi
49455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49456   ac_ext=cpp
49457 ac_cpp='$CXXCPP $CPPFLAGS'
49458 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49459 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49460 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49461 
49462   CFLAGS="$saved_cflags"
49463 
49464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49465 $as_echo "$supports" >&6; }
49466   if test "x$supports" = "xyes" ; then
49467     :
49468     C_COMP_SUPPORTS="yes"
49469   else
49470     :
49471     C_COMP_SUPPORTS="no"
49472   fi
49473 
49474 
49475 
49476 
49477 
49478 
49479 
49480 
49481 
49482 
49483 
49484 
49485 
49486 
49487 
49488 
49489 
49490 
49491 
49492 
49493 
49494 
49495 
49496 
49497 
49498 
49499 
49500 
49501 
49502 
49503 
49504 
49505 
49506 
49507 
49508 
49509 
49510 
49511 
49512 
49513 
49514 
49515 
49516 
49517 
49518 
49519 
49520 
49521 
49522 
49523 
49524 
49525 
49526 
49527 
49528 
49529 
49530 
49531 
49532     # Execute function body
49533 
49534   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49535 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49536   supports=yes
49537 
49538   saved_cxxflags="$CXXFLAGS"
49539   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49540   ac_ext=cpp
49541 ac_cpp='$CXXCPP $CPPFLAGS'
49542 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49543 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49544 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49545 
49546   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49547 /* end confdefs.h.  */
49548 int i;
49549 _ACEOF
49550 if ac_fn_cxx_try_compile "$LINENO"; then :
49551 
49552 else
49553   supports=no
49554 fi
49555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49556   ac_ext=cpp
49557 ac_cpp='$CXXCPP $CPPFLAGS'
49558 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49559 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49560 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49561 
49562   CXXFLAGS="$saved_cxxflags"
49563 
49564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49565 $as_echo "$supports" >&6; }
49566   if test "x$supports" = "xyes" ; then
49567     :
49568     CXX_COMP_SUPPORTS="yes"
49569   else
49570     :
49571     CXX_COMP_SUPPORTS="no"
49572   fi
49573 
49574 
49575 
49576 
49577 
49578 
49579 
49580 
49581 
49582 
49583 
49584 
49585 
49586   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49587 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49588   supports=no
49589   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49590 
49591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49592 $as_echo "$supports" >&6; }
49593   if test "x$supports" = "xyes" ; then
49594     :
49595 
49596   else
49597     :
49598     STACK_PROTECTOR_CFLAG=""
49599   fi
49600 
49601 
49602 
49603 
49604 
49605 
49606 
49607       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49608       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49609       if test "x$STACK_PROTECTOR_CFLAG" != x; then
49610         JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49611       fi
49612       ;;
49613     esac
49614   fi
49615 
49616   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49617     if test "x$DEBUG_LEVEL" != xrelease; then
49618       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49619         JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49620       fi
49621     fi
49622   fi
49623 
49624   # Optimization levels
49625   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49626     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49627 
49628     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49629       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49630       C_O_FLAG_HIGHEST_JVM="-xO4"
49631       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49632       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49633       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49634       C_O_FLAG_DEBUG="-xregs=no%frameptr"
49635       C_O_FLAG_DEBUG_JVM=""
49636       C_O_FLAG_NONE="-xregs=no%frameptr"
49637       CXX_O_FLAG_HIGHEST_JVM="-xO4"
49638       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49639       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49640       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49641       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49642       CXX_O_FLAG_DEBUG_JVM=""
49643       CXX_O_FLAG_NONE="-xregs=no%frameptr"
49644       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49645         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49646         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49647       fi
49648     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49649       C_O_FLAG_HIGHEST_JVM="-xO4"
49650       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49651       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49652       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49653       C_O_FLAG_DEBUG=""
49654       C_O_FLAG_DEBUG_JVM=""
49655       C_O_FLAG_NONE=""
49656       CXX_O_FLAG_HIGHEST_JVM="-xO4"
49657       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49658       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49659       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49660       CXX_O_FLAG_DEBUG=""
49661       CXX_O_FLAG_DEBUG_JVM=""
49662       CXX_O_FLAG_NONE=""
49663     fi
49664   else
49665     # The remaining toolchains share opt flags between CC and CXX;
49666     # setup for C and duplicate afterwards.
49667     if test "x$TOOLCHAIN_TYPE" = xgcc; then
49668       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49669         # On MacOSX we optimize for size, something
49670         # we should do for all platforms?
49671         C_O_FLAG_HIGHEST_JVM="-Os"
49672         C_O_FLAG_HIGHEST="-Os"
49673         C_O_FLAG_HI="-Os"
49674         C_O_FLAG_NORM="-Os"
49675         C_O_FLAG_SIZE="-Os"
49676       else
49677         C_O_FLAG_HIGHEST_JVM="-O3"
49678         C_O_FLAG_HIGHEST="-O3"
49679         C_O_FLAG_HI="-O3"
49680         C_O_FLAG_NORM="-O2"
49681         C_O_FLAG_SIZE="-Os"
49682       fi
49683       C_O_FLAG_DEBUG="-O0"
49684       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49685         C_O_FLAG_DEBUG_JVM=""
49686       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49687         C_O_FLAG_DEBUG_JVM="-O0"
49688       fi
49689       C_O_FLAG_NONE="-O0"
49690     elif test "x$TOOLCHAIN_TYPE" = xclang; then
49691       if test "x$TOOLCHAIN_NAME" = xxcode; then
49692         # On MacOSX we optimize for size, something
49693         # we should do for all platforms?
49694         C_O_FLAG_HIGHEST_JVM="-Os"
49695         C_O_FLAG_HIGHEST="-Os"
49696         C_O_FLAG_HI="-Os"
49697         C_O_FLAG_NORM="-Os"
49698         C_O_FLAG_SIZE="-Os"
49699       else
49700         C_O_FLAG_HIGHEST_JVM="-O3"
49701         C_O_FLAG_HIGHEST="-O3"
49702         C_O_FLAG_HI="-O3"
49703         C_O_FLAG_NORM="-O2"
49704         C_O_FLAG_SIZE="-Os"
49705       fi
49706       C_O_FLAG_DEBUG="-O0"
49707       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49708         C_O_FLAG_DEBUG_JVM=""
49709       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49710         C_O_FLAG_DEBUG_JVM="-O0"
49711       fi
49712       C_O_FLAG_NONE="-O0"
49713     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49714       C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49715       C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49716       C_O_FLAG_HI="-O3 -qinline -qinlglue"
49717       C_O_FLAG_NORM="-O2"
49718       C_O_FLAG_DEBUG="-qnoopt"
49719       # FIXME: Value below not verified.
49720       C_O_FLAG_DEBUG_JVM=""
49721       C_O_FLAG_NONE="-qnoopt"
49722     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49723       C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49724       C_O_FLAG_HIGHEST="-O2"
49725       C_O_FLAG_HI="-O1"
49726       C_O_FLAG_NORM="-O1"
49727       C_O_FLAG_DEBUG="-Od"
49728       C_O_FLAG_DEBUG_JVM=""
49729       C_O_FLAG_NONE="-Od"
49730       C_O_FLAG_SIZE="-Os"
49731     fi
49732     CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49733     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49734     CXX_O_FLAG_HI="$C_O_FLAG_HI"
49735     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49736     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49737     CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49738     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49739     CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49740   fi
49741 
49742   # Adjust optimization flags according to debug level.
49743   case $DEBUG_LEVEL in
49744     release )
49745       # no adjustment
49746       ;;
49747     fastdebug )
49748       # Not quite so much optimization
49749       C_O_FLAG_HI="$C_O_FLAG_NORM"
49750       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49751       ;;
49752     slowdebug )
49753       # Disable optimization
49754       C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49755       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49756       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49757       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49758       C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49759       CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49760       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49761       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49762       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49763       CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49764       ;;
49765   esac
49766 
49767 
49768 
49769 
49770 
49771 
49772 
49773 
49774 
49775 
49776 
49777 
49778 
49779 
49780 
49781 
49782 
49783 
49784 
49785   # Special extras...
49786   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49787     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49788       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49789       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49790     fi
49791     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49792     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49793   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49794     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49795     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49796   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49797     CXXSTD_CXXFLAG="-std=gnu++98"
49798 
49799 
49800 
49801 
49802 
49803 
49804 
49805 
49806 
49807 
49808 
49809 
49810 
49811 
49812 
49813 
49814 
49815 
49816 
49817 
49818 
49819 
49820 
49821 
49822 
49823 
49824 
49825 
49826 
49827 
49828 
49829 
49830 
49831 
49832 
49833 
49834 
49835 
49836 
49837 
49838 
49839 
49840     # Execute function body
49841 
49842   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49843 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49844   supports=yes
49845 
49846   saved_cxxflags="$CXXFLAGS"
49847   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49848   ac_ext=cpp
49849 ac_cpp='$CXXCPP $CPPFLAGS'
49850 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49851 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49852 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49853 
49854   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49855 /* end confdefs.h.  */
49856 int i;
49857 _ACEOF
49858 if ac_fn_cxx_try_compile "$LINENO"; then :
49859 
49860 else
49861   supports=no
49862 fi
49863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49864   ac_ext=cpp
49865 ac_cpp='$CXXCPP $CPPFLAGS'
49866 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49867 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49868 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49869 
49870   CXXFLAGS="$saved_cxxflags"
49871 
49872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49873 $as_echo "$supports" >&6; }
49874   if test "x$supports" = "xyes" ; then
49875     :
49876 
49877   else
49878     :
49879     CXXSTD_CXXFLAG=""
49880   fi
49881 
49882 
49883 
49884 
49885 
49886 
49887 
49888 
49889 
49890 
49891 
49892 
49893     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49894     JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49895 
49896   fi
49897   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49898     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49899     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49900   fi
49901 
49902   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49903     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49904     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49905   fi
49906 
49907   CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49908   CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49909   LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49910 
49911   ###############################################################################
49912   #
49913   # Now setup the CFLAGS and LDFLAGS for the JDK build.
49914   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49915   #
49916 
49917   # Setup compiler/platform specific flags into
49918   #    CFLAGS_JDK    - C Compiler flags
49919   #    CXXFLAGS_JDK  - C++ Compiler flags
49920   #    COMMON_CCXXFLAGS_JDK - common to C and C++
49921   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49922     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49923     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49924     JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49925     if test "x$OPENJDK_TARGET_CPU" = xx86; then
49926       # Force compatibility with i586 on 32 bit intel platforms.
49927       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49928       JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49929     fi
49930     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49931         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49932     case $OPENJDK_TARGET_CPU_ARCH in
49933       arm )
49934         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49935         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49936         ;;
49937       ppc )
49938         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49939         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49940         ;;
49941       * )
49942         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49943         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49944         ;;
49945     esac
49946 
49947 
49948 
49949 
49950 
49951 
49952 
49953 
49954 
49955 
49956 
49957 
49958 
49959 
49960 
49961 
49962 
49963 
49964 
49965 
49966 
49967 
49968 
49969 
49970 
49971 
49972 
49973 
49974 
49975 
49976 
49977 
49978 
49979 
49980 
49981 
49982 
49983 
49984 
49985 
49986 
49987 
49988 
49989 
49990 
49991 
49992 
49993 
49994 
49995 
49996 
49997 
49998 
49999 
50000     # Execute function body
50001 
50002   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50003   REFERENCE_VERSION=6
50004 
50005   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50006     as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50007   fi
50008 
50009   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50010     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50011   fi
50012 
50013   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50014   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50015 
50016   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50017     :
50018 
50019   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50020   # runs afoul of the more aggressive versions of these optimisations.
50021   # Notably, value range propagation now assumes that the this pointer of C++
50022   # member functions is non-null.
50023   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50024         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50025         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50026 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50027   CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50028   JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50029 
50030   else
50031     :
50032 
50033   fi
50034 
50035 
50036 
50037 
50038 
50039 
50040 
50041 
50042 
50043 
50044 
50045 
50046 
50047 
50048   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50049     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50050 
50051     # Restrict the debug information created by Clang to avoid
50052     # too big object files and speed the build up a little bit
50053     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50054     JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50055     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50056       if test "x$OPENJDK_TARGET_CPU" = xx86; then
50057         # Force compatibility with i586 on 32 bit intel platforms.
50058         COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50059         JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50060       fi
50061       JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50062       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50063           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50064       case $OPENJDK_TARGET_CPU_ARCH in
50065         ppc )
50066           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50067           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50068           ;;
50069         * )
50070           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50071           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50072           ;;
50073       esac
50074     fi
50075   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50076     JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50077     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50078     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50079       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50080     fi
50081 
50082     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50083     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50084   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50085     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50086     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50087     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50088   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50089     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50090         -MD -Zc:wchar_t- -W3 -wd4800 \
50091         -DWIN32_LEAN_AND_MEAN \
50092         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50093         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50094         -DWIN32 -DIAL"
50095     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50096       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50097     else
50098       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50099     fi
50100     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50101     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50102     # studio.
50103     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50104       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50105       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50106       JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50107     fi
50108   fi
50109 
50110   ###############################################################################
50111 
50112   # Adjust flags according to debug level.
50113   case $DEBUG_LEVEL in
50114     fastdebug | slowdebug )
50115       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50116       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50117       JAVAC_FLAGS="$JAVAC_FLAGS -g"
50118       ;;
50119     release )
50120       ;;
50121     * )
50122       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50123       ;;
50124   esac
50125 
50126   # Set some common defines. These works for all compilers, but assume
50127   # -D is universally accepted.
50128 
50129   # Setup endianness
50130   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50131     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50132     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50133     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50134     #   Note: -Dmacro         is the same as    #define macro 1
50135     #         -Dmacro=        is the same as    #define macro
50136     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50137       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50138     else
50139       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50140     fi
50141   else
50142     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50143     # are defined in the system?
50144     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50145       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50146     else
50147       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50148     fi
50149   fi
50150 
50151   # Setup target OS define. Use OS target name but in upper case.
50152   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50153   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50154 
50155   # Setup target CPU
50156   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50157       $OPENJDK_TARGET_ADD_LP64 \
50158       -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50159 
50160   # Setup debug/release defines
50161   if test "x$DEBUG_LEVEL" = xrelease; then
50162     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50163     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50164       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50165     fi
50166   else
50167     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50168   fi
50169 
50170   # Set some additional per-OS defines.
50171   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50172     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50173     JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50174         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50175   elif test "x$OPENJDK_TARGET_OS" = xandroid; then
50176     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50177     JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50178         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50179   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50180     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50181     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50182         -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50183   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50184     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50185     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50186     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50187     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50188         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50189         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50190         -fno-omit-frame-pointer"
50191   elif test "x$OPENJDK_TARGET_OS" = xios; then
50192     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50193     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50194     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50195     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50196         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50197         -fno-omit-frame-pointer"
50198     JVM_ASFLAGS="$JVM_ASFLAGS $EXTRA_CFLAGS"
50199   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50200     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50201     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50202     JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50203         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50204         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50205   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50206     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50207   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50208     JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50209     JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50210   fi
50211 
50212   # Set some additional per-CPU defines.
50213   if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50214     JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50215   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50216     JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50217   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50218     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50219       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50220       # fixes `relocation truncated to fit' error for gcc 4.1.
50221       JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50222       # Use ppc64 instructions, but schedule for power5
50223       JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50224     elif test "x$OPENJDK_TARGET_OS" = xaix; then
50225       JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50226     fi
50227   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50228     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50229       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50230       # Little endian machine uses ELFv2 ABI.
50231       JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50232       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50233       JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50234     fi
50235   fi
50236 
50237   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50238     JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50239   fi
50240 
50241   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50242     if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50243       # Solaris does not have _LP64=1 in the old build.
50244       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50245       JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50246     fi
50247   fi
50248 
50249   # Set JVM_CFLAGS warning handling
50250   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50251     JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50252         -Wunused-value -Woverloaded-virtual"
50253 
50254     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50255 
50256 
50257 
50258 
50259 
50260 
50261 
50262 
50263 
50264 
50265 
50266 
50267 
50268 
50269 
50270 
50271 
50272 
50273 
50274 
50275 
50276 
50277 
50278 
50279 
50280 
50281 
50282 
50283 
50284 
50285 
50286 
50287 
50288 
50289 
50290 
50291 
50292 
50293 
50294 
50295 
50296 
50297 
50298 
50299 
50300 
50301 
50302 
50303 
50304 
50305 
50306 
50307 
50308 
50309     # Execute function body
50310 
50311   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50312   REFERENCE_VERSION=4.8
50313 
50314   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50315     as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50316   fi
50317 
50318   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50319     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50320   fi
50321 
50322   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50323   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50324 
50325   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50326     :
50327 
50328             # These flags either do not work or give spurious warnings prior to gcc 4.8.
50329             JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50330 
50331 
50332   else
50333     :
50334 
50335   fi
50336 
50337 
50338 
50339 
50340 
50341 
50342 
50343 
50344 
50345 
50346 
50347 
50348 
50349 
50350     fi
50351     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50352       # Non-zero builds have stricter warnings
50353       JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50354     else
50355       if test "x$TOOLCHAIN_TYPE" = xclang; then
50356         # Some versions of llvm do not like -Wundef
50357         JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50358       fi
50359     fi
50360   elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = "xios"; then
50361     JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50362         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50363   fi
50364 
50365   # Additional macosx handling
50366   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50367     # Setting these parameters makes it an error to link to macosx APIs that are
50368     # newer than the given OS version and makes the linked binaries compatible
50369     # even if built on a newer version of the OS.
50370     # The expected format is X.Y.Z
50371     MACOSX_VERSION_MIN=10.7.0
50372 
50373 
50374     # The macro takes the version with no dots, ex: 1070
50375     # Let the flags variables get resolved in make for easier override on make
50376     # command line.
50377     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50378     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50379     JVM_ASFLAGS="$JVM_ASFLAGS -mmacosx-version-min=\$(MACOSX_VERSION_MIN) "
50380   fi
50381 
50382   # Setup some hard coded includes
50383   if test "x$OPENJDK_TARGET_OS" = xandroid ; then
50384     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50385         -I${JDK_TOPDIR}/src/java.base/linux/native/include -DLINUX"
50386   fi
50387 
50388   # Setup some hard coded includes
50389   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50390       -I${JDK_TOPDIR}/src/java.base/share/native/include \
50391       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50392       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50393       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50394       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50395 
50396   # The shared libraries are compiled using the picflag.
50397   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50398       $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50399   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50400       $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50401 
50402   # Executable flags
50403   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50404   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50405 
50406 
50407 
50408 
50409 
50410 
50411   # Setup LDFLAGS et al.
50412   #
50413 
50414   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50415     LDFLAGS_MICROSOFT="-nologo -opt:ref"
50416     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50417     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50418     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50419       LDFLAGS_SAFESH="-safeseh"
50420       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50421       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50422       # NOTE: Old build added -machine. Probably not needed.
50423       JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50424     else
50425       JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50426     fi
50427   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50428       JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50429       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50430         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50431         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50432     fi
50433   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50434     # If this is a --hash-style=gnu system, use --hash-style=both, why?
50435     # We have previously set HAS_GNU_HASH if this is the case
50436     if test -n "$HAS_GNU_HASH"; then
50437       LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50438       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50439       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50440     fi
50441       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50442         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50443     fi
50444     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xandroid ; then
50445       # And since we now know that the linker is gnu, then add -z defs, to forbid
50446       # undefined symbols in object files.
50447       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50448       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50449       JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50450       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50451       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50452       if test "x$OPENJDK_TARGET_CPU" = xx86; then
50453         JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50454       fi
50455       case $DEBUG_LEVEL in
50456         release )
50457           # tell linker to optimize libraries.
50458           # Should this be supplied to the OSS linker as well?
50459           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50460           LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50461           JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50462           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50463             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50464           fi
50465           ;;
50466         slowdebug )
50467           # Hotspot always let the linker optimize
50468           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50469           if test "x$HAS_LINKER_NOW" = "xtrue"; then
50470             # do relocations at load
50471             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50472             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50473             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50474           fi
50475           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50476             # mark relocations read only
50477             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50478             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50479             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50480           fi
50481           ;;
50482         fastdebug )
50483           # Hotspot always let the linker optimize
50484           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50485           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50486             # mark relocations read only
50487             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50488             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50489             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50490           fi
50491           ;;
50492         * )
50493           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50494           ;;
50495         esac
50496     fi
50497   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50498     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50499     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50500     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50501     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50502     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50503     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50504       JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50505     fi
50506   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50507     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50508     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50509     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50510   fi
50511 
50512   # Customize LDFLAGS for executables
50513 
50514   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50515 
50516   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50517     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50518       LDFLAGS_STACK_SIZE=1048576
50519     else
50520       LDFLAGS_STACK_SIZE=327680
50521     fi
50522     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50523   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50524     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50525   elif test "x$OPENJDK_TARGET_OS" = xandroid; then
50526     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined -pie"
50527   fi
50528 
50529   LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50530 
50531   # Customize LDFLAGS for libs
50532   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50533 
50534   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50535   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50536     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50537         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50538     JDKLIB_LIBS=""
50539   else
50540     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50541         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50542 
50543     if test "xTARGET" = "xTARGET"; then
50544     # On some platforms (mac) the linker warns about non existing -L dirs.
50545     # Add server first if available. Linking aginst client does not always produce the same results.
50546       # Only add client/minimal dir if client/minimal is being built.
50547     # Default to server for other variants.
50548       if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50549         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50550       elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50551         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50552       elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50553         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50554     else
50555         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50556     fi
50557     elif test "xTARGET" = "xBUILD"; then
50558       # When building a buildjdk, it's always only the server variant
50559       JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50560           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50561     fi
50562 
50563     JDKLIB_LIBS="-ljava -ljvm"
50564     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50565       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50566     fi
50567 
50568   fi
50569 
50570 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50571 
50572   # Set JVM_LIBS (per os)
50573   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50574     JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50575   elif test "x$OPENJDK_TARGET_OS" = xandroid; then
50576     JVM_LIBS="$JVM_LIBS -lm -llog"
50577   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50578     # FIXME: This hard-coded path is not really proper.
50579     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50580       SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50581     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50582       SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50583     fi
50584     JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50585         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50586   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50587     JVM_LIBS="$JVM_LIBS -lm"
50588   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50589     JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50590   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50591     JVM_LIBS="$JVM_LIBS -lm"
50592   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50593     JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50594         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50595         wsock32.lib winmm.lib version.lib psapi.lib"
50596     fi
50597 
50598   # Set JVM_ASFLAGS
50599   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50600     if test "x$OPENJDK_TARGET_CPU" = xx86; then
50601       JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50602     fi
50603   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50604     JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50605   fi
50606 
50607   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50608 
50609 
50610 
50611 
50612 
50613 
50614 
50615 
50616 
50617 
50618 
50619 
50620 
50621 
50622 
50623   # Special extras...
50624   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50625     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50626       OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50627       OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50628     fi
50629     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50630     OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50631   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50632     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50633     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50634   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50635     OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50636 
50637 
50638 
50639 
50640 
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     # Execute function body
50679 
50680   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50681 $as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50682   supports=yes
50683 
50684   saved_cxxflags="$CXXFLAGS"
50685   CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50686   ac_ext=cpp
50687 ac_cpp='$CXXCPP $CPPFLAGS'
50688 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50689 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50690 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50691 
50692   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50693 /* end confdefs.h.  */
50694 int i;
50695 _ACEOF
50696 if ac_fn_cxx_try_compile "$LINENO"; then :
50697 
50698 else
50699   supports=no
50700 fi
50701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50702   ac_ext=cpp
50703 ac_cpp='$CXXCPP $CPPFLAGS'
50704 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50705 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50706 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50707 
50708   CXXFLAGS="$saved_cxxflags"
50709 
50710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50711 $as_echo "$supports" >&6; }
50712   if test "x$supports" = "xyes" ; then
50713     :
50714 
50715   else
50716     :
50717     OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50718   fi
50719 
50720 
50721 
50722 
50723 
50724 
50725 
50726 
50727 
50728 
50729 
50730 
50731     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50732     OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50733 
50734   fi
50735   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50736     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50737     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50738   fi
50739 
50740   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50741     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50742     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50743   fi
50744 
50745   OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50746   OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50747   OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50748 
50749   ###############################################################################
50750   #
50751   # Now setup the CFLAGS and LDFLAGS for the JDK build.
50752   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50753   #
50754 
50755   # Setup compiler/platform specific flags into
50756   #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50757   #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50758   #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50759   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50760     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50761     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50762     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50763     if test "x$OPENJDK_BUILD_CPU" = xx86; then
50764       # Force compatibility with i586 on 32 bit intel platforms.
50765       OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50766       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50767     fi
50768     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50769         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50770     case $OPENJDK_BUILD_CPU_ARCH in
50771       arm )
50772         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50773         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50774         ;;
50775       ppc )
50776         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50777         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50778         ;;
50779       * )
50780         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50781         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50782         ;;
50783     esac
50784 
50785 
50786 
50787 
50788 
50789 
50790 
50791 
50792 
50793 
50794 
50795 
50796 
50797 
50798 
50799 
50800 
50801 
50802 
50803 
50804 
50805 
50806 
50807 
50808 
50809 
50810 
50811 
50812 
50813 
50814 
50815 
50816 
50817 
50818 
50819 
50820 
50821 
50822 
50823 
50824 
50825 
50826 
50827 
50828 
50829 
50830 
50831 
50832 
50833 
50834 
50835 
50836 
50837 
50838     # Execute function body
50839 
50840   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50841   REFERENCE_VERSION=6
50842 
50843   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50844     as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50845   fi
50846 
50847   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50848     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50849   fi
50850 
50851   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50852   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50853 
50854   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50855     :
50856 
50857   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50858   # runs afoul of the more aggressive versions of these optimisations.
50859   # Notably, value range propagation now assumes that the this pointer of C++
50860   # member functions is non-null.
50861   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50862         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50863         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50864 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50865   OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50866   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50867 
50868   else
50869     :
50870 
50871   fi
50872 
50873 
50874 
50875 
50876 
50877 
50878 
50879 
50880 
50881 
50882 
50883 
50884 
50885 
50886   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50887     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50888 
50889     # Restrict the debug information created by Clang to avoid
50890     # too big object files and speed the build up a little bit
50891     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50892     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50893     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50894       if test "x$OPENJDK_BUILD_CPU" = xx86; then
50895         # Force compatibility with i586 on 32 bit intel platforms.
50896         OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50897         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50898       fi
50899       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50900       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50901           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50902       case $OPENJDK_BUILD_CPU_ARCH in
50903         ppc )
50904           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50905           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50906           ;;
50907         * )
50908           OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50909           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50910           ;;
50911       esac
50912     fi
50913   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50914     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50915     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50916     if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50917       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50918     fi
50919 
50920     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50921     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50922   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50923     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50924     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50925     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50926   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50927     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50928         -MD -Zc:wchar_t- -W3 -wd4800 \
50929         -DWIN32_LEAN_AND_MEAN \
50930         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50931         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50932         -DWIN32 -DIAL"
50933     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50934       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50935     else
50936       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50937     fi
50938     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50939     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50940     # studio.
50941     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50942       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50943       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50944       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50945     fi
50946   fi
50947 
50948   ###############################################################################
50949 
50950   # Adjust flags according to debug level.
50951   case $DEBUG_LEVEL in
50952     fastdebug | slowdebug )
50953       OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50954       OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50955       JAVAC_FLAGS="$JAVAC_FLAGS -g"
50956       ;;
50957     release )
50958       ;;
50959     * )
50960       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50961       ;;
50962   esac
50963 
50964   # Set some common defines. These works for all compilers, but assume
50965   # -D is universally accepted.
50966 
50967   # Setup endianness
50968   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50969     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50970     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50971     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50972     #   Note: -Dmacro         is the same as    #define macro 1
50973     #         -Dmacro=        is the same as    #define macro
50974     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50975       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50976     else
50977       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50978     fi
50979   else
50980     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50981     # are defined in the system?
50982     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50983       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50984     else
50985       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50986     fi
50987   fi
50988 
50989   # Setup target OS define. Use OS target name but in upper case.
50990   OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50991   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50992 
50993   # Setup target CPU
50994   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50995       $OPENJDK_BUILD_ADD_LP64 \
50996       -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50997 
50998   # Setup debug/release defines
50999   if test "x$DEBUG_LEVEL" = xrelease; then
51000     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51001     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51002       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51003     fi
51004   else
51005     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51006   fi
51007 
51008   # Set some additional per-OS defines.
51009   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51010     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51011     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
51012         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51013   elif test "x$OPENJDK_BUILD_OS" = xandroid; then
51014     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51015     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
51016         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51017   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51018     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51019     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51020         -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
51021   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51022     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51023     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51024     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51025     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51026         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51027         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51028         -fno-omit-frame-pointer"
51029   elif test "x$OPENJDK_BUILD_OS" = xios; then
51030     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51031     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51032     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51033     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51034         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51035         -fno-omit-frame-pointer"
51036     OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS $EXTRA_CFLAGS"
51037   elif test "x$OPENJDK_BUILD_OS" = xaix; then
51038     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51039     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51040     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51041         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51042         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51043   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51044     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51045   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51046     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51047     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51048   fi
51049 
51050   # Set some additional per-CPU defines.
51051   if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51052     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51053   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51054     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51055   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51056     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51057       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51058       # fixes `relocation truncated to fit' error for gcc 4.1.
51059       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51060       # Use ppc64 instructions, but schedule for power5
51061       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51062     elif test "x$OPENJDK_BUILD_OS" = xaix; then
51063       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51064     fi
51065   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51066     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51067       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51068       # Little endian machine uses ELFv2 ABI.
51069       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51070       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51071       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
51072     fi
51073   fi
51074 
51075   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51076     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51077   fi
51078 
51079   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51080     if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51081       # Solaris does not have _LP64=1 in the old build.
51082       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51083       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51084     fi
51085   fi
51086 
51087   # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51088   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51089     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51090         -Wunused-value -Woverloaded-virtual"
51091 
51092     if test "x$TOOLCHAIN_TYPE" = xgcc; then
51093 
51094 
51095 
51096 
51097 
51098 
51099 
51100 
51101 
51102 
51103 
51104 
51105 
51106 
51107 
51108 
51109 
51110 
51111 
51112 
51113 
51114 
51115 
51116 
51117 
51118 
51119 
51120 
51121 
51122 
51123 
51124 
51125 
51126 
51127 
51128 
51129 
51130 
51131 
51132 
51133 
51134 
51135 
51136 
51137 
51138 
51139 
51140 
51141 
51142 
51143 
51144 
51145 
51146 
51147     # Execute function body
51148 
51149   # Need to assign to a variable since m4 is blocked from modifying parts in [].
51150   REFERENCE_VERSION=4.8
51151 
51152   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51153     as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51154   fi
51155 
51156   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51157     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51158   fi
51159 
51160   # Version comparison method inspired by http://stackoverflow.com/a/24067243
51161   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51162 
51163   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51164     :
51165 
51166             # These flags either do not work or give spurious warnings prior to gcc 4.8.
51167             OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51168 
51169 
51170   else
51171     :
51172 
51173   fi
51174 
51175 
51176 
51177 
51178 
51179 
51180 
51181 
51182 
51183 
51184 
51185 
51186 
51187 
51188     fi
51189     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51190       # Non-zero builds have stricter warnings
51191       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51192     else
51193       if test "x$TOOLCHAIN_TYPE" = xclang; then
51194         # Some versions of llvm do not like -Wundef
51195         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51196       fi
51197     fi
51198   elif test "x$OPENJDK_BUILD_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = "xios"; then
51199     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51200         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51201   fi
51202 
51203   # Additional macosx handling
51204   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51205     # Setting these parameters makes it an error to link to macosx APIs that are
51206     # newer than the given OS version and makes the linked binaries compatible
51207     # even if built on a newer version of the OS.
51208     # The expected format is X.Y.Z
51209     MACOSX_VERSION_MIN=10.7.0
51210 
51211 
51212     # The macro takes the version with no dots, ex: 1070
51213     # Let the flags variables get resolved in make for easier override on make
51214     # command line.
51215     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)"
51216     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51217     OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -mmacosx-version-min=\$(MACOSX_VERSION_MIN) "
51218   fi
51219 
51220   # Setup some hard coded includes
51221   if test "x$OPENJDK_BUILD_OS" = xandroid ; then
51222     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51223         -I${JDK_TOPDIR}/src/java.base/linux/native/include -DLINUX"
51224   fi
51225 
51226   # Setup some hard coded includes
51227   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51228       -I${JDK_TOPDIR}/src/java.base/share/native/include \
51229       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51230       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51231       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51232       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51233 
51234   # The shared libraries are compiled using the picflag.
51235   OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51236       $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51237   OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51238       $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51239 
51240   # Executable flags
51241   OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51242   OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51243 
51244 
51245 
51246 
51247 
51248 
51249   # Setup LDFLAGS et al.
51250   #
51251 
51252   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51253     LDFLAGS_MICROSOFT="-nologo -opt:ref"
51254     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51255     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51256     if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51257       LDFLAGS_SAFESH="-safeseh"
51258       OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51259       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51260       # NOTE: Old build added -machine. Probably not needed.
51261       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51262     else
51263       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51264     fi
51265   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51266       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51267       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51268         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51269         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51270     fi
51271   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51272     # If this is a --hash-style=gnu system, use --hash-style=both, why?
51273     # We have previously set HAS_GNU_HASH if this is the case
51274     if test -n "$HAS_GNU_HASH"; then
51275       OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51276       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51277       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51278     fi
51279       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51280         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51281     fi
51282     if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xandroid ; then
51283       # And since we now know that the linker is gnu, then add -z defs, to forbid
51284       # undefined symbols in object files.
51285       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51286       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51287       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51288       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51289       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51290       if test "x$OPENJDK_BUILD_CPU" = xx86; then
51291         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51292       fi
51293       case $DEBUG_LEVEL in
51294         release )
51295           # tell linker to optimize libraries.
51296           # Should this be supplied to the OSS linker as well?
51297           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51298           OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51299           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51300           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51301             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51302           fi
51303           ;;
51304         slowdebug )
51305           # Hotspot always let the linker optimize
51306           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51307           if test "x$HAS_LINKER_NOW" = "xtrue"; then
51308             # do relocations at load
51309             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51310             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51311             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51312           fi
51313           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51314             # mark relocations read only
51315             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51316             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51317             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51318           fi
51319           ;;
51320         fastdebug )
51321           # Hotspot always let the linker optimize
51322           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51323           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51324             # mark relocations read only
51325             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51326             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51327             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51328           fi
51329           ;;
51330         * )
51331           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51332           ;;
51333         esac
51334     fi
51335   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51336     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51337     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51338     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51339     OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51340     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51341     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51342       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51343     fi
51344   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51345     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51346     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51347     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51348   fi
51349 
51350   # Customize LDFLAGS for executables
51351 
51352   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51353 
51354   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51355     if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51356       LDFLAGS_STACK_SIZE=1048576
51357     else
51358       LDFLAGS_STACK_SIZE=327680
51359     fi
51360     OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51361   elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51362     OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51363   elif test "x$OPENJDK_BUILD_OS" = xandroid; then
51364     OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined -pie"
51365   fi
51366 
51367   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51368 
51369   # Customize LDFLAGS for libs
51370   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51371 
51372   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51373   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51374     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51375         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51376     OPENJDK_BUILD_JDKLIB_LIBS=""
51377   else
51378     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51379         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51380 
51381     if test "xBUILD" = "xTARGET"; then
51382     # On some platforms (mac) the linker warns about non existing -L dirs.
51383     # Add server first if available. Linking aginst client does not always produce the same results.
51384       # Only add client/minimal dir if client/minimal is being built.
51385     # Default to server for other variants.
51386       if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51387         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51388       elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51389         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51390       elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51391         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51392     else
51393         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51394     fi
51395     elif test "xBUILD" = "xBUILD"; then
51396       # When building a buildjdk, it's always only the server variant
51397       OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51398           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51399     fi
51400 
51401     OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51402     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51403       OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51404     fi
51405 
51406   fi
51407 
51408 OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51409 
51410   # Set OPENJDK_BUILD_JVM_LIBS (per os)
51411   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51412     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51413   elif test "x$OPENJDK_BUILD_OS" = xandroid; then
51414     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -llog"
51415   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51416     # FIXME: This hard-coded path is not really proper.
51417     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51418       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51419     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51420       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51421     fi
51422     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51423         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51424   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51425     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51426   elif test "x$OPENJDK_BUILD_OS" = xaix; then
51427     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51428   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51429     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51430   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51431     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51432         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51433         wsock32.lib winmm.lib version.lib psapi.lib"
51434     fi
51435 
51436   # Set OPENJDK_BUILD_JVM_ASFLAGS
51437   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51438     if test "x$OPENJDK_BUILD_CPU" = xx86; then
51439       OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51440     fi
51441   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51442     OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51443   fi
51444 
51445   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51446 
51447 
51448 
51449 
51450 
51451 
51452 
51453 
51454 
51455 
51456 
51457 
51458 
51459 
51460 
51461   # Tests are only ever compiled for TARGET
51462   # Flags for compiling test libraries
51463   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51464   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51465 
51466   # Flags for compiling test executables
51467   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51468   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51469 
51470 
51471 
51472 
51473 
51474 
51475   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51476   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51477 
51478 
51479 
51480 
51481 
51482 
51483   # Some Zero and Shark settings.
51484   # ZERO_ARCHFLAG tells the compiler which mode to build for
51485   case "${OPENJDK_TARGET_CPU}" in
51486     s390)
51487       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51488       ;;
51489     *)
51490       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51491   esac
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 
51521 
51522 
51523 
51524 
51525 
51526 
51527 
51528 
51529 
51530 
51531 
51532 
51533 
51534     # Execute function body
51535 
51536 
51537 
51538 
51539 
51540 
51541 
51542 
51543 
51544 
51545 
51546 
51547 
51548 
51549 
51550 
51551 
51552 
51553 
51554 
51555 
51556 
51557 
51558 
51559 
51560 
51561 
51562 
51563 
51564 
51565 
51566 
51567 
51568 
51569 
51570 
51571 
51572 
51573 
51574 
51575 
51576 
51577 
51578 
51579 
51580 
51581 
51582 
51583     # Execute function body
51584 
51585   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51586 $as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51587   supports=yes
51588 
51589   saved_cflags="$CFLAGS"
51590   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51591   ac_ext=c
51592 ac_cpp='$CPP $CPPFLAGS'
51593 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51594 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51595 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51596 
51597   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51598 /* end confdefs.h.  */
51599 int i;
51600 _ACEOF
51601 if ac_fn_c_try_compile "$LINENO"; then :
51602 
51603 else
51604   supports=no
51605 fi
51606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51607   ac_ext=cpp
51608 ac_cpp='$CXXCPP $CPPFLAGS'
51609 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51610 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51611 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51612 
51613   CFLAGS="$saved_cflags"
51614 
51615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51616 $as_echo "$supports" >&6; }
51617   if test "x$supports" = "xyes" ; then
51618     :
51619     C_COMP_SUPPORTS="yes"
51620   else
51621     :
51622     C_COMP_SUPPORTS="no"
51623   fi
51624 
51625 
51626 
51627 
51628 
51629 
51630 
51631 
51632 
51633 
51634 
51635 
51636 
51637 
51638 
51639 
51640 
51641 
51642 
51643 
51644 
51645 
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     # Execute function body
51684 
51685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51686 $as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51687   supports=yes
51688 
51689   saved_cxxflags="$CXXFLAGS"
51690   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51691   ac_ext=cpp
51692 ac_cpp='$CXXCPP $CPPFLAGS'
51693 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51694 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51695 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51696 
51697   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51698 /* end confdefs.h.  */
51699 int i;
51700 _ACEOF
51701 if ac_fn_cxx_try_compile "$LINENO"; then :
51702 
51703 else
51704   supports=no
51705 fi
51706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51707   ac_ext=cpp
51708 ac_cpp='$CXXCPP $CPPFLAGS'
51709 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51710 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51711 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51712 
51713   CXXFLAGS="$saved_cxxflags"
51714 
51715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51716 $as_echo "$supports" >&6; }
51717   if test "x$supports" = "xyes" ; then
51718     :
51719     CXX_COMP_SUPPORTS="yes"
51720   else
51721     :
51722     CXX_COMP_SUPPORTS="no"
51723   fi
51724 
51725 
51726 
51727 
51728 
51729 
51730 
51731 
51732 
51733 
51734 
51735 
51736 
51737   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51738 $as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51739   supports=no
51740   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51741 
51742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51743 $as_echo "$supports" >&6; }
51744   if test "x$supports" = "xyes" ; then
51745     :
51746 
51747   else
51748     :
51749     ZERO_ARCHFLAG=""
51750   fi
51751 
51752 
51753 
51754 
51755 
51756 
51757 
51758 
51759   # Check that the compiler supports -mX (or -qX on AIX) flags
51760   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
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 
51795 
51796 
51797 
51798 
51799 
51800 
51801 
51802 
51803 
51804 
51805 
51806 
51807 
51808     # Execute function body
51809 
51810 
51811 
51812 
51813 
51814 
51815 
51816 
51817 
51818 
51819 
51820 
51821 
51822 
51823 
51824 
51825 
51826 
51827 
51828 
51829 
51830 
51831 
51832 
51833 
51834 
51835 
51836 
51837 
51838 
51839 
51840 
51841 
51842 
51843 
51844 
51845 
51846 
51847 
51848 
51849 
51850 
51851 
51852 
51853 
51854 
51855 
51856 
51857     # Execute function body
51858 
51859   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51860 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51861   supports=yes
51862 
51863   saved_cflags="$CFLAGS"
51864   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51865   ac_ext=c
51866 ac_cpp='$CPP $CPPFLAGS'
51867 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51868 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51869 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51870 
51871   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51872 /* end confdefs.h.  */
51873 int i;
51874 _ACEOF
51875 if ac_fn_c_try_compile "$LINENO"; then :
51876 
51877 else
51878   supports=no
51879 fi
51880 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51881   ac_ext=cpp
51882 ac_cpp='$CXXCPP $CPPFLAGS'
51883 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51884 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51885 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51886 
51887   CFLAGS="$saved_cflags"
51888 
51889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51890 $as_echo "$supports" >&6; }
51891   if test "x$supports" = "xyes" ; then
51892     :
51893     C_COMP_SUPPORTS="yes"
51894   else
51895     :
51896     C_COMP_SUPPORTS="no"
51897   fi
51898 
51899 
51900 
51901 
51902 
51903 
51904 
51905 
51906 
51907 
51908 
51909 
51910 
51911 
51912 
51913 
51914 
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     # Execute function body
51958 
51959   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51960 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51961   supports=yes
51962 
51963   saved_cxxflags="$CXXFLAGS"
51964   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51965   ac_ext=cpp
51966 ac_cpp='$CXXCPP $CPPFLAGS'
51967 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51968 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51969 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51970 
51971   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51972 /* end confdefs.h.  */
51973 int i;
51974 _ACEOF
51975 if ac_fn_cxx_try_compile "$LINENO"; then :
51976 
51977 else
51978   supports=no
51979 fi
51980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51981   ac_ext=cpp
51982 ac_cpp='$CXXCPP $CPPFLAGS'
51983 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51984 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51985 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51986 
51987   CXXFLAGS="$saved_cxxflags"
51988 
51989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51990 $as_echo "$supports" >&6; }
51991   if test "x$supports" = "xyes" ; then
51992     :
51993     CXX_COMP_SUPPORTS="yes"
51994   else
51995     :
51996     CXX_COMP_SUPPORTS="no"
51997   fi
51998 
51999 
52000 
52001 
52002 
52003 
52004 
52005 
52006 
52007 
52008 
52009 
52010 
52011   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52012 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52013   supports=no
52014   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52015 
52016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52017 $as_echo "$supports" >&6; }
52018   if test "x$supports" = "xyes" ; then
52019     :
52020     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52021   else
52022     :
52023     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52024   fi
52025 
52026 
52027 
52028 
52029 
52030 
52031 
52032 
52033   # Check whether --enable-warnings-as-errors was given.
52034 if test "${enable_warnings_as_errors+set}" = set; then :
52035   enableval=$enable_warnings_as_errors;
52036 fi
52037 
52038 
52039   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52040 $as_echo_n "checking if native warnings are errors... " >&6; }
52041   if test "x$enable_warnings_as_errors" = "xyes"; then
52042     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
52043 $as_echo "yes (explicitely set)" >&6; }
52044     WARNINGS_AS_ERRORS=true
52045   elif test "x$enable_warnings_as_errors" = "xno"; then
52046     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52047 $as_echo "no" >&6; }
52048     WARNINGS_AS_ERRORS=false
52049   elif test "x$enable_warnings_as_errors" = "x"; then
52050     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52051 $as_echo "yes (default)" >&6; }
52052     WARNINGS_AS_ERRORS=true
52053   else
52054     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52055   fi
52056 
52057   if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
52058     # Set legacy hotspot variable
52059     HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
52060   else
52061     HOTSPOT_SET_WARNINGS_AS_ERRORS=""
52062   fi
52063 
52064 
52065 
52066 
52067   case "${TOOLCHAIN_TYPE}" in
52068     microsoft)
52069       DISABLE_WARNING_PREFIX="-wd"
52070       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52071       ;;
52072     solstudio)
52073       DISABLE_WARNING_PREFIX="-erroff="
52074       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52075       ;;
52076     gcc)
52077       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
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 
52112 
52113 
52114 
52115 
52116 
52117 
52118 
52119 
52120 
52121 
52122 
52123 
52124 
52125     # Execute function body
52126 
52127 
52128 
52129 
52130 
52131 
52132 
52133 
52134 
52135 
52136 
52137 
52138 
52139 
52140 
52141 
52142 
52143 
52144 
52145 
52146 
52147 
52148 
52149 
52150 
52151 
52152 
52153 
52154 
52155 
52156 
52157 
52158 
52159 
52160 
52161 
52162 
52163 
52164 
52165 
52166 
52167 
52168 
52169 
52170 
52171 
52172 
52173 
52174     # Execute function body
52175 
52176   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52177 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52178   supports=yes
52179 
52180   saved_cflags="$CFLAGS"
52181   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52182   ac_ext=c
52183 ac_cpp='$CPP $CPPFLAGS'
52184 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52185 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52186 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52187 
52188   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52189 /* end confdefs.h.  */
52190 int i;
52191 _ACEOF
52192 if ac_fn_c_try_compile "$LINENO"; then :
52193 
52194 else
52195   supports=no
52196 fi
52197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52198   ac_ext=cpp
52199 ac_cpp='$CXXCPP $CPPFLAGS'
52200 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52201 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52202 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52203 
52204   CFLAGS="$saved_cflags"
52205 
52206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52207 $as_echo "$supports" >&6; }
52208   if test "x$supports" = "xyes" ; then
52209     :
52210     C_COMP_SUPPORTS="yes"
52211   else
52212     :
52213     C_COMP_SUPPORTS="no"
52214   fi
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 
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     # Execute function body
52275 
52276   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52277 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52278   supports=yes
52279 
52280   saved_cxxflags="$CXXFLAGS"
52281   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52282   ac_ext=cpp
52283 ac_cpp='$CXXCPP $CPPFLAGS'
52284 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52285 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52286 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52287 
52288   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52289 /* end confdefs.h.  */
52290 int i;
52291 _ACEOF
52292 if ac_fn_cxx_try_compile "$LINENO"; then :
52293 
52294 else
52295   supports=no
52296 fi
52297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52298   ac_ext=cpp
52299 ac_cpp='$CXXCPP $CPPFLAGS'
52300 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52301 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52302 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52303 
52304   CXXFLAGS="$saved_cxxflags"
52305 
52306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52307 $as_echo "$supports" >&6; }
52308   if test "x$supports" = "xyes" ; then
52309     :
52310     CXX_COMP_SUPPORTS="yes"
52311   else
52312     :
52313     CXX_COMP_SUPPORTS="no"
52314   fi
52315 
52316 
52317 
52318 
52319 
52320 
52321 
52322 
52323 
52324 
52325 
52326 
52327 
52328   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52329 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52330   supports=no
52331   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52332 
52333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52334 $as_echo "$supports" >&6; }
52335   if test "x$supports" = "xyes" ; then
52336     :
52337     GCC_CAN_DISABLE_WARNINGS=true
52338   else
52339     :
52340     GCC_CAN_DISABLE_WARNINGS=false
52341 
52342   fi
52343 
52344 
52345 
52346 
52347 
52348 
52349       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52350         DISABLE_WARNING_PREFIX="-Wno-"
52351       else
52352         DISABLE_WARNING_PREFIX=
52353       fi
52354       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52355       # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52356       # CFLAGS since any target specific flags will likely not work with the
52357       # build compiler
52358       CC_OLD="$CC"
52359       CXX_OLD="$CXX"
52360       CC="$BUILD_CC"
52361       CXX="$BUILD_CXX"
52362       CFLAGS_OLD="$CFLAGS"
52363       CFLAGS=""
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 
52398 
52399 
52400 
52401 
52402 
52403 
52404 
52405 
52406 
52407 
52408 
52409 
52410 
52411     # Execute function body
52412 
52413 
52414 
52415 
52416 
52417 
52418 
52419 
52420 
52421 
52422 
52423 
52424 
52425 
52426 
52427 
52428 
52429 
52430 
52431 
52432 
52433 
52434 
52435 
52436 
52437 
52438 
52439 
52440 
52441 
52442 
52443 
52444 
52445 
52446 
52447 
52448 
52449 
52450 
52451 
52452 
52453 
52454 
52455 
52456 
52457 
52458 
52459 
52460     # Execute function body
52461 
52462   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52463 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52464   supports=yes
52465 
52466   saved_cflags="$CFLAGS"
52467   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52468   ac_ext=c
52469 ac_cpp='$CPP $CPPFLAGS'
52470 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52471 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52472 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52473 
52474   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52475 /* end confdefs.h.  */
52476 int i;
52477 _ACEOF
52478 if ac_fn_c_try_compile "$LINENO"; then :
52479 
52480 else
52481   supports=no
52482 fi
52483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52484   ac_ext=cpp
52485 ac_cpp='$CXXCPP $CPPFLAGS'
52486 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52487 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52488 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52489 
52490   CFLAGS="$saved_cflags"
52491 
52492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52493 $as_echo "$supports" >&6; }
52494   if test "x$supports" = "xyes" ; then
52495     :
52496     C_COMP_SUPPORTS="yes"
52497   else
52498     :
52499     C_COMP_SUPPORTS="no"
52500   fi
52501 
52502 
52503 
52504 
52505 
52506 
52507 
52508 
52509 
52510 
52511 
52512 
52513 
52514 
52515 
52516 
52517 
52518 
52519 
52520 
52521 
52522 
52523 
52524 
52525 
52526 
52527 
52528 
52529 
52530 
52531 
52532 
52533 
52534 
52535 
52536 
52537 
52538 
52539 
52540 
52541 
52542 
52543 
52544 
52545 
52546 
52547 
52548 
52549 
52550 
52551 
52552 
52553 
52554 
52555 
52556 
52557 
52558 
52559 
52560     # Execute function body
52561 
52562   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52563 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52564   supports=yes
52565 
52566   saved_cxxflags="$CXXFLAGS"
52567   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52568   ac_ext=cpp
52569 ac_cpp='$CXXCPP $CPPFLAGS'
52570 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52571 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52572 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52573 
52574   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52575 /* end confdefs.h.  */
52576 int i;
52577 _ACEOF
52578 if ac_fn_cxx_try_compile "$LINENO"; then :
52579 
52580 else
52581   supports=no
52582 fi
52583 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52584   ac_ext=cpp
52585 ac_cpp='$CXXCPP $CPPFLAGS'
52586 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52587 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52588 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52589 
52590   CXXFLAGS="$saved_cxxflags"
52591 
52592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52593 $as_echo "$supports" >&6; }
52594   if test "x$supports" = "xyes" ; then
52595     :
52596     CXX_COMP_SUPPORTS="yes"
52597   else
52598     :
52599     CXX_COMP_SUPPORTS="no"
52600   fi
52601 
52602 
52603 
52604 
52605 
52606 
52607 
52608 
52609 
52610 
52611 
52612 
52613 
52614   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52615 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52616   supports=no
52617   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52618 
52619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52620 $as_echo "$supports" >&6; }
52621   if test "x$supports" = "xyes" ; then
52622     :
52623     BUILD_CC_CAN_DISABLE_WARNINGS=true
52624   else
52625     :
52626     BUILD_CC_CAN_DISABLE_WARNINGS=false
52627 
52628   fi
52629 
52630 
52631 
52632 
52633 
52634 
52635       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52636         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52637       else
52638         BUILD_CC_DISABLE_WARNING_PREFIX=
52639       fi
52640       CC="$CC_OLD"
52641       CXX="$CXX_OLD"
52642       CFLAGS="$CFLAGS_OLD"
52643       ;;
52644     clang)
52645       DISABLE_WARNING_PREFIX="-Wno-"
52646       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52647       ;;
52648     xlc)
52649       DISABLE_WARNING_PREFIX="-qsuppress="
52650       CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52651       ;;
52652   esac
52653 
52654 
52655 
52656 
52657 
52658 # Setup debug symbols (need objcopy from the toolchain for that)
52659 
52660   #
52661   # NATIVE_DEBUG_SYMBOLS
52662   # This must be done after the toolchain is setup, since we're looking at objcopy.
52663   #
52664   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52665 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
52666 
52667 # Check whether --with-native-debug-symbols was given.
52668 if test "${with_native_debug_symbols+set}" = set; then :
52669   withval=$with_native_debug_symbols;
52670         if test "x$OPENJDK_TARGET_OS" = xaix; then
52671           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52672             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52673           fi
52674         fi
52675 
52676 else
52677 
52678         if test "x$OPENJDK_TARGET_OS" = xaix; then
52679           # AIX doesn't support 'zipped' so use 'internal' as default
52680           with_native_debug_symbols="internal"
52681         else
52682           if test "x$STATIC_BUILD" = xtrue; then
52683             with_native_debug_symbols="none"
52684           else
52685             with_native_debug_symbols="zipped"
52686           fi
52687         fi
52688 
52689 fi
52690 
52691   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52693 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52694 
52695   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52696 
52697     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52698       if test "x$OBJCOPY" = x; then
52699         # enabling of enable-debug-symbols and can't find objcopy
52700         # this is an error
52701         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52702       fi
52703     fi
52704 
52705     COMPILE_WITH_DEBUG_SYMBOLS=true
52706     COPY_DEBUG_SYMBOLS=true
52707     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52708 
52709     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52710     DEBUG_BINARIES=false
52711     STRIP_POLICY=min_strip
52712 
52713   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52714     COMPILE_WITH_DEBUG_SYMBOLS=false
52715     COPY_DEBUG_SYMBOLS=false
52716     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52717 
52718     DEBUG_BINARIES=false
52719     STRIP_POLICY=no_strip
52720   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52721     COMPILE_WITH_DEBUG_SYMBOLS=true
52722     COPY_DEBUG_SYMBOLS=false
52723     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52724 
52725     # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52726     DEBUG_BINARIES=true
52727     STRIP_POLICY=no_strip
52728     STRIP=""
52729 
52730   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52731 
52732     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52733       if test "x$OBJCOPY" = x; then
52734         # enabling of enable-debug-symbols and can't find objcopy
52735         # this is an error
52736         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52737       fi
52738     fi
52739 
52740     COMPILE_WITH_DEBUG_SYMBOLS=true
52741     COPY_DEBUG_SYMBOLS=true
52742     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52743 
52744     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52745     DEBUG_BINARIES=false
52746     STRIP_POLICY=min_strip
52747   else
52748     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52749   fi
52750 
52751   # --enable-debug-symbols is deprecated.
52752   # Please use --with-native-debug-symbols=[internal,external,zipped] .
52753 
52754   # Check whether --enable-debug-symbols was given.
52755 if test "${enable_debug_symbols+set}" = set; then :
52756   enableval=$enable_debug_symbols;
52757 fi
52758 
52759   if test "x$enable_debug_symbols" != x; then
52760     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52761 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52762 
52763     if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52764       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52765 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52766     fi
52767 
52768   fi
52769 
52770 
52771   # --enable-zip-debug-info is deprecated.
52772   # Please use --with-native-debug-symbols=zipped .
52773 
52774   # Check whether --enable-zip-debug-info was given.
52775 if test "${enable_zip_debug_info+set}" = set; then :
52776   enableval=$enable_zip_debug_info;
52777 fi
52778 
52779   if test "x$enable_zip_debug_info" != x; then
52780     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52781 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52782 
52783     if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52784       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52785 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52786     fi
52787 
52788   fi
52789 
52790 
52791 
52792 
52793 
52794 
52795   # Legacy values
52796 
52797 
52798 
52799 
52800   # Check whether --enable-native-coverage was given.
52801 if test "${enable_native_coverage+set}" = set; then :
52802   enableval=$enable_native_coverage;
52803 fi
52804 
52805   GCOV_ENABLED="false"
52806   if test "x$enable_native_coverage" = "xyes"; then
52807     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52808       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52809 $as_echo_n "checking if native coverage is enabled... " >&6; }
52810       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52811 $as_echo "yes" >&6; }
52812       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52813       GCOV_LDFLAGS="-fprofile-arcs"
52814       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52815       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52816       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52817       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52818       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52819       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52820       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52821       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52822       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52823       GCOV_ENABLED="true"
52824     else
52825       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52826     fi
52827   elif test "x$enable_native_coverage" = "xno"; then
52828     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52829 $as_echo_n "checking if native coverage is enabled... " >&6; }
52830     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52831 $as_echo "no" >&6; }
52832   elif test "x$enable_native_coverage" != "x"; then
52833     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52834   fi
52835 
52836 
52837 
52838 
52839 # Need toolchain to setup dtrace
52840 
52841   # Test for dtrace dependencies
52842   # Check whether --enable-dtrace was given.
52843 if test "${enable_dtrace+set}" = set; then :
52844   enableval=$enable_dtrace;
52845 fi
52846 
52847 
52848   DTRACE_DEP_MISSING=false
52849 
52850   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52851 $as_echo_n "checking for dtrace tool... " >&6; }
52852   if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52853     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52854 $as_echo "$DTRACE" >&6; }
52855   else
52856     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52857 $as_echo "not found, cannot build dtrace" >&6; }
52858     DTRACE_DEP_MISSING=true
52859   fi
52860 
52861   for ac_header in sys/sdt.h
52862 do :
52863   ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52864 if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52865   cat >>confdefs.h <<_ACEOF
52866 #define HAVE_SYS_SDT_H 1
52867 _ACEOF
52868  DTRACE_HEADERS_OK=yes
52869 else
52870   DTRACE_HEADERS_OK=no
52871 fi
52872 
52873 done
52874 
52875   if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52876     DTRACE_DEP_MISSING=true
52877   fi
52878 
52879   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52880 $as_echo_n "checking if dtrace should be built... " >&6; }
52881   if test "x$enable_dtrace" = "xyes"; then
52882     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52883       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52884 $as_echo "no, missing dependencies" >&6; }
52885 
52886   # Print a helpful message on how to acquire the necessary build dependency.
52887   # dtrace is the help tag: freetype, cups, alsa etc
52888   MISSING_DEPENDENCY=dtrace
52889 
52890   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52891     cygwin_help $MISSING_DEPENDENCY
52892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52893     msys_help $MISSING_DEPENDENCY
52894   else
52895     PKGHANDLER_COMMAND=
52896 
52897     case $PKGHANDLER in
52898       apt-get)
52899         apt_help     $MISSING_DEPENDENCY ;;
52900       yum)
52901         yum_help     $MISSING_DEPENDENCY ;;
52902       port)
52903         port_help    $MISSING_DEPENDENCY ;;
52904       pkgutil)
52905         pkgutil_help $MISSING_DEPENDENCY ;;
52906       pkgadd)
52907         pkgadd_help  $MISSING_DEPENDENCY ;;
52908     esac
52909 
52910     if test "x$PKGHANDLER_COMMAND" != x; then
52911       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52912     fi
52913   fi
52914 
52915       as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52916     else
52917       INCLUDE_DTRACE=true
52918       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52919 $as_echo "yes, forced" >&6; }
52920     fi
52921   elif test "x$enable_dtrace" = "xno"; then
52922     INCLUDE_DTRACE=false
52923     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52924 $as_echo "no, forced" >&6; }
52925   elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52926     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52927       INCLUDE_DTRACE=false
52928       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52929 $as_echo "no, missing dependencies" >&6; }
52930     elif test "x$OPENJDK_TARGET_OS" = "xios" ; then
52931       INCLUDE_DTRACE=false
52932       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, ios build" >&5
52933 $as_echo "no, ios build" >&6; }
52934     elif test "x$OPENJDK_TARGET_OS" = "xandroid" ; then
52935       INCLUDE_DTRACE=false
52936       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, android build" >&5
52937 $as_echo "no, android build" >&6; }
52938     else
52939       INCLUDE_DTRACE=true
52940       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52941 $as_echo "yes, dependencies present" >&6; }
52942     fi
52943   else
52944     as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52945   fi
52946 
52947 
52948 
52949   # The user can in some cases supply additional jvm features. For the custom
52950   # variant, this defines the entire variant.
52951 
52952 # Check whether --with-jvm-features was given.
52953 if test "${with_jvm_features+set}" = set; then :
52954   withval=$with_jvm_features;
52955 fi
52956 
52957   if test "x$with_jvm_features" != x; then
52958     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52959 $as_echo_n "checking additional JVM features... " >&6; }
52960     JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52961     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52962 $as_echo "$JVM_FEATURES" >&6; }
52963   fi
52964 
52965   # Verify that dependencies are met for explicitly set features.
52966   if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52967     as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52968   fi
52969 
52970   if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52971     as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52972   fi
52973 
52974   if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52975     as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52976   fi
52977 
52978   if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52979     as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52980   fi
52981 
52982   if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52983     as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52984   fi
52985 
52986   # Turn on additional features based on other parts of configure
52987   if test "x$INCLUDE_DTRACE" = "xtrue"; then
52988     JVM_FEATURES="$JVM_FEATURES dtrace"
52989   else
52990     if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52991       as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52992     fi
52993   fi
52994 
52995   if test "x$STATIC_BUILD" = "xtrue"; then
52996     JVM_FEATURES="$JVM_FEATURES static-build"
52997   else
52998     if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52999       as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
53000     fi
53001   fi
53002 
53003   if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53004     if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
53005       as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
53006     fi
53007   fi
53008 
53009   if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53010     if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
53011       as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
53012     fi
53013   fi
53014 
53015   # Only enable jvmci on x86_64, sparcv9 and aarch64.
53016   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
53017       test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
53018       test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
53019     JVM_FEATURES_jvmci="jvmci"
53020   else
53021     JVM_FEATURES_jvmci=""
53022   fi
53023 
53024   # All variants but minimal (and custom) get these features
53025   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
53026 
53027   # Enable features depending on variant.
53028   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
53029   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
53030   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
53031   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
53032   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
53033   JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
53034   JVM_FEATURES_custom="$JVM_FEATURES"
53035 
53036   if test "x$OPENJDK_TARGET_OS" = "xios" || test "x$OPENJDK_TARGET_OS" = "xandroid"; then
53037     JVM_FEATURES_minimal="$JVM_FEATURES_minimal jvmti"
53038   fi
53039 
53040 
53041 
53042 
53043 
53044 
53045 
53046 
53047 
53048   # Used for verification of Makefiles by check-jvm-feature
53049 
53050 
53051   # We don't support --with-jvm-interpreter anymore, use zero instead.
53052 
53053 
53054 # Check whether --with-jvm-interpreter was given.
53055 if test "${with_jvm_interpreter+set}" = set; then :
53056   withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
53057 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
53058 fi
53059 
53060 
53061 
53062 
53063   # Check whether --enable-hotspot-gtest was given.
53064 if test "${enable_hotspot_gtest+set}" = set; then :
53065   enableval=$enable_hotspot_gtest;
53066 fi
53067 
53068 
53069   if test -e "$HOTSPOT_TOPDIR/test/native"; then
53070     GTEST_DIR_EXISTS="true"
53071   else
53072     GTEST_DIR_EXISTS="false"
53073   fi
53074 
53075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53076 $as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53077   if test "x$enable_hotspot_gtest" = "xyes"; then
53078     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53079       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53080 $as_echo "yes, forced" >&6; }
53081       BUILD_GTEST="true"
53082     else
53083       as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53084     fi
53085   elif test "x$enable_hotspot_gtest" = "xno"; then
53086     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53087 $as_echo "no, forced" >&6; }
53088     BUILD_GTEST="false"
53089   elif test "x$enable_hotspot_gtest" = "x"; then
53090     if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
53091       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53092 $as_echo "yes" >&6; }
53093       BUILD_GTEST="true"
53094     else
53095       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53096 $as_echo "no" >&6; }
53097       BUILD_GTEST="false"
53098     fi
53099   else
53100     as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53101   fi
53102   if test "x$OPENJDK_TARGET_OS" = xios || test "x$OPENJDK_TARGET_OS" = xandroid; then
53103     BUILD_GTEST="false"
53104   fi
53105 
53106 
53107 
53108 ###############################################################################
53109 #
53110 # Check dependencies for external and internal libraries.
53111 #
53112 ###############################################################################
53113 
53114 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53115 
53116   # When using cygwin or msys, we need a wrapper binary that renames
53117   # /cygdrive/c/ arguments into c:/ arguments and peeks into
53118   # @files and rewrites these too! This wrapper binary is
53119   # called fixpath.
53120   FIXPATH=
53121   if test "x$OPENJDK_BUILD_OS" = xwindows; then
53122     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53123 $as_echo_n "checking if fixpath can be created... " >&6; }
53124     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53125     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53126     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53127     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53128       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53129       FIXPATH="$FIXPATH_BIN -c"
53130     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53131       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53132       # @ was chosen as separator to minimize risk of other tools messing around with it
53133       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53134           | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53135       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53136       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53137     fi
53138     FIXPATH_SRC_W="$FIXPATH_SRC"
53139     FIXPATH_BIN_W="$FIXPATH_BIN"
53140 
53141   unix_path="$FIXPATH_SRC_W"
53142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53143     windows_path=`$CYGPATH -m "$unix_path"`
53144     FIXPATH_SRC_W="$windows_path"
53145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53146     windows_path=`cmd //c echo $unix_path`
53147     FIXPATH_SRC_W="$windows_path"
53148   fi
53149 
53150 
53151   unix_path="$FIXPATH_BIN_W"
53152   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53153     windows_path=`$CYGPATH -m "$unix_path"`
53154     FIXPATH_BIN_W="$windows_path"
53155   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53156     windows_path=`cmd //c echo $unix_path`
53157     FIXPATH_BIN_W="$windows_path"
53158   fi
53159 
53160     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53161     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53162     cd $FIXPATH_DIR
53163     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53164     cd $CURDIR
53165 
53166     if test ! -x $FIXPATH_BIN; then
53167       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53168 $as_echo "no" >&6; }
53169       cat $FIXPATH_DIR/fixpath1.log
53170       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53171     fi
53172     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53173 $as_echo "yes" >&6; }
53174     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53175 $as_echo_n "checking if fixpath.exe works... " >&6; }
53176     cd $FIXPATH_DIR
53177     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53178         > $FIXPATH_DIR/fixpath2.log 2>&1
53179     cd $CURDIR
53180     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53181       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53182 $as_echo "no" >&6; }
53183       cat $FIXPATH_DIR/fixpath2.log
53184       as_fn_error $? "fixpath did not work!" "$LINENO" 5
53185     fi
53186     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53187 $as_echo "yes" >&6; }
53188 
53189     FIXPATH_DETACH_FLAG="--detach"
53190   fi
53191 
53192 
53193 
53194 
53195 
53196 
53197   # Check if X11 is needed
53198   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53199     # No X11 support on windows or macosx
53200     NEEDS_LIB_X11=false
53201   else
53202     if test "x$SUPPORT_HEADFUL" = xno; then
53203       # No X11 support if building headless-only
53204       NEEDS_LIB_X11=false
53205     else
53206       # All other instances need X11
53207       NEEDS_LIB_X11=true
53208     fi
53209   fi
53210 
53211   # Check if cups is needed
53212   if test "x$OPENJDK_TARGET_OS" = xwindows; then
53213     # Windows have a separate print system
53214     NEEDS_LIB_CUPS=false
53215   else
53216     NEEDS_LIB_CUPS=true
53217   fi
53218 
53219   # A custom hook may have set this already
53220   if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53221     NEEDS_LIB_FREETYPE=true
53222   fi
53223 
53224   # Check if alsa is needed
53225   if test "x$OPENJDK_TARGET_OS" = xlinux; then
53226     NEEDS_LIB_ALSA=true
53227   else
53228     NEEDS_LIB_ALSA=false
53229   fi
53230 
53231   # Check if ffi is needed
53232   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53233     NEEDS_LIB_FFI=true
53234   else
53235     NEEDS_LIB_FFI=false
53236   fi
53237 
53238 
53239   # statically link libstdc++ before C++ ABI is stablized on Linux unless
53240   # dynamic build is configured on command line.
53241 
53242 # Check whether --with-stdc++lib was given.
53243 if test "${with_stdc__lib+set}" = set; then :
53244   withval=$with_stdc__lib;
53245         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53246                 && test "x$with_stdc__lib" != xdefault; then
53247           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53248         fi
53249 
53250 else
53251   with_stdc__lib=default
53252 
53253 fi
53254 
53255 
53256   if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xandroid; then
53257     # Test if -lstdc++ works.
53258     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
53259 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
53260     ac_ext=cpp
53261 ac_cpp='$CXXCPP $CPPFLAGS'
53262 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53263 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53264 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53265 
53266     OLD_CXXFLAGS="$CXXFLAGS"
53267     CXXFLAGS="$CXXFLAGS -lstdc++"
53268     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53269 /* end confdefs.h.  */
53270 
53271 int
53272 main ()
53273 {
53274 return 0;
53275   ;
53276   return 0;
53277 }
53278 _ACEOF
53279 if ac_fn_cxx_try_link "$LINENO"; then :
53280   has_dynamic_libstdcxx=yes
53281 else
53282   has_dynamic_libstdcxx=no
53283 fi
53284 rm -f core conftest.err conftest.$ac_objext \
53285     conftest$ac_exeext conftest.$ac_ext
53286     CXXFLAGS="$OLD_CXXFLAGS"
53287     ac_ext=cpp
53288 ac_cpp='$CXXCPP $CPPFLAGS'
53289 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53290 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53291 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53292 
53293     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
53294 $as_echo "$has_dynamic_libstdcxx" >&6; }
53295 
53296     # Test if stdc++ can be linked statically.
53297     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53298 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53299     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
53300     ac_ext=cpp
53301 ac_cpp='$CXXCPP $CPPFLAGS'
53302 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53303 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53304 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53305 
53306     OLD_LIBS="$LIBS"
53307     OLD_CXX="$CXX"
53308     LIBS="$STATIC_STDCXX_FLAGS"
53309     CXX="$CC"
53310     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53311 /* end confdefs.h.  */
53312 
53313 int
53314 main ()
53315 {
53316 return 0;
53317   ;
53318   return 0;
53319 }
53320 _ACEOF
53321 if ac_fn_cxx_try_link "$LINENO"; then :
53322   has_static_libstdcxx=yes
53323 else
53324   has_static_libstdcxx=no
53325 fi
53326 rm -f core conftest.err conftest.$ac_objext \
53327     conftest$ac_exeext conftest.$ac_ext
53328     LIBS="$OLD_LIBS"
53329     CXX="$OLD_CXX"
53330     ac_ext=cpp
53331 ac_cpp='$CXXCPP $CPPFLAGS'
53332 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53333 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53334 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53335 
53336     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53337 $as_echo "$has_static_libstdcxx" >&6; }
53338 
53339     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
53340       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
53341     fi
53342 
53343     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53344       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53345     fi
53346 
53347     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
53348       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
53349     fi
53350 
53351     # If dynamic was requested, it's available since it would fail above otherwise.
53352     # If dynamic wasn't requested, go with static unless it isn't available.
53353     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53354 $as_echo_n "checking how to link with libstdc++... " >&6; }
53355     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53356       LIBCXX="$LIBCXX -lstdc++"
53357       # To help comparisons with old build, put stdc++ first in JVM_LIBS
53358       JVM_LIBS="-lstdc++ $JVM_LIBS"
53359       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53360       # just use the same setting as for the TARGET toolchain.
53361       OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
53362       LDCXX="$CXX"
53363       STATIC_CXX_SETTING="STATIC_CXX=false"
53364       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53365 $as_echo "dynamic" >&6; }
53366     else
53367       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53368       JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
53369       # To help comparisons with old build, put stdc++ first in JVM_LIBS
53370       JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
53371       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53372       # just use the same setting as for the TARGET toolchain.
53373       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
53374       OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
53375       LDCXX="$CC"
53376       STATIC_CXX_SETTING="STATIC_CXX=true"
53377       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53378 $as_echo "static" >&6; }
53379     fi
53380   fi
53381 
53382 
53383   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53384   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53385     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53386   fi
53387 
53388   # TODO better (platform agnostic) test
53389   if test "x$TOOLCHAIN_NAME" = xxcode && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
53390     LIBCXX="-lstdc++"
53391   fi
53392 
53393 
53394   # Setup Windows runtime dlls
53395   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53396 
53397 
53398 # Check whether --with-msvcr-dll was given.
53399 if test "${with_msvcr_dll+set}" = set; then :
53400   withval=$with_msvcr_dll;
53401 fi
53402 
53403 
53404   if test "x$with_msvcr_dll" != x; then
53405     # If given explicitely by user, do not probe. If not present, fail directly.
53406 
53407   DLL_NAME="$MSVCR_NAME"
53408   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53409   METHOD="--with-msvcr-dll"
53410   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53411     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53412 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53413 
53414     # Need to check if the found msvcr is correct architecture
53415     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53416 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53417     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53418     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53419       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53420       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53421       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53422         CORRECT_MSVCR_ARCH="PE32 executable"
53423       else
53424         CORRECT_MSVCR_ARCH="PE32+ executable"
53425       fi
53426     else
53427       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53428         CORRECT_MSVCR_ARCH=386
53429       else
53430         CORRECT_MSVCR_ARCH=x86-64
53431       fi
53432     fi
53433     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53434       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53435 $as_echo "ok" >&6; }
53436       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53437 
53438   # Only process if variable expands to non-empty
53439 
53440   if test "x$MSVC_DLL" != x; then
53441     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53442 
53443   # Input might be given as Windows format, start by converting to
53444   # unix format.
53445   path="$MSVC_DLL"
53446   new_path=`$CYGPATH -u "$path"`
53447 
53448   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53449   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53450   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53451   # "foo.exe" is OK but "foo" is an error.
53452   #
53453   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53454   # It is also a way to make sure we got the proper file name for the real test later on.
53455   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53456   if test "x$test_shortpath" = x; then
53457     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53458 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53459     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53460   fi
53461 
53462   # Call helper function which possibly converts this using DOS-style short mode.
53463   # If so, the updated path is stored in $new_path.
53464 
53465   input_path="$new_path"
53466   # Check if we need to convert this using DOS-style short mode. If the path
53467   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53468   # take no chances and rewrite it.
53469   # Note: m4 eats our [], so we need to use [ and ] instead.
53470   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53471   if test "x$has_forbidden_chars" != x; then
53472     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53473     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53474     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53475     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53476       # Going to short mode and back again did indeed matter. Since short mode is
53477       # case insensitive, let's make it lowercase to improve readability.
53478       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53479       # Now convert it back to Unix-style (cygpath)
53480       input_path=`$CYGPATH -u "$shortmode_path"`
53481       new_path="$input_path"
53482     fi
53483   fi
53484 
53485   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53486   if test "x$test_cygdrive_prefix" = x; then
53487     # As a simple fix, exclude /usr/bin since it's not a real path.
53488     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53489       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53490       # a path prefixed by /cygdrive for fixpath to work.
53491       new_path="$CYGWIN_ROOT_PATH$input_path"
53492     fi
53493   fi
53494 
53495 
53496   if test "x$path" != "x$new_path"; then
53497     MSVC_DLL="$new_path"
53498     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53499 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53500   fi
53501 
53502     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53503 
53504   path="$MSVC_DLL"
53505   has_colon=`$ECHO $path | $GREP ^.:`
53506   new_path="$path"
53507   if test "x$has_colon" = x; then
53508     # Not in mixed or Windows style, start by that.
53509     new_path=`cmd //c echo $path`
53510   fi
53511 
53512 
53513   input_path="$new_path"
53514   # Check if we need to convert this using DOS-style short mode. If the path
53515   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53516   # take no chances and rewrite it.
53517   # Note: m4 eats our [], so we need to use [ and ] instead.
53518   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53519   if test "x$has_forbidden_chars" != x; then
53520     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53521     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53522   fi
53523 
53524 
53525   windows_path="$new_path"
53526   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53527     unix_path=`$CYGPATH -u "$windows_path"`
53528     new_path="$unix_path"
53529   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53530     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53531     new_path="$unix_path"
53532   fi
53533 
53534   if test "x$path" != "x$new_path"; then
53535     MSVC_DLL="$new_path"
53536     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53537 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53538   fi
53539 
53540   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53541   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53542 
53543     else
53544       # We're on a unix platform. Hooray! :)
53545       path="$MSVC_DLL"
53546       has_space=`$ECHO "$path" | $GREP " "`
53547       if test "x$has_space" != x; then
53548         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53549 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53550         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53551       fi
53552 
53553       # Use eval to expand a potential ~
53554       eval path="$path"
53555       if test ! -f "$path" && test ! -d "$path"; then
53556         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53557       fi
53558 
53559       if test -d "$path"; then
53560         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53561       else
53562         dir="`$DIRNAME "$path"`"
53563         base="`$BASENAME "$path"`"
53564         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53565       fi
53566     fi
53567   fi
53568 
53569       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53570 $as_echo_n "checking for $DLL_NAME... " >&6; }
53571       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53572 $as_echo "$MSVC_DLL" >&6; }
53573     else
53574       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53575 $as_echo "incorrect, ignoring" >&6; }
53576       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53577 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53578     fi
53579   fi
53580 
53581     if test "x$MSVC_DLL" = x; then
53582       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53583     fi
53584     MSVCR_DLL="$MSVC_DLL"
53585   elif test "x$DEVKIT_MSVCR_DLL" != x; then
53586 
53587   DLL_NAME="$MSVCR_NAME"
53588   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53589   METHOD="devkit"
53590   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53591     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53592 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53593 
53594     # Need to check if the found msvcr is correct architecture
53595     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53596 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53597     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53598     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53599       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53600       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53601       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53602         CORRECT_MSVCR_ARCH="PE32 executable"
53603       else
53604         CORRECT_MSVCR_ARCH="PE32+ executable"
53605       fi
53606     else
53607       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53608         CORRECT_MSVCR_ARCH=386
53609       else
53610         CORRECT_MSVCR_ARCH=x86-64
53611       fi
53612     fi
53613     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53614       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53615 $as_echo "ok" >&6; }
53616       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53617 
53618   # Only process if variable expands to non-empty
53619 
53620   if test "x$MSVC_DLL" != x; then
53621     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53622 
53623   # Input might be given as Windows format, start by converting to
53624   # unix format.
53625   path="$MSVC_DLL"
53626   new_path=`$CYGPATH -u "$path"`
53627 
53628   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53629   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53630   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53631   # "foo.exe" is OK but "foo" is an error.
53632   #
53633   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53634   # It is also a way to make sure we got the proper file name for the real test later on.
53635   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53636   if test "x$test_shortpath" = x; then
53637     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53638 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53639     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53640   fi
53641 
53642   # Call helper function which possibly converts this using DOS-style short mode.
53643   # If so, the updated path is stored in $new_path.
53644 
53645   input_path="$new_path"
53646   # Check if we need to convert this using DOS-style short mode. If the path
53647   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53648   # take no chances and rewrite it.
53649   # Note: m4 eats our [], so we need to use [ and ] instead.
53650   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53651   if test "x$has_forbidden_chars" != x; then
53652     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53653     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53654     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53655     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53656       # Going to short mode and back again did indeed matter. Since short mode is
53657       # case insensitive, let's make it lowercase to improve readability.
53658       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53659       # Now convert it back to Unix-style (cygpath)
53660       input_path=`$CYGPATH -u "$shortmode_path"`
53661       new_path="$input_path"
53662     fi
53663   fi
53664 
53665   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53666   if test "x$test_cygdrive_prefix" = x; then
53667     # As a simple fix, exclude /usr/bin since it's not a real path.
53668     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53669       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53670       # a path prefixed by /cygdrive for fixpath to work.
53671       new_path="$CYGWIN_ROOT_PATH$input_path"
53672     fi
53673   fi
53674 
53675 
53676   if test "x$path" != "x$new_path"; then
53677     MSVC_DLL="$new_path"
53678     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53679 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53680   fi
53681 
53682     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53683 
53684   path="$MSVC_DLL"
53685   has_colon=`$ECHO $path | $GREP ^.:`
53686   new_path="$path"
53687   if test "x$has_colon" = x; then
53688     # Not in mixed or Windows style, start by that.
53689     new_path=`cmd //c echo $path`
53690   fi
53691 
53692 
53693   input_path="$new_path"
53694   # Check if we need to convert this using DOS-style short mode. If the path
53695   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53696   # take no chances and rewrite it.
53697   # Note: m4 eats our [], so we need to use [ and ] instead.
53698   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53699   if test "x$has_forbidden_chars" != x; then
53700     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53701     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53702   fi
53703 
53704 
53705   windows_path="$new_path"
53706   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53707     unix_path=`$CYGPATH -u "$windows_path"`
53708     new_path="$unix_path"
53709   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53710     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53711     new_path="$unix_path"
53712   fi
53713 
53714   if test "x$path" != "x$new_path"; then
53715     MSVC_DLL="$new_path"
53716     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53717 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53718   fi
53719 
53720   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53721   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53722 
53723     else
53724       # We're on a unix platform. Hooray! :)
53725       path="$MSVC_DLL"
53726       has_space=`$ECHO "$path" | $GREP " "`
53727       if test "x$has_space" != x; then
53728         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53729 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53730         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53731       fi
53732 
53733       # Use eval to expand a potential ~
53734       eval path="$path"
53735       if test ! -f "$path" && test ! -d "$path"; then
53736         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53737       fi
53738 
53739       if test -d "$path"; then
53740         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53741       else
53742         dir="`$DIRNAME "$path"`"
53743         base="`$BASENAME "$path"`"
53744         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53745       fi
53746     fi
53747   fi
53748 
53749       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53750 $as_echo_n "checking for $DLL_NAME... " >&6; }
53751       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53752 $as_echo "$MSVC_DLL" >&6; }
53753     else
53754       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53755 $as_echo "incorrect, ignoring" >&6; }
53756       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53757 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53758     fi
53759   fi
53760 
53761     if test "x$MSVC_DLL" = x; then
53762       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53763     fi
53764     MSVCR_DLL="$MSVC_DLL"
53765   else
53766 
53767   DLL_NAME="${MSVCR_NAME}"
53768   MSVC_DLL=
53769 
53770   if test "x$MSVC_DLL" = x; then
53771     # Probe: Using well-known location from Visual Studio 10.0
53772     if test "x$VCINSTALLDIR" != x; then
53773       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53774 
53775   windows_path="$CYGWIN_VC_INSTALL_DIR"
53776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53777     unix_path=`$CYGPATH -u "$windows_path"`
53778     CYGWIN_VC_INSTALL_DIR="$unix_path"
53779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53781     CYGWIN_VC_INSTALL_DIR="$unix_path"
53782   fi
53783 
53784       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53785         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53786       else
53787         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53788       fi
53789       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53790 
53791   DLL_NAME="$DLL_NAME"
53792   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53793   METHOD="well-known location in VCINSTALLDIR"
53794   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53795     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53796 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53797 
53798     # Need to check if the found msvcr is correct architecture
53799     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53800 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53801     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53802     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53803       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53804       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53805       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53806         CORRECT_MSVCR_ARCH="PE32 executable"
53807       else
53808         CORRECT_MSVCR_ARCH="PE32+ executable"
53809       fi
53810     else
53811       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53812         CORRECT_MSVCR_ARCH=386
53813       else
53814         CORRECT_MSVCR_ARCH=x86-64
53815       fi
53816     fi
53817     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53818       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53819 $as_echo "ok" >&6; }
53820       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53821 
53822   # Only process if variable expands to non-empty
53823 
53824   if test "x$MSVC_DLL" != x; then
53825     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53826 
53827   # Input might be given as Windows format, start by converting to
53828   # unix format.
53829   path="$MSVC_DLL"
53830   new_path=`$CYGPATH -u "$path"`
53831 
53832   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53833   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53834   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53835   # "foo.exe" is OK but "foo" is an error.
53836   #
53837   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53838   # It is also a way to make sure we got the proper file name for the real test later on.
53839   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53840   if test "x$test_shortpath" = x; then
53841     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53842 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53843     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53844   fi
53845 
53846   # Call helper function which possibly converts this using DOS-style short mode.
53847   # If so, the updated path is stored in $new_path.
53848 
53849   input_path="$new_path"
53850   # Check if we need to convert this using DOS-style short mode. If the path
53851   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53852   # take no chances and rewrite it.
53853   # Note: m4 eats our [], so we need to use [ and ] instead.
53854   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53855   if test "x$has_forbidden_chars" != x; then
53856     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53857     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53858     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53859     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53860       # Going to short mode and back again did indeed matter. Since short mode is
53861       # case insensitive, let's make it lowercase to improve readability.
53862       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53863       # Now convert it back to Unix-style (cygpath)
53864       input_path=`$CYGPATH -u "$shortmode_path"`
53865       new_path="$input_path"
53866     fi
53867   fi
53868 
53869   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53870   if test "x$test_cygdrive_prefix" = x; then
53871     # As a simple fix, exclude /usr/bin since it's not a real path.
53872     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53873       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53874       # a path prefixed by /cygdrive for fixpath to work.
53875       new_path="$CYGWIN_ROOT_PATH$input_path"
53876     fi
53877   fi
53878 
53879 
53880   if test "x$path" != "x$new_path"; then
53881     MSVC_DLL="$new_path"
53882     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53883 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53884   fi
53885 
53886     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53887 
53888   path="$MSVC_DLL"
53889   has_colon=`$ECHO $path | $GREP ^.:`
53890   new_path="$path"
53891   if test "x$has_colon" = x; then
53892     # Not in mixed or Windows style, start by that.
53893     new_path=`cmd //c echo $path`
53894   fi
53895 
53896 
53897   input_path="$new_path"
53898   # Check if we need to convert this using DOS-style short mode. If the path
53899   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53900   # take no chances and rewrite it.
53901   # Note: m4 eats our [], so we need to use [ and ] instead.
53902   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53903   if test "x$has_forbidden_chars" != x; then
53904     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53905     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53906   fi
53907 
53908 
53909   windows_path="$new_path"
53910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53911     unix_path=`$CYGPATH -u "$windows_path"`
53912     new_path="$unix_path"
53913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53915     new_path="$unix_path"
53916   fi
53917 
53918   if test "x$path" != "x$new_path"; then
53919     MSVC_DLL="$new_path"
53920     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53921 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53922   fi
53923 
53924   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53925   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53926 
53927     else
53928       # We're on a unix platform. Hooray! :)
53929       path="$MSVC_DLL"
53930       has_space=`$ECHO "$path" | $GREP " "`
53931       if test "x$has_space" != x; then
53932         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53933 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53934         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53935       fi
53936 
53937       # Use eval to expand a potential ~
53938       eval path="$path"
53939       if test ! -f "$path" && test ! -d "$path"; then
53940         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53941       fi
53942 
53943       if test -d "$path"; then
53944         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53945       else
53946         dir="`$DIRNAME "$path"`"
53947         base="`$BASENAME "$path"`"
53948         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53949       fi
53950     fi
53951   fi
53952 
53953       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53954 $as_echo_n "checking for $DLL_NAME... " >&6; }
53955       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53956 $as_echo "$MSVC_DLL" >&6; }
53957     else
53958       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53959 $as_echo "incorrect, ignoring" >&6; }
53960       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53961 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53962     fi
53963   fi
53964 
53965     fi
53966   fi
53967 
53968   if test "x$MSVC_DLL" = x; then
53969     # Probe: Check in the Boot JDK directory.
53970     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53971 
53972   DLL_NAME="$DLL_NAME"
53973   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53974   METHOD="well-known location in Boot JDK"
53975   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53976     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53977 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53978 
53979     # Need to check if the found msvcr is correct architecture
53980     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53981 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53982     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53983     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53984       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53985       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53986       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53987         CORRECT_MSVCR_ARCH="PE32 executable"
53988       else
53989         CORRECT_MSVCR_ARCH="PE32+ executable"
53990       fi
53991     else
53992       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53993         CORRECT_MSVCR_ARCH=386
53994       else
53995         CORRECT_MSVCR_ARCH=x86-64
53996       fi
53997     fi
53998     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53999       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54000 $as_echo "ok" >&6; }
54001       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54002 
54003   # Only process if variable expands to non-empty
54004 
54005   if test "x$MSVC_DLL" != x; then
54006     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54007 
54008   # Input might be given as Windows format, start by converting to
54009   # unix format.
54010   path="$MSVC_DLL"
54011   new_path=`$CYGPATH -u "$path"`
54012 
54013   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54014   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54015   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54016   # "foo.exe" is OK but "foo" is an error.
54017   #
54018   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54019   # It is also a way to make sure we got the proper file name for the real test later on.
54020   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54021   if test "x$test_shortpath" = x; then
54022     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54023 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54024     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54025   fi
54026 
54027   # Call helper function which possibly converts this using DOS-style short mode.
54028   # If so, the updated path is stored in $new_path.
54029 
54030   input_path="$new_path"
54031   # Check if we need to convert this using DOS-style short mode. If the path
54032   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54033   # take no chances and rewrite it.
54034   # Note: m4 eats our [], so we need to use [ and ] instead.
54035   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54036   if test "x$has_forbidden_chars" != x; then
54037     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54038     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54039     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54040     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54041       # Going to short mode and back again did indeed matter. Since short mode is
54042       # case insensitive, let's make it lowercase to improve readability.
54043       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54044       # Now convert it back to Unix-style (cygpath)
54045       input_path=`$CYGPATH -u "$shortmode_path"`
54046       new_path="$input_path"
54047     fi
54048   fi
54049 
54050   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54051   if test "x$test_cygdrive_prefix" = x; then
54052     # As a simple fix, exclude /usr/bin since it's not a real path.
54053     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54054       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54055       # a path prefixed by /cygdrive for fixpath to work.
54056       new_path="$CYGWIN_ROOT_PATH$input_path"
54057     fi
54058   fi
54059 
54060 
54061   if test "x$path" != "x$new_path"; then
54062     MSVC_DLL="$new_path"
54063     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54064 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54065   fi
54066 
54067     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54068 
54069   path="$MSVC_DLL"
54070   has_colon=`$ECHO $path | $GREP ^.:`
54071   new_path="$path"
54072   if test "x$has_colon" = x; then
54073     # Not in mixed or Windows style, start by that.
54074     new_path=`cmd //c echo $path`
54075   fi
54076 
54077 
54078   input_path="$new_path"
54079   # Check if we need to convert this using DOS-style short mode. If the path
54080   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54081   # take no chances and rewrite it.
54082   # Note: m4 eats our [], so we need to use [ and ] instead.
54083   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54084   if test "x$has_forbidden_chars" != x; then
54085     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54086     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54087   fi
54088 
54089 
54090   windows_path="$new_path"
54091   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54092     unix_path=`$CYGPATH -u "$windows_path"`
54093     new_path="$unix_path"
54094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54095     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54096     new_path="$unix_path"
54097   fi
54098 
54099   if test "x$path" != "x$new_path"; then
54100     MSVC_DLL="$new_path"
54101     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54102 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54103   fi
54104 
54105   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54106   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54107 
54108     else
54109       # We're on a unix platform. Hooray! :)
54110       path="$MSVC_DLL"
54111       has_space=`$ECHO "$path" | $GREP " "`
54112       if test "x$has_space" != x; then
54113         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54114 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54115         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54116       fi
54117 
54118       # Use eval to expand a potential ~
54119       eval path="$path"
54120       if test ! -f "$path" && test ! -d "$path"; then
54121         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54122       fi
54123 
54124       if test -d "$path"; then
54125         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54126       else
54127         dir="`$DIRNAME "$path"`"
54128         base="`$BASENAME "$path"`"
54129         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54130       fi
54131     fi
54132   fi
54133 
54134       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54135 $as_echo_n "checking for $DLL_NAME... " >&6; }
54136       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54137 $as_echo "$MSVC_DLL" >&6; }
54138     else
54139       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54140 $as_echo "incorrect, ignoring" >&6; }
54141       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54142 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54143     fi
54144   fi
54145 
54146   fi
54147 
54148   if test "x$MSVC_DLL" = x; then
54149     # Probe: Look in the Windows system32 directory
54150     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54151 
54152   windows_path="$CYGWIN_SYSTEMROOT"
54153   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54154     unix_path=`$CYGPATH -u "$windows_path"`
54155     CYGWIN_SYSTEMROOT="$unix_path"
54156   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54157     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54158     CYGWIN_SYSTEMROOT="$unix_path"
54159   fi
54160 
54161     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54162 
54163   DLL_NAME="$DLL_NAME"
54164   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54165   METHOD="well-known location in SYSTEMROOT"
54166   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54167     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54168 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54169 
54170     # Need to check if the found msvcr is correct architecture
54171     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54172 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54173     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54174     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54175       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54176       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54177       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54178         CORRECT_MSVCR_ARCH="PE32 executable"
54179       else
54180         CORRECT_MSVCR_ARCH="PE32+ executable"
54181       fi
54182     else
54183       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54184         CORRECT_MSVCR_ARCH=386
54185       else
54186         CORRECT_MSVCR_ARCH=x86-64
54187       fi
54188     fi
54189     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54190       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54191 $as_echo "ok" >&6; }
54192       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54193 
54194   # Only process if variable expands to non-empty
54195 
54196   if test "x$MSVC_DLL" != x; then
54197     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54198 
54199   # Input might be given as Windows format, start by converting to
54200   # unix format.
54201   path="$MSVC_DLL"
54202   new_path=`$CYGPATH -u "$path"`
54203 
54204   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54205   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54206   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54207   # "foo.exe" is OK but "foo" is an error.
54208   #
54209   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54210   # It is also a way to make sure we got the proper file name for the real test later on.
54211   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54212   if test "x$test_shortpath" = x; then
54213     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54214 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54215     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54216   fi
54217 
54218   # Call helper function which possibly converts this using DOS-style short mode.
54219   # If so, the updated path is stored in $new_path.
54220 
54221   input_path="$new_path"
54222   # Check if we need to convert this using DOS-style short mode. If the path
54223   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54224   # take no chances and rewrite it.
54225   # Note: m4 eats our [], so we need to use [ and ] instead.
54226   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54227   if test "x$has_forbidden_chars" != x; then
54228     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54229     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54230     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54231     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54232       # Going to short mode and back again did indeed matter. Since short mode is
54233       # case insensitive, let's make it lowercase to improve readability.
54234       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54235       # Now convert it back to Unix-style (cygpath)
54236       input_path=`$CYGPATH -u "$shortmode_path"`
54237       new_path="$input_path"
54238     fi
54239   fi
54240 
54241   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54242   if test "x$test_cygdrive_prefix" = x; then
54243     # As a simple fix, exclude /usr/bin since it's not a real path.
54244     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54245       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54246       # a path prefixed by /cygdrive for fixpath to work.
54247       new_path="$CYGWIN_ROOT_PATH$input_path"
54248     fi
54249   fi
54250 
54251 
54252   if test "x$path" != "x$new_path"; then
54253     MSVC_DLL="$new_path"
54254     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54255 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54256   fi
54257 
54258     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54259 
54260   path="$MSVC_DLL"
54261   has_colon=`$ECHO $path | $GREP ^.:`
54262   new_path="$path"
54263   if test "x$has_colon" = x; then
54264     # Not in mixed or Windows style, start by that.
54265     new_path=`cmd //c echo $path`
54266   fi
54267 
54268 
54269   input_path="$new_path"
54270   # Check if we need to convert this using DOS-style short mode. If the path
54271   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54272   # take no chances and rewrite it.
54273   # Note: m4 eats our [], so we need to use [ and ] instead.
54274   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54275   if test "x$has_forbidden_chars" != x; then
54276     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54277     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54278   fi
54279 
54280 
54281   windows_path="$new_path"
54282   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54283     unix_path=`$CYGPATH -u "$windows_path"`
54284     new_path="$unix_path"
54285   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54286     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54287     new_path="$unix_path"
54288   fi
54289 
54290   if test "x$path" != "x$new_path"; then
54291     MSVC_DLL="$new_path"
54292     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54293 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54294   fi
54295 
54296   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54297   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54298 
54299     else
54300       # We're on a unix platform. Hooray! :)
54301       path="$MSVC_DLL"
54302       has_space=`$ECHO "$path" | $GREP " "`
54303       if test "x$has_space" != x; then
54304         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54305 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54306         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54307       fi
54308 
54309       # Use eval to expand a potential ~
54310       eval path="$path"
54311       if test ! -f "$path" && test ! -d "$path"; then
54312         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54313       fi
54314 
54315       if test -d "$path"; then
54316         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54317       else
54318         dir="`$DIRNAME "$path"`"
54319         base="`$BASENAME "$path"`"
54320         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54321       fi
54322     fi
54323   fi
54324 
54325       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54326 $as_echo_n "checking for $DLL_NAME... " >&6; }
54327       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54328 $as_echo "$MSVC_DLL" >&6; }
54329     else
54330       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54331 $as_echo "incorrect, ignoring" >&6; }
54332       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54333 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54334     fi
54335   fi
54336 
54337   fi
54338 
54339   if test "x$MSVC_DLL" = x; then
54340     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54341     if test "x$VS100COMNTOOLS" != x; then
54342       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54343 
54344   windows_path="$CYGWIN_VS_TOOLS_DIR"
54345   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54346     unix_path=`$CYGPATH -u "$windows_path"`
54347     CYGWIN_VS_TOOLS_DIR="$unix_path"
54348   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54349     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54350     CYGWIN_VS_TOOLS_DIR="$unix_path"
54351   fi
54352 
54353       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54354         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54355             | $GREP -i /x64/ | $HEAD --lines 1`
54356       else
54357         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54358             | $GREP -i /x86/ | $HEAD --lines 1`
54359       fi
54360 
54361   DLL_NAME="$DLL_NAME"
54362   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54363   METHOD="search of VS100COMNTOOLS"
54364   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54365     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54366 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54367 
54368     # Need to check if the found msvcr is correct architecture
54369     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54370 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54371     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54372     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54373       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54374       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54375       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54376         CORRECT_MSVCR_ARCH="PE32 executable"
54377       else
54378         CORRECT_MSVCR_ARCH="PE32+ executable"
54379       fi
54380     else
54381       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54382         CORRECT_MSVCR_ARCH=386
54383       else
54384         CORRECT_MSVCR_ARCH=x86-64
54385       fi
54386     fi
54387     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54388       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54389 $as_echo "ok" >&6; }
54390       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54391 
54392   # Only process if variable expands to non-empty
54393 
54394   if test "x$MSVC_DLL" != x; then
54395     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54396 
54397   # Input might be given as Windows format, start by converting to
54398   # unix format.
54399   path="$MSVC_DLL"
54400   new_path=`$CYGPATH -u "$path"`
54401 
54402   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54403   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54404   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54405   # "foo.exe" is OK but "foo" is an error.
54406   #
54407   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54408   # It is also a way to make sure we got the proper file name for the real test later on.
54409   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54410   if test "x$test_shortpath" = x; then
54411     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54412 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54413     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54414   fi
54415 
54416   # Call helper function which possibly converts this using DOS-style short mode.
54417   # If so, the updated path is stored in $new_path.
54418 
54419   input_path="$new_path"
54420   # Check if we need to convert this using DOS-style short mode. If the path
54421   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54422   # take no chances and rewrite it.
54423   # Note: m4 eats our [], so we need to use [ and ] instead.
54424   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54425   if test "x$has_forbidden_chars" != x; then
54426     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54427     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54428     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54429     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54430       # Going to short mode and back again did indeed matter. Since short mode is
54431       # case insensitive, let's make it lowercase to improve readability.
54432       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54433       # Now convert it back to Unix-style (cygpath)
54434       input_path=`$CYGPATH -u "$shortmode_path"`
54435       new_path="$input_path"
54436     fi
54437   fi
54438 
54439   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54440   if test "x$test_cygdrive_prefix" = x; then
54441     # As a simple fix, exclude /usr/bin since it's not a real path.
54442     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54443       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54444       # a path prefixed by /cygdrive for fixpath to work.
54445       new_path="$CYGWIN_ROOT_PATH$input_path"
54446     fi
54447   fi
54448 
54449 
54450   if test "x$path" != "x$new_path"; then
54451     MSVC_DLL="$new_path"
54452     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54453 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54454   fi
54455 
54456     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54457 
54458   path="$MSVC_DLL"
54459   has_colon=`$ECHO $path | $GREP ^.:`
54460   new_path="$path"
54461   if test "x$has_colon" = x; then
54462     # Not in mixed or Windows style, start by that.
54463     new_path=`cmd //c echo $path`
54464   fi
54465 
54466 
54467   input_path="$new_path"
54468   # Check if we need to convert this using DOS-style short mode. If the path
54469   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54470   # take no chances and rewrite it.
54471   # Note: m4 eats our [], so we need to use [ and ] instead.
54472   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54473   if test "x$has_forbidden_chars" != x; then
54474     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54475     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54476   fi
54477 
54478 
54479   windows_path="$new_path"
54480   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54481     unix_path=`$CYGPATH -u "$windows_path"`
54482     new_path="$unix_path"
54483   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54484     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54485     new_path="$unix_path"
54486   fi
54487 
54488   if test "x$path" != "x$new_path"; then
54489     MSVC_DLL="$new_path"
54490     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54491 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54492   fi
54493 
54494   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54495   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54496 
54497     else
54498       # We're on a unix platform. Hooray! :)
54499       path="$MSVC_DLL"
54500       has_space=`$ECHO "$path" | $GREP " "`
54501       if test "x$has_space" != x; then
54502         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54503 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54504         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54505       fi
54506 
54507       # Use eval to expand a potential ~
54508       eval path="$path"
54509       if test ! -f "$path" && test ! -d "$path"; then
54510         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54511       fi
54512 
54513       if test -d "$path"; then
54514         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54515       else
54516         dir="`$DIRNAME "$path"`"
54517         base="`$BASENAME "$path"`"
54518         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54519       fi
54520     fi
54521   fi
54522 
54523       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54524 $as_echo_n "checking for $DLL_NAME... " >&6; }
54525       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54526 $as_echo "$MSVC_DLL" >&6; }
54527     else
54528       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54529 $as_echo "incorrect, ignoring" >&6; }
54530       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54531 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54532     fi
54533   fi
54534 
54535     fi
54536   fi
54537 
54538   if test "x$MSVC_DLL" = x; then
54539     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54540     # (This was the original behaviour; kept since it might turn something up)
54541     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54542       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54543         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54544             | $GREP x64 | $HEAD --lines 1`
54545       else
54546         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54547             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54548         if test "x$POSSIBLE_MSVC_DLL" = x; then
54549           # We're grasping at straws now...
54550           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54551               | $HEAD --lines 1`
54552         fi
54553       fi
54554 
54555 
54556   DLL_NAME="$DLL_NAME"
54557   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54558   METHOD="search of VCINSTALLDIR"
54559   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54560     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54561 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54562 
54563     # Need to check if the found msvcr is correct architecture
54564     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54565 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54566     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54567     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54568       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54569       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54570       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54571         CORRECT_MSVCR_ARCH="PE32 executable"
54572       else
54573         CORRECT_MSVCR_ARCH="PE32+ executable"
54574       fi
54575     else
54576       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54577         CORRECT_MSVCR_ARCH=386
54578       else
54579         CORRECT_MSVCR_ARCH=x86-64
54580       fi
54581     fi
54582     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54583       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54584 $as_echo "ok" >&6; }
54585       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54586 
54587   # Only process if variable expands to non-empty
54588 
54589   if test "x$MSVC_DLL" != x; then
54590     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54591 
54592   # Input might be given as Windows format, start by converting to
54593   # unix format.
54594   path="$MSVC_DLL"
54595   new_path=`$CYGPATH -u "$path"`
54596 
54597   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54598   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54599   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54600   # "foo.exe" is OK but "foo" is an error.
54601   #
54602   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54603   # It is also a way to make sure we got the proper file name for the real test later on.
54604   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54605   if test "x$test_shortpath" = x; then
54606     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54607 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54608     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54609   fi
54610 
54611   # Call helper function which possibly converts this using DOS-style short mode.
54612   # If so, the updated path is stored in $new_path.
54613 
54614   input_path="$new_path"
54615   # Check if we need to convert this using DOS-style short mode. If the path
54616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54617   # take no chances and rewrite it.
54618   # Note: m4 eats our [], so we need to use [ and ] instead.
54619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54620   if test "x$has_forbidden_chars" != x; then
54621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54622     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54623     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54624     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54625       # Going to short mode and back again did indeed matter. Since short mode is
54626       # case insensitive, let's make it lowercase to improve readability.
54627       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54628       # Now convert it back to Unix-style (cygpath)
54629       input_path=`$CYGPATH -u "$shortmode_path"`
54630       new_path="$input_path"
54631     fi
54632   fi
54633 
54634   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54635   if test "x$test_cygdrive_prefix" = x; then
54636     # As a simple fix, exclude /usr/bin since it's not a real path.
54637     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54638       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54639       # a path prefixed by /cygdrive for fixpath to work.
54640       new_path="$CYGWIN_ROOT_PATH$input_path"
54641     fi
54642   fi
54643 
54644 
54645   if test "x$path" != "x$new_path"; then
54646     MSVC_DLL="$new_path"
54647     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54648 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54649   fi
54650 
54651     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54652 
54653   path="$MSVC_DLL"
54654   has_colon=`$ECHO $path | $GREP ^.:`
54655   new_path="$path"
54656   if test "x$has_colon" = x; then
54657     # Not in mixed or Windows style, start by that.
54658     new_path=`cmd //c echo $path`
54659   fi
54660 
54661 
54662   input_path="$new_path"
54663   # Check if we need to convert this using DOS-style short mode. If the path
54664   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54665   # take no chances and rewrite it.
54666   # Note: m4 eats our [], so we need to use [ and ] instead.
54667   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54668   if test "x$has_forbidden_chars" != x; then
54669     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54670     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54671   fi
54672 
54673 
54674   windows_path="$new_path"
54675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54676     unix_path=`$CYGPATH -u "$windows_path"`
54677     new_path="$unix_path"
54678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54680     new_path="$unix_path"
54681   fi
54682 
54683   if test "x$path" != "x$new_path"; then
54684     MSVC_DLL="$new_path"
54685     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54686 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54687   fi
54688 
54689   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54690   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54691 
54692     else
54693       # We're on a unix platform. Hooray! :)
54694       path="$MSVC_DLL"
54695       has_space=`$ECHO "$path" | $GREP " "`
54696       if test "x$has_space" != x; then
54697         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54698 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54699         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54700       fi
54701 
54702       # Use eval to expand a potential ~
54703       eval path="$path"
54704       if test ! -f "$path" && test ! -d "$path"; then
54705         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54706       fi
54707 
54708       if test -d "$path"; then
54709         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54710       else
54711         dir="`$DIRNAME "$path"`"
54712         base="`$BASENAME "$path"`"
54713         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54714       fi
54715     fi
54716   fi
54717 
54718       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54719 $as_echo_n "checking for $DLL_NAME... " >&6; }
54720       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54721 $as_echo "$MSVC_DLL" >&6; }
54722     else
54723       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54724 $as_echo "incorrect, ignoring" >&6; }
54725       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54726 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54727     fi
54728   fi
54729 
54730     fi
54731   fi
54732 
54733   if test "x$MSVC_DLL" = x; then
54734     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54735 $as_echo_n "checking for $DLL_NAME... " >&6; }
54736     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54737 $as_echo "no" >&6; }
54738     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54739   fi
54740 
54741     MSVCR_DLL="$MSVC_DLL"
54742   fi
54743 
54744 
54745 
54746 # Check whether --with-msvcp-dll was given.
54747 if test "${with_msvcp_dll+set}" = set; then :
54748   withval=$with_msvcp_dll;
54749 fi
54750 
54751 
54752   if test "x$MSVCP_NAME" != "x"; then
54753     if test "x$with_msvcp_dll" != x; then
54754       # If given explicitely by user, do not probe. If not present, fail directly.
54755 
54756   DLL_NAME="$MSVCP_NAME"
54757   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54758   METHOD="--with-msvcp-dll"
54759   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54760     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54761 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54762 
54763     # Need to check if the found msvcr is correct architecture
54764     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54765 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54766     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54767     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54768       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54769       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54770       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54771         CORRECT_MSVCR_ARCH="PE32 executable"
54772       else
54773         CORRECT_MSVCR_ARCH="PE32+ executable"
54774       fi
54775     else
54776       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54777         CORRECT_MSVCR_ARCH=386
54778       else
54779         CORRECT_MSVCR_ARCH=x86-64
54780       fi
54781     fi
54782     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54783       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54784 $as_echo "ok" >&6; }
54785       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54786 
54787   # Only process if variable expands to non-empty
54788 
54789   if test "x$MSVC_DLL" != x; then
54790     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54791 
54792   # Input might be given as Windows format, start by converting to
54793   # unix format.
54794   path="$MSVC_DLL"
54795   new_path=`$CYGPATH -u "$path"`
54796 
54797   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54798   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54799   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54800   # "foo.exe" is OK but "foo" is an error.
54801   #
54802   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54803   # It is also a way to make sure we got the proper file name for the real test later on.
54804   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54805   if test "x$test_shortpath" = x; then
54806     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54807 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54808     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54809   fi
54810 
54811   # Call helper function which possibly converts this using DOS-style short mode.
54812   # If so, the updated path is stored in $new_path.
54813 
54814   input_path="$new_path"
54815   # Check if we need to convert this using DOS-style short mode. If the path
54816   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54817   # take no chances and rewrite it.
54818   # Note: m4 eats our [], so we need to use [ and ] instead.
54819   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54820   if test "x$has_forbidden_chars" != x; then
54821     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54822     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54823     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54824     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54825       # Going to short mode and back again did indeed matter. Since short mode is
54826       # case insensitive, let's make it lowercase to improve readability.
54827       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54828       # Now convert it back to Unix-style (cygpath)
54829       input_path=`$CYGPATH -u "$shortmode_path"`
54830       new_path="$input_path"
54831     fi
54832   fi
54833 
54834   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54835   if test "x$test_cygdrive_prefix" = x; then
54836     # As a simple fix, exclude /usr/bin since it's not a real path.
54837     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54838       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54839       # a path prefixed by /cygdrive for fixpath to work.
54840       new_path="$CYGWIN_ROOT_PATH$input_path"
54841     fi
54842   fi
54843 
54844 
54845   if test "x$path" != "x$new_path"; then
54846     MSVC_DLL="$new_path"
54847     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54848 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54849   fi
54850 
54851     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54852 
54853   path="$MSVC_DLL"
54854   has_colon=`$ECHO $path | $GREP ^.:`
54855   new_path="$path"
54856   if test "x$has_colon" = x; then
54857     # Not in mixed or Windows style, start by that.
54858     new_path=`cmd //c echo $path`
54859   fi
54860 
54861 
54862   input_path="$new_path"
54863   # Check if we need to convert this using DOS-style short mode. If the path
54864   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54865   # take no chances and rewrite it.
54866   # Note: m4 eats our [], so we need to use [ and ] instead.
54867   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54868   if test "x$has_forbidden_chars" != x; then
54869     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54870     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54871   fi
54872 
54873 
54874   windows_path="$new_path"
54875   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54876     unix_path=`$CYGPATH -u "$windows_path"`
54877     new_path="$unix_path"
54878   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54879     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54880     new_path="$unix_path"
54881   fi
54882 
54883   if test "x$path" != "x$new_path"; then
54884     MSVC_DLL="$new_path"
54885     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54886 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54887   fi
54888 
54889   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54890   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54891 
54892     else
54893       # We're on a unix platform. Hooray! :)
54894       path="$MSVC_DLL"
54895       has_space=`$ECHO "$path" | $GREP " "`
54896       if test "x$has_space" != x; then
54897         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54898 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54899         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54900       fi
54901 
54902       # Use eval to expand a potential ~
54903       eval path="$path"
54904       if test ! -f "$path" && test ! -d "$path"; then
54905         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54906       fi
54907 
54908       if test -d "$path"; then
54909         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54910       else
54911         dir="`$DIRNAME "$path"`"
54912         base="`$BASENAME "$path"`"
54913         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54914       fi
54915     fi
54916   fi
54917 
54918       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54919 $as_echo_n "checking for $DLL_NAME... " >&6; }
54920       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54921 $as_echo "$MSVC_DLL" >&6; }
54922     else
54923       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54924 $as_echo "incorrect, ignoring" >&6; }
54925       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54926 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54927     fi
54928   fi
54929 
54930       if test "x$MSVC_DLL" = x; then
54931         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54932       fi
54933       MSVCP_DLL="$MSVC_DLL"
54934     elif test "x$DEVKIT_MSVCP_DLL" != x; then
54935 
54936   DLL_NAME="$MSVCP_NAME"
54937   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54938   METHOD="devkit"
54939   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54940     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54941 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54942 
54943     # Need to check if the found msvcr is correct architecture
54944     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54945 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54946     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54947     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54948       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54949       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54950       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54951         CORRECT_MSVCR_ARCH="PE32 executable"
54952       else
54953         CORRECT_MSVCR_ARCH="PE32+ executable"
54954       fi
54955     else
54956       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54957         CORRECT_MSVCR_ARCH=386
54958       else
54959         CORRECT_MSVCR_ARCH=x86-64
54960       fi
54961     fi
54962     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54963       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54964 $as_echo "ok" >&6; }
54965       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54966 
54967   # Only process if variable expands to non-empty
54968 
54969   if test "x$MSVC_DLL" != x; then
54970     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54971 
54972   # Input might be given as Windows format, start by converting to
54973   # unix format.
54974   path="$MSVC_DLL"
54975   new_path=`$CYGPATH -u "$path"`
54976 
54977   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54978   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54979   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54980   # "foo.exe" is OK but "foo" is an error.
54981   #
54982   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54983   # It is also a way to make sure we got the proper file name for the real test later on.
54984   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54985   if test "x$test_shortpath" = x; then
54986     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54987 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54988     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54989   fi
54990 
54991   # Call helper function which possibly converts this using DOS-style short mode.
54992   # If so, the updated path is stored in $new_path.
54993 
54994   input_path="$new_path"
54995   # Check if we need to convert this using DOS-style short mode. If the path
54996   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54997   # take no chances and rewrite it.
54998   # Note: m4 eats our [], so we need to use [ and ] instead.
54999   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55000   if test "x$has_forbidden_chars" != x; then
55001     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55002     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55003     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55004     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55005       # Going to short mode and back again did indeed matter. Since short mode is
55006       # case insensitive, let's make it lowercase to improve readability.
55007       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55008       # Now convert it back to Unix-style (cygpath)
55009       input_path=`$CYGPATH -u "$shortmode_path"`
55010       new_path="$input_path"
55011     fi
55012   fi
55013 
55014   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55015   if test "x$test_cygdrive_prefix" = x; then
55016     # As a simple fix, exclude /usr/bin since it's not a real path.
55017     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55018       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55019       # a path prefixed by /cygdrive for fixpath to work.
55020       new_path="$CYGWIN_ROOT_PATH$input_path"
55021     fi
55022   fi
55023 
55024 
55025   if test "x$path" != "x$new_path"; then
55026     MSVC_DLL="$new_path"
55027     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55028 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55029   fi
55030 
55031     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55032 
55033   path="$MSVC_DLL"
55034   has_colon=`$ECHO $path | $GREP ^.:`
55035   new_path="$path"
55036   if test "x$has_colon" = x; then
55037     # Not in mixed or Windows style, start by that.
55038     new_path=`cmd //c echo $path`
55039   fi
55040 
55041 
55042   input_path="$new_path"
55043   # Check if we need to convert this using DOS-style short mode. If the path
55044   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55045   # take no chances and rewrite it.
55046   # Note: m4 eats our [], so we need to use [ and ] instead.
55047   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55048   if test "x$has_forbidden_chars" != x; then
55049     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55050     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55051   fi
55052 
55053 
55054   windows_path="$new_path"
55055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55056     unix_path=`$CYGPATH -u "$windows_path"`
55057     new_path="$unix_path"
55058   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55059     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55060     new_path="$unix_path"
55061   fi
55062 
55063   if test "x$path" != "x$new_path"; then
55064     MSVC_DLL="$new_path"
55065     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55066 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55067   fi
55068 
55069   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55070   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55071 
55072     else
55073       # We're on a unix platform. Hooray! :)
55074       path="$MSVC_DLL"
55075       has_space=`$ECHO "$path" | $GREP " "`
55076       if test "x$has_space" != x; then
55077         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55078 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55079         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55080       fi
55081 
55082       # Use eval to expand a potential ~
55083       eval path="$path"
55084       if test ! -f "$path" && test ! -d "$path"; then
55085         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55086       fi
55087 
55088       if test -d "$path"; then
55089         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55090       else
55091         dir="`$DIRNAME "$path"`"
55092         base="`$BASENAME "$path"`"
55093         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55094       fi
55095     fi
55096   fi
55097 
55098       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55099 $as_echo_n "checking for $DLL_NAME... " >&6; }
55100       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55101 $as_echo "$MSVC_DLL" >&6; }
55102     else
55103       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55104 $as_echo "incorrect, ignoring" >&6; }
55105       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55106 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55107     fi
55108   fi
55109 
55110       if test "x$MSVC_DLL" = x; then
55111         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55112       fi
55113       MSVCP_DLL="$MSVC_DLL"
55114     else
55115 
55116   DLL_NAME="${MSVCP_NAME}"
55117   MSVC_DLL=
55118 
55119   if test "x$MSVC_DLL" = x; then
55120     # Probe: Using well-known location from Visual Studio 10.0
55121     if test "x$VCINSTALLDIR" != x; then
55122       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55123 
55124   windows_path="$CYGWIN_VC_INSTALL_DIR"
55125   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55126     unix_path=`$CYGPATH -u "$windows_path"`
55127     CYGWIN_VC_INSTALL_DIR="$unix_path"
55128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55129     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55130     CYGWIN_VC_INSTALL_DIR="$unix_path"
55131   fi
55132 
55133       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55134         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55135       else
55136         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55137       fi
55138       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55139 
55140   DLL_NAME="$DLL_NAME"
55141   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55142   METHOD="well-known location in VCINSTALLDIR"
55143   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55144     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55145 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55146 
55147     # Need to check if the found msvcr is correct architecture
55148     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55149 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55150     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55151     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55152       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55153       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55154       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55155         CORRECT_MSVCR_ARCH="PE32 executable"
55156       else
55157         CORRECT_MSVCR_ARCH="PE32+ executable"
55158       fi
55159     else
55160       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55161         CORRECT_MSVCR_ARCH=386
55162       else
55163         CORRECT_MSVCR_ARCH=x86-64
55164       fi
55165     fi
55166     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55167       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55168 $as_echo "ok" >&6; }
55169       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55170 
55171   # Only process if variable expands to non-empty
55172 
55173   if test "x$MSVC_DLL" != x; then
55174     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55175 
55176   # Input might be given as Windows format, start by converting to
55177   # unix format.
55178   path="$MSVC_DLL"
55179   new_path=`$CYGPATH -u "$path"`
55180 
55181   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55182   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55183   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55184   # "foo.exe" is OK but "foo" is an error.
55185   #
55186   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55187   # It is also a way to make sure we got the proper file name for the real test later on.
55188   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55189   if test "x$test_shortpath" = x; then
55190     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55191 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55192     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55193   fi
55194 
55195   # Call helper function which possibly converts this using DOS-style short mode.
55196   # If so, the updated path is stored in $new_path.
55197 
55198   input_path="$new_path"
55199   # Check if we need to convert this using DOS-style short mode. If the path
55200   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55201   # take no chances and rewrite it.
55202   # Note: m4 eats our [], so we need to use [ and ] instead.
55203   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55204   if test "x$has_forbidden_chars" != x; then
55205     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55206     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55207     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55208     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55209       # Going to short mode and back again did indeed matter. Since short mode is
55210       # case insensitive, let's make it lowercase to improve readability.
55211       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55212       # Now convert it back to Unix-style (cygpath)
55213       input_path=`$CYGPATH -u "$shortmode_path"`
55214       new_path="$input_path"
55215     fi
55216   fi
55217 
55218   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55219   if test "x$test_cygdrive_prefix" = x; then
55220     # As a simple fix, exclude /usr/bin since it's not a real path.
55221     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55222       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55223       # a path prefixed by /cygdrive for fixpath to work.
55224       new_path="$CYGWIN_ROOT_PATH$input_path"
55225     fi
55226   fi
55227 
55228 
55229   if test "x$path" != "x$new_path"; then
55230     MSVC_DLL="$new_path"
55231     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55232 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55233   fi
55234 
55235     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55236 
55237   path="$MSVC_DLL"
55238   has_colon=`$ECHO $path | $GREP ^.:`
55239   new_path="$path"
55240   if test "x$has_colon" = x; then
55241     # Not in mixed or Windows style, start by that.
55242     new_path=`cmd //c echo $path`
55243   fi
55244 
55245 
55246   input_path="$new_path"
55247   # Check if we need to convert this using DOS-style short mode. If the path
55248   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55249   # take no chances and rewrite it.
55250   # Note: m4 eats our [], so we need to use [ and ] instead.
55251   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55252   if test "x$has_forbidden_chars" != x; then
55253     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55254     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55255   fi
55256 
55257 
55258   windows_path="$new_path"
55259   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55260     unix_path=`$CYGPATH -u "$windows_path"`
55261     new_path="$unix_path"
55262   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55263     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55264     new_path="$unix_path"
55265   fi
55266 
55267   if test "x$path" != "x$new_path"; then
55268     MSVC_DLL="$new_path"
55269     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55270 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55271   fi
55272 
55273   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55274   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55275 
55276     else
55277       # We're on a unix platform. Hooray! :)
55278       path="$MSVC_DLL"
55279       has_space=`$ECHO "$path" | $GREP " "`
55280       if test "x$has_space" != x; then
55281         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55282 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55283         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55284       fi
55285 
55286       # Use eval to expand a potential ~
55287       eval path="$path"
55288       if test ! -f "$path" && test ! -d "$path"; then
55289         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55290       fi
55291 
55292       if test -d "$path"; then
55293         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55294       else
55295         dir="`$DIRNAME "$path"`"
55296         base="`$BASENAME "$path"`"
55297         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55298       fi
55299     fi
55300   fi
55301 
55302       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55303 $as_echo_n "checking for $DLL_NAME... " >&6; }
55304       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55305 $as_echo "$MSVC_DLL" >&6; }
55306     else
55307       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55308 $as_echo "incorrect, ignoring" >&6; }
55309       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55310 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55311     fi
55312   fi
55313 
55314     fi
55315   fi
55316 
55317   if test "x$MSVC_DLL" = x; then
55318     # Probe: Check in the Boot JDK directory.
55319     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55320 
55321   DLL_NAME="$DLL_NAME"
55322   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55323   METHOD="well-known location in Boot JDK"
55324   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55325     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55326 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55327 
55328     # Need to check if the found msvcr is correct architecture
55329     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55330 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55331     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55332     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55333       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55334       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55335       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55336         CORRECT_MSVCR_ARCH="PE32 executable"
55337       else
55338         CORRECT_MSVCR_ARCH="PE32+ executable"
55339       fi
55340     else
55341       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55342         CORRECT_MSVCR_ARCH=386
55343       else
55344         CORRECT_MSVCR_ARCH=x86-64
55345       fi
55346     fi
55347     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55348       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55349 $as_echo "ok" >&6; }
55350       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55351 
55352   # Only process if variable expands to non-empty
55353 
55354   if test "x$MSVC_DLL" != x; then
55355     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55356 
55357   # Input might be given as Windows format, start by converting to
55358   # unix format.
55359   path="$MSVC_DLL"
55360   new_path=`$CYGPATH -u "$path"`
55361 
55362   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55363   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55364   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55365   # "foo.exe" is OK but "foo" is an error.
55366   #
55367   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55368   # It is also a way to make sure we got the proper file name for the real test later on.
55369   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55370   if test "x$test_shortpath" = x; then
55371     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55372 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55373     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55374   fi
55375 
55376   # Call helper function which possibly converts this using DOS-style short mode.
55377   # If so, the updated path is stored in $new_path.
55378 
55379   input_path="$new_path"
55380   # Check if we need to convert this using DOS-style short mode. If the path
55381   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55382   # take no chances and rewrite it.
55383   # Note: m4 eats our [], so we need to use [ and ] instead.
55384   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55385   if test "x$has_forbidden_chars" != x; then
55386     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55387     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55388     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55389     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55390       # Going to short mode and back again did indeed matter. Since short mode is
55391       # case insensitive, let's make it lowercase to improve readability.
55392       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55393       # Now convert it back to Unix-style (cygpath)
55394       input_path=`$CYGPATH -u "$shortmode_path"`
55395       new_path="$input_path"
55396     fi
55397   fi
55398 
55399   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55400   if test "x$test_cygdrive_prefix" = x; then
55401     # As a simple fix, exclude /usr/bin since it's not a real path.
55402     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55403       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55404       # a path prefixed by /cygdrive for fixpath to work.
55405       new_path="$CYGWIN_ROOT_PATH$input_path"
55406     fi
55407   fi
55408 
55409 
55410   if test "x$path" != "x$new_path"; then
55411     MSVC_DLL="$new_path"
55412     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55413 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55414   fi
55415 
55416     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55417 
55418   path="$MSVC_DLL"
55419   has_colon=`$ECHO $path | $GREP ^.:`
55420   new_path="$path"
55421   if test "x$has_colon" = x; then
55422     # Not in mixed or Windows style, start by that.
55423     new_path=`cmd //c echo $path`
55424   fi
55425 
55426 
55427   input_path="$new_path"
55428   # Check if we need to convert this using DOS-style short mode. If the path
55429   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55430   # take no chances and rewrite it.
55431   # Note: m4 eats our [], so we need to use [ and ] instead.
55432   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55433   if test "x$has_forbidden_chars" != x; then
55434     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55435     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55436   fi
55437 
55438 
55439   windows_path="$new_path"
55440   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55441     unix_path=`$CYGPATH -u "$windows_path"`
55442     new_path="$unix_path"
55443   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55444     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55445     new_path="$unix_path"
55446   fi
55447 
55448   if test "x$path" != "x$new_path"; then
55449     MSVC_DLL="$new_path"
55450     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55451 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55452   fi
55453 
55454   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55455   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55456 
55457     else
55458       # We're on a unix platform. Hooray! :)
55459       path="$MSVC_DLL"
55460       has_space=`$ECHO "$path" | $GREP " "`
55461       if test "x$has_space" != x; then
55462         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55463 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55464         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55465       fi
55466 
55467       # Use eval to expand a potential ~
55468       eval path="$path"
55469       if test ! -f "$path" && test ! -d "$path"; then
55470         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55471       fi
55472 
55473       if test -d "$path"; then
55474         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55475       else
55476         dir="`$DIRNAME "$path"`"
55477         base="`$BASENAME "$path"`"
55478         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55479       fi
55480     fi
55481   fi
55482 
55483       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55484 $as_echo_n "checking for $DLL_NAME... " >&6; }
55485       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55486 $as_echo "$MSVC_DLL" >&6; }
55487     else
55488       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55489 $as_echo "incorrect, ignoring" >&6; }
55490       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55491 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55492     fi
55493   fi
55494 
55495   fi
55496 
55497   if test "x$MSVC_DLL" = x; then
55498     # Probe: Look in the Windows system32 directory
55499     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55500 
55501   windows_path="$CYGWIN_SYSTEMROOT"
55502   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55503     unix_path=`$CYGPATH -u "$windows_path"`
55504     CYGWIN_SYSTEMROOT="$unix_path"
55505   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55506     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55507     CYGWIN_SYSTEMROOT="$unix_path"
55508   fi
55509 
55510     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55511 
55512   DLL_NAME="$DLL_NAME"
55513   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55514   METHOD="well-known location in SYSTEMROOT"
55515   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55516     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55517 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55518 
55519     # Need to check if the found msvcr is correct architecture
55520     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55521 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55522     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55523     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55524       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55525       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55526       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55527         CORRECT_MSVCR_ARCH="PE32 executable"
55528       else
55529         CORRECT_MSVCR_ARCH="PE32+ executable"
55530       fi
55531     else
55532       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55533         CORRECT_MSVCR_ARCH=386
55534       else
55535         CORRECT_MSVCR_ARCH=x86-64
55536       fi
55537     fi
55538     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55539       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55540 $as_echo "ok" >&6; }
55541       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55542 
55543   # Only process if variable expands to non-empty
55544 
55545   if test "x$MSVC_DLL" != x; then
55546     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55547 
55548   # Input might be given as Windows format, start by converting to
55549   # unix format.
55550   path="$MSVC_DLL"
55551   new_path=`$CYGPATH -u "$path"`
55552 
55553   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55554   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55555   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55556   # "foo.exe" is OK but "foo" is an error.
55557   #
55558   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55559   # It is also a way to make sure we got the proper file name for the real test later on.
55560   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55561   if test "x$test_shortpath" = x; then
55562     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55563 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55564     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55565   fi
55566 
55567   # Call helper function which possibly converts this using DOS-style short mode.
55568   # If so, the updated path is stored in $new_path.
55569 
55570   input_path="$new_path"
55571   # Check if we need to convert this using DOS-style short mode. If the path
55572   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55573   # take no chances and rewrite it.
55574   # Note: m4 eats our [], so we need to use [ and ] instead.
55575   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55576   if test "x$has_forbidden_chars" != x; then
55577     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55578     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55579     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55580     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55581       # Going to short mode and back again did indeed matter. Since short mode is
55582       # case insensitive, let's make it lowercase to improve readability.
55583       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55584       # Now convert it back to Unix-style (cygpath)
55585       input_path=`$CYGPATH -u "$shortmode_path"`
55586       new_path="$input_path"
55587     fi
55588   fi
55589 
55590   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55591   if test "x$test_cygdrive_prefix" = x; then
55592     # As a simple fix, exclude /usr/bin since it's not a real path.
55593     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55594       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55595       # a path prefixed by /cygdrive for fixpath to work.
55596       new_path="$CYGWIN_ROOT_PATH$input_path"
55597     fi
55598   fi
55599 
55600 
55601   if test "x$path" != "x$new_path"; then
55602     MSVC_DLL="$new_path"
55603     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55604 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55605   fi
55606 
55607     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55608 
55609   path="$MSVC_DLL"
55610   has_colon=`$ECHO $path | $GREP ^.:`
55611   new_path="$path"
55612   if test "x$has_colon" = x; then
55613     # Not in mixed or Windows style, start by that.
55614     new_path=`cmd //c echo $path`
55615   fi
55616 
55617 
55618   input_path="$new_path"
55619   # Check if we need to convert this using DOS-style short mode. If the path
55620   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55621   # take no chances and rewrite it.
55622   # Note: m4 eats our [], so we need to use [ and ] instead.
55623   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55624   if test "x$has_forbidden_chars" != x; then
55625     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55626     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55627   fi
55628 
55629 
55630   windows_path="$new_path"
55631   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55632     unix_path=`$CYGPATH -u "$windows_path"`
55633     new_path="$unix_path"
55634   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55635     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55636     new_path="$unix_path"
55637   fi
55638 
55639   if test "x$path" != "x$new_path"; then
55640     MSVC_DLL="$new_path"
55641     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55642 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55643   fi
55644 
55645   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55646   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55647 
55648     else
55649       # We're on a unix platform. Hooray! :)
55650       path="$MSVC_DLL"
55651       has_space=`$ECHO "$path" | $GREP " "`
55652       if test "x$has_space" != x; then
55653         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55654 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55655         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55656       fi
55657 
55658       # Use eval to expand a potential ~
55659       eval path="$path"
55660       if test ! -f "$path" && test ! -d "$path"; then
55661         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55662       fi
55663 
55664       if test -d "$path"; then
55665         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55666       else
55667         dir="`$DIRNAME "$path"`"
55668         base="`$BASENAME "$path"`"
55669         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55670       fi
55671     fi
55672   fi
55673 
55674       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55675 $as_echo_n "checking for $DLL_NAME... " >&6; }
55676       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55677 $as_echo "$MSVC_DLL" >&6; }
55678     else
55679       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55680 $as_echo "incorrect, ignoring" >&6; }
55681       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55682 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55683     fi
55684   fi
55685 
55686   fi
55687 
55688   if test "x$MSVC_DLL" = x; then
55689     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55690     if test "x$VS100COMNTOOLS" != x; then
55691       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55692 
55693   windows_path="$CYGWIN_VS_TOOLS_DIR"
55694   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55695     unix_path=`$CYGPATH -u "$windows_path"`
55696     CYGWIN_VS_TOOLS_DIR="$unix_path"
55697   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55698     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55699     CYGWIN_VS_TOOLS_DIR="$unix_path"
55700   fi
55701 
55702       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55703         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55704             | $GREP -i /x64/ | $HEAD --lines 1`
55705       else
55706         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55707             | $GREP -i /x86/ | $HEAD --lines 1`
55708       fi
55709 
55710   DLL_NAME="$DLL_NAME"
55711   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55712   METHOD="search of VS100COMNTOOLS"
55713   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55714     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55715 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55716 
55717     # Need to check if the found msvcr is correct architecture
55718     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55719 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55720     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55721     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55722       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55723       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55724       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55725         CORRECT_MSVCR_ARCH="PE32 executable"
55726       else
55727         CORRECT_MSVCR_ARCH="PE32+ executable"
55728       fi
55729     else
55730       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55731         CORRECT_MSVCR_ARCH=386
55732       else
55733         CORRECT_MSVCR_ARCH=x86-64
55734       fi
55735     fi
55736     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55737       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55738 $as_echo "ok" >&6; }
55739       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55740 
55741   # Only process if variable expands to non-empty
55742 
55743   if test "x$MSVC_DLL" != x; then
55744     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55745 
55746   # Input might be given as Windows format, start by converting to
55747   # unix format.
55748   path="$MSVC_DLL"
55749   new_path=`$CYGPATH -u "$path"`
55750 
55751   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55752   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55753   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55754   # "foo.exe" is OK but "foo" is an error.
55755   #
55756   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55757   # It is also a way to make sure we got the proper file name for the real test later on.
55758   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55759   if test "x$test_shortpath" = x; then
55760     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55761 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55762     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55763   fi
55764 
55765   # Call helper function which possibly converts this using DOS-style short mode.
55766   # If so, the updated path is stored in $new_path.
55767 
55768   input_path="$new_path"
55769   # Check if we need to convert this using DOS-style short mode. If the path
55770   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55771   # take no chances and rewrite it.
55772   # Note: m4 eats our [], so we need to use [ and ] instead.
55773   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55774   if test "x$has_forbidden_chars" != x; then
55775     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55776     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55777     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55778     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55779       # Going to short mode and back again did indeed matter. Since short mode is
55780       # case insensitive, let's make it lowercase to improve readability.
55781       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55782       # Now convert it back to Unix-style (cygpath)
55783       input_path=`$CYGPATH -u "$shortmode_path"`
55784       new_path="$input_path"
55785     fi
55786   fi
55787 
55788   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55789   if test "x$test_cygdrive_prefix" = x; then
55790     # As a simple fix, exclude /usr/bin since it's not a real path.
55791     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55792       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55793       # a path prefixed by /cygdrive for fixpath to work.
55794       new_path="$CYGWIN_ROOT_PATH$input_path"
55795     fi
55796   fi
55797 
55798 
55799   if test "x$path" != "x$new_path"; then
55800     MSVC_DLL="$new_path"
55801     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55802 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55803   fi
55804 
55805     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55806 
55807   path="$MSVC_DLL"
55808   has_colon=`$ECHO $path | $GREP ^.:`
55809   new_path="$path"
55810   if test "x$has_colon" = x; then
55811     # Not in mixed or Windows style, start by that.
55812     new_path=`cmd //c echo $path`
55813   fi
55814 
55815 
55816   input_path="$new_path"
55817   # Check if we need to convert this using DOS-style short mode. If the path
55818   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55819   # take no chances and rewrite it.
55820   # Note: m4 eats our [], so we need to use [ and ] instead.
55821   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55822   if test "x$has_forbidden_chars" != x; then
55823     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55824     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55825   fi
55826 
55827 
55828   windows_path="$new_path"
55829   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55830     unix_path=`$CYGPATH -u "$windows_path"`
55831     new_path="$unix_path"
55832   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55833     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55834     new_path="$unix_path"
55835   fi
55836 
55837   if test "x$path" != "x$new_path"; then
55838     MSVC_DLL="$new_path"
55839     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55840 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55841   fi
55842 
55843   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55844   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55845 
55846     else
55847       # We're on a unix platform. Hooray! :)
55848       path="$MSVC_DLL"
55849       has_space=`$ECHO "$path" | $GREP " "`
55850       if test "x$has_space" != x; then
55851         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55852 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55853         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55854       fi
55855 
55856       # Use eval to expand a potential ~
55857       eval path="$path"
55858       if test ! -f "$path" && test ! -d "$path"; then
55859         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55860       fi
55861 
55862       if test -d "$path"; then
55863         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55864       else
55865         dir="`$DIRNAME "$path"`"
55866         base="`$BASENAME "$path"`"
55867         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55868       fi
55869     fi
55870   fi
55871 
55872       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55873 $as_echo_n "checking for $DLL_NAME... " >&6; }
55874       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55875 $as_echo "$MSVC_DLL" >&6; }
55876     else
55877       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55878 $as_echo "incorrect, ignoring" >&6; }
55879       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55880 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55881     fi
55882   fi
55883 
55884     fi
55885   fi
55886 
55887   if test "x$MSVC_DLL" = x; then
55888     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55889     # (This was the original behaviour; kept since it might turn something up)
55890     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55891       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55892         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55893             | $GREP x64 | $HEAD --lines 1`
55894       else
55895         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55896             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55897         if test "x$POSSIBLE_MSVC_DLL" = x; then
55898           # We're grasping at straws now...
55899           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55900               | $HEAD --lines 1`
55901         fi
55902       fi
55903 
55904 
55905   DLL_NAME="$DLL_NAME"
55906   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55907   METHOD="search of VCINSTALLDIR"
55908   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55909     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55910 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55911 
55912     # Need to check if the found msvcr is correct architecture
55913     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55914 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55915     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55916     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55917       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55918       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55919       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55920         CORRECT_MSVCR_ARCH="PE32 executable"
55921       else
55922         CORRECT_MSVCR_ARCH="PE32+ executable"
55923       fi
55924     else
55925       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55926         CORRECT_MSVCR_ARCH=386
55927       else
55928         CORRECT_MSVCR_ARCH=x86-64
55929       fi
55930     fi
55931     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55932       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55933 $as_echo "ok" >&6; }
55934       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55935 
55936   # Only process if variable expands to non-empty
55937 
55938   if test "x$MSVC_DLL" != x; then
55939     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55940 
55941   # Input might be given as Windows format, start by converting to
55942   # unix format.
55943   path="$MSVC_DLL"
55944   new_path=`$CYGPATH -u "$path"`
55945 
55946   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55947   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55948   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55949   # "foo.exe" is OK but "foo" is an error.
55950   #
55951   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55952   # It is also a way to make sure we got the proper file name for the real test later on.
55953   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55954   if test "x$test_shortpath" = x; then
55955     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55956 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55957     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55958   fi
55959 
55960   # Call helper function which possibly converts this using DOS-style short mode.
55961   # If so, the updated path is stored in $new_path.
55962 
55963   input_path="$new_path"
55964   # Check if we need to convert this using DOS-style short mode. If the path
55965   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55966   # take no chances and rewrite it.
55967   # Note: m4 eats our [], so we need to use [ and ] instead.
55968   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55969   if test "x$has_forbidden_chars" != x; then
55970     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55971     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55972     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55973     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55974       # Going to short mode and back again did indeed matter. Since short mode is
55975       # case insensitive, let's make it lowercase to improve readability.
55976       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55977       # Now convert it back to Unix-style (cygpath)
55978       input_path=`$CYGPATH -u "$shortmode_path"`
55979       new_path="$input_path"
55980     fi
55981   fi
55982 
55983   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55984   if test "x$test_cygdrive_prefix" = x; then
55985     # As a simple fix, exclude /usr/bin since it's not a real path.
55986     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55987       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55988       # a path prefixed by /cygdrive for fixpath to work.
55989       new_path="$CYGWIN_ROOT_PATH$input_path"
55990     fi
55991   fi
55992 
55993 
55994   if test "x$path" != "x$new_path"; then
55995     MSVC_DLL="$new_path"
55996     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55997 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55998   fi
55999 
56000     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56001 
56002   path="$MSVC_DLL"
56003   has_colon=`$ECHO $path | $GREP ^.:`
56004   new_path="$path"
56005   if test "x$has_colon" = x; then
56006     # Not in mixed or Windows style, start by that.
56007     new_path=`cmd //c echo $path`
56008   fi
56009 
56010 
56011   input_path="$new_path"
56012   # Check if we need to convert this using DOS-style short mode. If the path
56013   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56014   # take no chances and rewrite it.
56015   # Note: m4 eats our [], so we need to use [ and ] instead.
56016   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56017   if test "x$has_forbidden_chars" != x; then
56018     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56019     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56020   fi
56021 
56022 
56023   windows_path="$new_path"
56024   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56025     unix_path=`$CYGPATH -u "$windows_path"`
56026     new_path="$unix_path"
56027   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56028     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56029     new_path="$unix_path"
56030   fi
56031 
56032   if test "x$path" != "x$new_path"; then
56033     MSVC_DLL="$new_path"
56034     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56035 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56036   fi
56037 
56038   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56039   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56040 
56041     else
56042       # We're on a unix platform. Hooray! :)
56043       path="$MSVC_DLL"
56044       has_space=`$ECHO "$path" | $GREP " "`
56045       if test "x$has_space" != x; then
56046         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56047 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56048         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56049       fi
56050 
56051       # Use eval to expand a potential ~
56052       eval path="$path"
56053       if test ! -f "$path" && test ! -d "$path"; then
56054         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56055       fi
56056 
56057       if test -d "$path"; then
56058         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56059       else
56060         dir="`$DIRNAME "$path"`"
56061         base="`$BASENAME "$path"`"
56062         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56063       fi
56064     fi
56065   fi
56066 
56067       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56068 $as_echo_n "checking for $DLL_NAME... " >&6; }
56069       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56070 $as_echo "$MSVC_DLL" >&6; }
56071     else
56072       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56073 $as_echo "incorrect, ignoring" >&6; }
56074       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56075 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56076     fi
56077   fi
56078 
56079     fi
56080   fi
56081 
56082   if test "x$MSVC_DLL" = x; then
56083     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56084 $as_echo_n "checking for $DLL_NAME... " >&6; }
56085     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56086 $as_echo "no" >&6; }
56087     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56088   fi
56089 
56090       MSVCP_DLL="$MSVC_DLL"
56091     fi
56092 
56093   fi
56094 
56095   fi
56096 
56097 
56098   if test "x$NEEDS_LIB_X11" = xfalse; then
56099     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56100       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56101 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56102     fi
56103     X_CFLAGS=
56104     X_LIBS=
56105   else
56106 
56107     if test "x${with_x}" = xno; then
56108       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56109     fi
56110 
56111     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56112       # The user has specified a X11 base directory. Use it for includes and
56113       # libraries, unless explicitely overridden.
56114       if test "x$x_includes" = xNONE; then
56115         x_includes="${with_x}/include"
56116       fi
56117       if test "x$x_libraries" = xNONE; then
56118         x_libraries="${with_x}/lib"
56119       fi
56120     else
56121       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56122       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56123       # --x-libraries for the sysroot, if that seems to be correct.
56124       if test "x$SYSROOT" != "x"; then
56125         if test "x$x_includes" = xNONE; then
56126           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56127             x_includes="$SYSROOT/usr/X11R6/include"
56128           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56129             x_includes="$SYSROOT/usr/include"
56130           fi
56131         fi
56132         if test "x$x_libraries" = xNONE; then
56133           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56134             x_libraries="$SYSROOT/usr/X11R6/lib"
56135           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56136             x_libraries="$SYSROOT/usr/lib64"
56137           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56138             x_libraries="$SYSROOT/usr/lib"
56139           fi
56140         fi
56141       fi
56142     fi
56143 
56144     # Now let autoconf do it's magic
56145     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56146 $as_echo_n "checking for X... " >&6; }
56147 
56148 
56149 # Check whether --with-x was given.
56150 if test "${with_x+set}" = set; then :
56151   withval=$with_x;
56152 fi
56153 
56154 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56155 if test "x$with_x" = xno; then
56156   # The user explicitly disabled X.
56157   have_x=disabled
56158 else
56159   case $x_includes,$x_libraries in #(
56160     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56161     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56162   $as_echo_n "(cached) " >&6
56163 else
56164   # One or both of the vars are not set, and there is no cached value.
56165 ac_x_includes=no ac_x_libraries=no
56166 rm -f -r conftest.dir
56167 if mkdir conftest.dir; then
56168   cd conftest.dir
56169   cat >Imakefile <<'_ACEOF'
56170 incroot:
56171         @echo incroot='${INCROOT}'
56172 usrlibdir:
56173         @echo usrlibdir='${USRLIBDIR}'
56174 libdir:
56175         @echo libdir='${LIBDIR}'
56176 _ACEOF
56177   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56178     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56179     for ac_var in incroot usrlibdir libdir; do
56180       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56181     done
56182     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56183     for ac_extension in a so sl dylib la dll; do
56184       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56185          test -f "$ac_im_libdir/libX11.$ac_extension"; then
56186         ac_im_usrlibdir=$ac_im_libdir; break
56187       fi
56188     done
56189     # Screen out bogus values from the imake configuration.  They are
56190     # bogus both because they are the default anyway, and because
56191     # using them would break gcc on systems where it needs fixed includes.
56192     case $ac_im_incroot in
56193         /usr/include) ac_x_includes= ;;
56194         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56195     esac
56196     case $ac_im_usrlibdir in
56197         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
56198         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56199     esac
56200   fi
56201   cd ..
56202   rm -f -r conftest.dir
56203 fi
56204 
56205 # Standard set of common directories for X headers.
56206 # Check X11 before X11Rn because it is often a symlink to the current release.
56207 ac_x_header_dirs='
56208 /usr/X11/include
56209 /usr/X11R7/include
56210 /usr/X11R6/include
56211 /usr/X11R5/include
56212 /usr/X11R4/include
56213 
56214 /usr/include/X11
56215 /usr/include/X11R7
56216 /usr/include/X11R6
56217 /usr/include/X11R5
56218 /usr/include/X11R4
56219 
56220 /usr/local/X11/include
56221 /usr/local/X11R7/include
56222 /usr/local/X11R6/include
56223 /usr/local/X11R5/include
56224 /usr/local/X11R4/include
56225 
56226 /usr/local/include/X11
56227 /usr/local/include/X11R7
56228 /usr/local/include/X11R6
56229 /usr/local/include/X11R5
56230 /usr/local/include/X11R4
56231 
56232 /usr/X386/include
56233 /usr/x386/include
56234 /usr/XFree86/include/X11
56235 
56236 /usr/include
56237 /usr/local/include
56238 /usr/unsupported/include
56239 /usr/athena/include
56240 /usr/local/x11r5/include
56241 /usr/lpp/Xamples/include
56242 
56243 /usr/openwin/include
56244 /usr/openwin/share/include'
56245 
56246 if test "$ac_x_includes" = no; then
56247   # Guess where to find include files, by looking for Xlib.h.
56248   # First, try using that file with no special directory specified.
56249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56250 /* end confdefs.h.  */
56251 #include <X11/Xlib.h>
56252 _ACEOF
56253 if ac_fn_cxx_try_cpp "$LINENO"; then :
56254   # We can compile using X headers with no special include directory.
56255 ac_x_includes=
56256 else
56257   for ac_dir in $ac_x_header_dirs; do
56258   if test -r "$ac_dir/X11/Xlib.h"; then
56259     ac_x_includes=$ac_dir
56260     break
56261   fi
56262 done
56263 fi
56264 rm -f conftest.err conftest.i conftest.$ac_ext
56265 fi # $ac_x_includes = no
56266 
56267 if test "$ac_x_libraries" = no; then
56268   # Check for the libraries.
56269   # See if we find them without any special options.
56270   # Don't add to $LIBS permanently.
56271   ac_save_LIBS=$LIBS
56272   LIBS="-lX11 $LIBS"
56273   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56274 /* end confdefs.h.  */
56275 #include <X11/Xlib.h>
56276 int
56277 main ()
56278 {
56279 XrmInitialize ()
56280   ;
56281   return 0;
56282 }
56283 _ACEOF
56284 if ac_fn_cxx_try_link "$LINENO"; then :
56285   LIBS=$ac_save_LIBS
56286 # We can link X programs with no special library path.
56287 ac_x_libraries=
56288 else
56289   LIBS=$ac_save_LIBS
56290 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56291 do
56292   # Don't even attempt the hair of trying to link an X program!
56293   for ac_extension in a so sl dylib la dll; do
56294     if test -r "$ac_dir/libX11.$ac_extension"; then
56295       ac_x_libraries=$ac_dir
56296       break 2
56297     fi
56298   done
56299 done
56300 fi
56301 rm -f core conftest.err conftest.$ac_objext \
56302     conftest$ac_exeext conftest.$ac_ext
56303 fi # $ac_x_libraries = no
56304 
56305 case $ac_x_includes,$ac_x_libraries in #(
56306   no,* | *,no | *\'*)
56307     # Didn't find X, or a directory has "'" in its name.
56308     ac_cv_have_x="have_x=no";; #(
56309   *)
56310     # Record where we found X for the cache.
56311     ac_cv_have_x="have_x=yes\
56312         ac_x_includes='$ac_x_includes'\
56313         ac_x_libraries='$ac_x_libraries'"
56314 esac
56315 fi
56316 ;; #(
56317     *) have_x=yes;;
56318   esac
56319   eval "$ac_cv_have_x"
56320 fi # $with_x != no
56321 
56322 if test "$have_x" != yes; then
56323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56324 $as_echo "$have_x" >&6; }
56325   no_x=yes
56326 else
56327   # If each of the values was on the command line, it overrides each guess.
56328   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56329   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56330   # Update the cache value to reflect the command line values.
56331   ac_cv_have_x="have_x=yes\
56332         ac_x_includes='$x_includes'\
56333         ac_x_libraries='$x_libraries'"
56334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56335 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56336 fi
56337 
56338     if test "$no_x" = yes; then
56339   # Not all programs may use this symbol, but it does not hurt to define it.
56340 
56341 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56342 
56343   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56344 else
56345   if test -n "$x_includes"; then
56346     X_CFLAGS="$X_CFLAGS -I$x_includes"
56347   fi
56348 
56349   # It would also be nice to do this for all -L options, not just this one.
56350   if test -n "$x_libraries"; then
56351     X_LIBS="$X_LIBS -L$x_libraries"
56352     # For Solaris; some versions of Sun CC require a space after -R and
56353     # others require no space.  Words are not sufficient . . . .
56354     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56355 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
56356     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56357     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56358     ac_cxx_werror_flag=yes
56359     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56360 /* end confdefs.h.  */
56361 
56362 int
56363 main ()
56364 {
56365 
56366   ;
56367   return 0;
56368 }
56369 _ACEOF
56370 if ac_fn_cxx_try_link "$LINENO"; then :
56371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56372 $as_echo "no" >&6; }
56373        X_LIBS="$X_LIBS -R$x_libraries"
56374 else
56375   LIBS="$ac_xsave_LIBS -R $x_libraries"
56376        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56377 /* end confdefs.h.  */
56378 
56379 int
56380 main ()
56381 {
56382 
56383   ;
56384   return 0;
56385 }
56386 _ACEOF
56387 if ac_fn_cxx_try_link "$LINENO"; then :
56388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56389 $as_echo "yes" >&6; }
56390           X_LIBS="$X_LIBS -R $x_libraries"
56391 else
56392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56393 $as_echo "neither works" >&6; }
56394 fi
56395 rm -f core conftest.err conftest.$ac_objext \
56396     conftest$ac_exeext conftest.$ac_ext
56397 fi
56398 rm -f core conftest.err conftest.$ac_objext \
56399     conftest$ac_exeext conftest.$ac_ext
56400     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56401     LIBS=$ac_xsave_LIBS
56402   fi
56403 
56404   # Check for system-dependent libraries X programs must link with.
56405   # Do this before checking for the system-independent R6 libraries
56406   # (-lICE), since we may need -lsocket or whatever for X linking.
56407 
56408   if test "$ISC" = yes; then
56409     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56410   else
56411     # Martyn Johnson says this is needed for Ultrix, if the X
56412     # libraries were built with DECnet support.  And Karl Berry says
56413     # the Alpha needs dnet_stub (dnet does not exist).
56414     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56415     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56416 /* end confdefs.h.  */
56417 
56418 /* Override any GCC internal prototype to avoid an error.
56419    Use char because int might match the return type of a GCC
56420    builtin and then its argument prototype would still apply.  */
56421 #ifdef __cplusplus
56422 extern "C"
56423 #endif
56424 char XOpenDisplay ();
56425 int
56426 main ()
56427 {
56428 return XOpenDisplay ();
56429   ;
56430   return 0;
56431 }
56432 _ACEOF
56433 if ac_fn_cxx_try_link "$LINENO"; then :
56434 
56435 else
56436   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56437 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56438 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56439   $as_echo_n "(cached) " >&6
56440 else
56441   ac_check_lib_save_LIBS=$LIBS
56442 LIBS="-ldnet  $LIBS"
56443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56444 /* end confdefs.h.  */
56445 
56446 /* Override any GCC internal prototype to avoid an error.
56447    Use char because int might match the return type of a GCC
56448    builtin and then its argument prototype would still apply.  */
56449 #ifdef __cplusplus
56450 extern "C"
56451 #endif
56452 char dnet_ntoa ();
56453 int
56454 main ()
56455 {
56456 return dnet_ntoa ();
56457   ;
56458   return 0;
56459 }
56460 _ACEOF
56461 if ac_fn_cxx_try_link "$LINENO"; then :
56462   ac_cv_lib_dnet_dnet_ntoa=yes
56463 else
56464   ac_cv_lib_dnet_dnet_ntoa=no
56465 fi
56466 rm -f core conftest.err conftest.$ac_objext \
56467     conftest$ac_exeext conftest.$ac_ext
56468 LIBS=$ac_check_lib_save_LIBS
56469 fi
56470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56471 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56472 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56473   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56474 fi
56475 
56476     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56477       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56478 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56479 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56480   $as_echo_n "(cached) " >&6
56481 else
56482   ac_check_lib_save_LIBS=$LIBS
56483 LIBS="-ldnet_stub  $LIBS"
56484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56485 /* end confdefs.h.  */
56486 
56487 /* Override any GCC internal prototype to avoid an error.
56488    Use char because int might match the return type of a GCC
56489    builtin and then its argument prototype would still apply.  */
56490 #ifdef __cplusplus
56491 extern "C"
56492 #endif
56493 char dnet_ntoa ();
56494 int
56495 main ()
56496 {
56497 return dnet_ntoa ();
56498   ;
56499   return 0;
56500 }
56501 _ACEOF
56502 if ac_fn_cxx_try_link "$LINENO"; then :
56503   ac_cv_lib_dnet_stub_dnet_ntoa=yes
56504 else
56505   ac_cv_lib_dnet_stub_dnet_ntoa=no
56506 fi
56507 rm -f core conftest.err conftest.$ac_objext \
56508     conftest$ac_exeext conftest.$ac_ext
56509 LIBS=$ac_check_lib_save_LIBS
56510 fi
56511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56512 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56513 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56514   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56515 fi
56516 
56517     fi
56518 fi
56519 rm -f core conftest.err conftest.$ac_objext \
56520     conftest$ac_exeext conftest.$ac_ext
56521     LIBS="$ac_xsave_LIBS"
56522 
56523     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56524     # to get the SysV transport functions.
56525     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56526     # needs -lnsl.
56527     # The nsl library prevents programs from opening the X display
56528     # on Irix 5.2, according to T.E. Dickey.
56529     # The functions gethostbyname, getservbyname, and inet_addr are
56530     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56531     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56532 if test "x$ac_cv_func_gethostbyname" = xyes; then :
56533 
56534 fi
56535 
56536     if test $ac_cv_func_gethostbyname = no; then
56537       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56538 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56539 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56540   $as_echo_n "(cached) " >&6
56541 else
56542   ac_check_lib_save_LIBS=$LIBS
56543 LIBS="-lnsl  $LIBS"
56544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56545 /* end confdefs.h.  */
56546 
56547 /* Override any GCC internal prototype to avoid an error.
56548    Use char because int might match the return type of a GCC
56549    builtin and then its argument prototype would still apply.  */
56550 #ifdef __cplusplus
56551 extern "C"
56552 #endif
56553 char gethostbyname ();
56554 int
56555 main ()
56556 {
56557 return gethostbyname ();
56558   ;
56559   return 0;
56560 }
56561 _ACEOF
56562 if ac_fn_cxx_try_link "$LINENO"; then :
56563   ac_cv_lib_nsl_gethostbyname=yes
56564 else
56565   ac_cv_lib_nsl_gethostbyname=no
56566 fi
56567 rm -f core conftest.err conftest.$ac_objext \
56568     conftest$ac_exeext conftest.$ac_ext
56569 LIBS=$ac_check_lib_save_LIBS
56570 fi
56571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56572 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56573 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56574   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56575 fi
56576 
56577       if test $ac_cv_lib_nsl_gethostbyname = no; then
56578         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56579 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56580 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56581   $as_echo_n "(cached) " >&6
56582 else
56583   ac_check_lib_save_LIBS=$LIBS
56584 LIBS="-lbsd  $LIBS"
56585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56586 /* end confdefs.h.  */
56587 
56588 /* Override any GCC internal prototype to avoid an error.
56589    Use char because int might match the return type of a GCC
56590    builtin and then its argument prototype would still apply.  */
56591 #ifdef __cplusplus
56592 extern "C"
56593 #endif
56594 char gethostbyname ();
56595 int
56596 main ()
56597 {
56598 return gethostbyname ();
56599   ;
56600   return 0;
56601 }
56602 _ACEOF
56603 if ac_fn_cxx_try_link "$LINENO"; then :
56604   ac_cv_lib_bsd_gethostbyname=yes
56605 else
56606   ac_cv_lib_bsd_gethostbyname=no
56607 fi
56608 rm -f core conftest.err conftest.$ac_objext \
56609     conftest$ac_exeext conftest.$ac_ext
56610 LIBS=$ac_check_lib_save_LIBS
56611 fi
56612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56613 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56614 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56615   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56616 fi
56617 
56618       fi
56619     fi
56620 
56621     # lieder@skyler.mavd.honeywell.com says without -lsocket,
56622     # socket/setsockopt and other routines are undefined under SCO ODT
56623     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56624     # on later versions), says Simon Leinen: it contains gethostby*
56625     # variants that don't use the name server (or something).  -lsocket
56626     # must be given before -lnsl if both are needed.  We assume that
56627     # if connect needs -lnsl, so does gethostbyname.
56628     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56629 if test "x$ac_cv_func_connect" = xyes; then :
56630 
56631 fi
56632 
56633     if test $ac_cv_func_connect = no; then
56634       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56635 $as_echo_n "checking for connect in -lsocket... " >&6; }
56636 if ${ac_cv_lib_socket_connect+:} false; then :
56637   $as_echo_n "(cached) " >&6
56638 else
56639   ac_check_lib_save_LIBS=$LIBS
56640 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56642 /* end confdefs.h.  */
56643 
56644 /* Override any GCC internal prototype to avoid an error.
56645    Use char because int might match the return type of a GCC
56646    builtin and then its argument prototype would still apply.  */
56647 #ifdef __cplusplus
56648 extern "C"
56649 #endif
56650 char connect ();
56651 int
56652 main ()
56653 {
56654 return connect ();
56655   ;
56656   return 0;
56657 }
56658 _ACEOF
56659 if ac_fn_cxx_try_link "$LINENO"; then :
56660   ac_cv_lib_socket_connect=yes
56661 else
56662   ac_cv_lib_socket_connect=no
56663 fi
56664 rm -f core conftest.err conftest.$ac_objext \
56665     conftest$ac_exeext conftest.$ac_ext
56666 LIBS=$ac_check_lib_save_LIBS
56667 fi
56668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56669 $as_echo "$ac_cv_lib_socket_connect" >&6; }
56670 if test "x$ac_cv_lib_socket_connect" = xyes; then :
56671   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56672 fi
56673 
56674     fi
56675 
56676     # Guillermo Gomez says -lposix is necessary on A/UX.
56677     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56678 if test "x$ac_cv_func_remove" = xyes; then :
56679 
56680 fi
56681 
56682     if test $ac_cv_func_remove = no; then
56683       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56684 $as_echo_n "checking for remove in -lposix... " >&6; }
56685 if ${ac_cv_lib_posix_remove+:} false; then :
56686   $as_echo_n "(cached) " >&6
56687 else
56688   ac_check_lib_save_LIBS=$LIBS
56689 LIBS="-lposix  $LIBS"
56690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56691 /* end confdefs.h.  */
56692 
56693 /* Override any GCC internal prototype to avoid an error.
56694    Use char because int might match the return type of a GCC
56695    builtin and then its argument prototype would still apply.  */
56696 #ifdef __cplusplus
56697 extern "C"
56698 #endif
56699 char remove ();
56700 int
56701 main ()
56702 {
56703 return remove ();
56704   ;
56705   return 0;
56706 }
56707 _ACEOF
56708 if ac_fn_cxx_try_link "$LINENO"; then :
56709   ac_cv_lib_posix_remove=yes
56710 else
56711   ac_cv_lib_posix_remove=no
56712 fi
56713 rm -f core conftest.err conftest.$ac_objext \
56714     conftest$ac_exeext conftest.$ac_ext
56715 LIBS=$ac_check_lib_save_LIBS
56716 fi
56717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56718 $as_echo "$ac_cv_lib_posix_remove" >&6; }
56719 if test "x$ac_cv_lib_posix_remove" = xyes; then :
56720   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56721 fi
56722 
56723     fi
56724 
56725     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56726     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56727 if test "x$ac_cv_func_shmat" = xyes; then :
56728 
56729 fi
56730 
56731     if test $ac_cv_func_shmat = no; then
56732       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56733 $as_echo_n "checking for shmat in -lipc... " >&6; }
56734 if ${ac_cv_lib_ipc_shmat+:} false; then :
56735   $as_echo_n "(cached) " >&6
56736 else
56737   ac_check_lib_save_LIBS=$LIBS
56738 LIBS="-lipc  $LIBS"
56739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56740 /* end confdefs.h.  */
56741 
56742 /* Override any GCC internal prototype to avoid an error.
56743    Use char because int might match the return type of a GCC
56744    builtin and then its argument prototype would still apply.  */
56745 #ifdef __cplusplus
56746 extern "C"
56747 #endif
56748 char shmat ();
56749 int
56750 main ()
56751 {
56752 return shmat ();
56753   ;
56754   return 0;
56755 }
56756 _ACEOF
56757 if ac_fn_cxx_try_link "$LINENO"; then :
56758   ac_cv_lib_ipc_shmat=yes
56759 else
56760   ac_cv_lib_ipc_shmat=no
56761 fi
56762 rm -f core conftest.err conftest.$ac_objext \
56763     conftest$ac_exeext conftest.$ac_ext
56764 LIBS=$ac_check_lib_save_LIBS
56765 fi
56766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56767 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56768 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56769   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56770 fi
56771 
56772     fi
56773   fi
56774 
56775   # Check for libraries that X11R6 Xt/Xaw programs need.
56776   ac_save_LDFLAGS=$LDFLAGS
56777   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56778   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56779   # check for ICE first), but we must link in the order -lSM -lICE or
56780   # we get undefined symbols.  So assume we have SM if we have ICE.
56781   # These have to be linked with before -lX11, unlike the other
56782   # libraries we check for below, so use a different variable.
56783   # John Interrante, Karl Berry
56784   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56785 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56786 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56787   $as_echo_n "(cached) " >&6
56788 else
56789   ac_check_lib_save_LIBS=$LIBS
56790 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56792 /* end confdefs.h.  */
56793 
56794 /* Override any GCC internal prototype to avoid an error.
56795    Use char because int might match the return type of a GCC
56796    builtin and then its argument prototype would still apply.  */
56797 #ifdef __cplusplus
56798 extern "C"
56799 #endif
56800 char IceConnectionNumber ();
56801 int
56802 main ()
56803 {
56804 return IceConnectionNumber ();
56805   ;
56806   return 0;
56807 }
56808 _ACEOF
56809 if ac_fn_cxx_try_link "$LINENO"; then :
56810   ac_cv_lib_ICE_IceConnectionNumber=yes
56811 else
56812   ac_cv_lib_ICE_IceConnectionNumber=no
56813 fi
56814 rm -f core conftest.err conftest.$ac_objext \
56815     conftest$ac_exeext conftest.$ac_ext
56816 LIBS=$ac_check_lib_save_LIBS
56817 fi
56818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56819 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56820 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56821   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56822 fi
56823 
56824   LDFLAGS=$ac_save_LDFLAGS
56825 
56826 fi
56827 
56828 
56829     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56830     # this doesn't make sense so we remove it.
56831     if test "x$COMPILE_TYPE" = xcross; then
56832       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56833     fi
56834 
56835     if test "x$no_x" = xyes; then
56836 
56837   # Print a helpful message on how to acquire the necessary build dependency.
56838   # x11 is the help tag: freetype, cups, alsa etc
56839   MISSING_DEPENDENCY=x11
56840 
56841   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56842     cygwin_help $MISSING_DEPENDENCY
56843   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56844     msys_help $MISSING_DEPENDENCY
56845   else
56846     PKGHANDLER_COMMAND=
56847 
56848     case $PKGHANDLER in
56849       apt-get)
56850         apt_help     $MISSING_DEPENDENCY ;;
56851       yum)
56852         yum_help     $MISSING_DEPENDENCY ;;
56853       port)
56854         port_help    $MISSING_DEPENDENCY ;;
56855       pkgutil)
56856         pkgutil_help $MISSING_DEPENDENCY ;;
56857       pkgadd)
56858         pkgadd_help  $MISSING_DEPENDENCY ;;
56859     esac
56860 
56861     if test "x$PKGHANDLER_COMMAND" != x; then
56862       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56863     fi
56864   fi
56865 
56866       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56867     fi
56868 
56869     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56870       OPENWIN_HOME="/usr/openwin"
56871       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56872       X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56873           -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56874           -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56875           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56876     fi
56877 
56878     ac_ext=c
56879 ac_cpp='$CPP $CPPFLAGS'
56880 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56881 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56882 ac_compiler_gnu=$ac_cv_c_compiler_gnu
56883 
56884     OLD_CFLAGS="$CFLAGS"
56885     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56886 
56887     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56888     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56889 do :
56890   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56891 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56892           # include <X11/Xlib.h>
56893           # include <X11/Xutil.h>
56894 
56895 
56896 "
56897 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56898   cat >>confdefs.h <<_ACEOF
56899 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56900 _ACEOF
56901  X11_HEADERS_OK=yes
56902 else
56903   X11_HEADERS_OK=no; break
56904 fi
56905 
56906 done
56907 
56908 
56909     if test "x$X11_HEADERS_OK" = xno; then
56910 
56911   # Print a helpful message on how to acquire the necessary build dependency.
56912   # x11 is the help tag: freetype, cups, alsa etc
56913   MISSING_DEPENDENCY=x11
56914 
56915   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56916     cygwin_help $MISSING_DEPENDENCY
56917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56918     msys_help $MISSING_DEPENDENCY
56919   else
56920     PKGHANDLER_COMMAND=
56921 
56922     case $PKGHANDLER in
56923       apt-get)
56924         apt_help     $MISSING_DEPENDENCY ;;
56925       yum)
56926         yum_help     $MISSING_DEPENDENCY ;;
56927       port)
56928         port_help    $MISSING_DEPENDENCY ;;
56929       pkgutil)
56930         pkgutil_help $MISSING_DEPENDENCY ;;
56931       pkgadd)
56932         pkgadd_help  $MISSING_DEPENDENCY ;;
56933     esac
56934 
56935     if test "x$PKGHANDLER_COMMAND" != x; then
56936       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56937     fi
56938   fi
56939 
56940       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56941     fi
56942 
56943     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56944     # defined in libawt_xawt.
56945     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56946 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56947     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56948 /* end confdefs.h.  */
56949 #include <X11/extensions/Xrender.h>
56950 int
56951 main ()
56952 {
56953 XLinearGradient x;
56954   ;
56955   return 0;
56956 }
56957 _ACEOF
56958 if ac_fn_c_try_compile "$LINENO"; then :
56959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56960 $as_echo "yes" >&6; }
56961 else
56962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56963 $as_echo "no" >&6; }
56964          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56965 fi
56966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56967 
56968     CFLAGS="$OLD_CFLAGS"
56969     ac_ext=cpp
56970 ac_cpp='$CXXCPP $CPPFLAGS'
56971 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56972 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56973 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56974 
56975   fi # NEEDS_LIB_X11
56976 
56977 
56978 
56979 
56980 
56981 
56982 # Check whether --with-cups was given.
56983 if test "${with_cups+set}" = set; then :
56984   withval=$with_cups;
56985 fi
56986 
56987 
56988 # Check whether --with-cups-include was given.
56989 if test "${with_cups_include+set}" = set; then :
56990   withval=$with_cups_include;
56991 fi
56992 
56993 
56994   if test "x$NEEDS_LIB_CUPS" = xfalse; then
56995     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56996         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56997       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56998 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56999     fi
57000     CUPS_CFLAGS=
57001   else
57002     CUPS_FOUND=no
57003 
57004     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57005       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57006     fi
57007 
57008     if test "x${with_cups}" != x; then
57009       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57010 $as_echo_n "checking for cups headers... " >&6; }
57011       if test -s "${with_cups}/include/cups/cups.h"; then
57012         CUPS_CFLAGS="-I${with_cups}/include"
57013         CUPS_FOUND=yes
57014         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57015 $as_echo "$CUPS_FOUND" >&6; }
57016       else
57017         as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57018       fi
57019     fi
57020     if test "x${with_cups_include}" != x; then
57021       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57022 $as_echo_n "checking for cups headers... " >&6; }
57023       if test -s "${with_cups_include}/cups/cups.h"; then
57024         CUPS_CFLAGS="-I${with_cups_include}"
57025         CUPS_FOUND=yes
57026         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57027 $as_echo "$CUPS_FOUND" >&6; }
57028       else
57029         as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57030       fi
57031     fi
57032     if test "x$CUPS_FOUND" = xno; then
57033       # Are the cups headers installed in the default /usr/include location?
57034       for ac_header in cups/cups.h cups/ppd.h
57035 do :
57036   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57037 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57038 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57039   cat >>confdefs.h <<_ACEOF
57040 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57041 _ACEOF
57042 
57043           CUPS_FOUND=yes
57044           CUPS_CFLAGS=
57045           DEFAULT_CUPS=yes
57046 
57047 fi
57048 
57049 done
57050 
57051     fi
57052     if test "x$CUPS_FOUND" = xno; then
57053       # Getting nervous now? Lets poke around for standard Solaris third-party
57054       # package installation locations.
57055       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57056 $as_echo_n "checking for cups headers... " >&6; }
57057       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
57058         # An SFW package seems to be installed!
57059         CUPS_FOUND=yes
57060         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
57061       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
57062         # A CSW package seems to be installed!
57063         CUPS_FOUND=yes
57064         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
57065       fi
57066       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57067 $as_echo "$CUPS_FOUND" >&6; }
57068     fi
57069     if test "x$CUPS_FOUND" = xno; then
57070 
57071   # Print a helpful message on how to acquire the necessary build dependency.
57072   # cups is the help tag: freetype, cups, alsa etc
57073   MISSING_DEPENDENCY=cups
57074 
57075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57076     cygwin_help $MISSING_DEPENDENCY
57077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57078     msys_help $MISSING_DEPENDENCY
57079   else
57080     PKGHANDLER_COMMAND=
57081 
57082     case $PKGHANDLER in
57083       apt-get)
57084         apt_help     $MISSING_DEPENDENCY ;;
57085       yum)
57086         yum_help     $MISSING_DEPENDENCY ;;
57087       port)
57088         port_help    $MISSING_DEPENDENCY ;;
57089       pkgutil)
57090         pkgutil_help $MISSING_DEPENDENCY ;;
57091       pkgadd)
57092         pkgadd_help  $MISSING_DEPENDENCY ;;
57093     esac
57094 
57095     if test "x$PKGHANDLER_COMMAND" != x; then
57096       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57097     fi
57098   fi
57099 
57100       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57101     fi
57102   fi
57103 
57104 
57105 
57106 
57107 
57108 # Check whether --with-freetype was given.
57109 if test "${with_freetype+set}" = set; then :
57110   withval=$with_freetype;
57111 fi
57112 
57113 
57114 # Check whether --with-freetype-include was given.
57115 if test "${with_freetype_include+set}" = set; then :
57116   withval=$with_freetype_include;
57117 fi
57118 
57119 
57120 # Check whether --with-freetype-lib was given.
57121 if test "${with_freetype_lib+set}" = set; then :
57122   withval=$with_freetype_lib;
57123 fi
57124 
57125 
57126 # Check whether --with-freetype-src was given.
57127 if test "${with_freetype_src+set}" = set; then :
57128   withval=$with_freetype_src;
57129 fi
57130 
57131   # Check whether --enable-freetype-bundling was given.
57132 if test "${enable_freetype_bundling+set}" = set; then :
57133   enableval=$enable_freetype_bundling;
57134 fi
57135 
57136 
57137   # Need to specify explicitly since it needs to be overridden on some versions of macosx
57138   FREETYPE_BASE_NAME=freetype
57139   FREETYPE_CFLAGS=
57140   FREETYPE_LIBS=
57141   FREETYPE_BUNDLE_LIB_PATH=
57142 
57143   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57144     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57145         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57146         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57147         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57148       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57149 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57150     fi
57151     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57152       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57153 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57154     fi
57155   else
57156     # freetype is needed to build; go get it!
57157 
57158     BUNDLE_FREETYPE="$enable_freetype_bundling"
57159 
57160     if  test "x$with_freetype_src" != x; then
57161       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57162         # Try to build freetype if --with-freetype-src was given on Windows
57163 
57164   FREETYPE_SRC_PATH="$with_freetype_src"
57165   BUILD_FREETYPE=yes
57166 
57167   # Check if the freetype sources are acessible..
57168   if ! test -d $FREETYPE_SRC_PATH; then
57169     { $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
57170 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57171     BUILD_FREETYPE=no
57172   fi
57173   # ..and contain a vc2010 project file
57174   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57175   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57176     { $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
57177 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57178     BUILD_FREETYPE=no
57179   fi
57180   # Now check if configure found a version of 'msbuild.exe'
57181   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57182     { $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
57183 $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;}
57184     BUILD_FREETYPE=no
57185   fi
57186 
57187   # Ready to go..
57188   if test "x$BUILD_FREETYPE" = xyes; then
57189     # msbuild requires trailing slashes for output directories
57190     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57191     freetype_lib_path_unix="$freetype_lib_path"
57192     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57193 
57194   unix_path="$vcxproj_path"
57195   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57196     windows_path=`$CYGPATH -m "$unix_path"`
57197     vcxproj_path="$windows_path"
57198   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57199     windows_path=`cmd //c echo $unix_path`
57200     vcxproj_path="$windows_path"
57201   fi
57202 
57203 
57204   unix_path="$freetype_lib_path"
57205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57206     windows_path=`$CYGPATH -m "$unix_path"`
57207     freetype_lib_path="$windows_path"
57208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57209     windows_path=`cmd //c echo $unix_path`
57210     freetype_lib_path="$windows_path"
57211   fi
57212 
57213 
57214   unix_path="$freetype_obj_path"
57215   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57216     windows_path=`$CYGPATH -m "$unix_path"`
57217     freetype_obj_path="$windows_path"
57218   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57219     windows_path=`cmd //c echo $unix_path`
57220     freetype_obj_path="$windows_path"
57221   fi
57222 
57223     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57224       freetype_platform=x64
57225     else
57226       freetype_platform=win32
57227     fi
57228 
57229     # The original freetype project file is for VS 2010 (i.e. 'v100'),
57230     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57231     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57232     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57233     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57234 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57235 
57236     # First we try to build the freetype.dll
57237     $ECHO -e "@echo off\n"\
57238         "$MSBUILD $vcxproj_path "\
57239         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57240         "/p:Configuration=\"Release Multithreaded\" "\
57241         "/p:Platform=$freetype_platform "\
57242         "/p:ConfigurationType=DynamicLibrary "\
57243         "/p:TargetName=freetype "\
57244         "/p:OutDir=\"$freetype_lib_path\" "\
57245         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57246     cmd /c freetype.bat
57247 
57248     if test -s "$freetype_lib_path_unix/freetype.dll"; then
57249       # If that succeeds we also build freetype.lib
57250       $ECHO -e "@echo off\n"\
57251           "$MSBUILD $vcxproj_path "\
57252           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57253           "/p:Configuration=\"Release Multithreaded\" "\
57254           "/p:Platform=$freetype_platform "\
57255           "/p:ConfigurationType=StaticLibrary "\
57256           "/p:TargetName=freetype "\
57257           "/p:OutDir=\"$freetype_lib_path\" "\
57258           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57259       cmd /c freetype.bat
57260 
57261       if test -s "$freetype_lib_path_unix/freetype.lib"; then
57262         # Once we build both, lib and dll, set freetype lib and include path appropriately
57263         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57264         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57265         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57266 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57267       else
57268         BUILD_FREETYPE=no
57269       fi
57270     else
57271       BUILD_FREETYPE=no
57272     fi
57273   fi
57274 
57275         if test "x$BUILD_FREETYPE" = xyes; then
57276           # Okay, we built it. Check that it works.
57277 
57278   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57279   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57280   METHOD="--with-freetype-src"
57281 
57282   # Let's start with an optimistic view of the world :-)
57283   FOUND_FREETYPE=yes
57284 
57285   # First look for the canonical freetype main include file ft2build.h.
57286   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57287     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57288     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57289     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57290       # Fail.
57291       FOUND_FREETYPE=no
57292     fi
57293   fi
57294 
57295   if test "x$FOUND_FREETYPE" = xyes; then
57296     # Include file found, let's continue the sanity check.
57297     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57298 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57299 
57300     # Reset to default value
57301     FREETYPE_BASE_NAME=freetype
57302     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57303     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57304       if test "x$OPENJDK_BUILD_OS" = "xmacosx" &&
57305          test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57306         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57307         # for the .6 version explicitly.
57308         FREETYPE_BASE_NAME=freetype.6
57309         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57310         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57311 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57312       else
57313         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57314 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57315         FOUND_FREETYPE=no
57316       fi
57317     else
57318       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57319         # On Windows, we will need both .lib and .dll file.
57320         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57321           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57322 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57323           FOUND_FREETYPE=no
57324         fi
57325       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57326           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57327         # Found lib in isa dir, use that instead.
57328         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57329         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57330 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57331       fi
57332     fi
57333   fi
57334 
57335   if test "x$FOUND_FREETYPE" = xyes; then
57336 
57337   # Only process if variable expands to non-empty
57338 
57339   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57340     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57341 
57342   # Input might be given as Windows format, start by converting to
57343   # unix format.
57344   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57345   new_path=`$CYGPATH -u "$path"`
57346 
57347   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57348   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57349   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57350   # "foo.exe" is OK but "foo" is an error.
57351   #
57352   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57353   # It is also a way to make sure we got the proper file name for the real test later on.
57354   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57355   if test "x$test_shortpath" = x; then
57356     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57357 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57358     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57359   fi
57360 
57361   # Call helper function which possibly converts this using DOS-style short mode.
57362   # If so, the updated path is stored in $new_path.
57363 
57364   input_path="$new_path"
57365   # Check if we need to convert this using DOS-style short mode. If the path
57366   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57367   # take no chances and rewrite it.
57368   # Note: m4 eats our [], so we need to use [ and ] instead.
57369   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57370   if test "x$has_forbidden_chars" != x; then
57371     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57372     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57373     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57374     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57375       # Going to short mode and back again did indeed matter. Since short mode is
57376       # case insensitive, let's make it lowercase to improve readability.
57377       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57378       # Now convert it back to Unix-style (cygpath)
57379       input_path=`$CYGPATH -u "$shortmode_path"`
57380       new_path="$input_path"
57381     fi
57382   fi
57383 
57384   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57385   if test "x$test_cygdrive_prefix" = x; then
57386     # As a simple fix, exclude /usr/bin since it's not a real path.
57387     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57388       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57389       # a path prefixed by /cygdrive for fixpath to work.
57390       new_path="$CYGWIN_ROOT_PATH$input_path"
57391     fi
57392   fi
57393 
57394 
57395   if test "x$path" != "x$new_path"; then
57396     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57397     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57398 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57399   fi
57400 
57401     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57402 
57403   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57404   has_colon=`$ECHO $path | $GREP ^.:`
57405   new_path="$path"
57406   if test "x$has_colon" = x; then
57407     # Not in mixed or Windows style, start by that.
57408     new_path=`cmd //c echo $path`
57409   fi
57410 
57411 
57412   input_path="$new_path"
57413   # Check if we need to convert this using DOS-style short mode. If the path
57414   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57415   # take no chances and rewrite it.
57416   # Note: m4 eats our [], so we need to use [ and ] instead.
57417   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57418   if test "x$has_forbidden_chars" != x; then
57419     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57420     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57421   fi
57422 
57423 
57424   windows_path="$new_path"
57425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57426     unix_path=`$CYGPATH -u "$windows_path"`
57427     new_path="$unix_path"
57428   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57429     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57430     new_path="$unix_path"
57431   fi
57432 
57433   if test "x$path" != "x$new_path"; then
57434     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57435     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57436 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57437   fi
57438 
57439   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57440   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57441 
57442     else
57443       # We're on a unix platform. Hooray! :)
57444       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57445       has_space=`$ECHO "$path" | $GREP " "`
57446       if test "x$has_space" != x; then
57447         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57448 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57449         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57450       fi
57451 
57452       # Use eval to expand a potential ~
57453       eval path="$path"
57454       if test ! -f "$path" && test ! -d "$path"; then
57455         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57456       fi
57457 
57458       if test -d "$path"; then
57459         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57460       else
57461         dir="`$DIRNAME "$path"`"
57462         base="`$BASENAME "$path"`"
57463         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57464       fi
57465     fi
57466   fi
57467 
57468 
57469   # Only process if variable expands to non-empty
57470 
57471   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57472     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57473 
57474   # Input might be given as Windows format, start by converting to
57475   # unix format.
57476   path="$POTENTIAL_FREETYPE_LIB_PATH"
57477   new_path=`$CYGPATH -u "$path"`
57478 
57479   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57480   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57481   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57482   # "foo.exe" is OK but "foo" is an error.
57483   #
57484   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57485   # It is also a way to make sure we got the proper file name for the real test later on.
57486   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57487   if test "x$test_shortpath" = x; then
57488     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57489 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57490     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57491   fi
57492 
57493   # Call helper function which possibly converts this using DOS-style short mode.
57494   # If so, the updated path is stored in $new_path.
57495 
57496   input_path="$new_path"
57497   # Check if we need to convert this using DOS-style short mode. If the path
57498   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57499   # take no chances and rewrite it.
57500   # Note: m4 eats our [], so we need to use [ and ] instead.
57501   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57502   if test "x$has_forbidden_chars" != x; then
57503     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57504     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57505     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57506     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57507       # Going to short mode and back again did indeed matter. Since short mode is
57508       # case insensitive, let's make it lowercase to improve readability.
57509       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57510       # Now convert it back to Unix-style (cygpath)
57511       input_path=`$CYGPATH -u "$shortmode_path"`
57512       new_path="$input_path"
57513     fi
57514   fi
57515 
57516   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57517   if test "x$test_cygdrive_prefix" = x; then
57518     # As a simple fix, exclude /usr/bin since it's not a real path.
57519     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57520       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57521       # a path prefixed by /cygdrive for fixpath to work.
57522       new_path="$CYGWIN_ROOT_PATH$input_path"
57523     fi
57524   fi
57525 
57526 
57527   if test "x$path" != "x$new_path"; then
57528     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57529     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57530 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57531   fi
57532 
57533     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57534 
57535   path="$POTENTIAL_FREETYPE_LIB_PATH"
57536   has_colon=`$ECHO $path | $GREP ^.:`
57537   new_path="$path"
57538   if test "x$has_colon" = x; then
57539     # Not in mixed or Windows style, start by that.
57540     new_path=`cmd //c echo $path`
57541   fi
57542 
57543 
57544   input_path="$new_path"
57545   # Check if we need to convert this using DOS-style short mode. If the path
57546   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57547   # take no chances and rewrite it.
57548   # Note: m4 eats our [], so we need to use [ and ] instead.
57549   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57550   if test "x$has_forbidden_chars" != x; then
57551     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57552     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57553   fi
57554 
57555 
57556   windows_path="$new_path"
57557   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57558     unix_path=`$CYGPATH -u "$windows_path"`
57559     new_path="$unix_path"
57560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57561     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57562     new_path="$unix_path"
57563   fi
57564 
57565   if test "x$path" != "x$new_path"; then
57566     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57567     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57568 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57569   fi
57570 
57571   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57572   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57573 
57574     else
57575       # We're on a unix platform. Hooray! :)
57576       path="$POTENTIAL_FREETYPE_LIB_PATH"
57577       has_space=`$ECHO "$path" | $GREP " "`
57578       if test "x$has_space" != x; then
57579         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57580 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57581         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57582       fi
57583 
57584       # Use eval to expand a potential ~
57585       eval path="$path"
57586       if test ! -f "$path" && test ! -d "$path"; then
57587         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57588       fi
57589 
57590       if test -d "$path"; then
57591         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57592       else
57593         dir="`$DIRNAME "$path"`"
57594         base="`$BASENAME "$path"`"
57595         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57596       fi
57597     fi
57598   fi
57599 
57600 
57601     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57602     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57603 $as_echo_n "checking for freetype includes... " >&6; }
57604     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57605 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57606     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57607     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57608 $as_echo_n "checking for freetype libraries... " >&6; }
57609     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57610 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57611   fi
57612 
57613           if test "x$FOUND_FREETYPE" != xyes; then
57614             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57615           fi
57616         else
57617           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57618 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57619           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57620         fi
57621       else
57622         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57623 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57624       fi
57625     fi
57626 
57627     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57628       # User has specified settings
57629 
57630       if test "x$BUNDLE_FREETYPE" = x; then
57631         # If not specified, default is to bundle freetype
57632         BUNDLE_FREETYPE=yes
57633       fi
57634 
57635       if test "x$with_freetype" != x; then
57636         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57637         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57638       fi
57639 
57640       # Allow --with-freetype-lib and --with-freetype-include to override
57641       if test "x$with_freetype_include" != x; then
57642         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57643       fi
57644       if test "x$with_freetype_lib" != x; then
57645         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57646       fi
57647 
57648       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57649         # Okay, we got it. Check that it works.
57650 
57651   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57652   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57653   METHOD="--with-freetype"
57654 
57655   # Let's start with an optimistic view of the world :-)
57656   FOUND_FREETYPE=yes
57657 
57658   # First look for the canonical freetype main include file ft2build.h.
57659   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57660     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57661     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57662     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57663       # Fail.
57664       FOUND_FREETYPE=no
57665     fi
57666   fi
57667 
57668   if test "x$FOUND_FREETYPE" = xyes; then
57669     # Include file found, let's continue the sanity check.
57670     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57671 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57672 
57673     # Reset to default value
57674     FREETYPE_BASE_NAME=freetype
57675     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57676     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57677       if test "x$OPENJDK_BUILD_OS" = "xmacosx" &&
57678          test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57679         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57680         # for the .6 version explicitly.
57681         FREETYPE_BASE_NAME=freetype.6
57682         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57683         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57684 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57685       else
57686         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57687 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57688         FOUND_FREETYPE=no
57689       fi
57690     else
57691       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57692         # On Windows, we will need both .lib and .dll file.
57693         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57694           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57695 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57696           FOUND_FREETYPE=no
57697         fi
57698       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57699           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57700         # Found lib in isa dir, use that instead.
57701         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57702         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57703 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57704       fi
57705     fi
57706   fi
57707 
57708   if test "x$FOUND_FREETYPE" = xyes; then
57709 
57710   # Only process if variable expands to non-empty
57711 
57712   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57713     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57714 
57715   # Input might be given as Windows format, start by converting to
57716   # unix format.
57717   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57718   new_path=`$CYGPATH -u "$path"`
57719 
57720   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57721   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57722   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57723   # "foo.exe" is OK but "foo" is an error.
57724   #
57725   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57726   # It is also a way to make sure we got the proper file name for the real test later on.
57727   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57728   if test "x$test_shortpath" = x; then
57729     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57730 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57731     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57732   fi
57733 
57734   # Call helper function which possibly converts this using DOS-style short mode.
57735   # If so, the updated path is stored in $new_path.
57736 
57737   input_path="$new_path"
57738   # Check if we need to convert this using DOS-style short mode. If the path
57739   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57740   # take no chances and rewrite it.
57741   # Note: m4 eats our [], so we need to use [ and ] instead.
57742   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57743   if test "x$has_forbidden_chars" != x; then
57744     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57745     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57746     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57747     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57748       # Going to short mode and back again did indeed matter. Since short mode is
57749       # case insensitive, let's make it lowercase to improve readability.
57750       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57751       # Now convert it back to Unix-style (cygpath)
57752       input_path=`$CYGPATH -u "$shortmode_path"`
57753       new_path="$input_path"
57754     fi
57755   fi
57756 
57757   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57758   if test "x$test_cygdrive_prefix" = x; then
57759     # As a simple fix, exclude /usr/bin since it's not a real path.
57760     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57761       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57762       # a path prefixed by /cygdrive for fixpath to work.
57763       new_path="$CYGWIN_ROOT_PATH$input_path"
57764     fi
57765   fi
57766 
57767 
57768   if test "x$path" != "x$new_path"; then
57769     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57770     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57771 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57772   fi
57773 
57774     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57775 
57776   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57777   has_colon=`$ECHO $path | $GREP ^.:`
57778   new_path="$path"
57779   if test "x$has_colon" = x; then
57780     # Not in mixed or Windows style, start by that.
57781     new_path=`cmd //c echo $path`
57782   fi
57783 
57784 
57785   input_path="$new_path"
57786   # Check if we need to convert this using DOS-style short mode. If the path
57787   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57788   # take no chances and rewrite it.
57789   # Note: m4 eats our [], so we need to use [ and ] instead.
57790   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57791   if test "x$has_forbidden_chars" != x; then
57792     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57793     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57794   fi
57795 
57796 
57797   windows_path="$new_path"
57798   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57799     unix_path=`$CYGPATH -u "$windows_path"`
57800     new_path="$unix_path"
57801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57802     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57803     new_path="$unix_path"
57804   fi
57805 
57806   if test "x$path" != "x$new_path"; then
57807     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57808     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57809 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57810   fi
57811 
57812   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57813   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57814 
57815     else
57816       # We're on a unix platform. Hooray! :)
57817       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57818       has_space=`$ECHO "$path" | $GREP " "`
57819       if test "x$has_space" != x; then
57820         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57821 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57822         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57823       fi
57824 
57825       # Use eval to expand a potential ~
57826       eval path="$path"
57827       if test ! -f "$path" && test ! -d "$path"; then
57828         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57829       fi
57830 
57831       if test -d "$path"; then
57832         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57833       else
57834         dir="`$DIRNAME "$path"`"
57835         base="`$BASENAME "$path"`"
57836         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57837       fi
57838     fi
57839   fi
57840 
57841 
57842   # Only process if variable expands to non-empty
57843 
57844   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57845     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57846 
57847   # Input might be given as Windows format, start by converting to
57848   # unix format.
57849   path="$POTENTIAL_FREETYPE_LIB_PATH"
57850   new_path=`$CYGPATH -u "$path"`
57851 
57852   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57853   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57854   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57855   # "foo.exe" is OK but "foo" is an error.
57856   #
57857   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57858   # It is also a way to make sure we got the proper file name for the real test later on.
57859   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57860   if test "x$test_shortpath" = x; then
57861     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57862 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57863     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57864   fi
57865 
57866   # Call helper function which possibly converts this using DOS-style short mode.
57867   # If so, the updated path is stored in $new_path.
57868 
57869   input_path="$new_path"
57870   # Check if we need to convert this using DOS-style short mode. If the path
57871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57872   # take no chances and rewrite it.
57873   # Note: m4 eats our [], so we need to use [ and ] instead.
57874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57875   if test "x$has_forbidden_chars" != x; then
57876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57877     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57878     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57879     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57880       # Going to short mode and back again did indeed matter. Since short mode is
57881       # case insensitive, let's make it lowercase to improve readability.
57882       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57883       # Now convert it back to Unix-style (cygpath)
57884       input_path=`$CYGPATH -u "$shortmode_path"`
57885       new_path="$input_path"
57886     fi
57887   fi
57888 
57889   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57890   if test "x$test_cygdrive_prefix" = x; then
57891     # As a simple fix, exclude /usr/bin since it's not a real path.
57892     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57893       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57894       # a path prefixed by /cygdrive for fixpath to work.
57895       new_path="$CYGWIN_ROOT_PATH$input_path"
57896     fi
57897   fi
57898 
57899 
57900   if test "x$path" != "x$new_path"; then
57901     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57902     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57903 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57904   fi
57905 
57906     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57907 
57908   path="$POTENTIAL_FREETYPE_LIB_PATH"
57909   has_colon=`$ECHO $path | $GREP ^.:`
57910   new_path="$path"
57911   if test "x$has_colon" = x; then
57912     # Not in mixed or Windows style, start by that.
57913     new_path=`cmd //c echo $path`
57914   fi
57915 
57916 
57917   input_path="$new_path"
57918   # Check if we need to convert this using DOS-style short mode. If the path
57919   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57920   # take no chances and rewrite it.
57921   # Note: m4 eats our [], so we need to use [ and ] instead.
57922   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57923   if test "x$has_forbidden_chars" != x; then
57924     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57925     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57926   fi
57927 
57928 
57929   windows_path="$new_path"
57930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57931     unix_path=`$CYGPATH -u "$windows_path"`
57932     new_path="$unix_path"
57933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57934     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57935     new_path="$unix_path"
57936   fi
57937 
57938   if test "x$path" != "x$new_path"; then
57939     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57940     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57941 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57942   fi
57943 
57944   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57945   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57946 
57947     else
57948       # We're on a unix platform. Hooray! :)
57949       path="$POTENTIAL_FREETYPE_LIB_PATH"
57950       has_space=`$ECHO "$path" | $GREP " "`
57951       if test "x$has_space" != x; then
57952         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57953 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57954         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57955       fi
57956 
57957       # Use eval to expand a potential ~
57958       eval path="$path"
57959       if test ! -f "$path" && test ! -d "$path"; then
57960         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57961       fi
57962 
57963       if test -d "$path"; then
57964         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57965       else
57966         dir="`$DIRNAME "$path"`"
57967         base="`$BASENAME "$path"`"
57968         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57969       fi
57970     fi
57971   fi
57972 
57973 
57974     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57975     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57976 $as_echo_n "checking for freetype includes... " >&6; }
57977     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57978 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57979     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57980     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57981 $as_echo_n "checking for freetype libraries... " >&6; }
57982     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57983 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57984   fi
57985 
57986         if test "x$FOUND_FREETYPE" != xyes; then
57987           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57988         fi
57989       else
57990         # User specified only one of lib or include. This is an error.
57991         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57992           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57993 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57994           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57995         else
57996           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57997 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57998           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57999         fi
58000       fi
58001     else
58002       # User did not specify settings, but we need freetype. Try to locate it.
58003 
58004       if test "x$BUNDLE_FREETYPE" = x; then
58005         # If not specified, default is to bundle freetype only on windows
58006         if test "x$OPENJDK_TARGET_OS" = xwindows; then
58007           BUNDLE_FREETYPE=yes
58008         else
58009           BUNDLE_FREETYPE=no
58010         fi
58011       fi
58012 
58013       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58014       if test "x$SYSROOT" = x; then
58015         if test "x$FOUND_FREETYPE" != xyes; then
58016           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58017           if test "x$PKG_CONFIG" != x; then
58018 
58019 pkg_failed=no
58020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58021 $as_echo_n "checking for FREETYPE... " >&6; }
58022 
58023 if test -n "$FREETYPE_CFLAGS"; then
58024     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58025  elif test -n "$PKG_CONFIG"; then
58026     if test -n "$PKG_CONFIG" && \
58027     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58028   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58029   ac_status=$?
58030   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58031   test $ac_status = 0; }; then
58032   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58033 else
58034   pkg_failed=yes
58035 fi
58036  else
58037     pkg_failed=untried
58038 fi
58039 if test -n "$FREETYPE_LIBS"; then
58040     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58041  elif test -n "$PKG_CONFIG"; then
58042     if test -n "$PKG_CONFIG" && \
58043     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58044   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58045   ac_status=$?
58046   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58047   test $ac_status = 0; }; then
58048   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58049 else
58050   pkg_failed=yes
58051 fi
58052  else
58053     pkg_failed=untried
58054 fi
58055 
58056 
58057 
58058 if test $pkg_failed = yes; then
58059 
58060 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58061         _pkg_short_errors_supported=yes
58062 else
58063         _pkg_short_errors_supported=no
58064 fi
58065         if test $_pkg_short_errors_supported = yes; then
58066                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58067         else
58068                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58069         fi
58070         # Put the nasty error message in config.log where it belongs
58071         echo "$FREETYPE_PKG_ERRORS" >&5
58072 
58073         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58074 $as_echo "no" >&6; }
58075                 FOUND_FREETYPE=no
58076 elif test $pkg_failed = untried; then
58077         FOUND_FREETYPE=no
58078 else
58079         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58080         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58081         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58082 $as_echo "yes" >&6; }
58083         FOUND_FREETYPE=yes
58084 fi
58085             if test "x$FOUND_FREETYPE" = xyes; then
58086               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58087               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58088               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58089               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58090                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58091               fi
58092               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58093               if test "x$BUNDLE_FREETYPE" = xyes; then
58094                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58095 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58096                 FOUND_FREETYPE=no
58097               else
58098                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58099 $as_echo_n "checking for freetype... " >&6; }
58100                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58101 $as_echo "yes (using pkg-config)" >&6; }
58102               fi
58103             fi
58104           fi
58105         fi
58106       fi
58107 
58108       if test "x$FOUND_FREETYPE" != xyes; then
58109         # Check in well-known locations
58110         if test "x$OPENJDK_TARGET_OS" = xwindows; then
58111           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58112 
58113   windows_path="$FREETYPE_BASE_DIR"
58114   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58115     unix_path=`$CYGPATH -u "$windows_path"`
58116     FREETYPE_BASE_DIR="$unix_path"
58117   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58118     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58119     FREETYPE_BASE_DIR="$unix_path"
58120   fi
58121 
58122 
58123   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58124   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58125   METHOD="well-known location"
58126 
58127   # Let's start with an optimistic view of the world :-)
58128   FOUND_FREETYPE=yes
58129 
58130   # First look for the canonical freetype main include file ft2build.h.
58131   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58132     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58133     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58134     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58135       # Fail.
58136       FOUND_FREETYPE=no
58137     fi
58138   fi
58139 
58140   if test "x$FOUND_FREETYPE" = xyes; then
58141     # Include file found, let's continue the sanity check.
58142     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58143 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58144 
58145     # Reset to default value
58146     FREETYPE_BASE_NAME=freetype
58147     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58148     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58149       if test "x$OPENJDK_BUILD_OS" = "xmacosx" &&
58150          test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58151         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58152         # for the .6 version explicitly.
58153         FREETYPE_BASE_NAME=freetype.6
58154         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58155         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58156 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58157       else
58158         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58159 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58160         FOUND_FREETYPE=no
58161       fi
58162     else
58163       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58164         # On Windows, we will need both .lib and .dll file.
58165         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58166           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58167 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58168           FOUND_FREETYPE=no
58169         fi
58170       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58171           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58172         # Found lib in isa dir, use that instead.
58173         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58174         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58175 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58176       fi
58177     fi
58178   fi
58179 
58180   if test "x$FOUND_FREETYPE" = xyes; then
58181 
58182   # Only process if variable expands to non-empty
58183 
58184   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58185     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58186 
58187   # Input might be given as Windows format, start by converting to
58188   # unix format.
58189   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58190   new_path=`$CYGPATH -u "$path"`
58191 
58192   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58193   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58194   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58195   # "foo.exe" is OK but "foo" is an error.
58196   #
58197   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58198   # It is also a way to make sure we got the proper file name for the real test later on.
58199   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58200   if test "x$test_shortpath" = x; then
58201     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58202 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58203     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58204   fi
58205 
58206   # Call helper function which possibly converts this using DOS-style short mode.
58207   # If so, the updated path is stored in $new_path.
58208 
58209   input_path="$new_path"
58210   # Check if we need to convert this using DOS-style short mode. If the path
58211   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58212   # take no chances and rewrite it.
58213   # Note: m4 eats our [], so we need to use [ and ] instead.
58214   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58215   if test "x$has_forbidden_chars" != x; then
58216     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58217     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58218     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58219     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58220       # Going to short mode and back again did indeed matter. Since short mode is
58221       # case insensitive, let's make it lowercase to improve readability.
58222       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58223       # Now convert it back to Unix-style (cygpath)
58224       input_path=`$CYGPATH -u "$shortmode_path"`
58225       new_path="$input_path"
58226     fi
58227   fi
58228 
58229   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58230   if test "x$test_cygdrive_prefix" = x; then
58231     # As a simple fix, exclude /usr/bin since it's not a real path.
58232     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58233       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58234       # a path prefixed by /cygdrive for fixpath to work.
58235       new_path="$CYGWIN_ROOT_PATH$input_path"
58236     fi
58237   fi
58238 
58239 
58240   if test "x$path" != "x$new_path"; then
58241     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58242     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58243 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58244   fi
58245 
58246     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58247 
58248   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58249   has_colon=`$ECHO $path | $GREP ^.:`
58250   new_path="$path"
58251   if test "x$has_colon" = x; then
58252     # Not in mixed or Windows style, start by that.
58253     new_path=`cmd //c echo $path`
58254   fi
58255 
58256 
58257   input_path="$new_path"
58258   # Check if we need to convert this using DOS-style short mode. If the path
58259   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58260   # take no chances and rewrite it.
58261   # Note: m4 eats our [], so we need to use [ and ] instead.
58262   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58263   if test "x$has_forbidden_chars" != x; then
58264     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58265     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58266   fi
58267 
58268 
58269   windows_path="$new_path"
58270   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58271     unix_path=`$CYGPATH -u "$windows_path"`
58272     new_path="$unix_path"
58273   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58274     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58275     new_path="$unix_path"
58276   fi
58277 
58278   if test "x$path" != "x$new_path"; then
58279     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58280     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58281 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58282   fi
58283 
58284   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58285   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58286 
58287     else
58288       # We're on a unix platform. Hooray! :)
58289       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58290       has_space=`$ECHO "$path" | $GREP " "`
58291       if test "x$has_space" != x; then
58292         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58293 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58294         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58295       fi
58296 
58297       # Use eval to expand a potential ~
58298       eval path="$path"
58299       if test ! -f "$path" && test ! -d "$path"; then
58300         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58301       fi
58302 
58303       if test -d "$path"; then
58304         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58305       else
58306         dir="`$DIRNAME "$path"`"
58307         base="`$BASENAME "$path"`"
58308         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58309       fi
58310     fi
58311   fi
58312 
58313 
58314   # Only process if variable expands to non-empty
58315 
58316   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58317     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58318 
58319   # Input might be given as Windows format, start by converting to
58320   # unix format.
58321   path="$POTENTIAL_FREETYPE_LIB_PATH"
58322   new_path=`$CYGPATH -u "$path"`
58323 
58324   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58325   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58326   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58327   # "foo.exe" is OK but "foo" is an error.
58328   #
58329   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58330   # It is also a way to make sure we got the proper file name for the real test later on.
58331   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58332   if test "x$test_shortpath" = x; then
58333     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58334 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58335     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58336   fi
58337 
58338   # Call helper function which possibly converts this using DOS-style short mode.
58339   # If so, the updated path is stored in $new_path.
58340 
58341   input_path="$new_path"
58342   # Check if we need to convert this using DOS-style short mode. If the path
58343   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58344   # take no chances and rewrite it.
58345   # Note: m4 eats our [], so we need to use [ and ] instead.
58346   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58347   if test "x$has_forbidden_chars" != x; then
58348     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58349     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58350     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58351     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58352       # Going to short mode and back again did indeed matter. Since short mode is
58353       # case insensitive, let's make it lowercase to improve readability.
58354       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58355       # Now convert it back to Unix-style (cygpath)
58356       input_path=`$CYGPATH -u "$shortmode_path"`
58357       new_path="$input_path"
58358     fi
58359   fi
58360 
58361   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58362   if test "x$test_cygdrive_prefix" = x; then
58363     # As a simple fix, exclude /usr/bin since it's not a real path.
58364     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58365       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58366       # a path prefixed by /cygdrive for fixpath to work.
58367       new_path="$CYGWIN_ROOT_PATH$input_path"
58368     fi
58369   fi
58370 
58371 
58372   if test "x$path" != "x$new_path"; then
58373     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58374     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58375 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58376   fi
58377 
58378     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58379 
58380   path="$POTENTIAL_FREETYPE_LIB_PATH"
58381   has_colon=`$ECHO $path | $GREP ^.:`
58382   new_path="$path"
58383   if test "x$has_colon" = x; then
58384     # Not in mixed or Windows style, start by that.
58385     new_path=`cmd //c echo $path`
58386   fi
58387 
58388 
58389   input_path="$new_path"
58390   # Check if we need to convert this using DOS-style short mode. If the path
58391   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58392   # take no chances and rewrite it.
58393   # Note: m4 eats our [], so we need to use [ and ] instead.
58394   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58395   if test "x$has_forbidden_chars" != x; then
58396     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58397     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58398   fi
58399 
58400 
58401   windows_path="$new_path"
58402   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58403     unix_path=`$CYGPATH -u "$windows_path"`
58404     new_path="$unix_path"
58405   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58406     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58407     new_path="$unix_path"
58408   fi
58409 
58410   if test "x$path" != "x$new_path"; then
58411     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58412     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58413 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58414   fi
58415 
58416   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58417   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58418 
58419     else
58420       # We're on a unix platform. Hooray! :)
58421       path="$POTENTIAL_FREETYPE_LIB_PATH"
58422       has_space=`$ECHO "$path" | $GREP " "`
58423       if test "x$has_space" != x; then
58424         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58425 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58426         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58427       fi
58428 
58429       # Use eval to expand a potential ~
58430       eval path="$path"
58431       if test ! -f "$path" && test ! -d "$path"; then
58432         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58433       fi
58434 
58435       if test -d "$path"; then
58436         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58437       else
58438         dir="`$DIRNAME "$path"`"
58439         base="`$BASENAME "$path"`"
58440         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58441       fi
58442     fi
58443   fi
58444 
58445 
58446     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58447     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58448 $as_echo_n "checking for freetype includes... " >&6; }
58449     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58450 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58451     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58452     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58453 $as_echo_n "checking for freetype libraries... " >&6; }
58454     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58455 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58456   fi
58457 
58458           if test "x$FOUND_FREETYPE" != xyes; then
58459             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58460 
58461   windows_path="$FREETYPE_BASE_DIR"
58462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58463     unix_path=`$CYGPATH -u "$windows_path"`
58464     FREETYPE_BASE_DIR="$unix_path"
58465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58466     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58467     FREETYPE_BASE_DIR="$unix_path"
58468   fi
58469 
58470 
58471   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58472   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
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_BUILD_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           fi
58807           if test "x$FOUND_FREETYPE" != xyes; then
58808             FREETYPE_BASE_DIR="$HOME/freetype"
58809 
58810   windows_path="$FREETYPE_BASE_DIR"
58811   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58812     unix_path=`$CYGPATH -u "$windows_path"`
58813     FREETYPE_BASE_DIR="$unix_path"
58814   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58815     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58816     FREETYPE_BASE_DIR="$unix_path"
58817   fi
58818 
58819             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58820 
58821   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58822   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58823   METHOD="well-known location"
58824 
58825   # Let's start with an optimistic view of the world :-)
58826   FOUND_FREETYPE=yes
58827 
58828   # First look for the canonical freetype main include file ft2build.h.
58829   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58830     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58831     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58832     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58833       # Fail.
58834       FOUND_FREETYPE=no
58835     fi
58836   fi
58837 
58838   if test "x$FOUND_FREETYPE" = xyes; then
58839     # Include file found, let's continue the sanity check.
58840     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58841 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58842 
58843     # Reset to default value
58844     FREETYPE_BASE_NAME=freetype
58845     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58846     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58847       if test "x$OPENJDK_BUILD_OS" = "xmacosx" &&
58848          test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58849         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58850         # for the .6 version explicitly.
58851         FREETYPE_BASE_NAME=freetype.6
58852         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58853         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58854 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58855       else
58856         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58857 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58858         FOUND_FREETYPE=no
58859       fi
58860     else
58861       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58862         # On Windows, we will need both .lib and .dll file.
58863         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58864           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58865 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58866           FOUND_FREETYPE=no
58867         fi
58868       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58869           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58870         # Found lib in isa dir, use that instead.
58871         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58872         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58873 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58874       fi
58875     fi
58876   fi
58877 
58878   if test "x$FOUND_FREETYPE" = xyes; then
58879 
58880   # Only process if variable expands to non-empty
58881 
58882   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58883     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58884 
58885   # Input might be given as Windows format, start by converting to
58886   # unix format.
58887   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58888   new_path=`$CYGPATH -u "$path"`
58889 
58890   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58891   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58892   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58893   # "foo.exe" is OK but "foo" is an error.
58894   #
58895   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58896   # It is also a way to make sure we got the proper file name for the real test later on.
58897   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58898   if test "x$test_shortpath" = x; then
58899     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58900 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58901     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58902   fi
58903 
58904   # Call helper function which possibly converts this using DOS-style short mode.
58905   # If so, the updated path is stored in $new_path.
58906 
58907   input_path="$new_path"
58908   # Check if we need to convert this using DOS-style short mode. If the path
58909   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58910   # take no chances and rewrite it.
58911   # Note: m4 eats our [], so we need to use [ and ] instead.
58912   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58913   if test "x$has_forbidden_chars" != x; then
58914     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58915     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58916     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58917     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58918       # Going to short mode and back again did indeed matter. Since short mode is
58919       # case insensitive, let's make it lowercase to improve readability.
58920       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58921       # Now convert it back to Unix-style (cygpath)
58922       input_path=`$CYGPATH -u "$shortmode_path"`
58923       new_path="$input_path"
58924     fi
58925   fi
58926 
58927   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58928   if test "x$test_cygdrive_prefix" = x; then
58929     # As a simple fix, exclude /usr/bin since it's not a real path.
58930     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58931       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58932       # a path prefixed by /cygdrive for fixpath to work.
58933       new_path="$CYGWIN_ROOT_PATH$input_path"
58934     fi
58935   fi
58936 
58937 
58938   if test "x$path" != "x$new_path"; then
58939     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58940     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58941 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58942   fi
58943 
58944     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58945 
58946   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58947   has_colon=`$ECHO $path | $GREP ^.:`
58948   new_path="$path"
58949   if test "x$has_colon" = x; then
58950     # Not in mixed or Windows style, start by that.
58951     new_path=`cmd //c echo $path`
58952   fi
58953 
58954 
58955   input_path="$new_path"
58956   # Check if we need to convert this using DOS-style short mode. If the path
58957   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58958   # take no chances and rewrite it.
58959   # Note: m4 eats our [], so we need to use [ and ] instead.
58960   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58961   if test "x$has_forbidden_chars" != x; then
58962     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58963     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58964   fi
58965 
58966 
58967   windows_path="$new_path"
58968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58969     unix_path=`$CYGPATH -u "$windows_path"`
58970     new_path="$unix_path"
58971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58972     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58973     new_path="$unix_path"
58974   fi
58975 
58976   if test "x$path" != "x$new_path"; then
58977     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58978     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58979 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58980   fi
58981 
58982   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58983   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58984 
58985     else
58986       # We're on a unix platform. Hooray! :)
58987       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58988       has_space=`$ECHO "$path" | $GREP " "`
58989       if test "x$has_space" != x; then
58990         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58991 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58992         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58993       fi
58994 
58995       # Use eval to expand a potential ~
58996       eval path="$path"
58997       if test ! -f "$path" && test ! -d "$path"; then
58998         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58999       fi
59000 
59001       if test -d "$path"; then
59002         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59003       else
59004         dir="`$DIRNAME "$path"`"
59005         base="`$BASENAME "$path"`"
59006         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59007       fi
59008     fi
59009   fi
59010 
59011 
59012   # Only process if variable expands to non-empty
59013 
59014   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59015     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59016 
59017   # Input might be given as Windows format, start by converting to
59018   # unix format.
59019   path="$POTENTIAL_FREETYPE_LIB_PATH"
59020   new_path=`$CYGPATH -u "$path"`
59021 
59022   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59023   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59024   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59025   # "foo.exe" is OK but "foo" is an error.
59026   #
59027   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59028   # It is also a way to make sure we got the proper file name for the real test later on.
59029   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59030   if test "x$test_shortpath" = x; then
59031     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59032 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59033     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59034   fi
59035 
59036   # Call helper function which possibly converts this using DOS-style short mode.
59037   # If so, the updated path is stored in $new_path.
59038 
59039   input_path="$new_path"
59040   # Check if we need to convert this using DOS-style short mode. If the path
59041   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59042   # take no chances and rewrite it.
59043   # Note: m4 eats our [], so we need to use [ and ] instead.
59044   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59045   if test "x$has_forbidden_chars" != x; then
59046     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59047     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59048     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59049     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59050       # Going to short mode and back again did indeed matter. Since short mode is
59051       # case insensitive, let's make it lowercase to improve readability.
59052       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59053       # Now convert it back to Unix-style (cygpath)
59054       input_path=`$CYGPATH -u "$shortmode_path"`
59055       new_path="$input_path"
59056     fi
59057   fi
59058 
59059   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59060   if test "x$test_cygdrive_prefix" = x; then
59061     # As a simple fix, exclude /usr/bin since it's not a real path.
59062     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59063       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59064       # a path prefixed by /cygdrive for fixpath to work.
59065       new_path="$CYGWIN_ROOT_PATH$input_path"
59066     fi
59067   fi
59068 
59069 
59070   if test "x$path" != "x$new_path"; then
59071     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59072     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59073 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59074   fi
59075 
59076     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59077 
59078   path="$POTENTIAL_FREETYPE_LIB_PATH"
59079   has_colon=`$ECHO $path | $GREP ^.:`
59080   new_path="$path"
59081   if test "x$has_colon" = x; then
59082     # Not in mixed or Windows style, start by that.
59083     new_path=`cmd //c echo $path`
59084   fi
59085 
59086 
59087   input_path="$new_path"
59088   # Check if we need to convert this using DOS-style short mode. If the path
59089   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59090   # take no chances and rewrite it.
59091   # Note: m4 eats our [], so we need to use [ and ] instead.
59092   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59093   if test "x$has_forbidden_chars" != x; then
59094     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59095     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59096   fi
59097 
59098 
59099   windows_path="$new_path"
59100   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59101     unix_path=`$CYGPATH -u "$windows_path"`
59102     new_path="$unix_path"
59103   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59104     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59105     new_path="$unix_path"
59106   fi
59107 
59108   if test "x$path" != "x$new_path"; then
59109     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59110     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59111 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59112   fi
59113 
59114   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59115   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59116 
59117     else
59118       # We're on a unix platform. Hooray! :)
59119       path="$POTENTIAL_FREETYPE_LIB_PATH"
59120       has_space=`$ECHO "$path" | $GREP " "`
59121       if test "x$has_space" != x; then
59122         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59123 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59124         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59125       fi
59126 
59127       # Use eval to expand a potential ~
59128       eval path="$path"
59129       if test ! -f "$path" && test ! -d "$path"; then
59130         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59131       fi
59132 
59133       if test -d "$path"; then
59134         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59135       else
59136         dir="`$DIRNAME "$path"`"
59137         base="`$BASENAME "$path"`"
59138         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59139       fi
59140     fi
59141   fi
59142 
59143 
59144     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59145     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59146 $as_echo_n "checking for freetype includes... " >&6; }
59147     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59148 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59149     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59150     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59151 $as_echo_n "checking for freetype libraries... " >&6; }
59152     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59153 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59154   fi
59155 
59156             else
59157 
59158   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59159   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59160   METHOD="well-known location"
59161 
59162   # Let's start with an optimistic view of the world :-)
59163   FOUND_FREETYPE=yes
59164 
59165   # First look for the canonical freetype main include file ft2build.h.
59166   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59167     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59168     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59169     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59170       # Fail.
59171       FOUND_FREETYPE=no
59172     fi
59173   fi
59174 
59175   if test "x$FOUND_FREETYPE" = xyes; then
59176     # Include file found, let's continue the sanity check.
59177     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59178 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59179 
59180     # Reset to default value
59181     FREETYPE_BASE_NAME=freetype
59182     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59183     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59184       if test "x$OPENJDK_BUILD_OS" = "xmacosx" &&
59185          test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59186         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59187         # for the .6 version explicitly.
59188         FREETYPE_BASE_NAME=freetype.6
59189         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59190         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59191 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59192       else
59193         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59194 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59195         FOUND_FREETYPE=no
59196       fi
59197     else
59198       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59199         # On Windows, we will need both .lib and .dll file.
59200         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59201           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59202 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59203           FOUND_FREETYPE=no
59204         fi
59205       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59206           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59207         # Found lib in isa dir, use that instead.
59208         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59209         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59210 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59211       fi
59212     fi
59213   fi
59214 
59215   if test "x$FOUND_FREETYPE" = xyes; then
59216 
59217   # Only process if variable expands to non-empty
59218 
59219   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59220     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59221 
59222   # Input might be given as Windows format, start by converting to
59223   # unix format.
59224   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59225   new_path=`$CYGPATH -u "$path"`
59226 
59227   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59228   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59229   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59230   # "foo.exe" is OK but "foo" is an error.
59231   #
59232   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59233   # It is also a way to make sure we got the proper file name for the real test later on.
59234   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59235   if test "x$test_shortpath" = x; then
59236     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59237 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59238     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59239   fi
59240 
59241   # Call helper function which possibly converts this using DOS-style short mode.
59242   # If so, the updated path is stored in $new_path.
59243 
59244   input_path="$new_path"
59245   # Check if we need to convert this using DOS-style short mode. If the path
59246   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59247   # take no chances and rewrite it.
59248   # Note: m4 eats our [], so we need to use [ and ] instead.
59249   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59250   if test "x$has_forbidden_chars" != x; then
59251     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59252     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59253     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59254     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59255       # Going to short mode and back again did indeed matter. Since short mode is
59256       # case insensitive, let's make it lowercase to improve readability.
59257       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59258       # Now convert it back to Unix-style (cygpath)
59259       input_path=`$CYGPATH -u "$shortmode_path"`
59260       new_path="$input_path"
59261     fi
59262   fi
59263 
59264   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59265   if test "x$test_cygdrive_prefix" = x; then
59266     # As a simple fix, exclude /usr/bin since it's not a real path.
59267     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59268       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59269       # a path prefixed by /cygdrive for fixpath to work.
59270       new_path="$CYGWIN_ROOT_PATH$input_path"
59271     fi
59272   fi
59273 
59274 
59275   if test "x$path" != "x$new_path"; then
59276     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59277     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59278 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59279   fi
59280 
59281     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59282 
59283   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59284   has_colon=`$ECHO $path | $GREP ^.:`
59285   new_path="$path"
59286   if test "x$has_colon" = x; then
59287     # Not in mixed or Windows style, start by that.
59288     new_path=`cmd //c echo $path`
59289   fi
59290 
59291 
59292   input_path="$new_path"
59293   # Check if we need to convert this using DOS-style short mode. If the path
59294   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59295   # take no chances and rewrite it.
59296   # Note: m4 eats our [], so we need to use [ and ] instead.
59297   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59298   if test "x$has_forbidden_chars" != x; then
59299     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59300     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59301   fi
59302 
59303 
59304   windows_path="$new_path"
59305   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59306     unix_path=`$CYGPATH -u "$windows_path"`
59307     new_path="$unix_path"
59308   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59309     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59310     new_path="$unix_path"
59311   fi
59312 
59313   if test "x$path" != "x$new_path"; then
59314     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59315     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59316 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59317   fi
59318 
59319   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59320   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59321 
59322     else
59323       # We're on a unix platform. Hooray! :)
59324       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59325       has_space=`$ECHO "$path" | $GREP " "`
59326       if test "x$has_space" != x; then
59327         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59328 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59329         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59330       fi
59331 
59332       # Use eval to expand a potential ~
59333       eval path="$path"
59334       if test ! -f "$path" && test ! -d "$path"; then
59335         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59336       fi
59337 
59338       if test -d "$path"; then
59339         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59340       else
59341         dir="`$DIRNAME "$path"`"
59342         base="`$BASENAME "$path"`"
59343         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59344       fi
59345     fi
59346   fi
59347 
59348 
59349   # Only process if variable expands to non-empty
59350 
59351   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59352     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59353 
59354   # Input might be given as Windows format, start by converting to
59355   # unix format.
59356   path="$POTENTIAL_FREETYPE_LIB_PATH"
59357   new_path=`$CYGPATH -u "$path"`
59358 
59359   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59360   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59361   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59362   # "foo.exe" is OK but "foo" is an error.
59363   #
59364   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59365   # It is also a way to make sure we got the proper file name for the real test later on.
59366   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59367   if test "x$test_shortpath" = x; then
59368     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59369 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59370     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59371   fi
59372 
59373   # Call helper function which possibly converts this using DOS-style short mode.
59374   # If so, the updated path is stored in $new_path.
59375 
59376   input_path="$new_path"
59377   # Check if we need to convert this using DOS-style short mode. If the path
59378   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59379   # take no chances and rewrite it.
59380   # Note: m4 eats our [], so we need to use [ and ] instead.
59381   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59382   if test "x$has_forbidden_chars" != x; then
59383     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59384     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59385     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59386     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59387       # Going to short mode and back again did indeed matter. Since short mode is
59388       # case insensitive, let's make it lowercase to improve readability.
59389       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59390       # Now convert it back to Unix-style (cygpath)
59391       input_path=`$CYGPATH -u "$shortmode_path"`
59392       new_path="$input_path"
59393     fi
59394   fi
59395 
59396   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59397   if test "x$test_cygdrive_prefix" = x; then
59398     # As a simple fix, exclude /usr/bin since it's not a real path.
59399     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59400       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59401       # a path prefixed by /cygdrive for fixpath to work.
59402       new_path="$CYGWIN_ROOT_PATH$input_path"
59403     fi
59404   fi
59405 
59406 
59407   if test "x$path" != "x$new_path"; then
59408     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59409     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59410 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59411   fi
59412 
59413     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59414 
59415   path="$POTENTIAL_FREETYPE_LIB_PATH"
59416   has_colon=`$ECHO $path | $GREP ^.:`
59417   new_path="$path"
59418   if test "x$has_colon" = x; then
59419     # Not in mixed or Windows style, start by that.
59420     new_path=`cmd //c echo $path`
59421   fi
59422 
59423 
59424   input_path="$new_path"
59425   # Check if we need to convert this using DOS-style short mode. If the path
59426   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59427   # take no chances and rewrite it.
59428   # Note: m4 eats our [], so we need to use [ and ] instead.
59429   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59430   if test "x$has_forbidden_chars" != x; then
59431     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59432     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59433   fi
59434 
59435 
59436   windows_path="$new_path"
59437   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59438     unix_path=`$CYGPATH -u "$windows_path"`
59439     new_path="$unix_path"
59440   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59441     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59442     new_path="$unix_path"
59443   fi
59444 
59445   if test "x$path" != "x$new_path"; then
59446     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59447     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59448 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59449   fi
59450 
59451   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59452   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59453 
59454     else
59455       # We're on a unix platform. Hooray! :)
59456       path="$POTENTIAL_FREETYPE_LIB_PATH"
59457       has_space=`$ECHO "$path" | $GREP " "`
59458       if test "x$has_space" != x; then
59459         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59460 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59461         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59462       fi
59463 
59464       # Use eval to expand a potential ~
59465       eval path="$path"
59466       if test ! -f "$path" && test ! -d "$path"; then
59467         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59468       fi
59469 
59470       if test -d "$path"; then
59471         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59472       else
59473         dir="`$DIRNAME "$path"`"
59474         base="`$BASENAME "$path"`"
59475         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59476       fi
59477     fi
59478   fi
59479 
59480 
59481     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59482     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59483 $as_echo_n "checking for freetype includes... " >&6; }
59484     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59485 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59486     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59487     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59488 $as_echo_n "checking for freetype libraries... " >&6; }
59489     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59490 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59491   fi
59492 
59493             fi
59494             if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59495                 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59496               # Source is available, as a last resort try to build freetype in default location
59497 
59498   FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59499   BUILD_FREETYPE=yes
59500 
59501   # Check if the freetype sources are acessible..
59502   if ! test -d $FREETYPE_SRC_PATH; then
59503     { $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
59504 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59505     BUILD_FREETYPE=no
59506   fi
59507   # ..and contain a vc2010 project file
59508   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59509   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59510     { $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
59511 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59512     BUILD_FREETYPE=no
59513   fi
59514   # Now check if configure found a version of 'msbuild.exe'
59515   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59516     { $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
59517 $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;}
59518     BUILD_FREETYPE=no
59519   fi
59520 
59521   # Ready to go..
59522   if test "x$BUILD_FREETYPE" = xyes; then
59523     # msbuild requires trailing slashes for output directories
59524     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59525     freetype_lib_path_unix="$freetype_lib_path"
59526     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59527 
59528   unix_path="$vcxproj_path"
59529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59530     windows_path=`$CYGPATH -m "$unix_path"`
59531     vcxproj_path="$windows_path"
59532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59533     windows_path=`cmd //c echo $unix_path`
59534     vcxproj_path="$windows_path"
59535   fi
59536 
59537 
59538   unix_path="$freetype_lib_path"
59539   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59540     windows_path=`$CYGPATH -m "$unix_path"`
59541     freetype_lib_path="$windows_path"
59542   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59543     windows_path=`cmd //c echo $unix_path`
59544     freetype_lib_path="$windows_path"
59545   fi
59546 
59547 
59548   unix_path="$freetype_obj_path"
59549   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59550     windows_path=`$CYGPATH -m "$unix_path"`
59551     freetype_obj_path="$windows_path"
59552   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59553     windows_path=`cmd //c echo $unix_path`
59554     freetype_obj_path="$windows_path"
59555   fi
59556 
59557     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59558       freetype_platform=x64
59559     else
59560       freetype_platform=win32
59561     fi
59562 
59563     # The original freetype project file is for VS 2010 (i.e. 'v100'),
59564     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59565     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59566     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59567     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59568 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59569 
59570     # First we try to build the freetype.dll
59571     $ECHO -e "@echo off\n"\
59572         "$MSBUILD $vcxproj_path "\
59573         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59574         "/p:Configuration=\"Release Multithreaded\" "\
59575         "/p:Platform=$freetype_platform "\
59576         "/p:ConfigurationType=DynamicLibrary "\
59577         "/p:TargetName=freetype "\
59578         "/p:OutDir=\"$freetype_lib_path\" "\
59579         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59580     cmd /c freetype.bat
59581 
59582     if test -s "$freetype_lib_path_unix/freetype.dll"; then
59583       # If that succeeds we also build freetype.lib
59584       $ECHO -e "@echo off\n"\
59585           "$MSBUILD $vcxproj_path "\
59586           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59587           "/p:Configuration=\"Release Multithreaded\" "\
59588           "/p:Platform=$freetype_platform "\
59589           "/p:ConfigurationType=StaticLibrary "\
59590           "/p:TargetName=freetype "\
59591           "/p:OutDir=\"$freetype_lib_path\" "\
59592           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59593       cmd /c freetype.bat
59594 
59595       if test -s "$freetype_lib_path_unix/freetype.lib"; then
59596         # Once we build both, lib and dll, set freetype lib and include path appropriately
59597         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59598         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59599         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59600 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59601       else
59602         BUILD_FREETYPE=no
59603       fi
59604     else
59605       BUILD_FREETYPE=no
59606     fi
59607   fi
59608 
59609               if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59610 
59611   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59612   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59613   METHOD="well-known location"
59614 
59615   # Let's start with an optimistic view of the world :-)
59616   FOUND_FREETYPE=yes
59617 
59618   # First look for the canonical freetype main include file ft2build.h.
59619   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59620     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59621     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59622     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59623       # Fail.
59624       FOUND_FREETYPE=no
59625     fi
59626   fi
59627 
59628   if test "x$FOUND_FREETYPE" = xyes; then
59629     # Include file found, let's continue the sanity check.
59630     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59631 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59632 
59633     # Reset to default value
59634     FREETYPE_BASE_NAME=freetype
59635     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59636     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59637       if test "x$OPENJDK_BUILD_OS" = "xmacosx" &&
59638          test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59639         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59640         # for the .6 version explicitly.
59641         FREETYPE_BASE_NAME=freetype.6
59642         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59643         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59644 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59645       else
59646         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59647 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59648         FOUND_FREETYPE=no
59649       fi
59650     else
59651       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59652         # On Windows, we will need both .lib and .dll file.
59653         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59654           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59655 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59656           FOUND_FREETYPE=no
59657         fi
59658       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59659           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59660         # Found lib in isa dir, use that instead.
59661         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59662         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59663 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59664       fi
59665     fi
59666   fi
59667 
59668   if test "x$FOUND_FREETYPE" = xyes; then
59669 
59670   # Only process if variable expands to non-empty
59671 
59672   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59673     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59674 
59675   # Input might be given as Windows format, start by converting to
59676   # unix format.
59677   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59678   new_path=`$CYGPATH -u "$path"`
59679 
59680   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59681   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59682   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59683   # "foo.exe" is OK but "foo" is an error.
59684   #
59685   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59686   # It is also a way to make sure we got the proper file name for the real test later on.
59687   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59688   if test "x$test_shortpath" = x; then
59689     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59690 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59691     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59692   fi
59693 
59694   # Call helper function which possibly converts this using DOS-style short mode.
59695   # If so, the updated path is stored in $new_path.
59696 
59697   input_path="$new_path"
59698   # Check if we need to convert this using DOS-style short mode. If the path
59699   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59700   # take no chances and rewrite it.
59701   # Note: m4 eats our [], so we need to use [ and ] instead.
59702   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59703   if test "x$has_forbidden_chars" != x; then
59704     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59705     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59706     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59707     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59708       # Going to short mode and back again did indeed matter. Since short mode is
59709       # case insensitive, let's make it lowercase to improve readability.
59710       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59711       # Now convert it back to Unix-style (cygpath)
59712       input_path=`$CYGPATH -u "$shortmode_path"`
59713       new_path="$input_path"
59714     fi
59715   fi
59716 
59717   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59718   if test "x$test_cygdrive_prefix" = x; then
59719     # As a simple fix, exclude /usr/bin since it's not a real path.
59720     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59721       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59722       # a path prefixed by /cygdrive for fixpath to work.
59723       new_path="$CYGWIN_ROOT_PATH$input_path"
59724     fi
59725   fi
59726 
59727 
59728   if test "x$path" != "x$new_path"; then
59729     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59730     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59731 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59732   fi
59733 
59734     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59735 
59736   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59737   has_colon=`$ECHO $path | $GREP ^.:`
59738   new_path="$path"
59739   if test "x$has_colon" = x; then
59740     # Not in mixed or Windows style, start by that.
59741     new_path=`cmd //c echo $path`
59742   fi
59743 
59744 
59745   input_path="$new_path"
59746   # Check if we need to convert this using DOS-style short mode. If the path
59747   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59748   # take no chances and rewrite it.
59749   # Note: m4 eats our [], so we need to use [ and ] instead.
59750   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59751   if test "x$has_forbidden_chars" != x; then
59752     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59753     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59754   fi
59755 
59756 
59757   windows_path="$new_path"
59758   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59759     unix_path=`$CYGPATH -u "$windows_path"`
59760     new_path="$unix_path"
59761   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59762     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59763     new_path="$unix_path"
59764   fi
59765 
59766   if test "x$path" != "x$new_path"; then
59767     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59768     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59769 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59770   fi
59771 
59772   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59773   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59774 
59775     else
59776       # We're on a unix platform. Hooray! :)
59777       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59778       has_space=`$ECHO "$path" | $GREP " "`
59779       if test "x$has_space" != x; then
59780         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59781 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59782         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59783       fi
59784 
59785       # Use eval to expand a potential ~
59786       eval path="$path"
59787       if test ! -f "$path" && test ! -d "$path"; then
59788         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59789       fi
59790 
59791       if test -d "$path"; then
59792         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59793       else
59794         dir="`$DIRNAME "$path"`"
59795         base="`$BASENAME "$path"`"
59796         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59797       fi
59798     fi
59799   fi
59800 
59801 
59802   # Only process if variable expands to non-empty
59803 
59804   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59805     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59806 
59807   # Input might be given as Windows format, start by converting to
59808   # unix format.
59809   path="$POTENTIAL_FREETYPE_LIB_PATH"
59810   new_path=`$CYGPATH -u "$path"`
59811 
59812   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59813   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59814   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59815   # "foo.exe" is OK but "foo" is an error.
59816   #
59817   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59818   # It is also a way to make sure we got the proper file name for the real test later on.
59819   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59820   if test "x$test_shortpath" = x; then
59821     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59822 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59823     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59824   fi
59825 
59826   # Call helper function which possibly converts this using DOS-style short mode.
59827   # If so, the updated path is stored in $new_path.
59828 
59829   input_path="$new_path"
59830   # Check if we need to convert this using DOS-style short mode. If the path
59831   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59832   # take no chances and rewrite it.
59833   # Note: m4 eats our [], so we need to use [ and ] instead.
59834   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59835   if test "x$has_forbidden_chars" != x; then
59836     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59837     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59838     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59839     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59840       # Going to short mode and back again did indeed matter. Since short mode is
59841       # case insensitive, let's make it lowercase to improve readability.
59842       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59843       # Now convert it back to Unix-style (cygpath)
59844       input_path=`$CYGPATH -u "$shortmode_path"`
59845       new_path="$input_path"
59846     fi
59847   fi
59848 
59849   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59850   if test "x$test_cygdrive_prefix" = x; then
59851     # As a simple fix, exclude /usr/bin since it's not a real path.
59852     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59853       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59854       # a path prefixed by /cygdrive for fixpath to work.
59855       new_path="$CYGWIN_ROOT_PATH$input_path"
59856     fi
59857   fi
59858 
59859 
59860   if test "x$path" != "x$new_path"; then
59861     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59862     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59863 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59864   fi
59865 
59866     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59867 
59868   path="$POTENTIAL_FREETYPE_LIB_PATH"
59869   has_colon=`$ECHO $path | $GREP ^.:`
59870   new_path="$path"
59871   if test "x$has_colon" = x; then
59872     # Not in mixed or Windows style, start by that.
59873     new_path=`cmd //c echo $path`
59874   fi
59875 
59876 
59877   input_path="$new_path"
59878   # Check if we need to convert this using DOS-style short mode. If the path
59879   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59880   # take no chances and rewrite it.
59881   # Note: m4 eats our [], so we need to use [ and ] instead.
59882   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59883   if test "x$has_forbidden_chars" != x; then
59884     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59885     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59886   fi
59887 
59888 
59889   windows_path="$new_path"
59890   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59891     unix_path=`$CYGPATH -u "$windows_path"`
59892     new_path="$unix_path"
59893   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59894     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59895     new_path="$unix_path"
59896   fi
59897 
59898   if test "x$path" != "x$new_path"; then
59899     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59900     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59901 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59902   fi
59903 
59904   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59905   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59906 
59907     else
59908       # We're on a unix platform. Hooray! :)
59909       path="$POTENTIAL_FREETYPE_LIB_PATH"
59910       has_space=`$ECHO "$path" | $GREP " "`
59911       if test "x$has_space" != x; then
59912         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59913 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59914         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59915       fi
59916 
59917       # Use eval to expand a potential ~
59918       eval path="$path"
59919       if test ! -f "$path" && test ! -d "$path"; then
59920         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59921       fi
59922 
59923       if test -d "$path"; then
59924         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59925       else
59926         dir="`$DIRNAME "$path"`"
59927         base="`$BASENAME "$path"`"
59928         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59929       fi
59930     fi
59931   fi
59932 
59933 
59934     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59935     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59936 $as_echo_n "checking for freetype includes... " >&6; }
59937     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59938 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59939     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59940     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59941 $as_echo_n "checking for freetype libraries... " >&6; }
59942     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59943 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59944   fi
59945 
59946               else
59947 
59948   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59949   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59950   METHOD="well-known location"
59951 
59952   # Let's start with an optimistic view of the world :-)
59953   FOUND_FREETYPE=yes
59954 
59955   # First look for the canonical freetype main include file ft2build.h.
59956   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59957     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59958     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59959     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59960       # Fail.
59961       FOUND_FREETYPE=no
59962     fi
59963   fi
59964 
59965   if test "x$FOUND_FREETYPE" = xyes; then
59966     # Include file found, let's continue the sanity check.
59967     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59968 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59969 
59970     # Reset to default value
59971     FREETYPE_BASE_NAME=freetype
59972     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59973     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59974       if test "x$OPENJDK_BUILD_OS" = "xmacosx" &&
59975          test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59976         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59977         # for the .6 version explicitly.
59978         FREETYPE_BASE_NAME=freetype.6
59979         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59980         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59981 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59982       else
59983         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59984 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59985         FOUND_FREETYPE=no
59986       fi
59987     else
59988       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59989         # On Windows, we will need both .lib and .dll file.
59990         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59991           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59992 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59993           FOUND_FREETYPE=no
59994         fi
59995       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59996           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59997         # Found lib in isa dir, use that instead.
59998         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59999         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60000 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60001       fi
60002     fi
60003   fi
60004 
60005   if test "x$FOUND_FREETYPE" = xyes; then
60006 
60007   # Only process if variable expands to non-empty
60008 
60009   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60010     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60011 
60012   # Input might be given as Windows format, start by converting to
60013   # unix format.
60014   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60015   new_path=`$CYGPATH -u "$path"`
60016 
60017   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60018   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60019   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60020   # "foo.exe" is OK but "foo" is an error.
60021   #
60022   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60023   # It is also a way to make sure we got the proper file name for the real test later on.
60024   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60025   if test "x$test_shortpath" = x; then
60026     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60027 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60028     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60029   fi
60030 
60031   # Call helper function which possibly converts this using DOS-style short mode.
60032   # If so, the updated path is stored in $new_path.
60033 
60034   input_path="$new_path"
60035   # Check if we need to convert this using DOS-style short mode. If the path
60036   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60037   # take no chances and rewrite it.
60038   # Note: m4 eats our [], so we need to use [ and ] instead.
60039   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60040   if test "x$has_forbidden_chars" != x; then
60041     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60042     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60043     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60044     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60045       # Going to short mode and back again did indeed matter. Since short mode is
60046       # case insensitive, let's make it lowercase to improve readability.
60047       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60048       # Now convert it back to Unix-style (cygpath)
60049       input_path=`$CYGPATH -u "$shortmode_path"`
60050       new_path="$input_path"
60051     fi
60052   fi
60053 
60054   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60055   if test "x$test_cygdrive_prefix" = x; then
60056     # As a simple fix, exclude /usr/bin since it's not a real path.
60057     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60058       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60059       # a path prefixed by /cygdrive for fixpath to work.
60060       new_path="$CYGWIN_ROOT_PATH$input_path"
60061     fi
60062   fi
60063 
60064 
60065   if test "x$path" != "x$new_path"; then
60066     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60067     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60068 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60069   fi
60070 
60071     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60072 
60073   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60074   has_colon=`$ECHO $path | $GREP ^.:`
60075   new_path="$path"
60076   if test "x$has_colon" = x; then
60077     # Not in mixed or Windows style, start by that.
60078     new_path=`cmd //c echo $path`
60079   fi
60080 
60081 
60082   input_path="$new_path"
60083   # Check if we need to convert this using DOS-style short mode. If the path
60084   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60085   # take no chances and rewrite it.
60086   # Note: m4 eats our [], so we need to use [ and ] instead.
60087   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60088   if test "x$has_forbidden_chars" != x; then
60089     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60090     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60091   fi
60092 
60093 
60094   windows_path="$new_path"
60095   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60096     unix_path=`$CYGPATH -u "$windows_path"`
60097     new_path="$unix_path"
60098   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60099     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60100     new_path="$unix_path"
60101   fi
60102 
60103   if test "x$path" != "x$new_path"; then
60104     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60105     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60106 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60107   fi
60108 
60109   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60110   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60111 
60112     else
60113       # We're on a unix platform. Hooray! :)
60114       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60115       has_space=`$ECHO "$path" | $GREP " "`
60116       if test "x$has_space" != x; then
60117         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60118 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60119         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60120       fi
60121 
60122       # Use eval to expand a potential ~
60123       eval path="$path"
60124       if test ! -f "$path" && test ! -d "$path"; then
60125         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60126       fi
60127 
60128       if test -d "$path"; then
60129         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60130       else
60131         dir="`$DIRNAME "$path"`"
60132         base="`$BASENAME "$path"`"
60133         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60134       fi
60135     fi
60136   fi
60137 
60138 
60139   # Only process if variable expands to non-empty
60140 
60141   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60142     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60143 
60144   # Input might be given as Windows format, start by converting to
60145   # unix format.
60146   path="$POTENTIAL_FREETYPE_LIB_PATH"
60147   new_path=`$CYGPATH -u "$path"`
60148 
60149   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60150   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60151   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60152   # "foo.exe" is OK but "foo" is an error.
60153   #
60154   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60155   # It is also a way to make sure we got the proper file name for the real test later on.
60156   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60157   if test "x$test_shortpath" = x; then
60158     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60159 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60160     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60161   fi
60162 
60163   # Call helper function which possibly converts this using DOS-style short mode.
60164   # If so, the updated path is stored in $new_path.
60165 
60166   input_path="$new_path"
60167   # Check if we need to convert this using DOS-style short mode. If the path
60168   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60169   # take no chances and rewrite it.
60170   # Note: m4 eats our [], so we need to use [ and ] instead.
60171   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60172   if test "x$has_forbidden_chars" != x; then
60173     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60174     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60175     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60176     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60177       # Going to short mode and back again did indeed matter. Since short mode is
60178       # case insensitive, let's make it lowercase to improve readability.
60179       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60180       # Now convert it back to Unix-style (cygpath)
60181       input_path=`$CYGPATH -u "$shortmode_path"`
60182       new_path="$input_path"
60183     fi
60184   fi
60185 
60186   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60187   if test "x$test_cygdrive_prefix" = x; then
60188     # As a simple fix, exclude /usr/bin since it's not a real path.
60189     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60190       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60191       # a path prefixed by /cygdrive for fixpath to work.
60192       new_path="$CYGWIN_ROOT_PATH$input_path"
60193     fi
60194   fi
60195 
60196 
60197   if test "x$path" != "x$new_path"; then
60198     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60199     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60200 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60201   fi
60202 
60203     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60204 
60205   path="$POTENTIAL_FREETYPE_LIB_PATH"
60206   has_colon=`$ECHO $path | $GREP ^.:`
60207   new_path="$path"
60208   if test "x$has_colon" = x; then
60209     # Not in mixed or Windows style, start by that.
60210     new_path=`cmd //c echo $path`
60211   fi
60212 
60213 
60214   input_path="$new_path"
60215   # Check if we need to convert this using DOS-style short mode. If the path
60216   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60217   # take no chances and rewrite it.
60218   # Note: m4 eats our [], so we need to use [ and ] instead.
60219   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60220   if test "x$has_forbidden_chars" != x; then
60221     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60222     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60223   fi
60224 
60225 
60226   windows_path="$new_path"
60227   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60228     unix_path=`$CYGPATH -u "$windows_path"`
60229     new_path="$unix_path"
60230   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60231     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60232     new_path="$unix_path"
60233   fi
60234 
60235   if test "x$path" != "x$new_path"; then
60236     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60237     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60238 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60239   fi
60240 
60241   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60242   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60243 
60244     else
60245       # We're on a unix platform. Hooray! :)
60246       path="$POTENTIAL_FREETYPE_LIB_PATH"
60247       has_space=`$ECHO "$path" | $GREP " "`
60248       if test "x$has_space" != x; then
60249         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60250 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60251         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60252       fi
60253 
60254       # Use eval to expand a potential ~
60255       eval path="$path"
60256       if test ! -f "$path" && test ! -d "$path"; then
60257         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60258       fi
60259 
60260       if test -d "$path"; then
60261         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60262       else
60263         dir="`$DIRNAME "$path"`"
60264         base="`$BASENAME "$path"`"
60265         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60266       fi
60267     fi
60268   fi
60269 
60270 
60271     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60272     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60273 $as_echo_n "checking for freetype includes... " >&6; }
60274     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60275 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60276     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60277     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60278 $as_echo_n "checking for freetype libraries... " >&6; }
60279     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60280 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60281   fi
60282 
60283               fi
60284             fi
60285           fi
60286         else
60287           FREETYPE_BASE_DIR="$SYSROOT/usr"
60288 
60289   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60290   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60291   METHOD="well-known location"
60292 
60293   # Let's start with an optimistic view of the world :-)
60294   FOUND_FREETYPE=yes
60295 
60296   # First look for the canonical freetype main include file ft2build.h.
60297   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60298     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60299     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60300     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60301       # Fail.
60302       FOUND_FREETYPE=no
60303     fi
60304   fi
60305 
60306   if test "x$FOUND_FREETYPE" = xyes; then
60307     # Include file found, let's continue the sanity check.
60308     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60309 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60310 
60311     # Reset to default value
60312     FREETYPE_BASE_NAME=freetype
60313     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60314     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60315       if test "x$OPENJDK_BUILD_OS" = "xmacosx" &&
60316          test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60317         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60318         # for the .6 version explicitly.
60319         FREETYPE_BASE_NAME=freetype.6
60320         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60321         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60322 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60323       else
60324         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60325 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60326         FOUND_FREETYPE=no
60327       fi
60328     else
60329       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60330         # On Windows, we will need both .lib and .dll file.
60331         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60332           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60333 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60334           FOUND_FREETYPE=no
60335         fi
60336       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60337           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60338         # Found lib in isa dir, use that instead.
60339         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60340         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60341 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60342       fi
60343     fi
60344   fi
60345 
60346   if test "x$FOUND_FREETYPE" = xyes; then
60347 
60348   # Only process if variable expands to non-empty
60349 
60350   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60351     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60352 
60353   # Input might be given as Windows format, start by converting to
60354   # unix format.
60355   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60356   new_path=`$CYGPATH -u "$path"`
60357 
60358   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60359   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60360   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60361   # "foo.exe" is OK but "foo" is an error.
60362   #
60363   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60364   # It is also a way to make sure we got the proper file name for the real test later on.
60365   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60366   if test "x$test_shortpath" = x; then
60367     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60368 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60369     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60370   fi
60371 
60372   # Call helper function which possibly converts this using DOS-style short mode.
60373   # If so, the updated path is stored in $new_path.
60374 
60375   input_path="$new_path"
60376   # Check if we need to convert this using DOS-style short mode. If the path
60377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60378   # take no chances and rewrite it.
60379   # Note: m4 eats our [], so we need to use [ and ] instead.
60380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60381   if test "x$has_forbidden_chars" != x; then
60382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60383     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60384     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60385     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60386       # Going to short mode and back again did indeed matter. Since short mode is
60387       # case insensitive, let's make it lowercase to improve readability.
60388       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60389       # Now convert it back to Unix-style (cygpath)
60390       input_path=`$CYGPATH -u "$shortmode_path"`
60391       new_path="$input_path"
60392     fi
60393   fi
60394 
60395   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60396   if test "x$test_cygdrive_prefix" = x; then
60397     # As a simple fix, exclude /usr/bin since it's not a real path.
60398     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60399       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60400       # a path prefixed by /cygdrive for fixpath to work.
60401       new_path="$CYGWIN_ROOT_PATH$input_path"
60402     fi
60403   fi
60404 
60405 
60406   if test "x$path" != "x$new_path"; then
60407     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60408     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60409 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60410   fi
60411 
60412     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60413 
60414   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60415   has_colon=`$ECHO $path | $GREP ^.:`
60416   new_path="$path"
60417   if test "x$has_colon" = x; then
60418     # Not in mixed or Windows style, start by that.
60419     new_path=`cmd //c echo $path`
60420   fi
60421 
60422 
60423   input_path="$new_path"
60424   # Check if we need to convert this using DOS-style short mode. If the path
60425   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60426   # take no chances and rewrite it.
60427   # Note: m4 eats our [], so we need to use [ and ] instead.
60428   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60429   if test "x$has_forbidden_chars" != x; then
60430     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60431     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60432   fi
60433 
60434 
60435   windows_path="$new_path"
60436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60437     unix_path=`$CYGPATH -u "$windows_path"`
60438     new_path="$unix_path"
60439   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60440     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60441     new_path="$unix_path"
60442   fi
60443 
60444   if test "x$path" != "x$new_path"; then
60445     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60446     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60447 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60448   fi
60449 
60450   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60451   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60452 
60453     else
60454       # We're on a unix platform. Hooray! :)
60455       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60456       has_space=`$ECHO "$path" | $GREP " "`
60457       if test "x$has_space" != x; then
60458         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60459 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60460         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60461       fi
60462 
60463       # Use eval to expand a potential ~
60464       eval path="$path"
60465       if test ! -f "$path" && test ! -d "$path"; then
60466         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60467       fi
60468 
60469       if test -d "$path"; then
60470         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60471       else
60472         dir="`$DIRNAME "$path"`"
60473         base="`$BASENAME "$path"`"
60474         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60475       fi
60476     fi
60477   fi
60478 
60479 
60480   # Only process if variable expands to non-empty
60481 
60482   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60483     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60484 
60485   # Input might be given as Windows format, start by converting to
60486   # unix format.
60487   path="$POTENTIAL_FREETYPE_LIB_PATH"
60488   new_path=`$CYGPATH -u "$path"`
60489 
60490   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60491   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60492   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60493   # "foo.exe" is OK but "foo" is an error.
60494   #
60495   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60496   # It is also a way to make sure we got the proper file name for the real test later on.
60497   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60498   if test "x$test_shortpath" = x; then
60499     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60500 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60501     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60502   fi
60503 
60504   # Call helper function which possibly converts this using DOS-style short mode.
60505   # If so, the updated path is stored in $new_path.
60506 
60507   input_path="$new_path"
60508   # Check if we need to convert this using DOS-style short mode. If the path
60509   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60510   # take no chances and rewrite it.
60511   # Note: m4 eats our [], so we need to use [ and ] instead.
60512   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60513   if test "x$has_forbidden_chars" != x; then
60514     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60515     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60516     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60517     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60518       # Going to short mode and back again did indeed matter. Since short mode is
60519       # case insensitive, let's make it lowercase to improve readability.
60520       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60521       # Now convert it back to Unix-style (cygpath)
60522       input_path=`$CYGPATH -u "$shortmode_path"`
60523       new_path="$input_path"
60524     fi
60525   fi
60526 
60527   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60528   if test "x$test_cygdrive_prefix" = x; then
60529     # As a simple fix, exclude /usr/bin since it's not a real path.
60530     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60531       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60532       # a path prefixed by /cygdrive for fixpath to work.
60533       new_path="$CYGWIN_ROOT_PATH$input_path"
60534     fi
60535   fi
60536 
60537 
60538   if test "x$path" != "x$new_path"; then
60539     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60540     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60541 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60542   fi
60543 
60544     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60545 
60546   path="$POTENTIAL_FREETYPE_LIB_PATH"
60547   has_colon=`$ECHO $path | $GREP ^.:`
60548   new_path="$path"
60549   if test "x$has_colon" = x; then
60550     # Not in mixed or Windows style, start by that.
60551     new_path=`cmd //c echo $path`
60552   fi
60553 
60554 
60555   input_path="$new_path"
60556   # Check if we need to convert this using DOS-style short mode. If the path
60557   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60558   # take no chances and rewrite it.
60559   # Note: m4 eats our [], so we need to use [ and ] instead.
60560   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60561   if test "x$has_forbidden_chars" != x; then
60562     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60563     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60564   fi
60565 
60566 
60567   windows_path="$new_path"
60568   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60569     unix_path=`$CYGPATH -u "$windows_path"`
60570     new_path="$unix_path"
60571   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60572     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60573     new_path="$unix_path"
60574   fi
60575 
60576   if test "x$path" != "x$new_path"; then
60577     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60578     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60579 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60580   fi
60581 
60582   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60583   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60584 
60585     else
60586       # We're on a unix platform. Hooray! :)
60587       path="$POTENTIAL_FREETYPE_LIB_PATH"
60588       has_space=`$ECHO "$path" | $GREP " "`
60589       if test "x$has_space" != x; then
60590         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60591 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60592         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60593       fi
60594 
60595       # Use eval to expand a potential ~
60596       eval path="$path"
60597       if test ! -f "$path" && test ! -d "$path"; then
60598         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60599       fi
60600 
60601       if test -d "$path"; then
60602         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60603       else
60604         dir="`$DIRNAME "$path"`"
60605         base="`$BASENAME "$path"`"
60606         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60607       fi
60608     fi
60609   fi
60610 
60611 
60612     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60613     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60614 $as_echo_n "checking for freetype includes... " >&6; }
60615     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60616 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60617     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60618     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60619 $as_echo_n "checking for freetype libraries... " >&6; }
60620     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60621 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60622   fi
60623 
60624 
60625           if test "x$FOUND_FREETYPE" != xyes; then
60626             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60627 
60628   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60629   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60630   METHOD="well-known location"
60631 
60632   # Let's start with an optimistic view of the world :-)
60633   FOUND_FREETYPE=yes
60634 
60635   # First look for the canonical freetype main include file ft2build.h.
60636   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60637     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60638     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60639     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60640       # Fail.
60641       FOUND_FREETYPE=no
60642     fi
60643   fi
60644 
60645   if test "x$FOUND_FREETYPE" = xyes; then
60646     # Include file found, let's continue the sanity check.
60647     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60648 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60649 
60650     # Reset to default value
60651     FREETYPE_BASE_NAME=freetype
60652     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60653     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60654       if test "x$OPENJDK_BUILD_OS" = "xmacosx" &&
60655          test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60656         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60657         # for the .6 version explicitly.
60658         FREETYPE_BASE_NAME=freetype.6
60659         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60660         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60661 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60662       else
60663         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60664 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60665         FOUND_FREETYPE=no
60666       fi
60667     else
60668       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60669         # On Windows, we will need both .lib and .dll file.
60670         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60671           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60672 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60673           FOUND_FREETYPE=no
60674         fi
60675       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60676           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60677         # Found lib in isa dir, use that instead.
60678         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60679         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60680 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60681       fi
60682     fi
60683   fi
60684 
60685   if test "x$FOUND_FREETYPE" = xyes; then
60686 
60687   # Only process if variable expands to non-empty
60688 
60689   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60690     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60691 
60692   # Input might be given as Windows format, start by converting to
60693   # unix format.
60694   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60695   new_path=`$CYGPATH -u "$path"`
60696 
60697   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60698   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60699   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60700   # "foo.exe" is OK but "foo" is an error.
60701   #
60702   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60703   # It is also a way to make sure we got the proper file name for the real test later on.
60704   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60705   if test "x$test_shortpath" = x; then
60706     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60707 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60708     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60709   fi
60710 
60711   # Call helper function which possibly converts this using DOS-style short mode.
60712   # If so, the updated path is stored in $new_path.
60713 
60714   input_path="$new_path"
60715   # Check if we need to convert this using DOS-style short mode. If the path
60716   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60717   # take no chances and rewrite it.
60718   # Note: m4 eats our [], so we need to use [ and ] instead.
60719   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60720   if test "x$has_forbidden_chars" != x; then
60721     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60722     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60723     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60724     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60725       # Going to short mode and back again did indeed matter. Since short mode is
60726       # case insensitive, let's make it lowercase to improve readability.
60727       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60728       # Now convert it back to Unix-style (cygpath)
60729       input_path=`$CYGPATH -u "$shortmode_path"`
60730       new_path="$input_path"
60731     fi
60732   fi
60733 
60734   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60735   if test "x$test_cygdrive_prefix" = x; then
60736     # As a simple fix, exclude /usr/bin since it's not a real path.
60737     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60738       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60739       # a path prefixed by /cygdrive for fixpath to work.
60740       new_path="$CYGWIN_ROOT_PATH$input_path"
60741     fi
60742   fi
60743 
60744 
60745   if test "x$path" != "x$new_path"; then
60746     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60747     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60748 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60749   fi
60750 
60751     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60752 
60753   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60754   has_colon=`$ECHO $path | $GREP ^.:`
60755   new_path="$path"
60756   if test "x$has_colon" = x; then
60757     # Not in mixed or Windows style, start by that.
60758     new_path=`cmd //c echo $path`
60759   fi
60760 
60761 
60762   input_path="$new_path"
60763   # Check if we need to convert this using DOS-style short mode. If the path
60764   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60765   # take no chances and rewrite it.
60766   # Note: m4 eats our [], so we need to use [ and ] instead.
60767   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60768   if test "x$has_forbidden_chars" != x; then
60769     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60770     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60771   fi
60772 
60773 
60774   windows_path="$new_path"
60775   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60776     unix_path=`$CYGPATH -u "$windows_path"`
60777     new_path="$unix_path"
60778   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60779     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60780     new_path="$unix_path"
60781   fi
60782 
60783   if test "x$path" != "x$new_path"; then
60784     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60785     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60786 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60787   fi
60788 
60789   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60790   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60791 
60792     else
60793       # We're on a unix platform. Hooray! :)
60794       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60795       has_space=`$ECHO "$path" | $GREP " "`
60796       if test "x$has_space" != x; then
60797         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60798 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60799         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60800       fi
60801 
60802       # Use eval to expand a potential ~
60803       eval path="$path"
60804       if test ! -f "$path" && test ! -d "$path"; then
60805         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60806       fi
60807 
60808       if test -d "$path"; then
60809         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60810       else
60811         dir="`$DIRNAME "$path"`"
60812         base="`$BASENAME "$path"`"
60813         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60814       fi
60815     fi
60816   fi
60817 
60818 
60819   # Only process if variable expands to non-empty
60820 
60821   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60822     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60823 
60824   # Input might be given as Windows format, start by converting to
60825   # unix format.
60826   path="$POTENTIAL_FREETYPE_LIB_PATH"
60827   new_path=`$CYGPATH -u "$path"`
60828 
60829   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60830   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60831   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60832   # "foo.exe" is OK but "foo" is an error.
60833   #
60834   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60835   # It is also a way to make sure we got the proper file name for the real test later on.
60836   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60837   if test "x$test_shortpath" = x; then
60838     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60839 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60840     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60841   fi
60842 
60843   # Call helper function which possibly converts this using DOS-style short mode.
60844   # If so, the updated path is stored in $new_path.
60845 
60846   input_path="$new_path"
60847   # Check if we need to convert this using DOS-style short mode. If the path
60848   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60849   # take no chances and rewrite it.
60850   # Note: m4 eats our [], so we need to use [ and ] instead.
60851   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60852   if test "x$has_forbidden_chars" != x; then
60853     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60854     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60855     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60856     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60857       # Going to short mode and back again did indeed matter. Since short mode is
60858       # case insensitive, let's make it lowercase to improve readability.
60859       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60860       # Now convert it back to Unix-style (cygpath)
60861       input_path=`$CYGPATH -u "$shortmode_path"`
60862       new_path="$input_path"
60863     fi
60864   fi
60865 
60866   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60867   if test "x$test_cygdrive_prefix" = x; then
60868     # As a simple fix, exclude /usr/bin since it's not a real path.
60869     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60870       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60871       # a path prefixed by /cygdrive for fixpath to work.
60872       new_path="$CYGWIN_ROOT_PATH$input_path"
60873     fi
60874   fi
60875 
60876 
60877   if test "x$path" != "x$new_path"; then
60878     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60879     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60880 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60881   fi
60882 
60883     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60884 
60885   path="$POTENTIAL_FREETYPE_LIB_PATH"
60886   has_colon=`$ECHO $path | $GREP ^.:`
60887   new_path="$path"
60888   if test "x$has_colon" = x; then
60889     # Not in mixed or Windows style, start by that.
60890     new_path=`cmd //c echo $path`
60891   fi
60892 
60893 
60894   input_path="$new_path"
60895   # Check if we need to convert this using DOS-style short mode. If the path
60896   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60897   # take no chances and rewrite it.
60898   # Note: m4 eats our [], so we need to use [ and ] instead.
60899   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60900   if test "x$has_forbidden_chars" != x; then
60901     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60902     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60903   fi
60904 
60905 
60906   windows_path="$new_path"
60907   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60908     unix_path=`$CYGPATH -u "$windows_path"`
60909     new_path="$unix_path"
60910   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60911     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60912     new_path="$unix_path"
60913   fi
60914 
60915   if test "x$path" != "x$new_path"; then
60916     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60917     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60918 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60919   fi
60920 
60921   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60922   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60923 
60924     else
60925       # We're on a unix platform. Hooray! :)
60926       path="$POTENTIAL_FREETYPE_LIB_PATH"
60927       has_space=`$ECHO "$path" | $GREP " "`
60928       if test "x$has_space" != x; then
60929         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60930 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60931         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60932       fi
60933 
60934       # Use eval to expand a potential ~
60935       eval path="$path"
60936       if test ! -f "$path" && test ! -d "$path"; then
60937         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60938       fi
60939 
60940       if test -d "$path"; then
60941         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60942       else
60943         dir="`$DIRNAME "$path"`"
60944         base="`$BASENAME "$path"`"
60945         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60946       fi
60947     fi
60948   fi
60949 
60950 
60951     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60952     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60953 $as_echo_n "checking for freetype includes... " >&6; }
60954     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60955 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60956     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60957     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60958 $as_echo_n "checking for freetype libraries... " >&6; }
60959     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60960 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60961   fi
60962 
60963           fi
60964 
60965           if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60966             if test "x$FOUND_FREETYPE" != xyes; then
60967               # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60968               FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60969 
60970   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60971   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60972   METHOD="well-known location"
60973 
60974   # Let's start with an optimistic view of the world :-)
60975   FOUND_FREETYPE=yes
60976 
60977   # First look for the canonical freetype main include file ft2build.h.
60978   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60979     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60980     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60981     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60982       # Fail.
60983       FOUND_FREETYPE=no
60984     fi
60985   fi
60986 
60987   if test "x$FOUND_FREETYPE" = xyes; then
60988     # Include file found, let's continue the sanity check.
60989     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60990 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60991 
60992     # Reset to default value
60993     FREETYPE_BASE_NAME=freetype
60994     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60995     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60996       if test "x$OPENJDK_BUILD_OS" = "xmacosx" &&
60997          test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60998         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60999         # for the .6 version explicitly.
61000         FREETYPE_BASE_NAME=freetype.6
61001         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61002         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61003 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61004       else
61005         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61006 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61007         FOUND_FREETYPE=no
61008       fi
61009     else
61010       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61011         # On Windows, we will need both .lib and .dll file.
61012         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61013           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61014 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61015           FOUND_FREETYPE=no
61016         fi
61017       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61018           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61019         # Found lib in isa dir, use that instead.
61020         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61021         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61022 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61023       fi
61024     fi
61025   fi
61026 
61027   if test "x$FOUND_FREETYPE" = xyes; then
61028 
61029   # Only process if variable expands to non-empty
61030 
61031   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61032     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61033 
61034   # Input might be given as Windows format, start by converting to
61035   # unix format.
61036   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61037   new_path=`$CYGPATH -u "$path"`
61038 
61039   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61040   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61041   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61042   # "foo.exe" is OK but "foo" is an error.
61043   #
61044   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61045   # It is also a way to make sure we got the proper file name for the real test later on.
61046   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61047   if test "x$test_shortpath" = x; then
61048     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61049 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61050     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61051   fi
61052 
61053   # Call helper function which possibly converts this using DOS-style short mode.
61054   # If so, the updated path is stored in $new_path.
61055 
61056   input_path="$new_path"
61057   # Check if we need to convert this using DOS-style short mode. If the path
61058   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61059   # take no chances and rewrite it.
61060   # Note: m4 eats our [], so we need to use [ and ] instead.
61061   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61062   if test "x$has_forbidden_chars" != x; then
61063     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61064     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61065     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61066     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61067       # Going to short mode and back again did indeed matter. Since short mode is
61068       # case insensitive, let's make it lowercase to improve readability.
61069       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61070       # Now convert it back to Unix-style (cygpath)
61071       input_path=`$CYGPATH -u "$shortmode_path"`
61072       new_path="$input_path"
61073     fi
61074   fi
61075 
61076   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61077   if test "x$test_cygdrive_prefix" = x; then
61078     # As a simple fix, exclude /usr/bin since it's not a real path.
61079     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61080       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61081       # a path prefixed by /cygdrive for fixpath to work.
61082       new_path="$CYGWIN_ROOT_PATH$input_path"
61083     fi
61084   fi
61085 
61086 
61087   if test "x$path" != "x$new_path"; then
61088     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61089     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61090 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61091   fi
61092 
61093     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61094 
61095   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61096   has_colon=`$ECHO $path | $GREP ^.:`
61097   new_path="$path"
61098   if test "x$has_colon" = x; then
61099     # Not in mixed or Windows style, start by that.
61100     new_path=`cmd //c echo $path`
61101   fi
61102 
61103 
61104   input_path="$new_path"
61105   # Check if we need to convert this using DOS-style short mode. If the path
61106   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61107   # take no chances and rewrite it.
61108   # Note: m4 eats our [], so we need to use [ and ] instead.
61109   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61110   if test "x$has_forbidden_chars" != x; then
61111     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61112     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61113   fi
61114 
61115 
61116   windows_path="$new_path"
61117   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61118     unix_path=`$CYGPATH -u "$windows_path"`
61119     new_path="$unix_path"
61120   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61121     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61122     new_path="$unix_path"
61123   fi
61124 
61125   if test "x$path" != "x$new_path"; then
61126     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61127     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61128 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61129   fi
61130 
61131   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61132   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61133 
61134     else
61135       # We're on a unix platform. Hooray! :)
61136       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61137       has_space=`$ECHO "$path" | $GREP " "`
61138       if test "x$has_space" != x; then
61139         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61140 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61141         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61142       fi
61143 
61144       # Use eval to expand a potential ~
61145       eval path="$path"
61146       if test ! -f "$path" && test ! -d "$path"; then
61147         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61148       fi
61149 
61150       if test -d "$path"; then
61151         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61152       else
61153         dir="`$DIRNAME "$path"`"
61154         base="`$BASENAME "$path"`"
61155         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61156       fi
61157     fi
61158   fi
61159 
61160 
61161   # Only process if variable expands to non-empty
61162 
61163   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61164     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61165 
61166   # Input might be given as Windows format, start by converting to
61167   # unix format.
61168   path="$POTENTIAL_FREETYPE_LIB_PATH"
61169   new_path=`$CYGPATH -u "$path"`
61170 
61171   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61172   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61173   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61174   # "foo.exe" is OK but "foo" is an error.
61175   #
61176   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61177   # It is also a way to make sure we got the proper file name for the real test later on.
61178   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61179   if test "x$test_shortpath" = x; then
61180     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61181 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61182     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61183   fi
61184 
61185   # Call helper function which possibly converts this using DOS-style short mode.
61186   # If so, the updated path is stored in $new_path.
61187 
61188   input_path="$new_path"
61189   # Check if we need to convert this using DOS-style short mode. If the path
61190   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61191   # take no chances and rewrite it.
61192   # Note: m4 eats our [], so we need to use [ and ] instead.
61193   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61194   if test "x$has_forbidden_chars" != x; then
61195     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61196     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61197     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61198     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61199       # Going to short mode and back again did indeed matter. Since short mode is
61200       # case insensitive, let's make it lowercase to improve readability.
61201       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61202       # Now convert it back to Unix-style (cygpath)
61203       input_path=`$CYGPATH -u "$shortmode_path"`
61204       new_path="$input_path"
61205     fi
61206   fi
61207 
61208   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61209   if test "x$test_cygdrive_prefix" = x; then
61210     # As a simple fix, exclude /usr/bin since it's not a real path.
61211     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61212       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61213       # a path prefixed by /cygdrive for fixpath to work.
61214       new_path="$CYGWIN_ROOT_PATH$input_path"
61215     fi
61216   fi
61217 
61218 
61219   if test "x$path" != "x$new_path"; then
61220     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61221     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61222 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61223   fi
61224 
61225     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61226 
61227   path="$POTENTIAL_FREETYPE_LIB_PATH"
61228   has_colon=`$ECHO $path | $GREP ^.:`
61229   new_path="$path"
61230   if test "x$has_colon" = x; then
61231     # Not in mixed or Windows style, start by that.
61232     new_path=`cmd //c echo $path`
61233   fi
61234 
61235 
61236   input_path="$new_path"
61237   # Check if we need to convert this using DOS-style short mode. If the path
61238   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61239   # take no chances and rewrite it.
61240   # Note: m4 eats our [], so we need to use [ and ] instead.
61241   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61242   if test "x$has_forbidden_chars" != x; then
61243     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61244     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61245   fi
61246 
61247 
61248   windows_path="$new_path"
61249   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61250     unix_path=`$CYGPATH -u "$windows_path"`
61251     new_path="$unix_path"
61252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61253     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61254     new_path="$unix_path"
61255   fi
61256 
61257   if test "x$path" != "x$new_path"; then
61258     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61259     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61260 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61261   fi
61262 
61263   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61264   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61265 
61266     else
61267       # We're on a unix platform. Hooray! :)
61268       path="$POTENTIAL_FREETYPE_LIB_PATH"
61269       has_space=`$ECHO "$path" | $GREP " "`
61270       if test "x$has_space" != x; then
61271         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61272 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61273         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61274       fi
61275 
61276       # Use eval to expand a potential ~
61277       eval path="$path"
61278       if test ! -f "$path" && test ! -d "$path"; then
61279         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61280       fi
61281 
61282       if test -d "$path"; then
61283         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61284       else
61285         dir="`$DIRNAME "$path"`"
61286         base="`$BASENAME "$path"`"
61287         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61288       fi
61289     fi
61290   fi
61291 
61292 
61293     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61294     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61295 $as_echo_n "checking for freetype includes... " >&6; }
61296     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61297 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61298     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61299     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61300 $as_echo_n "checking for freetype libraries... " >&6; }
61301     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61302 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61303   fi
61304 
61305             fi
61306           fi
61307 
61308           if test "x$FOUND_FREETYPE" != xyes; then
61309             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
61310 
61311   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61312   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61313   METHOD="well-known location"
61314 
61315   # Let's start with an optimistic view of the world :-)
61316   FOUND_FREETYPE=yes
61317 
61318   # First look for the canonical freetype main include file ft2build.h.
61319   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61320     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61321     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61322     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61323       # Fail.
61324       FOUND_FREETYPE=no
61325     fi
61326   fi
61327 
61328   if test "x$FOUND_FREETYPE" = xyes; then
61329     # Include file found, let's continue the sanity check.
61330     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61331 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61332 
61333     # Reset to default value
61334     FREETYPE_BASE_NAME=freetype
61335     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61336     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61337       if test "x$OPENJDK_BUILD_OS" = "xmacosx" &&
61338          test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61339         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61340         # for the .6 version explicitly.
61341         FREETYPE_BASE_NAME=freetype.6
61342         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61343         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61344 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61345       else
61346         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61347 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61348         FOUND_FREETYPE=no
61349       fi
61350     else
61351       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61352         # On Windows, we will need both .lib and .dll file.
61353         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61354           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61355 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61356           FOUND_FREETYPE=no
61357         fi
61358       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61359           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61360         # Found lib in isa dir, use that instead.
61361         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61362         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61363 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61364       fi
61365     fi
61366   fi
61367 
61368   if test "x$FOUND_FREETYPE" = xyes; then
61369 
61370   # Only process if variable expands to non-empty
61371 
61372   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61373     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61374 
61375   # Input might be given as Windows format, start by converting to
61376   # unix format.
61377   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61378   new_path=`$CYGPATH -u "$path"`
61379 
61380   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61381   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61382   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61383   # "foo.exe" is OK but "foo" is an error.
61384   #
61385   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61386   # It is also a way to make sure we got the proper file name for the real test later on.
61387   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61388   if test "x$test_shortpath" = x; then
61389     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61390 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61391     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61392   fi
61393 
61394   # Call helper function which possibly converts this using DOS-style short mode.
61395   # If so, the updated path is stored in $new_path.
61396 
61397   input_path="$new_path"
61398   # Check if we need to convert this using DOS-style short mode. If the path
61399   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61400   # take no chances and rewrite it.
61401   # Note: m4 eats our [], so we need to use [ and ] instead.
61402   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61403   if test "x$has_forbidden_chars" != x; then
61404     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61405     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61406     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61407     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61408       # Going to short mode and back again did indeed matter. Since short mode is
61409       # case insensitive, let's make it lowercase to improve readability.
61410       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61411       # Now convert it back to Unix-style (cygpath)
61412       input_path=`$CYGPATH -u "$shortmode_path"`
61413       new_path="$input_path"
61414     fi
61415   fi
61416 
61417   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61418   if test "x$test_cygdrive_prefix" = x; then
61419     # As a simple fix, exclude /usr/bin since it's not a real path.
61420     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61421       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61422       # a path prefixed by /cygdrive for fixpath to work.
61423       new_path="$CYGWIN_ROOT_PATH$input_path"
61424     fi
61425   fi
61426 
61427 
61428   if test "x$path" != "x$new_path"; then
61429     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61430     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61431 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61432   fi
61433 
61434     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61435 
61436   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61437   has_colon=`$ECHO $path | $GREP ^.:`
61438   new_path="$path"
61439   if test "x$has_colon" = x; then
61440     # Not in mixed or Windows style, start by that.
61441     new_path=`cmd //c echo $path`
61442   fi
61443 
61444 
61445   input_path="$new_path"
61446   # Check if we need to convert this using DOS-style short mode. If the path
61447   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61448   # take no chances and rewrite it.
61449   # Note: m4 eats our [], so we need to use [ and ] instead.
61450   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61451   if test "x$has_forbidden_chars" != x; then
61452     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61453     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61454   fi
61455 
61456 
61457   windows_path="$new_path"
61458   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61459     unix_path=`$CYGPATH -u "$windows_path"`
61460     new_path="$unix_path"
61461   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61462     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61463     new_path="$unix_path"
61464   fi
61465 
61466   if test "x$path" != "x$new_path"; then
61467     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61468     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61469 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61470   fi
61471 
61472   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61473   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61474 
61475     else
61476       # We're on a unix platform. Hooray! :)
61477       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61478       has_space=`$ECHO "$path" | $GREP " "`
61479       if test "x$has_space" != x; then
61480         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61481 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61482         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61483       fi
61484 
61485       # Use eval to expand a potential ~
61486       eval path="$path"
61487       if test ! -f "$path" && test ! -d "$path"; then
61488         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61489       fi
61490 
61491       if test -d "$path"; then
61492         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61493       else
61494         dir="`$DIRNAME "$path"`"
61495         base="`$BASENAME "$path"`"
61496         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61497       fi
61498     fi
61499   fi
61500 
61501 
61502   # Only process if variable expands to non-empty
61503 
61504   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61505     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61506 
61507   # Input might be given as Windows format, start by converting to
61508   # unix format.
61509   path="$POTENTIAL_FREETYPE_LIB_PATH"
61510   new_path=`$CYGPATH -u "$path"`
61511 
61512   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61513   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61514   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61515   # "foo.exe" is OK but "foo" is an error.
61516   #
61517   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61518   # It is also a way to make sure we got the proper file name for the real test later on.
61519   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61520   if test "x$test_shortpath" = x; then
61521     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61522 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61523     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61524   fi
61525 
61526   # Call helper function which possibly converts this using DOS-style short mode.
61527   # If so, the updated path is stored in $new_path.
61528 
61529   input_path="$new_path"
61530   # Check if we need to convert this using DOS-style short mode. If the path
61531   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61532   # take no chances and rewrite it.
61533   # Note: m4 eats our [], so we need to use [ and ] instead.
61534   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61535   if test "x$has_forbidden_chars" != x; then
61536     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61537     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61538     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61539     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61540       # Going to short mode and back again did indeed matter. Since short mode is
61541       # case insensitive, let's make it lowercase to improve readability.
61542       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61543       # Now convert it back to Unix-style (cygpath)
61544       input_path=`$CYGPATH -u "$shortmode_path"`
61545       new_path="$input_path"
61546     fi
61547   fi
61548 
61549   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61550   if test "x$test_cygdrive_prefix" = x; then
61551     # As a simple fix, exclude /usr/bin since it's not a real path.
61552     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61553       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61554       # a path prefixed by /cygdrive for fixpath to work.
61555       new_path="$CYGWIN_ROOT_PATH$input_path"
61556     fi
61557   fi
61558 
61559 
61560   if test "x$path" != "x$new_path"; then
61561     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61562     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61563 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61564   fi
61565 
61566     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61567 
61568   path="$POTENTIAL_FREETYPE_LIB_PATH"
61569   has_colon=`$ECHO $path | $GREP ^.:`
61570   new_path="$path"
61571   if test "x$has_colon" = x; then
61572     # Not in mixed or Windows style, start by that.
61573     new_path=`cmd //c echo $path`
61574   fi
61575 
61576 
61577   input_path="$new_path"
61578   # Check if we need to convert this using DOS-style short mode. If the path
61579   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61580   # take no chances and rewrite it.
61581   # Note: m4 eats our [], so we need to use [ and ] instead.
61582   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61583   if test "x$has_forbidden_chars" != x; then
61584     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61585     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61586   fi
61587 
61588 
61589   windows_path="$new_path"
61590   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61591     unix_path=`$CYGPATH -u "$windows_path"`
61592     new_path="$unix_path"
61593   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61594     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61595     new_path="$unix_path"
61596   fi
61597 
61598   if test "x$path" != "x$new_path"; then
61599     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61600     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61601 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61602   fi
61603 
61604   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61605   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61606 
61607     else
61608       # We're on a unix platform. Hooray! :)
61609       path="$POTENTIAL_FREETYPE_LIB_PATH"
61610       has_space=`$ECHO "$path" | $GREP " "`
61611       if test "x$has_space" != x; then
61612         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61613 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61614         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61615       fi
61616 
61617       # Use eval to expand a potential ~
61618       eval path="$path"
61619       if test ! -f "$path" && test ! -d "$path"; then
61620         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61621       fi
61622 
61623       if test -d "$path"; then
61624         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61625       else
61626         dir="`$DIRNAME "$path"`"
61627         base="`$BASENAME "$path"`"
61628         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61629       fi
61630     fi
61631   fi
61632 
61633 
61634     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61635     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61636 $as_echo_n "checking for freetype includes... " >&6; }
61637     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61638 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61639     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61640     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61641 $as_echo_n "checking for freetype libraries... " >&6; }
61642     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61643 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61644   fi
61645 
61646           fi
61647 
61648           if test "x$FOUND_FREETYPE" != xyes; then
61649             FREETYPE_BASE_DIR="$SYSROOT/usr"
61650             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61651 
61652   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61653   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61654   METHOD="well-known location"
61655 
61656   # Let's start with an optimistic view of the world :-)
61657   FOUND_FREETYPE=yes
61658 
61659   # First look for the canonical freetype main include file ft2build.h.
61660   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61661     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61662     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61663     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61664       # Fail.
61665       FOUND_FREETYPE=no
61666     fi
61667   fi
61668 
61669   if test "x$FOUND_FREETYPE" = xyes; then
61670     # Include file found, let's continue the sanity check.
61671     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61672 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61673 
61674     # Reset to default value
61675     FREETYPE_BASE_NAME=freetype
61676     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61677     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61678       if test "x$OPENJDK_BUILD_OS" = "xmacosx" &&
61679          test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61680         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61681         # for the .6 version explicitly.
61682         FREETYPE_BASE_NAME=freetype.6
61683         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61684         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61685 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61686       else
61687         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61688 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61689         FOUND_FREETYPE=no
61690       fi
61691     else
61692       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61693         # On Windows, we will need both .lib and .dll file.
61694         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61695           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61696 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61697           FOUND_FREETYPE=no
61698         fi
61699       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61700           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61701         # Found lib in isa dir, use that instead.
61702         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61703         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61704 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61705       fi
61706     fi
61707   fi
61708 
61709   if test "x$FOUND_FREETYPE" = xyes; then
61710 
61711   # Only process if variable expands to non-empty
61712 
61713   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61714     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61715 
61716   # Input might be given as Windows format, start by converting to
61717   # unix format.
61718   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61719   new_path=`$CYGPATH -u "$path"`
61720 
61721   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61722   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61723   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61724   # "foo.exe" is OK but "foo" is an error.
61725   #
61726   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61727   # It is also a way to make sure we got the proper file name for the real test later on.
61728   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61729   if test "x$test_shortpath" = x; then
61730     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61731 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61732     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61733   fi
61734 
61735   # Call helper function which possibly converts this using DOS-style short mode.
61736   # If so, the updated path is stored in $new_path.
61737 
61738   input_path="$new_path"
61739   # Check if we need to convert this using DOS-style short mode. If the path
61740   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61741   # take no chances and rewrite it.
61742   # Note: m4 eats our [], so we need to use [ and ] instead.
61743   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61744   if test "x$has_forbidden_chars" != x; then
61745     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61746     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61747     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61748     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61749       # Going to short mode and back again did indeed matter. Since short mode is
61750       # case insensitive, let's make it lowercase to improve readability.
61751       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61752       # Now convert it back to Unix-style (cygpath)
61753       input_path=`$CYGPATH -u "$shortmode_path"`
61754       new_path="$input_path"
61755     fi
61756   fi
61757 
61758   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61759   if test "x$test_cygdrive_prefix" = x; then
61760     # As a simple fix, exclude /usr/bin since it's not a real path.
61761     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61762       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61763       # a path prefixed by /cygdrive for fixpath to work.
61764       new_path="$CYGWIN_ROOT_PATH$input_path"
61765     fi
61766   fi
61767 
61768 
61769   if test "x$path" != "x$new_path"; then
61770     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61771     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61772 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61773   fi
61774 
61775     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61776 
61777   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61778   has_colon=`$ECHO $path | $GREP ^.:`
61779   new_path="$path"
61780   if test "x$has_colon" = x; then
61781     # Not in mixed or Windows style, start by that.
61782     new_path=`cmd //c echo $path`
61783   fi
61784 
61785 
61786   input_path="$new_path"
61787   # Check if we need to convert this using DOS-style short mode. If the path
61788   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61789   # take no chances and rewrite it.
61790   # Note: m4 eats our [], so we need to use [ and ] instead.
61791   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61792   if test "x$has_forbidden_chars" != x; then
61793     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61794     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61795   fi
61796 
61797 
61798   windows_path="$new_path"
61799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61800     unix_path=`$CYGPATH -u "$windows_path"`
61801     new_path="$unix_path"
61802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61803     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61804     new_path="$unix_path"
61805   fi
61806 
61807   if test "x$path" != "x$new_path"; then
61808     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61809     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61810 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61811   fi
61812 
61813   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61814   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61815 
61816     else
61817       # We're on a unix platform. Hooray! :)
61818       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61819       has_space=`$ECHO "$path" | $GREP " "`
61820       if test "x$has_space" != x; then
61821         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61822 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61823         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61824       fi
61825 
61826       # Use eval to expand a potential ~
61827       eval path="$path"
61828       if test ! -f "$path" && test ! -d "$path"; then
61829         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61830       fi
61831 
61832       if test -d "$path"; then
61833         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61834       else
61835         dir="`$DIRNAME "$path"`"
61836         base="`$BASENAME "$path"`"
61837         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61838       fi
61839     fi
61840   fi
61841 
61842 
61843   # Only process if variable expands to non-empty
61844 
61845   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61846     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61847 
61848   # Input might be given as Windows format, start by converting to
61849   # unix format.
61850   path="$POTENTIAL_FREETYPE_LIB_PATH"
61851   new_path=`$CYGPATH -u "$path"`
61852 
61853   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61854   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61855   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61856   # "foo.exe" is OK but "foo" is an error.
61857   #
61858   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61859   # It is also a way to make sure we got the proper file name for the real test later on.
61860   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61861   if test "x$test_shortpath" = x; then
61862     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61863 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61864     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61865   fi
61866 
61867   # Call helper function which possibly converts this using DOS-style short mode.
61868   # If so, the updated path is stored in $new_path.
61869 
61870   input_path="$new_path"
61871   # Check if we need to convert this using DOS-style short mode. If the path
61872   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61873   # take no chances and rewrite it.
61874   # Note: m4 eats our [], so we need to use [ and ] instead.
61875   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61876   if test "x$has_forbidden_chars" != x; then
61877     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61878     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61879     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61880     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61881       # Going to short mode and back again did indeed matter. Since short mode is
61882       # case insensitive, let's make it lowercase to improve readability.
61883       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61884       # Now convert it back to Unix-style (cygpath)
61885       input_path=`$CYGPATH -u "$shortmode_path"`
61886       new_path="$input_path"
61887     fi
61888   fi
61889 
61890   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61891   if test "x$test_cygdrive_prefix" = x; then
61892     # As a simple fix, exclude /usr/bin since it's not a real path.
61893     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61894       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61895       # a path prefixed by /cygdrive for fixpath to work.
61896       new_path="$CYGWIN_ROOT_PATH$input_path"
61897     fi
61898   fi
61899 
61900 
61901   if test "x$path" != "x$new_path"; then
61902     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61903     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61904 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61905   fi
61906 
61907     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61908 
61909   path="$POTENTIAL_FREETYPE_LIB_PATH"
61910   has_colon=`$ECHO $path | $GREP ^.:`
61911   new_path="$path"
61912   if test "x$has_colon" = x; then
61913     # Not in mixed or Windows style, start by that.
61914     new_path=`cmd //c echo $path`
61915   fi
61916 
61917 
61918   input_path="$new_path"
61919   # Check if we need to convert this using DOS-style short mode. If the path
61920   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61921   # take no chances and rewrite it.
61922   # Note: m4 eats our [], so we need to use [ and ] instead.
61923   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61924   if test "x$has_forbidden_chars" != x; then
61925     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61926     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61927   fi
61928 
61929 
61930   windows_path="$new_path"
61931   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61932     unix_path=`$CYGPATH -u "$windows_path"`
61933     new_path="$unix_path"
61934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61935     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61936     new_path="$unix_path"
61937   fi
61938 
61939   if test "x$path" != "x$new_path"; then
61940     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61941     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61942 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61943   fi
61944 
61945   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61946   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61947 
61948     else
61949       # We're on a unix platform. Hooray! :)
61950       path="$POTENTIAL_FREETYPE_LIB_PATH"
61951       has_space=`$ECHO "$path" | $GREP " "`
61952       if test "x$has_space" != x; then
61953         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61954 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61955         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61956       fi
61957 
61958       # Use eval to expand a potential ~
61959       eval path="$path"
61960       if test ! -f "$path" && test ! -d "$path"; then
61961         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61962       fi
61963 
61964       if test -d "$path"; then
61965         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61966       else
61967         dir="`$DIRNAME "$path"`"
61968         base="`$BASENAME "$path"`"
61969         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61970       fi
61971     fi
61972   fi
61973 
61974 
61975     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61976     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61977 $as_echo_n "checking for freetype includes... " >&6; }
61978     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61979 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61980     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61981     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61982 $as_echo_n "checking for freetype libraries... " >&6; }
61983     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61984 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61985   fi
61986 
61987             else
61988 
61989   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61990   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61991   METHOD="well-known location"
61992 
61993   # Let's start with an optimistic view of the world :-)
61994   FOUND_FREETYPE=yes
61995 
61996   # First look for the canonical freetype main include file ft2build.h.
61997   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61998     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61999     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62000     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62001       # Fail.
62002       FOUND_FREETYPE=no
62003     fi
62004   fi
62005 
62006   if test "x$FOUND_FREETYPE" = xyes; then
62007     # Include file found, let's continue the sanity check.
62008     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62009 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62010 
62011     # Reset to default value
62012     FREETYPE_BASE_NAME=freetype
62013     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62014     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62015       if test "x$OPENJDK_BUILD_OS" = "xmacosx" &&
62016          test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62017         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62018         # for the .6 version explicitly.
62019         FREETYPE_BASE_NAME=freetype.6
62020         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62021         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62022 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62023       else
62024         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62025 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62026         FOUND_FREETYPE=no
62027       fi
62028     else
62029       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62030         # On Windows, we will need both .lib and .dll file.
62031         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62032           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62033 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62034           FOUND_FREETYPE=no
62035         fi
62036       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62037           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62038         # Found lib in isa dir, use that instead.
62039         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62040         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62041 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62042       fi
62043     fi
62044   fi
62045 
62046   if test "x$FOUND_FREETYPE" = xyes; then
62047 
62048   # Only process if variable expands to non-empty
62049 
62050   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62051     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62052 
62053   # Input might be given as Windows format, start by converting to
62054   # unix format.
62055   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62056   new_path=`$CYGPATH -u "$path"`
62057 
62058   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62059   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62060   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62061   # "foo.exe" is OK but "foo" is an error.
62062   #
62063   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62064   # It is also a way to make sure we got the proper file name for the real test later on.
62065   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62066   if test "x$test_shortpath" = x; then
62067     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62068 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62069     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62070   fi
62071 
62072   # Call helper function which possibly converts this using DOS-style short mode.
62073   # If so, the updated path is stored in $new_path.
62074 
62075   input_path="$new_path"
62076   # Check if we need to convert this using DOS-style short mode. If the path
62077   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62078   # take no chances and rewrite it.
62079   # Note: m4 eats our [], so we need to use [ and ] instead.
62080   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62081   if test "x$has_forbidden_chars" != x; then
62082     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62083     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62084     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62085     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62086       # Going to short mode and back again did indeed matter. Since short mode is
62087       # case insensitive, let's make it lowercase to improve readability.
62088       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62089       # Now convert it back to Unix-style (cygpath)
62090       input_path=`$CYGPATH -u "$shortmode_path"`
62091       new_path="$input_path"
62092     fi
62093   fi
62094 
62095   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62096   if test "x$test_cygdrive_prefix" = x; then
62097     # As a simple fix, exclude /usr/bin since it's not a real path.
62098     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62099       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62100       # a path prefixed by /cygdrive for fixpath to work.
62101       new_path="$CYGWIN_ROOT_PATH$input_path"
62102     fi
62103   fi
62104 
62105 
62106   if test "x$path" != "x$new_path"; then
62107     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62108     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62109 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62110   fi
62111 
62112     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62113 
62114   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62115   has_colon=`$ECHO $path | $GREP ^.:`
62116   new_path="$path"
62117   if test "x$has_colon" = x; then
62118     # Not in mixed or Windows style, start by that.
62119     new_path=`cmd //c echo $path`
62120   fi
62121 
62122 
62123   input_path="$new_path"
62124   # Check if we need to convert this using DOS-style short mode. If the path
62125   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62126   # take no chances and rewrite it.
62127   # Note: m4 eats our [], so we need to use [ and ] instead.
62128   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62129   if test "x$has_forbidden_chars" != x; then
62130     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62131     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62132   fi
62133 
62134 
62135   windows_path="$new_path"
62136   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62137     unix_path=`$CYGPATH -u "$windows_path"`
62138     new_path="$unix_path"
62139   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62140     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62141     new_path="$unix_path"
62142   fi
62143 
62144   if test "x$path" != "x$new_path"; then
62145     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62146     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62147 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62148   fi
62149 
62150   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62151   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62152 
62153     else
62154       # We're on a unix platform. Hooray! :)
62155       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62156       has_space=`$ECHO "$path" | $GREP " "`
62157       if test "x$has_space" != x; then
62158         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62159 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62160         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62161       fi
62162 
62163       # Use eval to expand a potential ~
62164       eval path="$path"
62165       if test ! -f "$path" && test ! -d "$path"; then
62166         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62167       fi
62168 
62169       if test -d "$path"; then
62170         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62171       else
62172         dir="`$DIRNAME "$path"`"
62173         base="`$BASENAME "$path"`"
62174         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62175       fi
62176     fi
62177   fi
62178 
62179 
62180   # Only process if variable expands to non-empty
62181 
62182   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62183     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62184 
62185   # Input might be given as Windows format, start by converting to
62186   # unix format.
62187   path="$POTENTIAL_FREETYPE_LIB_PATH"
62188   new_path=`$CYGPATH -u "$path"`
62189 
62190   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62191   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62192   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62193   # "foo.exe" is OK but "foo" is an error.
62194   #
62195   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62196   # It is also a way to make sure we got the proper file name for the real test later on.
62197   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62198   if test "x$test_shortpath" = x; then
62199     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62200 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62201     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62202   fi
62203 
62204   # Call helper function which possibly converts this using DOS-style short mode.
62205   # If so, the updated path is stored in $new_path.
62206 
62207   input_path="$new_path"
62208   # Check if we need to convert this using DOS-style short mode. If the path
62209   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62210   # take no chances and rewrite it.
62211   # Note: m4 eats our [], so we need to use [ and ] instead.
62212   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62213   if test "x$has_forbidden_chars" != x; then
62214     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62215     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62216     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62217     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62218       # Going to short mode and back again did indeed matter. Since short mode is
62219       # case insensitive, let's make it lowercase to improve readability.
62220       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62221       # Now convert it back to Unix-style (cygpath)
62222       input_path=`$CYGPATH -u "$shortmode_path"`
62223       new_path="$input_path"
62224     fi
62225   fi
62226 
62227   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62228   if test "x$test_cygdrive_prefix" = x; then
62229     # As a simple fix, exclude /usr/bin since it's not a real path.
62230     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62231       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62232       # a path prefixed by /cygdrive for fixpath to work.
62233       new_path="$CYGWIN_ROOT_PATH$input_path"
62234     fi
62235   fi
62236 
62237 
62238   if test "x$path" != "x$new_path"; then
62239     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62240     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62241 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62242   fi
62243 
62244     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62245 
62246   path="$POTENTIAL_FREETYPE_LIB_PATH"
62247   has_colon=`$ECHO $path | $GREP ^.:`
62248   new_path="$path"
62249   if test "x$has_colon" = x; then
62250     # Not in mixed or Windows style, start by that.
62251     new_path=`cmd //c echo $path`
62252   fi
62253 
62254 
62255   input_path="$new_path"
62256   # Check if we need to convert this using DOS-style short mode. If the path
62257   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62258   # take no chances and rewrite it.
62259   # Note: m4 eats our [], so we need to use [ and ] instead.
62260   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62261   if test "x$has_forbidden_chars" != x; then
62262     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62263     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62264   fi
62265 
62266 
62267   windows_path="$new_path"
62268   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62269     unix_path=`$CYGPATH -u "$windows_path"`
62270     new_path="$unix_path"
62271   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62272     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62273     new_path="$unix_path"
62274   fi
62275 
62276   if test "x$path" != "x$new_path"; then
62277     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62278     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62279 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62280   fi
62281 
62282   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62283   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62284 
62285     else
62286       # We're on a unix platform. Hooray! :)
62287       path="$POTENTIAL_FREETYPE_LIB_PATH"
62288       has_space=`$ECHO "$path" | $GREP " "`
62289       if test "x$has_space" != x; then
62290         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62291 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62292         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62293       fi
62294 
62295       # Use eval to expand a potential ~
62296       eval path="$path"
62297       if test ! -f "$path" && test ! -d "$path"; then
62298         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62299       fi
62300 
62301       if test -d "$path"; then
62302         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62303       else
62304         dir="`$DIRNAME "$path"`"
62305         base="`$BASENAME "$path"`"
62306         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62307       fi
62308     fi
62309   fi
62310 
62311 
62312     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62313     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62314 $as_echo_n "checking for freetype includes... " >&6; }
62315     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62316 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62317     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62318     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62319 $as_echo_n "checking for freetype libraries... " >&6; }
62320     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62321 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62322   fi
62323 
62324               if test "x$FOUND_FREETYPE" != xyes; then
62325 
62326   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62327   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62328   METHOD="well-known location"
62329 
62330   # Let's start with an optimistic view of the world :-)
62331   FOUND_FREETYPE=yes
62332 
62333   # First look for the canonical freetype main include file ft2build.h.
62334   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62335     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62336     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62337     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62338       # Fail.
62339       FOUND_FREETYPE=no
62340     fi
62341   fi
62342 
62343   if test "x$FOUND_FREETYPE" = xyes; then
62344     # Include file found, let's continue the sanity check.
62345     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62346 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62347 
62348     # Reset to default value
62349     FREETYPE_BASE_NAME=freetype
62350     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62351     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62352       if test "x$OPENJDK_BUILD_OS" = "xmacosx" &&
62353          test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62354         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62355         # for the .6 version explicitly.
62356         FREETYPE_BASE_NAME=freetype.6
62357         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62358         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62359 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62360       else
62361         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62362 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62363         FOUND_FREETYPE=no
62364       fi
62365     else
62366       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62367         # On Windows, we will need both .lib and .dll file.
62368         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62369           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62370 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62371           FOUND_FREETYPE=no
62372         fi
62373       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62374           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62375         # Found lib in isa dir, use that instead.
62376         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62377         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62378 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62379       fi
62380     fi
62381   fi
62382 
62383   if test "x$FOUND_FREETYPE" = xyes; then
62384 
62385   # Only process if variable expands to non-empty
62386 
62387   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62388     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62389 
62390   # Input might be given as Windows format, start by converting to
62391   # unix format.
62392   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62393   new_path=`$CYGPATH -u "$path"`
62394 
62395   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62396   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62397   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62398   # "foo.exe" is OK but "foo" is an error.
62399   #
62400   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62401   # It is also a way to make sure we got the proper file name for the real test later on.
62402   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62403   if test "x$test_shortpath" = x; then
62404     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62405 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62406     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62407   fi
62408 
62409   # Call helper function which possibly converts this using DOS-style short mode.
62410   # If so, the updated path is stored in $new_path.
62411 
62412   input_path="$new_path"
62413   # Check if we need to convert this using DOS-style short mode. If the path
62414   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62415   # take no chances and rewrite it.
62416   # Note: m4 eats our [], so we need to use [ and ] instead.
62417   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62418   if test "x$has_forbidden_chars" != x; then
62419     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62420     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62421     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62422     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62423       # Going to short mode and back again did indeed matter. Since short mode is
62424       # case insensitive, let's make it lowercase to improve readability.
62425       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62426       # Now convert it back to Unix-style (cygpath)
62427       input_path=`$CYGPATH -u "$shortmode_path"`
62428       new_path="$input_path"
62429     fi
62430   fi
62431 
62432   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62433   if test "x$test_cygdrive_prefix" = x; then
62434     # As a simple fix, exclude /usr/bin since it's not a real path.
62435     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62436       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62437       # a path prefixed by /cygdrive for fixpath to work.
62438       new_path="$CYGWIN_ROOT_PATH$input_path"
62439     fi
62440   fi
62441 
62442 
62443   if test "x$path" != "x$new_path"; then
62444     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62445     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62446 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62447   fi
62448 
62449     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62450 
62451   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62452   has_colon=`$ECHO $path | $GREP ^.:`
62453   new_path="$path"
62454   if test "x$has_colon" = x; then
62455     # Not in mixed or Windows style, start by that.
62456     new_path=`cmd //c echo $path`
62457   fi
62458 
62459 
62460   input_path="$new_path"
62461   # Check if we need to convert this using DOS-style short mode. If the path
62462   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62463   # take no chances and rewrite it.
62464   # Note: m4 eats our [], so we need to use [ and ] instead.
62465   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62466   if test "x$has_forbidden_chars" != x; then
62467     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62468     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62469   fi
62470 
62471 
62472   windows_path="$new_path"
62473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62474     unix_path=`$CYGPATH -u "$windows_path"`
62475     new_path="$unix_path"
62476   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62477     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62478     new_path="$unix_path"
62479   fi
62480 
62481   if test "x$path" != "x$new_path"; then
62482     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62483     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62484 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62485   fi
62486 
62487   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62488   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62489 
62490     else
62491       # We're on a unix platform. Hooray! :)
62492       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62493       has_space=`$ECHO "$path" | $GREP " "`
62494       if test "x$has_space" != x; then
62495         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62496 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62497         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62498       fi
62499 
62500       # Use eval to expand a potential ~
62501       eval path="$path"
62502       if test ! -f "$path" && test ! -d "$path"; then
62503         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62504       fi
62505 
62506       if test -d "$path"; then
62507         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62508       else
62509         dir="`$DIRNAME "$path"`"
62510         base="`$BASENAME "$path"`"
62511         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62512       fi
62513     fi
62514   fi
62515 
62516 
62517   # Only process if variable expands to non-empty
62518 
62519   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62520     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62521 
62522   # Input might be given as Windows format, start by converting to
62523   # unix format.
62524   path="$POTENTIAL_FREETYPE_LIB_PATH"
62525   new_path=`$CYGPATH -u "$path"`
62526 
62527   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62528   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62529   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62530   # "foo.exe" is OK but "foo" is an error.
62531   #
62532   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62533   # It is also a way to make sure we got the proper file name for the real test later on.
62534   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62535   if test "x$test_shortpath" = x; then
62536     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62537 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62538     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62539   fi
62540 
62541   # Call helper function which possibly converts this using DOS-style short mode.
62542   # If so, the updated path is stored in $new_path.
62543 
62544   input_path="$new_path"
62545   # Check if we need to convert this using DOS-style short mode. If the path
62546   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62547   # take no chances and rewrite it.
62548   # Note: m4 eats our [], so we need to use [ and ] instead.
62549   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62550   if test "x$has_forbidden_chars" != x; then
62551     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62552     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62553     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62554     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62555       # Going to short mode and back again did indeed matter. Since short mode is
62556       # case insensitive, let's make it lowercase to improve readability.
62557       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62558       # Now convert it back to Unix-style (cygpath)
62559       input_path=`$CYGPATH -u "$shortmode_path"`
62560       new_path="$input_path"
62561     fi
62562   fi
62563 
62564   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62565   if test "x$test_cygdrive_prefix" = x; then
62566     # As a simple fix, exclude /usr/bin since it's not a real path.
62567     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62568       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62569       # a path prefixed by /cygdrive for fixpath to work.
62570       new_path="$CYGWIN_ROOT_PATH$input_path"
62571     fi
62572   fi
62573 
62574 
62575   if test "x$path" != "x$new_path"; then
62576     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62577     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62578 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62579   fi
62580 
62581     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62582 
62583   path="$POTENTIAL_FREETYPE_LIB_PATH"
62584   has_colon=`$ECHO $path | $GREP ^.:`
62585   new_path="$path"
62586   if test "x$has_colon" = x; then
62587     # Not in mixed or Windows style, start by that.
62588     new_path=`cmd //c echo $path`
62589   fi
62590 
62591 
62592   input_path="$new_path"
62593   # Check if we need to convert this using DOS-style short mode. If the path
62594   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62595   # take no chances and rewrite it.
62596   # Note: m4 eats our [], so we need to use [ and ] instead.
62597   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62598   if test "x$has_forbidden_chars" != x; then
62599     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62600     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62601   fi
62602 
62603 
62604   windows_path="$new_path"
62605   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62606     unix_path=`$CYGPATH -u "$windows_path"`
62607     new_path="$unix_path"
62608   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62609     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62610     new_path="$unix_path"
62611   fi
62612 
62613   if test "x$path" != "x$new_path"; then
62614     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62615     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62616 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62617   fi
62618 
62619   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62620   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62621 
62622     else
62623       # We're on a unix platform. Hooray! :)
62624       path="$POTENTIAL_FREETYPE_LIB_PATH"
62625       has_space=`$ECHO "$path" | $GREP " "`
62626       if test "x$has_space" != x; then
62627         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62628 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62629         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62630       fi
62631 
62632       # Use eval to expand a potential ~
62633       eval path="$path"
62634       if test ! -f "$path" && test ! -d "$path"; then
62635         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62636       fi
62637 
62638       if test -d "$path"; then
62639         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62640       else
62641         dir="`$DIRNAME "$path"`"
62642         base="`$BASENAME "$path"`"
62643         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62644       fi
62645     fi
62646   fi
62647 
62648 
62649     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62650     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62651 $as_echo_n "checking for freetype includes... " >&6; }
62652     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62653 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62654     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62655     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62656 $as_echo_n "checking for freetype libraries... " >&6; }
62657     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62658 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62659   fi
62660 
62661               fi
62662             fi
62663           fi
62664         fi
62665       fi # end check in well-known locations
62666 
62667       if test "x$FOUND_FREETYPE" != xyes; then
62668 
62669   # Print a helpful message on how to acquire the necessary build dependency.
62670   # freetype is the help tag: freetype, cups, alsa etc
62671   MISSING_DEPENDENCY=freetype
62672 
62673   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62674     cygwin_help $MISSING_DEPENDENCY
62675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62676     msys_help $MISSING_DEPENDENCY
62677   else
62678     PKGHANDLER_COMMAND=
62679 
62680     case $PKGHANDLER in
62681       apt-get)
62682         apt_help     $MISSING_DEPENDENCY ;;
62683       yum)
62684         yum_help     $MISSING_DEPENDENCY ;;
62685       port)
62686         port_help    $MISSING_DEPENDENCY ;;
62687       pkgutil)
62688         pkgutil_help $MISSING_DEPENDENCY ;;
62689       pkgadd)
62690         pkgadd_help  $MISSING_DEPENDENCY ;;
62691     esac
62692 
62693     if test "x$PKGHANDLER_COMMAND" != x; then
62694       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62695     fi
62696   fi
62697 
62698         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62699       fi
62700     fi # end user specified settings
62701 
62702     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62703     if test "x$FREETYPE_CFLAGS" = x; then
62704 
62705   # Only process if variable expands to non-empty
62706 
62707   if test "x$FREETYPE_INCLUDE_PATH" != x; then
62708     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62709 
62710   # Input might be given as Windows format, start by converting to
62711   # unix format.
62712   path="$FREETYPE_INCLUDE_PATH"
62713   new_path=`$CYGPATH -u "$path"`
62714 
62715   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62716   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62717   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62718   # "foo.exe" is OK but "foo" is an error.
62719   #
62720   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62721   # It is also a way to make sure we got the proper file name for the real test later on.
62722   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62723   if test "x$test_shortpath" = x; then
62724     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62725 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62726     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62727   fi
62728 
62729   # Call helper function which possibly converts this using DOS-style short mode.
62730   # If so, the updated path is stored in $new_path.
62731 
62732   input_path="$new_path"
62733   # Check if we need to convert this using DOS-style short mode. If the path
62734   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62735   # take no chances and rewrite it.
62736   # Note: m4 eats our [], so we need to use [ and ] instead.
62737   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62738   if test "x$has_forbidden_chars" != x; then
62739     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62740     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62741     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62742     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62743       # Going to short mode and back again did indeed matter. Since short mode is
62744       # case insensitive, let's make it lowercase to improve readability.
62745       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62746       # Now convert it back to Unix-style (cygpath)
62747       input_path=`$CYGPATH -u "$shortmode_path"`
62748       new_path="$input_path"
62749     fi
62750   fi
62751 
62752   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62753   if test "x$test_cygdrive_prefix" = x; then
62754     # As a simple fix, exclude /usr/bin since it's not a real path.
62755     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62756       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62757       # a path prefixed by /cygdrive for fixpath to work.
62758       new_path="$CYGWIN_ROOT_PATH$input_path"
62759     fi
62760   fi
62761 
62762 
62763   if test "x$path" != "x$new_path"; then
62764     FREETYPE_INCLUDE_PATH="$new_path"
62765     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62766 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62767   fi
62768 
62769     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62770 
62771   path="$FREETYPE_INCLUDE_PATH"
62772   has_colon=`$ECHO $path | $GREP ^.:`
62773   new_path="$path"
62774   if test "x$has_colon" = x; then
62775     # Not in mixed or Windows style, start by that.
62776     new_path=`cmd //c echo $path`
62777   fi
62778 
62779 
62780   input_path="$new_path"
62781   # Check if we need to convert this using DOS-style short mode. If the path
62782   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62783   # take no chances and rewrite it.
62784   # Note: m4 eats our [], so we need to use [ and ] instead.
62785   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62786   if test "x$has_forbidden_chars" != x; then
62787     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62788     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62789   fi
62790 
62791 
62792   windows_path="$new_path"
62793   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62794     unix_path=`$CYGPATH -u "$windows_path"`
62795     new_path="$unix_path"
62796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62797     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62798     new_path="$unix_path"
62799   fi
62800 
62801   if test "x$path" != "x$new_path"; then
62802     FREETYPE_INCLUDE_PATH="$new_path"
62803     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62804 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62805   fi
62806 
62807   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62808   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62809 
62810     else
62811       # We're on a unix platform. Hooray! :)
62812       path="$FREETYPE_INCLUDE_PATH"
62813       has_space=`$ECHO "$path" | $GREP " "`
62814       if test "x$has_space" != x; then
62815         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62816 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62817         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62818       fi
62819 
62820       # Use eval to expand a potential ~
62821       eval path="$path"
62822       if test ! -f "$path" && test ! -d "$path"; then
62823         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62824       fi
62825 
62826       if test -d "$path"; then
62827         FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62828       else
62829         dir="`$DIRNAME "$path"`"
62830         base="`$BASENAME "$path"`"
62831         FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62832       fi
62833     fi
62834   fi
62835 
62836       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62837         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62838       else
62839         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62840       fi
62841     fi
62842 
62843     if test "x$FREETYPE_LIBS" = x; then
62844 
62845   # Only process if variable expands to non-empty
62846 
62847   if test "x$FREETYPE_LIB_PATH" != x; then
62848     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62849 
62850   # Input might be given as Windows format, start by converting to
62851   # unix format.
62852   path="$FREETYPE_LIB_PATH"
62853   new_path=`$CYGPATH -u "$path"`
62854 
62855   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62856   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62857   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62858   # "foo.exe" is OK but "foo" is an error.
62859   #
62860   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62861   # It is also a way to make sure we got the proper file name for the real test later on.
62862   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62863   if test "x$test_shortpath" = x; then
62864     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62865 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62866     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62867   fi
62868 
62869   # Call helper function which possibly converts this using DOS-style short mode.
62870   # If so, the updated path is stored in $new_path.
62871 
62872   input_path="$new_path"
62873   # Check if we need to convert this using DOS-style short mode. If the path
62874   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62875   # take no chances and rewrite it.
62876   # Note: m4 eats our [], so we need to use [ and ] instead.
62877   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62878   if test "x$has_forbidden_chars" != x; then
62879     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62880     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62881     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62882     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62883       # Going to short mode and back again did indeed matter. Since short mode is
62884       # case insensitive, let's make it lowercase to improve readability.
62885       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62886       # Now convert it back to Unix-style (cygpath)
62887       input_path=`$CYGPATH -u "$shortmode_path"`
62888       new_path="$input_path"
62889     fi
62890   fi
62891 
62892   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62893   if test "x$test_cygdrive_prefix" = x; then
62894     # As a simple fix, exclude /usr/bin since it's not a real path.
62895     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62896       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62897       # a path prefixed by /cygdrive for fixpath to work.
62898       new_path="$CYGWIN_ROOT_PATH$input_path"
62899     fi
62900   fi
62901 
62902 
62903   if test "x$path" != "x$new_path"; then
62904     FREETYPE_LIB_PATH="$new_path"
62905     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62906 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62907   fi
62908 
62909     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62910 
62911   path="$FREETYPE_LIB_PATH"
62912   has_colon=`$ECHO $path | $GREP ^.:`
62913   new_path="$path"
62914   if test "x$has_colon" = x; then
62915     # Not in mixed or Windows style, start by that.
62916     new_path=`cmd //c echo $path`
62917   fi
62918 
62919 
62920   input_path="$new_path"
62921   # Check if we need to convert this using DOS-style short mode. If the path
62922   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62923   # take no chances and rewrite it.
62924   # Note: m4 eats our [], so we need to use [ and ] instead.
62925   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62926   if test "x$has_forbidden_chars" != x; then
62927     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62928     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62929   fi
62930 
62931 
62932   windows_path="$new_path"
62933   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62934     unix_path=`$CYGPATH -u "$windows_path"`
62935     new_path="$unix_path"
62936   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62937     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62938     new_path="$unix_path"
62939   fi
62940 
62941   if test "x$path" != "x$new_path"; then
62942     FREETYPE_LIB_PATH="$new_path"
62943     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62944 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62945   fi
62946 
62947   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62948   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62949 
62950     else
62951       # We're on a unix platform. Hooray! :)
62952       path="$FREETYPE_LIB_PATH"
62953       has_space=`$ECHO "$path" | $GREP " "`
62954       if test "x$has_space" != x; then
62955         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62956 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62957         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62958       fi
62959 
62960       # Use eval to expand a potential ~
62961       eval path="$path"
62962       if test ! -f "$path" && test ! -d "$path"; then
62963         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62964       fi
62965 
62966       if test -d "$path"; then
62967         FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62968       else
62969         dir="`$DIRNAME "$path"`"
62970         base="`$BASENAME "$path"`"
62971         FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62972       fi
62973     fi
62974   fi
62975 
62976       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62977         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62978       else
62979         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62980       fi
62981     fi
62982 
62983     # Try to compile it
62984     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62985 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
62986     ac_ext=cpp
62987 ac_cpp='$CXXCPP $CPPFLAGS'
62988 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62989 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62990 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62991 
62992     PREV_CXXCFLAGS="$CXXFLAGS"
62993     PREV_LIBS="$LIBS"
62994     PREV_CXX="$CXX"
62995     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62996     LIBS="$LIBS $FREETYPE_LIBS"
62997     CXX="$FIXPATH $CXX"
62998     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62999 /* end confdefs.h.  */
63000 
63001           #include<ft2build.h>
63002           #include FT_FREETYPE_H
63003           int main () {
63004             FT_Init_FreeType(NULL);
63005             return 0;
63006           }
63007 
63008 _ACEOF
63009 if ac_fn_cxx_try_link "$LINENO"; then :
63010 
63011           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63012 $as_echo "yes" >&6; }
63013 
63014 else
63015 
63016           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63017 $as_echo "no" >&6; }
63018           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63019 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63020           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63021 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63022 
63023 
63024   # Print a helpful message on how to acquire the necessary build dependency.
63025   # freetype is the help tag: freetype, cups, alsa etc
63026   MISSING_DEPENDENCY=freetype
63027 
63028   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63029     cygwin_help $MISSING_DEPENDENCY
63030   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63031     msys_help $MISSING_DEPENDENCY
63032   else
63033     PKGHANDLER_COMMAND=
63034 
63035     case $PKGHANDLER in
63036       apt-get)
63037         apt_help     $MISSING_DEPENDENCY ;;
63038       yum)
63039         yum_help     $MISSING_DEPENDENCY ;;
63040       port)
63041         port_help    $MISSING_DEPENDENCY ;;
63042       pkgutil)
63043         pkgutil_help $MISSING_DEPENDENCY ;;
63044       pkgadd)
63045         pkgadd_help  $MISSING_DEPENDENCY ;;
63046     esac
63047 
63048     if test "x$PKGHANDLER_COMMAND" != x; then
63049       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63050     fi
63051   fi
63052 
63053 
63054           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63055 
63056 
63057 fi
63058 rm -f core conftest.err conftest.$ac_objext \
63059     conftest$ac_exeext conftest.$ac_ext
63060     CXXCFLAGS="$PREV_CXXFLAGS"
63061     LIBS="$PREV_LIBS"
63062     CXX="$PREV_CXX"
63063     ac_ext=cpp
63064 ac_cpp='$CXXCPP $CPPFLAGS'
63065 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63066 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63067 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63068 
63069 
63070     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63071 $as_echo_n "checking if we should bundle freetype... " >&6; }
63072     if test "x$BUNDLE_FREETYPE" = xyes; then
63073       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63074     fi
63075     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63076 $as_echo "$BUNDLE_FREETYPE" >&6; }
63077 
63078   fi # end freetype needed
63079 
63080 
63081 
63082 
63083 
63084 
63085 
63086 # Check whether --with-alsa was given.
63087 if test "${with_alsa+set}" = set; then :
63088   withval=$with_alsa;
63089 fi
63090 
63091 
63092 # Check whether --with-alsa-include was given.
63093 if test "${with_alsa_include+set}" = set; then :
63094   withval=$with_alsa_include;
63095 fi
63096 
63097 
63098 # Check whether --with-alsa-lib was given.
63099 if test "${with_alsa_lib+set}" = set; then :
63100   withval=$with_alsa_lib;
63101 fi
63102 
63103 
63104   if test "x$NEEDS_LIB_ALSA" = xfalse; then
63105     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63106         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63107         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63108       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63109 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63110     fi
63111     ALSA_CFLAGS=
63112     ALSA_LIBS=
63113   else
63114     ALSA_FOUND=no
63115 
63116     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63117       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63118     fi
63119 
63120     if test "x${with_alsa}" != x; then
63121       ALSA_LIBS="-L${with_alsa}/lib -lasound"
63122       ALSA_CFLAGS="-I${with_alsa}/include"
63123       ALSA_FOUND=yes
63124     fi
63125     if test "x${with_alsa_include}" != x; then
63126       ALSA_CFLAGS="-I${with_alsa_include}"
63127       ALSA_FOUND=yes
63128     fi
63129     if test "x${with_alsa_lib}" != x; then
63130       ALSA_LIBS="-L${with_alsa_lib} -lasound"
63131       ALSA_FOUND=yes
63132     fi
63133     # Do not try pkg-config if we have a sysroot set.
63134     if test "x$SYSROOT" = x; then
63135       if test "x$ALSA_FOUND" = xno; then
63136 
63137 pkg_failed=no
63138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63139 $as_echo_n "checking for ALSA... " >&6; }
63140 
63141 if test -n "$ALSA_CFLAGS"; then
63142     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63143  elif test -n "$PKG_CONFIG"; then
63144     if test -n "$PKG_CONFIG" && \
63145     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63146   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63147   ac_status=$?
63148   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63149   test $ac_status = 0; }; then
63150   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63151 else
63152   pkg_failed=yes
63153 fi
63154  else
63155     pkg_failed=untried
63156 fi
63157 if test -n "$ALSA_LIBS"; then
63158     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63159  elif test -n "$PKG_CONFIG"; then
63160     if test -n "$PKG_CONFIG" && \
63161     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63162   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63163   ac_status=$?
63164   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63165   test $ac_status = 0; }; then
63166   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63167 else
63168   pkg_failed=yes
63169 fi
63170  else
63171     pkg_failed=untried
63172 fi
63173 
63174 
63175 
63176 if test $pkg_failed = yes; then
63177 
63178 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63179         _pkg_short_errors_supported=yes
63180 else
63181         _pkg_short_errors_supported=no
63182 fi
63183         if test $_pkg_short_errors_supported = yes; then
63184                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63185         else
63186                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63187         fi
63188         # Put the nasty error message in config.log where it belongs
63189         echo "$ALSA_PKG_ERRORS" >&5
63190 
63191         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63192 $as_echo "no" >&6; }
63193                 ALSA_FOUND=no
63194 elif test $pkg_failed = untried; then
63195         ALSA_FOUND=no
63196 else
63197         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63198         ALSA_LIBS=$pkg_cv_ALSA_LIBS
63199         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63200 $as_echo "yes" >&6; }
63201         ALSA_FOUND=yes
63202 fi
63203       fi
63204     fi
63205     if test "x$ALSA_FOUND" = xno; then
63206       for ac_header in alsa/asoundlib.h
63207 do :
63208   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63209 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63210   cat >>confdefs.h <<_ACEOF
63211 #define HAVE_ALSA_ASOUNDLIB_H 1
63212 _ACEOF
63213 
63214             ALSA_FOUND=yes
63215             ALSA_CFLAGS=-Iignoreme
63216             ALSA_LIBS=-lasound
63217             DEFAULT_ALSA=yes
63218 
63219 else
63220   ALSA_FOUND=no
63221 
63222 fi
63223 
63224 done
63225 
63226     fi
63227     if test "x$ALSA_FOUND" = xno; then
63228 
63229   # Print a helpful message on how to acquire the necessary build dependency.
63230   # alsa is the help tag: freetype, cups, alsa etc
63231   MISSING_DEPENDENCY=alsa
63232 
63233   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63234     cygwin_help $MISSING_DEPENDENCY
63235   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63236     msys_help $MISSING_DEPENDENCY
63237   else
63238     PKGHANDLER_COMMAND=
63239 
63240     case $PKGHANDLER in
63241       apt-get)
63242         apt_help     $MISSING_DEPENDENCY ;;
63243       yum)
63244         yum_help     $MISSING_DEPENDENCY ;;
63245       port)
63246         port_help    $MISSING_DEPENDENCY ;;
63247       pkgutil)
63248         pkgutil_help $MISSING_DEPENDENCY ;;
63249       pkgadd)
63250         pkgadd_help  $MISSING_DEPENDENCY ;;
63251     esac
63252 
63253     if test "x$PKGHANDLER_COMMAND" != x; then
63254       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63255     fi
63256   fi
63257 
63258       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63259     fi
63260   fi
63261 
63262 
63263 
63264 
63265 
63266 
63267 # Check whether --with-libffi was given.
63268 if test "${with_libffi+set}" = set; then :
63269   withval=$with_libffi;
63270 fi
63271 
63272 
63273 # Check whether --with-libffi-include was given.
63274 if test "${with_libffi_include+set}" = set; then :
63275   withval=$with_libffi_include;
63276 fi
63277 
63278 
63279 # Check whether --with-libffi-lib was given.
63280 if test "${with_libffi_lib+set}" = set; then :
63281   withval=$with_libffi_lib;
63282 fi
63283 
63284   # Check whether --enable-libffi-bundling was given.
63285 if test "${enable_libffi_bundling+set}" = set; then :
63286   enableval=$enable_libffi_bundling;
63287 fi
63288 
63289 
63290   if test "x$NEEDS_LIB_FFI" = xfalse; then
63291     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63292         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63293         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63294       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63295 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63296     fi
63297     LIBFFI_CFLAGS=
63298     LIBFFI_LIBS=
63299   else
63300     LIBFFI_FOUND=no
63301 
63302     BUNDLE_LIBFFI="$enable_libffi_bundling"
63303     if test "x$BUNDLE_LIBFFI" = x; then
63304       # If not specified, default is to bundle libffi on Android/Zero VM
63305       if test "x$OPENJDK_TARGET_OS" = xandroid &&   [[ " $JVM_VARIANTS " =~ " zero " ]]  ; then
63306         BUNDLE_LIBFFI=yes
63307       fi
63308     fi
63309 
63310     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63311       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63312     fi
63313 
63314     if test "x${with_libffi}" != x; then
63315       LIBFFI_LIB_PATH=${with_libffi}/lib
63316       LIBFFI_LIBS="-L${LIBFFI_LIB_PATH} -lffi"
63317       LIBFFI_CFLAGS="-I${with_libffi}/include"
63318       LIBFFI_FOUND=yes
63319     fi
63320     if test "x${with_libffi_include}" != x; then
63321       LIBFFI_CFLAGS="-I${with_libffi_include}"
63322       LIBFFI_FOUND=yes
63323     fi
63324     if test "x${with_libffi_lib}" != x; then
63325       LIBFFI_LIB_PATH=${with_libffi_lib}
63326       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63327       LIBFFI_FOUND=yes
63328     fi
63329     # Do not try pkg-config if we have a sysroot set.
63330     if test "x$SYSROOT" = x; then
63331       if test "x$LIBFFI_FOUND" = xno; then
63332         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63333 
63334 pkg_failed=no
63335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63336 $as_echo_n "checking for LIBFFI... " >&6; }
63337 
63338 if test -n "$LIBFFI_CFLAGS"; then
63339     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63340  elif test -n "$PKG_CONFIG"; then
63341     if test -n "$PKG_CONFIG" && \
63342     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63343   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63344   ac_status=$?
63345   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63346   test $ac_status = 0; }; then
63347   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63348 else
63349   pkg_failed=yes
63350 fi
63351  else
63352     pkg_failed=untried
63353 fi
63354 if test -n "$LIBFFI_LIBS"; then
63355     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63356  elif test -n "$PKG_CONFIG"; then
63357     if test -n "$PKG_CONFIG" && \
63358     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63359   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63360   ac_status=$?
63361   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63362   test $ac_status = 0; }; then
63363   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63364 else
63365   pkg_failed=yes
63366 fi
63367  else
63368     pkg_failed=untried
63369 fi
63370 
63371 
63372 
63373 if test $pkg_failed = yes; then
63374 
63375 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63376         _pkg_short_errors_supported=yes
63377 else
63378         _pkg_short_errors_supported=no
63379 fi
63380         if test $_pkg_short_errors_supported = yes; then
63381                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63382         else
63383                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63384         fi
63385         # Put the nasty error message in config.log where it belongs
63386         echo "$LIBFFI_PKG_ERRORS" >&5
63387 
63388         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63389 $as_echo "no" >&6; }
63390                 LIBFFI_FOUND=no
63391 elif test $pkg_failed = untried; then
63392         LIBFFI_FOUND=no
63393 else
63394         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63395         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63396         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63397 $as_echo "yes" >&6; }
63398         LIBFFI_FOUND=yes
63399 fi
63400       fi
63401     fi
63402     if test "x$LIBFFI_FOUND" = xno; then
63403       for ac_header in ffi.h
63404 do :
63405   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63406 if test "x$ac_cv_header_ffi_h" = xyes; then :
63407   cat >>confdefs.h <<_ACEOF
63408 #define HAVE_FFI_H 1
63409 _ACEOF
63410 
63411             LIBFFI_FOUND=yes
63412             LIBFFI_CFLAGS=
63413             LIBFFI_LIBS=-lffi
63414 
63415 else
63416   LIBFFI_FOUND=no
63417 
63418 fi
63419 
63420 done
63421 
63422     fi
63423     if test "x$LIBFFI_FOUND" = xno; then
63424 
63425   # Print a helpful message on how to acquire the necessary build dependency.
63426   # ffi is the help tag: freetype, cups, alsa etc
63427   MISSING_DEPENDENCY=ffi
63428 
63429   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63430     cygwin_help $MISSING_DEPENDENCY
63431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63432     msys_help $MISSING_DEPENDENCY
63433   else
63434     PKGHANDLER_COMMAND=
63435 
63436     case $PKGHANDLER in
63437       apt-get)
63438         apt_help     $MISSING_DEPENDENCY ;;
63439       yum)
63440         yum_help     $MISSING_DEPENDENCY ;;
63441       port)
63442         port_help    $MISSING_DEPENDENCY ;;
63443       pkgutil)
63444         pkgutil_help $MISSING_DEPENDENCY ;;
63445       pkgadd)
63446         pkgadd_help  $MISSING_DEPENDENCY ;;
63447     esac
63448 
63449     if test "x$PKGHANDLER_COMMAND" != x; then
63450       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63451     fi
63452   fi
63453 
63454       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63455     fi
63456 
63457     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63458 $as_echo_n "checking if libffi works... " >&6; }
63459     ac_ext=c
63460 ac_cpp='$CPP $CPPFLAGS'
63461 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63462 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63463 ac_compiler_gnu=$ac_cv_c_compiler_gnu
63464 
63465     OLD_CFLAGS="$CFLAGS"
63466     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63467     OLD_LIBS="$LIBS"
63468     LIBS="$LIBS $LIBFFI_LIBS"
63469     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63470 /* end confdefs.h.  */
63471 #include <ffi.h>
63472 int
63473 main ()
63474 {
63475 
63476           ffi_call(NULL, NULL, NULL, NULL);
63477           return 0;
63478 
63479   ;
63480   return 0;
63481 }
63482 _ACEOF
63483 if ac_fn_c_try_link "$LINENO"; then :
63484   LIBFFI_WORKS=yes
63485 else
63486   LIBFFI_WORKS=no
63487 
63488 fi
63489 rm -f core conftest.err conftest.$ac_objext \
63490     conftest$ac_exeext conftest.$ac_ext
63491     CFLAGS="$OLD_CFLAGS"
63492     LIBS="$OLD_LIBS"
63493     ac_ext=cpp
63494 ac_cpp='$CXXCPP $CPPFLAGS'
63495 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63496 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63497 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63498 
63499     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63500 $as_echo "$LIBFFI_WORKS" >&6; }
63501 
63502     if test "x$LIBFFI_WORKS" = xno; then
63503 
63504   # Print a helpful message on how to acquire the necessary build dependency.
63505   # ffi is the help tag: freetype, cups, alsa etc
63506   MISSING_DEPENDENCY=ffi
63507 
63508   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63509     cygwin_help $MISSING_DEPENDENCY
63510   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63511     msys_help $MISSING_DEPENDENCY
63512   else
63513     PKGHANDLER_COMMAND=
63514 
63515     case $PKGHANDLER in
63516       apt-get)
63517         apt_help     $MISSING_DEPENDENCY ;;
63518       yum)
63519         yum_help     $MISSING_DEPENDENCY ;;
63520       port)
63521         port_help    $MISSING_DEPENDENCY ;;
63522       pkgutil)
63523         pkgutil_help $MISSING_DEPENDENCY ;;
63524       pkgadd)
63525         pkgadd_help  $MISSING_DEPENDENCY ;;
63526     esac
63527 
63528     if test "x$PKGHANDLER_COMMAND" != x; then
63529       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63530     fi
63531   fi
63532 
63533       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63534     fi
63535 
63536     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle libffi" >&5
63537 $as_echo_n "checking if we should bundle libffi... " >&6; }
63538     if test "x$BUNDLE_LIBFFI" = xyes; then
63539       if test "x$LIBFFI_LIB_PATH" != x; then
63540         LIBFFI_BUNDLE_LIB_PATH="$LIBFFI_LIB_PATH"
63541       else
63542         as_fn_error $? "BUNDLE_LIBFFI set but no LIBFFI_LIB_PATH" "$LINENO" 5
63543       fi
63544     fi
63545     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_LIBFFI" >&5
63546 $as_echo "$BUNDLE_LIBFFI" >&6; }
63547 
63548   fi
63549 
63550 
63551 
63552 
63553 
63554 
63555   if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63556     # Extract the first word of "llvm-config", so it can be a program name with args.
63557 set dummy llvm-config; ac_word=$2
63558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63559 $as_echo_n "checking for $ac_word... " >&6; }
63560 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63561   $as_echo_n "(cached) " >&6
63562 else
63563   if test -n "$LLVM_CONFIG"; then
63564   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63565 else
63566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63567 for as_dir in $PATH
63568 do
63569   IFS=$as_save_IFS
63570   test -z "$as_dir" && as_dir=.
63571     for ac_exec_ext in '' $ac_executable_extensions; do
63572   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63573     ac_cv_prog_LLVM_CONFIG="llvm-config"
63574     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63575     break 2
63576   fi
63577 done
63578   done
63579 IFS=$as_save_IFS
63580 
63581 fi
63582 fi
63583 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63584 if test -n "$LLVM_CONFIG"; then
63585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63586 $as_echo "$LLVM_CONFIG" >&6; }
63587 else
63588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63589 $as_echo "no" >&6; }
63590 fi
63591 
63592 
63593 
63594     if test "x$LLVM_CONFIG" != xllvm-config; then
63595       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63596     fi
63597 
63598     llvm_components="jit mcjit engine nativecodegen native"
63599     unset LLVM_CFLAGS
63600     for flag in $("$LLVM_CONFIG" --cxxflags); do
63601       if echo "${flag}" | grep -q '^-[ID]'; then
63602         if test "${flag}" != "-D_DEBUG" ; then
63603           if test "${LLVM_CFLAGS}" != "" ; then
63604             LLVM_CFLAGS="${LLVM_CFLAGS} "
63605           fi
63606           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63607         fi
63608       fi
63609     done
63610     llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63611     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63612 
63613     unset LLVM_LDFLAGS
63614     for flag in $("${LLVM_CONFIG}" --ldflags); do
63615       if echo "${flag}" | grep -q '^-L'; then
63616         if test "${LLVM_LDFLAGS}" != ""; then
63617           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63618         fi
63619         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63620       fi
63621     done
63622 
63623     unset LLVM_LIBS
63624     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63625       if echo "${flag}" | grep -q '^-l'; then
63626         if test "${LLVM_LIBS}" != ""; then
63627           LLVM_LIBS="${LLVM_LIBS} "
63628         fi
63629         LLVM_LIBS="${LLVM_LIBS}${flag}"
63630       fi
63631     done
63632 
63633     # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63634     # always properly detect -ltinfo
63635     LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63636 
63637 
63638 
63639 
63640   fi
63641 
63642 
63643 
63644 # Check whether --with-libjpeg was given.
63645 if test "${with_libjpeg+set}" = set; then :
63646   withval=$with_libjpeg;
63647 fi
63648 
63649 
63650   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63651 $as_echo_n "checking for which libjpeg to use... " >&6; }
63652   # default is bundled
63653   DEFAULT_LIBJPEG=bundled
63654   # if user didn't specify, use DEFAULT_LIBJPEG
63655   if test "x${with_libjpeg}" = "x"; then
63656     with_libjpeg=${DEFAULT_LIBJPEG}
63657   fi
63658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63659 $as_echo "${with_libjpeg}" >&6; }
63660 
63661   if test "x${with_libjpeg}" = "xbundled"; then
63662     USE_EXTERNAL_LIBJPEG=false
63663   elif test "x${with_libjpeg}" = "xsystem"; then
63664     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63665 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63666 
63667 else
63668    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63669 fi
63670 
63671 
63672     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63673 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63674 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63675   $as_echo_n "(cached) " >&6
63676 else
63677   ac_check_lib_save_LIBS=$LIBS
63678 LIBS="-ljpeg  $LIBS"
63679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63680 /* end confdefs.h.  */
63681 
63682 /* Override any GCC internal prototype to avoid an error.
63683    Use char because int might match the return type of a GCC
63684    builtin and then its argument prototype would still apply.  */
63685 #ifdef __cplusplus
63686 extern "C"
63687 #endif
63688 char jpeg_CreateDecompress ();
63689 int
63690 main ()
63691 {
63692 return jpeg_CreateDecompress ();
63693   ;
63694   return 0;
63695 }
63696 _ACEOF
63697 if ac_fn_cxx_try_link "$LINENO"; then :
63698   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63699 else
63700   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63701 fi
63702 rm -f core conftest.err conftest.$ac_objext \
63703     conftest$ac_exeext conftest.$ac_ext
63704 LIBS=$ac_check_lib_save_LIBS
63705 fi
63706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63707 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63708 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63709   cat >>confdefs.h <<_ACEOF
63710 #define HAVE_LIBJPEG 1
63711 _ACEOF
63712 
63713   LIBS="-ljpeg $LIBS"
63714 
63715 else
63716    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63717 fi
63718 
63719 
63720     USE_EXTERNAL_LIBJPEG=true
63721   else
63722     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63723   fi
63724 
63725 
63726 
63727 
63728 
63729 # Check whether --with-giflib was given.
63730 if test "${with_giflib+set}" = set; then :
63731   withval=$with_giflib;
63732 fi
63733 
63734 
63735   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63736 $as_echo_n "checking for which giflib to use... " >&6; }
63737   # default is bundled
63738   DEFAULT_GIFLIB=bundled
63739   # if user didn't specify, use DEFAULT_GIFLIB
63740   if test "x${with_giflib}" = "x"; then
63741     with_giflib=${DEFAULT_GIFLIB}
63742   fi
63743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63744 $as_echo "${with_giflib}" >&6; }
63745 
63746   if test "x${with_giflib}" = "xbundled"; then
63747     USE_EXTERNAL_LIBGIF=false
63748   elif test "x${with_giflib}" = "xsystem"; then
63749     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63750 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63751 
63752 else
63753    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63754 fi
63755 
63756 
63757     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63758 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63759 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63760   $as_echo_n "(cached) " >&6
63761 else
63762   ac_check_lib_save_LIBS=$LIBS
63763 LIBS="-lgif  $LIBS"
63764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63765 /* end confdefs.h.  */
63766 
63767 /* Override any GCC internal prototype to avoid an error.
63768    Use char because int might match the return type of a GCC
63769    builtin and then its argument prototype would still apply.  */
63770 #ifdef __cplusplus
63771 extern "C"
63772 #endif
63773 char DGifGetCode ();
63774 int
63775 main ()
63776 {
63777 return DGifGetCode ();
63778   ;
63779   return 0;
63780 }
63781 _ACEOF
63782 if ac_fn_cxx_try_link "$LINENO"; then :
63783   ac_cv_lib_gif_DGifGetCode=yes
63784 else
63785   ac_cv_lib_gif_DGifGetCode=no
63786 fi
63787 rm -f core conftest.err conftest.$ac_objext \
63788     conftest$ac_exeext conftest.$ac_ext
63789 LIBS=$ac_check_lib_save_LIBS
63790 fi
63791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63792 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63793 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63794   cat >>confdefs.h <<_ACEOF
63795 #define HAVE_LIBGIF 1
63796 _ACEOF
63797 
63798   LIBS="-lgif $LIBS"
63799 
63800 else
63801    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63802 fi
63803 
63804 
63805     USE_EXTERNAL_LIBGIF=true
63806   else
63807     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63808   fi
63809 
63810 
63811 
63812 
63813 
63814 # Check whether --with-libpng was given.
63815 if test "${with_libpng+set}" = set; then :
63816   withval=$with_libpng;
63817 fi
63818 
63819 
63820   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63821 $as_echo_n "checking for which libpng to use... " >&6; }
63822 
63823   # default is bundled
63824   DEFAULT_LIBPNG=bundled
63825   # if user didn't specify, use DEFAULT_LIBPNG
63826   if test "x${with_libpng}" = "x"; then
63827       with_libpng=${DEFAULT_LIBPNG}
63828   fi
63829 
63830   if test "x${with_libpng}" = "xbundled"; then
63831       USE_EXTERNAL_LIBPNG=false
63832       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63833 $as_echo "bundled" >&6; }
63834   elif test "x${with_libpng}" = "xsystem"; then
63835 
63836 pkg_failed=no
63837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63838 $as_echo_n "checking for PNG... " >&6; }
63839 
63840 if test -n "$PNG_CFLAGS"; then
63841     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63842  elif test -n "$PKG_CONFIG"; then
63843     if test -n "$PKG_CONFIG" && \
63844     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63845   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63846   ac_status=$?
63847   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63848   test $ac_status = 0; }; then
63849   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63850 else
63851   pkg_failed=yes
63852 fi
63853  else
63854     pkg_failed=untried
63855 fi
63856 if test -n "$PNG_LIBS"; then
63857     pkg_cv_PNG_LIBS="$PNG_LIBS"
63858  elif test -n "$PKG_CONFIG"; then
63859     if test -n "$PKG_CONFIG" && \
63860     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63861   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63862   ac_status=$?
63863   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63864   test $ac_status = 0; }; then
63865   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63866 else
63867   pkg_failed=yes
63868 fi
63869  else
63870     pkg_failed=untried
63871 fi
63872 
63873 
63874 
63875 if test $pkg_failed = yes; then
63876 
63877 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63878         _pkg_short_errors_supported=yes
63879 else
63880         _pkg_short_errors_supported=no
63881 fi
63882         if test $_pkg_short_errors_supported = yes; then
63883                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63884         else
63885                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63886         fi
63887         # Put the nasty error message in config.log where it belongs
63888         echo "$PNG_PKG_ERRORS" >&5
63889 
63890         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63891 $as_echo "no" >&6; }
63892                  LIBPNG_FOUND=no
63893 elif test $pkg_failed = untried; then
63894          LIBPNG_FOUND=no
63895 else
63896         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63897         PNG_LIBS=$pkg_cv_PNG_LIBS
63898         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63899 $as_echo "yes" >&6; }
63900          LIBPNG_FOUND=yes
63901 fi
63902       if test "x${LIBPNG_FOUND}" = "xyes"; then
63903           USE_EXTERNAL_LIBPNG=true
63904           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63905 $as_echo "system" >&6; }
63906       else
63907           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63908 $as_echo "system not found" >&6; }
63909           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63910       fi
63911   else
63912       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63913   fi
63914 
63915 
63916 
63917 
63918 
63919 # Check whether --with-zlib was given.
63920 if test "${with_zlib+set}" = set; then :
63921   withval=$with_zlib;
63922 fi
63923 
63924 
63925   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63926 $as_echo_n "checking for compress in -lz... " >&6; }
63927 if ${ac_cv_lib_z_compress+:} false; then :
63928   $as_echo_n "(cached) " >&6
63929 else
63930   ac_check_lib_save_LIBS=$LIBS
63931 LIBS="-lz  $LIBS"
63932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63933 /* end confdefs.h.  */
63934 
63935 /* Override any GCC internal prototype to avoid an error.
63936    Use char because int might match the return type of a GCC
63937    builtin and then its argument prototype would still apply.  */
63938 #ifdef __cplusplus
63939 extern "C"
63940 #endif
63941 char compress ();
63942 int
63943 main ()
63944 {
63945 return compress ();
63946   ;
63947   return 0;
63948 }
63949 _ACEOF
63950 if ac_fn_cxx_try_link "$LINENO"; then :
63951   ac_cv_lib_z_compress=yes
63952 else
63953   ac_cv_lib_z_compress=no
63954 fi
63955 rm -f core conftest.err conftest.$ac_objext \
63956     conftest$ac_exeext conftest.$ac_ext
63957 LIBS=$ac_check_lib_save_LIBS
63958 fi
63959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63960 $as_echo "$ac_cv_lib_z_compress" >&6; }
63961 if test "x$ac_cv_lib_z_compress" = xyes; then :
63962    ZLIB_FOUND=yes
63963 else
63964    ZLIB_FOUND=no
63965 fi
63966 
63967 
63968   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63969 $as_echo_n "checking for which zlib to use... " >&6; }
63970 
63971   DEFAULT_ZLIB=system
63972   if test "x$OPENJDK_TARGET_OS" = xwindows; then
63973     # On windows default is bundled...on others default is system
63974     DEFAULT_ZLIB=bundled
63975   fi
63976 
63977   if test "x${ZLIB_FOUND}" != "xyes"; then
63978     # If we don't find any system...set default to bundled
63979     DEFAULT_ZLIB=bundled
63980   fi
63981 
63982   # If user didn't specify, use DEFAULT_ZLIB
63983   if test "x${with_zlib}" = "x"; then
63984     with_zlib=${DEFAULT_ZLIB}
63985   fi
63986 
63987   if test "x${with_zlib}" = "xbundled"; then
63988     USE_EXTERNAL_LIBZ=false
63989     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63990 $as_echo "bundled" >&6; }
63991   elif test "x${with_zlib}" = "xsystem"; then
63992     if test "x${ZLIB_FOUND}" = "xyes"; then
63993       USE_EXTERNAL_LIBZ=true
63994       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63995 $as_echo "system" >&6; }
63996     else
63997       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63998 $as_echo "system not found" >&6; }
63999       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64000     fi
64001   else
64002     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64003   fi
64004 
64005 
64006 
64007 
64008 
64009 # Check whether --with-lcms was given.
64010 if test "${with_lcms+set}" = set; then :
64011   withval=$with_lcms;
64012 fi
64013 
64014 
64015   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64016 $as_echo_n "checking for which lcms to use... " >&6; }
64017 
64018   DEFAULT_LCMS=bundled
64019   # If user didn't specify, use DEFAULT_LCMS
64020   if test "x${with_lcms}" = "x"; then
64021       with_lcms=${DEFAULT_LCMS}
64022   fi
64023 
64024   if test "x${with_lcms}" = "xbundled"; then
64025     USE_EXTERNAL_LCMS=false
64026     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64027 $as_echo "bundled" >&6; }
64028   elif test "x${with_lcms}" = "xsystem"; then
64029     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64030 $as_echo "system" >&6; }
64031 
64032 pkg_failed=no
64033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64034 $as_echo_n "checking for LCMS... " >&6; }
64035 
64036 if test -n "$LCMS_CFLAGS"; then
64037     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64038  elif test -n "$PKG_CONFIG"; then
64039     if test -n "$PKG_CONFIG" && \
64040     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64041   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64042   ac_status=$?
64043   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64044   test $ac_status = 0; }; then
64045   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64046 else
64047   pkg_failed=yes
64048 fi
64049  else
64050     pkg_failed=untried
64051 fi
64052 if test -n "$LCMS_LIBS"; then
64053     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64054  elif test -n "$PKG_CONFIG"; then
64055     if test -n "$PKG_CONFIG" && \
64056     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64057   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64058   ac_status=$?
64059   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64060   test $ac_status = 0; }; then
64061   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64062 else
64063   pkg_failed=yes
64064 fi
64065  else
64066     pkg_failed=untried
64067 fi
64068 
64069 
64070 
64071 if test $pkg_failed = yes; then
64072 
64073 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64074         _pkg_short_errors_supported=yes
64075 else
64076         _pkg_short_errors_supported=no
64077 fi
64078         if test $_pkg_short_errors_supported = yes; then
64079                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64080         else
64081                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64082         fi
64083         # Put the nasty error message in config.log where it belongs
64084         echo "$LCMS_PKG_ERRORS" >&5
64085 
64086         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64087 $as_echo "no" >&6; }
64088                 LCMS_FOUND=no
64089 elif test $pkg_failed = untried; then
64090         LCMS_FOUND=no
64091 else
64092         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64093         LCMS_LIBS=$pkg_cv_LCMS_LIBS
64094         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64095 $as_echo "yes" >&6; }
64096         LCMS_FOUND=yes
64097 fi
64098     if test "x${LCMS_FOUND}" = "xyes"; then
64099       USE_EXTERNAL_LCMS=true
64100     else
64101       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64102     fi
64103   else
64104     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64105   fi
64106 
64107 
64108 
64109 
64110 
64111 
64112 
64113 
64114 
64115 
64116 
64117   # Setup libm (the maths library)
64118   if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64119     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64120 $as_echo_n "checking for cos in -lm... " >&6; }
64121 if ${ac_cv_lib_m_cos+:} false; then :
64122   $as_echo_n "(cached) " >&6
64123 else
64124   ac_check_lib_save_LIBS=$LIBS
64125 LIBS="-lm  $LIBS"
64126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64127 /* end confdefs.h.  */
64128 
64129 /* Override any GCC internal prototype to avoid an error.
64130    Use char because int might match the return type of a GCC
64131    builtin and then its argument prototype would still apply.  */
64132 #ifdef __cplusplus
64133 extern "C"
64134 #endif
64135 char cos ();
64136 int
64137 main ()
64138 {
64139 return cos ();
64140   ;
64141   return 0;
64142 }
64143 _ACEOF
64144 if ac_fn_cxx_try_link "$LINENO"; then :
64145   ac_cv_lib_m_cos=yes
64146 else
64147   ac_cv_lib_m_cos=no
64148 fi
64149 rm -f core conftest.err conftest.$ac_objext \
64150     conftest$ac_exeext conftest.$ac_ext
64151 LIBS=$ac_check_lib_save_LIBS
64152 fi
64153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64154 $as_echo "$ac_cv_lib_m_cos" >&6; }
64155 if test "x$ac_cv_lib_m_cos" = xyes; then :
64156   cat >>confdefs.h <<_ACEOF
64157 #define HAVE_LIBM 1
64158 _ACEOF
64159 
64160   LIBS="-lm $LIBS"
64161 
64162 else
64163 
64164         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64165 $as_echo "$as_me: Maths library was not found" >&6;}
64166 
64167 fi
64168 
64169     LIBM="-lm"
64170   else
64171     LIBM=""
64172   fi
64173 
64174 
64175   # Setup libdl (for dynamic library loading)
64176   save_LIBS="$LIBS"
64177   LIBS=""
64178   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64179 $as_echo_n "checking for dlopen in -ldl... " >&6; }
64180 if ${ac_cv_lib_dl_dlopen+:} false; then :
64181   $as_echo_n "(cached) " >&6
64182 else
64183   ac_check_lib_save_LIBS=$LIBS
64184 LIBS="-ldl  $LIBS"
64185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64186 /* end confdefs.h.  */
64187 
64188 /* Override any GCC internal prototype to avoid an error.
64189    Use char because int might match the return type of a GCC
64190    builtin and then its argument prototype would still apply.  */
64191 #ifdef __cplusplus
64192 extern "C"
64193 #endif
64194 char dlopen ();
64195 int
64196 main ()
64197 {
64198 return dlopen ();
64199   ;
64200   return 0;
64201 }
64202 _ACEOF
64203 if ac_fn_cxx_try_link "$LINENO"; then :
64204   ac_cv_lib_dl_dlopen=yes
64205 else
64206   ac_cv_lib_dl_dlopen=no
64207 fi
64208 rm -f core conftest.err conftest.$ac_objext \
64209     conftest$ac_exeext conftest.$ac_ext
64210 LIBS=$ac_check_lib_save_LIBS
64211 fi
64212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64213 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64214 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64215   cat >>confdefs.h <<_ACEOF
64216 #define HAVE_LIBDL 1
64217 _ACEOF
64218 
64219   LIBS="-ldl $LIBS"
64220 
64221 fi
64222 
64223   LIBDL="$LIBS"
64224 
64225   LIBS="$save_LIBS"
64226 
64227   # Deprecated libraries, keep the flags for backwards compatibility
64228   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64229 
64230 
64231 # Check whether --with-dxsdk was given.
64232 if test "${with_dxsdk+set}" = set; then :
64233   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64234 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64235 fi
64236 
64237 
64238 
64239 
64240 # Check whether --with-dxsdk-lib was given.
64241 if test "${with_dxsdk_lib+set}" = set; then :
64242   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64243 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64244 fi
64245 
64246 
64247 
64248 
64249 # Check whether --with-dxsdk-include was given.
64250 if test "${with_dxsdk_include+set}" = set; then :
64251   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64252 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64253 fi
64254 
64255 
64256   fi
64257 
64258   # Control if libzip can use mmap. Available for purposes of overriding.
64259   LIBZIP_CAN_USE_MMAP=true
64260 
64261 
64262 
64263   if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64264     # Find the root of the Solaris Studio installation from the compiler path
64265     SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64266     STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64267     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64268 $as_echo_n "checking for libstlport.so.1... " >&6; }
64269     if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64270       # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64271       STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64272     fi
64273     if test -f "$STLPORT_LIB"; then
64274       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64275 $as_echo "yes, $STLPORT_LIB" >&6; }
64276 
64277   # Only process if variable expands to non-empty
64278 
64279   if test "x$STLPORT_LIB" != x; then
64280     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64281 
64282   # Input might be given as Windows format, start by converting to
64283   # unix format.
64284   path="$STLPORT_LIB"
64285   new_path=`$CYGPATH -u "$path"`
64286 
64287   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64288   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64289   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64290   # "foo.exe" is OK but "foo" is an error.
64291   #
64292   # This test is therefore slightly more accurate than "test -f" to check for file precense.
64293   # It is also a way to make sure we got the proper file name for the real test later on.
64294   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64295   if test "x$test_shortpath" = x; then
64296     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64297 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64298     as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64299   fi
64300 
64301   # Call helper function which possibly converts this using DOS-style short mode.
64302   # If so, the updated path is stored in $new_path.
64303 
64304   input_path="$new_path"
64305   # Check if we need to convert this using DOS-style short mode. If the path
64306   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64307   # take no chances and rewrite it.
64308   # Note: m4 eats our [], so we need to use [ and ] instead.
64309   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64310   if test "x$has_forbidden_chars" != x; then
64311     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64312     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64313     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64314     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64315       # Going to short mode and back again did indeed matter. Since short mode is
64316       # case insensitive, let's make it lowercase to improve readability.
64317       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64318       # Now convert it back to Unix-style (cygpath)
64319       input_path=`$CYGPATH -u "$shortmode_path"`
64320       new_path="$input_path"
64321     fi
64322   fi
64323 
64324   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64325   if test "x$test_cygdrive_prefix" = x; then
64326     # As a simple fix, exclude /usr/bin since it's not a real path.
64327     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64328       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64329       # a path prefixed by /cygdrive for fixpath to work.
64330       new_path="$CYGWIN_ROOT_PATH$input_path"
64331     fi
64332   fi
64333 
64334 
64335   if test "x$path" != "x$new_path"; then
64336     STLPORT_LIB="$new_path"
64337     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64338 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64339   fi
64340 
64341     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64342 
64343   path="$STLPORT_LIB"
64344   has_colon=`$ECHO $path | $GREP ^.:`
64345   new_path="$path"
64346   if test "x$has_colon" = x; then
64347     # Not in mixed or Windows style, start by that.
64348     new_path=`cmd //c echo $path`
64349   fi
64350 
64351 
64352   input_path="$new_path"
64353   # Check if we need to convert this using DOS-style short mode. If the path
64354   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64355   # take no chances and rewrite it.
64356   # Note: m4 eats our [], so we need to use [ and ] instead.
64357   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64358   if test "x$has_forbidden_chars" != x; then
64359     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64360     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64361   fi
64362 
64363 
64364   windows_path="$new_path"
64365   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64366     unix_path=`$CYGPATH -u "$windows_path"`
64367     new_path="$unix_path"
64368   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64369     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64370     new_path="$unix_path"
64371   fi
64372 
64373   if test "x$path" != "x$new_path"; then
64374     STLPORT_LIB="$new_path"
64375     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64376 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64377   fi
64378 
64379   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64380   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64381 
64382     else
64383       # We're on a unix platform. Hooray! :)
64384       path="$STLPORT_LIB"
64385       has_space=`$ECHO "$path" | $GREP " "`
64386       if test "x$has_space" != x; then
64387         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64388 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64389         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64390       fi
64391 
64392       # Use eval to expand a potential ~
64393       eval path="$path"
64394       if test ! -f "$path" && test ! -d "$path"; then
64395         as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64396       fi
64397 
64398       if test -d "$path"; then
64399         STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64400       else
64401         dir="`$DIRNAME "$path"`"
64402         base="`$BASENAME "$path"`"
64403         STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64404       fi
64405     fi
64406   fi
64407 
64408     else
64409       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64410 $as_echo "no, not found at $STLPORT_LIB" >&6; }
64411       as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64412     fi
64413 
64414   fi
64415 
64416 
64417 
64418 
64419 
64420 
64421 
64422 
64423 
64424 
64425 
64426 
64427 
64428 
64429 ###############################################################################
64430 #
64431 # We need to do some final tweaking, when everything else is done.
64432 #
64433 ###############################################################################
64434 
64435 
64436   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64437 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64438 
64439   if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64440     ENABLE_INTREE_EC=yes
64441     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64442 $as_echo "yes" >&6; }
64443   else
64444     ENABLE_INTREE_EC=no
64445     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64446 $as_echo "no" >&6; }
64447   fi
64448 
64449 
64450 
64451 
64452   # Check whether --enable-jtreg-failure-handler was given.
64453 if test "${enable_jtreg_failure_handler+set}" = set; then :
64454   enableval=$enable_jtreg_failure_handler;
64455 fi
64456 
64457 
64458   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64459 $as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64460 
64461   if test "x$enable_jtreg_failure_handler" = "xyes"; then
64462     if test "x$JT_HOME" = "x"; then
64463       as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64464     else
64465       BUILD_FAILURE_HANDLER=true
64466       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64467 $as_echo "yes, forced" >&6; }
64468     fi
64469   elif test "x$enable_jtreg_failure_handler" = "xno"; then
64470     BUILD_FAILURE_HANDLER=false
64471     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64472 $as_echo "no, forced" >&6; }
64473   elif test "x$enable_jtreg_failure_handler" = "xauto" \
64474       || test "x$enable_jtreg_failure_handler" = "x"; then
64475     if test "x$JT_HOME" = "x"; then
64476       BUILD_FAILURE_HANDLER=false
64477       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64478 $as_echo "no, missing jtreg" >&6; }
64479     else
64480       BUILD_FAILURE_HANDLER=true
64481       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64482 $as_echo "yes, jtreg present" >&6; }
64483     fi
64484   else
64485     as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64486   fi
64487 
64488 
64489 
64490 
64491   # Check whether --enable-generate-classlist was given.
64492 if test "${enable_generate_classlist+set}" = set; then :
64493   enableval=$enable_generate_classlist;
64494 fi
64495 
64496 
64497   # Check if it's likely that it's possible to generate the classlist. Depending
64498   # on exact jvm configuration it could be possible anyway.
64499   if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64500     ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64501   else
64502     ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64503   fi
64504 
64505   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64506 $as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64507   if test "x$enable_generate_classlist" = "xyes"; then
64508     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64509 $as_echo "yes, forced" >&6; }
64510     ENABLE_GENERATE_CLASSLIST="true"
64511     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64512       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64513 $as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64514     fi
64515   elif test "x$enable_generate_classlist" = "xno"; then
64516     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64517 $as_echo "no, forced" >&6; }
64518     ENABLE_GENERATE_CLASSLIST="false"
64519   elif test "x$enable_generate_classlist" = "x"; then
64520     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64521       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64522 $as_echo "yes" >&6; }
64523       ENABLE_GENERATE_CLASSLIST="true"
64524     else
64525       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64526 $as_echo "no" >&6; }
64527       ENABLE_GENERATE_CLASSLIST="false"
64528     fi
64529   else
64530     as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64531   fi
64532 
64533 
64534 
64535 
64536 ###############################################################################
64537 #
64538 # Configure parts of the build that only affect the build performance,
64539 # not the result.
64540 #
64541 ###############################################################################
64542 
64543 
64544   # How many cores do we have on this build system?
64545 
64546 # Check whether --with-num-cores was given.
64547 if test "${with_num_cores+set}" = set; then :
64548   withval=$with_num_cores;
64549 fi
64550 
64551   if test "x$with_num_cores" = x; then
64552     # The number of cores were not specified, try to probe them.
64553 
64554   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64555 $as_echo_n "checking for number of cores... " >&6; }
64556   NUM_CORES=1
64557   FOUND_CORES=no
64558 
64559   if test -f /proc/cpuinfo; then
64560     # Looks like a Linux (or cygwin) system
64561     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64562     FOUND_CORES=yes
64563   elif test -x /usr/sbin/psrinfo; then
64564     # Looks like a Solaris system
64565     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64566     FOUND_CORES=yes
64567   elif test -x /usr/sbin/sysctl; then
64568     # Looks like a MacOSX system
64569     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64570     FOUND_CORES=yes
64571   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64572     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64573     FOUND_CORES=yes
64574   elif test -n "$NUMBER_OF_PROCESSORS"; then
64575     # On windows, look in the env
64576     NUM_CORES=$NUMBER_OF_PROCESSORS
64577     FOUND_CORES=yes
64578   fi
64579 
64580   if test "x$FOUND_CORES" = xyes; then
64581     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64582 $as_echo "$NUM_CORES" >&6; }
64583   else
64584     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64585 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
64586     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64587 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64588   fi
64589 
64590   else
64591     NUM_CORES=$with_num_cores
64592   fi
64593 
64594 
64595 
64596   # How much memory do we have on this build system?
64597 
64598 # Check whether --with-memory-size was given.
64599 if test "${with_memory_size+set}" = set; then :
64600   withval=$with_memory_size;
64601 fi
64602 
64603   if test "x$with_memory_size" = x; then
64604     # The memory size was not specified, try to probe it.
64605 
64606   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64607 $as_echo_n "checking for memory size... " >&6; }
64608   # Default to 1024 MB
64609   MEMORY_SIZE=1024
64610   FOUND_MEM=no
64611 
64612   if test -f /proc/meminfo; then
64613     # Looks like a Linux (or cygwin) system
64614     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64615     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64616     FOUND_MEM=yes
64617   elif test -x /usr/sbin/prtconf; then
64618     # Looks like a Solaris or AIX system
64619     MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64620     FOUND_MEM=yes
64621   elif test -x /usr/sbin/sysctl; then
64622     # Looks like a MacOSX system
64623     MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64624     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64625     FOUND_MEM=yes
64626   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64627     # Windows, but without cygwin
64628     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64629     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64630     FOUND_MEM=yes
64631   fi
64632 
64633   if test "x$FOUND_MEM" = xyes; then
64634     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64635 $as_echo "$MEMORY_SIZE MB" >&6; }
64636   else
64637     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64638 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64639     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64640 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64641   fi
64642 
64643   else
64644     MEMORY_SIZE=$with_memory_size
64645   fi
64646 
64647 
64648 
64649   # Provide a decent default number of parallel jobs for make depending on
64650   # number of cores, amount of memory and machine architecture.
64651 
64652 # Check whether --with-jobs was given.
64653 if test "${with_jobs+set}" = set; then :
64654   withval=$with_jobs;
64655 fi
64656 
64657   if test "x$with_jobs" = x; then
64658     # Number of jobs was not specified, calculate.
64659     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64660 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64661     # Approximate memory in GB.
64662     memory_gb=`expr $MEMORY_SIZE / 1024`
64663     # Pick the lowest of memory in gb and number of cores.
64664     if test "$memory_gb" -lt "$NUM_CORES"; then
64665       JOBS="$memory_gb"
64666     else
64667       JOBS="$NUM_CORES"
64668     fi
64669     if test "$JOBS" -eq "0"; then
64670       JOBS=1
64671     fi
64672     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64673 $as_echo "$JOBS" >&6; }
64674   else
64675     JOBS=$with_jobs
64676   fi
64677 
64678 
64679 
64680   # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64681 
64682 # Check whether --with-test-jobs was given.
64683 if test "${with_test_jobs+set}" = set; then :
64684   withval=$with_test_jobs;
64685 fi
64686 
64687   if test "x$with_test_jobs" = x; then
64688       TEST_JOBS=0
64689   else
64690       TEST_JOBS=$with_test_jobs
64691   fi
64692 
64693 
64694 
64695 # Setup arguments for the boot jdk (after cores and memory have been setup)
64696 
64697   ##############################################################################
64698   #
64699   # Specify jvm options for anything that is run with the Boot JDK.
64700   # Not all JVM:s accept the same arguments on the command line.
64701   #
64702 
64703 # Check whether --with-boot-jdk-jvmargs was given.
64704 if test "${with_boot_jdk_jvmargs+set}" = set; then :
64705   withval=$with_boot_jdk_jvmargs;
64706 fi
64707 
64708 
64709   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64710 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
64711 
64712   # Disable special log output when a debug build is used as Boot JDK...
64713 
64714   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64715   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64716   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64717   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64718   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64719   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64720     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64721     JVM_ARG_OK=true
64722   else
64723     $ECHO "Arg failed:" >&5
64724     $ECHO "$OUTPUT" >&5
64725     JVM_ARG_OK=false
64726   fi
64727 
64728 
64729   # Force en-US environment
64730 
64731   $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64732   $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64733   OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64734   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64735   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64736   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64737     boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64738     JVM_ARG_OK=true
64739   else
64740     $ECHO "Arg failed:" >&5
64741     $ECHO "$OUTPUT" >&5
64742     JVM_ARG_OK=false
64743   fi
64744 
64745 
64746   # Apply user provided options.
64747 
64748   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64749   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64750   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64751   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64752   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64753   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64754     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64755     JVM_ARG_OK=true
64756   else
64757     $ECHO "Arg failed:" >&5
64758     $ECHO "$OUTPUT" >&5
64759     JVM_ARG_OK=false
64760   fi
64761 
64762 
64763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64764 $as_echo "$boot_jdk_jvmargs" >&6; }
64765 
64766   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64767   JAVA_FLAGS=$boot_jdk_jvmargs
64768 
64769 
64770 
64771   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64772 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64773 
64774   # Starting amount of heap memory.
64775 
64776   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64777   $ECHO "Command: $JAVA -Xms64M -version" >&5
64778   OUTPUT=`$JAVA -Xms64M -version 2>&1`
64779   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64780   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64781   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64782     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64783     JVM_ARG_OK=true
64784   else
64785     $ECHO "Arg failed:" >&5
64786     $ECHO "$OUTPUT" >&5
64787     JVM_ARG_OK=false
64788   fi
64789 
64790   BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64791 
64792   # Maximum amount of heap memory and stack size.
64793   JVM_HEAP_LIMIT_32="1024"
64794   # Running a 64 bit JVM allows for and requires a bigger heap
64795   JVM_HEAP_LIMIT_64="1600"
64796   STACK_SIZE_32=768
64797   STACK_SIZE_64=1536
64798   JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64799   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64800     JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64801   fi
64802   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64803     JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64804   fi
64805   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64806     JVM_HEAP_LIMIT_32=512
64807     JVM_HEAP_LIMIT_64=512
64808   fi
64809 
64810   if test "x$BOOT_JDK_BITS" = "x32"; then
64811     STACK_SIZE=$STACK_SIZE_32
64812     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64813   else
64814     STACK_SIZE=$STACK_SIZE_64
64815     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64816   fi
64817 
64818   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64819   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64820   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64821   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64822   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64823   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64824     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64825     JVM_ARG_OK=true
64826   else
64827     $ECHO "Arg failed:" >&5
64828     $ECHO "$OUTPUT" >&5
64829     JVM_ARG_OK=false
64830   fi
64831 
64832 
64833   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64834   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64835   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64836   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64837   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64838   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64839     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64840     JVM_ARG_OK=true
64841   else
64842     $ECHO "Arg failed:" >&5
64843     $ECHO "$OUTPUT" >&5
64844     JVM_ARG_OK=false
64845   fi
64846 
64847 
64848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64849 $as_echo "$boot_jdk_jvmargs_big" >&6; }
64850 
64851   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64852 
64853 
64854   if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64855     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64856     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64857   else
64858     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64859     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64860   fi
64861   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64862   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64863   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64864 $as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64866 $as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64867 
64868 
64869   # By default, the main javac compilations use big
64870   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64871 
64872 
64873   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64874 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64875 
64876   # Use serial gc for small short lived tools if possible
64877 
64878   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64879   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64880   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64881   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64882   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64883   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64884     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64885     JVM_ARG_OK=true
64886   else
64887     $ECHO "Arg failed:" >&5
64888     $ECHO "$OUTPUT" >&5
64889     JVM_ARG_OK=false
64890   fi
64891 
64892 
64893   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64894   $ECHO "Command: $JAVA -Xms32M -version" >&5
64895   OUTPUT=`$JAVA -Xms32M -version 2>&1`
64896   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64897   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64898   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64899     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64900     JVM_ARG_OK=true
64901   else
64902     $ECHO "Arg failed:" >&5
64903     $ECHO "$OUTPUT" >&5
64904     JVM_ARG_OK=false
64905   fi
64906 
64907 
64908   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64909   $ECHO "Command: $JAVA -Xmx512M -version" >&5
64910   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64911   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64912   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64913   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64914     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64915     JVM_ARG_OK=true
64916   else
64917     $ECHO "Arg failed:" >&5
64918     $ECHO "$OUTPUT" >&5
64919     JVM_ARG_OK=false
64920   fi
64921 
64922 
64923   $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64924   $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64925   OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64926   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64927   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64928   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64929     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64930     JVM_ARG_OK=true
64931   else
64932     $ECHO "Arg failed:" >&5
64933     $ECHO "$OUTPUT" >&5
64934     JVM_ARG_OK=false
64935   fi
64936 
64937 
64938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64939 $as_echo "$boot_jdk_jvmargs_small" >&6; }
64940 
64941   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64942 
64943 
64944   JAVA_TOOL_FLAGS_SMALL=""
64945   for f in $JAVA_FLAGS_SMALL; do
64946     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64947   done
64948 
64949 
64950 
64951 # Setup smart javac (after cores and memory have been setup)
64952 
64953 
64954 # Check whether --with-sjavac-server-java was given.
64955 if test "${with_sjavac_server_java+set}" = set; then :
64956   withval=$with_sjavac_server_java;
64957 fi
64958 
64959 
64960   if test "x$with_sjavac_server_java" != x; then
64961     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64962     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64963     if test "x$FOUND_VERSION" = x; then
64964       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64965     fi
64966   else
64967     SJAVAC_SERVER_JAVA="$JAVA"
64968   fi
64969 
64970 
64971   if test "$MEMORY_SIZE" -gt "3000"; then
64972 
64973   $ECHO "Check if jvm arg is ok: -d64" >&5
64974   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64975   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64976   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64977   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64978   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64979     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64980     JVM_ARG_OK=true
64981   else
64982     $ECHO "Arg failed:" >&5
64983     $ECHO "$OUTPUT" >&5
64984     JVM_ARG_OK=false
64985   fi
64986 
64987     if test "$JVM_ARG_OK" = true; then
64988       JVM_64BIT=true
64989       JVM_ARG_OK=false
64990     fi
64991   fi
64992 
64993   MX_VALUE=`expr $MEMORY_SIZE / 2`
64994   if test "$JVM_64BIT" = true; then
64995     # Set ms lower than mx since more than one instance of the server might
64996     # get launched at the same time before they figure out which instance won.
64997     MS_VALUE=512
64998     if test "$MX_VALUE" -gt "2048"; then
64999       MX_VALUE=2048
65000     fi
65001   else
65002     MS_VALUE=256
65003     if test "$MX_VALUE" -gt "1500"; then
65004       MX_VALUE=1500
65005     fi
65006   fi
65007   if test "$MX_VALUE" -lt "512"; then
65008     MX_VALUE=512
65009   fi
65010 
65011   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65012   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65013   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65014   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65015   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65016   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65017     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65018     JVM_ARG_OK=true
65019   else
65020     $ECHO "Arg failed:" >&5
65021     $ECHO "$OUTPUT" >&5
65022     JVM_ARG_OK=false
65023   fi
65024 
65025 
65026 
65027   # Check whether --enable-sjavac was given.
65028 if test "${enable_sjavac+set}" = set; then :
65029   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65030 else
65031   ENABLE_SJAVAC="no"
65032 fi
65033 
65034   if test "x$JVM_ARG_OK" = "xfalse"; then
65035     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65036 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65037     ENABLE_SJAVAC="no"
65038   fi
65039   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65040 $as_echo_n "checking whether to use sjavac... " >&6; }
65041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65042 $as_echo "$ENABLE_SJAVAC" >&6; }
65043 
65044 
65045   # Check whether --enable-javac-server was given.
65046 if test "${enable_javac_server+set}" = set; then :
65047   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65048 else
65049   ENABLE_JAVAC_SERVER="yes"
65050 fi
65051 
65052   if test "x$JVM_ARG_OK" = "xfalse"; then
65053     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65054 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65055     ENABLE_JAVAC_SERVER="no"
65056   fi
65057   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65058 $as_echo_n "checking whether to use javac server... " >&6; }
65059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65060 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65061 
65062 
65063   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65064     # When using a server javac, the small client instances do not need much
65065     # resources.
65066     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65067   fi
65068 
65069 
65070 # Setup use of icecc if requested
65071 
65072   # Check whether --enable-icecc was given.
65073 if test "${enable_icecc+set}" = set; then :
65074   enableval=$enable_icecc;
65075 fi
65076 
65077 
65078   if test "x${enable_icecc}" = "xyes"; then
65079 
65080 
65081 
65082   # Publish this variable in the help.
65083 
65084 
65085   if [ -z "${ICECC_CMD+x}" ]; then
65086     # The variable is not set by user, try to locate tool using the code snippet
65087     for ac_prog in icecc
65088 do
65089   # Extract the first word of "$ac_prog", so it can be a program name with args.
65090 set dummy $ac_prog; ac_word=$2
65091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65092 $as_echo_n "checking for $ac_word... " >&6; }
65093 if ${ac_cv_path_ICECC_CMD+:} false; then :
65094   $as_echo_n "(cached) " >&6
65095 else
65096   case $ICECC_CMD in
65097   [\\/]* | ?:[\\/]*)
65098   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65099   ;;
65100   *)
65101   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65102 for as_dir in $PATH
65103 do
65104   IFS=$as_save_IFS
65105   test -z "$as_dir" && as_dir=.
65106     for ac_exec_ext in '' $ac_executable_extensions; do
65107   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65108     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65109     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65110     break 2
65111   fi
65112 done
65113   done
65114 IFS=$as_save_IFS
65115 
65116   ;;
65117 esac
65118 fi
65119 ICECC_CMD=$ac_cv_path_ICECC_CMD
65120 if test -n "$ICECC_CMD"; then
65121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65122 $as_echo "$ICECC_CMD" >&6; }
65123 else
65124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65125 $as_echo "no" >&6; }
65126 fi
65127 
65128 
65129   test -n "$ICECC_CMD" && break
65130 done
65131 
65132   else
65133     # The variable is set, but is it from the command line or the environment?
65134 
65135     # Try to remove the string !ICECC_CMD! from our list.
65136     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65137     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65138       # If it failed, the variable was not from the command line. Ignore it,
65139       # but warn the user (except for BASH, which is always set by the calling BASH).
65140       if test "xICECC_CMD" != xBASH; then
65141         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65142 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65143       fi
65144       # Try to locate tool using the code snippet
65145       for ac_prog in icecc
65146 do
65147   # Extract the first word of "$ac_prog", so it can be a program name with args.
65148 set dummy $ac_prog; ac_word=$2
65149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65150 $as_echo_n "checking for $ac_word... " >&6; }
65151 if ${ac_cv_path_ICECC_CMD+:} false; then :
65152   $as_echo_n "(cached) " >&6
65153 else
65154   case $ICECC_CMD in
65155   [\\/]* | ?:[\\/]*)
65156   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65157   ;;
65158   *)
65159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65160 for as_dir in $PATH
65161 do
65162   IFS=$as_save_IFS
65163   test -z "$as_dir" && as_dir=.
65164     for ac_exec_ext in '' $ac_executable_extensions; do
65165   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65166     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65168     break 2
65169   fi
65170 done
65171   done
65172 IFS=$as_save_IFS
65173 
65174   ;;
65175 esac
65176 fi
65177 ICECC_CMD=$ac_cv_path_ICECC_CMD
65178 if test -n "$ICECC_CMD"; then
65179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65180 $as_echo "$ICECC_CMD" >&6; }
65181 else
65182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65183 $as_echo "no" >&6; }
65184 fi
65185 
65186 
65187   test -n "$ICECC_CMD" && break
65188 done
65189 
65190     else
65191       # If it succeeded, then it was overridden by the user. We will use it
65192       # for the tool.
65193 
65194       # First remove it from the list of overridden variables, so we can test
65195       # for unknown variables in the end.
65196       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65197 
65198       # Check if we try to supply an empty value
65199       if test "x$ICECC_CMD" = x; then
65200         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65201 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65202         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65203 $as_echo_n "checking for ICECC_CMD... " >&6; }
65204         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65205 $as_echo "disabled" >&6; }
65206       else
65207         # Check if the provided tool contains a complete path.
65208         tool_specified="$ICECC_CMD"
65209         tool_basename="${tool_specified##*/}"
65210         if test "x$tool_basename" = "x$tool_specified"; then
65211           # A command without a complete path is provided, search $PATH.
65212           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65213 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65214           # Extract the first word of "$tool_basename", so it can be a program name with args.
65215 set dummy $tool_basename; ac_word=$2
65216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65217 $as_echo_n "checking for $ac_word... " >&6; }
65218 if ${ac_cv_path_ICECC_CMD+:} false; then :
65219   $as_echo_n "(cached) " >&6
65220 else
65221   case $ICECC_CMD in
65222   [\\/]* | ?:[\\/]*)
65223   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65224   ;;
65225   *)
65226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65227 for as_dir in $PATH
65228 do
65229   IFS=$as_save_IFS
65230   test -z "$as_dir" && as_dir=.
65231     for ac_exec_ext in '' $ac_executable_extensions; do
65232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65233     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65235     break 2
65236   fi
65237 done
65238   done
65239 IFS=$as_save_IFS
65240 
65241   ;;
65242 esac
65243 fi
65244 ICECC_CMD=$ac_cv_path_ICECC_CMD
65245 if test -n "$ICECC_CMD"; then
65246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65247 $as_echo "$ICECC_CMD" >&6; }
65248 else
65249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65250 $as_echo "no" >&6; }
65251 fi
65252 
65253 
65254           if test "x$ICECC_CMD" = x; then
65255             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65256           fi
65257         else
65258           # Otherwise we believe it is a complete path. Use it as it is.
65259           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65260 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65261           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65262 $as_echo_n "checking for ICECC_CMD... " >&6; }
65263           if test ! -x "$tool_specified"; then
65264             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65265 $as_echo "not found" >&6; }
65266             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65267           fi
65268           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65269 $as_echo "$tool_specified" >&6; }
65270         fi
65271       fi
65272     fi
65273 
65274   fi
65275 
65276 
65277 
65278   if test "x$ICECC_CMD" = x; then
65279     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65280   fi
65281 
65282 
65283     old_path="$PATH"
65284 
65285     # Look for icecc-create-env in some known places
65286     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65287 
65288 
65289 
65290   # Publish this variable in the help.
65291 
65292 
65293   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65294     # The variable is not set by user, try to locate tool using the code snippet
65295     for ac_prog in icecc-create-env
65296 do
65297   # Extract the first word of "$ac_prog", so it can be a program name with args.
65298 set dummy $ac_prog; ac_word=$2
65299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65300 $as_echo_n "checking for $ac_word... " >&6; }
65301 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65302   $as_echo_n "(cached) " >&6
65303 else
65304   case $ICECC_CREATE_ENV in
65305   [\\/]* | ?:[\\/]*)
65306   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65307   ;;
65308   *)
65309   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65310 for as_dir in $PATH
65311 do
65312   IFS=$as_save_IFS
65313   test -z "$as_dir" && as_dir=.
65314     for ac_exec_ext in '' $ac_executable_extensions; do
65315   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65316     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65317     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65318     break 2
65319   fi
65320 done
65321   done
65322 IFS=$as_save_IFS
65323 
65324   ;;
65325 esac
65326 fi
65327 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65328 if test -n "$ICECC_CREATE_ENV"; then
65329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65330 $as_echo "$ICECC_CREATE_ENV" >&6; }
65331 else
65332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65333 $as_echo "no" >&6; }
65334 fi
65335 
65336 
65337   test -n "$ICECC_CREATE_ENV" && break
65338 done
65339 
65340   else
65341     # The variable is set, but is it from the command line or the environment?
65342 
65343     # Try to remove the string !ICECC_CREATE_ENV! from our list.
65344     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65345     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65346       # If it failed, the variable was not from the command line. Ignore it,
65347       # but warn the user (except for BASH, which is always set by the calling BASH).
65348       if test "xICECC_CREATE_ENV" != xBASH; then
65349         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65350 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65351       fi
65352       # Try to locate tool using the code snippet
65353       for ac_prog in icecc-create-env
65354 do
65355   # Extract the first word of "$ac_prog", so it can be a program name with args.
65356 set dummy $ac_prog; ac_word=$2
65357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65358 $as_echo_n "checking for $ac_word... " >&6; }
65359 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65360   $as_echo_n "(cached) " >&6
65361 else
65362   case $ICECC_CREATE_ENV in
65363   [\\/]* | ?:[\\/]*)
65364   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65365   ;;
65366   *)
65367   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65368 for as_dir in $PATH
65369 do
65370   IFS=$as_save_IFS
65371   test -z "$as_dir" && as_dir=.
65372     for ac_exec_ext in '' $ac_executable_extensions; do
65373   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65374     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65375     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65376     break 2
65377   fi
65378 done
65379   done
65380 IFS=$as_save_IFS
65381 
65382   ;;
65383 esac
65384 fi
65385 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65386 if test -n "$ICECC_CREATE_ENV"; then
65387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65388 $as_echo "$ICECC_CREATE_ENV" >&6; }
65389 else
65390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65391 $as_echo "no" >&6; }
65392 fi
65393 
65394 
65395   test -n "$ICECC_CREATE_ENV" && break
65396 done
65397 
65398     else
65399       # If it succeeded, then it was overridden by the user. We will use it
65400       # for the tool.
65401 
65402       # First remove it from the list of overridden variables, so we can test
65403       # for unknown variables in the end.
65404       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65405 
65406       # Check if we try to supply an empty value
65407       if test "x$ICECC_CREATE_ENV" = x; then
65408         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65409 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65410         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65411 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65412         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65413 $as_echo "disabled" >&6; }
65414       else
65415         # Check if the provided tool contains a complete path.
65416         tool_specified="$ICECC_CREATE_ENV"
65417         tool_basename="${tool_specified##*/}"
65418         if test "x$tool_basename" = "x$tool_specified"; then
65419           # A command without a complete path is provided, search $PATH.
65420           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65421 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65422           # Extract the first word of "$tool_basename", so it can be a program name with args.
65423 set dummy $tool_basename; ac_word=$2
65424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65425 $as_echo_n "checking for $ac_word... " >&6; }
65426 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65427   $as_echo_n "(cached) " >&6
65428 else
65429   case $ICECC_CREATE_ENV in
65430   [\\/]* | ?:[\\/]*)
65431   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65432   ;;
65433   *)
65434   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65435 for as_dir in $PATH
65436 do
65437   IFS=$as_save_IFS
65438   test -z "$as_dir" && as_dir=.
65439     for ac_exec_ext in '' $ac_executable_extensions; do
65440   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65441     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65442     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65443     break 2
65444   fi
65445 done
65446   done
65447 IFS=$as_save_IFS
65448 
65449   ;;
65450 esac
65451 fi
65452 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65453 if test -n "$ICECC_CREATE_ENV"; then
65454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65455 $as_echo "$ICECC_CREATE_ENV" >&6; }
65456 else
65457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65458 $as_echo "no" >&6; }
65459 fi
65460 
65461 
65462           if test "x$ICECC_CREATE_ENV" = x; then
65463             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65464           fi
65465         else
65466           # Otherwise we believe it is a complete path. Use it as it is.
65467           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65468 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65469           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65470 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65471           if test ! -x "$tool_specified"; then
65472             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65473 $as_echo "not found" >&6; }
65474             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65475           fi
65476           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65477 $as_echo "$tool_specified" >&6; }
65478         fi
65479       fi
65480     fi
65481 
65482   fi
65483 
65484 
65485 
65486   if test "x$ICECC_CREATE_ENV" = x; then
65487     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65488   fi
65489 
65490 
65491     # Use icecc-create-env to create a minimal compilation environment that can
65492     # be sent to the other hosts in the icecream cluster.
65493     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65494     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65495     # Older versions of icecc does not have the --gcc parameter
65496     if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65497       icecc_gcc_arg="--gcc"
65498     fi
65499     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65500 
65501   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65502       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65503           ${icecc_create_env_log} 2>&1 )
65504   if test "$?" != "0"; then
65505     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65506 $as_echo "$as_me: icecc-create-env output:" >&6;}
65507     cat \
65508           ${icecc_create_env_log}
65509     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65510   fi
65511 
65512     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65513       # For clang, the icecc compilerwrapper is needed. It usually resides next
65514       # to icecc-create-env.
65515 
65516 
65517 
65518   # Publish this variable in the help.
65519 
65520 
65521   if [ -z "${ICECC_WRAPPER+x}" ]; then
65522     # The variable is not set by user, try to locate tool using the code snippet
65523     for ac_prog in compilerwrapper
65524 do
65525   # Extract the first word of "$ac_prog", so it can be a program name with args.
65526 set dummy $ac_prog; ac_word=$2
65527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65528 $as_echo_n "checking for $ac_word... " >&6; }
65529 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65530   $as_echo_n "(cached) " >&6
65531 else
65532   case $ICECC_WRAPPER in
65533   [\\/]* | ?:[\\/]*)
65534   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65535   ;;
65536   *)
65537   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65538 for as_dir in $PATH
65539 do
65540   IFS=$as_save_IFS
65541   test -z "$as_dir" && as_dir=.
65542     for ac_exec_ext in '' $ac_executable_extensions; do
65543   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65544     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65545     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65546     break 2
65547   fi
65548 done
65549   done
65550 IFS=$as_save_IFS
65551 
65552   ;;
65553 esac
65554 fi
65555 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65556 if test -n "$ICECC_WRAPPER"; then
65557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65558 $as_echo "$ICECC_WRAPPER" >&6; }
65559 else
65560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65561 $as_echo "no" >&6; }
65562 fi
65563 
65564 
65565   test -n "$ICECC_WRAPPER" && break
65566 done
65567 
65568   else
65569     # The variable is set, but is it from the command line or the environment?
65570 
65571     # Try to remove the string !ICECC_WRAPPER! from our list.
65572     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65573     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65574       # If it failed, the variable was not from the command line. Ignore it,
65575       # but warn the user (except for BASH, which is always set by the calling BASH).
65576       if test "xICECC_WRAPPER" != xBASH; then
65577         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65578 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65579       fi
65580       # Try to locate tool using the code snippet
65581       for ac_prog in compilerwrapper
65582 do
65583   # Extract the first word of "$ac_prog", so it can be a program name with args.
65584 set dummy $ac_prog; ac_word=$2
65585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65586 $as_echo_n "checking for $ac_word... " >&6; }
65587 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65588   $as_echo_n "(cached) " >&6
65589 else
65590   case $ICECC_WRAPPER in
65591   [\\/]* | ?:[\\/]*)
65592   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65593   ;;
65594   *)
65595   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65596 for as_dir in $PATH
65597 do
65598   IFS=$as_save_IFS
65599   test -z "$as_dir" && as_dir=.
65600     for ac_exec_ext in '' $ac_executable_extensions; do
65601   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65602     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65603     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65604     break 2
65605   fi
65606 done
65607   done
65608 IFS=$as_save_IFS
65609 
65610   ;;
65611 esac
65612 fi
65613 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65614 if test -n "$ICECC_WRAPPER"; then
65615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65616 $as_echo "$ICECC_WRAPPER" >&6; }
65617 else
65618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65619 $as_echo "no" >&6; }
65620 fi
65621 
65622 
65623   test -n "$ICECC_WRAPPER" && break
65624 done
65625 
65626     else
65627       # If it succeeded, then it was overridden by the user. We will use it
65628       # for the tool.
65629 
65630       # First remove it from the list of overridden variables, so we can test
65631       # for unknown variables in the end.
65632       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65633 
65634       # Check if we try to supply an empty value
65635       if test "x$ICECC_WRAPPER" = x; then
65636         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65637 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65638         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65639 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65640         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65641 $as_echo "disabled" >&6; }
65642       else
65643         # Check if the provided tool contains a complete path.
65644         tool_specified="$ICECC_WRAPPER"
65645         tool_basename="${tool_specified##*/}"
65646         if test "x$tool_basename" = "x$tool_specified"; then
65647           # A command without a complete path is provided, search $PATH.
65648           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65649 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65650           # Extract the first word of "$tool_basename", so it can be a program name with args.
65651 set dummy $tool_basename; ac_word=$2
65652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65653 $as_echo_n "checking for $ac_word... " >&6; }
65654 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65655   $as_echo_n "(cached) " >&6
65656 else
65657   case $ICECC_WRAPPER in
65658   [\\/]* | ?:[\\/]*)
65659   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65660   ;;
65661   *)
65662   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65663 for as_dir in $PATH
65664 do
65665   IFS=$as_save_IFS
65666   test -z "$as_dir" && as_dir=.
65667     for ac_exec_ext in '' $ac_executable_extensions; do
65668   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65669     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65671     break 2
65672   fi
65673 done
65674   done
65675 IFS=$as_save_IFS
65676 
65677   ;;
65678 esac
65679 fi
65680 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65681 if test -n "$ICECC_WRAPPER"; then
65682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65683 $as_echo "$ICECC_WRAPPER" >&6; }
65684 else
65685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65686 $as_echo "no" >&6; }
65687 fi
65688 
65689 
65690           if test "x$ICECC_WRAPPER" = x; then
65691             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65692           fi
65693         else
65694           # Otherwise we believe it is a complete path. Use it as it is.
65695           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65696 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65697           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65698 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65699           if test ! -x "$tool_specified"; then
65700             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65701 $as_echo "not found" >&6; }
65702             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65703           fi
65704           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65705 $as_echo "$tool_specified" >&6; }
65706         fi
65707       fi
65708     fi
65709 
65710   fi
65711 
65712 
65713 
65714   if test "x$ICECC_WRAPPER" = x; then
65715     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65716   fi
65717 
65718 
65719 
65720   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65721       && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65722   if test "$?" != "0"; then
65723     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65724 $as_echo "$as_me: icecc-create-env output:" >&6;}
65725     cat ${icecc_create_env_log}
65726     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65727   fi
65728 
65729     else
65730       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65731     fi
65732     PATH="$old_path"
65733     # The bundle with the compiler gets a name based on checksums. Parse log file
65734     # to find it.
65735     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65736     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65737     if test ! -f ${ICECC_ENV_BUNDLE}; then
65738       as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65739     fi
65740     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65741 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65742     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65743 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65744     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65745 
65746     if test "x${COMPILE_TYPE}" = "xcross"; then
65747       # If cross compiling, create a separate env package for the build compiler
65748       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65749       icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65750       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65751 
65752   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65753       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65754             ${icecc_create_env_log_build} 2>&1 )
65755   if test "$?" != "0"; then
65756     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65757 $as_echo "$as_me: icecc-create-env output:" >&6;}
65758     cat \
65759             ${icecc_create_env_log_build}
65760     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65761   fi
65762 
65763       elif test "x${BUILD_CC##*/}" = "xclang"; then
65764 
65765   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65766       && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65767   if test "$?" != "0"; then
65768     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65769 $as_echo "$as_me: icecc-create-env output:" >&6;}
65770     cat ${icecc_create_env_log_build}
65771     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65772   fi
65773 
65774       else
65775         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65776       fi
65777       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65778       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65779       if test ! -f ${ICECC_ENV_BUNDLE}; then
65780         as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65781       fi
65782       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65783 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65784       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65785 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65786       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65787           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65788     else
65789       BUILD_ICECC="${ICECC}"
65790     fi
65791 
65792 
65793   fi
65794 
65795 
65796 # Can the C/C++ compiler use precompiled headers?
65797 
65798 
65799   ###############################################################################
65800   #
65801   # Can the C/C++ compiler use precompiled headers?
65802   #
65803   # Check whether --enable-precompiled-headers was given.
65804 if test "${enable_precompiled_headers+set}" = set; then :
65805   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65806 else
65807   ENABLE_PRECOMPH=yes
65808 fi
65809 
65810 
65811   USE_PRECOMPILED_HEADER=1
65812   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65813 $as_echo_n "checking If precompiled header is enabled... " >&6; }
65814   if test "x$ENABLE_PRECOMPH" = xno; then
65815     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65816 $as_echo "no, forced" >&6; }
65817     USE_PRECOMPILED_HEADER=0
65818   elif test "x$ICECC" != "x"; then
65819     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65820 $as_echo "no, does not work effectively with icecc" >&6; }
65821     USE_PRECOMPILED_HEADER=0
65822   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65823     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65824 $as_echo "no, does not work with Solaris Studio" >&6; }
65825     USE_PRECOMPILED_HEADER=0
65826   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65827     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65828 $as_echo "no, does not work with xlc" >&6; }
65829     USE_PRECOMPILED_HEADER=0
65830   else
65831     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65832 $as_echo "yes" >&6; }
65833   fi
65834 
65835   if test "x$ENABLE_PRECOMPH" = xyes; then
65836     # Check that the compiler actually supports precomp headers.
65837     if test "x$TOOLCHAIN_TYPE" = xgcc; then
65838       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65839 $as_echo_n "checking that precompiled headers work... " >&6; }
65840       echo "int alfa();" > conftest.h
65841       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65842       if test ! -f conftest.hpp.gch; then
65843         USE_PRECOMPILED_HEADER=0
65844         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65845 $as_echo "no" >&6; }
65846       else
65847         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65848 $as_echo "yes" >&6; }
65849       fi
65850       $RM conftest.h conftest.hpp.gch
65851     fi
65852   fi
65853 
65854 
65855 
65856 
65857 # Setup use of ccache, if available
65858 
65859   # Check whether --enable-ccache was given.
65860 if test "${enable_ccache+set}" = set; then :
65861   enableval=$enable_ccache;
65862 fi
65863 
65864 
65865   CCACHE=
65866   CCACHE_STATUS=
65867   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65868 $as_echo_n "checking is ccache enabled... " >&6; }
65869   if test "x$enable_ccache" = xyes; then
65870     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65871       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65872 $as_echo "yes" >&6; }
65873       OLD_PATH="$PATH"
65874       if test "x$TOOLCHAIN_PATH" != x; then
65875         PATH=$TOOLCHAIN_PATH:$PATH
65876       fi
65877 
65878 
65879 
65880   # Publish this variable in the help.
65881 
65882 
65883   if [ -z "${CCACHE+x}" ]; then
65884     # The variable is not set by user, try to locate tool using the code snippet
65885     for ac_prog in ccache
65886 do
65887   # Extract the first word of "$ac_prog", so it can be a program name with args.
65888 set dummy $ac_prog; ac_word=$2
65889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65890 $as_echo_n "checking for $ac_word... " >&6; }
65891 if ${ac_cv_path_CCACHE+:} false; then :
65892   $as_echo_n "(cached) " >&6
65893 else
65894   case $CCACHE in
65895   [\\/]* | ?:[\\/]*)
65896   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65897   ;;
65898   *)
65899   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65900 for as_dir in $PATH
65901 do
65902   IFS=$as_save_IFS
65903   test -z "$as_dir" && as_dir=.
65904     for ac_exec_ext in '' $ac_executable_extensions; do
65905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65906     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65908     break 2
65909   fi
65910 done
65911   done
65912 IFS=$as_save_IFS
65913 
65914   ;;
65915 esac
65916 fi
65917 CCACHE=$ac_cv_path_CCACHE
65918 if test -n "$CCACHE"; then
65919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65920 $as_echo "$CCACHE" >&6; }
65921 else
65922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65923 $as_echo "no" >&6; }
65924 fi
65925 
65926 
65927   test -n "$CCACHE" && break
65928 done
65929 
65930   else
65931     # The variable is set, but is it from the command line or the environment?
65932 
65933     # Try to remove the string !CCACHE! from our list.
65934     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65935     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65936       # If it failed, the variable was not from the command line. Ignore it,
65937       # but warn the user (except for BASH, which is always set by the calling BASH).
65938       if test "xCCACHE" != xBASH; then
65939         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65940 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65941       fi
65942       # Try to locate tool using the code snippet
65943       for ac_prog in ccache
65944 do
65945   # Extract the first word of "$ac_prog", so it can be a program name with args.
65946 set dummy $ac_prog; ac_word=$2
65947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65948 $as_echo_n "checking for $ac_word... " >&6; }
65949 if ${ac_cv_path_CCACHE+:} false; then :
65950   $as_echo_n "(cached) " >&6
65951 else
65952   case $CCACHE in
65953   [\\/]* | ?:[\\/]*)
65954   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65955   ;;
65956   *)
65957   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65958 for as_dir in $PATH
65959 do
65960   IFS=$as_save_IFS
65961   test -z "$as_dir" && as_dir=.
65962     for ac_exec_ext in '' $ac_executable_extensions; do
65963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65964     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65966     break 2
65967   fi
65968 done
65969   done
65970 IFS=$as_save_IFS
65971 
65972   ;;
65973 esac
65974 fi
65975 CCACHE=$ac_cv_path_CCACHE
65976 if test -n "$CCACHE"; then
65977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65978 $as_echo "$CCACHE" >&6; }
65979 else
65980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65981 $as_echo "no" >&6; }
65982 fi
65983 
65984 
65985   test -n "$CCACHE" && break
65986 done
65987 
65988     else
65989       # If it succeeded, then it was overridden by the user. We will use it
65990       # for the tool.
65991 
65992       # First remove it from the list of overridden variables, so we can test
65993       # for unknown variables in the end.
65994       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65995 
65996       # Check if we try to supply an empty value
65997       if test "x$CCACHE" = x; then
65998         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65999 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66000         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66001 $as_echo_n "checking for CCACHE... " >&6; }
66002         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66003 $as_echo "disabled" >&6; }
66004       else
66005         # Check if the provided tool contains a complete path.
66006         tool_specified="$CCACHE"
66007         tool_basename="${tool_specified##*/}"
66008         if test "x$tool_basename" = "x$tool_specified"; then
66009           # A command without a complete path is provided, search $PATH.
66010           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66011 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66012           # Extract the first word of "$tool_basename", so it can be a program name with args.
66013 set dummy $tool_basename; ac_word=$2
66014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66015 $as_echo_n "checking for $ac_word... " >&6; }
66016 if ${ac_cv_path_CCACHE+:} false; then :
66017   $as_echo_n "(cached) " >&6
66018 else
66019   case $CCACHE in
66020   [\\/]* | ?:[\\/]*)
66021   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66022   ;;
66023   *)
66024   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66025 for as_dir in $PATH
66026 do
66027   IFS=$as_save_IFS
66028   test -z "$as_dir" && as_dir=.
66029     for ac_exec_ext in '' $ac_executable_extensions; do
66030   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66031     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66032     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66033     break 2
66034   fi
66035 done
66036   done
66037 IFS=$as_save_IFS
66038 
66039   ;;
66040 esac
66041 fi
66042 CCACHE=$ac_cv_path_CCACHE
66043 if test -n "$CCACHE"; then
66044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66045 $as_echo "$CCACHE" >&6; }
66046 else
66047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66048 $as_echo "no" >&6; }
66049 fi
66050 
66051 
66052           if test "x$CCACHE" = x; then
66053             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66054           fi
66055         else
66056           # Otherwise we believe it is a complete path. Use it as it is.
66057           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66058 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66059           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66060 $as_echo_n "checking for CCACHE... " >&6; }
66061           if test ! -x "$tool_specified"; then
66062             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66063 $as_echo "not found" >&6; }
66064             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66065           fi
66066           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66067 $as_echo "$tool_specified" >&6; }
66068         fi
66069       fi
66070     fi
66071 
66072   fi
66073 
66074 
66075 
66076   if test "x$CCACHE" = x; then
66077     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66078   fi
66079 
66080 
66081       PATH="$OLD_PATH"
66082       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66083       CCACHE_STATUS="Active ($CCACHE_VERSION)"
66084     else
66085       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66086 $as_echo "no" >&6; }
66087       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66088 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66089     fi
66090   elif test "x$enable_ccache" = xno; then
66091     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66092 $as_echo "no, explicitly disabled" >&6; }
66093     CCACHE_STATUS="Disabled"
66094   elif test "x$enable_ccache" = x; then
66095     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66096 $as_echo "no" >&6; }
66097   else
66098     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66099 $as_echo "unknown" >&6; }
66100     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66101   fi
66102 
66103 
66104 
66105 # Check whether --with-ccache-dir was given.
66106 if test "${with_ccache_dir+set}" = set; then :
66107   withval=$with_ccache_dir;
66108 fi
66109 
66110 
66111   if test "x$with_ccache_dir" != x; then
66112     # When using a non home ccache directory, assume the use is to share ccache files
66113     # with other users. Thus change the umask.
66114     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66115     if test "x$CCACHE" = x; then
66116       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66117 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66118     fi
66119   fi
66120 
66121   if test "x$CCACHE" != x; then
66122 
66123   if test "x$CCACHE" != x; then
66124     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
66125       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66126           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66127       if test "x$HAS_BAD_CCACHE" != "x"; then
66128         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66129       fi
66130       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66131 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66132       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66133       PUSHED_FLAGS="$CXXFLAGS"
66134       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66135       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66136 /* end confdefs.h.  */
66137 
66138 int
66139 main ()
66140 {
66141 
66142   ;
66143   return 0;
66144 }
66145 _ACEOF
66146 if ac_fn_cxx_try_compile "$LINENO"; then :
66147   CC_KNOWS_CCACHE_TRICK=yes
66148 else
66149   CC_KNOWS_CCACHE_TRICK=no
66150 fi
66151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66152       CXXFLAGS="$PUSHED_FLAGS"
66153       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66154         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66155 $as_echo "yes" >&6; }
66156         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66157 
66158         CCACHE_SLOPPINESS=pch_defines,time_macros
66159       else
66160         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66161 $as_echo "no" >&6; }
66162         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66163       fi
66164     fi
66165 
66166     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66167         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66168 
66169     if test "x$SET_CCACHE_DIR" != x; then
66170       mkdir -p $CCACHE_DIR > /dev/null 2>&1
66171       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66172     fi
66173   fi
66174 
66175   fi
66176 
66177 
66178 ###############################################################################
66179 #
66180 # And now the finish...
66181 #
66182 ###############################################################################
66183 
66184 # Check for some common pitfalls
66185 
66186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66187     file_to_test="$SRC_ROOT/LICENSE"
66188     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66189       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
66190     fi
66191   fi
66192 
66193 
66194   # Did user specify any unknown variables?
66195 
66196   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66197     # Replace the separating ! with spaces before presenting for end user.
66198     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66199     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66200 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66201   fi
66202 
66203 
66204   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66205 $as_echo_n "checking if build directory is on local disk... " >&6; }
66206 
66207   # df -l lists only local disks; if the given directory is not found then
66208   # a non-zero exit code is given
66209   if test "x$DF" = x; then
66210     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66211       # msys does not have df; use Windows "net use" instead.
66212       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66213       if test "x$IS_NETWORK_DISK" = x; then
66214         OUTPUT_DIR_IS_LOCAL="yes"
66215       else
66216         OUTPUT_DIR_IS_LOCAL="no"
66217       fi
66218     else
66219       # No df here, say it's local
66220       OUTPUT_DIR_IS_LOCAL="yes"
66221     fi
66222   else
66223     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66224       OUTPUT_DIR_IS_LOCAL="yes"
66225     else
66226       OUTPUT_DIR_IS_LOCAL="no"
66227     fi
66228   fi
66229 
66230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66231 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66232 
66233 
66234 
66235   # Check if the user has any old-style ALT_ variables set.
66236   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66237 
66238   # Before generating output files, test if they exist. If they do, this is a reconfigure.
66239   # Since we can't properly handle the dependencies for this, warn the user about the situation
66240   if test -e $OUTPUT_ROOT/spec.gmk; then
66241     IS_RECONFIGURE=yes
66242   else
66243     IS_RECONFIGURE=no
66244   fi
66245 
66246 
66247 # At the end, call the custom hook. (Dummy macro if no custom sources available)
66248 
66249 
66250 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66251 
66252   # Keep feature lists sorted and free of duplicates
66253   JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66254   JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66255   JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66256   JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66257   JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66258   JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66259   JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66260 
66261   # Validate features
66262   for variant in $JVM_VARIANTS; do
66263     { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66264 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66265     features_var_name=JVM_FEATURES_$variant
66266     JVM_FEATURES_TO_TEST=${!features_var_name}
66267     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66268 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66269     NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66270     STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66271     INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66272     if test "x$INVALID_FEATURES" != x; then
66273       as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66274     fi
66275   done
66276 
66277 
66278 # We're messing a bit with internal autoconf variables to put the config.status
66279 # in the output directory instead of the current directory.
66280 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66281 
66282 # Create the actual output files. Now the main work of configure is done.
66283 cat >confcache <<\_ACEOF
66284 # This file is a shell script that caches the results of configure
66285 # tests run on this system so they can be shared between configure
66286 # scripts and configure runs, see configure's option --config-cache.
66287 # It is not useful on other systems.  If it contains results you don't
66288 # want to keep, you may remove or edit it.
66289 #
66290 # config.status only pays attention to the cache file if you give it
66291 # the --recheck option to rerun configure.
66292 #
66293 # `ac_cv_env_foo' variables (set or unset) will be overridden when
66294 # loading this file, other *unset* `ac_cv_foo' will be assigned the
66295 # following values.
66296 
66297 _ACEOF
66298 
66299 # The following way of writing the cache mishandles newlines in values,
66300 # but we know of no workaround that is simple, portable, and efficient.
66301 # So, we kill variables containing newlines.
66302 # Ultrix sh set writes to stderr and can't be redirected directly,
66303 # and sets the high bit in the cache file unless we assign to the vars.
66304 (
66305   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66306     eval ac_val=\$$ac_var
66307     case $ac_val in #(
66308     *${as_nl}*)
66309       case $ac_var in #(
66310       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66311 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66312       esac
66313       case $ac_var in #(
66314       _ | IFS | as_nl) ;; #(
66315       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66316       *) { eval $ac_var=; unset $ac_var;} ;;
66317       esac ;;
66318     esac
66319   done
66320 
66321   (set) 2>&1 |
66322     case $as_nl`(ac_space=' '; set) 2>&1` in #(
66323     *${as_nl}ac_space=\ *)
66324       # `set' does not quote correctly, so add quotes: double-quote
66325       # substitution turns \\\\ into \\, and sed turns \\ into \.
66326       sed -n \
66327         "s/'/'\\\\''/g;
66328           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66329       ;; #(
66330     *)
66331       # `set' quotes correctly as required by POSIX, so do not add quotes.
66332       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66333       ;;
66334     esac |
66335     sort
66336 ) |
66337   sed '
66338      /^ac_cv_env_/b end
66339      t clear
66340      :clear
66341      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66342      t end
66343      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66344      :end' >>confcache
66345 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66346   if test -w "$cache_file"; then
66347     if test "x$cache_file" != "x/dev/null"; then
66348       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66349 $as_echo "$as_me: updating cache $cache_file" >&6;}
66350       if test ! -f "$cache_file" || test -h "$cache_file"; then
66351         cat confcache >"$cache_file"
66352       else
66353         case $cache_file in #(
66354         */* | ?:*)
66355           mv -f confcache "$cache_file"$$ &&
66356           mv -f "$cache_file"$$ "$cache_file" ;; #(
66357         *)
66358           mv -f confcache "$cache_file" ;;
66359         esac
66360       fi
66361     fi
66362   else
66363     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66364 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66365   fi
66366 fi
66367 rm -f confcache
66368 
66369 test "x$prefix" = xNONE && prefix=$ac_default_prefix
66370 # Let make expand exec_prefix.
66371 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66372 
66373 # Transform confdefs.h into DEFS.
66374 # Protect against shell expansion while executing Makefile rules.
66375 # Protect against Makefile macro expansion.
66376 #
66377 # If the first sed substitution is executed (which looks for macros that
66378 # take arguments), then branch to the quote section.  Otherwise,
66379 # look for a macro that doesn't take arguments.
66380 ac_script='
66381 :mline
66382 /\\$/{
66383  N
66384  s,\\\n,,
66385  b mline
66386 }
66387 t clear
66388 :clear
66389 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
66390 t quote
66391 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
66392 t quote
66393 b any
66394 :quote
66395 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66396 s/\[/\\&/g
66397 s/\]/\\&/g
66398 s/\$/$$/g
66399 H
66400 :any
66401 ${
66402         g
66403         s/^\n//
66404         s/\n/ /g
66405         p
66406 }
66407 '
66408 DEFS=`sed -n "$ac_script" confdefs.h`
66409 
66410 
66411 ac_libobjs=
66412 ac_ltlibobjs=
66413 U=
66414 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66415   # 1. Remove the extension, and $U if already installed.
66416   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66417   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66418   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66419   #    will be set to the directory where LIBOBJS objects are built.
66420   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66421   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66422 done
66423 LIBOBJS=$ac_libobjs
66424 
66425 LTLIBOBJS=$ac_ltlibobjs
66426 
66427 
66428 
66429 : "${CONFIG_STATUS=./config.status}"
66430 ac_write_fail=0
66431 ac_clean_files_save=$ac_clean_files
66432 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66433 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66434 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66435 as_write_fail=0
66436 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66437 #! $SHELL
66438 # Generated by $as_me.
66439 # Run this file to recreate the current configuration.
66440 # Compiler output produced by configure, useful for debugging
66441 # configure, is in config.log if it exists.
66442 
66443 debug=false
66444 ac_cs_recheck=false
66445 ac_cs_silent=false
66446 
66447 SHELL=\${CONFIG_SHELL-$SHELL}
66448 export SHELL
66449 _ASEOF
66450 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66451 ## -------------------- ##
66452 ## M4sh Initialization. ##
66453 ## -------------------- ##
66454 
66455 # Be more Bourne compatible
66456 DUALCASE=1; export DUALCASE # for MKS sh
66457 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66458   emulate sh
66459   NULLCMD=:
66460   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66461   # is contrary to our usage.  Disable this feature.
66462   alias -g '${1+"$@"}'='"$@"'
66463   setopt NO_GLOB_SUBST
66464 else
66465   case `(set -o) 2>/dev/null` in #(
66466   *posix*) :
66467     set -o posix ;; #(
66468   *) :
66469      ;;
66470 esac
66471 fi
66472 
66473 
66474 as_nl='
66475 '
66476 export as_nl
66477 # Printing a long string crashes Solaris 7 /usr/bin/printf.
66478 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66479 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66480 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66481 # Prefer a ksh shell builtin over an external printf program on Solaris,
66482 # but without wasting forks for bash or zsh.
66483 if test -z "$BASH_VERSION$ZSH_VERSION" \
66484     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66485   as_echo='print -r --'
66486   as_echo_n='print -rn --'
66487 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66488   as_echo='printf %s\n'
66489   as_echo_n='printf %s'
66490 else
66491   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66492     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66493     as_echo_n='/usr/ucb/echo -n'
66494   else
66495     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66496     as_echo_n_body='eval
66497       arg=$1;
66498       case $arg in #(
66499       *"$as_nl"*)
66500         expr "X$arg" : "X\\(.*\\)$as_nl";
66501         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66502       esac;
66503       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66504     '
66505     export as_echo_n_body
66506     as_echo_n='sh -c $as_echo_n_body as_echo'
66507   fi
66508   export as_echo_body
66509   as_echo='sh -c $as_echo_body as_echo'
66510 fi
66511 
66512 # The user is always right.
66513 if test "${PATH_SEPARATOR+set}" != set; then
66514   PATH_SEPARATOR=:
66515   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66516     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66517       PATH_SEPARATOR=';'
66518   }
66519 fi
66520 
66521 
66522 # IFS
66523 # We need space, tab and new line, in precisely that order.  Quoting is
66524 # there to prevent editors from complaining about space-tab.
66525 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
66526 # splitting by setting IFS to empty value.)
66527 IFS=" ""        $as_nl"
66528 
66529 # Find who we are.  Look in the path if we contain no directory separator.
66530 as_myself=
66531 case $0 in #((
66532   *[\\/]* ) as_myself=$0 ;;
66533   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66534 for as_dir in $PATH
66535 do
66536   IFS=$as_save_IFS
66537   test -z "$as_dir" && as_dir=.
66538     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66539   done
66540 IFS=$as_save_IFS
66541 
66542      ;;
66543 esac
66544 # We did not find ourselves, most probably we were run as `sh COMMAND'
66545 # in which case we are not to be found in the path.
66546 if test "x$as_myself" = x; then
66547   as_myself=$0
66548 fi
66549 if test ! -f "$as_myself"; then
66550   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66551   exit 1
66552 fi
66553 
66554 # Unset variables that we do not need and which cause bugs (e.g. in
66555 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66556 # suppresses any "Segmentation fault" message there.  '((' could
66557 # trigger a bug in pdksh 5.2.14.
66558 for as_var in BASH_ENV ENV MAIL MAILPATH
66559 do eval test x\${$as_var+set} = xset \
66560   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66561 done
66562 PS1='$ '
66563 PS2='> '
66564 PS4='+ '
66565 
66566 # NLS nuisances.
66567 LC_ALL=C
66568 export LC_ALL
66569 LANGUAGE=C
66570 export LANGUAGE
66571 
66572 # CDPATH.
66573 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66574 
66575 
66576 # as_fn_error STATUS ERROR [LINENO LOG_FD]
66577 # ----------------------------------------
66578 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66579 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66580 # script with STATUS, using 1 if that was 0.
66581 as_fn_error ()
66582 {
66583   as_status=$1; test $as_status -eq 0 && as_status=1
66584   if test "$4"; then
66585     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66586     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66587   fi
66588   $as_echo "$as_me: error: $2" >&2
66589   as_fn_exit $as_status
66590 } # as_fn_error
66591 
66592 
66593 # as_fn_set_status STATUS
66594 # -----------------------
66595 # Set $? to STATUS, without forking.
66596 as_fn_set_status ()
66597 {
66598   return $1
66599 } # as_fn_set_status
66600 
66601 # as_fn_exit STATUS
66602 # -----------------
66603 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66604 as_fn_exit ()
66605 {
66606   set +e
66607   as_fn_set_status $1
66608   exit $1
66609 } # as_fn_exit
66610 
66611 # as_fn_unset VAR
66612 # ---------------
66613 # Portably unset VAR.
66614 as_fn_unset ()
66615 {
66616   { eval $1=; unset $1;}
66617 }
66618 as_unset=as_fn_unset
66619 # as_fn_append VAR VALUE
66620 # ----------------------
66621 # Append the text in VALUE to the end of the definition contained in VAR. Take
66622 # advantage of any shell optimizations that allow amortized linear growth over
66623 # repeated appends, instead of the typical quadratic growth present in naive
66624 # implementations.
66625 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66626   eval 'as_fn_append ()
66627   {
66628     eval $1+=\$2
66629   }'
66630 else
66631   as_fn_append ()
66632   {
66633     eval $1=\$$1\$2
66634   }
66635 fi # as_fn_append
66636 
66637 # as_fn_arith ARG...
66638 # ------------------
66639 # Perform arithmetic evaluation on the ARGs, and store the result in the
66640 # global $as_val. Take advantage of shells that can avoid forks. The arguments
66641 # must be portable across $(()) and expr.
66642 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66643   eval 'as_fn_arith ()
66644   {
66645     as_val=$(( $* ))
66646   }'
66647 else
66648   as_fn_arith ()
66649   {
66650     as_val=`expr "$@" || test $? -eq 1`
66651   }
66652 fi # as_fn_arith
66653 
66654 
66655 if expr a : '\(a\)' >/dev/null 2>&1 &&
66656    test "X`expr 00001 : '.*\(...\)'`" = X001; then
66657   as_expr=expr
66658 else
66659   as_expr=false
66660 fi
66661 
66662 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66663   as_basename=basename
66664 else
66665   as_basename=false
66666 fi
66667 
66668 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66669   as_dirname=dirname
66670 else
66671   as_dirname=false
66672 fi
66673 
66674 as_me=`$as_basename -- "$0" ||
66675 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66676          X"$0" : 'X\(//\)$' \| \
66677          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66678 $as_echo X/"$0" |
66679     sed '/^.*\/\([^/][^/]*\)\/*$/{
66680             s//\1/
66681             q
66682           }
66683           /^X\/\(\/\/\)$/{
66684             s//\1/
66685             q
66686           }
66687           /^X\/\(\/\).*/{
66688             s//\1/
66689             q
66690           }
66691           s/.*/./; q'`
66692 
66693 # Avoid depending upon Character Ranges.
66694 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66695 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66696 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66697 as_cr_digits='0123456789'
66698 as_cr_alnum=$as_cr_Letters$as_cr_digits
66699 
66700 ECHO_C= ECHO_N= ECHO_T=
66701 case `echo -n x` in #(((((
66702 -n*)
66703   case `echo 'xy\c'` in
66704   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
66705   xy)  ECHO_C='\c';;
66706   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66707        ECHO_T=' ';;
66708   esac;;
66709 *)
66710   ECHO_N='-n';;
66711 esac
66712 
66713 rm -f conf$$ conf$$.exe conf$$.file
66714 if test -d conf$$.dir; then
66715   rm -f conf$$.dir/conf$$.file
66716 else
66717   rm -f conf$$.dir
66718   mkdir conf$$.dir 2>/dev/null
66719 fi
66720 if (echo >conf$$.file) 2>/dev/null; then
66721   if ln -s conf$$.file conf$$ 2>/dev/null; then
66722     as_ln_s='ln -s'
66723     # ... but there are two gotchas:
66724     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66725     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66726     # In both cases, we have to default to `cp -pR'.
66727     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66728       as_ln_s='cp -pR'
66729   elif ln conf$$.file conf$$ 2>/dev/null; then
66730     as_ln_s=ln
66731   else
66732     as_ln_s='cp -pR'
66733   fi
66734 else
66735   as_ln_s='cp -pR'
66736 fi
66737 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66738 rmdir conf$$.dir 2>/dev/null
66739 
66740 
66741 # as_fn_mkdir_p
66742 # -------------
66743 # Create "$as_dir" as a directory, including parents if necessary.
66744 as_fn_mkdir_p ()
66745 {
66746 
66747   case $as_dir in #(
66748   -*) as_dir=./$as_dir;;
66749   esac
66750   test -d "$as_dir" || eval $as_mkdir_p || {
66751     as_dirs=
66752     while :; do
66753       case $as_dir in #(
66754       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66755       *) as_qdir=$as_dir;;
66756       esac
66757       as_dirs="'$as_qdir' $as_dirs"
66758       as_dir=`$as_dirname -- "$as_dir" ||
66759 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66760          X"$as_dir" : 'X\(//\)[^/]' \| \
66761          X"$as_dir" : 'X\(//\)$' \| \
66762          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66763 $as_echo X"$as_dir" |
66764     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66765             s//\1/
66766             q
66767           }
66768           /^X\(\/\/\)[^/].*/{
66769             s//\1/
66770             q
66771           }
66772           /^X\(\/\/\)$/{
66773             s//\1/
66774             q
66775           }
66776           /^X\(\/\).*/{
66777             s//\1/
66778             q
66779           }
66780           s/.*/./; q'`
66781       test -d "$as_dir" && break
66782     done
66783     test -z "$as_dirs" || eval "mkdir $as_dirs"
66784   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66785 
66786 
66787 } # as_fn_mkdir_p
66788 if mkdir -p . 2>/dev/null; then
66789   as_mkdir_p='mkdir -p "$as_dir"'
66790 else
66791   test -d ./-p && rmdir ./-p
66792   as_mkdir_p=false
66793 fi
66794 
66795 
66796 # as_fn_executable_p FILE
66797 # -----------------------
66798 # Test if FILE is an executable regular file.
66799 as_fn_executable_p ()
66800 {
66801   test -f "$1" && test -x "$1"
66802 } # as_fn_executable_p
66803 as_test_x='test -x'
66804 as_executable_p=as_fn_executable_p
66805 
66806 # Sed expression to map a string onto a valid CPP name.
66807 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66808 
66809 # Sed expression to map a string onto a valid variable name.
66810 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66811 
66812 
66813 exec 6>&1
66814 ## ----------------------------------- ##
66815 ## Main body of $CONFIG_STATUS script. ##
66816 ## ----------------------------------- ##
66817 _ASEOF
66818 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66819 
66820 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66821 # Save the log message, to keep $0 and so on meaningful, and to
66822 # report actual input values of CONFIG_FILES etc. instead of their
66823 # values after options handling.
66824 ac_log="
66825 This file was extended by OpenJDK $as_me jdk9, which was
66826 generated by GNU Autoconf 2.69.  Invocation command line was
66827 
66828   CONFIG_FILES    = $CONFIG_FILES
66829   CONFIG_HEADERS  = $CONFIG_HEADERS
66830   CONFIG_LINKS    = $CONFIG_LINKS
66831   CONFIG_COMMANDS = $CONFIG_COMMANDS
66832   $ $0 $@
66833 
66834 on `(hostname || uname -n) 2>/dev/null | sed 1q`
66835 "
66836 
66837 _ACEOF
66838 
66839 case $ac_config_files in *"
66840 "*) set x $ac_config_files; shift; ac_config_files=$*;;
66841 esac
66842 
66843 
66844 
66845 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66846 # Files that config.status was made for.
66847 config_files="$ac_config_files"
66848 
66849 _ACEOF
66850 
66851 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66852 ac_cs_usage="\
66853 \`$as_me' instantiates files and other configuration actions
66854 from templates according to the current configuration.  Unless the files
66855 and actions are specified as TAGs, all are instantiated by default.
66856 
66857 Usage: $0 [OPTION]... [TAG]...
66858 
66859   -h, --help       print this help, then exit
66860   -V, --version    print version number and configuration settings, then exit
66861       --config     print configuration, then exit
66862   -q, --quiet, --silent
66863                    do not print progress messages
66864   -d, --debug      don't remove temporary files
66865       --recheck    update $as_me by reconfiguring in the same conditions
66866       --file=FILE[:TEMPLATE]
66867                    instantiate the configuration file FILE
66868 
66869 Configuration files:
66870 $config_files
66871 
66872 Report bugs to <build-dev@openjdk.java.net>.
66873 OpenJDK home page: <http://openjdk.java.net>."
66874 
66875 _ACEOF
66876 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66877 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66878 ac_cs_version="\\
66879 OpenJDK config.status jdk9
66880 configured by $0, generated by GNU Autoconf 2.69,
66881   with options \\"\$ac_cs_config\\"
66882 
66883 Copyright (C) 2012 Free Software Foundation, Inc.
66884 This config.status script is free software; the Free Software Foundation
66885 gives unlimited permission to copy, distribute and modify it."
66886 
66887 ac_pwd='$ac_pwd'
66888 srcdir='$srcdir'
66889 AWK='$AWK'
66890 test -n "\$AWK" || AWK=awk
66891 _ACEOF
66892 
66893 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66894 # The default lists apply if the user does not specify any file.
66895 ac_need_defaults=:
66896 while test $# != 0
66897 do
66898   case $1 in
66899   --*=?*)
66900     ac_option=`expr "X$1" : 'X\([^=]*\)='`
66901     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66902     ac_shift=:
66903     ;;
66904   --*=)
66905     ac_option=`expr "X$1" : 'X\([^=]*\)='`
66906     ac_optarg=
66907     ac_shift=:
66908     ;;
66909   *)
66910     ac_option=$1
66911     ac_optarg=$2
66912     ac_shift=shift
66913     ;;
66914   esac
66915 
66916   case $ac_option in
66917   # Handling of the options.
66918   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66919     ac_cs_recheck=: ;;
66920   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66921     $as_echo "$ac_cs_version"; exit ;;
66922   --config | --confi | --conf | --con | --co | --c )
66923     $as_echo "$ac_cs_config"; exit ;;
66924   --debug | --debu | --deb | --de | --d | -d )
66925     debug=: ;;
66926   --file | --fil | --fi | --f )
66927     $ac_shift
66928     case $ac_optarg in
66929     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66930     '') as_fn_error $? "missing file argument" ;;
66931     esac
66932     as_fn_append CONFIG_FILES " '$ac_optarg'"
66933     ac_need_defaults=false;;
66934   --he | --h |  --help | --hel | -h )
66935     $as_echo "$ac_cs_usage"; exit ;;
66936   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66937   | -silent | --silent | --silen | --sile | --sil | --si | --s)
66938     ac_cs_silent=: ;;
66939 
66940   # This is an error.
66941   -*) as_fn_error $? "unrecognized option: \`$1'
66942 Try \`$0 --help' for more information." ;;
66943 
66944   *) as_fn_append ac_config_targets " $1"
66945      ac_need_defaults=false ;;
66946 
66947   esac
66948   shift
66949 done
66950 
66951 ac_configure_extra_args=
66952 
66953 if $ac_cs_silent; then
66954   exec 6>/dev/null
66955   ac_configure_extra_args="$ac_configure_extra_args --silent"
66956 fi
66957 
66958 _ACEOF
66959 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66960 if \$ac_cs_recheck; then
66961   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66962   shift
66963   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66964   CONFIG_SHELL='$SHELL'
66965   export CONFIG_SHELL
66966   exec "\$@"
66967 fi
66968 
66969 _ACEOF
66970 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66971 exec 5>>config.log
66972 {
66973   echo
66974   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66975 ## Running $as_me. ##
66976 _ASBOX
66977   $as_echo "$ac_log"
66978 } >&5
66979 
66980 _ACEOF
66981 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66982 _ACEOF
66983 
66984 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66985 
66986 # Handling of arguments.
66987 for ac_config_target in $ac_config_targets
66988 do
66989   case $ac_config_target in
66990     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66991     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66992     "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66993     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66994     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66995 
66996   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66997   esac
66998 done
66999 
67000 
67001 # If the user did not use the arguments to specify the items to instantiate,
67002 # then the envvar interface is used.  Set only those that are not.
67003 # We use the long form for the default assignment because of an extremely
67004 # bizarre bug on SunOS 4.1.3.
67005 if $ac_need_defaults; then
67006   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67007 fi
67008 
67009 # Have a temporary directory for convenience.  Make it in the build tree
67010 # simply because there is no reason against having it here, and in addition,
67011 # creating and moving files from /tmp can sometimes cause problems.
67012 # Hook for its removal unless debugging.
67013 # Note that there is a small window in which the directory will not be cleaned:
67014 # after its creation but before its name has been assigned to `$tmp'.
67015 $debug ||
67016 {
67017   tmp= ac_tmp=
67018   trap 'exit_status=$?
67019   : "${ac_tmp:=$tmp}"
67020   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67021 ' 0
67022   trap 'as_fn_exit 1' 1 2 13 15
67023 }
67024 # Create a (secure) tmp directory for tmp files.
67025 
67026 {
67027   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67028   test -d "$tmp"
67029 }  ||
67030 {
67031   tmp=./conf$$-$RANDOM
67032   (umask 077 && mkdir "$tmp")
67033 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67034 ac_tmp=$tmp
67035 
67036 # Set up the scripts for CONFIG_FILES section.
67037 # No need to generate them if there are no CONFIG_FILES.
67038 # This happens for instance with `./config.status config.h'.
67039 if test -n "$CONFIG_FILES"; then
67040 
67041 
67042 ac_cr=`echo X | tr X '\015'`
67043 # On cygwin, bash can eat \r inside `` if the user requested igncr.
67044 # But we know of no other shell where ac_cr would be empty at this
67045 # point, so we can use a bashism as a fallback.
67046 if test "x$ac_cr" = x; then
67047   eval ac_cr=\$\'\\r\'
67048 fi
67049 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67050 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67051   ac_cs_awk_cr='\\r'
67052 else
67053   ac_cs_awk_cr=$ac_cr
67054 fi
67055 
67056 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67057 _ACEOF
67058 
67059 
67060 {
67061   echo "cat >conf$$subs.awk <<_ACEOF" &&
67062   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67063   echo "_ACEOF"
67064 } >conf$$subs.sh ||
67065   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67066 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67067 ac_delim='%!_!# '
67068 for ac_last_try in false false false false false :; do
67069   . ./conf$$subs.sh ||
67070     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67071 
67072   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67073   if test $ac_delim_n = $ac_delim_num; then
67074     break
67075   elif $ac_last_try; then
67076     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67077   else
67078     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67079   fi
67080 done
67081 rm -f conf$$subs.sh
67082 
67083 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67084 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67085 _ACEOF
67086 sed -n '
67087 h
67088 s/^/S["/; s/!.*/"]=/
67089 p
67090 g
67091 s/^[^!]*!//
67092 :repl
67093 t repl
67094 s/'"$ac_delim"'$//
67095 t delim
67096 :nl
67097 h
67098 s/\(.\{148\}\)..*/\1/
67099 t more1
67100 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67101 p
67102 n
67103 b repl
67104 :more1
67105 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67106 p
67107 g
67108 s/.\{148\}//
67109 t nl
67110 :delim
67111 h
67112 s/\(.\{148\}\)..*/\1/
67113 t more2
67114 s/["\\]/\\&/g; s/^/"/; s/$/"/
67115 p
67116 b
67117 :more2
67118 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67119 p
67120 g
67121 s/.\{148\}//
67122 t delim
67123 ' <conf$$subs.awk | sed '
67124 /^[^""]/{
67125   N
67126   s/\n//
67127 }
67128 ' >>$CONFIG_STATUS || ac_write_fail=1
67129 rm -f conf$$subs.awk
67130 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67131 _ACAWK
67132 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67133   for (key in S) S_is_set[key] = 1
67134   FS = ""
67135 
67136 }
67137 {
67138   line = $ 0
67139   nfields = split(line, field, "@")
67140   substed = 0
67141   len = length(field[1])
67142   for (i = 2; i < nfields; i++) {
67143     key = field[i]
67144     keylen = length(key)
67145     if (S_is_set[key]) {
67146       value = S[key]
67147       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67148       len += length(value) + length(field[++i])
67149       substed = 1
67150     } else
67151       len += 1 + keylen
67152   }
67153 
67154   print line
67155 }
67156 
67157 _ACAWK
67158 _ACEOF
67159 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67160 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67161   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67162 else
67163   cat
67164 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67165   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67166 _ACEOF
67167 
67168 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67169 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67170 # trailing colons and then remove the whole line if VPATH becomes empty
67171 # (actually we leave an empty line to preserve line numbers).
67172 if test "x$srcdir" = x.; then
67173   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
67174 h
67175 s///
67176 s/^/:/
67177 s/[      ]*$/:/
67178 s/:\$(srcdir):/:/g
67179 s/:\${srcdir}:/:/g
67180 s/:@srcdir@:/:/g
67181 s/^:*//
67182 s/:*$//
67183 x
67184 s/\(=[   ]*\).*/\1/
67185 G
67186 s/\n//
67187 s/^[^=]*=[       ]*$//
67188 }'
67189 fi
67190 
67191 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67192 fi # test -n "$CONFIG_FILES"
67193 
67194 
67195 eval set X "  :F $CONFIG_FILES      "
67196 shift
67197 for ac_tag
67198 do
67199   case $ac_tag in
67200   :[FHLC]) ac_mode=$ac_tag; continue;;
67201   esac
67202   case $ac_mode$ac_tag in
67203   :[FHL]*:*);;
67204   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67205   :[FH]-) ac_tag=-:-;;
67206   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67207   esac
67208   ac_save_IFS=$IFS
67209   IFS=:
67210   set x $ac_tag
67211   IFS=$ac_save_IFS
67212   shift
67213   ac_file=$1
67214   shift
67215 
67216   case $ac_mode in
67217   :L) ac_source=$1;;
67218   :[FH])
67219     ac_file_inputs=
67220     for ac_f
67221     do
67222       case $ac_f in
67223       -) ac_f="$ac_tmp/stdin";;
67224       *) # Look for the file first in the build tree, then in the source tree
67225          # (if the path is not absolute).  The absolute path cannot be DOS-style,
67226          # because $ac_f cannot contain `:'.
67227          test -f "$ac_f" ||
67228            case $ac_f in
67229            [\\/$]*) false;;
67230            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67231            esac ||
67232            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67233       esac
67234       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67235       as_fn_append ac_file_inputs " '$ac_f'"
67236     done
67237 
67238     # Let's still pretend it is `configure' which instantiates (i.e., don't
67239     # use $as_me), people would be surprised to read:
67240     #    /* config.h.  Generated by config.status.  */
67241     configure_input='Generated from '`
67242           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67243         `' by configure.'
67244     if test x"$ac_file" != x-; then
67245       configure_input="$ac_file.  $configure_input"
67246       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67247 $as_echo "$as_me: creating $ac_file" >&6;}
67248     fi
67249     # Neutralize special characters interpreted by sed in replacement strings.
67250     case $configure_input in #(
67251     *\&* | *\|* | *\\* )
67252        ac_sed_conf_input=`$as_echo "$configure_input" |
67253        sed 's/[\\\\&|]/\\\\&/g'`;; #(
67254     *) ac_sed_conf_input=$configure_input;;
67255     esac
67256 
67257     case $ac_tag in
67258     *:-:* | *:-) cat >"$ac_tmp/stdin" \
67259       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67260     esac
67261     ;;
67262   esac
67263 
67264   ac_dir=`$as_dirname -- "$ac_file" ||
67265 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67266          X"$ac_file" : 'X\(//\)[^/]' \| \
67267          X"$ac_file" : 'X\(//\)$' \| \
67268          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67269 $as_echo X"$ac_file" |
67270     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67271             s//\1/
67272             q
67273           }
67274           /^X\(\/\/\)[^/].*/{
67275             s//\1/
67276             q
67277           }
67278           /^X\(\/\/\)$/{
67279             s//\1/
67280             q
67281           }
67282           /^X\(\/\).*/{
67283             s//\1/
67284             q
67285           }
67286           s/.*/./; q'`
67287   as_dir="$ac_dir"; as_fn_mkdir_p
67288   ac_builddir=.
67289 
67290 case "$ac_dir" in
67291 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67292 *)
67293   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67294   # A ".." for each directory in $ac_dir_suffix.
67295   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67296   case $ac_top_builddir_sub in
67297   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67298   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67299   esac ;;
67300 esac
67301 ac_abs_top_builddir=$ac_pwd
67302 ac_abs_builddir=$ac_pwd$ac_dir_suffix
67303 # for backward compatibility:
67304 ac_top_builddir=$ac_top_build_prefix
67305 
67306 case $srcdir in
67307   .)  # We are building in place.
67308     ac_srcdir=.
67309     ac_top_srcdir=$ac_top_builddir_sub
67310     ac_abs_top_srcdir=$ac_pwd ;;
67311   [\\/]* | ?:[\\/]* )  # Absolute name.
67312     ac_srcdir=$srcdir$ac_dir_suffix;
67313     ac_top_srcdir=$srcdir
67314     ac_abs_top_srcdir=$srcdir ;;
67315   *) # Relative name.
67316     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67317     ac_top_srcdir=$ac_top_build_prefix$srcdir
67318     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67319 esac
67320 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67321 
67322 
67323   case $ac_mode in
67324   :F)
67325   #
67326   # CONFIG_FILE
67327   #
67328 
67329 _ACEOF
67330 
67331 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67332 # If the template does not know about datarootdir, expand it.
67333 # FIXME: This hack should be removed a few years after 2.60.
67334 ac_datarootdir_hack=; ac_datarootdir_seen=
67335 ac_sed_dataroot='
67336 /datarootdir/ {
67337   p
67338   q
67339 }
67340 /@datadir@/p
67341 /@docdir@/p
67342 /@infodir@/p
67343 /@localedir@/p
67344 /@mandir@/p'
67345 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67346 *datarootdir*) ac_datarootdir_seen=yes;;
67347 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67348   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67349 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67350 _ACEOF
67351 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67352   ac_datarootdir_hack='
67353   s&@datadir@&$datadir&g
67354   s&@docdir@&$docdir&g
67355   s&@infodir@&$infodir&g
67356   s&@localedir@&$localedir&g
67357   s&@mandir@&$mandir&g
67358   s&\\\${datarootdir}&$datarootdir&g' ;;
67359 esac
67360 _ACEOF
67361 
67362 # Neutralize VPATH when `$srcdir' = `.'.
67363 # Shell code in configure.ac might set extrasub.
67364 # FIXME: do we really want to maintain this feature?
67365 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67366 ac_sed_extra="$ac_vpsub
67367 $extrasub
67368 _ACEOF
67369 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67370 :t
67371 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67372 s|@configure_input@|$ac_sed_conf_input|;t t
67373 s&@top_builddir@&$ac_top_builddir_sub&;t t
67374 s&@top_build_prefix@&$ac_top_build_prefix&;t t
67375 s&@srcdir@&$ac_srcdir&;t t
67376 s&@abs_srcdir@&$ac_abs_srcdir&;t t
67377 s&@top_srcdir@&$ac_top_srcdir&;t t
67378 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67379 s&@builddir@&$ac_builddir&;t t
67380 s&@abs_builddir@&$ac_abs_builddir&;t t
67381 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67382 $ac_datarootdir_hack
67383 "
67384 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67385   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67386 
67387 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67388   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67389   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
67390       "$ac_tmp/out"`; test -z "$ac_out"; } &&
67391   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67392 which seems to be undefined.  Please make sure it is defined" >&5
67393 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67394 which seems to be undefined.  Please make sure it is defined" >&2;}
67395 
67396   rm -f "$ac_tmp/stdin"
67397   case $ac_file in
67398   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67399   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67400   esac \
67401   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67402  ;;
67403 
67404 
67405 
67406   esac
67407 
67408 done # for ac_tag
67409 
67410 
67411 as_fn_exit 0
67412 _ACEOF
67413 ac_clean_files=$ac_clean_files_save
67414 
67415 test $ac_write_fail = 0 ||
67416   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67417 
67418 
67419 # configure is writing to config.log, and then calls config.status.
67420 # config.status does its own redirection, appending to config.log.
67421 # Unfortunately, on DOS this fails, as config.log is still kept open
67422 # by configure, so config.status won't be able to write to it; its
67423 # output is simply discarded.  So we exec the FD to /dev/null,
67424 # effectively closing config.log, so it can be properly (re)opened and
67425 # appended to by config.status.  When coming back to configure, we
67426 # need to make the FD available again.
67427 if test "$no_create" != yes; then
67428   ac_cs_success=:
67429   ac_config_status_args=
67430   test "$silent" = yes &&
67431     ac_config_status_args="$ac_config_status_args --quiet"
67432   exec 5>/dev/null
67433   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67434   exec 5>>config.log
67435   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67436   # would make configure fail if this is the last instruction.
67437   $ac_cs_success || as_fn_exit 1
67438 fi
67439 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67440   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67441 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67442 fi
67443 
67444 
67445 # After AC_OUTPUT, we need to do final work
67446 
67447 
67448   # Try to move config.log (generated by autoconf) to the configure-support directory.
67449   if test -e ./config.log; then
67450     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67451   fi
67452 
67453   # Rotate our log file (configure.log)
67454   if test -e "$OUTPUT_ROOT/configure.log.old"; then
67455     $RM -f "$OUTPUT_ROOT/configure.log.old"
67456   fi
67457   if test -e "$OUTPUT_ROOT/configure.log"; then
67458     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67459   fi
67460 
67461   # Move configure.log from current directory to the build output root
67462   if test -e ./configure.log; then
67463     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67464   fi
67465 
67466   # Make the compare script executable
67467   $CHMOD +x $OUTPUT_ROOT/compare.sh
67468 
67469 
67470 # Finally output some useful information to the user
67471 
67472   # Finally output some useful information to the user
67473 
67474   printf "\n"
67475   printf "====================================================\n"
67476   if test "x$no_create" != "xyes"; then
67477     if test "x$IS_RECONFIGURE" != "xyes"; then
67478       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67479     else
67480       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67481     fi
67482   else
67483     if test "x$IS_RECONFIGURE" != "xyes"; then
67484       printf "A configuration has been successfully checked but not created\n"
67485     else
67486       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67487     fi
67488   fi
67489   if test "x$CONFIGURE_COMMAND_LINE" != x; then
67490     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67491   else
67492     printf "using default settings.\n"
67493   fi
67494 
67495   printf "\n"
67496   printf "Configuration summary:\n"
67497   printf "* Debug level:    $DEBUG_LEVEL\n"
67498   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67499   printf "* JDK variant:    $JDK_VARIANT\n"
67500   printf "* JVM variants:   $JVM_VARIANTS\n"
67501   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67502   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67503 
67504   printf "\n"
67505   printf "Tools summary:\n"
67506   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67507     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67508   fi
67509   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67510   if test "x$TOOLCHAIN_VERSION" != "x"; then
67511     print_version=" $TOOLCHAIN_VERSION"
67512   fi
67513   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67514   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67515   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67516 
67517   printf "\n"
67518   printf "Build performance summary:\n"
67519   printf "* Cores to use:   $JOBS\n"
67520   printf "* Memory limit:   $MEMORY_SIZE MB\n"
67521   if test "x$CCACHE_STATUS" != "x"; then
67522     printf "* ccache status:  $CCACHE_STATUS\n"
67523   fi
67524   printf "\n"
67525 
67526   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67527     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67528     printf "will result in longer build times.\n"
67529     printf "\n"
67530   fi
67531 
67532   if test "x$FOUND_ALT_VARIABLES" != "x"; then
67533     printf "WARNING: You have old-style ALT_ environment variables set.\n"
67534     printf "These are not respected, and will be ignored. It is recommended\n"
67535     printf "that you clean your environment. The following variables are set:\n"
67536     printf "$FOUND_ALT_VARIABLES\n"
67537     printf "\n"
67538   fi
67539 
67540   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67541     printf "WARNING: Your build output directory is not on a local disk.\n"
67542     printf "This will severely degrade build performance!\n"
67543     printf "It is recommended that you create an output directory on a local disk,\n"
67544     printf "and run the configure script again from that directory.\n"
67545     printf "\n"
67546   fi
67547 
67548   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67549     printf "WARNING: The result of this configuration has overridden an older\n"
67550     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67551     printf "proper build. Failure to do so might result in strange build problems.\n"
67552     printf "\n"
67553   fi
67554 
67555   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67556     printf "WARNING: The result of this configuration was not saved.\n"
67557     printf "You should run without '--no-create | -n' to create the configuration.\n"
67558     printf "\n"
67559   fi
67560 
67561 
67562 
67563   # Locate config.log.
67564   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67565     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67566   elif test -e "./config.log"; then
67567     CONFIG_LOG_PATH="."
67568   fi
67569 
67570   if test -e "$CONFIG_LOG_PATH/config.log"; then
67571     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67572     if test $? -eq 0; then
67573       printf "The following warnings were produced. Repeated here for convenience:\n"
67574       # We must quote sed expression (using []) to stop m4 from eating the [].
67575       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67576       printf "\n"
67577     fi
67578   fi
67579